summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2016-07-14 09:05:44 +0900
committerTejun Heo <tj@kernel.org>2016-07-14 10:45:02 -0400
commitb38d4d85b89c68b2748a5e225185073424510486 (patch)
treec59c64beeaff1c09df72cbbb35129fdf40d5763f /drivers/scsi/libsas
parent179b310ae77ea4f924fe338af5c8983c3f339098 (diff)
downloadblackbird-op-linux-b38d4d85b89c68b2748a5e225185073424510486.tar.gz
blackbird-op-linux-b38d4d85b89c68b2748a5e225185073424510486.zip
libsas: use ata_is_ncq() and ata_has_dma() accessors
Use accessors instead of the raw protocol value. Signed-off-by: Hannes Reinecke <hare@suse.com> [hch: trivial cleanup of the ata_task assignments] Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/scsi/libsas')
-rw-r--r--drivers/scsi/libsas/sas_ata.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index 935c43095109..497bc1558377 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -233,15 +233,8 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc)
task->task_state_flags = SAS_TASK_STATE_PENDING;
qc->lldd_task = task;
- switch (qc->tf.protocol) {
- case ATA_PROT_NCQ:
- task->ata_task.use_ncq = 1;
- /* fall through */
- case ATAPI_PROT_DMA:
- case ATA_PROT_DMA:
- task->ata_task.dma_xfer = 1;
- break;
- }
+ task->ata_task.use_ncq = ata_is_ncq(qc->tf.protocol);
+ task->ata_task.dma_xfer = ata_is_dma(qc->tf.protocol);
if (qc->scsicmd)
ASSIGN_SAS_TASK(qc->scsicmd, task);
OpenPOWER on IntegriCloud