aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_it821x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_it821x.c')
-rw-r--r--drivers/ata/pata_it821x.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index 860ede526282..f828a29d7756 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -465,24 +465,22 @@ static int it821x_smart_set_mode(struct ata_link *link, struct ata_device **unus
465{ 465{
466 struct ata_device *dev; 466 struct ata_device *dev;
467 467
468 ata_link_for_each_dev(dev, link) { 468 ata_for_each_dev(dev, link, ENABLED) {
469 if (ata_dev_enabled(dev)) { 469 /* We don't really care */
470 /* We don't really care */ 470 dev->pio_mode = XFER_PIO_0;
471 dev->pio_mode = XFER_PIO_0; 471 dev->dma_mode = XFER_MW_DMA_0;
472 dev->dma_mode = XFER_MW_DMA_0; 472 /* We do need the right mode information for DMA or PIO
473 /* We do need the right mode information for DMA or PIO 473 and this comes from the current configuration flags */
474 and this comes from the current configuration flags */ 474 if (ata_id_has_dma(dev->id)) {
475 if (ata_id_has_dma(dev->id)) { 475 ata_dev_printk(dev, KERN_INFO, "configured for DMA\n");
476 ata_dev_printk(dev, KERN_INFO, "configured for DMA\n"); 476 dev->xfer_mode = XFER_MW_DMA_0;
477 dev->xfer_mode = XFER_MW_DMA_0; 477 dev->xfer_shift = ATA_SHIFT_MWDMA;
478 dev->xfer_shift = ATA_SHIFT_MWDMA; 478 dev->flags &= ~ATA_DFLAG_PIO;
479 dev->flags &= ~ATA_DFLAG_PIO; 479 } else {
480 } else { 480 ata_dev_printk(dev, KERN_INFO, "configured for PIO\n");
481 ata_dev_printk(dev, KERN_INFO, "configured for PIO\n"); 481 dev->xfer_mode = XFER_PIO_0;
482 dev->xfer_mode = XFER_PIO_0; 482 dev->xfer_shift = ATA_SHIFT_PIO;
483 dev->xfer_shift = ATA_SHIFT_PIO; 483 dev->flags |= ATA_DFLAG_PIO;
484 dev->flags |= ATA_DFLAG_PIO;
485 }
486 } 484 }
487 } 485 }
488 return 0; 486 return 0;