Message ID | 20240213162200.1875970-1-don.brace@microchip.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | smartpqi: fix disable_managed_interrupts | expand |
On Tue, 13 Feb 2024 10:21:59 -0600, Don Brace wrote: > Correct blk-mq registration issue with module parameter > disable_managed_interrupts enabled. > > When we turn off the default PCI_IRQ_AFFINITY flag, the driver needs to > register with blk-mq using blk_mq_map_queues(). The driver is currently > calling blk_mq_pci_map_queues() which results in a stack trace and > possibly undefined behavior. > > [...] Applied to 6.8/scsi-fixes, thanks! [1/1] smartpqi: fix disable_managed_interrupts https://git.kernel.org/mkp/scsi/c/5761eb9761d2
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index ceff1ec13f9e..385180c98be4 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -6533,8 +6533,11 @@ static void pqi_map_queues(struct Scsi_Host *shost) { struct pqi_ctrl_info *ctrl_info = shost_to_hba(shost); - blk_mq_pci_map_queues(&shost->tag_set.map[HCTX_TYPE_DEFAULT], + if (!ctrl_info->disable_managed_interrupts) + return blk_mq_pci_map_queues(&shost->tag_set.map[HCTX_TYPE_DEFAULT], ctrl_info->pci_dev, 0); + else + return blk_mq_map_queues(&shost->tag_set.map[HCTX_TYPE_DEFAULT]); } static inline bool pqi_is_tape_changer_device(struct pqi_scsi_dev *device)