summaryrefslogtreecommitdiff
path: root/drivers/scsi/pm8001/pm8001_hwi.c
diff options
context:
space:
mode:
authorViswas G <Viswas.G@microsemi.com>2017-10-18 11:39:13 +0530
committerMartin K. Petersen <martin.petersen@oracle.com>2017-10-18 20:55:43 -0400
commit869ddbdcae3b4fb83b99889abae31544c149b210 (patch)
treedbf004b9589bead79ca21204e734436e0b599969 /drivers/scsi/pm8001/pm8001_hwi.c
parent61daffdeaa9a091e33b21c615f3d6e4e3a2575d7 (diff)
scsi: pm80xx: corrected SATA abort handling sequence.
Modified SATA abort handling with following steps: 1) Set device state as recovery. 2) Send phy reset. 3) Wait for reset completion. 4) After successful reset, abort all IO's to the device. 5) After aborting all IO's to device, set device state as operational. Signed-off-by: Deepak Ukey <deepak.ukey@microsemi.com> Signed-off-by: Viswas G <Viswas.G@microsemi.com> Acked-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/pm8001/pm8001_hwi.c')
-rw-r--r--drivers/scsi/pm8001/pm8001_hwi.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index bc4a6f649ec9..db88a8e7ee0e 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -3209,10 +3209,16 @@ int pm8001_mpi_local_phy_ctl(struct pm8001_hba_info *pm8001_ha, void *piomb)
PM8001_MSG_DBG(pm8001_ha,
pm8001_printk("%x phy execute %x phy op failed!\n",
phy_id, phy_op));
- } else
+ } else {
PM8001_MSG_DBG(pm8001_ha,
pm8001_printk("%x phy execute %x phy op success!\n",
phy_id, phy_op));
+ pm8001_ha->phy[phy_id].reset_success = true;
+ }
+ if (pm8001_ha->phy[phy_id].enable_completion) {
+ complete(pm8001_ha->phy[phy_id].enable_completion);
+ pm8001_ha->phy[phy_id].enable_completion = NULL;
+ }
pm8001_tag_free(pm8001_ha, tag);
return 0;
}