summaryrefslogtreecommitdiffstats
path: root/sys/dev/cxgb
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2008-09-16 01:02:17 +0000
committerkmacy <kmacy@FreeBSD.org>2008-09-16 01:02:17 +0000
commit5e985b386aa5a7c5ba46e3b4f869824800114a6e (patch)
treeeca3de1354b21bdb9ad876aef90e0c9b515bdd24 /sys/dev/cxgb
parent220bf33ae2eac6434b839f8f0e440da22fbca079 (diff)
downloadFreeBSD-src-5e985b386aa5a7c5ba46e3b4f869824800114a6e.zip
FreeBSD-src-5e985b386aa5a7c5ba46e3b4f869824800114a6e.tar.gz
Remove some dead code along with gratuitous differences between HEAD and 7
Diffstat (limited to 'sys/dev/cxgb')
-rw-r--r--sys/dev/cxgb/cxgb_adapter.h6
-rw-r--r--sys/dev/cxgb/cxgb_main.c38
-rw-r--r--sys/dev/cxgb/cxgb_sge.c14
-rw-r--r--sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c1
-rw-r--r--sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c1
-rw-r--r--sys/dev/cxgb/ulp/tom/cxgb_ddp.c1
-rw-r--r--sys/dev/cxgb/ulp/tom/cxgb_tom.c1
7 files changed, 13 insertions, 49 deletions
diff --git a/sys/dev/cxgb/cxgb_adapter.h b/sys/dev/cxgb/cxgb_adapter.h
index e49a844..736b6ce 100644
--- a/sys/dev/cxgb/cxgb_adapter.h
+++ b/sys/dev/cxgb/cxgb_adapter.h
@@ -1,6 +1,6 @@
/**************************************************************************
-Copyright (c) 2007, Chelsio Inc.
+Copyright (c) 2007-2008, Chelsio Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -150,11 +150,7 @@ enum { /* adapter flags */
#define FL_Q_SIZE 4096
-#ifdef __i386__
-#define JUMBO_Q_SIZE 256
-#else
#define JUMBO_Q_SIZE 1024
-#endif
#define RSPQ_Q_SIZE 1024
#define TX_ETH_Q_SIZE 1024
diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c
index 573c4c4..8898664 100644
--- a/sys/dev/cxgb/cxgb_main.c
+++ b/sys/dev/cxgb/cxgb_main.c
@@ -227,7 +227,7 @@ TUNABLE_INT("hw.cxgb.force_fw_update", &force_fw_update);
SYSCTL_UINT(_hw_cxgb, OID_AUTO, force_fw_update, CTLFLAG_RDTUN, &force_fw_update, 0,
"update firmware even if up to date");
-int cxgb_use_16k_clusters = 0;
+int cxgb_use_16k_clusters = 1;
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 ");
@@ -295,31 +295,6 @@ struct cxgb_ident {
static int set_eeprom(struct port_info *pi, const uint8_t *data, int len, int offset);
-void
-cxgb_log_tcb(struct adapter *sc, unsigned int tid)
-{
- char buf[TCB_SIZE];
- uint64_t *tcb = (uint64_t *)buf;
- int i, error;
- struct mc7 *mem = &sc->cm;
-
- error = t3_mc7_bd_read(mem, tid*TCB_SIZE/8, TCB_SIZE/8, tcb);
- if (error)
- printf("cxgb_tcb_log failed\n");
-
- CTR1(KTR_CXGB, "TCB tid=%u", tid);
- for (i = 0; i < TCB_SIZE / 32; i++) {
- CTR5(KTR_CXGB, "%1d: %08x %08x %08x %08x",
- i, (uint32_t)tcb[1], (uint32_t)(tcb[1] >> 32),
- (uint32_t)tcb[0], (uint32_t)(tcb[0] >> 32));
- tcb += 2;
- CTR4(KTR_CXGB, " %08x %08x %08x %08x",
- (uint32_t)tcb[1], (uint32_t)(tcb[1] >> 32),
- (uint32_t)tcb[0], (uint32_t)(tcb[0] >> 32));
- tcb += 2;
- }
-}
-
static __inline char
t3rev2char(struct adapter *adapter)
{
@@ -724,7 +699,7 @@ cxgb_free(struct adapter *sc)
printf("cxgb_free: DEVMAP_BIT not set\n");
} else
printf("not offloading set\n");
-#ifdef notyet
+#ifdef notyet
if (sc->flags & CXGB_OFLD_INIT)
cxgb_offload_deactivate(sc);
#endif
@@ -1730,21 +1705,18 @@ offload_open(struct port_info *pi)
{
struct adapter *adapter = pi->adapter;
struct t3cdev *tdev = &adapter->tdev;
-#ifdef notyet
- T3CDEV(pi->ifp);
-#endif
+
int adap_up = adapter->open_device_map & PORT_MASK;
int err = 0;
- CTR1(KTR_CXGB, "device_map=0x%x", adapter->open_device_map);
if (atomic_cmpset_int(&adapter->open_device_map,
(adapter->open_device_map & ~(1<<OFFLOAD_DEVMAP_BIT)),
(adapter->open_device_map | (1<<OFFLOAD_DEVMAP_BIT))) == 0)
return (0);
-
if (!isset(&adapter->open_device_map, OFFLOAD_DEVMAP_BIT))
- printf("offload_open: DEVMAP_BIT did not get set 0x%x\n", adapter->open_device_map);
+ printf("offload_open: DEVMAP_BIT did not get set 0x%x\n",
+ adapter->open_device_map);
ADAPTER_LOCK(pi->adapter);
if (!adap_up)
err = cxgb_up(adapter);
diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c
index 05b96fe..729bb5f 100644
--- a/sys/dev/cxgb/cxgb_sge.c
+++ b/sys/dev/cxgb/cxgb_sge.c
@@ -1,6 +1,6 @@
/**************************************************************************
-Copyright (c) 2007, Chelsio Inc.
+Copyright (c) 2007-2008, Chelsio Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -375,7 +375,7 @@ t3_sge_prep(adapter_t *adap, struct sge_params *p)
while (!powerof2(fl_q_size))
fl_q_size--;
-#if __FreeBSD_version > 800000
+#if __FreeBSD_version >= 700111
if (cxgb_use_16k_clusters)
jumbo_q_size = min(nmbjumbo16/(3*nqsets), JUMBO_Q_SIZE);
else
@@ -1388,8 +1388,11 @@ t3_encap(struct sge_qset *qs, struct mbuf **m, int count)
hdr->lso_info = htonl(tso_info);
if (__predict_false(mlen <= PIO_LEN)) {
- /* pkt not undersized but fits in PIO_LEN */
- printf("**5592 Fix** mbuf=%p,len=%d,tso_segsz=%d,csum_flags=%#x,flags=%#x",
+ /* pkt not undersized but fits in PIO_LEN
+ * Indicates a TSO bug
+ *
+ */
+ DPRINTF("**5592 Fix** mbuf=%p,len=%d,tso_segsz=%d,csum_flags=%#x,flags=%#x",
m0, mlen, m0->m_pkthdr.tso_segsz, m0->m_pkthdr.csum_flags, m0->m_flags);
txq_prod(txq, 1, &txqs);
m_copydata(m0, 0, mlen, (caddr_t)&txd->flit[3]);
@@ -2023,9 +2026,6 @@ calc_tx_descs_ofld(struct mbuf *m, unsigned int nsegs)
ndescs = flits_to_desc(flits + sgl_len(cnt));
- CTR4(KTR_CXGB, "flits=%d sgl_len=%d nsegs=%d ndescs=%d",
- flits, sgl_len(cnt), nsegs, ndescs);
-
return (ndescs);
}
diff --git a/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c b/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
index 36ea35f..952a05b 100644
--- a/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
+++ b/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
@@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$");
#include <sys/sockstate.h>
#include <sys/sockopt.h>
#include <sys/socket.h>
-#include <sys/socketvar.h>
#include <sys/sockbuf.h>
#include <sys/sysctl.h>
#include <sys/syslog.h>
diff --git a/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c b/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c
index a62d9c4..77350db 100644
--- a/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c
+++ b/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c
@@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
#include <sys/sockstate.h>
#include <sys/sockopt.h>
#include <sys/socket.h>
-#include <sys/socketvar.h>
#include <sys/sockbuf.h>
#include <sys/syslog.h>
#include <sys/uio.h>
diff --git a/sys/dev/cxgb/ulp/tom/cxgb_ddp.c b/sys/dev/cxgb/ulp/tom/cxgb_ddp.c
index 242b488..fa2929e 100644
--- a/sys/dev/cxgb/ulp/tom/cxgb_ddp.c
+++ b/sys/dev/cxgb/ulp/tom/cxgb_ddp.c
@@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
#include <sys/sockstate.h>
#include <sys/sockopt.h>
#include <sys/socket.h>
-#include <sys/socketvar.h>
#include <sys/sockbuf.h>
#include <sys/syslog.h>
#include <sys/uio.h>
diff --git a/sys/dev/cxgb/ulp/tom/cxgb_tom.c b/sys/dev/cxgb/ulp/tom/cxgb_tom.c
index 3240788..9c0b012 100644
--- a/sys/dev/cxgb/ulp/tom/cxgb_tom.c
+++ b/sys/dev/cxgb/ulp/tom/cxgb_tom.c
@@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$");
#include <sys/condvar.h>
#include <sys/mutex.h>
#include <sys/socket.h>
-#include <sys/socketvar.h>
#include <sys/sockopt.h>
#include <sys/sockstate.h>
#include <sys/sockbuf.h>
OpenPOWER on IntegriCloud