aacraid: do not activate events on non-SRC adapters
Subsystems (2)
PATCH 1/1 aacraid: do not activate events on non-SRC adapters
Only SRC-based adapters support the AifReqEvent function, so there is no point in trying to activate it on older, non-SRC based adapters.
Doing so lead to crashes on older adapters.
--- drivers/scsi/aacraid/aacraid.h | 5 +++++ drivers/scsi/aacraid/linit.c | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-)
drivers/scsi/aacraid/aacraid.h +5 -0
@@ -621,6 +621,11 @@ struct aac_driver_ident#define AAC_QUIRK_SCSI_32 0x0020/* +* SRC based adapters support the AifReqEvent functions +*/ +#define AAC_QUIRK_SRC 0x0040 + +/* * The adapter interface specs all queues to be located in the same * physically contiguous block. The host structure that defines the * commuication queues will assume they are each a separate physically
drivers/scsi/aacraid/linit.c +6 -5
@@ -236,10 +236,10 @@ static struct aac_driver_ident aac_drivers[] = { { aac_rx_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec Catch All */ { aac_rkt_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec Rocket Catch All */ { aac_nark_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec NEMER/ARK Catch All */ - { aac_src_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec PMC Series 6 (Tupelo) */ - { aac_srcv_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec PMC Series 7 (Denali) */ - { aac_srcv_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec PMC Series 8 */ - { aac_srcv_init, "aacraid", "ADAPTEC ", "RAID ", 2 } /* Adaptec PMC Series 9 */ + { aac_src_init, "aacraid", "ADAPTEC ", "RAID ", 2, AAC_QUIRK_SRC }, /* Adaptec PMC Series 6 (Tupelo) */ + { aac_srcv_init, "aacraid", "ADAPTEC ", "RAID ", 2, AAC_QUIRK_SRC }, /* Adaptec PMC Series 7 (Denali) */ + { aac_srcv_init, "aacraid", "ADAPTEC ", "RAID ", 2, AAC_QUIRK_SRC }, /* Adaptec PMC Series 8 */ + { aac_srcv_init, "aacraid", "ADAPTEC ", "RAID ", 2, AAC_QUIRK_SRC } /* Adaptec PMC Series 9 */ };/**
@@ -1299,7 +1299,8 @@ static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)else shost->this_id = shost->max_id; -aac_intr_normal (aac,0 ,2 ,0 ,NULL ); +if (aac_drivers[index].quirks &AAC_QUIRK_SRC ) +aac_intr_normal (aac,0 ,2 ,0 ,NULL );/* * dmb - we may need to move the setting of these parms somewhere else once
Signature · 1 line
1.8.5.6
Quoted 84 lines
-----Original Message-----
From: Hannes Reinecke [mailto:[email protected]]
Sent: Wednesday, May 18, 2016 1:17 AM
To: Martin K. Petersen
Cc: James Bottomley; Christoph Hellwig; [email protected]; Johannes Thumshirn; Raghava Aditya Renukunta; Hannes Reinecke; Hannes Reinecke
Subject: [PATCH] aacraid: do not activate events on non-SRC adaptersEXTERNAL EMAIL
Only SRC-based adapters support the AifReqEvent function, so there is no point in trying to activate it on older, non-SRC based adapters.
Doing so lead to crashes on older adapters.Reviewed-by Johannes Thumshirn <[email protected]>Signed-off-by Hannes Reinecke <[email protected]>--- drivers/scsi/aacraid/aacraid.h | 5 +++++ drivers/scsi/aacraid/linit.c | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-)drivers/scsi/aacraid/aacraid.h +5
-0@@ -621,6 +621,11 @@ struct aac_driver_ident#define AAC_QUIRK_SCSI_32 0x0020/* +* SRC based adapters support the AifReqEvent functions +*/ +#define AAC_QUIRK_SRC 0x0040 + +/* * The adapter interface specs all queues to be located in the same * physically contiguous block. The host structure that defines the * commuication queues will assume they are each a separate physically drivers/scsi/aacraid/linit.c +0
-0@@ -236,10 +236,10 @@ static struct aac_driver_ident aac_drivers[] = { { aac_rx_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec CatchAll */
{aac_rkt_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec
Rocket Catch All */
{aac_nark_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec
NEMER/ARK Catch All */
- {aac_src_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec PMC
Series 6 (Tupelo) */
- {aac_srcv_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec PMC
Series 7 (Denali) */
- {aac_srcv_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec PMC
Series 8 */
- {aac_srcv_init, "aacraid", "ADAPTEC ", "RAID ", 2 } /* Adaptec PMC
Series 9 */
+ {aac_src_init, "aacraid", "ADAPTEC ", "RAID ", 2,AAC_QUIRK_SRC
}, /* Adaptec PMC Series 6 (Tupelo) */
+ {aac_srcv_init, "aacraid", "ADAPTEC ", "RAID ", 2,AAC_QUIRK_SRC
}, /* Adaptec PMC Series 7 (Denali) */
+ {aac_srcv_init, "aacraid", "ADAPTEC ", "RAID ", 2,AAC_QUIRK_SRC
}, /* Adaptec PMC Series 8 */
+ {aac_srcv_init, "aacraid", "ADAPTEC ", "RAID ", 2,AAC_QUIRK_SRC
} /* Adaptec PMC Series 9 */
};/**
drivers/scsi/aacraid/linit.c +2
-1@@ -1299,7 +1299,8 @@ static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) else shost->this_id = shost->max_id; -aac_intr_normal (aac,0 ,2 ,0 ,NULL ); +if (aac_drivers[index].quirks &AAC_QUIRK_SRC ) +aac_intr_normal (aac,0 ,2 ,0 ,NULL );/* * dmb - we may need to move the setting of these parms somewhere
else once
--
1.8.5.6
Martin K. Petersen
AppliedQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Hannes" == Hannes Reinecke <[email protected]> writes:
Hannes> Only SRC-based adapters support the AifReqEvent function, so Hannes> there is no point in trying to activate it on older, non-SRC Hannes> based adapters. Doing so lead to crashes on older adapters.
Applied to 4.7/scsi-fixes.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering