Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1459879

[PATCH 3/8] hisi_sas: add internal abort to hisi_sas_abort_task()

From John Garry <john.garry@huawei.com>
Newsgroups linux.kernel
Subject [PATCH 3/8] hisi_sas: add internal abort to hisi_sas_abort_task()
Date 2016-08-10 22:50 +0200
Message-ID <s4IBP-1DK-7@gated-at.bofh.it> (permalink)
References <s4GgF-79-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Execute an internal abort for executing an internal
task abort. This is for case of command still being
present in host when abort is executed.

For a SATA internal abort, we set abort for all tasks
associated with the device.

Signed-off-by: John Garry <john.garry@huawei.com>
---
 drivers/scsi/hisi_sas/hisi_sas_main.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 9540953..6c82e07 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -840,18 +840,23 @@ static int hisi_sas_abort_task(struct sas_task *task)
 			}
 		}
 
+		hisi_sas_internal_task_abort(hisi_hba, device, 0, tag);
 	} else if (task->task_proto & SAS_PROTOCOL_SATA ||
 		task->task_proto & SAS_PROTOCOL_STP) {
 		if (task->dev->dev_type == SAS_SATA_DEV) {
-			struct hisi_slot_info *slot = task->lldd_task;
+			struct hisi_sas_slot *slot = task->lldd_task;
+			u32 tag = slot->idx;
 
-			dev_notice(dev, "abort task: hba=%p task=%p slot=%p\n",
-				   hisi_hba, task, slot);
-			task->task_state_flags |= SAS_TASK_STATE_ABORTED;
+			hisi_sas_internal_task_abort(hisi_hba, device,
+						     1, tag);
 			rc = TMF_RESP_FUNC_COMPLETE;
-			goto out;
 		}
+	} else if (task->task_proto & SAS_PROTOCOL_SMP) {
+		/* SMP */
+		struct hisi_sas_slot *slot = task->lldd_task;
+		u32 tag = slot->idx;
 
+		hisi_sas_internal_task_abort(hisi_hba, device, 0, tag);
 	}
 
 out:
-- 
1.9.1

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/8] hisi_sas internal abort support John Garry <john.garry@huawei.com> - 2016-08-10 20:20 +0200
  [PATCH 4/8] hisi_sas: add prep_abort_v2_hw() John Garry <john.garry@huawei.com> - 2016-08-10 21:30 +0200
  [PATCH 2/8] hisi_sas: for internal abort in hisi_sas_dev_gone() John Garry <john.garry@huawei.com> - 2016-08-10 21:30 +0200
  [PATCH 3/8] hisi_sas: add internal abort to hisi_sas_abort_task() John Garry <john.garry@huawei.com> - 2016-08-10 22:50 +0200
  [PATCH 7/8] hisi_sas: add TMF success check John Garry <john.garry@huawei.com> - 2016-08-10 22:50 +0200
  [PATCH 1/8] hisi_sas: add internal abort core code John Garry <john.garry@huawei.com> - 2016-08-10 23:00 +0200
    Re: [PATCH 1/8] hisi_sas: add internal abort core code zhangfei <zhangfei.gao@linaro.org> - 2016-08-21 02:50 +0200
      Re: [PATCH 1/8] hisi_sas: add internal abort core code John Garry <john.garry@huawei.com> - 2016-08-22 10:00 +0200
  [PATCH 5/8] hisi_sas: add v2 hw slot complete internal abort support John Garry <john.garry@huawei.com> - 2016-08-10 23:00 +0200

csiph-web