aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-03-10 22:35:00 -0400
committerJeff Garzik <jeff@garzik.org>2008-03-17 08:26:52 -0400
commit4a38e733a75d52e84772fc00d88e32032a235e75 (patch)
treec38fa6f0ce85adbbaf705e72d7bd96b958508b96
parenta22e64443f0aa4aa4e3c56a49e5c060e90752c07 (diff)
pata_ali: use atapi_cmd_type() to determine cmd type instead of transfer size
pata_ali was using qc->nbytes to determine whether a command is data transfer type or not. As now qc->nbytes can be extended by padding and draining buffers, these tests are not useful anymore. Use atapi_cmd_type() instead. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/ata/pata_ali.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c
index 7e68edf3c0f3..8786455c901d 100644
--- a/drivers/ata/pata_ali.c
+++ b/drivers/ata/pata_ali.c
@@ -295,7 +295,7 @@ static void ali_lock_sectors(struct ata_device *adev)
295static int ali_check_atapi_dma(struct ata_queued_cmd *qc) 295static int ali_check_atapi_dma(struct ata_queued_cmd *qc)
296{ 296{
297 /* If its not a media command, its not worth it */ 297 /* If its not a media command, its not worth it */
298 if (qc->nbytes < 2048) 298 if (atapi_cmd_type(qc->cdb[0]) == ATAPI_MISC)
299 return -EOPNOTSUPP; 299 return -EOPNOTSUPP;
300 return 0; 300 return 0;
301} 301}