From: Linus Torvalds Date: Fri, 11 Apr 2014 23:45:59 +0000 (-0700) Subject: Merge git://git.infradead.org/users/willy/linux-nvme X-Git-Tag: v3.15-rc1~21 X-Git-Url: http://git.agner.ch/gitweb/?p=linux.git;a=commitdiff_plain;h=3e8072d48b2dd0898e99698018b2045f8cd49965 Merge git://git.infradead.org/users/willy/linux-nvme Pull NVMe driver updates from Matthew Wilcox: "Various updates to the NVMe driver. The most user-visible change is that drive hotplugging now works and CPU hotplug while an NVMe drive is installed should also work better" * git://git.infradead.org/users/willy/linux-nvme: NVMe: Retry failed commands with non-fatal errors NVMe: Add getgeo to block ops NVMe: Start-stop nvme_thread during device add-remove. NVMe: Make I/O timeout a module parameter NVMe: CPU hot plug notification NVMe: per-cpu io queues NVMe: Replace DEFINE_PCI_DEVICE_TABLE NVMe: Fix divide-by-zero in nvme_trans_io_get_num_cmds NVMe: IOCTL path RCU protect queue access NVMe: RCU protected access to io queues NVMe: Initialize device reference count earlier NVMe: Add CONFIG_PM_SLEEP to suspend/resume functions --- 3e8072d48b2dd0898e99698018b2045f8cd49965 diff --cc drivers/block/nvme-core.c index da085ff10d25,efa9c8f4a7a7..7c64fa756cce --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c @@@ -2441,10 -2725,12 +2715,13 @@@ static int nvme_probe(struct pci_dev *p GFP_KERNEL); if (!dev->queues) goto free; + dev->io_queue = alloc_percpu(unsigned short); + if (!dev->io_queue) + goto free; INIT_LIST_HEAD(&dev->namespaces); - INIT_WORK(&dev->reset_work, nvme_reset_failed_dev); + dev->reset_workfn = nvme_reset_failed_dev; + INIT_WORK(&dev->reset_work, nvme_reset_workfn); dev->pci_dev = pdev; pci_set_drvdata(pdev, dev); result = nvme_set_instance(dev); diff --cc include/linux/nvme.h index 6b9aafed225f,b95431d0338b..a50173ca1d72 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h @@@ -87,8 -92,8 +92,9 @@@ struct nvme_dev struct list_head namespaces; struct kref kref; struct miscdevice miscdev; + work_func_t reset_workfn; struct work_struct reset_work; + struct notifier_block nb; char name[12]; char serial[20]; char model[40];