scsi: hpsa: fix selection of reply queue
authorMing Lei <[email protected]>
Tue, 13 Mar 2018 09:42:39 +0000 (17:42 +0800)
committerMartin K. Petersen <[email protected]>
Thu, 15 Mar 2018 03:31:13 +0000 (23:31 -0400)
commit8b834bff1b73dce46f4e9f5e84af6f73fed8b0ef
tree8eb55c8bed7a25767bed13dbaaa4b9021e79f83a
parent14bc1dff74277408f08661d03e785710a46e0699
scsi: hpsa: fix selection of reply queue

Since commit 84676c1f21e8 ("genirq/affinity: assign vectors to all
possible CPUs") we could end up with an MSI-X vector that did not have
any online CPUs mapped. This would lead to I/O hangs since there was no
CPU to receive the completion.

Retrieve IRQ affinity information using pci_irq_get_affinity() and use
this mapping to choose a reply queue.

[mkp: tweaked commit desc]

Cc: Hannes Reinecke <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>,
Cc: James Bottomley <[email protected]>,
Cc: Christoph Hellwig <[email protected]>,
Cc: Don Brace <[email protected]>
Cc: Kashyap Desai <[email protected]>
Cc: Laurence Oberman <[email protected]>
Cc: Meelis Roos <[email protected]>
Cc: Artem Bityutskiy <[email protected]>
Cc: Mike Snitzer <[email protected]>
Fixes: 84676c1f21e8 ("genirq/affinity: assign vectors to all possible CPUs")
Signed-off-by: Ming Lei <[email protected]>
Tested-by: Laurence Oberman <[email protected]>
Tested-by: Don Brace <[email protected]>
Tested-by: Artem Bityutskiy <[email protected]>
Acked-by: Don Brace <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
drivers/scsi/hpsa.c
drivers/scsi/hpsa.h