u_intNN_t -> uintNN_t
This commit is contained in:
parent
2933708c6a
commit
572ce0789f
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rtl8169.c,v 1.39 2006/10/20 15:44:00 tsutsui Exp $ */
|
||||
/* $NetBSD: rtl8169.c,v 1.40 2006/10/20 16:31:08 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997, 1998-2003
|
||||
@ -188,7 +188,7 @@ static int
|
||||
re_gmii_readreg(struct device *self, int phy, int reg)
|
||||
{
|
||||
struct rtk_softc *sc = (void *)self;
|
||||
u_int32_t rval;
|
||||
uint32_t rval;
|
||||
int i;
|
||||
|
||||
if (phy != 7)
|
||||
@ -223,7 +223,7 @@ static void
|
||||
re_gmii_writereg(struct device *dev, int phy __unused, int reg, int data)
|
||||
{
|
||||
struct rtk_softc *sc = (void *)dev;
|
||||
u_int32_t rval;
|
||||
uint32_t rval;
|
||||
int i;
|
||||
|
||||
CSR_WRITE_4(sc, RTK_PHYAR, (reg << 16) |
|
||||
@ -250,8 +250,8 @@ static int
|
||||
re_miibus_readreg(struct device *dev, int phy, int reg)
|
||||
{
|
||||
struct rtk_softc *sc = (void *)dev;
|
||||
u_int16_t rval = 0;
|
||||
u_int16_t re8139_reg = 0;
|
||||
uint16_t rval = 0;
|
||||
uint16_t re8139_reg = 0;
|
||||
int s;
|
||||
|
||||
s = splnet();
|
||||
@ -311,7 +311,7 @@ static void
|
||||
re_miibus_writereg(struct device *dev, int phy, int reg, int data)
|
||||
{
|
||||
struct rtk_softc *sc = (void *)dev;
|
||||
u_int16_t re8139_reg = 0;
|
||||
uint16_t re8139_reg = 0;
|
||||
int s;
|
||||
|
||||
s = splnet();
|
||||
@ -419,11 +419,11 @@ re_diag(struct rtk_softc *sc)
|
||||
struct ether_header *eh;
|
||||
struct rtk_desc *cur_rx;
|
||||
bus_dmamap_t dmamap;
|
||||
u_int16_t status;
|
||||
u_int32_t rxstat;
|
||||
uint16_t status;
|
||||
uint32_t rxstat;
|
||||
int total_len, i, s, error = 0;
|
||||
static const u_int8_t dst[] = { 0x00, 'h', 'e', 'l', 'l', 'o' };
|
||||
static const u_int8_t src[] = { 0x00, 'w', 'o', 'r', 'l', 'd' };
|
||||
static const uint8_t dst[] = { 0x00, 'h', 'e', 'l', 'l', 'o' };
|
||||
static const uint8_t src[] = { 0x00, 'w', 'o', 'r', 'l', 'd' };
|
||||
|
||||
/* Allocate a single mbuf */
|
||||
|
||||
@ -555,7 +555,7 @@ void
|
||||
re_attach(struct rtk_softc *sc)
|
||||
{
|
||||
u_char eaddr[ETHER_ADDR_LEN];
|
||||
u_int16_t val;
|
||||
uint16_t val;
|
||||
struct ifnet *ifp;
|
||||
int error = 0, i, addr_len;
|
||||
|
||||
@ -1017,7 +1017,7 @@ re_newbuf(struct rtk_softc *sc, int idx, struct mbuf *m)
|
||||
struct mbuf *n = NULL;
|
||||
bus_dmamap_t map;
|
||||
struct rtk_desc *d;
|
||||
u_int32_t cmdstat;
|
||||
uint32_t cmdstat;
|
||||
int error;
|
||||
|
||||
if (m == NULL) {
|
||||
@ -1134,7 +1134,7 @@ re_rxeof(struct rtk_softc *sc)
|
||||
struct ifnet *ifp;
|
||||
int i, total_len;
|
||||
struct rtk_desc *cur_rx;
|
||||
u_int32_t rxstat, rxvlan;
|
||||
uint32_t rxstat, rxvlan;
|
||||
|
||||
ifp = &sc->ethercom.ec_if;
|
||||
|
||||
@ -1305,7 +1305,7 @@ re_txeof(struct rtk_softc *sc)
|
||||
for (;;) {
|
||||
struct rtk_txq *txq = &sc->rtk_ldata.rtk_txq[idx];
|
||||
int descidx;
|
||||
u_int32_t txstat;
|
||||
uint32_t txstat;
|
||||
|
||||
if (txq->txq_mbuf == NULL) {
|
||||
KASSERT(idx == sc->rtk_ldata.rtk_txq_prodidx);
|
||||
@ -1415,7 +1415,7 @@ re_poll(struct ifnet *ifp, enum poll_cmd cmd, int count)
|
||||
(*ifp->if_start)(ifp);
|
||||
|
||||
if (cmd == POLL_AND_CHECK_STATUS) { /* also check status register */
|
||||
u_int16_t status;
|
||||
uint16_t status;
|
||||
|
||||
status = CSR_READ_2(sc, RTK_ISR);
|
||||
if (status == 0xffff)
|
||||
@ -1442,7 +1442,7 @@ re_intr(void *arg)
|
||||
{
|
||||
struct rtk_softc *sc = arg;
|
||||
struct ifnet *ifp;
|
||||
u_int16_t status;
|
||||
uint16_t status;
|
||||
int handled = 0;
|
||||
|
||||
ifp = &sc->ethercom.ec_if;
|
||||
@ -1515,7 +1515,7 @@ re_encap(struct rtk_softc *sc, struct mbuf *m, int *idx)
|
||||
struct m_tag *mtag;
|
||||
#endif
|
||||
struct rtk_desc *d;
|
||||
u_int32_t cmdstat, rtk_flags;
|
||||
uint32_t cmdstat, rtk_flags;
|
||||
struct rtk_txq *txq;
|
||||
|
||||
if (sc->rtk_ldata.rtk_tx_free <= 4) {
|
||||
@ -1530,7 +1530,7 @@ re_encap(struct rtk_softc *sc, struct mbuf *m, int *idx)
|
||||
*/
|
||||
|
||||
if ((m->m_pkthdr.csum_flags & M_CSUM_TSOv4) != 0) {
|
||||
u_int32_t segsz = m->m_pkthdr.segsz;
|
||||
uint32_t segsz = m->m_pkthdr.segsz;
|
||||
|
||||
rtk_flags = RTK_TDESC_CMD_LGSEND |
|
||||
(segsz << RTK_TDESC_CMD_MSSVAL_SHIFT);
|
||||
@ -1764,8 +1764,8 @@ static int
|
||||
re_init(struct ifnet *ifp)
|
||||
{
|
||||
struct rtk_softc *sc = ifp->if_softc;
|
||||
u_int32_t rxcfg = 0;
|
||||
u_int32_t reg;
|
||||
uint32_t rxcfg = 0;
|
||||
uint32_t reg;
|
||||
int error;
|
||||
|
||||
if ((error = re_enable(sc)) != 0)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rtl81x9reg.h,v 1.16 2006/10/20 11:30:54 tsutsui Exp $ */
|
||||
/* $NetBSD: rtl81x9reg.h,v 1.17 2006/10/20 16:31:08 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997, 1998
|
||||
@ -456,10 +456,10 @@
|
||||
*/
|
||||
|
||||
struct rtk_desc {
|
||||
volatile u_int32_t rtk_cmdstat;
|
||||
volatile u_int32_t rtk_vlanctl;
|
||||
volatile u_int32_t rtk_bufaddr_lo;
|
||||
volatile u_int32_t rtk_bufaddr_hi;
|
||||
volatile uint32_t rtk_cmdstat;
|
||||
volatile uint32_t rtk_vlanctl;
|
||||
volatile uint32_t rtk_bufaddr_lo;
|
||||
volatile uint32_t rtk_bufaddr_hi;
|
||||
};
|
||||
|
||||
#define RTK_TDESC_CMD_FRAGLEN 0x0000FFFF
|
||||
@ -536,22 +536,22 @@ struct rtk_desc {
|
||||
* Statistics counter structure (8139C+ and 8169 only)
|
||||
*/
|
||||
struct rtk_stats {
|
||||
u_int32_t rtk_tx_pkts_lo;
|
||||
u_int32_t rtk_tx_pkts_hi;
|
||||
u_int32_t rtk_tx_errs_lo;
|
||||
u_int32_t rtk_tx_errs_hi;
|
||||
u_int32_t rtk_tx_errs;
|
||||
u_int16_t rtk_missed_pkts;
|
||||
u_int16_t rtk_rx_framealign_errs;
|
||||
u_int32_t rtk_tx_onecoll;
|
||||
u_int32_t rtk_tx_multicolls;
|
||||
u_int32_t rtk_rx_ucasts_hi;
|
||||
u_int32_t rtk_rx_ucasts_lo;
|
||||
u_int32_t rtk_rx_bcasts_lo;
|
||||
u_int32_t rtk_rx_bcasts_hi;
|
||||
u_int32_t rtk_rx_mcasts;
|
||||
u_int16_t rtk_tx_aborts;
|
||||
u_int16_t rtk_rx_underruns;
|
||||
uint32_t rtk_tx_pkts_lo;
|
||||
uint32_t rtk_tx_pkts_hi;
|
||||
uint32_t rtk_tx_errs_lo;
|
||||
uint32_t rtk_tx_errs_hi;
|
||||
uint32_t rtk_tx_errs;
|
||||
uint16_t rtk_missed_pkts;
|
||||
uint16_t rtk_rx_framealign_errs;
|
||||
uint32_t rtk_tx_onecoll;
|
||||
uint32_t rtk_tx_multicolls;
|
||||
uint32_t rtk_rx_ucasts_hi;
|
||||
uint32_t rtk_rx_ucasts_lo;
|
||||
uint32_t rtk_rx_bcasts_lo;
|
||||
uint32_t rtk_rx_bcasts_hi;
|
||||
uint32_t rtk_rx_mcasts;
|
||||
uint16_t rtk_tx_aborts;
|
||||
uint16_t rtk_rx_underruns;
|
||||
};
|
||||
|
||||
#define RTK_RX_DESC_CNT 64
|
||||
@ -562,8 +562,8 @@ struct rtk_stats {
|
||||
#define RTK_IFQ_MAXLEN 512
|
||||
#define RTK_PKTSZ(x) ((x)/* >> 3*/)
|
||||
|
||||
#define RTK_ADDR_LO(y) ((u_int64_t) (y) & 0xFFFFFFFF)
|
||||
#define RTK_ADDR_HI(y) ((u_int64_t) (y) >> 32)
|
||||
#define RTK_ADDR_LO(y) ((uint64_t)(y) & 0xFFFFFFFF)
|
||||
#define RTK_ADDR_HI(y) ((uint64_t)(y) >> 32)
|
||||
|
||||
#define RTK_JUMBO_FRAMELEN 9018
|
||||
#define RTK_JUMBO_MTU (RTK_JUMBO_FRAMELEN-ETHER_HDR_LEN-ETHER_CRC_LEN)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rtl81x9var.h,v 1.23 2006/10/20 11:30:54 tsutsui Exp $ */
|
||||
/* $NetBSD: rtl81x9var.h,v 1.24 2006/10/20 16:31:09 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997, 1998
|
||||
@ -48,8 +48,8 @@
|
||||
#define RTK_RXSTAT_LEN 4
|
||||
|
||||
struct rtk_type {
|
||||
u_int16_t rtk_vid;
|
||||
u_int16_t rtk_did;
|
||||
uint16_t rtk_vid;
|
||||
uint16_t rtk_did;
|
||||
int rtk_basetype;
|
||||
const char *rtk_name;
|
||||
};
|
||||
@ -61,12 +61,12 @@ struct rtk_hwrev {
|
||||
};
|
||||
|
||||
struct rtk_mii_frame {
|
||||
u_int8_t mii_stdelim;
|
||||
u_int8_t mii_opcode;
|
||||
u_int8_t mii_phyaddr;
|
||||
u_int8_t mii_regaddr;
|
||||
u_int8_t mii_turnaround;
|
||||
u_int16_t mii_data;
|
||||
uint8_t mii_stdelim;
|
||||
uint8_t mii_opcode;
|
||||
uint8_t mii_phyaddr;
|
||||
uint8_t mii_regaddr;
|
||||
uint8_t mii_turnaround;
|
||||
uint16_t mii_data;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -147,7 +147,7 @@ struct rtk_softc {
|
||||
struct rtk_list_data rtk_ldata;
|
||||
struct mbuf *rtk_head;
|
||||
struct mbuf *rtk_tail;
|
||||
u_int32_t rtk_rxlenmask;
|
||||
uint32_t rtk_rxlenmask;
|
||||
int rtk_testmode;
|
||||
|
||||
int sc_flags; /* misc flags */
|
||||
@ -236,7 +236,7 @@ struct rtk_softc {
|
||||
#define RTK_PME_STATUS 0x8000
|
||||
|
||||
#ifdef _KERNEL
|
||||
u_int16_t rtk_read_eeprom(struct rtk_softc *, int, int);
|
||||
uint16_t rtk_read_eeprom(struct rtk_softc *, int, int);
|
||||
void rtk_setmulti(struct rtk_softc *);
|
||||
void rtk_attach(struct rtk_softc *);
|
||||
int rtk_detach(struct rtk_softc *);
|
||||
|
Loading…
Reference in New Issue
Block a user