aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r--drivers/ata/libata-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 5f8f57a818fb..79e3a8e7a84a 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3288,7 +3288,7 @@ int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev)
3288 dev->dma_mode = ata_xfer_mask2mode(dma_mask); 3288 dev->dma_mode = ata_xfer_mask2mode(dma_mask);
3289 3289
3290 found = 1; 3290 found = 1;
3291 if (dev->dma_mode != 0xff) 3291 if (ata_dma_enabled(dev))
3292 used_dma = 1; 3292 used_dma = 1;
3293 } 3293 }
3294 if (!found) 3294 if (!found)
@@ -3313,7 +3313,7 @@ int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev)
3313 3313
3314 /* step 3: set host DMA timings */ 3314 /* step 3: set host DMA timings */
3315 ata_link_for_each_dev(dev, link) { 3315 ata_link_for_each_dev(dev, link) {
3316 if (!ata_dev_enabled(dev) || dev->dma_mode == 0xff) 3316 if (!ata_dev_enabled(dev) || !ata_dma_enabled(dev))
3317 continue; 3317 continue;
3318 3318
3319 dev->xfer_mode = dev->dma_mode; 3319 dev->xfer_mode = dev->dma_mode;