diff mbox series

[22/23] scsi: hisi_sas: use dev_is_sata to identify SATA or SAS disk

Message ID 1490203539-228029-23-git-send-email-john.garry@huawei.com
State New
Headers show
Series hisi_sas: error handling and other misc fixes and improvements | expand

Commit Message

John Garry March 22, 2017, 5:25 p.m. UTC
From: Xiang Chen <chenxiang66@hisilicon.com>


When SMP IO is sent, sas_protocol_ata couldn't judge whether
the disk is SATA or SAS disk.
So use dev_is_sata to identify SATA or SAS disk.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>

Signed-off-by: John Garry <john.garry@huawei.com>

---
 drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.9.1
diff mbox series

Patch

diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index dcceff9..9890dfd 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -218,7 +218,7 @@  static int hisi_sas_task_prep(struct sas_task *task, struct hisi_hba *hisi_hba,
 	port = to_hisi_sas_port(sas_port);
 	if (port && !port->port_attached) {
 		dev_info(dev, "task prep: %s port%d not attach device\n",
-			 (sas_protocol_ata(task->task_proto)) ?
+			 (dev_is_sata(device)) ?
 			 "SATA/STP" : "SAS",
 			 device->port->id);