aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pm8001/pm8001_sas.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/pm8001/pm8001_sas.c')
-rw-r--r--drivers/scsi/pm8001/pm8001_sas.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c
index a85d73de7c80..f4eb18e51631 100644
--- a/drivers/scsi/pm8001/pm8001_sas.c
+++ b/drivers/scsi/pm8001/pm8001_sas.c
@@ -447,7 +447,6 @@ static int pm8001_task_exec(struct sas_task *task, const int num,
447 break; 447 break;
448 case SAS_PROTOCOL_SATA: 448 case SAS_PROTOCOL_SATA:
449 case SAS_PROTOCOL_STP: 449 case SAS_PROTOCOL_STP:
450 case SAS_PROTOCOL_SATA | SAS_PROTOCOL_STP:
451 rc = pm8001_task_prep_ata(pm8001_ha, ccb); 450 rc = pm8001_task_prep_ata(pm8001_ha, ccb);
452 break; 451 break;
453 default: 452 default:
@@ -704,6 +703,8 @@ static int pm8001_exec_internal_tmf_task(struct domain_device *dev,
704 int res, retry; 703 int res, retry;
705 struct sas_task *task = NULL; 704 struct sas_task *task = NULL;
706 struct pm8001_hba_info *pm8001_ha = pm8001_find_ha_by_dev(dev); 705 struct pm8001_hba_info *pm8001_ha = pm8001_find_ha_by_dev(dev);
706 struct pm8001_device *pm8001_dev = dev->lldd_dev;
707 DECLARE_COMPLETION_ONSTACK(completion_setstate);
707 708
708 for (retry = 0; retry < 3; retry++) { 709 for (retry = 0; retry < 3; retry++) {
709 task = sas_alloc_slow_task(GFP_KERNEL); 710 task = sas_alloc_slow_task(GFP_KERNEL);
@@ -729,6 +730,12 @@ static int pm8001_exec_internal_tmf_task(struct domain_device *dev,
729 goto ex_err; 730 goto ex_err;
730 } 731 }
731 wait_for_completion(&task->slow_task->completion); 732 wait_for_completion(&task->slow_task->completion);
733 if (pm8001_ha->chip_id != chip_8001) {
734 pm8001_dev->setds_completion = &completion_setstate;
735 PM8001_CHIP_DISP->set_dev_state_req(pm8001_ha,
736 pm8001_dev, 0x01);
737 wait_for_completion(&completion_setstate);
738 }
732 res = -TMF_RESP_FUNC_FAILED; 739 res = -TMF_RESP_FUNC_FAILED;
733 /* Even TMF timed out, return direct. */ 740 /* Even TMF timed out, return direct. */
734 if ((task->task_state_flags & SAS_TASK_STATE_ABORTED)) { 741 if ((task->task_state_flags & SAS_TASK_STATE_ABORTED)) {