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/scc_pata.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/scc_pata.c')
-rw-r--r-- | drivers/ide/pci/scc_pata.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c index ebb7132b9b84..24a85bbcd2a6 100644 --- a/drivers/ide/pci/scc_pata.c +++ b/drivers/ide/pci/scc_pata.c | |||
@@ -254,19 +254,7 @@ static void scc_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
254 | offset = 0; /* 100MHz */ | 254 | offset = 0; /* 100MHz */ |
255 | } | 255 | } |
256 | 256 | ||
257 | switch (speed) { | 257 | idx = speed - XFER_UDMA_0; |
258 | case XFER_UDMA_6: | ||
259 | case XFER_UDMA_5: | ||
260 | case XFER_UDMA_4: | ||
261 | case XFER_UDMA_3: | ||
262 | case XFER_UDMA_2: | ||
263 | case XFER_UDMA_1: | ||
264 | case XFER_UDMA_0: | ||
265 | idx = speed - XFER_UDMA_0; | ||
266 | break; | ||
267 | default: | ||
268 | return; | ||
269 | } | ||
270 | 258 | ||
271 | jcactsel = JCACTSELtbl[offset][idx]; | 259 | jcactsel = JCACTSELtbl[offset][idx]; |
272 | if (is_slave) { | 260 | if (is_slave) { |