Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Dec 2008 02:10:53 +0000 (UTC)
From:      "George V. Neville-Neil" <gnn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r185662 - in head/sys/dev/cxgb: . common
Message-ID:  <200812060210.mB62ArHr079732@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812060210.mB62ArHr079732>