* [PATCH] Linux Secondary Slave IDE timings
@ 2002-02-26 8:20 Daniel Quinlan
2002-02-26 8:24 ` Andre Hedrick
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Quinlan @ 2002-02-26 8:20 UTC (permalink / raw)
To: linux-kernel; +Cc: Marcelo Tosatti, Linus Torvalds, Dave Bogdanoff, quinlan
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.)
--- linux/drivers/ide/piix.c.orig Tue Jan 29 23:26:55 2002
+++ linux/drivers/ide/piix.c Tue Jan 29 23:27:33 2002
@@ -258,8 +258,8 @@
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)
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] Linux Secondary Slave IDE timings
2002-02-26 8:20 [PATCH] Linux Secondary Slave IDE timings Daniel Quinlan
@ 2002-02-26 8:24 ` Andre Hedrick
2002-02-26 11:08 ` Martin Dalecki
0 siblings, 1 reply; 3+ messages in thread
From: Andre Hedrick @ 2002-02-26 8:24 UTC (permalink / raw)
To: Daniel Quinlan
Cc: linux-kernel, Marcelo Tosatti, Linus Torvalds, Dave Bogdanoff
It is a valid and correct fix.
There must have been a bug or something in an odd compiler, but the reason
for the <> | order problem escapes me now.
The verification came from a commumication I had with the author of the
Intel programmer docs.
I hope my comments do not kill the patch.
Regards,
Andre Hedrick
Linux Disk Certification Project Linux ATA Development
On Tue, 26 Feb 2002, Daniel Quinlan wrote:
> 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.)
>
> --- linux/drivers/ide/piix.c.orig Tue Jan 29 23:26:55 2002
> +++ linux/drivers/ide/piix.c Tue Jan 29 23:27:33 2002
> @@ -258,8 +258,8 @@
> 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)
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] Linux Secondary Slave IDE timings
2002-02-26 8:24 ` Andre Hedrick
@ 2002-02-26 11:08 ` Martin Dalecki
0 siblings, 0 replies; 3+ messages in thread
From: Martin Dalecki @ 2002-02-26 11:08 UTC (permalink / raw)
To: Andre Hedrick
Cc: Daniel Quinlan, linux-kernel, Marcelo Tosatti, Linus Torvalds,
Dave Bogdanoff
Andre Hedrick wrote:
> It is a valid and correct fix.
> There must have been a bug or something in an odd compiler, but the reason
> for the <> | order problem escapes me now.
> The verification came from a commumication I had with the author of the
> Intel programmer docs.
>
> I hope my comments do not kill the patch.
Certainly NOT. Thank's for confirmation.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-02-26 11:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-26 8:20 [PATCH] Linux Secondary Slave IDE timings Daniel Quinlan
2002-02-26 8:24 ` Andre Hedrick
2002-02-26 11:08 ` Martin Dalecki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.