From owner-svn-src-all@FreeBSD.ORG Mon Jun 4 10:42:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2389106564A; Mon, 4 Jun 2012 10:42:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82F418FC15; Mon, 4 Jun 2012 10:42:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q54AgA1Z036601; Mon, 4 Jun 2012 10:42:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q54AgAYi036598; Mon, 4 Jun 2012 10:42:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201206041042.q54AgAYi036598@svn.freebsd.org> From: Alexander Motin Date: Mon, 4 Jun 2012 10:42:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r236555 - head/sbin/camcontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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, 04 Jun 2012 10:42:10 -0000 Author: mav Date: Mon Jun 4 10:42:09 2012 New Revision: 236555 URL: http://svn.freebsd.org/changeset/base/236555 Log: Add -p argument for `camcontrol debug` to allow enabling CAM_DEBUG_PROBE added at r208911. Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Mon Jun 4 10:09:57 2012 (r236554) +++ head/sbin/camcontrol/camcontrol.8 Mon Jun 4 10:42:09 2012 (r236555) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 24, 2011 +.Dd June 4, 2012 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -175,6 +175,7 @@ .Op Fl S .Op Fl X .Op Fl c +.Op Fl p .Aq all|off|bus Ns Op :target Ns Op :lun .Nm .Ic tags @@ -796,6 +797,8 @@ Enable CAM_DEBUG_XPT printfs. Enable CAM_DEBUG_CDB printfs. This will cause the kernel to print out the SCSI CDBs sent to the specified device(s). +.It Fl p +Enable CAM_DEBUG_PROBE printfs. .It all Enable debugging for all devices. .It off Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Mon Jun 4 10:09:57 2012 (r236554) +++ head/sbin/camcontrol/camcontrol.c Mon Jun 4 10:42:09 2012 (r236555) @@ -123,6 +123,7 @@ typedef enum { CAM_ARG_DEBUG_CDB = 0x08000000, CAM_ARG_DEBUG_XPT = 0x10000000, CAM_ARG_DEBUG_PERIPH = 0x20000000, + CAM_ARG_DEBUG_PROBE = 0x40000000, } cam_argmask; struct camcontrol_opts { @@ -176,7 +177,7 @@ static struct camcontrol_opts option_tab {"tags", CAM_CMD_TAG, CAM_ARG_NONE, "N:q"}, {"negotiate", CAM_CMD_RATE, CAM_ARG_NONE, negotiate_opts}, {"rate", CAM_CMD_RATE, CAM_ARG_NONE, negotiate_opts}, - {"debug", CAM_CMD_DEBUG, CAM_ARG_NONE, "IPTSXc"}, + {"debug", CAM_CMD_DEBUG, CAM_ARG_NONE, "IPTSXcp"}, {"format", CAM_CMD_FORMAT, CAM_ARG_NONE, "qrwy"}, {"idle", CAM_CMD_IDLE, CAM_ARG_NONE, "t:"}, {"standby", CAM_CMD_STANDBY, CAM_ARG_NONE, "t:"}, @@ -2640,6 +2641,10 @@ camdebug(int argc, char **argv, char *co arglist |= CAM_ARG_DEBUG_CDB; ccb.cdbg.flags |= CAM_DEBUG_CDB; break; + case 'p': + arglist |= CAM_ARG_DEBUG_PROBE; + ccb.cdbg.flags |= CAM_DEBUG_PROBE; + break; default: break; } @@ -2669,7 +2674,7 @@ camdebug(int argc, char **argv, char *co ccb.cdbg.flags = CAM_DEBUG_NONE; arglist &= ~(CAM_ARG_DEBUG_INFO|CAM_ARG_DEBUG_PERIPH| CAM_ARG_DEBUG_TRACE|CAM_ARG_DEBUG_SUBTRACE| - CAM_ARG_DEBUG_XPT); + CAM_ARG_DEBUG_XPT|CAM_ARG_DEBUG_PROBE); } else if (strncmp(tstr, "all", 3) != 0) { tmpstr = (char *)strtok(tstr, ":"); if ((tmpstr != NULL) && (*tmpstr != '\0')){