* [PATCH libata #promise-sata-pata] sata_promise: unbreak 20619
@ 2007-01-06 20:31 Mikael Pettersson
2007-01-08 1:46 ` Jeff Garzik
0 siblings, 1 reply; 3+ messages in thread
From: Mikael Pettersson @ 2007-01-06 20:31 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-ide, linux-kernel
The PATA support patch for sata_promise appears, from
code inspection, to break the PATA-only 20619 chip.
The patch removes the SATA flag from the TX2plus SATA+PATA
boards' common flags, with the intention of adding it back
via the _port_flags[] entries for those boards' SATA ports.
However, it unconditionally marks ports 0 and 1 as SATA
for all boards. This causes the 20619 (TX4000) to announce
its first two PATA ports as SATA | ATA_FLAG_SLAVE_POSS.
I don't have a TX4000 so I don't know what the actual
consequences of this bug are, but surely this isn't Ok.
Fixed by moving the port 0 and 1 settings as SATA into
the TX4 and TX2plus specific initialisation code.
Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
--- linux-2.6.20-rc3/drivers/ata/sata_promise.c.~1~ 2007-01-06 17:05:29.000000000 +0100
+++ linux-2.6.20-rc3/drivers/ata/sata_promise.c 2007-01-06 17:10:56.000000000 +0100
@@ -957,9 +957,6 @@ static int pdc_ata_init_one (struct pci_
probe_ent->port[0].scr_addr = base + 0x400;
probe_ent->port[1].scr_addr = base + 0x500;
- probe_ent->_port_flags[0] = ATA_FLAG_SATA;
- probe_ent->_port_flags[1] = ATA_FLAG_SATA;
-
/* notice 4-port boards */
switch (board_idx) {
case board_40518:
@@ -974,6 +971,8 @@ static int pdc_ata_init_one (struct pci_
probe_ent->port[2].scr_addr = base + 0x600;
probe_ent->port[3].scr_addr = base + 0x700;
+ probe_ent->_port_flags[0] = ATA_FLAG_SATA;
+ probe_ent->_port_flags[1] = ATA_FLAG_SATA;
probe_ent->_port_flags[2] = ATA_FLAG_SATA;
probe_ent->_port_flags[3] = ATA_FLAG_SATA;
break;
@@ -995,6 +994,8 @@ static int pdc_ata_init_one (struct pci_
}
else
probe_ent->n_ports = 2;
+ probe_ent->_port_flags[0] = ATA_FLAG_SATA;
+ probe_ent->_port_flags[1] = ATA_FLAG_SATA;
break;
case board_20619:
probe_ent->n_ports = 4;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH libata #promise-sata-pata] sata_promise: unbreak 20619
2007-01-06 20:31 [PATCH libata #promise-sata-pata] sata_promise: unbreak 20619 Mikael Pettersson
@ 2007-01-08 1:46 ` Jeff Garzik
0 siblings, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2007-01-08 1:46 UTC (permalink / raw)
To: Mikael Pettersson; +Cc: linux-ide, linux-kernel
Mikael Pettersson wrote:
> The PATA support patch for sata_promise appears, from
> code inspection, to break the PATA-only 20619 chip.
>
> The patch removes the SATA flag from the TX2plus SATA+PATA
> boards' common flags, with the intention of adding it back
> via the _port_flags[] entries for those boards' SATA ports.
>
> However, it unconditionally marks ports 0 and 1 as SATA
> for all boards. This causes the 20619 (TX4000) to announce
> its first two PATA ports as SATA | ATA_FLAG_SLAVE_POSS.
>
> I don't have a TX4000 so I don't know what the actual
> consequences of this bug are, but surely this isn't Ok.
>
> Fixed by moving the port 0 and 1 settings as SATA into
> the TX4 and TX2plus specific initialisation code.
>
> Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Given that I agree with your RFC, this means I can drop all these
#promise-sata-pata patches, and kill the #promise-sata-pata branch soon,
right?
Jeff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH libata #promise-sata-pata] sata_promise: unbreak 20619
@ 2007-01-08 8:07 Mikael Pettersson
0 siblings, 0 replies; 3+ messages in thread
From: Mikael Pettersson @ 2007-01-08 8:07 UTC (permalink / raw)
To: jeff; +Cc: linux-ide, linux-kernel
On Sun, 07 Jan 2007 20:46:13 -0500, Jeff Garzik wrote:
> Given that I agree with your RFC, this means I can drop all these
> #promise-sata-pata patches, and kill the #promise-sata-pata branch soon,
> right?
Yes
/Mikael
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-01-08 8:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-06 20:31 [PATCH libata #promise-sata-pata] sata_promise: unbreak 20619 Mikael Pettersson
2007-01-08 1:46 ` Jeff Garzik
2007-01-08 8:07 Mikael Pettersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).