From owner-svn-src-all@FreeBSD.ORG Mon Jun 22 06:30:02 2015 Return-Path: Delivered-To: svn-src-all@nevdull.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCB5917D; Mon, 22 Jun 2015 06:30:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB75B323; Mon, 22 Jun 2015 06:30:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5M6U2oI057498; Mon, 22 Jun 2015 06:30:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5M6U29v057497; Mon, 22 Jun 2015 06:30:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201506220630.t5M6U29v057497@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 22 Jun 2015 06:30:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284697 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2015 06:30:03 -0000 Author: mav Date: Mon Jun 22 06:30:02 2015 New Revision: 284697 URL: https://svnweb.freebsd.org/changeset/base/284697 Log: Add logging of executed mailbox command names. Previously those commands were logged only as part of register dump, that is not very readable. Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Mon Jun 22 06:06:38 2015 (r284696) +++ head/sys/dev/isp/isp.c Mon Jun 22 06:30:02 2015 (r284697) @@ -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...