diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 16:17:18 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 16:17:18 -0500 |
commit | 4db90a145292327b95b03f6dcd3352327235cc36 (patch) | |
tree | c48ba5fc31e27d6fbdb8883151bdf237e7eb1920 /drivers/ide/pci/aec62xx.c | |
parent | 428c6440ef933a3d9df5adfeb2cbb3ea7ebb6a68 (diff) |
ide: add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag
* Add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag and use it to decide
what to do with transfer modes < XFER_PIO_0 in ide_set_xfer_rate().
* Set IDE_HFLAG_ABUSE_SET_DMA_MODE in host drivers that need it
(aec62xx, amd74xx, cs5520, cs5535, hpt34x, hpt366, pdc202xx_old,
serverworks, tc86c001 and via82cxxx) and cleanup ->set_dma_mode
methods in host drivers that don't (IDE core code guarantees that
->set_dma_mode will be called only for modes which are present
in SWDMA/MWDMA/UDMA masks).
While at it:
* Add IDE_HFLAGS_HPT34X/HPT3XX/PDC202XX/SVWKS define in
hpt34x/hpt366/pdc202xx_old/serverworks host driver.
There should be no functionality changes caused by this patch.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/aec62xx.c')
-rw-r--r-- | drivers/ide/pci/aec62xx.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c index 44268504ae43..7f4d1857d555 100644 --- a/drivers/ide/pci/aec62xx.c +++ b/drivers/ide/pci/aec62xx.c | |||
@@ -202,6 +202,7 @@ static const struct ide_port_info aec62xx_chipsets[] __devinitdata = { | |||
202 | .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, | 202 | .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, |
203 | .host_flags = IDE_HFLAG_SERIALIZE | | 203 | .host_flags = IDE_HFLAG_SERIALIZE | |
204 | IDE_HFLAG_NO_ATAPI_DMA | | 204 | IDE_HFLAG_NO_ATAPI_DMA | |
205 | IDE_HFLAG_ABUSE_SET_DMA_MODE | | ||
205 | IDE_HFLAG_OFF_BOARD, | 206 | IDE_HFLAG_OFF_BOARD, |
206 | .pio_mask = ATA_PIO4, | 207 | .pio_mask = ATA_PIO4, |
207 | .mwdma_mask = ATA_MWDMA2, | 208 | .mwdma_mask = ATA_MWDMA2, |
@@ -211,6 +212,7 @@ static const struct ide_port_info aec62xx_chipsets[] __devinitdata = { | |||
211 | .init_chipset = init_chipset_aec62xx, | 212 | .init_chipset = init_chipset_aec62xx, |
212 | .init_hwif = init_hwif_aec62xx, | 213 | .init_hwif = init_hwif_aec62xx, |
213 | .host_flags = IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_NO_AUTODMA | | 214 | .host_flags = IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_NO_AUTODMA | |
215 | IDE_HFLAG_ABUSE_SET_DMA_MODE | | ||
214 | IDE_HFLAG_OFF_BOARD, | 216 | IDE_HFLAG_OFF_BOARD, |
215 | .pio_mask = ATA_PIO4, | 217 | .pio_mask = ATA_PIO4, |
216 | .mwdma_mask = ATA_MWDMA2, | 218 | .mwdma_mask = ATA_MWDMA2, |
@@ -220,7 +222,8 @@ static const struct ide_port_info aec62xx_chipsets[] __devinitdata = { | |||
220 | .init_chipset = init_chipset_aec62xx, | 222 | .init_chipset = init_chipset_aec62xx, |
221 | .init_hwif = init_hwif_aec62xx, | 223 | .init_hwif = init_hwif_aec62xx, |
222 | .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, | 224 | .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, |
223 | .host_flags = IDE_HFLAG_NO_ATAPI_DMA, | 225 | .host_flags = IDE_HFLAG_NO_ATAPI_DMA | |
226 | IDE_HFLAG_ABUSE_SET_DMA_MODE, | ||
224 | .pio_mask = ATA_PIO4, | 227 | .pio_mask = ATA_PIO4, |
225 | .mwdma_mask = ATA_MWDMA2, | 228 | .mwdma_mask = ATA_MWDMA2, |
226 | .udma_mask = ATA_UDMA4, | 229 | .udma_mask = ATA_UDMA4, |
@@ -228,7 +231,9 @@ static const struct ide_port_info aec62xx_chipsets[] __devinitdata = { | |||
228 | .name = "AEC6280", | 231 | .name = "AEC6280", |
229 | .init_chipset = init_chipset_aec62xx, | 232 | .init_chipset = init_chipset_aec62xx, |
230 | .init_hwif = init_hwif_aec62xx, | 233 | .init_hwif = init_hwif_aec62xx, |
231 | .host_flags = IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD, | 234 | .host_flags = IDE_HFLAG_NO_ATAPI_DMA | |
235 | IDE_HFLAG_ABUSE_SET_DMA_MODE | | ||
236 | IDE_HFLAG_OFF_BOARD, | ||
232 | .pio_mask = ATA_PIO4, | 237 | .pio_mask = ATA_PIO4, |
233 | .mwdma_mask = ATA_MWDMA2, | 238 | .mwdma_mask = ATA_MWDMA2, |
234 | .udma_mask = ATA_UDMA5, | 239 | .udma_mask = ATA_UDMA5, |
@@ -237,7 +242,9 @@ static const struct ide_port_info aec62xx_chipsets[] __devinitdata = { | |||
237 | .init_chipset = init_chipset_aec62xx, | 242 | .init_chipset = init_chipset_aec62xx, |
238 | .init_hwif = init_hwif_aec62xx, | 243 | .init_hwif = init_hwif_aec62xx, |
239 | .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, | 244 | .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, |
240 | .host_flags = IDE_HFLAG_NO_ATAPI_DMA | IDE_HFLAG_OFF_BOARD, | 245 | .host_flags = IDE_HFLAG_NO_ATAPI_DMA | |
246 | IDE_HFLAG_ABUSE_SET_DMA_MODE | | ||
247 | IDE_HFLAG_OFF_BOARD, | ||
241 | .pio_mask = ATA_PIO4, | 248 | .pio_mask = ATA_PIO4, |
242 | .mwdma_mask = ATA_MWDMA2, | 249 | .mwdma_mask = ATA_MWDMA2, |
243 | .udma_mask = ATA_UDMA5, | 250 | .udma_mask = ATA_UDMA5, |