From owner-svn-src-head@FreeBSD.ORG Wed Feb 29 22:06:45 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 06523106566B; Wed, 29 Feb 2012 22:06:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D079A8FC08; Wed, 29 Feb 2012 22:06:44 +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 q1TM6imu047054; Wed, 29 Feb 2012 22:06:44 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1TM6iGn047052; Wed, 29 Feb 2012 22:06:44 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201202292206.q1TM6iGn047052@svn.freebsd.org> From: John Baldwin Date: Wed, 29 Feb 2012 22:06:44 +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: r232318 - head/sys/dev/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Feb 2012 22:06:45 -0000 Author: jhb Date: Wed Feb 29 22:06:44 2012 New Revision: 232318 URL: http://svn.freebsd.org/changeset/base/232318 Log: Use pci_printf() instead of a home-rolled version in the VPD parsing code. Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Wed Feb 29 21:38:31 2012 (r232317) +++ head/sys/dev/pci/pci.c Wed Feb 29 22:06:44 2012 (r232318) @@ -878,10 +878,9 @@ pci_read_vpd(device_t pcib, pcicfgregs * remain |= byte2 << 8; if (remain > (0x7f*4 - vrs.off)) { state = -1; - printf( - "pci%d:%d:%d:%d: invalid VPD data, remain %#x\n", - cfg->domain, cfg->bus, cfg->slot, - cfg->func, remain); + pci_printf(cfg, + "invalid VPD data, remain %#x\n", + remain); } name = byte & 0x7f; } else { @@ -953,10 +952,8 @@ pci_read_vpd(device_t pcib, pcicfgregs * * if this happens, we can't trust the rest * of the VPD. */ - printf( - "pci%d:%d:%d:%d: bad keyword length: %d\n", - cfg->domain, cfg->bus, cfg->slot, - cfg->func, dflen); + pci_printf(cfg, "bad keyword length: %d\n", + dflen); cksumvalid = 0; state = -1; break; @@ -989,10 +986,8 @@ pci_read_vpd(device_t pcib, pcicfgregs * cksumvalid = 1; else { if (bootverbose) - printf( - "pci%d:%d:%d:%d: bad VPD cksum, remain %hhu\n", - cfg->domain, cfg->bus, - cfg->slot, cfg->func, + pci_printf(cfg, + "bad VPD cksum, remain %hhu\n", vrs.cksum); cksumvalid = 0; state = -1; @@ -1070,9 +1065,7 @@ pci_read_vpd(device_t pcib, pcicfgregs * break; default: - printf("pci%d:%d:%d:%d: invalid state: %d\n", - cfg->domain, cfg->bus, cfg->slot, cfg->func, - state); + pci_printf(cfg, "invalid state: %d\n", state); state = -1; break; } @@ -1089,8 +1082,7 @@ pci_read_vpd(device_t pcib, pcicfgregs * } if (state < -1) { /* I/O error, clean up */ - printf("pci%d:%d:%d:%d: failed to read VPD data.\n", - cfg->domain, cfg->bus, cfg->slot, cfg->func); + pci_printf(cfg, "failed to read VPD data.\n"); if (cfg->vpd.vpd_ident != NULL) { free(cfg->vpd.vpd_ident, M_DEVBUF); cfg->vpd.vpd_ident = NULL;