Skip to contentSkip to conversation

pata_via: Cable detect error

PATCH In review Alan 3 participants 4 messages Dec 16, 2006 libata

lore
Share & tools
lore

Alan

author
#0 lore raw

PATCH 1/1 pata_via: Cable detect error

The UDMA66 VIA hardware has no controller side cable detect bits we can use. This patch minimally fixes the problem by reporting unknown in this case and using drive side detection.

The old drivers/ide code does some additional tricks but those aren't appropriate now we are in -rc.

Without this update UDMA66 via controllers run slowly. They don't fail so it's a borderline call whether this is -rc material or not.

drivers/ata/pata_via.c +7 -2
@@ -161,10 +161,15 @@
 			return -ENOENT;
 	}
 
-	if ((config->flags & VIA_UDMA) >= VIA_UDMA_66)
+	if ((config->flags & VIA_UDMA) >= VIA_UDMA_100)
 		ap->cbl = via_cable_detect(ap);
-	else
+	/* The UDMA66 series has no cable detect so do drive side detect */
+	else if ((config->flags & VIA_UDMA) < VIA_UDMA_66)
 		ap->cbl = ATA_CBL_PATA40;
+	else
+		ap->cbl = ATA_CBL_PATA_UNK;
+		
+
 	return ata_std_prereset(ap);
 }
 
#1 lore raw
Quoted 11 lines · Alan

The UDMA66 VIA hardware has no controller side cable detect bits we can use. This patch minimally fixes the problem by reporting unknown in this case and using drive side detection.

The old drivers/ide code does some additional tricks but those aren't appropriate now we are in -rc.

Without this update UDMA66 via controllers run slowly. They don't fail so it's a borderline call whether this is -rc material or not.

I think it's #upstream-fixes material (-rc material), and applied as such.

Especially considering that libata pata_* drivers are not the primary drivers, I think it's best to forward this type of stuff, especially as it is indeed IMO a fix worth having.

#2 lore raw
Quoted 5 lines · Jeff Garzik

I think it's #upstream-fixes material (-rc material), and applied as such.

Especially considering that libata pata_* drivers are not the primary drivers, I think it's best to forward this type of stuff, especially as it is indeed IMO a fix worth having.

They may not be primary today, but it's not going to be very long at all before that situation changes. AFAIK, most of (if not all) the major distros basing on 2.6.19+ are moving to using the libata PATA drivers in their next releases.

Dave

Signature · 1 line
http://www.codemonkey.org.uk
#3 lore raw
Quoted 4 lines · Dave Jones
Quoted 2 lines · Jeff Garzik

I think it's #upstream-fixes material (-rc material), and applied as such.

Quoted 8 lines
Quoted 3 lines

Especially considering that libata pata_* drivers are not the primary drivers, I think it's best to forward this type of stuff, especially as it is indeed IMO a fix worth having.

They may not be primary today, but it's not going to be very long at all before that situation changes. AFAIK, most of (if not all) the major distros basing on 2.6.19+ are moving to using the libata PATA drivers in their next releases.

All the more reason to get fixes in as quickly as possible, to ensure maximal amount of testing and exposure :)

Jeff