svn commit: r188266 - head/sys/dev/si

Wojciech A. Koszek wkoszek at FreeBSD.org
Fri Feb 6 18:14:28 PST 2009


Author: wkoszek
Date: Sat Feb  7 02:14:27 2009
New Revision: 188266
URL: http://svn.freebsd.org/changeset/base/188266

Log:
  si_cmdname() is defined only when SI_DEBUG is enabled, thus
  using this function in simple printf() causes compile-time
  problems. Use conditionally enabled DPRINT() macro instead.

Modified:
  head/sys/dev/si/si.c

Modified: head/sys/dev/si/si.c
==============================================================================
--- head/sys/dev/si/si.c	Sat Feb  7 01:59:34 2009	(r188265)
+++ head/sys/dev/si/si.c	Sat Feb  7 02:14:27 2009	(r188266)
@@ -1549,7 +1549,7 @@ si_command(struct si_port *pp, int cmd, 
 			/* This is very very bad.  The card has crashed. */
 			/* XXX the driver breaks at this point */
 			if (err == ETIMEDOUT)
-				printf("%s: tsleep1 timeout. hi_stat %s, sp_pend %s\n", pp->sp_name, si_cmdname(ccbp->hi_stat), si_cmdname(pp->sp_pend));
+				DPRINT(("%s: tsleep1 timeout. hi_stat %s, sp_pend %s\n", pp->sp_name, si_cmdname(ccbp->hi_stat), si_cmdname(pp->sp_pend)));
 			splx(oldspl);
 			return;
 		}
@@ -1586,7 +1586,7 @@ si_command(struct si_port *pp, int cmd, 
 			if (err) {
 				DPRINT((pp, DBG_PARAM, "sicmd2 tsleep error: hi_stat (%s) sp_pend (%s)\n", si_cmdname(ccbp->hi_stat), si_cmdname(pp->sp_pend)));
 				if (err == ETIMEDOUT) {
-					printf("%s: tsleep2 timeout. hi_stat %s, sp_pend %s\n", pp->sp_name, si_cmdname(ccbp->hi_stat), si_cmdname(pp->sp_pend));
+					DPRINT(("%s: tsleep2 timeout. hi_stat %s, sp_pend %s\n", pp->sp_name, si_cmdname(ccbp->hi_stat), si_cmdname(pp->sp_pend)));
 				}
 				break;
 			}


More information about the svn-src-all mailing list