* [PATCH] libata: Spot bridge chips
@ 2007-08-22 22:22 Alan Cox
2007-08-31 9:35 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2007-08-22 22:22 UTC (permalink / raw)
To: akpm, linux-ide, jeff
If we have a PATA cable with a SATA drive on it then we've found a
bridge and we can flip the cable type. This fixes some cable detect
problems with SATA bridges on chipsets and misdetected cable types.
In theory cable detection and mode limiting is needed if you put a
SATA/PATA bridge on a 40 wire cable, but I see no way to deal with
that other than to point out its not a good idea anyway.
Signed-off-by: Alan Cox <alan@redhat.com>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.23rc3-mm1/drivers/ata/libata-core.c linux-2.6.23rc3-mm1/drivers/ata/libata-core.c
--- linux.vanilla-2.6.23rc3-mm1/drivers/ata/libata-core.c 2007-08-22 17:23:00.000000000 +0100
+++ linux-2.6.23rc3-mm1/drivers/ata/libata-core.c 2007-08-22 18:17:31.321738376 +0100
@@ -2186,6 +2190,17 @@
if (ap->ops->cable_detect)
ap->cbl = ap->ops->cable_detect(ap);
+ /* We may have SATA bridge glue hiding here irrespective of the
+ reported cable types and sensed types */
+ ata_link_for_each_dev(dev, &ap->link) {
+ if (!ata_dev_enabled(dev))
+ continue;
+ /* SATA drives indicate we have a bridge. We don't know which
+ end of the link the bridge is which is a problem */
+ if (ata_id_is_sata(dev->id))
+ ap->cbl = ATA_CBL_SATA;
+ }
+
/* After the identify sequence we can now set up the devices. We do
this in the normal order so that the user doesn't get confused */
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] libata: Spot bridge chips
2007-08-22 22:22 [PATCH] libata: Spot bridge chips Alan Cox
@ 2007-08-31 9:35 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-08-31 9:35 UTC (permalink / raw)
To: Alan Cox; +Cc: akpm, linux-ide
Alan Cox wrote:
> If we have a PATA cable with a SATA drive on it then we've found a
> bridge and we can flip the cable type. This fixes some cable detect
> problems with SATA bridges on chipsets and misdetected cable types.
>
> In theory cable detection and mode limiting is needed if you put a
> SATA/PATA bridge on a 40 wire cable, but I see no way to deal with
> that other than to point out its not a good idea anyway.
>
> Signed-off-by: Alan Cox <alan@redhat.com>
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-31 9:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-22 22:22 [PATCH] libata: Spot bridge chips Alan Cox
2007-08-31 9:35 ` Jeff Garzik
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).