PERFORCE change 164325 for review
Alexander Motin
mav at FreeBSD.org
Sun Jun 14 09:38:56 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=164325
Change 164325 by mav at mav_mavbook on 2009/06/14 09:38:08
Look on error status while polling for reset.
It allows to reduce waiting in some cases.
Affected files ...
.. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#27 edit
Differences ...
==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#27 (text+ko) ====
@@ -1085,10 +1085,20 @@
DELAY(1000);
if (!(ATA_INL(ch->r_mem, AHCI_P_CI) & (1 << slot->slot)))
break;
+ if (ATA_INL(ch->r_mem, AHCI_P_TFD) & ATA_S_ERROR) {
+ device_printf(ch->dev,
+ "Poll error on slot %d, TFD: %04x\n",
+ slot->slot, ATA_INL(ch->r_mem, AHCI_P_TFD));
+ et = AHCI_ERR_REAL;
+ break;
+ }
}
if (timeout && (count >= timeout)) {
-device_printf(ch->dev, "Poll timeout on slot %d\n", slot->slot);
+ device_printf(ch->dev,
+ "Poll timeout on slot %d\n", slot->slot);
et = CAM_CMD_TIMEOUT;
+ }
+ if (et != AHCI_ERR_NONE) {
/* Kick controller into sane state */
ahci_stop(ch->dev);
ahci_clo(ch->dev);
More information about the p4-projects
mailing list