mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 19:08:58 +00:00
forward port signedness fixes from RELENG_6
fix compile error for case where MSI_SUPPORTED not defined Approved by: re (blanket)
This commit is contained in:
parent
ff038e3a82
commit
7aff6d8ed3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171868
@ -501,7 +501,7 @@ static struct port_type_info port_types[] = {
|
||||
#undef CAPS_10G
|
||||
|
||||
#define VPD_ENTRY(name, len) \
|
||||
u8 name##_kword[2]; u8 name##_len; u8 name##_data[len]
|
||||
u8 name##_kword[2]; u8 name##_len; char name##_data[len]
|
||||
|
||||
/*
|
||||
* Partial EEPROM Vital Product Data structure. Includes only the ID and
|
||||
|
@ -310,7 +310,7 @@ struct adapter {
|
||||
TAILQ_ENTRY(adapter) adapter_entry;
|
||||
|
||||
/* PCI register resources */
|
||||
uint32_t regs_rid;
|
||||
int regs_rid;
|
||||
struct resource *regs_res;
|
||||
bus_space_handle_t bh;
|
||||
bus_space_tag_t bt;
|
||||
|
@ -128,7 +128,7 @@ struct ch_hw_sched {
|
||||
int8_t channel;
|
||||
int32_t kbps; /* rate in Kbps */
|
||||
int32_t class_ipg; /* tenths of nanoseconds */
|
||||
int32_t flow_ipg; /* usec */
|
||||
uint32_t flow_ipg; /* usec */
|
||||
};
|
||||
|
||||
struct ch_filter_tuple {
|
||||
|
@ -37,8 +37,9 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/bus.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
#if __FreeBSD_version > 700000
|
||||
#include <sys/rwlock.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <sys/socketvar.h>
|
||||
@ -58,7 +59,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#define VLAN_NONE 0xfff
|
||||
#define SDL(s) ((struct sockaddr_dl *)s)
|
||||
#define RT_ENADDR(rt) ((char *)LLADDR(SDL((rt))))
|
||||
#define RT_ENADDR(rt) ((u_char *)LLADDR(SDL((rt))))
|
||||
#define rt_expire rt_rmx.rmx_expire
|
||||
|
||||
struct llinfo_arp {
|
||||
|
@ -33,7 +33,18 @@ $FreeBSD$
|
||||
|
||||
#include <dev/cxgb/ulp/toecore/toedev.h>
|
||||
#include <sys/lock.h>
|
||||
|
||||
#if __FreeBSD_version > 700000
|
||||
#include <sys/rwlock.h>
|
||||
#else
|
||||
#define rwlock mtx
|
||||
#define rw_wlock(x) mtx_lock((x))
|
||||
#define rw_wunlock(x) mtx_unlock((x))
|
||||
#define rw_rlock(x) mtx_lock((x))
|
||||
#define rw_runlock(x) mtx_unlock((x))
|
||||
#define rw_init(x, str) mtx_init((x), (str), NULL, MTX_DEF)
|
||||
#define rw_destroy(x) mtx_destroy((x))
|
||||
#endif
|
||||
|
||||
enum {
|
||||
L2T_STATE_VALID, /* entry is up to date */
|
||||
|
@ -384,10 +384,12 @@ cxgb_controller_attach(device_t dev)
|
||||
device_t child;
|
||||
const struct adapter_info *ai;
|
||||
struct adapter *sc;
|
||||
int i, reg, msi_needed, error = 0;
|
||||
int i, reg, error = 0;
|
||||
uint32_t vers;
|
||||
int port_qsets = 1;
|
||||
|
||||
#ifdef MSI_SUPPORTED
|
||||
int msi_needed;
|
||||
#endif
|
||||
sc = device_get_softc(dev);
|
||||
sc->dev = dev;
|
||||
sc->msi_count = 0;
|
||||
@ -935,6 +937,7 @@ cxgb_makedev(struct port_info *pi)
|
||||
/* Don't enable TSO6 yet */
|
||||
#define CXGB_CAP_ENABLE (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_JUMBO_MTU)
|
||||
#define IFCAP_TSO4 0x0
|
||||
#define IFCAP_TSO6 0x0
|
||||
#define CSUM_TSO 0x0
|
||||
#endif
|
||||
|
||||
@ -1038,7 +1041,7 @@ cxgb_port_attach(device_t dev)
|
||||
taskqueue_thread_enqueue, &p->tq);
|
||||
#else
|
||||
/* Create a port for handling TX without starvation */
|
||||
p->tq = taskqueue_create_fast(buf, M_NOWAIT,
|
||||
p->tq = taskqueue_create_fast(p->taskqbuf, M_NOWAIT,
|
||||
taskqueue_thread_enqueue, &p->tq);
|
||||
#endif
|
||||
|
||||
|
@ -596,7 +596,7 @@ cxgb_remove_tid(struct toedev *tdev, void *ctx, unsigned int tid)
|
||||
|
||||
BUG_ON(tid >= t->ntids);
|
||||
if (tdev->type == T3A)
|
||||
atomic_cmpset_ptr((long *)&t->tid_tab[tid].ctx, (long)NULL, (long)ctx);
|
||||
atomic_cmpset_ptr((uintptr_t *)&t->tid_tab[tid].ctx, (long)NULL, (long)ctx);
|
||||
else {
|
||||
struct mbuf *m;
|
||||
|
||||
|
@ -149,7 +149,7 @@ union active_open_entry {
|
||||
struct tid_info {
|
||||
struct toe_tid_entry *tid_tab;
|
||||
unsigned int ntids;
|
||||
volatile int tids_in_use;
|
||||
volatile unsigned int tids_in_use;
|
||||
|
||||
union listen_entry *stid_tab;
|
||||
unsigned int nstids;
|
||||
|
@ -1168,8 +1168,8 @@ t3_encap(struct port_info *p, struct mbuf **m)
|
||||
struct sge_txq *txq;
|
||||
struct tx_sw_desc *stx;
|
||||
struct txq_state txqs;
|
||||
unsigned int nsegs, ndesc, flits, cntrl, mlen;
|
||||
int err, tso_info = 0;
|
||||
unsigned int ndesc, flits, cntrl, mlen;
|
||||
int err, nsegs, tso_info = 0;
|
||||
|
||||
struct work_request_hdr *wrp;
|
||||
struct tx_sw_desc *txsd;
|
||||
@ -1212,7 +1212,7 @@ t3_encap(struct port_info *p, struct mbuf **m)
|
||||
struct cpl_tx_pkt_lso *hdr = (struct cpl_tx_pkt_lso *) cpl;
|
||||
struct ip *ip;
|
||||
struct tcphdr *tcp;
|
||||
uint8_t *pkthdr, tmp[TCPPKTHDRSIZE]; /* is this too large for the stack? */
|
||||
char *pkthdr, tmp[TCPPKTHDRSIZE]; /* is this too large for the stack? */
|
||||
|
||||
txd->flit[2] = 0;
|
||||
cntrl |= V_TXPKT_OPCODE(CPL_TX_PKT_LSO);
|
||||
@ -1222,7 +1222,7 @@ t3_encap(struct port_info *p, struct mbuf **m)
|
||||
pkthdr = &tmp[0];
|
||||
m_copydata(m0, 0, TCPPKTHDRSIZE, pkthdr);
|
||||
} else {
|
||||
pkthdr = mtod(m0, uint8_t *);
|
||||
pkthdr = mtod(m0, char *);
|
||||
}
|
||||
|
||||
if (__predict_false(m0->m_flags & M_VLANTAG)) {
|
||||
@ -1792,12 +1792,10 @@ calc_tx_descs_ofld(struct mbuf *m, unsigned int nsegs)
|
||||
static int
|
||||
ofld_xmit(adapter_t *adap, struct sge_txq *q, struct mbuf *m)
|
||||
{
|
||||
int ret;
|
||||
unsigned int pidx, gen, nsegs;
|
||||
unsigned int ndesc;
|
||||
unsigned int pidx, gen, ndesc;
|
||||
struct mbuf *m_vec[TX_CLEAN_MAX_DESC];
|
||||
bus_dma_segment_t segs[TX_MAX_SEGS];
|
||||
int i, cleaned;
|
||||
int i, cleaned, ret, nsegs;
|
||||
struct tx_sw_desc *stx = &q->sdesc[q->pidx];
|
||||
|
||||
mtx_lock(&q->lock);
|
||||
|
Loading…
Reference in New Issue
Block a user