From: Suganath Prabu S Date: Thu, 17 Nov 2016 10:45:58 +0000 (+0530) Subject: scsi: mpt3sas: Unblock device after controller reset X-Git-Tag: v4.1.12-93~2^2~80 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b75596ceedf9709edb8192adc1d8ede1407a67ac;p=users%2Fjedix%2Flinux-maple.git scsi: mpt3sas: Unblock device after controller reset Orabug: 25639713 While issuing any ATA passthrough command to firmware the driver will block the device. But it will unblock the device only if the I/O completes through the ISR path. If a controller reset occurs before command completion the device will remain in blocked state. Make sure we unblock the device following a controller reset if an ATA passthrough command was queued. [mkp: clarified patch description] Cc: # v4.4+ Fixes: ac6c2a93bd07 ("mpt3sas: Fix for SATA drive in blocked state, after diag reset") Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen (cherry picked from commit 7ff723ad0f87feba43dda45fdae71206063dd7d4) Signed-off-by: Brian Maly --- diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index e45c34ce9d3f5..5ac68ec9d02f7 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -4032,11 +4032,6 @@ _scsih_eedp_error_handling(struct scsi_cmnd *scmd, u16 ioc_status) SAM_STAT_CHECK_CONDITION; } -static inline bool ata_12_16_cmd(struct scsi_cmnd *scmd) -{ - return (scmd->cmnd[0] == ATA_12 || scmd->cmnd[0] == ATA_16); -} - /** * scsih_qcmd - main scsi request entry point * @scmd: pointer to scsi command object