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-07-02 21:06:48 -07:00
2007-06-08 12:41:08 -07:00
2007-06-28 11:34:53 -07:00
2007-07-09 23:17:53 +02:00
2007-06-08 17:23:33 -07:00
2007-07-04 15:24:39 -07:00
2007-06-04 17:54:09 -07:00
2007-05-21 09:18:19 -07:00
2007-05-08 13:37:51 +10:00
2007-06-20 19:12:42 -04:00
2007-07-02 10:12:34 -04:00
2007-06-08 17:23:33 -07:00
2007-06-28 11:34:54 -07:00