scsi: hisi_sas: use dev_is_sata to identify SATA or SAS disk
authorXiang Chen <chenxiang66@hisilicon.com>
Wed, 22 Mar 2017 17:25:38 +0000 (01:25 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 23 Mar 2017 15:12:02 +0000 (11:12 -0400)
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>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_main.c

index dcceff9043b0e27d2bd788216c4df0da2b27249f..9890dfdd41110d59007fe632b4f49f29c09f37ff 100644 (file)
@@ -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);