From: Konstantin Khorenko <khore...@virtuozzo.com> This partially reverts ms commit 395e5df79a95 ("scsi: aacraid: Remove reference to Series-9")
The patch above not anly drops Series-9 cards checks but also changes logic for Series-6 controllers which lead to controller hungs/resets under high io load. So revert original arc ctrl checks for Series-6 controllers. https://jira.sw.ru/browse/PSBM-95736 Signed-off-by: Konstantin Khorenko <khore...@virtuozzo.com> VZ8 rebase note: this patch didn't hit either mainstream or rhel8 or ubuntu, probably because the device is quiet old, but nevertheles the patch looks right and acronis possibly still needs this for aacraid cards. https://jira.sw.ru/browse/PSBM-127846 (cherry-picked from rh7 commit d3d655f570c8 ("scsi: aacraid: resurrect correct arc ctrl checks for Series-6")) Signed-off-by: Pavel Tikhomirov <ptikhomi...@virtuozzo.com> (cherry picked from vz8 commit 0801e04d23fd0cb0276d85753df2ef57cd4ac62e) Signed-off-by: Andrey Zhadchenko <andrey.zhadche...@virtuozzo.com> --- drivers/scsi/aacraid/aacraid.h | 11 ----------- drivers/scsi/aacraid/comminit.c | 14 ++++++++++---- drivers/scsi/aacraid/commsup.c | 4 +++- drivers/scsi/aacraid/linit.c | 7 +++++-- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 3733df7..047dbd7 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h @@ -2740,17 +2740,6 @@ unsigned int aac_intr_normal(struct aac_dev *dev, u32 Index, int aac_rx_deliver_producer(struct fib * fib); void aac_reinit_aif(struct aac_dev *aac, unsigned int index); -static inline int aac_is_src(struct aac_dev *dev) -{ - u16 device = dev->pdev->device; - - if (device == PMC_DEVICE_S6 || - device == PMC_DEVICE_S7 || - device == PMC_DEVICE_S8) - return 1; - return 0; -} - static inline int aac_supports_2T(struct aac_dev *dev) { return (dev->adapter_info.options & AAC_OPT_NEW_COMM_64); diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c index 355b16f..c696770 100644 --- a/drivers/scsi/aacraid/comminit.c +++ b/drivers/scsi/aacraid/comminit.c @@ -41,7 +41,9 @@ static inline int aac_is_msix_mode(struct aac_dev *dev) { u32 status = 0; - if (aac_is_src(dev)) + if (dev->pdev->device == PMC_DEVICE_S6 || + dev->pdev->device == PMC_DEVICE_S7 || + dev->pdev->device == PMC_DEVICE_S8) status = src_readl(dev, MUnit.OMR); return (status & AAC_INT_MODE_MSIX); } @@ -348,7 +350,8 @@ int aac_send_shutdown(struct aac_dev * dev) /* FIB should be freed only after getting the response from the F/W */ if (status != -ERESTARTSYS) aac_fib_free(fibctx); - if (aac_is_src(dev) && + if ((dev->pdev->device == PMC_DEVICE_S7 || + dev->pdev->device == PMC_DEVICE_S8) && dev->msi_enabled) aac_set_intx_mode(dev); return status; @@ -609,7 +612,8 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) dev->max_fib_size = status[1] & 0xFFE0; host->sg_tablesize = status[2] >> 16; dev->sg_tablesize = status[2] & 0xFFFF; - if (aac_is_src(dev)) { + if (dev->pdev->device == PMC_DEVICE_S7 || + dev->pdev->device == PMC_DEVICE_S8) { if (host->can_queue > (status[3] >> 16) - AAC_NUM_MGT_FIB) host->can_queue = (status[3] >> 16) - @@ -628,7 +632,9 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) pr_warn("numacb=%d ignored\n", numacb); } - if (aac_is_src(dev)) + if (dev->pdev->device == PMC_DEVICE_S6 || + dev->pdev->device == PMC_DEVICE_S7 || + dev->pdev->device == PMC_DEVICE_S8) aac_define_int_mode(dev); /* * Ok now init the communication subsystem diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 54eb4d4..dd55d51 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -2564,7 +2564,9 @@ void aac_free_irq(struct aac_dev *dev) { int i; - if (aac_is_src(dev)) { + if (dev->pdev->device == PMC_DEVICE_S6 || + dev->pdev->device == PMC_DEVICE_S7 || + dev->pdev->device == PMC_DEVICE_S8) { if (dev->max_msix > 1) { for (i = 0; i < dev->max_msix; i++) free_irq(pci_irq_vector(dev->pdev, i), diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 71b48e29..d1a1d0a 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -1532,7 +1532,9 @@ static void __aac_shutdown(struct aac_dev * aac) aac_adapter_disable_int(aac); - if (aac_is_src(aac)) { + if (aac->pdev->device == PMC_DEVICE_S6 || + aac->pdev->device == PMC_DEVICE_S7 || + aac->pdev->device == PMC_DEVICE_S8) { if (aac->max_msix > 1) { for (i = 0; i < aac->max_msix; i++) { free_irq(pci_irq_vector(aac->pdev, i), @@ -1825,7 +1827,8 @@ static int aac_acquire_resources(struct aac_dev *dev) aac_adapter_enable_int(dev); - if (aac_is_src(dev)) + if (dev->pdev->device == PMC_DEVICE_S7 || + dev->pdev->device == PMC_DEVICE_S8) aac_define_int_mode(dev); if (dev->msi_enabled) -- 1.8.3.1 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel