summaryrefslogtreecommitdiffstats
path: root/sys/dev/cxgb/cxgb_main.c
diff options
context:
space:
mode:
authorgnn <gnn@FreeBSD.org>2008-11-21 19:22:25 +0000
committergnn <gnn@FreeBSD.org>2008-11-21 19:22:25 +0000
commitfb7f8e0e59cfa5b30a6f0b0d1377402f14c64673 (patch)
treec150731f7b7c58812e3400090c04c9573a980c53 /sys/dev/cxgb/cxgb_main.c
parent4f79df3b3ced40c03cf786528a076dadf312bba9 (diff)
downloadFreeBSD-src-fb7f8e0e59cfa5b30a6f0b0d1377402f14c64673.zip
FreeBSD-src-fb7f8e0e59cfa5b30a6f0b0d1377402f14c64673.tar.gz
Several small additions to the Chelsio 10G driver.
1) Fix a bug in dealing with the Alerus 1006 PHY which prevented the device from ever coming back up once it had been set to down. 2) Add a kernel tunable (hw.cxgb.snd_queue_len) which makes it possible to give the device more than IFQ_MAXLEN entries in its send queue. The default remains 50. 3) Add code to place the card'd identification and serial number into its description (%desc) so that users can tell which card they have installed.
Diffstat (limited to 'sys/dev/cxgb/cxgb_main.c')
-rw-r--r--sys/dev/cxgb/cxgb_main.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c
index cc6b30b..d1203fc 100644
--- a/sys/dev/cxgb/cxgb_main.c
+++ b/sys/dev/cxgb/cxgb_main.c
@@ -228,6 +228,15 @@ TUNABLE_INT("hw.cxgb.use_16k_clusters", &cxgb_use_16k_clusters);
SYSCTL_UINT(_hw_cxgb, OID_AUTO, use_16k_clusters, CTLFLAG_RDTUN,
&cxgb_use_16k_clusters, 0, "use 16kB clusters for the jumbo queue ");
+/*
+ * Tune the size of the output queue.
+ */
+int cxgb_snd_queue_len = IFQ_MAXLEN;
+TUNABLE_INT("hw.cxgb.snd_queue_len", &cxgb_snd_queue_len);
+SYSCTL_UINT(_hw_cxgb, OID_AUTO, snd_queue_len, CTLFLAG_RDTUN,
+ &cxgb_snd_queue_len, 0, "send queue size ");
+
+
enum {
MAX_TXQ_ENTRIES = 16384,
MAX_CTRL_TXQ_ENTRIES = 1024,
@@ -359,8 +368,8 @@ cxgb_controller_probe(device_t dev)
ports = "ports";
snprintf(buf, sizeof(buf), "%s %sNIC, rev: %d nports: %d %s",
- ai->desc, is_offload(sc) ? "R" : "",
- sc->params.rev, nports, ports);
+ ai->desc, is_offload(sc) ? "R" : "",
+ sc->params.rev, nports, ports);
device_set_desc_copy(dev, buf);
return (BUS_PROBE_DEFAULT);
}
@@ -406,6 +415,8 @@ cxgb_controller_attach(device_t dev)
int msi_needed, reg;
#endif
int must_load = 0;
+ char buf[80];
+
sc = device_get_softc(dev);
sc->dev = dev;
sc->msi_count = 0;
@@ -618,6 +629,11 @@ 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,
+ sc->params.vpd.ec, sc->params.vpd.sn);
+ device_set_desc_copy(dev, buf);
+
device_printf(sc->dev, "Firmware Version %s\n", &sc->fw_version[0]);
callout_reset(&sc->cxgb_tick_ch, CXGB_TICKS(sc), cxgb_tick, sc);
t3_add_attach_sysctls(sc);
@@ -934,7 +950,7 @@ cxgb_port_attach(device_t dev)
ifp->if_timer = 0; /* Disable ifnet watchdog */
ifp->if_watchdog = NULL;
- ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN;
+ ifp->if_snd.ifq_drv_maxlen = cxgb_snd_queue_len;
IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen);
IFQ_SET_READY(&ifp->if_snd);
OpenPOWER on IntegriCloud