diff options
Diffstat (limited to 'drivers/ata/pata_sc1200.c')
-rw-r--r-- | drivers/ata/pata_sc1200.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ata/pata_sc1200.c b/drivers/ata/pata_sc1200.c index cbab397e3db7..0278fd2b8fb1 100644 --- a/drivers/ata/pata_sc1200.c +++ b/drivers/ata/pata_sc1200.c | |||
@@ -167,10 +167,10 @@ static unsigned int sc1200_qc_issue(struct ata_queued_cmd *qc) | |||
167 | struct ata_device *prev = ap->private_data; | 167 | struct ata_device *prev = ap->private_data; |
168 | 168 | ||
169 | /* See if the DMA settings could be wrong */ | 169 | /* See if the DMA settings could be wrong */ |
170 | if (adev->dma_mode != 0 && adev != prev && prev != NULL) { | 170 | if (ata_dma_enabled(adev) && adev != prev && prev != NULL) { |
171 | /* Maybe, but do the channels match MWDMA/UDMA ? */ | 171 | /* Maybe, but do the channels match MWDMA/UDMA ? */ |
172 | if ((adev->dma_mode >= XFER_UDMA_0 && prev->dma_mode < XFER_UDMA_0) || | 172 | if ((ata_using_udma(adev) && !ata_using_udma(prev)) || |
173 | (adev->dma_mode < XFER_UDMA_0 && prev->dma_mode >= XFER_UDMA_0)) | 173 | (ata_using_udma(prev) && !ata_using_udma(adev))) |
174 | /* Switch the mode bits */ | 174 | /* Switch the mode bits */ |
175 | sc1200_set_dmamode(ap, adev); | 175 | sc1200_set_dmamode(ap, adev); |
176 | } | 176 | } |