From 544dffba6bf27662cd8cece2236d3ace34d811d6 Mon Sep 17 00:00:00 2001 From: Tk-Glitch Date: Mon, 7 Aug 2023 09:27:56 +0200 Subject: [PATCH] 6.4.y: misc-additions: Revert "scsi: aacraid: Reply queue mapping to CPUs based on IRQ affinity" Fixes https://github.com/Frogging-Family/linux-tkg/issues/786 --- .../6.4/0012-misc-additions.patch | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) diff --git a/linux-tkg-patches/6.4/0012-misc-additions.patch b/linux-tkg-patches/6.4/0012-misc-additions.patch index 271023d..2204487 100644 --- a/linux-tkg-patches/6.4/0012-misc-additions.patch +++ b/linux-tkg-patches/6.4/0012-misc-additions.patch @@ -98,3 +98,140 @@ index e3454087fd31ae..d91a544678ee9d 100644 depends on ARCH_SUPPORTS_PER_VMA_LOCK && MMU && SMP help Allow per-vma locking during page fault handling. + +From 6ce292eefababf73880f3565acdb96cdc68f90ac Mon Sep 17 00:00:00 2001 +From: Tk-Glitch +Date: Mon, 7 Aug 2023 09:21:55 +0200 +Subject: revert [PATCH] scsi: aacraid: Reply queue mapping to CPUs based on IRQ + affinity + + Due to a regression on adaptec raid cards leading to reset on large random I/O + https://bugzilla.kernel.org/show_bug.cgi?id=217599 + + +diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h +index 7c6efde75..5e115e8b2 100644 +--- a/drivers/scsi/aacraid/aacraid.h ++++ b/drivers/scsi/aacraid/aacraid.h +@@ -1678,7 +1678,6 @@ struct aac_dev + u32 handle_pci_error; + bool init_reset; + u8 soft_reset_support; +- u8 use_map_queue; + }; + + #define aac_adapter_interrupt(dev) \ +diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c +index 3f062e401..deb32c9f4 100644 +--- a/drivers/scsi/aacraid/commsup.c ++++ b/drivers/scsi/aacraid/commsup.c +@@ -223,12 +223,8 @@ int aac_fib_setup(struct aac_dev * dev) + struct fib *aac_fib_alloc_tag(struct aac_dev *dev, struct scsi_cmnd *scmd) + { + struct fib *fibptr; +- u32 blk_tag; +- int i; + +- blk_tag = blk_mq_unique_tag(scsi_cmd_to_rq(scmd)); +- i = blk_mq_unique_tag_to_tag(blk_tag); +- fibptr = &dev->fibs[i]; ++ fibptr = &dev->fibs[scsi_cmd_to_rq(scmd)->tag]; + /* + * Null out fields that depend on being zero at the start of + * each I/O +diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c +index c4a36c0be..68f4dbcff 100644 +--- a/drivers/scsi/aacraid/linit.c ++++ b/drivers/scsi/aacraid/linit.c +@@ -19,7 +19,6 @@ + + #include + #include +-#include + #include + #include + #include +@@ -505,15 +504,6 @@ static int aac_slave_configure(struct scsi_device *sdev) + return 0; + } + +-static void aac_map_queues(struct Scsi_Host *shost) +-{ +- struct aac_dev *aac = (struct aac_dev *)shost->hostdata; +- +- blk_mq_pci_map_queues(&shost->tag_set.map[HCTX_TYPE_DEFAULT], +- aac->pdev, 0); +- aac->use_map_queue = true; +-} +- + /** + * aac_change_queue_depth - alter queue depths + * @sdev: SCSI device we are considering +@@ -1498,7 +1488,6 @@ static const struct scsi_host_template aac_driver_template = { + .bios_param = aac_biosparm, + .shost_groups = aac_host_groups, + .slave_configure = aac_slave_configure, +- .map_queues = aac_map_queues, + .change_queue_depth = aac_change_queue_depth, + .sdev_groups = aac_dev_groups, + .eh_abort_handler = aac_eh_abort, +@@ -1786,8 +1775,6 @@ static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) + shost->max_lun = AAC_MAX_LUN; + + pci_set_drvdata(pdev, shost); +- shost->nr_hw_queues = aac->max_msix; +- shost->host_tagset = 1; + + error = scsi_add_host(shost, &pdev->dev); + if (error) +@@ -1919,7 +1906,6 @@ static void aac_remove_one(struct pci_dev *pdev) + struct aac_dev *aac = (struct aac_dev *)shost->hostdata; + + aac_cancel_rescan_worker(aac); +- aac->use_map_queue = false; + scsi_remove_host(shost); + + __aac_shutdown(aac); +diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c +index 61949f374..11ef58204 100644 +--- a/drivers/scsi/aacraid/src.c ++++ b/drivers/scsi/aacraid/src.c +@@ -493,10 +493,6 @@ static int aac_src_deliver_message(struct fib *fib) + #endif + + u16 vector_no; +- struct scsi_cmnd *scmd; +- u32 blk_tag; +- struct Scsi_Host *shost = dev->scsi_host_ptr; +- struct blk_mq_queue_map *qmap; + + atomic_inc(&q->numpending); + +@@ -509,25 +505,8 @@ static int aac_src_deliver_message(struct fib *fib) + if ((dev->comm_interface == AAC_COMM_MESSAGE_TYPE3) + && dev->sa_firmware) + vector_no = aac_get_vector(dev); +- else { +- if (!fib->vector_no || !fib->callback_data) { +- if (shost && dev->use_map_queue) { +- qmap = &shost->tag_set.map[HCTX_TYPE_DEFAULT]; +- vector_no = qmap->mq_map[raw_smp_processor_id()]; +- } +- /* +- * We hardcode the vector_no for +- * reserved commands as a valid shost is +- * absent during the init +- */ +- else +- vector_no = 0; +- } else { +- scmd = (struct scsi_cmnd *)fib->callback_data; +- blk_tag = blk_mq_unique_tag(scsi_cmd_to_rq(scmd)); +- vector_no = blk_mq_unique_tag_to_hwq(blk_tag); +- } +- } ++ else ++ vector_no = fib->vector_no; + + if (native_hba) { + if (fib->flags & FIB_CONTEXT_FLAG_NATIVE_HBA_TMF) {