From owner-svn-src-head@FreeBSD.ORG Sat Dec 6 02:10:53 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC675106564A; Sat, 6 Dec 2008 02:10:53 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA24D8FC0C; Sat, 6 Dec 2008 02:10:53 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB62Ar2d079734; Sat, 6 Dec 2008 02:10:53 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB62ArHr079732; Sat, 6 Dec 2008 02:10:53 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <200812060210.mB62ArHr079732@svn.freebsd.org> From: "George V. Neville-Neil" Date: Sat, 6 Dec 2008 02:10:53 +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: r185662 - in head/sys/dev/cxgb: . common 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: Sat, 06 Dec 2008 02:10:53 -0000 Author: gnn Date: Sat Dec 6 02:10:53 2008 New Revision: 185662 URL: http://svn.freebsd.org/changeset/base/185662 Log: Bug fix to support N310 version of Chelsio cards (board ID 1088). Obtained from: Chelsio Inc. MFC after: 3 days Modified: head/sys/dev/cxgb/common/cxgb_t3_hw.c head/sys/dev/cxgb/cxgb_main.c Modified: head/sys/dev/cxgb/common/cxgb_t3_hw.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_t3_hw.c Sat Dec 6 01:31:07 2008 (r185661) +++ head/sys/dev/cxgb/common/cxgb_t3_hw.c Sat Dec 6 02:10:53 2008 (r185662) @@ -509,6 +509,12 @@ static struct adapter_info t3_adap_info[ F_GPIO6_OUT_VAL | F_GPIO7_OUT_VAL, { S_GPIO1, S_GPIO2, S_GPIO3, S_GPIO4 }, SUPPORTED_AUI, &mi1_mdio_ops, "Chelsio T304" }, + { 0 }, + { 1, 0, 0, 0, 0, + F_GPIO1_OEN | F_GPIO2_OEN | F_GPIO4_OEN | F_GPIO6_OEN | F_GPIO7_OEN | + F_GPIO10_OEN | F_GPIO1_OUT_VAL | F_GPIO6_OUT_VAL | F_GPIO10_OUT_VAL, + { S_GPIO9 }, SUPPORTED_10000baseT_Full | SUPPORTED_AUI, + &mi1_mdio_ext_ops, "Chelsio N310" } }; /* Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Sat Dec 6 01:31:07 2008 (r185661) +++ head/sys/dev/cxgb/cxgb_main.c Sat Dec 6 02:10:53 2008 (r185662) @@ -281,6 +281,7 @@ struct cxgb_ident { {PCI_VENDOR_ID_CHELSIO, 0x0031, 3, "T3B20"}, {PCI_VENDOR_ID_CHELSIO, 0x0032, 1, "T3B02"}, {PCI_VENDOR_ID_CHELSIO, 0x0033, 4, "T3B04"}, + {PCI_VENDOR_ID_CHELSIO, 0x0035, 6, "N310E"}, {0, 0, 0, NULL} }; @@ -444,12 +445,14 @@ cxgb_controller_attach(device_t dev) return (ENXIO); } sc->udbs_rid = PCIR_BAR(2); - if ((sc->udbs_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &sc->udbs_rid, RF_ACTIVE)) == NULL) { + sc->udbs_res = NULL; + if (is_offload(sc) && + ((sc->udbs_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->udbs_rid, RF_ACTIVE)) == NULL)) { device_printf(dev, "Cannot allocate BAR region 1\n"); error = ENXIO; goto out; - } + } snprintf(sc->lockbuf, ADAPTER_LOCK_NAME_LEN, "cxgb controller lock %d", device_get_unit(dev));