Skip to content

Commit 2367ad6

Browse files
rdoeffingerdamien-lemoal
authored andcommitted
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 <[email protected]> Signed-off-by: Damien Le Moal <[email protected]>
1 parent 47b3204 commit 2367ad6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ata/pata_amd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static void timing_setup(struct ata_port *ap, struct ata_device *adev, int offse
6666

6767
if (peer) {
6868
/* This may be over conservative */
69-
if (peer->dma_mode) {
69+
if (ata_dma_enabled(peer)) {
7070
ata_timing_compute(peer, peer->dma_mode, &apeer, T, UT);
7171
ata_timing_merge(&apeer, &at, &at, ATA_TIMING_8BIT);
7272
}

0 commit comments

Comments
 (0)