svn commit: r256743 - head/sys/dev/altera/sdcard

Brooks Davis brooks at FreeBSD.org
Fri Oct 18 15:24:19 UTC 2013


Author: brooks
Date: Fri Oct 18 15:24:18 2013
New Revision: 256743
URL: http://svnweb.freebsd.org/changeset/base/256743

Log:
  MFP4:
  Change 227594 by brooks at brooks_zenith on 2013/04/11 17:10:14
  
  	When we fail, print the error that occured if we are giving
  	up or if bootverbose is set.
  
  MFC after:	3 days
  Sponsored by:	DARPA/AFRL

Modified:
  head/sys/dev/altera/sdcard/altera_sdcard_io.c

Modified: head/sys/dev/altera/sdcard/altera_sdcard_io.c
==============================================================================
--- head/sys/dev/altera/sdcard/altera_sdcard_io.c	Fri Oct 18 14:43:03 2013	(r256742)
+++ head/sys/dev/altera/sdcard/altera_sdcard_io.c	Fri Oct 18 15:24:18 2013	(r256743)
@@ -390,20 +390,23 @@ altera_sdcard_io_complete(struct altera_
 		break;
 	}
 	if (error) {
+		sc->as_retriesleft--;
+		if (sc->as_retriesleft == 0 || bootverbose)
+			device_printf(sc->as_dev, "%s: %s operation block %ju "
+			    "length %ju failed; asr 0x%08x (rr1: 0x%04x)%s\n",
+			    __func__, bp->bio_cmd == BIO_READ ? "BIO_READ" :
+			    (bp->bio_cmd == BIO_WRITE ? "BIO_WRITE" :
+			    "unknown"),
+			    bp->bio_pblkno, bp->bio_bcount, asr, rr1,
+			    sc->as_retriesleft != 0 ? " retrying" : "");
 		/*
 		 * This attempt experienced an error; possibly retry.
 		 */
-		sc->as_retriesleft--;
 		if (sc->as_retriesleft != 0) {
 			sc->as_flags |= ALTERA_SDCARD_FLAG_IOERROR;
 			altera_sdcard_io_start_internal(sc, bp);
 			return (0);
 		}
-		device_printf(sc->as_dev, "%s: %s operation block %ju length "
-		    "%ju failed; asr 0x%08x (rr1: 0x%04x)\n", __func__,
-		    bp->bio_cmd == BIO_READ ? "BIO_READ" :
-		    (bp->bio_cmd == BIO_WRITE ? "BIO_WRITE" : "unknown"),
-		    bp->bio_pblkno, bp->bio_bcount, asr, rr1);
 		sc->as_flags &= ~ALTERA_SDCARD_FLAG_IOERROR;
 	} else {
 		/*


More information about the svn-src-head mailing list