]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Dec 2016 07:10:49 +0000 (08:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Dec 2016 07:10:49 +0000 (08:10 +0100)
added patches:
scsi-mpt3sas-unblock-device-after-controller-reset.patch

queue-4.4/scsi-mpt3sas-unblock-device-after-controller-reset.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/scsi-mpt3sas-unblock-device-after-controller-reset.patch b/queue-4.4/scsi-mpt3sas-unblock-device-after-controller-reset.patch
new file mode 100644 (file)
index 0000000..1962760
--- /dev/null
@@ -0,0 +1,64 @@
+From 7ff723ad0f87feba43dda45fdae71206063dd7d4 Mon Sep 17 00:00:00 2001
+From: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
+Date: Thu, 17 Nov 2016 16:15:58 +0530
+Subject: scsi: mpt3sas: Unblock device after controller reset
+
+From: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
+
+commit 7ff723ad0f87feba43dda45fdae71206063dd7d4 upstream.
+
+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]
+
+Fixes: ac6c2a93bd07 ("mpt3sas: Fix for SATA drive in blocked state, after diag reset")
+Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/mpt3sas/mpt3sas_scsih.c |   13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
++++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+@@ -3706,6 +3706,11 @@ _scsih_temp_threshold_events(struct MPT3
+       }
+ }
++static inline bool ata_12_16_cmd(struct scsi_cmnd *scmd)
++{
++      return (scmd->cmnd[0] == ATA_12 || scmd->cmnd[0] == ATA_16);
++}
++
+ /**
+  * _scsih_flush_running_cmds - completing outstanding commands.
+  * @ioc: per adapter object
+@@ -3727,6 +3732,9 @@ _scsih_flush_running_cmds(struct MPT3SAS
+               if (!scmd)
+                       continue;
+               count++;
++              if (ata_12_16_cmd(scmd))
++                      scsi_internal_device_unblock(scmd->device,
++                                                      SDEV_RUNNING);
+               mpt3sas_base_free_smid(ioc, smid);
+               scsi_dma_unmap(scmd);
+               if (ioc->pci_error_recovery)
+@@ -3831,11 +3839,6 @@ _scsih_eedp_error_handling(struct scsi_c
+           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
index 4226916dee2e84286a17b97c7d56d226c568981d..86ed74100360b0240d6034129cc95fb4a17ab7a2 100644 (file)
@@ -20,3 +20,4 @@ mei-me-disable-driver-on-spt-sps-firmware.patch
 mei-me-fix-place-for-kaby-point-device-ids.patch
 mei-fix-return-value-on-disconnection.patch
 flow_dissect-call-init_default_flow_dissectors-earlier.patch
+scsi-mpt3sas-unblock-device-after-controller-reset.patch