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/mvsas/mv_sas.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/scsi/mvsas') diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c index ac52f7c99513..48a493cd285a 100644 --- a/drivers/scsi/mvsas/mv_sas.c +++ b/drivers/scsi/mvsas/mv_sas.c @@ -479,7 +479,7 @@ static int mvs_task_prep_ata(struct mvs_info *mvi, if (task->ata_task.use_ncq) flags |= MCH_FPDMA; - if (dev->sata_dev.command_set == ATAPI_COMMAND_SET) { + if (dev->sata_dev.class == ATA_DEV_ATAPI) { if (task->ata_task.fis.command != ATA_CMD_ID_ATAPI) flags |= MCH_ATAPI; } @@ -546,7 +546,7 @@ static int mvs_task_prep_ata(struct mvs_info *mvi, task->ata_task.fis.flags |= 0x80; /* C=1: update ATA cmd reg */ /* fill in command FIS and ATAPI CDB */ memcpy(buf_cmd, &task->ata_task.fis, sizeof(struct host_to_dev_fis)); - if (dev->sata_dev.command_set == ATAPI_COMMAND_SET) + if (dev->sata_dev.class == ATA_DEV_ATAPI) memcpy(buf_cmd + STP_ATAPI_CMD, task->ata_task.atapi_packet, 16); -- cgit v1.2.3