Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci u_int{8, 16, 32, 64}_t -> uint{8, 16, 32, 64}_t. No fu...
details: https://anonhg.NetBSD.org/src/rev/508e17201ed2
branches: trunk
changeset: 838235:508e17201ed2
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue Jan 08 04:13:27 2019 +0000
description:
u_int{8,16,32,64}_t -> uint{8,16,32,64}_t. No functional change.
diffstat:
sys/dev/pci/if_sk.c | 118 ++++++++++++++++++++++++++--------------------------
1 files changed, 59 insertions(+), 59 deletions(-)
diffs (truncated from 403 to 300 lines):
diff -r aad89f85e7a8 -r 508e17201ed2 sys/dev/pci/if_sk.c
--- a/sys/dev/pci/if_sk.c Tue Jan 08 03:14:51 2019 +0000
+++ b/sys/dev/pci/if_sk.c Tue Jan 08 04:13:27 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_sk.c,v 1.90 2018/11/15 10:56:29 maxv Exp $ */
+/* $NetBSD: if_sk.c,v 1.91 2019/01/08 04:13:27 msaitoh Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -115,7 +115,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_sk.c,v 1.90 2018/11/15 10:56:29 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_sk.c,v 1.91 2019/01/08 04:13:27 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -164,7 +164,7 @@
void sk_intr_yukon(struct sk_if_softc *);
void sk_rxeof(struct sk_if_softc *);
void sk_txeof(struct sk_if_softc *);
-int sk_encap(struct sk_if_softc *, struct mbuf *, u_int32_t *);
+int sk_encap(struct sk_if_softc *, struct mbuf *, uint32_t *);
void sk_start(struct ifnet *);
int sk_ioctl(struct ifnet *, u_long, void *);
int sk_init(struct ifnet *);
@@ -182,7 +182,7 @@
void sk_jfree(struct mbuf *, void *, size_t, void *);
int sk_init_rx_ring(struct sk_if_softc *);
int sk_init_tx_ring(struct sk_if_softc *);
-u_int8_t sk_vpd_readbyte(struct sk_softc *, int);
+uint8_t sk_vpd_readbyte(struct sk_softc *, int);
void sk_vpd_read_res(struct sk_softc *,
struct vpd_res *, int);
void sk_vpd_read(struct sk_softc *);
@@ -197,8 +197,8 @@
void sk_marv_miibus_writereg(device_t, int, int, int);
void sk_marv_miibus_statchg(struct ifnet *);
-u_int32_t sk_xmac_hash(void *);
-u_int32_t sk_yukon_hash(void *);
+uint32_t sk_xmac_hash(void *);
+uint32_t sk_yukon_hash(void *);
void sk_setfilt(struct sk_if_softc *, void *, int);
void sk_setmulti(struct sk_if_softc *);
void sk_tick(void *);
@@ -243,8 +243,8 @@
#define SK_LINKSYS_EG1032_SUBID 0x00151737
-static inline u_int32_t
-sk_win_read_4(struct sk_softc *sc, u_int32_t reg)
+static inline uint32_t
+sk_win_read_4(struct sk_softc *sc, uint32_t reg)
{
#ifdef SK_USEIOSPACE
CSR_WRITE_4(sc, SK_RAP, SK_WIN(reg));
@@ -254,8 +254,8 @@
#endif
}
-static inline u_int16_t
-sk_win_read_2(struct sk_softc *sc, u_int32_t reg)
+static inline uint16_t
+sk_win_read_2(struct sk_softc *sc, uint32_t reg)
{
#ifdef SK_USEIOSPACE
CSR_WRITE_4(sc, SK_RAP, SK_WIN(reg));
@@ -265,8 +265,8 @@
#endif
}
-static inline u_int8_t
-sk_win_read_1(struct sk_softc *sc, u_int32_t reg)
+static inline uint8_t
+sk_win_read_1(struct sk_softc *sc, uint32_t reg)
{
#ifdef SK_USEIOSPACE
CSR_WRITE_4(sc, SK_RAP, SK_WIN(reg));
@@ -277,7 +277,7 @@
}
static inline void
-sk_win_write_4(struct sk_softc *sc, u_int32_t reg, u_int32_t x)
+sk_win_write_4(struct sk_softc *sc, uint32_t reg, uint32_t x)
{
#ifdef SK_USEIOSPACE
CSR_WRITE_4(sc, SK_RAP, SK_WIN(reg));
@@ -288,7 +288,7 @@
}
static inline void
-sk_win_write_2(struct sk_softc *sc, u_int32_t reg, u_int16_t x)
+sk_win_write_2(struct sk_softc *sc, uint32_t reg, uint16_t x)
{
#ifdef SK_USEIOSPACE
CSR_WRITE_4(sc, SK_RAP, SK_WIN(reg));
@@ -299,7 +299,7 @@
}
static inline void
-sk_win_write_1(struct sk_softc *sc, u_int32_t reg, u_int8_t x)
+sk_win_write_1(struct sk_softc *sc, uint32_t reg, uint8_t x)
{
#ifdef SK_USEIOSPACE
CSR_WRITE_4(sc, SK_RAP, SK_WIN(reg));
@@ -320,7 +320,7 @@
* the controller softc structure for later use. At the moment,
* we only use the ID string during sk_attach().
*/
-u_int8_t
+uint8_t
sk_vpd_readbyte(struct sk_softc *sc, int addr)
{
int i;
@@ -343,9 +343,9 @@
sk_vpd_read_res(struct sk_softc *sc, struct vpd_res *res, int addr)
{
int i;
- u_int8_t *ptr;
-
- ptr = (u_int8_t *)res;
+ uint8_t *ptr;
+
+ ptr = (uint8_t *)res;
for (i = 0; i < sizeof(struct vpd_res); i++)
ptr[i] = sk_vpd_readbyte(sc, i + addr);
}
@@ -483,7 +483,7 @@
sk_marv_miibus_readreg(device_t dev, int phy, int reg)
{
struct sk_if_softc *sc_if = device_private(dev);
- u_int16_t val;
+ uint16_t val;
int i;
if (phy != 0 ||
@@ -552,10 +552,10 @@
YUKON_GPCR)));
}
-u_int32_t
+uint32_t
sk_xmac_hash(void *addr)
{
- u_int32_t crc;
+ uint32_t crc;
crc = ether_crc32_le(addr,ETHER_ADDR_LEN);
crc = ~crc & ((1<< SK_HASH_BITS) - 1);
@@ -563,10 +563,10 @@
return crc;
}
-u_int32_t
+uint32_t
sk_yukon_hash(void *addr)
{
- u_int32_t crc;
+ uint32_t crc;
crc = ether_crc32_be(addr,ETHER_ADDR_LEN);
crc &= ((1 << SK_HASH_BITS) - 1);
@@ -580,9 +580,9 @@
char *addr = addrv;
int base = XM_RXFILT_ENTRY(slot);
- SK_XM_WRITE_2(sc_if, base, *(u_int16_t *)(&addr[0]));
- SK_XM_WRITE_2(sc_if, base + 2, *(u_int16_t *)(&addr[2]));
- SK_XM_WRITE_2(sc_if, base + 4, *(u_int16_t *)(&addr[4]));
+ SK_XM_WRITE_2(sc_if, base, *(uint16_t *)(&addr[0]));
+ SK_XM_WRITE_2(sc_if, base + 2, *(uint16_t *)(&addr[2]));
+ SK_XM_WRITE_2(sc_if, base + 4, *(uint16_t *)(&addr[4]));
}
void
@@ -590,12 +590,12 @@
{
struct sk_softc *sc = sc_if->sk_softc;
struct ifnet *ifp= &sc_if->sk_ethercom.ec_if;
- u_int32_t hashes[2] = { 0, 0 };
+ uint32_t hashes[2] = { 0, 0 };
int h = 0, i;
struct ethercom *ec = &sc_if->sk_ethercom;
struct ether_multi *enm;
struct ether_multistep step;
- u_int8_t dummy[] = { 0, 0, 0, 0, 0 ,0 };
+ uint8_t dummy[] = { 0, 0, 0, 0, 0 ,0 };
/* First, zot all the existing filters. */
switch (sc->sk_type) {
@@ -1069,7 +1069,7 @@
void
sk_update_int_mod(struct sk_softc *sc)
{
- u_int32_t imtimer_ticks;
+ uint32_t imtimer_ticks;
/*
* Configure interrupt moderation. The moderation timer
@@ -1260,27 +1260,27 @@
* evenly so that everyone gets a fair share.
*/
if (sk_win_read_1(sc, SK_CONFIG) & SK_CONFIG_SINGLEMAC) {
- u_int32_t chunk, val;
+ uint32_t chunk, val;
chunk = sc->sk_ramsize / 2;
- val = sc->sk_rboff / sizeof(u_int64_t);
+ val = sc->sk_rboff / sizeof(uint64_t);
sc_if->sk_rx_ramstart = val;
- val += (chunk / sizeof(u_int64_t));
+ val += (chunk / sizeof(uint64_t));
sc_if->sk_rx_ramend = val - 1;
sc_if->sk_tx_ramstart = val;
- val += (chunk / sizeof(u_int64_t));
+ val += (chunk / sizeof(uint64_t));
sc_if->sk_tx_ramend = val - 1;
} else {
- u_int32_t chunk, val;
+ uint32_t chunk, val;
chunk = sc->sk_ramsize / 4;
val = (sc->sk_rboff + (chunk * 2 * sc_if->sk_port)) /
- sizeof(u_int64_t);
+ sizeof(uint64_t);
sc_if->sk_rx_ramstart = val;
- val += (chunk / sizeof(u_int64_t));
+ val += (chunk / sizeof(uint64_t));
sc_if->sk_rx_ramend = val - 1;
sc_if->sk_tx_ramstart = val;
- val += (chunk / sizeof(u_int64_t));
+ val += (chunk / sizeof(uint64_t));
sc_if->sk_tx_ramend = val - 1;
}
@@ -1513,7 +1513,7 @@
bus_addr_t iobase;
bus_size_t iosize;
int rc, sk_nodenum;
- u_int32_t command;
+ uint32_t command;
const char *revstr;
const struct sysctlnode *node;
char intrbuf[PCI_INTRSTR_LEN];
@@ -1531,7 +1531,7 @@
if (command == 0x01) {
command = pci_conf_read(pc, pa->pa_tag, SK_PCI_PWRMGMTCTRL);
if (command & SK_PSTATE_MASK) {
- u_int32_t xiobase, membase, irq;
+ uint32_t xiobase, membase, irq;
/* Save important PCI config data. */
xiobase = pci_conf_read(pc, pa->pa_tag, SK_PCI_LOIO);
@@ -1649,7 +1649,7 @@
sk_vpd_read(sc);
if (sc->sk_type == SK_GENESIS) {
- u_int8_t val = sk_win_read_1(sc, SK_EPROM0);
+ uint8_t val = sk_win_read_1(sc, SK_EPROM0);
/* Read and save RAM size and RAMbuffer offset */
switch (val) {
case SK_RAMSIZE_512K_64:
@@ -1679,7 +1679,7 @@
sc->sk_ramsize, sc->sk_ramsize / 1024,
sc->sk_rboff));
} else {
- u_int8_t val = sk_win_read_1(sc, SK_EPROM0);
+ uint8_t val = sk_win_read_1(sc, SK_EPROM0);
sc->sk_ramsize = ( val == 0 ) ? 0x20000 : (( val * 4 )*1024);
sc->sk_rboff = SK_RBOFF_0;
@@ -1853,11 +1853,11 @@
}
int
-sk_encap(struct sk_if_softc *sc_if, struct mbuf *m_head, u_int32_t *txidx)
+sk_encap(struct sk_if_softc *sc_if, struct mbuf *m_head, uint32_t *txidx)
{
struct sk_softc *sc = sc_if->sk_softc;
struct sk_tx_desc *f = NULL;
- u_int32_t frag, cur, cnt = 0, sk_ctl;
+ uint32_t frag, cur, cnt = 0, sk_ctl;
int i;
struct sk_txmap_entry *entry;
bus_dmamap_t txmap;
@@ -1935,7 +1935,7 @@
#ifdef SK_DEBUG
if (skdebug >= 3) {
struct sk_tx_desc *desc;
- u_int32_t idx;
+ uint32_t idx;
for (idx = *txidx; idx != frag; SK_INC(idx, SK_TX_RING_CNT)) {
desc = &sc_if->sk_rdata->sk_tx_ring[idx];
sk_dump_txdesc(desc, idx);
@@ -1956,7 +1956,7 @@
struct sk_if_softc *sc_if = ifp->if_softc;
struct sk_softc *sc = sc_if->sk_softc;
struct mbuf *m_head = NULL;
Home |
Main Index |
Thread Index |
Old Index