diff options
author | Hannes Reinecke <hare@suse.de> | 2016-05-18 04:16:51 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-05-22 14:53:07 -0400 |
commit | 787ab6e97024926f38773287d9f98a9b330bce23 (patch) | |
tree | d7469250687019c3253dd81ad4cfc58eec9a4532 | |
parent | 7ebd67e0dece0ec53e5541fc600eda4e050fab72 (diff) |
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.
Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.com>
Reviewed-by: Raghava Aditya Renukunta <RaghavaAaditya.Renukunta@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/aacraid/aacraid.h | 5 | ||||
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 8f90d9e77104..969c312de1be 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h | |||
@@ -621,6 +621,11 @@ struct aac_driver_ident | |||
621 | #define AAC_QUIRK_SCSI_32 0x0020 | 621 | #define AAC_QUIRK_SCSI_32 0x0020 |
622 | 622 | ||
623 | /* | 623 | /* |
624 | * SRC based adapters support the AifReqEvent functions | ||
625 | */ | ||
626 | #define AAC_QUIRK_SRC 0x0040 | ||
627 | |||
628 | /* | ||
624 | * The adapter interface specs all queues to be located in the same | 629 | * The adapter interface specs all queues to be located in the same |
625 | * physically contiguous block. The host structure that defines the | 630 | * physically contiguous block. The host structure that defines the |
626 | * commuication queues will assume they are each a separate physically | 631 | * commuication queues will assume they are each a separate physically |
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index a943bd230bc2..79871f3519ff 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -236,10 +236,10 @@ static struct aac_driver_ident aac_drivers[] = { | |||
236 | { aac_rx_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec Catch All */ | 236 | { aac_rx_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec Catch All */ |
237 | { aac_rkt_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec Rocket Catch All */ | 237 | { aac_rkt_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec Rocket Catch All */ |
238 | { aac_nark_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec NEMER/ARK Catch All */ | 238 | { aac_nark_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec NEMER/ARK Catch All */ |
239 | { aac_src_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec PMC Series 6 (Tupelo) */ | 239 | { aac_src_init, "aacraid", "ADAPTEC ", "RAID ", 2, AAC_QUIRK_SRC }, /* Adaptec PMC Series 6 (Tupelo) */ |
240 | { aac_srcv_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec PMC Series 7 (Denali) */ | 240 | { aac_srcv_init, "aacraid", "ADAPTEC ", "RAID ", 2, AAC_QUIRK_SRC }, /* Adaptec PMC Series 7 (Denali) */ |
241 | { aac_srcv_init, "aacraid", "ADAPTEC ", "RAID ", 2 }, /* Adaptec PMC Series 8 */ | 241 | { aac_srcv_init, "aacraid", "ADAPTEC ", "RAID ", 2, AAC_QUIRK_SRC }, /* Adaptec PMC Series 8 */ |
242 | { aac_srcv_init, "aacraid", "ADAPTEC ", "RAID ", 2 } /* Adaptec PMC Series 9 */ | 242 | { aac_srcv_init, "aacraid", "ADAPTEC ", "RAID ", 2, AAC_QUIRK_SRC } /* Adaptec PMC Series 9 */ |
243 | }; | 243 | }; |
244 | 244 | ||
245 | /** | 245 | /** |
@@ -1299,7 +1299,8 @@ static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1299 | else | 1299 | else |
1300 | shost->this_id = shost->max_id; | 1300 | shost->this_id = shost->max_id; |
1301 | 1301 | ||
1302 | aac_intr_normal(aac, 0, 2, 0, NULL); | 1302 | if (aac_drivers[index].quirks & AAC_QUIRK_SRC) |
1303 | aac_intr_normal(aac, 0, 2, 0, NULL); | ||
1303 | 1304 | ||
1304 | /* | 1305 | /* |
1305 | * dmb - we may need to move the setting of these parms somewhere else once | 1306 | * dmb - we may need to move the setting of these parms somewhere else once |