From af9b081c37b1f5c690a554b4c9245f3410fb8a9d Mon Sep 17 00:00:00 2001 From: Kip Macy Date: Tue, 16 Sep 2008 01:02:17 +0000 Subject: [PATCH] Remove some dead code along with gratuitous differences between HEAD and 7 --- sys/dev/cxgb/cxgb_adapter.h | 6 +--- sys/dev/cxgb/cxgb_main.c | 38 ++++---------------------- sys/dev/cxgb/cxgb_sge.c | 14 +++++----- sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c | 1 - sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c | 1 - sys/dev/cxgb/ulp/tom/cxgb_ddp.c | 1 - sys/dev/cxgb/ulp/tom/cxgb_tom.c | 1 - 7 files changed, 13 insertions(+), 49 deletions(-) diff --git a/sys/dev/cxgb/cxgb_adapter.h b/sys/dev/cxgb/cxgb_adapter.h index e49a844eb092..736b6ce1a126 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 573c4c476d11..88986642a225 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<open_device_map | (1<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 05b96fe03528..729bb5fcde8b 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 36ea35f9e312..952a05b3e450 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 #include #include -#include #include #include #include diff --git a/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c b/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c index a62d9c4c6673..77350db8c3a3 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 #include #include -#include #include #include #include diff --git a/sys/dev/cxgb/ulp/tom/cxgb_ddp.c b/sys/dev/cxgb/ulp/tom/cxgb_ddp.c index 242b488332cc..fa2929eb5ef6 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 #include #include -#include #include #include #include diff --git a/sys/dev/cxgb/ulp/tom/cxgb_tom.c b/sys/dev/cxgb/ulp/tom/cxgb_tom.c index 32407882646e..9c0b012c5cf1 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 #include #include -#include #include #include #include