]> err.no Git - linux-2.6/commitdiff
libata: Use new id_to_dma_mode function to tidy reporting in more drivers (minimally...
authorAlan <alan@lxorguk.ukuu.org.uk>
Tue, 20 Feb 2007 18:15:03 +0000 (18:15 +0000)
committerJeff Garzik <jeff@garzik.org>
Sun, 25 Feb 2007 20:41:40 +0000 (15:41 -0500)
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/ata_generic.c
drivers/ata/pata_it821x.c

index be66ea08da551f16fa76459510e8cc75fa65f0f1..7649039cc6a969465d92f1b1db224b2c7855fb8a 100644 (file)
@@ -90,10 +90,10 @@ static int generic_set_mode(struct ata_port *ap, struct ata_device **unused)
                        /* We do need the right mode information for DMA or PIO
                           and this comes from the current configuration flags */
                        if (dma_enabled & (1 << (5 + i))) {
-                               dev->xfer_mode = XFER_MW_DMA_0;
-                               dev->xfer_shift = ATA_SHIFT_MWDMA;
+                               ata_id_to_dma_mode(dev, XFER_MW_DMA_0);
                                dev->flags &= ~ATA_DFLAG_PIO;
                        } else {
+                               ata_dev_printk(dev, KERN_INFO, "configured for PIO\n");
                                dev->xfer_mode = XFER_PIO_0;
                                dev->xfer_shift = ATA_SHIFT_PIO;
                                dev->flags |= ATA_DFLAG_PIO;
index 73394c75be4254fac5c0624c7b0ea23747279fdc..bab4511c5e5dfe65eecc0e62481ca5583e934984 100644 (file)
@@ -503,10 +503,12 @@ static int it821x_smart_set_mode(struct ata_port *ap, struct ata_device **unused
                        /* We do need the right mode information for DMA or PIO
                           and this comes from the current configuration flags */
                        if (dma_enabled & (1 << (5 + i))) {
+                               ata_dev_printk(dev, KERN_INFO, "configured for DMA\n");
                                dev->xfer_mode = XFER_MW_DMA_0;
                                dev->xfer_shift = ATA_SHIFT_MWDMA;
                                dev->flags &= ~ATA_DFLAG_PIO;
                        } else {
+                               ata_dev_printk(dev, KERN_INFO, "configured for PIO\n");
                                dev->xfer_mode = XFER_PIO_0;
                                dev->xfer_shift = ATA_SHIFT_PIO;
                                dev->flags |= ATA_DFLAG_PIO;