1
0
Fork 0
alistair23-linux/drivers
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
..
acorn i2c-algo-bit: Discard the mdelay data struct member 2006-09-26 15:38:51 -07:00
acpi [PATCH] maximum latency tracking infrastructure 2006-10-01 00:39:19 -07:00
amba [PATCH] 64bit resource: fix up printks for resources in misc drivers 2006-06-27 09:23:59 -07:00
ata [PATCH] pata_hpt366: fix typo 2006-10-03 08:04:06 -07:00
atm [ATM] he: Fix __init/__devinit conflict 2006-09-24 20:09:33 -07:00
base [PATCH] hot-add-mem x86_64: use CONFIG_MEMORY_HOTPLUG_SPARSE 2006-10-01 00:39:18 -07:00
block [PATCH] completions: lockdep annotate on stack completions 2006-10-01 00:39:24 -07:00
bluetooth [Bluetooth] Code cleanup for the HCI UART driver 2006-09-28 18:01:30 -07:00
cdrom [PATCH] BLOCK: Make it possible to disable the block layer [try #6] 2006-09-30 20:52:31 +02:00
char [PATCH] IPMI: allow user to override the kernel IPMI daemon enable 2006-10-03 08:03:42 -07:00
clocksource [PATCH] GTOD: add scx200 HRT clocksource 2006-06-26 09:58:21 -07:00
connector [PATCH] Process Events: Fix biarch compatibility issue. use __u64 timestamp 2006-07-31 13:28:36 -07:00
cpufreq [CPUFREQ] Fix cut-n-paste bug in suspend printk 2006-09-26 23:02:34 -04:00
crypto [CRYPTO] padlock: Convert padlock-sha to use crypto_hash 2006-09-21 11:46:22 +10:00
dio
dma [I/OAT]: Remove pci_module_init() from Intel I/OAT DMA engine 2006-07-21 14:50:13 -07:00
edac [PATCH] drivers/edac/edac_mc.h must #include <linux/platform_device.h> 2006-08-06 08:57:46 -07:00
eisa [PATCH] EISA bus MODALIAS attributes support 2006-09-27 08:26:19 -07:00
fc4 [PATCH] Remove ->rq_status from struct request 2006-09-30 20:29:23 +02:00
firmware [PATCH] DMI: Decode and save OEM String information 2006-09-29 09:18:09 -07:00
hwmon [PATCH] hdaps: support Lenovo ThinkPad T60 2006-10-01 00:39:24 -07:00
i2c [PATCH] proper flags type of spin_lock_irqsave() 2006-10-01 00:39:21 -07:00
ide [PATCH] ide: backport piix fixes from libata into the legacy driver 2006-10-03 08:04:08 -07:00
ieee1394 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2006-09-30 09:38:19 -07:00
infiniband IB/ehca: Tweak trace message format 2006-10-02 14:52:17 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2006-10-02 08:20:33 -07:00
isdn [PATCH] ISDN warning fixes 2006-10-03 08:03:41 -07:00
leds [PATCH] leds: turn LED off when changing triggers 2006-10-01 00:39:21 -07:00
macintosh [PATCH] completions: lockdep annotate on stack completions 2006-10-01 00:39:24 -07:00
mca
md [PATCH] BLOCK: Make it possible to disable the block layer [try #6] 2006-09-30 20:52:31 +02:00
media [PATCH] remove remaining errno and __KERNEL_SYSCALLS__ references 2006-10-02 07:57:23 -07:00
message [PATCH] i2o: Switch to pci_get API 2006-10-01 00:39:23 -07:00
mfd [PATCH] ucb1x00-ts: handle errors from input_register_device() 2006-09-29 09:18:10 -07:00
misc [PATCH] Linux Kernel Dump Test Module 2006-10-02 07:57:16 -07:00
mmc [PATCH] mmc (mainly): add "or later" clause to licence statement. 2006-10-01 00:39:23 -07:00
mtd [MTD] Cleanup of 'ioremap balanced with iounmap for drivers/mtd subsystem' 2006-10-02 09:48:23 +01:00
net [PATCH] hp100: fix conditional compilation mess 2006-10-02 19:46:18 -07:00
nubus Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
oprofile [PATCH] inode-diet: Eliminate i_blksize from the inode structure 2006-09-27 08:26:18 -07:00
parisc [PATCH] replace cad_pid by a struct pid 2006-10-02 07:57:25 -07:00
parport [PATCH] restore parport_pc probing on powermac 2006-10-03 08:03:41 -07:00
pci [PATCH] PCI quirks update 2006-10-01 00:39:17 -07:00
pcmcia pccard_store_cis: fix wrong error handling 2006-10-01 13:17:44 -07:00
pnp [PATCH] update legacy io handling for pmac 2006-10-01 00:39:23 -07:00
rapidio Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
rtc [PATCH] rtc-sysfs fix 2006-10-01 10:39:01 -07:00
s390 [PATCH] replace cad_pid by a struct pid 2006-10-02 07:57:25 -07:00
sbus [PATCH] rename the provided execve functions to kernel_execve 2006-10-02 07:57:23 -07:00
scsi [PATCH] namespaces: utsname: use init_utsname when appropriate 2006-10-02 07:57:21 -07:00
serial [PATCH] const struct tty_operations 2006-10-02 07:57:14 -07:00
sh
sn [PATCH] irq-flags: misc drivers: Use the new IRQF_ constants 2006-07-02 13:58:50 -07:00
spi [PATCH] lockdep: annotate on-stack completions 2006-07-03 15:27:09 -07:00
tc [PATCH] const struct tty_operations 2006-10-02 07:57:14 -07:00
telephony Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6 2006-06-29 14:19:21 -07:00
usb Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2006-10-02 08:20:33 -07:00
video Merge branch 'intelfb-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/intelfb-2.6 2006-09-30 09:36:56 -07:00
w1 [PATCH] w1: remove drivers/w1/w1.h 2006-07-12 15:38:28 -07:00
zorro Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
Kconfig Move libata to drivers/ata. 2006-08-10 07:31:37 -04:00
Makefile Move libata to drivers/ata. 2006-08-10 07:31:37 -04:00