kernel_optimize_test/drivers/ide
Alan Cox 5ac2469769 [PATCH] ide: backport piix fixes from libata into the legacy driver
There are three flags being set by default by the PIIX driver for speeds >
PIO 1, and one not being cleared properly on fallback to PIO0.  The most
important one is the prefetch/post write control which only works for ATA
and can do bad things with ATAPI.

The patch does its best to set the flags correctly for drivers/ide.  Its
not 100% perfect but its closer than the original.  100% perfect requires
proper IORDY handling but this isn't critical (and its not right in libata
either ..  yet)

Sergei Shtylyov <sshtylyov@ru.mvista.com> said:

> +					{ 0, 0 },
> +					{ 0, 0 },
> +					{ 1, 0 },
> +					{ 2, 1 },
> +					{ 2, 3 }, };
>
>  	pio = ide_get_best_pio_mode(drive, pio, 5, NULL);

    BTW, there's quite obvious error here which leads to access outside of
timings[] if somebody passes PIO mode 5 (or autotuning code finds out that
drive supports PIO mode 5). Could have been fixed while at it... Those drives
should be rare, though...

> +		}
>  		master_data = master_data | (timings[pio][0] << 12) | (timings[pio][1] << 8);
>  	}
>  	pci_write_config_word(dev, master_port, master_data);

    Actually, there's one more serious issue with piix_tune_drive() -- it
doesn't actually set the drive's own transfer mode.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-03 08:04:08 -07:00
..
arm Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
cris Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
h8300 Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
legacy [PATCH] Split struct request ->flags into two parts 2006-09-30 20:23:37 +02:00
mips [PATCH] Alchemy: Delete unused pt_regs * argument from au1xxx_dbdma_chan_alloc 2006-09-26 08:48:54 -07:00
pci [PATCH] ide: backport piix fixes from libata into the legacy driver 2006-10-03 08:04:08 -07:00
ppc fix broken/dubious driver suspend() methods 2006-09-25 21:08:37 -07:00
ide-cd.c [PATCH] Split struct request ->flags into two parts 2006-09-30 20:23:37 +02:00
ide-cd.h
ide-disk.c [PATCH] Split struct request ->flags into two parts 2006-09-30 20:23:37 +02:00
ide-dma.c [PATCH] ide: fix revision comparison in ide_in_drive_list 2006-10-03 08:04:07 -07:00
ide-floppy.c [PATCH] Remove ->rq_status from struct request 2006-09-30 20:29:23 +02:00
ide-generic.c
ide-io.c [PATCH] IDE error handling fixes 2006-10-03 08:04:07 -07:00
ide-iops.c [PATCH] IDE: Touch NMI watchdog during resume from STR 2006-07-31 13:28:39 -07:00
ide-lib.c [PATCH] ide_dma_speed() fixes 2006-10-03 08:04:07 -07:00
ide-pnp.c
ide-probe.c [PATCH] irq-flags: ide: Use the new IRQF_ constants 2006-07-02 13:58:49 -07:00
ide-proc.c [PATCH] optical /proc/ide/*/media 2006-09-08 10:22:50 -07:00
ide-tape.c [PATCH] completions: lockdep annotate on stack completions 2006-10-01 00:39:24 -07:00
ide-taskfile.c [PATCH] Split struct request ->flags into two parts 2006-09-30 20:23:37 +02: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 [PATCH] IDE: claim extra DMA ports regardless of channel 2006-10-03 08:04:07 -07:00
Kconfig [PATCH] Make number of IDE interfaces configurable 2006-10-03 08:04:07 -07:00
Makefile
setup-pci.c [PATCH] Make number of IDE interfaces configurable 2006-10-03 08:04:07 -07:00