From owner-svn-src-stable-8@FreeBSD.ORG Sun Dec 6 01:59:06 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D1441065672; Sun, 6 Dec 2009 01:59:06 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B4D28FC0A; Sun, 6 Dec 2009 01:59:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB61x6w1006921; Sun, 6 Dec 2009 01:59:06 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB61x65o006919; Sun, 6 Dec 2009 01:59:06 GMT (envelope-from np@svn.freebsd.org) Message-Id: <200912060159.nB61x65o006919@svn.freebsd.org> From: Navdeep Parhar Date: Sun, 6 Dec 2009 01:59:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200176 - stable/8/sys/dev/cxgb X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2009 01:59:06 -0000 Author: np Date: Sun Dec 6 01:59:06 2009 New Revision: 200176 URL: http://svn.freebsd.org/changeset/base/200176 Log: MFC r199237: sc->rev and is_offload(sc) will always be 0 during probe. Wait till attach to get correct values. (missed this one in r200175) Modified: stable/8/sys/dev/cxgb/cxgb_main.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/8/sys/dev/cxgb/cxgb_main.c Sun Dec 6 01:45:55 2009 (r200175) +++ stable/8/sys/dev/cxgb/cxgb_main.c Sun Dec 6 01:59:06 2009 (r200176) @@ -355,7 +355,6 @@ cxgb_controller_probe(device_t dev) const struct adapter_info *ai; char *ports, buf[80]; int nports; - struct adapter *sc = device_get_softc(dev); ai = cxgb_get_adapter_info(dev); if (ai == NULL) @@ -367,9 +366,7 @@ cxgb_controller_probe(device_t dev) else ports = "ports"; - snprintf(buf, sizeof(buf), "%s %sNIC, rev: %d nports: %d %s", - ai->desc, is_offload(sc) ? "R" : "", - sc->params.rev, nports, ports); + snprintf(buf, sizeof(buf), "%s, %d %s", ai->desc, nports, ports); device_set_desc_copy(dev, buf); return (BUS_PROBE_DEFAULT); } @@ -665,8 +662,8 @@ cxgb_controller_attach(device_t dev) G_FW_VERSION_MAJOR(vers), G_FW_VERSION_MINOR(vers), G_FW_VERSION_MICRO(vers)); - snprintf(buf, sizeof(buf), "%s\t E/C: %s S/N: %s", - ai->desc, + snprintf(buf, sizeof(buf), "%s %sNIC\t E/C: %s S/N: %s", + ai->desc, is_offload(sc) ? "R" : "", sc->params.vpd.ec, sc->params.vpd.sn); device_set_desc_copy(dev, buf);