summaryrefslogtreecommitdiffstats
path: root/sys/dev/cxgb/common
diff options
context:
space:
mode:
authornp <np@FreeBSD.org>2010-02-24 10:16:18 +0000
committernp <np@FreeBSD.org>2010-02-24 10:16:18 +0000
commitb48fc8c497b9a92d1d5af002e166f499313b7d1d (patch)
tree9215e006021e46958d3ecdd9019c514b61cd3a9f /sys/dev/cxgb/common
parent66381a9263e899c350aea8b45cdb9db918f8be85 (diff)
downloadFreeBSD-src-b48fc8c497b9a92d1d5af002e166f499313b7d1d.zip
FreeBSD-src-b48fc8c497b9a92d1d5af002e166f499313b7d1d.tar.gz
There is no need to test __FreeBSD_version for features that have
been around for a long time now (7.1-ish or even earlier); assume they are present. These includes MSI, TSO, LRO, VLAN, INTR_FILTERS, FIRMWARE, etc. Also, eliminate some dead code and clean up in other places as part of this quick once-over. MFC after: 1 week
Diffstat (limited to 'sys/dev/cxgb/common')
-rw-r--r--sys/dev/cxgb/common/cxgb_common.h8
-rw-r--r--sys/dev/cxgb/common/cxgb_t3_hw.c6
-rw-r--r--sys/dev/cxgb/common/cxgb_version.h41
3 files changed, 0 insertions, 55 deletions
diff --git a/sys/dev/cxgb/common/cxgb_common.h b/sys/dev/cxgb/common/cxgb_common.h
index 2f55e9f..1d325ae 100644
--- a/sys/dev/cxgb/common/cxgb_common.h
+++ b/sys/dev/cxgb/common/cxgb_common.h
@@ -392,11 +392,9 @@ struct adapter_params {
const struct adapter_info *info;
-#ifdef CONFIG_CHELSIO_T3_CORE
unsigned short mtus[NMTUS];
unsigned short a_wnd[NCCTRL_WIN];
unsigned short b_wnd[NCCTRL_WIN];
-#endif
unsigned int nports; /* # of ethernet ports */
unsigned int chan_map; /* bitmap of in-use Tx channels */
unsigned int stats_update_period; /* MAC stats accumulation period */
@@ -650,11 +648,7 @@ static inline int is_10G(const adapter_t *adap)
static inline int is_offload(const adapter_t *adap)
{
-#if defined(CONFIG_CHELSIO_T3_CORE)
return adap->params.offload;
-#else
- return 0;
-#endif
}
static inline unsigned int core_ticks_per_usec(const adapter_t *adap)
@@ -772,7 +766,6 @@ void t3_mc5_intr_handler(struct mc5 *mc5);
int t3_read_mc5_range(const struct mc5 *mc5, unsigned int start, unsigned int n,
u32 *buf);
-#ifdef CONFIG_CHELSIO_T3_CORE
int t3_tp_set_coalescing_size(adapter_t *adap, unsigned int size, int psh);
void t3_tp_set_max_rxsize(adapter_t *adap, unsigned int size);
void t3_tp_get_mib_stats(adapter_t *adap, struct tp_mib_stats *tps);
@@ -793,7 +786,6 @@ void t3_get_tx_sched(adapter_t *adap, unsigned int sched, unsigned int *kbps,
void t3_read_pace_tbl(adapter_t *adap, unsigned int pace_vals[NTX_SCHED]);
void t3_set_pace_tbl(adapter_t *adap, unsigned int *pace_vals,
unsigned int start, unsigned int n);
-#endif
int t3_get_up_la(adapter_t *adapter, u32 *stopped, u32 *index,
u32 *size, void *data);
diff --git a/sys/dev/cxgb/common/cxgb_t3_hw.c b/sys/dev/cxgb/common/cxgb_t3_hw.c
index 2c205ec..188e467 100644
--- a/sys/dev/cxgb/common/cxgb_t3_hw.c
+++ b/sys/dev/cxgb/common/cxgb_t3_hw.c
@@ -3263,7 +3263,6 @@ static void tp_set_timers(adapter_t *adap, unsigned int core_clk)
#undef SECONDS
}
-#ifdef CONFIG_CHELSIO_T3_CORE
/**
* t3_tp_set_coalescing_size - set receive coalescing size
* @adap: the adapter
@@ -3566,7 +3565,6 @@ int t3_set_proto_sram(adapter_t *adap, const u8 *data)
}
return 0;
}
-#endif
/**
* t3_config_trace_filter - configure one of the tracing filters
@@ -4150,14 +4148,12 @@ int t3_init_hw(adapter_t *adapter, u32 fw_params)
if (tp_init(adapter, &adapter->params.tp))
goto out_err;
-#ifdef CONFIG_CHELSIO_T3_CORE
t3_tp_set_coalescing_size(adapter,
min(adapter->params.sge.max_pkt_size,
MAX_RX_COALESCING_LEN), 1);
t3_tp_set_max_rxsize(adapter,
min(adapter->params.sge.max_pkt_size, 16384U));
ulp_config(adapter, &adapter->params.tp);
-#endif
if (is_pcie(adapter))
config_pcie(adapter);
else
@@ -4508,10 +4504,8 @@ int __devinit t3_prep_adapter(adapter_t *adapter,
adapter->params.mc5.nroutes = 0;
t3_mc5_prep(adapter, &adapter->mc5, MC5_MODE_144_BIT);
-#ifdef CONFIG_CHELSIO_T3_CORE
init_mtus(adapter->params.mtus);
init_cong_ctrl(adapter->params.a_wnd, adapter->params.b_wnd);
-#endif
}
early_hw_init(adapter, ai);
diff --git a/sys/dev/cxgb/common/cxgb_version.h b/sys/dev/cxgb/common/cxgb_version.h
deleted file mode 100644
index 3f4a652..0000000
--- a/sys/dev/cxgb/common/cxgb_version.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/**************************************************************************
-
-Copyright (c) 2007-2008, Chelsio Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Neither the name of the Chelsio Corporation nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
-$FreeBSD$
-
-***************************************************************************/
-/*
- * Note that although this driver doesn't contain all of the functionality of the Linux driver
- * the common code is 99% the same. Hence we keep the same version number to indicate what linux
- * driver the common code corresponds to.
- */
-#ifndef __CHELSIO_VERSION_H
-#define __CHELSIO_VERSION_H
-#define DRV_DESC "Chelsio T3 Network Driver"
-#define DRV_NAME "cxgb"
-#define DRV_VERSION "1.0.133"
-#endif
OpenPOWER on IntegriCloud