Skip to content

Commit

Permalink
libata: make atapi_request_sense() use sg
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Jan 23, 2008
1 parent 1973a02 commit 93f8fec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 93f8fec

Please sign in to comment.