The underlying blk_mq_tag_set, and request timeout parameters support an
unsigned int. Extend the size of the nvme module parameters for io and
admin commands to match.
Signed-off-by: Marc Olson <email address hidden>
Signed-off-by: Christoph Hellwig <email address hidden>
(backported from commit 8ae4e4477d8f5cc7736816a0492f82934ca32ab7)
[note: *only* the io_timeout parameter has been backported]
Signed-off-by: Daniel Axtens <email address hidden>
Acked-by: Kamal Mostafa <email address hidden>
Acked-by: Kleber Sacilotto de Souza <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>
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: Tim Muhlemmer <email address hidden>
Reported-by: Jon Derrick <email address hidden>
Signed-off-by: Keith Busch <email address hidden>
Signed-off-by: Jens Axboe <email address hidden>
(back ported from commit a5229050b69cfffb690b546c357ca5a60434c0c8)
Signed-off-by: Tim Gardner <email address hidden>
Conflicts:
drivers/nvme/host/pci.c
Acked-by: Brad Figg <email address hidden>
Signed-off-by: Kamal Mostafa <email address hidden>
(kamal: back ported from <email address hidden>)
Acked-by: Marcelo Cerri <email address hidden>
Acked-by: Thadeu Lima de Souza Cascardo <email address hidden>
The setup/probe part currently relies on INTx being there and
working, that's not always the case. For devices that don't
advertise INTx, enable a single MSIx vector early on and disable
it again before we ask for our full range of queue vecs.
Acked-by: Keith Busch <email address hidden>
Signed-off-by: Jens Axboe <email address hidden>
(cherry picked from commit e32efbfc35c1b06f1bfe3e6d737acdd14d27baed)
Signed-off-by: Kamal Mostafa <email address hidden>
Acked-by: Marcelo Cerri <email address hidden>
Acked-by: Thadeu Lima de Souza Cascardo <email address hidden>
d022b3e...
by
Alexander Gordeev <email address hidden>
nvme: Use pci_enable_msi_range() and pci_enable_msix_range()
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() or pci_enable_msi_exact()
and pci_enable_msix_range() or pci_enable_msix_exact()
interfaces.
Signed-off-by: Alexander Gordeev <email address hidden>
Cc: Keith Busch <email address hidden>
Cc: Matthew Wilcox <email address hidden>
Cc: Jens Axboe <email address hidden>
Cc: <email address hidden>
Cc: <email address hidden>
Reviewed-by: Keith Busch <email address hidden>
Signed-off-by: Jens Axboe <email address hidden>
(cherry picked from commit be577fabf3ec2c9593f4d3c044283be783b88c3b)
Signed-off-by: Kamal Mostafa <email address hidden>
Acked-by: Marcelo Cerri <email address hidden>
Acked-by: Thadeu Lima de Souza Cascardo <email address hidden>
The device's IO queues are associated with CPUs, so we can use a per-cpu
variable to map the a qid to a cpu. This provides a convienient way
to optimally assign queues to multiple cpus when the device supports
fewer queues than the host has cpus. The previous implementation may
have assigned these poorly in these situations. This patch addresses
this by sharing queues among cpus that are "close" together and should
have a lower lock contention penalty.
Signed-off-by: Keith Busch <email address hidden>
Signed-off-by: Matthew Wilcox <email address hidden>
(cherry picked from commit 42f614201e80ff4cfb8b285d7190149a8e1e6cec)
Signed-off-by: Kamal Mostafa <email address hidden>
Acked-by: Marcelo Cerri <email address hidden>
Acked-by: Thadeu Lima de Souza Cascardo <email address hidden>