linux-stable/drivers/ide
Sergei Shtylyov 60e7a82f1a cmd64x: fix multiword and remove single-word DMA support
Fix the multiword DMA and drop the single-word DMA support (which nobody will
miss, I think).  In order to do it, a number of changes was necessary:

- rename program_drive_counts() to program_cycle_times(), pass to it cycle's
  total/active times instead of the clock counts, and convert them into the
  active/recovery clocks there instead of cmd64x_tune_pio() -- this causes
  quantize_timing() to also move;

- contrarywise, move all the code handling the address setup timing into
  cmd64x_tune_pio(), so that setting MWDMA mode wouldn't change address setup;

- remove from the speedproc() method the  bogus code pretending to set the DMA
  timings by twiddling bits in the BMIDE status register, handle setting MWDMA
  by just calling program_cycle_times(); while at it, improve the style of that
  whole switch statement;

- stop fiddling with the DMA capable bits in the speedproc() method -- they do
  not enable DMA, and are properly dealt with by the dma_host_{on,off} methods;

- don't set hwif->swdma_mask in the init_hwif() method anymore.

In addition to those changes, do the following:

- in cmd64x_tune_pio(), when writing to ARTTIM23 register preserve the interrupt
  status bit, eliminate local_irq_{save|restore}() around this code as there's
  *no* actual race with the interrupt handler, and move cmdprintk() to a more
  fitting place -- after ide_get_best_pio_mode() call;

- make {arttim|drwtim}_regs arrays single-dimensional, indexed with drive->dn;

- rename {setup|recovery}_counts[] into more fitting {setup|recovery}_values[];

- in  the speedproc() method, get rid of the duplicate reads/writes from/to the
  UDIDETCRx registers and of the extra variable used to store the transfer mode
  value after filtering,  use another method of determining master/slave drive,
  and cleanup useless parens;

- beautify cmdprintk() output here and there.

While at it, remove meaningless comment about the driver being used only on
UltraSPARC and long non-relevant RCS tag. :-)

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-05-05 22:03:49 +02:00
..
arm ide: remove CONFIG_IDEDMA_{ICS,PCI}_AUTO config options 2007-03-17 21:57:41 +01:00
cris ide: remove a ton of pointless #undef REALLY_SLOW_IO 2007-03-03 17:48:54 +01:00
h8300 ide: convert ide_hwif_t.mmio into flag (v2) 2007-02-17 02:40:25 +01:00
legacy ide: make legacy IDE VLB modules check for the "probe" kernel params (v2) 2007-03-03 17:48:55 +01:00
mips ide: au1xxx: fix use of mixed declarations and code 2007-03-17 21:57:24 +01:00
pci cmd64x: fix multiword and remove single-word DMA support 2007-05-05 22:03:49 +02:00
ppc scc_pata: dependency fix 2007-03-17 21:57:25 +01:00
Kconfig ide/Kconfig: add missing range check for IDE_MAX_HWIFS 2007-04-20 22:16:58 +02:00
Makefile scc_pata: dependency fix 2007-03-17 21:57:25 +01:00
ide-acpi.c ide-acpi support warning fix 2007-02-07 18:19:42 +01:00
ide-cd.c ide: ugly messages trying to open CD drive with no media present 2007-04-10 22:38:43 +02:00
ide-cd.h [PATCH] ide-cd: remove write-only cmd field from struct cdrom_info 2005-12-15 02:20:49 +01:00
ide-disk.c ide: remove a ton of pointless #undef REALLY_SLOW_IO 2007-03-03 17:48:54 +01:00
ide-dma.c ide: don't allow DMA to be enabled if CONFIG_IDEDMA_{ICS,PCI}_AUTO=n 2007-03-17 21:57:39 +01:00
ide-floppy.c ide: make ide_hwif_t.ide_dma_{host_off,off_quietly} void (v2) 2007-02-17 02:40:26 +01:00
ide-generic.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ide-io.c ide: correctly prevent IDE timer expiry function to run if request was already handled 2007-04-10 22:38:37 +02:00
ide-iops.c ide: correctly prevent IDE timer expiry function to run if request was already handled 2007-04-10 22:38:37 +02:00
ide-lib.c ide: ide_get_best_pio_mode() returns incorrect IORDY setting (take 2) 2007-03-03 17:48:53 +01:00
ide-pnp.c ide: unregister idepnp driver on unload 2007-01-27 13:47:02 +01:00
ide-probe.c ide: remove a ton of pointless #undef REALLY_SLOW_IO 2007-03-03 17:48:54 +01:00
ide-proc.c IDE: remove rwsem use from ide-proc core 2007-04-27 10:57:30 -07:00
ide-tape.c ide: make ide_hwif_t.ide_dma_{host_off,off_quietly} void (v2) 2007-02-17 02:40:26 +01:00
ide-taskfile.c [PATCH] ide: add sanity checking to ide taskfile ioctl 2006-10-16 08:27:54 -07:00
ide-timing.h [PATCH] ide: actually honor drive's minimum PIO/DMA cycle times 2006-06-26 09:58:27 -07:00
ide.c ide: add "optical" to sysfs "media" attribute 2007-04-10 22:39:14 +02:00
setup-pci.c ide: remove CONFIG_IDEDMA_{ICS,PCI}_AUTO config options 2007-03-17 21:57:41 +01:00