Commit:     614fe29bd91f99cc1c1fbf3274fa918691044f47
Parent:     4743d0854faa5624148ac6cf3fe9692e977eefa1
Author:     Alan Cox <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 22 23:22:45 2007 +0100
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Oct 12 14:55:37 2007 -0400

    libata: Spot bridge chips
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
 drivers/ata/libata-core.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 43c3295..b81265d 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2183,6 +2183,17 @@ int ata_bus_probe(struct ata_port *ap)
        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 */
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to