u_intNN_t -> uintNN_t

This commit is contained in:
tsutsui 2009-03-11 13:12:41 +00:00
parent aee82d7c52
commit b057550bcf
4 changed files with 117 additions and 117 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: i82557.c,v 1.126 2009/03/09 10:33:33 tsutsui Exp $ */
/* $NetBSD: i82557.c,v 1.127 2009/03/11 13:12:41 tsutsui Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc.
@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.126 2009/03/09 10:33:33 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.127 2009/03/11 13:12:41 tsutsui Exp $");
#include "bpfilter.h"
#include "rnd.h"
@ -135,7 +135,7 @@ __KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.126 2009/03/09 10:33:33 tsutsui Exp $")
*
* See the definition of struct fxp_cb_config for the bit definitions.
*/
const u_int8_t fxp_cb_config_template[] = {
const uint8_t fxp_cb_config_template[] = {
0x0, 0x0, /* cb_status */
0x0, 0x0, /* cb_command */
0x0, 0x0, 0x0, 0x0, /* link_addr */
@ -198,10 +198,10 @@ int fxp_mdi_read(device_t, int, int);
void fxp_statchg(device_t);
void fxp_mdi_write(device_t, int, int, int);
void fxp_autosize_eeprom(struct fxp_softc*);
void fxp_read_eeprom(struct fxp_softc *, u_int16_t *, int, int);
void fxp_write_eeprom(struct fxp_softc *, u_int16_t *, int, int);
void fxp_read_eeprom(struct fxp_softc *, uint16_t *, int, int);
void fxp_write_eeprom(struct fxp_softc *, uint16_t *, int, int);
void fxp_eeprom_update_cksum(struct fxp_softc *);
void fxp_get_info(struct fxp_softc *, u_int8_t *);
void fxp_get_info(struct fxp_softc *, uint8_t *);
void fxp_tick(void *);
void fxp_mc_setup(struct fxp_softc *);
void fxp_load_ucode(struct fxp_softc *);
@ -249,7 +249,7 @@ fxp_scb_wait(struct fxp_softc *sc)
* Submit a command to the i82557.
*/
static inline void
fxp_scb_cmd(struct fxp_softc *sc, u_int8_t cmd)
fxp_scb_cmd(struct fxp_softc *sc, uint8_t cmd)
{
CSR_WRITE_1(sc, FXP_CSR_SCB_COMMAND, cmd);
@ -261,7 +261,7 @@ fxp_scb_cmd(struct fxp_softc *sc, u_int8_t cmd)
void
fxp_attach(struct fxp_softc *sc)
{
u_int8_t enaddr[ETHER_ADDR_LEN];
uint8_t enaddr[ETHER_ADDR_LEN];
struct ifnet *ifp;
bus_dma_segment_t seg;
int rseg, i, error;
@ -520,9 +520,9 @@ fxp_80c24_initmedia(struct fxp_softc *sc)
* Initialize the interface media.
*/
void
fxp_get_info(struct fxp_softc *sc, u_int8_t *enaddr)
fxp_get_info(struct fxp_softc *sc, uint8_t *enaddr)
{
u_int16_t data, myea[ETHER_ADDR_LEN / 2];
uint16_t data, myea[ETHER_ADDR_LEN / 2];
/*
* Reset to a stable state.
@ -698,9 +698,9 @@ fxp_autosize_eeprom(struct fxp_softc *sc)
* every 16 bits of data.
*/
void
fxp_read_eeprom(struct fxp_softc *sc, u_int16_t *data, int offset, int words)
fxp_read_eeprom(struct fxp_softc *sc, uint16_t *data, int offset, int words)
{
u_int16_t reg;
uint16_t reg;
int i, x;
for (i = 0; i < words; i++) {
@ -735,7 +735,7 @@ fxp_read_eeprom(struct fxp_softc *sc, u_int16_t *data, int offset, int words)
* Write data to the serial EEPROM.
*/
void
fxp_write_eeprom(struct fxp_softc *sc, u_int16_t *data, int offset, int words)
fxp_write_eeprom(struct fxp_softc *sc, uint16_t *data, int offset, int words)
{
int i, j;
@ -1084,7 +1084,7 @@ fxp_intr(void *arg)
struct ifnet *ifp = &sc->sc_ethercom.ec_if;
bus_dmamap_t rxmap;
int claimed = 0, rnr;
u_int8_t statack;
uint8_t statack;
if (!device_is_active(sc->sc_dev) || sc->sc_enabled == 0)
return (0);
@ -1172,7 +1172,7 @@ fxp_txintr(struct fxp_softc *sc)
struct fxp_txdesc *txd;
struct fxp_txsoft *txs;
int i;
u_int16_t txstat;
uint16_t txstat;
ifp->if_flags &= ~IFF_OACTIVE;
for (i = sc->sc_txdirty; sc->sc_txpending != 0;
@ -1354,7 +1354,7 @@ fxp_rxintr(struct fxp_softc *sc)
bus_dmamap_t rxmap;
struct fxp_rfa *rfa;
int rnr;
u_int16_t len, rxstat;
uint16_t len, rxstat;
rnr = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: i82557reg.h,v 1.22 2009/02/20 05:49:34 mrg Exp $ */
/* $NetBSD: i82557reg.h,v 1.23 2009/03/11 13:12:41 tsutsui Exp $ */
/*-
* Copyright (c) 1998, 1999, 2001 The NetBSD Foundation, Inc.
@ -80,7 +80,7 @@
/*
* FOR REFERENCE ONLY, the old definition of FXP_CSR_SCB_RUSCUS:
*
* volatile u_int8_t :2,
* volatile uint8_t :2,
* scb_rus:4,
* scb_cus:2;
*/
@ -145,19 +145,19 @@
* NOP command.
*/
struct fxp_cb_nop {
volatile u_int16_t cb_status;
volatile u_int16_t cb_command;
volatile u_int32_t link_addr;
volatile uint16_t cb_status;
volatile uint16_t cb_command;
volatile uint32_t link_addr;
};
/*
* Individual Address command.
*/
struct fxp_cb_ias {
volatile u_int16_t cb_status;
volatile u_int16_t cb_command;
volatile u_int32_t link_addr;
u_int8_t macaddr[6];
volatile uint16_t cb_status;
volatile uint16_t cb_command;
volatile uint32_t link_addr;
uint8_t macaddr[6];
};
#if BYTE_ORDER == LITTLE_ENDIAN
@ -182,26 +182,26 @@ struct fxp_cb_ias {
* Configure command.
*/
struct fxp_cb_config {
volatile u_int16_t cb_status;
volatile u_int16_t cb_command;
volatile u_int32_t link_addr;
volatile uint16_t cb_status;
volatile uint16_t cb_command;
volatile uint32_t link_addr;
/* Bytes 0 - 21 -- common to all i8255x */
/*0*/ volatile u_int8_t __FXP_BITFIELD2(byte_count:6, :2);
/*1*/ volatile u_int8_t __FXP_BITFIELD3(rx_fifo_limit:4,
/*0*/ volatile uint8_t __FXP_BITFIELD2(byte_count:6, :2);
/*1*/ volatile uint8_t __FXP_BITFIELD3(rx_fifo_limit:4,
tx_fifo_limit:3,
:1);
/*2*/ volatile u_int8_t adaptive_ifs;
/*3*/ volatile u_int8_t __FXP_BITFIELD5(mwi_enable:1, /* 8,9 */
/*2*/ volatile uint8_t adaptive_ifs;
/*3*/ volatile uint8_t __FXP_BITFIELD5(mwi_enable:1, /* 8,9 */
type_enable:1, /* 8,9 */
read_align_en:1, /* 8,9 */
end_wr_on_cl:1, /* 8,9 */
:4);
/*4*/ volatile u_int8_t __FXP_BITFIELD2(rx_dma_bytecount:7,
/*4*/ volatile uint8_t __FXP_BITFIELD2(rx_dma_bytecount:7,
:1);
/*5*/ volatile u_int8_t __FXP_BITFIELD2(tx_dma_bytecount:7,
/*5*/ volatile uint8_t __FXP_BITFIELD2(tx_dma_bytecount:7,
dma_mbce:1);
/*6*/ volatile u_int8_t __FXP_BITFIELD8(late_scb:1, /* 7 */
/*6*/ volatile uint8_t __FXP_BITFIELD8(late_scb:1, /* 7 */
direct_dma_dis:1, /* 8,9 */
tno_int_or_tco_en:1, /* 7,9 */
ci_int:1,
@ -209,33 +209,33 @@ struct fxp_cb_config {
ext_stats_dis:1, /* 8,9 */
keep_overrun_rx:1,
save_bf:1);
/*7*/ volatile u_int8_t __FXP_BITFIELD6(disc_short_rx:1,
/*7*/ volatile uint8_t __FXP_BITFIELD6(disc_short_rx:1,
underrun_retry:2,
:2,
ext_rfa:1, /* 0 */
two_frames:1, /* 8,9 */
dyn_tbd:1); /* 8,9 */
/*8*/ volatile u_int8_t __FXP_BITFIELD3(mediatype:1, /* 7 */
/*8*/ volatile uint8_t __FXP_BITFIELD3(mediatype:1, /* 7 */
:6,
csma_dis:1); /* 8,9 */
/*9*/ volatile u_int8_t __FXP_BITFIELD6(tcp_udp_cksum:1,/* 9 */
/*9*/ volatile uint8_t __FXP_BITFIELD6(tcp_udp_cksum:1,/* 9 */
:3,
vlan_tco:1, /* 8,9 */
link_wake_en:1, /* 8,9 */
arp_wake_en:1, /* 8 */
mc_wake_en:1); /* 8 */
/*10*/ volatile u_int8_t __FXP_BITFIELD4(:3,
/*10*/ volatile uint8_t __FXP_BITFIELD4(:3,
nsai:1,
preamble_length:2,
loopback:2);
/*11*/ volatile u_int8_t __FXP_BITFIELD2(linear_priority:3,/* 7 */
/*11*/ volatile uint8_t __FXP_BITFIELD2(linear_priority:3,/* 7 */
:5);
/*12*/ volatile u_int8_t __FXP_BITFIELD3(linear_pri_mode:1,/* 7 */
/*12*/ volatile uint8_t __FXP_BITFIELD3(linear_pri_mode:1,/* 7 */
:3,
interfrm_spacing:4);
/*13*/ volatile u_int8_t :8;
/*14*/ volatile u_int8_t :8;
/*15*/ volatile u_int8_t __FXP_BITFIELD8(promiscuous:1,
/*13*/ volatile uint8_t :8;
/*14*/ volatile uint8_t :8;
/*15*/ volatile uint8_t __FXP_BITFIELD8(promiscuous:1,
bcast_disable:1,
wait_after_win:1, /* 8,9 */
:1,
@ -243,15 +243,15 @@ struct fxp_cb_config {
crc16_en:1, /* 9 */
:1,
crscdt:1);
/*16*/ volatile u_int8_t fc_delay_lsb:8; /* 8,9 */
/*17*/ volatile u_int8_t fc_delay_msb:8; /* 8,9 */
/*18*/ volatile u_int8_t __FXP_BITFIELD6(stripping:1,
/*16*/ volatile uint8_t fc_delay_lsb:8; /* 8,9 */
/*17*/ volatile uint8_t fc_delay_msb:8; /* 8,9 */
/*18*/ volatile uint8_t __FXP_BITFIELD6(stripping:1,
padding:1,
rcv_crc_xfer:1,
long_rx_en:1, /* 8,9 */
pri_fc_thresh:3, /* 8,9 */
:1);
/*19*/ volatile u_int8_t __FXP_BITFIELD8(ia_wake_en:1, /* 8 */
/*19*/ volatile uint8_t __FXP_BITFIELD8(ia_wake_en:1, /* 8 */
magic_pkt_dis:1, /* 8,9,!9ER */
tx_fc_dis:1, /* 8,9 */
rx_fc_restop:1, /* 8,9 */
@ -259,17 +259,17 @@ struct fxp_cb_config {
fc_filter:1, /* 8,9 */
force_fdx:1,
fdx_pin_en:1);
/*20*/ volatile u_int8_t __FXP_BITFIELD4(:5,
/*20*/ volatile uint8_t __FXP_BITFIELD4(:5,
pri_fc_loc:1 /* 8,9 */,
multi_ia:1,
:1);
/*21*/ volatile u_int8_t __FXP_BITFIELD3(:3, mc_all:1, :4);
/*21*/ volatile uint8_t __FXP_BITFIELD3(:3, mc_all:1, :4);
/* Bytes 22 - 31 -- i82550 only */
/*22*/ volatile u_int8_t __FXP_BITFIELD3(ext_rx_mode:1,
/*22*/ volatile uint8_t __FXP_BITFIELD3(ext_rx_mode:1,
vlan_drop_en:1,
:6);
volatile u_int8_t reserved[9];
volatile uint8_t reserved[9];
};
#define FXP_CONFIG_LEN 22 /* i8255x */
@ -280,19 +280,19 @@ struct fxp_cb_config {
*/
#define MAXMCADDR 80
struct fxp_cb_mcs {
volatile u_int16_t cb_status;
volatile u_int16_t cb_command;
volatile u_int32_t link_addr;
volatile u_int16_t mc_cnt;
u_int8_t mc_addr[MAXMCADDR][6];
volatile uint16_t cb_status;
volatile uint16_t cb_command;
volatile uint32_t link_addr;
volatile uint16_t mc_cnt;
uint8_t mc_addr[MAXMCADDR][6];
};
#define MAXUCODESIZE 192
struct fxp_cb_ucode {
volatile u_int16_t cb_status;
volatile u_int16_t cb_command;
volatile u_int32_t link_addr;
u_int32_t ucode[MAXUCODESIZE];
volatile uint16_t cb_status;
volatile uint16_t cb_command;
volatile uint32_t link_addr;
uint32_t ucode[MAXUCODESIZE];
};
struct fxp_ipcb {
@ -307,12 +307,12 @@ struct fxp_ipcb {
* in the TBD array. This means we only have to define
* 8 extra bytes here.
*/
volatile u_int16_t ipcb_schedule_low;
volatile u_int8_t ipcb_ip_schedule;
volatile u_int8_t ipcb_ip_activation_high;
volatile u_int16_t ipcb_vlan_id;
volatile u_int8_t ipcb_ip_header_offset;
volatile u_int8_t ipcb_tcp_header_offset;
volatile uint16_t ipcb_schedule_low;
volatile uint8_t ipcb_ip_schedule;
volatile uint8_t ipcb_ip_activation_high;
volatile uint16_t ipcb_vlan_id;
volatile uint8_t ipcb_ip_header_offset;
volatile uint8_t ipcb_tcp_header_offset;
};
/*
@ -339,13 +339,13 @@ struct fxp_ipcb {
* Transmit command.
*/
struct fxp_cb_tx {
volatile u_int16_t cb_status;
volatile u_int16_t cb_command;
volatile u_int32_t link_addr;
volatile u_int32_t tbd_array_addr;
volatile u_int16_t byte_count;
volatile u_int8_t tx_threshold;
volatile u_int8_t tbd_number;
volatile uint16_t cb_status;
volatile uint16_t cb_command;
volatile uint32_t link_addr;
volatile uint32_t tbd_array_addr;
volatile uint16_t byte_count;
volatile uint8_t tx_threshold;
volatile uint8_t tbd_number;
/*
* If using the extended TxCB feature, there is a
* two TBDs right here. We handle this in the
@ -357,8 +357,8 @@ struct fxp_cb_tx {
* Transmit buffer descriptors.
*/
struct fxp_tbd {
volatile u_int32_t tb_addr;
volatile u_int32_t tb_size;
volatile uint32_t tb_addr;
volatile uint32_t tb_size;
};
/*
@ -397,21 +397,21 @@ struct fxp_tbd {
*/
struct fxp_rfa {
/* Fields common to all i8255x chips. */
volatile u_int16_t rfa_status;
volatile u_int16_t rfa_control;
volatile u_int8_t link_addr[4];
volatile u_int8_t rbd_addr[4];
volatile u_int16_t actual_size;
volatile u_int16_t size;
volatile uint16_t rfa_status;
volatile uint16_t rfa_control;
volatile uint8_t link_addr[4];
volatile uint8_t rbd_addr[4];
volatile uint16_t actual_size;
volatile uint16_t size;
/* Fields available only on the i82550/i82551 in extended RFD mode. */
volatile u_int16_t vlan_id;
volatile u_int8_t rx_parse_stat;
volatile u_int8_t reserved;
volatile u_int16_t security_stat;
volatile u_int8_t cksum_stat;
volatile u_int8_t zerocopy_stat;
volatile u_int8_t unused[8];
volatile uint16_t vlan_id;
volatile uint8_t rx_parse_stat;
volatile uint8_t reserved;
volatile uint16_t security_stat;
volatile uint8_t cksum_stat;
volatile uint8_t zerocopy_stat;
volatile uint8_t unused[8];
};
#define RFA_SIZE 16
@ -454,29 +454,29 @@ struct fxp_rfa {
* Statistics dump area definitions
*/
struct fxp_stats {
volatile u_int32_t tx_good;
volatile u_int32_t tx_maxcols;
volatile u_int32_t tx_latecols;
volatile u_int32_t tx_underruns;
volatile u_int32_t tx_lostcrs;
volatile u_int32_t tx_deferred;
volatile u_int32_t tx_single_collisions;
volatile u_int32_t tx_multiple_collisions;
volatile u_int32_t tx_total_collisions;
volatile u_int32_t rx_good;
volatile u_int32_t rx_crc_errors;
volatile u_int32_t rx_alignment_errors;
volatile u_int32_t rx_rnr_errors;
volatile u_int32_t rx_overrun_errors;
volatile u_int32_t rx_cdt_errors;
volatile u_int32_t rx_shortframes;
volatile u_int32_t tx_pauseframes;
volatile uint32_t tx_good;
volatile uint32_t tx_maxcols;
volatile uint32_t tx_latecols;
volatile uint32_t tx_underruns;
volatile uint32_t tx_lostcrs;
volatile uint32_t tx_deferred;
volatile uint32_t tx_single_collisions;
volatile uint32_t tx_multiple_collisions;
volatile uint32_t tx_total_collisions;
volatile uint32_t rx_good;
volatile uint32_t rx_crc_errors;
volatile uint32_t rx_alignment_errors;
volatile uint32_t rx_rnr_errors;
volatile uint32_t rx_overrun_errors;
volatile uint32_t rx_cdt_errors;
volatile uint32_t rx_shortframes;
volatile uint32_t tx_pauseframes;
#define completion_status tx_pauseframes
volatile u_int32_t rx_pauseframes;
volatile u_int32_t rx_unsupportedframes;
volatile u_int32_t tx_tco_frames;
volatile u_int32_t rx_tco_frames;
volatile u_int32_t ext_completion_status;
volatile uint32_t rx_pauseframes;
volatile uint32_t rx_unsupportedframes;
volatile uint32_t tx_tco_frames;
volatile uint32_t rx_tco_frames;
volatile uint32_t ext_completion_status;
};
#define FXP_STATS_DUMP_COMPLETE 0xa005
#define FXP_STATS_DR_COMPLETE 0xa007

View File

@ -1,4 +1,4 @@
/* $NetBSD: i82557var.h,v 1.44 2009/03/07 15:03:25 tsutsui Exp $ */
/* $NetBSD: i82557var.h,v 1.45 2009/03/11 13:12:41 tsutsui Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999, 2001 The NetBSD Foundation, Inc.
@ -191,7 +191,7 @@ struct fxp_softc {
bus_dmamap_t sc_rxmaps[FXP_NRFABUFS]; /* free receive buffer DMA maps */
int sc_rxfree; /* free map index */
int sc_rxidle; /* # of seconds RX has been idle */
u_int16_t sc_txcmd; /* transmit command (LITTLE ENDIAN) */
uint16_t sc_txcmd; /* transmit command (LITTLE ENDIAN) */
/*
* Control data structures.
@ -308,7 +308,7 @@ do { \
bus_dmamap_t __rxmap = M_GETCTX((m), bus_dmamap_t); \
struct mbuf *__p_m; \
struct fxp_rfa *__rfa, *__p_rfa; \
u_int32_t __v; \
uint32_t __v; \
\
(m)->m_data = (m)->m_ext.ext_buf + (sc)->sc_rfa_size + \
RFA_ALIGNMENT_FUDGE; \

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_fxp_pci.c,v 1.65 2009/03/07 15:03:25 tsutsui Exp $ */
/* $NetBSD: if_fxp_pci.c,v 1.66 2009/03/11 13:12:41 tsutsui Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_fxp_pci.c,v 1.65 2009/03/07 15:03:25 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_fxp_pci.c,v 1.66 2009/03/11 13:12:41 tsutsui Exp $");
#include "rnd.h"
@ -98,7 +98,7 @@ CFATTACH_DECL_NEW(fxp_pci, sizeof(struct fxp_pci_softc),
fxp_pci_match, fxp_pci_attach, NULL, NULL);
static const struct fxp_pci_product {
u_int32_t fpp_prodid; /* PCI product ID */
uint32_t fpp_prodid; /* PCI product ID */
const char *fpp_name; /* device name */
} fxp_pci_products[] = {
{ PCI_PRODUCT_INTEL_82557,