linux/drivers/ide
Bartlomiej Zolnierkiewicz 0380dad45e it821x: RAID mode fixes
The DMA support for RAID mode broke after:

	commit 71ef51cc17
	Author: Jens Axboe <axboe@suse.de>
	Date:   Fri Jul 28 09:02:17 2006 +0200

	    [PATCH] it821x: fix ide dma setup bug

	    Only enable dma for a valid speed setting.

	    Signed-off-by: Jens Axboe <axboe@suse.de>

	commit 0a8348d086
	Author: Jens Axboe <axboe@suse.de>
	Date:   Fri Jul 28 08:58:26 2006 +0200

	    [PATCH] ide: if the id fields looks screwy, disable DMA

	    It's the safer choice. Originally due to a bug in itx821x, but a
	    generally sound thing to do.

	    Signed-off-by: Jens Axboe <axboe@suse.de>

However it worked by pure luck before Jens' fixes: bogus ide_dma_enable()
usage in it821x driver combined with loosy check in ide_dma_verbose() allowed
the hardware to operate in DMA mode.  When these problems were fixed the DMA
support broke...

The source root for the regression turned out to be that the it821x.c code
was clearing too much of id->field_valid.  The IDE core code was using the
original value of id->field_valid to do the tuning but later DMA got disabled
in ide_dma_verbose() because of the incorrect id->field_valid fixup.  Fix it.

While at it:

* Do fixup() after probing the drives but before tuning them (which is also
  OK w.r.t. ide_undecoded_slave() fixup).  This change fixes device IDENTIFY
  data to be consistent before/after the tuning and allows us to remove extra
  re-tuning of drives from it821x_fixups().

* Fake MWDMA0 enabled/supported bits in IDENTIFY data if the device has
  DMA capable bit set (this is just to tell the IDE core that DMA is
  supported since it821x firmware takes care of DMA mode programming).

* Don't touch timing registers and don't program transfer modes on devices
  et all when in RAID mode - depend solely on firmware to do the tuning
  (as suggested by Alan Cox and done in libata pata_it821x driver).

Thanks for testing the patch goes out to Thomas Kuther.

Cc: Thomas Kuther <gimpel@sonnenkinder.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jens Axboe <axboe@suse.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-06-08 15:14:29 +02:00
..
arm [ARM] ecard: add ecardm_iomap() / ecardm_iounmap() 2007-05-11 17:19:02 +01:00
cris ide: use ide_tune_dma() part #2 2007-05-16 00:51:43 +02:00
h8300 ide: add "initializing" argument to ide_register_hw() 2007-05-10 00:01:10 +02:00
legacy ide: add ide_proc_register_port() 2007-05-10 00:01:11 +02:00
mips ide: add ide_proc_register_port() 2007-05-10 00:01:11 +02:00
pci it821x: RAID mode fixes 2007-06-08 15:14:29 +02:00
ppc ide: add ide_proc_register_port() 2007-05-10 00:01:11 +02:00
Kconfig Use menuconfig objects: IDE 2007-05-16 00:51:46 +02:00
Makefile ide: make /proc/ide/ optional 2007-05-10 00:01:09 +02:00
ide-acpi.c
ide-cd.c ide: move IDE settings handling to ide-proc.c 2007-05-10 00:01:10 +02:00
ide-cd.h
ide-disk.c ide: move IDE settings handling to ide-proc.c 2007-05-10 00:01:10 +02:00
ide-dma.c Match DMA blacklist entries between ide-dma.c and libata-core.c 2007-05-24 02:42:38 +02:00
ide-floppy.c ide: move IDE settings handling to ide-proc.c 2007-05-10 00:01:10 +02:00
ide-generic.c ide: add ide_proc_register_port() 2007-05-10 00:01:11 +02:00
ide-io.c ide: always disable DMA before tuning it 2007-05-16 00:51:43 +02:00
ide-iops.c ide: cable detection fixes (take 2) 2007-05-10 00:01:10 +02:00
ide-lib.c ide: remove ide_dma_enable() 2007-05-16 00:51:46 +02:00
ide-pnp.c ide: add "initializing" argument to ide_register_hw() 2007-05-10 00:01:10 +02:00
ide-probe.c it821x: RAID mode fixes 2007-06-08 15:14:29 +02:00
ide-proc.c Add two missing chipsets to drivers/ide/ide-proc.c 2007-05-24 02:42:38 +02:00
ide-tape.c ide: move IDE settings handling to ide-proc.c 2007-05-10 00:01:10 +02:00
ide-taskfile.c
ide-timing.h
ide.c ide: always disable DMA before tuning it 2007-05-16 00:51:43 +02:00
setup-pci.c ide: legacy PCI bus order probing fixes 2007-05-10 00:01:11 +02:00