Skip to content

Commit 725ad02

Browse files
chenhuacaifloatious
authored andcommitted
ata: libata: Improve return value of atapi_check_dma()
atapi_check_dma() allows a LLD to filter ATAPI commands, returning a status indicating whether or not it is OK to use DMA for the supplied ATAPI command. Change atapi_check_dma() to return -EOPNOTSUPP instead of 1 for an ATAPI command that is not allowed to use DMA. Signed-off-by: Huacai Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] [cassel: improve commit log] Signed-off-by: Niklas Cassel <[email protected]>
1 parent 885251d commit 725ad02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ata/libata-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4579,7 +4579,7 @@ int atapi_check_dma(struct ata_queued_cmd *qc)
45794579
*/
45804580
if (!(qc->dev->quirks & ATA_QUIRK_ATAPI_MOD16_DMA) &&
45814581
unlikely(qc->nbytes & 15))
4582-
return 1;
4582+
return -EOPNOTSUPP;
45834583

45844584
if (ap->ops->check_atapi_dma)
45854585
return ap->ops->check_atapi_dma(qc);

0 commit comments

Comments
 (0)