Skip to contentSkip to conversation

pata_via: Fix 6410 misdetect

PATCH Applied Alan Cox 2 participants 2 messages Apr 29, 2008 libata

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH 1/1 pata_via: Fix 6410 misdetect

The discrete VIA ATA chips don't have 0x40 enable bits. We check that properly in one location but not another. This causes some users 6410 RAID cards to be incorrectly skipped.

Would be good if this made the next kernel (may also be appropriate for stable)

drivers/ata/pata_via.c +6 -5
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.25-mm1/drivers/ata/pata_via.c linux-2.6.25-mm1/drivers/ata/pata_via.c
@@ -464,11 +464,12 @@
 	}
 	pci_dev_put(isa);
 
-	/* 0x40 low bits indicate enabled channels */
-	pci_read_config_byte(pdev, 0x40 , &enable);
-	enable &= 3;
-	if (enable == 0) {
-		return -ENODEV;
+	if (!(config->flags & VIA_NO_ENABLES)) {
+		/* 0x40 low bits indicate enabled channels */
+		pci_read_config_byte(pdev, 0x40 , &enable);
+		enable &= 3;
+		if (enable == 0)
+			return -ENODEV;
 	}
 
 	/* Initialise the FIFO for the enabled channels. */
Applied
#1 lore raw
Quoted 8 lines · Alan Cox

The discrete VIA ATA chips don't have 0x40 enable bits. We check that properly in one location but not another. This causes some users 6410 RAID cards to be incorrectly skipped.

Would be good if this made the next kernel (may also be appropriate for stable)

applied