summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorgnn <gnn@FreeBSD.org>2008-12-06 02:10:53 +0000
committergnn <gnn@FreeBSD.org>2008-12-06 02:10:53 +0000
commit0b3880cbd3bebcc8f24143071eb004cc12514fc2 (patch)
treee156ec3726e97cd4775a90d1bc0a27297d01347d /sys
parent0fa0ac8e2e1bf844cb674f3ca4fcb8e9498cca93 (diff)
downloadFreeBSD-src-0b3880cbd3bebcc8f24143071eb004cc12514fc2.zip
FreeBSD-src-0b3880cbd3bebcc8f24143071eb004cc12514fc2.tar.gz
Bug fix to support N310 version of Chelsio cards (board ID 1088).
Obtained from: Chelsio Inc. MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/cxgb/common/cxgb_t3_hw.c6
-rw-r--r--sys/dev/cxgb/cxgb_main.c9
2 files changed, 12 insertions, 3 deletions
diff --git a/sys/dev/cxgb/common/cxgb_t3_hw.c b/sys/dev/cxgb/common/cxgb_t3_hw.c
index 63ece94..d6de084 100644
--- a/sys/dev/cxgb/common/cxgb_t3_hw.c
+++ b/sys/dev/cxgb/common/cxgb_t3_hw.c
@@ -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" }
};
/*
diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c
index f0492c2..2cbd801 100644
--- a/sys/dev/cxgb/cxgb_main.c
+++ b/sys/dev/cxgb/cxgb_main.c
@@ -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));
OpenPOWER on IntegriCloud