diff options
Diffstat (limited to 'drivers/ata/ata_generic.c')
-rw-r--r-- | drivers/ata/ata_generic.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c index fb5434c8ae6e..d11a4f1fe86a 100644 --- a/drivers/ata/ata_generic.c +++ b/drivers/ata/ata_generic.c | |||
@@ -63,7 +63,22 @@ static int generic_set_mode(struct ata_link *link, struct ata_device **unused) | |||
63 | /* We do need the right mode information for DMA or PIO | 63 | /* We do need the right mode information for DMA or PIO |
64 | and this comes from the current configuration flags */ | 64 | and this comes from the current configuration flags */ |
65 | if (dma_enabled & (1 << (5 + dev->devno))) { | 65 | if (dma_enabled & (1 << (5 + dev->devno))) { |
66 | ata_id_to_dma_mode(dev, XFER_MW_DMA_0); | 66 | unsigned int xfer_mask = ata_id_xfermask(dev->id); |
67 | const char *name; | ||
68 | |||
69 | if (xfer_mask & (ATA_MASK_MWDMA | ATA_MASK_UDMA)) | ||
70 | name = ata_mode_string(xfer_mask); | ||
71 | else { | ||
72 | /* SWDMA perhaps? */ | ||
73 | name = "DMA"; | ||
74 | xfer_mask |= ata_xfer_mode2mask(XFER_MW_DMA_0); | ||
75 | } | ||
76 | |||
77 | ata_dev_printk(dev, KERN_INFO, "configured for %s\n", | ||
78 | name); | ||
79 | |||
80 | dev->xfer_mode = ata_xfer_mask2mode(xfer_mask); | ||
81 | dev->xfer_shift = ata_xfer_mode2shift(dev->xfer_mode); | ||
67 | dev->flags &= ~ATA_DFLAG_PIO; | 82 | dev->flags &= ~ATA_DFLAG_PIO; |
68 | } else { | 83 | } else { |
69 | ata_dev_printk(dev, KERN_INFO, "configured for PIO\n"); | 84 | ata_dev_printk(dev, KERN_INFO, "configured for PIO\n"); |