PERFORCE change 167617 for review
Alexander Motin
mav at FreeBSD.org
Sat Aug 22 17:35:32 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=167617
Change 167617 by mav at mav_mavbook on 2009/08/22 17:34:58
Reduce reset time.
Improve logging.
Affected files ...
.. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#49 edit
Differences ...
==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#49 (text+ko) ====
@@ -1599,7 +1599,7 @@
AHCI_P_IX_DP | AHCI_P_IX_UF | AHCI_P_IX_SDB |
AHCI_P_IX_DS | AHCI_P_IX_PS | AHCI_P_IX_DHR));
if (bootverbose)
- device_printf(dev, "AHCI reset done: devices=%08x\n", ch->devices);
+ device_printf(dev, "AHCI reset done: device found\n");
/* Tell the XPT about the event */
xpt_async(AC_BUS_RESET, ch->path, NULL);
}
@@ -1666,6 +1666,13 @@
((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) &&
((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE))
break;
+ if ((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_OFFLINE) {
+ if (bootverbose) {
+ device_printf(ch->dev, "SATA offline status=%08x\n",
+ status);
+ }
+ return (0);
+ }
DELAY(1000);
}
if (timeout >= 100) {
@@ -1709,11 +1716,11 @@
ATA_OUTL(ch->r_mem, AHCI_P_SCTL,
ATA_SC_DET_RESET | val |
ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER);
- DELAY(50000);
+ DELAY(5000);
ATA_OUTL(ch->r_mem, AHCI_P_SCTL,
ATA_SC_DET_IDLE | val | ((ch->pm_level > 0) ? 0 :
(ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER)));
- DELAY(50000);
+ DELAY(5000);
return (ahci_sata_connect(ch));
}
More information about the p4-projects
mailing list