Commit 89c70763 authored by Daniel Quinlan's avatar Daniel Quinlan Committed by Linus Torvalds

[PATCH] Linux Secondary Slave IDE timings

This fix is from Dave Bogdanoff <bog@transmeta.com>.

Linux incorrectly sets up IDE timings for secondary slave drives on PC
systems that use Intel PIIX Southbridges.

This will correctly shift IDE slave PCI timings for register 44h so
that:

 - secondary slave (drive1) uses bits 4-7
 - primary slave   (drive1) uses bits 0-3

(The addition of the parentheses is needed so the shift will take
place after the bitwise-or.  Without the parentheses, the shift will
incorrectly always take place before the bitwise-or.)
parent 0fa9c2fa
......@@ -235,8 +235,8 @@ static void piix_tune_drive (ide_drive_t *drive, byte pio)
master_data = master_data | 0x0070;
pci_read_config_byte(HWIF(drive)->pci_dev, slave_port, &slave_data);
slave_data = slave_data & (HWIF(drive)->index ? 0x0f : 0xf0);
slave_data = slave_data | ((timings[pio][0] << 2) | (timings[pio][1]
<< (HWIF(drive)->index ? 4 : 0)));
slave_data = slave_data | (((timings[pio][0] << 2) | timings[pio][1])
<< (HWIF(drive)->index ? 4 : 0));
} else {
master_data = master_data & 0xccf8;
if (pio > 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment