diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2021-10-12 08:27:49 +0200 |
---|---|---|
committer | Damien Le Moal <damien.lemoal@wdc.com> | 2021-10-12 17:47:02 +0900 |
commit | 1af5f7af2484004e71d384d8b88c221fc62cd6b5 (patch) | |
tree | 28e4ef1cd856f26251fa38e8c68fb823db3431e1 /drivers/ata | |
parent | 492402ce70777b2f83dd61613c8e341a36ba3cd1 (diff) | |
download | linux-1af5f7af2484004e71d384d8b88c221fc62cd6b5.tar.bz2 |
pata_radisys: fix checking of DMA state
Checking if DMA is enabled should be done via the
ata_dma_enabled helper function, since the init state
0xff indicates disabled.
Change based on code review, not tested due to lack of hardware.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/pata_radisys.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/pata_radisys.c b/drivers/ata/pata_radisys.c index 8fde4a86401b..3aca8fe3fdb6 100644 --- a/drivers/ata/pata_radisys.c +++ b/drivers/ata/pata_radisys.c @@ -172,8 +172,8 @@ static unsigned int radisys_qc_issue(struct ata_queued_cmd *qc) if (adev != ap->private_data) { /* UDMA timing is not shared */ - if (adev->dma_mode < XFER_UDMA_0) { - if (adev->dma_mode) + if (adev->dma_mode < XFER_UDMA_0 || !ata_dma_enabled(adev)) { + if (ata_dma_enabled(adev)) radisys_set_dmamode(ap, adev); else if (adev->pio_mode) radisys_set_piomode(ap, adev); |