Commit f0783d4
scsi: qla2xxx: Use correct number of vectors for online CPUs
When SCSI-MQ is enabled, in some case system would present
nr_possible_cpus() which is greater than requested vectors by the
driver. This results into driver being able to get larger number of MSI-X
vectors than actual online CPUs. Driver then uses
pci_alloc_irq_vectors_affinity() to assign 1:1 mapping and affinity for
each MSI-x vector to CPUs. When the command is submitted using MSI-x
vector, assigned to offline CPU, it results in an ABTS and system
hang. This hang is result of a driver not being able to process interrupt
on a vector assigned to an Off-line CPUs
This patch fixes this issue by setting irq_offset value for the
blk_mq_pci_map_queues() to use only those CPUs which has CPU mask affinity
assigned and are online. By using the irq_offset value, driver will allow
online cpumask to decide which vectors are used in blk_mq_pci_map_queues().
Fixes: 5601236 ("scsi: qla2xxx: Add Block Multi Queue functionality.")
Cc: <stable@vger.kernel.org> #4.19
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Himanshu Madhani <hmadhani@marvell.com>
Tested-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent 7bb25a8 commit f0783d4
3 files changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4394 | 4394 | | |
4395 | 4395 | | |
4396 | 4396 | | |
| 4397 | + | |
| 4398 | + | |
4397 | 4399 | | |
4398 | 4400 | | |
4399 | 4401 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3446 | 3446 | | |
3447 | 3447 | | |
3448 | 3448 | | |
| 3449 | + | |
3449 | 3450 | | |
3450 | 3451 | | |
3451 | 3452 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6939 | 6939 | | |
6940 | 6940 | | |
6941 | 6941 | | |
6942 | | - | |
| 6942 | + | |
6943 | 6943 | | |
6944 | 6944 | | |
6945 | 6945 | | |
| |||
0 commit comments