1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-27 11:55:06 +00:00

Remove some dead code along with gratuitous differences between HEAD and 7

This commit is contained in:
Kip Macy 2008-09-16 01:02:17 +00:00
parent edc7005bc3
commit af9b081c37
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=183059
7 changed files with 13 additions and 49 deletions

View File

@ -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

View File

@ -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);

View File

@ -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);
}

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>