Bartlomiej Zolnierkiewicz b740d8846e serverworks: always tune CSB6
Switch the driver to always program DMA/PIO timings and set device transfer
mode instead of trusting BIOS on CSB6 controllers (libata pata_serverworks.c
driver is also doing things this way and there were no problems reported so
far).  While doing conversion I noticed that the old code had many issues:

* the code was assuming that hwif->dma_status is always valid
  (which obviously isn't true if hwif->dma_base == NULL)

* value of "(ultra_timing >> (4*unit)) & ~(0xF0)" expression wasn't checked
  to fit into udma_modes[5]

* code validating DMA timings didn't validate corresponding PIO timings

* extra CSB5 PIO register wasn't validated et all

* hwif->ide_dma_off_quietly() is always called before ide_set_dma() (which in
  turn calls hwif->speedproc() method - svwks_tune_chipset() in this case)
  so the code depending on DMA capable bit of DMA status to be set was never
  executed (=> the code was never validating DMA timings despite actually
  enabling DMA if the PIO timings were OK!)

* on resume driver dependend entirely on BIOS to restore timings and set
  transfer mode on the device

While at it:

There is no need to read PIO/MWDMA timings now so don't do it.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
2007-07-09 23:17:53 +02:00
..
2007-05-16 00:51:43 +02:00
2007-07-08 15:21:58 +02:00
2007-05-10 00:01:11 +02:00
2007-07-09 23:17:53 +02:00
2007-05-10 00:01:11 +02:00
2007-02-07 18:19:42 +01:00
2007-06-08 15:14:30 +02:00
2007-05-10 00:01:10 +02:00
2007-05-16 00:51:46 +02:00
2007-07-03 22:28:35 +02:00
2007-06-16 02:24:43 +02:00
2007-05-16 00:51:46 +02:00
2007-05-10 00:01:09 +02:00