PERFORCE change 164400 for review

Alexander Motin mav at FreeBSD.org
Mon Jun 15 07:05:07 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=164400

Change 164400 by mav at mav_mavbook on 2009/06/15 07:04:52

	Use CLO only with Soft Reset command. Using it in other cases opens
	race window in SATA protocol, causing false errors reports.

Affected files ...

.. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#32 edit

Differences ...

==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#32 (text+ko) ====

@@ -857,13 +857,13 @@
 		ahci_phy_check_events(dev);
 	/* Process command errors */
 	if (istatus & (AHCI_P_IX_IF|AHCI_P_IX_HBD|AHCI_P_IX_HBF|AHCI_P_IX_TFE)) {
-device_printf(dev, "%s ERROR is %08x cs %08x ss %08x rs %08x tfd %02x\n",
-    __func__, istatus, cstatus, sstatus, ch->rslots, ATA_INL(ch->r_mem, AHCI_P_TFD));
+device_printf(dev, "%s ERROR is %08x cs %08x ss %08x rs %08x tfd %02x serr %08x\n",
+    __func__, istatus, cstatus, sstatus, ch->rslots, ATA_INL(ch->r_mem, AHCI_P_TFD),
+    ATA_INL(ch->r_mem, AHCI_P_SERR));
 		ccs = (ATA_INL(ch->r_mem, AHCI_P_CMD) & AHCI_P_CMD_CCS_MASK)
 		    >> AHCI_P_CMD_CCS_SHIFT;
 		/* Kick controller into sane state */
 		ahci_stop(dev);
-		ahci_clo(dev);
 		ahci_start(dev);
 		ok = ch->rslots & ~(cstatus | sstatus);
 		err = ch->rslots & (cstatus | sstatus);
@@ -1139,7 +1139,6 @@
 		if (et != AHCI_ERR_NONE) {
 			/* Kick controller into sane state */
 			ahci_stop(ch->dev);
-			ahci_clo(ch->dev);
 			ahci_start(ch->dev);
 			xpt_freeze_simq(ch->sim, 1);
 		}
@@ -1164,7 +1163,6 @@
 
 	/* Kick controller into sane state. */
 	ahci_stop(ch->dev);
-	ahci_clo(ch->dev);
 	ahci_start(ch->dev);
 
 	if (!ch->readlog)


More information about the p4-projects mailing list