From owner-freebsd-firewire@FreeBSD.ORG Thu Feb 12 03:11:25 2009 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 578CC1065697 for ; Thu, 12 Feb 2009 03:11:25 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: from iron2.pdx.net (iron2.pdx.net [69.64.224.71]) by mx1.freebsd.org (Postfix) with ESMTP id 32E788FC14 for ; Thu, 12 Feb 2009 03:11:25 +0000 (UTC) (envelope-from sean.bruno@dsl-only.net) Received: (qmail 26435 invoked from network); 11 Feb 2009 19:10:47 -0800 Received: from 069-064-235-060.pdx.net (HELO ?192.168.1.51?) (69.64.235.60) by iron2.pdx.net with SMTP; 11 Feb 2009 19:10:47 -0800 From: Sean Bruno To: freebsd-firewire Content-Type: multipart/mixed; boundary="=-fA7jetJr/3Gqwhd7VihN" Date: Wed, 11 Feb 2009 19:11:20 -0800 Message-Id: <1234408280.30696.170.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 (2.24.3-1.fc10) Cc: scottl@freebsd.org Subject: fwochi patches for -current X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2009 03:11:26 -0000 --=-fA7jetJr/3Gqwhd7VihN Content-Type: text/plain Content-Transfer-Encoding: 7bit Updating debug messages so they don't suck quite as bad. Sean --=-fA7jetJr/3Gqwhd7VihN Content-Disposition: attachment; filename="fwohci.diff" Content-Type: text/x-patch; name="fwohci.diff"; charset="UTF-8" Content-Transfer-Encoding: 7bit Index: fwohci.c =================================================================== --- fwohci.c (revision 188508) +++ fwohci.c (working copy) @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: head/sys/dev/firewire/fwohci.c 187993 2009-02-01 23:28:52Z sbruno $ * */ @@ -306,8 +306,8 @@ if((bm & 0x3f) == 0x3f) bm = node; if (firewire_debug) - device_printf(sc->fc.dev, - "fw_set_bus_manager: %d->%d (loop=%d)\n", bm, node, i); + device_printf(sc->fc.dev, "%s: %d->%d (loop=%d)\n", + __func__, bm, node, i); return(bm); } @@ -332,7 +332,7 @@ } if(i >= MAX_RETRY) { if (firewire_debug) - device_printf(sc->fc.dev, "phy read failed(1).\n"); + device_printf(sc->fc.dev, "%s: failed(1).\n", __func__); if (++retry < MAX_RETRY) { DELAY(100); goto again; @@ -343,15 +343,16 @@ if ((stat & OHCI_INT_REG_FAIL) != 0 || ((fun >> PHYDEV_REGADDR) & 0xf) != addr) { if (firewire_debug) - device_printf(sc->fc.dev, "phy read failed(2).\n"); + device_printf(sc->fc.dev, "%s: failed(2).\n", __func__); if (++retry < MAX_RETRY) { DELAY(100); goto again; } } - if (firewire_debug || retry >= MAX_RETRY) + if (firewire_debug > 1 || retry >= MAX_RETRY) device_printf(sc->fc.dev, - "fwphy_rddata: 0x%x loop=%d, retry=%d\n", addr, i, retry); + "%s:: 0x%x loop=%d, retry=%d\n", + __func__, addr, i, retry); #undef MAX_RETRY return((fun >> PHYDEV_RDDATA )& 0xff); } @@ -1848,7 +1849,7 @@ /* Disable bus reset interrupt until sid recv. */ OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_PHY_BUS_R); - device_printf(fc->dev, "BUS reset\n"); + device_printf(fc->dev, "%s: BUS reset\n", __func__); OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_CYC_LOST); OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCSRC); @@ -1885,10 +1886,11 @@ plen = OREAD(sc, OHCI_SID_CNT); fc->nodeid = node_id & 0x3f; - device_printf(fc->dev, "node_id=0x%08x, SelfID Count=%d, ", - fc->nodeid, (plen >> 16) & 0xff); + device_printf(fc->dev, "%s: node_id=0x%08x, SelfID Count=%d, ", + __func__, fc->nodeid, (plen >> 16) & 0xff); if (!(node_id & OHCI_NODE_VALID)) { - printf("Bus reset failure\n"); + device_printf(fc->dev, "%s: Bus reset failure\n", + __func__); goto sidout; } --=-fA7jetJr/3Gqwhd7VihN--