Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jun 2015 07:24:48 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r284801 - stable/10/sys/dev/isp
Message-ID:  <201506250724.t5P7OmbK096926@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Jun 25 07:24:47 2015
New Revision: 284801
URL: https://svnweb.freebsd.org/changeset/base/284801

Log:
  MFC r284697: Add logging of executed mailbox command names.
  
  Previously those commands were logged only as part of register dump,
  that is not very readable.

Modified:
  stable/10/sys/dev/isp/isp.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/isp/isp.c
==============================================================================
--- stable/10/sys/dev/isp/isp.c	Thu Jun 25 07:23:35 2015	(r284800)
+++ stable/10/sys/dev/isp/isp.c	Thu Jun 25 07:24:47 2015	(r284801)
@@ -7344,6 +7344,7 @@ isp_mboxcmd(ispsoftc_t *isp, mbreg_t *mb
 			isp_prt(isp, ISP_LOGERR, "Unknown Command 0x%x", opcode);
 			return;
 		}
+		cname = fc_mbcmd_names[opcode];
 		ibits = ISP_FC_IBITS(opcode);
 		obits = ISP_FC_OBITS(opcode);
 	} else {
@@ -7352,9 +7353,15 @@ isp_mboxcmd(ispsoftc_t *isp, mbreg_t *mb
 			isp_prt(isp, ISP_LOGERR, "Unknown Command 0x%x", opcode);
 			return;
 		}
+		cname = scsi_mbcmd_names[opcode];
 		ibits = ISP_SCSI_IBITS(opcode);
 		obits = ISP_SCSI_OBITS(opcode);
 	}
+	if (cname == NULL) {
+		cname = tname;
+		ISP_SNPRINTF(tname, sizeof tname, "opcode %x", opcode);
+	}
+	isp_prt(isp, ISP_LOGDEBUG3, "Mailbox Command '%s'", cname);
 
 	/*
 	 * Pick up any additional bits that the caller might have set.
@@ -7440,11 +7447,6 @@ isp_mboxcmd(ispsoftc_t *isp, mbreg_t *mb
 	if (mbp->logval == 0 || opcode == MBOX_EXEC_FIRMWARE) {
 		return;
 	}
-	cname = (IS_FC(isp))? fc_mbcmd_names[opcode] : scsi_mbcmd_names[opcode];
-	if (cname == NULL) {
-		cname = tname;
-		ISP_SNPRINTF(tname, sizeof tname, "opcode %x", opcode);
-	}
 
 	/*
 	 * Just to be chatty here...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506250724.t5P7OmbK096926>