summaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-scsi.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-12-05 08:43:01 +0100
committerJeff Garzik <jeff@garzik.org>2008-01-23 11:24:13 +0100
commit93f8fecbe72bc3c121f3605dd198ff39ef358522 (patch)
tree46080625a3bf8331f1d31c0d77fbcd024fd6ddef /drivers/ata/libata-scsi.c
parentlibata: convert NCQ test in ata_qc_issue() to ata_is_ncq() (diff)
downloadlinux-93f8fecbe72bc3c121f3605dd198ff39ef358522.tar.xz
linux-93f8fecbe72bc3c121f3605dd198ff39ef358522.zip
libata: make atapi_request_sense() use sg
atapi_request_sense() is now the only left user of ata_sg_init_one(). Convert it to use sg interface. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Rusty Russel <rusty@rustcorp.com.au> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r--drivers/ata/libata-scsi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index f802dbce41ae..021cdc4cc260 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -2341,7 +2341,9 @@ static void atapi_request_sense(struct ata_queued_cmd *qc)
ata_qc_reinit(qc);
- ata_sg_init_one(qc, cmd->sense_buffer, sizeof(cmd->sense_buffer));
+ /* setup sg table and init transfer direction */
+ sg_init_one(&qc->sgent, cmd->sense_buffer, sizeof(cmd->sense_buffer));
+ ata_sg_init(qc, &qc->sgent, 1);
qc->dma_dir = DMA_FROM_DEVICE;
memset(&qc->cdb, 0, qc->dev->cdb_len);