android_kernel_samsung_msm8976/drivers/ide/pci
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
..
aec62xx.c ide: add ide_tune_dma() helper 2007-05-10 00:01:09 +02:00
alim15x3.c alim15x3: use ide_tune_dma() 2007-05-16 00:51:43 +02:00
amd74xx.c amd74xx: resume fix 2007-07-03 22:28:35 +02:00
atiixp.c add the IDE device ID for ATI SB700 2007-05-24 02:42:37 +02:00
cmd64x.c ide: remove ide_dma_enable() 2007-05-16 00:51:46 +02:00
cmd640.c ide: remove a ton of pointless #undef REALLY_SLOW_IO 2007-03-03 17:48:54 +01:00
cs5520.c ide: add ide_proc_register_port() 2007-05-10 00:01:11 +02:00
cs5530.c ide: remove ide_dma_enable() 2007-05-16 00:51:46 +02:00
cs5535.c ide: add ide_tune_dma() helper 2007-05-10 00:01:09 +02:00
cy82c693.c ide: use PIO/MMIO operations directly where possible (v2) 2007-02-17 02:40:25 +01:00
delkin_cb.c ide: add "initializing" argument to ide_register_hw() 2007-05-10 00:01:10 +02:00
generic.c ide: generic IDE PCI driver, add another device exception 2007-06-08 15:14:31 +02:00
hpt34x.c ide: add ide_tune_dma() helper 2007-05-10 00:01:09 +02:00
hpt366.c hpt366: use correct enablebits for HPT36x 2007-07-03 22:28:35 +02:00
it821x.c it821x: fix incorrect SWDMA mask 2007-07-03 22:28:35 +02:00
it8213.c ide: add ide_tune_dma() helper 2007-05-10 00:01:09 +02:00
jmicron.c ide: add ide_tune_dma() helper 2007-05-10 00:01:09 +02:00
Makefile scc_pata: dependency fix 2007-03-17 21:57:25 +01:00
ns87415.c ide: add ide_set_dma() helper (v2) 2007-02-17 02:40:26 +01:00
opti621.c ide: remove some obsoleted kernel params (v2) 2007-03-03 17:48:55 +01:00
pdc202xx_new.c ide: pdc202xx_new PLL input clock fix 2007-07-03 22:28:36 +02:00
pdc202xx_old.c ide: use ide_tune_dma() part #2 2007-05-16 00:51:43 +02:00
piix.c ide: add ide_tune_dma() helper 2007-05-10 00:01:09 +02:00
rz1000.c ide: remove a ton of pointless #undef REALLY_SLOW_IO 2007-03-03 17:48:54 +01:00
sc1200.c ide: remove ide_dma_enable() 2007-05-16 00:51:46 +02:00
scc_pata.c ide: remove ide_dma_enable() 2007-05-16 00:51:46 +02:00
serverworks.c serverworks: always tune CSB6 2007-07-09 23:17:53 +02:00
sgiioc4.c ide: add ide_proc_register_port() 2007-05-10 00:01:11 +02:00
siimage.c ide: remove ide_dma_enable() 2007-05-16 00:51:46 +02:00
sis5513.c sis5513: adding PCI-ID 2007-07-08 15:21:58 +02:00
sl82c105.c sl82c105: Switch to ref counting API 2007-05-16 00:51:46 +02:00
slc90e66.c ide: add ide_tune_dma() helper 2007-05-10 00:01:09 +02:00
tc86c001.c ide: add ide_tune_dma() helper 2007-05-10 00:01:09 +02:00
triflex.c ide: add ide_tune_dma() helper 2007-05-10 00:01:09 +02:00
trm290.c ide: use PIO/MMIO operations directly where possible (v2) 2007-02-17 02:40:25 +01:00
via82cxxx.c ide: add ide_set_dma() helper (v2) 2007-02-17 02:40:26 +01:00