From owner-freebsd-drivers@FreeBSD.ORG Thu Nov 3 19:15:20 2011 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B1851065680 for ; Thu, 3 Nov 2011 19:15:20 +0000 (UTC) (envelope-from jmg@h2.funkthat.com) Received: from h2.funkthat.com (gate.funkthat.com [70.36.235.232]) by mx1.freebsd.org (Postfix) with ESMTP id D8B198FC19 for ; Thu, 3 Nov 2011 19:15:19 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id pA3Iabsj051308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Nov 2011 11:36:37 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id pA3Iab3K051307; Thu, 3 Nov 2011 11:36:37 -0700 (PDT) (envelope-from jmg) Date: Thu, 3 Nov 2011 11:36:37 -0700 From: John-Mark Gurney To: Adarsh Joshi Message-ID: <20111103183637.GD25601@funkthat.com> Mail-Followup-To: Adarsh Joshi , "freebsd-drivers@freebsd.org" References: <5E4F49720D0BAD499EE1F01232234BA873C6F1A523@AVEXMB1.qlogic.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5E4F49720D0BAD499EE1F01232234BA873C6F1A523@AVEXMB1.qlogic.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Thu, 03 Nov 2011 11:36:38 -0700 (PDT) Cc: "freebsd-drivers@freebsd.org" Subject: Re: Is it possible to change the log level of a device driver at runtime? X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2011 19:15:20 -0000 Adarsh Joshi wrote this message on Thu, Nov 03, 2011 at 11:22 -0700: > Is it possible to change the log level of a device driver at runtime? > > I am trying to understand a network based device driver. It already has a number of print messages which are only printed if the debug flag is 1. Is it possible to toggle the debug flag when the driver is loaded, at runtime with some command? > > A detailed explanation on how to go about this would be very helpful. Depends upon the driver. Some drivers allow you to set a sysctl to change the debug level, others do not. Which driver are we talking about? Is it in the tree, or is it a vendor supplied driver? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."