mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Cc: Alan Cox <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
This commit is contained in:
parent
a22e64443f
commit
4a38e733a7
1 changed files with 1 additions and 1 deletions
|
|
@ -295,7 +295,7 @@ static void ali_lock_sectors(struct ata_device *adev)
|
|||
static int ali_check_atapi_dma(struct ata_queued_cmd *qc)
|
||||
{
|
||||
/* If its not a media command, its not worth it */
|
||||
if (qc->nbytes < 2048)
|
||||
if (atapi_cmd_type(qc->cdb[0]) == ATAPI_MISC)
|
||||
return -EOPNOTSUPP;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue