diff options
| -rw-r--r-- | drivers/scsi/aacraid/aacraid.h | 5 | ||||
| -rw-r--r-- | drivers/scsi/aacraid/linit.c | 11 | ||||
| -rw-r--r-- | drivers/scsi/mpt3sas/mpt3sas_scsih.c | 3 | ||||
| -rw-r--r-- | drivers/scsi/scsi_lib.c | 7 | ||||
| -rw-r--r-- | drivers/scsi/sd.c | 9 |
5 files changed, 25 insertions, 10 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 |
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 6a4df5a315e9..6bff13e7afc7 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c | |||
| @@ -7975,13 +7975,14 @@ mpt3sas_scsih_event_callback(struct MPT3SAS_ADAPTER *ioc, u8 msix_index, | |||
| 7975 | ActiveCableEventData = | 7975 | ActiveCableEventData = |
| 7976 | (Mpi26EventDataActiveCableExcept_t *) mpi_reply->EventData; | 7976 | (Mpi26EventDataActiveCableExcept_t *) mpi_reply->EventData; |
| 7977 | if (ActiveCableEventData->ReasonCode == | 7977 | if (ActiveCableEventData->ReasonCode == |
| 7978 | MPI26_EVENT_ACTIVE_CABLE_INSUFFICIENT_POWER) | 7978 | MPI26_EVENT_ACTIVE_CABLE_INSUFFICIENT_POWER) { |
| 7979 | pr_info(MPT3SAS_FMT "Currently an active cable with ReceptacleID %d", | 7979 | pr_info(MPT3SAS_FMT "Currently an active cable with ReceptacleID %d", |
| 7980 | ioc->name, ActiveCableEventData->ReceptacleID); | 7980 | ioc->name, ActiveCableEventData->ReceptacleID); |
| 7981 | pr_info("cannot be powered and devices connected to this active cable"); | 7981 | pr_info("cannot be powered and devices connected to this active cable"); |
| 7982 | pr_info("will not be seen. This active cable"); | 7982 | pr_info("will not be seen. This active cable"); |
| 7983 | pr_info("requires %d mW of power", | 7983 | pr_info("requires %d mW of power", |
| 7984 | ActiveCableEventData->ActiveCablePowerRequirement); | 7984 | ActiveCableEventData->ActiveCablePowerRequirement); |
| 7985 | } | ||
| 7985 | break; | 7986 | break; |
| 7986 | 7987 | ||
| 7987 | default: /* ignore the rest */ | 7988 | default: /* ignore the rest */ |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index b2e332af0f51..c71344aebdbb 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
| @@ -821,9 +821,12 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes) | |||
| 821 | } | 821 | } |
| 822 | 822 | ||
| 823 | /* | 823 | /* |
| 824 | * If we finished all bytes in the request we are done now. | 824 | * special case: failed zero length commands always need to |
| 825 | * drop down into the retry code. Otherwise, if we finished | ||
| 826 | * all bytes in the request we are done now. | ||
| 825 | */ | 827 | */ |
| 826 | if (!scsi_end_request(req, error, good_bytes, 0)) | 828 | if (!(blk_rq_bytes(req) == 0 && error) && |
| 829 | !scsi_end_request(req, error, good_bytes, 0)) | ||
| 827 | return; | 830 | return; |
| 828 | 831 | ||
| 829 | /* | 832 | /* |
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 428c03ef02b2..f459dff30512 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
| @@ -1398,11 +1398,15 @@ static int media_not_present(struct scsi_disk *sdkp, | |||
| 1398 | **/ | 1398 | **/ |
| 1399 | static unsigned int sd_check_events(struct gendisk *disk, unsigned int clearing) | 1399 | static unsigned int sd_check_events(struct gendisk *disk, unsigned int clearing) |
| 1400 | { | 1400 | { |
| 1401 | struct scsi_disk *sdkp = scsi_disk(disk); | 1401 | struct scsi_disk *sdkp = scsi_disk_get(disk); |
| 1402 | struct scsi_device *sdp = sdkp->device; | 1402 | struct scsi_device *sdp; |
| 1403 | struct scsi_sense_hdr *sshdr = NULL; | 1403 | struct scsi_sense_hdr *sshdr = NULL; |
| 1404 | int retval; | 1404 | int retval; |
| 1405 | 1405 | ||
| 1406 | if (!sdkp) | ||
| 1407 | return 0; | ||
| 1408 | |||
| 1409 | sdp = sdkp->device; | ||
| 1406 | SCSI_LOG_HLQUEUE(3, sd_printk(KERN_INFO, sdkp, "sd_check_events\n")); | 1410 | SCSI_LOG_HLQUEUE(3, sd_printk(KERN_INFO, sdkp, "sd_check_events\n")); |
| 1407 | 1411 | ||
| 1408 | /* | 1412 | /* |
| @@ -1459,6 +1463,7 @@ out: | |||
| 1459 | kfree(sshdr); | 1463 | kfree(sshdr); |
| 1460 | retval = sdp->changed ? DISK_EVENT_MEDIA_CHANGE : 0; | 1464 | retval = sdp->changed ? DISK_EVENT_MEDIA_CHANGE : 0; |
| 1461 | sdp->changed = 0; | 1465 | sdp->changed = 0; |
| 1466 | scsi_disk_put(sdkp); | ||
| 1462 | return retval; | 1467 | return retval; |
| 1463 | } | 1468 | } |
| 1464 | 1469 | ||
