libata: Use new id_to_dma_mode function to tidy reporting in more drivers (minimally tested)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
Alan 2007-02-20 18:15:03 +00:00 committed by Jeff Garzik
parent cc70991d64
commit 616ece2e7e
2 changed files with 4 additions and 2 deletions

View 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 /* We do need the right mode information for DMA or PIO
and this comes from the current configuration flags */ and this comes from the current configuration flags */
if (dma_enabled & (1 << (5 + i))) { if (dma_enabled & (1 << (5 + i))) {
dev->xfer_mode = XFER_MW_DMA_0; ata_id_to_dma_mode(dev, XFER_MW_DMA_0);
dev->xfer_shift = ATA_SHIFT_MWDMA;
dev->flags &= ~ATA_DFLAG_PIO; dev->flags &= ~ATA_DFLAG_PIO;
} else { } else {
ata_dev_printk(dev, KERN_INFO, "configured for PIO\n");
dev->xfer_mode = XFER_PIO_0; dev->xfer_mode = XFER_PIO_0;
dev->xfer_shift = ATA_SHIFT_PIO; dev->xfer_shift = ATA_SHIFT_PIO;
dev->flags |= ATA_DFLAG_PIO; dev->flags |= ATA_DFLAG_PIO;

View 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 /* We do need the right mode information for DMA or PIO
and this comes from the current configuration flags */ and this comes from the current configuration flags */
if (dma_enabled & (1 << (5 + i))) { 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_mode = XFER_MW_DMA_0;
dev->xfer_shift = ATA_SHIFT_MWDMA; dev->xfer_shift = ATA_SHIFT_MWDMA;
dev->flags &= ~ATA_DFLAG_PIO; dev->flags &= ~ATA_DFLAG_PIO;
} else { } else {
ata_dev_printk(dev, KERN_INFO, "configured for PIO\n");
dev->xfer_mode = XFER_PIO_0; dev->xfer_mode = XFER_PIO_0;
dev->xfer_shift = ATA_SHIFT_PIO; dev->xfer_shift = ATA_SHIFT_PIO;
dev->flags |= ATA_DFLAG_PIO; dev->flags |= ATA_DFLAG_PIO;