linux/drivers/scsi/qla2xxx
Giridhar Malavali f3e0269517 scsi: qla2xxx: Avoid PCI IRQ affinity mapping when multiqueue is not supported
This patch fixes warning seen when BLK-MQ is enabled and hardware does not
support MQ. This will result into driver requesting MSIx vectors which are
equal or less than pre_desc via PCI IRQ Affinity infrastructure.

    [   19.746300] qla2xxx [0000:00:00.0]-0005: : QLogic Fibre Channel HBA Driver: 10.00.00.12-k.
    [   19.746599] qla2xxx [0000:02:00.0]-001d: : Found an ISP2432 irq 18 iobase 0x(____ptrval____).
    [   20.203186] ------------[ cut here ]------------
    [   20.203306] WARNING: CPU: 8 PID: 268 at drivers/pci/msi.c:1273 pci_irq_get_affinity+0xf4/0x120
    [   20.203481] Modules linked in: tg3 ptp qla2xxx(+) pps_core sg libphy scsi_transport_fc flash loop autofs4
    [   20.203700] CPU: 8 PID: 268 Comm: systemd-udevd Not tainted 5.0.0-rc5-00358-gdf3865f #113
    [   20.203830] Call Trace:
    [   20.203933]  [0000000000461bb0] __warn+0xb0/0xe0
    [   20.204090]  [00000000006c8f34] pci_irq_get_affinity+0xf4/0x120
    [   20.204219]  [000000000068c764] blk_mq_pci_map_queues+0x24/0x120
    [   20.204396]  [00000000007162f4] scsi_map_queues+0x14/0x40
    [   20.204626]  [0000000000673654] blk_mq_update_queue_map+0x94/0xe0
    [   20.204698]  [0000000000676ce0] blk_mq_alloc_tag_set+0x120/0x300
    [   20.204869]  [000000000071077c] scsi_add_host_with_dma+0x7c/0x300
    [   20.205419]  [00000000100ead54] qla2x00_probe_one+0x19d4/0x2640 [qla2xxx]
    [   20.205621]  [00000000006b3c88] pci_device_probe+0xc8/0x160
    [   20.205697]  [0000000000701c0c] really_probe+0x1ac/0x2e0
    [   20.205770]  [0000000000701f90] driver_probe_device+0x50/0x100
    [   20.205843]  [0000000000702134] __driver_attach+0xf4/0x120
    [   20.205913]  [0000000000700644] bus_for_each_dev+0x44/0x80
    [   20.206081]  [0000000000700c98] bus_add_driver+0x198/0x220
    [   20.206300]  [0000000000702950] driver_register+0x70/0x120
    [   20.206582]  [0000000010248224] qla2x00_module_init+0x224/0x284 [qla2xxx]
    [   20.206857] ---[ end trace b1de7a3f79fab2c2 ]---

The fix is to check if the hardware does not have Multi Queue capabiltiy,
use pci_alloc_irq_vectors() call instead of pci_alloc_irq_affinity().

Fixes: f664a3cc17 ("scsi: kill off the legacy IO path")
Cc: stable@vger.kernel.org #4.19
Signed-off-by: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-02-19 18:58:38 -05:00
..
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qla_attr.c scsi: qla2xxx: Prevent SysFS access when chip is down 2019-02-19 18:58:36 -05:00
qla_bsg.c scsi: qla2xxx: Reject bsg request if chip is down. 2018-09-11 20:28:10 -04:00
qla_bsg.h
qla_dbg.c scsi: qla2xxx: Add longer window for chip reset 2018-08-02 16:56:18 -04:00
qla_dbg.h
qla_def.h scsi: qla2xxx: Add support for setting port speed 2019-02-19 18:58:36 -05:00
qla_devtbl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qla_dfs.c scsi: qla2xxx: no need to check return value of debugfs_create functions 2019-01-29 00:40:54 -05:00
qla_fw.h scsi: qla2xxx: Migrate NVME N2N handling into state machine 2018-08-02 16:56:18 -04:00
qla_gbl.h scsi: qla2xxx: Move marker request behind QPair 2019-02-19 18:58:37 -05:00
qla_gs.c scsi: qla2xxx: Move debug messages before sending srb preventing panic 2019-02-19 18:58:34 -05:00
qla_init.c scsi: qla2xxx: Move marker request behind QPair 2019-02-19 18:58:37 -05:00
qla_inline.h scsi: qla2xxx: Add mode control for each physical port 2018-09-11 20:28:09 -04:00
qla_iocb.c scsi: qla2xxx: Move marker request behind QPair 2019-02-19 18:58:37 -05:00
qla_isr.c scsi: qla2xxx: Avoid PCI IRQ affinity mapping when multiqueue is not supported 2019-02-19 18:58:38 -05:00
qla_mbx.c scsi: qla2xxx: Move marker request behind QPair 2019-02-19 18:58:37 -05:00
qla_mid.c scsi: qla2xxx: Enable FC-NVME on NPIV ports 2018-12-12 20:38:13 -05:00
qla_mr.c scsi: qla2xxx: Remove two arguments from qlafx00_error_entry() 2018-10-23 21:32:34 -04:00
qla_mr.h
qla_nvme.c scsi: qla2xxx: Check for FW started flag before aborting 2019-02-19 18:58:36 -05:00
qla_nvme.h scsi: qla2xxx: Add First Burst support for FC-NVMe devices 2019-02-19 18:58:35 -05:00
qla_nx2.c scsi: qla2xxx: Improve several kernel-doc headers 2018-10-23 21:32:33 -04:00
qla_nx2.h scsi: qla2xxx: Remove unused symbols 2018-02-12 11:43:24 -05:00
qla_nx.c scsi: qla2xxx: Improve several kernel-doc headers 2018-10-23 21:32:33 -04:00
qla_nx.h
qla_os.c scsi: qla2xxx: Avoid PCI IRQ affinity mapping when multiqueue is not supported 2019-02-19 18:58:38 -05:00
qla_settings.h
qla_sup.c scsi: qla2xxx: Improve several kernel-doc headers 2018-10-23 21:32:33 -04:00
qla_target.c scsi: qla2xxx: remove redundant null check on pointer sess 2019-02-19 18:58:35 -05:00
qla_target.h scsi: qla2xxx: Fix DMA error when the DIF sg buffer crosses 4GB boundary 2019-01-11 22:08:15 -05:00
qla_tmpl.c scsi: qla2xxx: Add new FW dump template entry types 2019-02-19 18:58:37 -05:00
qla_tmpl.h scsi: qla2xxx: Add new FW dump template entry types 2019-02-19 18:58:37 -05:00
qla_version.h scsi: qla2xxx: Update driver version to 10.00.00.14-k 2019-02-19 18:58:37 -05:00
tcm_qla2xxx.c scsi: target/core: Remove the write_pending_status() callback function 2019-02-04 21:23:59 -05:00
tcm_qla2xxx.h scsi: qla2xxx: deadlock by configfs_depend_item 2018-12-19 21:26:38 -05:00