1. 12 6月, 2016 2 次提交
  2. 08 6月, 2016 6 次提交
  3. 18 5月, 2016 8 次提交
  4. 07 5月, 2016 8 次提交
  5. 04 5月, 2016 1 次提交
    • K
      NVMe: Fix reset/remove race · 87c32077
      Keith Busch 提交于
      This fixes a scenario where device is present and being reset, but a
      request to unbind the driver occurs.
      
      A previous patch series addressing a device failure removal scenario
      flushed reset_work after controller disable to unblock reset_work waiting
      on a completion that wouldn't occur. This isn't safe as-is. The broken
      scenario can potentially be induced with:
      
        modprobe nvme && modprobe -r nvme
      
      To fix, the reset work is flushed immediately after setting the controller
      removing flag, and any subsequent reset will not proceed with controller
      initialization if the flag is set.
      
      The controller status must be polled while active, so the watchdog timer
      is also left active until the controller is disabled to cleanup requests
      that may be stuck during namespace removal.
      
      [Fixes: ff23a2a1]
      Signed-off-by: NKeith Busch <keith.busch@intel.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Reviewed-by: NSagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      87c32077
  6. 02 5月, 2016 10 次提交
  7. 26 4月, 2016 2 次提交
  8. 15 4月, 2016 1 次提交
    • K
      NVMe: Always use MSI/MSI-x interrupts · a5229050
      Keith Busch 提交于
      Multiple users have reported device initialization failure due the driver
      not receiving legacy PCI interrupts. This is not unique to any particular
      controller, but has been observed on multiple platforms.
      
      There have been no issues reported or observed when with message signaled
      interrupts, so this patch attempts to use MSI-x during initialization,
      falling back to MSI. If that fails, legacy would become the default.
      
      The setup_io_queues error handling had to change as a result: the admin
      queue's msix_entry used to be initialized to the legacy IRQ. The case
      where nr_io_queues is 0 would fail request_irq when setting up the admin
      queue's interrupt since re-enabling MSI-x fails with 0 vectors, leaving
      the admin queue's msix_entry invalid. Instead, return success immediately.
      Reported-by: NTim Muhlemmer <muhlemmer@gmail.com>
      Reported-by: NJon Derrick <jonathan.derrick@intel.com>
      Signed-off-by: NKeith Busch <keith.busch@intel.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      a5229050
  9. 13 4月, 2016 2 次提交
    • G
      nvme: Avoid reset work on watchdog timer function during error recovery · c875a709
      Guilherme G. Piccoli 提交于
      This patch adds a check on nvme_watchdog_timer() function to avoid the
      call to reset_work() when an error recovery process is ongoing on
      controller. The check is made by looking at pci_channel_offline()
      result.
      
      If we don't check for this on nvme_watchdog_timer(), error recovery
      mechanism can't recover well, because reset_work() won't be able to
      do its job (since we're in the middle of an error) and so the
      controller is removed from the system before error recovery mechanism
      can perform slot reset (which would allow the adapter to recover).
      
      In this patch we also have split the huge condition expression on
      nvme_watchdog_timer() by introducing an auxiliary function to help
      make the code more readable.
      Reviewed-by: NKeith Busch <keith.busch@intel.com>
      Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: NGuilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      c875a709
    • J
      NVMe: silence warning about unused 'dev' · 7e197930
      Jens Axboe 提交于
      Depending on options, we might not be using dev in nvme_cancel_io():
      
      drivers/nvme/host/pci.c: In function ‘nvme_cancel_io’:
      drivers/nvme/host/pci.c:970:19: warning: unused variable ‘dev’ [-Wunused-variable]
        struct nvme_dev *dev = data;
                         ^
      
      So get rid of it, and just cast for the dev_dbg_ratelimited() call.
      
      Fixes: 82b4552b ("nvme: Use blk-mq helper for IO termination")
      Signed-off-by: NJens Axboe <axboe@fb.com>
      7e197930