diff options
author | kmacy <kmacy@FreeBSD.org> | 2007-08-17 05:57:04 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2007-08-17 05:57:04 +0000 |
commit | c09acdcd0015e886fad167519a7eb1047e75d1e2 (patch) | |
tree | 925583de5d0e47ffdc6bd78f88de3f1e1ae83dc2 /sys | |
parent | b906b986a3da7a75d75997cccfb16700c9688488 (diff) | |
download | FreeBSD-src-c09acdcd0015e886fad167519a7eb1047e75d1e2.zip FreeBSD-src-c09acdcd0015e886fad167519a7eb1047e75d1e2.tar.gz |
forward port signedness fixes from RELENG_6
fix compile error for case where MSI_SUPPORTED not defined
Approved by: re (blanket)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/cxgb/common/cxgb_t3_hw.c | 2 | ||||
-rw-r--r-- | sys/dev/cxgb/cxgb_adapter.h | 2 | ||||
-rw-r--r-- | sys/dev/cxgb/cxgb_ioctl.h | 2 | ||||
-rw-r--r-- | sys/dev/cxgb/cxgb_l2t.c | 5 | ||||
-rw-r--r-- | sys/dev/cxgb/cxgb_l2t.h | 11 | ||||
-rw-r--r-- | sys/dev/cxgb/cxgb_main.c | 9 | ||||
-rw-r--r-- | sys/dev/cxgb/cxgb_offload.c | 2 | ||||
-rw-r--r-- | sys/dev/cxgb/cxgb_offload.h | 2 | ||||
-rw-r--r-- | sys/dev/cxgb/cxgb_sge.c | 14 |
9 files changed, 31 insertions, 18 deletions
diff --git a/sys/dev/cxgb/common/cxgb_t3_hw.c b/sys/dev/cxgb/common/cxgb_t3_hw.c index a8d9e11..69e0e83 100644 --- a/sys/dev/cxgb/common/cxgb_t3_hw.c +++ b/sys/dev/cxgb/common/cxgb_t3_hw.c @@ -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 diff --git a/sys/dev/cxgb/cxgb_adapter.h b/sys/dev/cxgb/cxgb_adapter.h index 6edef64..6605ea9 100644 --- a/sys/dev/cxgb/cxgb_adapter.h +++ b/sys/dev/cxgb/cxgb_adapter.h @@ -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; diff --git a/sys/dev/cxgb/cxgb_ioctl.h b/sys/dev/cxgb/cxgb_ioctl.h index 21d3cce..65deb44 100644 --- a/sys/dev/cxgb/cxgb_ioctl.h +++ b/sys/dev/cxgb/cxgb_ioctl.h @@ -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 { diff --git a/sys/dev/cxgb/cxgb_l2t.c b/sys/dev/cxgb/cxgb_l2t.c index 046132d..d4a40ba 100644 --- a/sys/dev/cxgb/cxgb_l2t.c +++ b/sys/dev/cxgb/cxgb_l2t.c @@ -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 { diff --git a/sys/dev/cxgb/cxgb_l2t.h b/sys/dev/cxgb/cxgb_l2t.h index a690c77..0944f62 100644 --- a/sys/dev/cxgb/cxgb_l2t.h +++ b/sys/dev/cxgb/cxgb_l2t.h @@ -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 */ diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c index f8cee4b..ef10aab 100644 --- a/sys/dev/cxgb/cxgb_main.c +++ b/sys/dev/cxgb/cxgb_main.c @@ -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 diff --git a/sys/dev/cxgb/cxgb_offload.c b/sys/dev/cxgb/cxgb_offload.c index 6356a94..991fb7e 100644 --- a/sys/dev/cxgb/cxgb_offload.c +++ b/sys/dev/cxgb/cxgb_offload.c @@ -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; diff --git a/sys/dev/cxgb/cxgb_offload.h b/sys/dev/cxgb/cxgb_offload.h index 131640a..62ecfa8 100644 --- a/sys/dev/cxgb/cxgb_offload.h +++ b/sys/dev/cxgb/cxgb_offload.h @@ -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; diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c index f3652e8..0a1d3ee 100644 --- a/sys/dev/cxgb/cxgb_sge.c +++ b/sys/dev/cxgb/cxgb_sge.c @@ -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); |