diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2021-10-12 08:27:47 +0200 |
---|---|---|
committer | Damien Le Moal <damien.lemoal@wdc.com> | 2021-10-12 17:46:55 +0900 |
commit | 2367ad63a1314f861dcd66c50d6e5508bb1edac1 (patch) | |
tree | c965611cdc3e8157e58a959c2c830fc74792b30c /drivers/ata/pata_amd.c | |
parent | 47b320498c3b666367097ba7c678bca7880a97b5 (diff) | |
download | linux-2367ad63a1314f861dcd66c50d6e5508bb1edac1.tar.gz linux-2367ad63a1314f861dcd66c50d6e5508bb1edac1.tar.bz2 linux-2367ad63a1314f861dcd66c50d6e5508bb1edac1.zip |
pata_amd: 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/pata_amd.c')
-rw-r--r-- | drivers/ata/pata_amd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c index c8acba162d02..154748cfcc79 100644 --- a/drivers/ata/pata_amd.c +++ b/drivers/ata/pata_amd.c @@ -66,7 +66,7 @@ static void timing_setup(struct ata_port *ap, struct ata_device *adev, int offse if (peer) { /* This may be over conservative */ - if (peer->dma_mode) { + if (ata_dma_enabled(peer)) { ata_timing_compute(peer, peer->dma_mode, &apeer, T, UT); ata_timing_merge(&apeer, &at, &at, ATA_TIMING_8BIT); } |