From 1cbd772d9aaf6c697935cb855860b66cebacf950 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Wed, 5 Nov 2014 13:08:20 +0100 Subject: libsas: use ata_dev_classify() Use the ata device class from libata in libsas instead of checking the supported command set and switch to using ata_dev_classify() instead of our own method. Cc: Tejun Heo Cc: Dan Williams Acked-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Signed-off-by: Tejun Heo --- drivers/scsi/isci/request.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/scsi/isci') diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c index 56e38096f0c4..cfd0084f1cd2 100644 --- a/drivers/scsi/isci/request.c +++ b/drivers/scsi/isci/request.c @@ -694,7 +694,7 @@ sci_io_request_construct_sata(struct isci_request *ireq, } /* ATAPI */ - if (dev->sata_dev.command_set == ATAPI_COMMAND_SET && + if (dev->sata_dev.class == ATA_DEV_ATAPI && task->ata_task.fis.command == ATA_CMD_PACKET) { sci_atapi_construct(ireq); return SCI_SUCCESS; @@ -2980,7 +2980,7 @@ static void sci_request_started_state_enter(struct sci_base_state_machine *sm) state = SCI_REQ_SMP_WAIT_RESP; } else if (task && sas_protocol_ata(task->task_proto) && !task->ata_task.use_ncq) { - if (dev->sata_dev.command_set == ATAPI_COMMAND_SET && + if (dev->sata_dev.class == ATA_DEV_ATAPI && task->ata_task.fis.command == ATA_CMD_PACKET) { state = SCI_REQ_ATAPI_WAIT_H2D; } else if (task->data_dir == DMA_NONE) { -- cgit v1.2.3