summaryrefslogtreecommitdiff
path: root/drivers/ata/pata_optidma.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-11-02 10:45:34 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-11-02 10:45:34 -0700
commit61f90a8e8068c1176593858df9daf02b430fb4d7 (patch)
treea742ee63a9f14fe5e34d9dd61f428a81e848ef7c /drivers/ata/pata_optidma.c
parentcc0356d6a02e064387c16a83cb96fe43ef33181e (diff)
parent1af5f7af2484004e71d384d8b88c221fc62cd6b5 (diff)
downloadlinux-61f90a8e8068c1176593858df9daf02b430fb4d7.tar.gz
Merge tag 'libata-5.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata
Pull libata updates from Damien Le Moal: - Remove duplicated AHCI adapter PCI device IDs (from Krzysztof) - Cleanup of device DMA state checking to consistantly use ata_dma_enabled() (from Reimar) * tag 'libata-5.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: pata_radisys: fix checking of DMA state pata_optidma: fix checking of DMA state pata_amd: fix checking of DMA state pata_ali: fix checking of DMA state libata-scsi: fix checking of DMA state libata: fix checking of DMA state Add AHCI support for ASM1062+JBM575 cards ahci: remove duplicated PCI device IDs
Diffstat (limited to 'drivers/ata/pata_optidma.c')
-rw-r--r--drivers/ata/pata_optidma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/pata_optidma.c b/drivers/ata/pata_optidma.c
index f6278d9de348..ad1090b90e52 100644
--- a/drivers/ata/pata_optidma.c
+++ b/drivers/ata/pata_optidma.c
@@ -153,7 +153,7 @@ static void optidma_mode_setup(struct ata_port *ap, struct ata_device *adev, u8
if (pair) {
u8 pair_addr;
/* Hardware constraint */
- if (pair->dma_mode)
+ if (ata_dma_enabled(pair))
pair_addr = 0;
else
pair_addr = addr_timing[pci_clock][pair->pio_mode - XFER_PIO_0];
@@ -301,7 +301,7 @@ static u8 optidma_make_bits43(struct ata_device *adev)
};
if (!ata_dev_enabled(adev))
return 0;
- if (adev->dma_mode)
+ if (ata_dma_enabled(adev))
return adev->dma_mode - XFER_MW_DMA_0;
return bits43[adev->pio_mode - XFER_PIO_0];
}