kern/111699: [sata] SATA drives on an Asus A8V-MX are no longer detected on 7.0-CURRENT (regression)

Andrey V. Elsukov bu7cher at yandex.ru
Tue Sep 11 02:40:02 PDT 2007


Dave Grochowski wrote:
>> Can you show verbose dmesg from RELENG_6 (without this patch)?
>>
> I've attached a verbose dmesg from a Freesbie CD.

Hi, Dave.

If you have some time, can you test this patch on CURRENT (without
your patch). I guess it may help.

-- 
WBR, Andrey V. Elsukov
-------------- next part --------------
--- src/sys/dev/ata/ata-chipset.c.orig	2007-09-11 13:11:19.475037453 +0400
+++ src/sys/dev/ata/ata-chipset.c	2007-09-11 13:28:47.876389301 +0400
@@ -721,7 +721,15 @@ ata_ahci_reset(device_t dev)
 
     /* enable interface */
     if (ata_sata_phy_reset(dev)) {
-	switch (ATA_INL(ctlr->r_res2, ATA_AHCI_P_SIG + offset)) {
+	for (timeout = 0; timeout < 300; timeout++) {
+	    if (!(ATA_INL(ctlr->r_res2, ATA_AHCI_P_TFD + offset) & ATA_S_BUSY))
+		    break;
+	    DELAY(10000);
+	}
+	cmd = ATA_INL(ctlr->r_res2, ATA_AHCI_P_SIG + offset);
+	if (bootverbose)
+	    device_printf(ch->dev, "Port Signature: %08x\n", cmd);
+	switch (cmd) {
 	case 0xeb140101:
 	    ch->devices = ATA_ATAPI_MASTER;
 	    device_printf(ch->dev, "SATA ATAPI devices not supported yet\n");
@@ -732,6 +740,7 @@ ata_ahci_reset(device_t dev)
 	    device_printf(ch->dev, "Portmultipliers not supported yet\n");
 	    ch->devices = 0;
 	    break;
+	case 0xc33c0101:
 	case 0x00000101:
 	    ch->devices = ATA_ATA_MASTER;
 	    break;


More information about the freebsd-bugs mailing list