From cb6753c4c89dcfb2321c5b8e6375646f3f2309e2 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 22 Aug 2007 23:22:45 +0100 Subject: [PATCH] --- yaml --- r: 68084 b: refs/heads/master c: 614fe29bd91f99cc1c1fbf3274fa918691044f47 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/ata/libata-core.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 7b4b850915bd..c69c56e0db85 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4743d0854faa5624148ac6cf3fe9692e977eefa1 +refs/heads/master: 614fe29bd91f99cc1c1fbf3274fa918691044f47 diff --git a/trunk/drivers/ata/libata-core.c b/trunk/drivers/ata/libata-core.c index 43c329544c00..b81265d1e469 100644 --- a/trunk/drivers/ata/libata-core.c +++ b/trunk/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 */