svn commit: r192294 - head/sys/dev/nge

Pyun YongHyeon yongari at FreeBSD.org
Mon May 18 06:32:39 UTC 2009


Author: yongari
Date: Mon May 18 06:32:38 2009
New Revision: 192294
URL: http://svn.freebsd.org/changeset/base/192294

Log:
  s/u_int8_t/uint8_t/g
  s/u_int16_t/uint16_t/g
  s/u_int32_t/uint32_t/g

Modified:
  head/sys/dev/nge/if_nge.c
  head/sys/dev/nge/if_ngereg.h

Modified: head/sys/dev/nge/if_nge.c
==============================================================================
--- head/sys/dev/nge/if_nge.c	Mon May 18 06:20:37 2009	(r192293)
+++ head/sys/dev/nge/if_nge.c	Mon May 18 06:32:38 2009	(r192294)
@@ -151,7 +151,7 @@ static int nge_attach(device_t);
 static int nge_detach(device_t);
 
 static int nge_newbuf(struct nge_softc *, struct nge_desc *, struct mbuf *);
-static int nge_encap(struct nge_softc *, struct mbuf *, u_int32_t *);
+static int nge_encap(struct nge_softc *, struct mbuf *, uint32_t *);
 #ifdef NGE_FIXUP_RX
 static __inline void nge_fixup_rx (struct mbuf *);
 #endif
@@ -174,11 +174,11 @@ static void nge_ifmedia_sts(struct ifnet
 static void nge_delay(struct nge_softc *);
 static void nge_eeprom_idle(struct nge_softc *);
 static void nge_eeprom_putbyte(struct nge_softc *, int);
-static void nge_eeprom_getword(struct nge_softc *, int, u_int16_t *);
+static void nge_eeprom_getword(struct nge_softc *, int, uint16_t *);
 static void nge_read_eeprom(struct nge_softc *, caddr_t, int, int, int);
 
 static void nge_mii_sync(struct nge_softc *);
-static void nge_mii_send(struct nge_softc *, u_int32_t, int);
+static void nge_mii_send(struct nge_softc *, uint32_t, int);
 static int nge_mii_readreg(struct nge_softc *, struct nge_mii_frame *);
 static int nge_mii_writereg(struct nge_softc *, struct nge_mii_frame *);
 
@@ -307,10 +307,10 @@ nge_eeprom_putbyte(struct nge_softc *sc,
  * Read a word of data stored in the EEPROM at address 'addr.'
  */
 static void
-nge_eeprom_getword(struct nge_softc *sc, int addr, u_int16_t *dest)
+nge_eeprom_getword(struct nge_softc *sc, int addr, uint16_t *dest)
 {
 	int			i;
-	u_int16_t		word = 0;
+	uint16_t		word = 0;
 
 	/* Force EEPROM to idle state. */
 	nge_eeprom_idle(sc);
@@ -353,11 +353,11 @@ static void
 nge_read_eeprom(struct nge_softc *sc, caddr_t dest, int off, int cnt, int swap)
 {
 	int			i;
-	u_int16_t		word = 0, *ptr;
+	uint16_t		word = 0, *ptr;
 
 	for (i = 0; i < cnt; i++) {
 		nge_eeprom_getword(sc, off + i, &word);
-		ptr = (u_int16_t *)(dest + (i * 2));
+		ptr = (uint16_t *)(dest + (i * 2));
 		if (swap)
 			*ptr = ntohs(word);
 		else
@@ -387,7 +387,7 @@ nge_mii_sync(struct nge_softc *sc)
  * Clock a series of bits through the MII.
  */
 static void
-nge_mii_send(struct nge_softc *sc, u_int32_t bits, int cnt)
+nge_mii_send(struct nge_softc *sc, uint32_t bits, int cnt)
 {
 	int			i;
 
@@ -630,7 +630,7 @@ nge_setmulti(struct nge_softc *sc)
 {
 	struct ifnet		*ifp;
 	struct ifmultiaddr	*ifma;
-	u_int32_t		h = 0, i, filtsave;
+	uint32_t		h = 0, i, filtsave;
 	int			bit, index;
 
 	NGE_LOCK_ASSERT(sc);
@@ -1014,7 +1014,7 @@ nge_newbuf(struct nge_softc *sc, struct 
 
 	m->m_len = m->m_pkthdr.len = MCLBYTES;
 
-	m_adj(m, sizeof(u_int64_t));
+	m_adj(m, sizeof(uint64_t));
 
 	c->nge_mbuf = m;
 	c->nge_ptr = vtophys(mtod(m, caddr_t));
@@ -1054,14 +1054,14 @@ nge_rxeof(struct nge_softc *sc)
         struct ifnet		*ifp;
 	struct nge_desc		*cur_rx;
 	int			i, total_len = 0;
-	u_int32_t		rxstat;
+	uint32_t		rxstat;
 
 	NGE_LOCK_ASSERT(sc);
 	ifp = sc->nge_ifp;
 	i = sc->nge_cdata.nge_rx_prod;
 
 	while (NGE_OWNDESC(&sc->nge_ldata->nge_rx_list[i])) {
-		u_int32_t		extsts;
+		uint32_t		extsts;
 
 #ifdef DEVICE_POLLING
 		if (ifp->if_capenable & IFCAP_POLLING) {
@@ -1193,7 +1193,7 @@ nge_txeof(struct nge_softc *sc)
 {
 	struct nge_desc		*cur_tx;
 	struct ifnet		*ifp;
-	u_int32_t		idx;
+	uint32_t		idx;
 
 	NGE_LOCK_ASSERT(sc);
 	ifp = sc->nge_ifp;
@@ -1315,7 +1315,7 @@ nge_poll(struct ifnet *ifp, enum poll_cm
 		nge_start_locked(ifp);
 
 	if (sc->rxcycles > 0 || cmd == POLL_AND_CHECK_STATUS) {
-		u_int32_t	status;
+		uint32_t	status;
 
 		/* Reading the ISR register clears all interrupts. */
 		status = CSR_READ_4(sc, NGE_ISR);
@@ -1340,7 +1340,7 @@ nge_intr(void *arg)
 {
 	struct nge_softc	*sc;
 	struct ifnet		*ifp;
-	u_int32_t		status;
+	uint32_t		status;
 
 	sc = arg;
 	ifp = sc->nge_ifp;
@@ -1431,7 +1431,7 @@ nge_intr(void *arg)
  * pointers to the fragment pointers.
  */
 static int
-nge_encap(struct nge_softc *sc, struct mbuf *m_head, u_int32_t *txidx)
+nge_encap(struct nge_softc *sc, struct mbuf *m_head, uint32_t *txidx)
 {
 	struct nge_desc		*f = NULL;
 	struct mbuf		*m;
@@ -1514,7 +1514,7 @@ nge_start_locked(struct ifnet *ifp)
 {
 	struct nge_softc	*sc;
 	struct mbuf		*m_head = NULL;
-	u_int32_t		idx;
+	uint32_t		idx;
 
 	sc = ifp->if_softc;
 
@@ -1590,13 +1590,13 @@ nge_init_locked(struct nge_softc *sc)
 	/* Set MAC address */
 	CSR_WRITE_4(sc, NGE_RXFILT_CTL, NGE_FILTADDR_PAR0);
 	CSR_WRITE_4(sc, NGE_RXFILT_DATA,
-	    ((u_int16_t *)IF_LLADDR(sc->nge_ifp))[0]);
+	    ((uint16_t *)IF_LLADDR(sc->nge_ifp))[0]);
 	CSR_WRITE_4(sc, NGE_RXFILT_CTL, NGE_FILTADDR_PAR1);
 	CSR_WRITE_4(sc, NGE_RXFILT_DATA,
-	    ((u_int16_t *)IF_LLADDR(sc->nge_ifp))[1]);
+	    ((uint16_t *)IF_LLADDR(sc->nge_ifp))[1]);
 	CSR_WRITE_4(sc, NGE_RXFILT_CTL, NGE_FILTADDR_PAR2);
 	CSR_WRITE_4(sc, NGE_RXFILT_DATA,
-	    ((u_int16_t *)IF_LLADDR(sc->nge_ifp))[2]);
+	    ((uint16_t *)IF_LLADDR(sc->nge_ifp))[2]);
 
 	/* Init circular RX list. */
 	if (nge_list_rx_init(sc) == ENOBUFS) {

Modified: head/sys/dev/nge/if_ngereg.h
==============================================================================
--- head/sys/dev/nge/if_ngereg.h	Mon May 18 06:20:37 2009	(r192293)
+++ head/sys/dev/nge/if_ngereg.h	Mon May 18 06:32:38 2009	(r192294)
@@ -472,43 +472,43 @@
  */
 struct nge_desc_64 {
 	/* Hardware descriptor section */
-	volatile u_int32_t	nge_next_lo;
-	volatile u_int32_t	nge_next_hi;
-	volatile u_int32_t	nge_ptr_lo;
-	volatile u_int32_t	nge_ptr_hi;
-	volatile u_int32_t	nge_cmdsts;
+	volatile uint32_t	nge_next_lo;
+	volatile uint32_t	nge_next_hi;
+	volatile uint32_t	nge_ptr_lo;
+	volatile uint32_t	nge_ptr_hi;
+	volatile uint32_t	nge_cmdsts;
 #define nge_rxstat		nge_cmdsts
 #define nge_txstat		nge_cmdsts
 #define nge_ctl			nge_cmdsts
-	volatile u_int32_t	nge_extsts;
+	volatile uint32_t	nge_extsts;
         /* Driver software section */
         union {
                 struct mbuf             *nge_mbuf;
-                u_int64_t               nge_dummy;
+                uint64_t                nge_dummy;
         } nge_mb_u;
         union {
                 struct nge_desc_32      *nge_nextdesc;
-                u_int64_t               nge_dummy;
+                uint64_t                nge_dummy;
         } nge_nd_u;
 };
 
 struct nge_desc_32 {
 	/* Hardware descriptor section */
-	volatile u_int32_t	nge_next;
-	volatile u_int32_t	nge_ptr;
-	volatile u_int32_t	nge_cmdsts;
+	volatile uint32_t	nge_next;
+	volatile uint32_t	nge_ptr;
+	volatile uint32_t	nge_cmdsts;
 #define nge_rxstat		nge_cmdsts
 #define nge_txstat		nge_cmdsts
 #define nge_ctl			nge_cmdsts
-	volatile u_int32_t	nge_extsts;
+	volatile uint32_t	nge_extsts;
         /* Driver software section */
         union {
                 struct mbuf             *nge_mbuf;
-                u_int64_t               nge_dummy;
+                uint64_t                nge_dummy;
         } nge_mb_u;
         union {
                 struct nge_desc_32      *nge_nextdesc;
-                u_int64_t               nge_dummy;
+                uint64_t                nge_dummy;
         } nge_nd_u;
 };
 
@@ -611,18 +611,18 @@ struct nge_list_data {
 #define NGE_DEVICEID		0x0022
 
 struct nge_type {
-	u_int16_t		nge_vid;
-	u_int16_t		nge_did;
+	uint16_t		nge_vid;
+	uint16_t		nge_did;
 	char			*nge_name;
 };
 
 struct nge_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;
 };
 
 /*
@@ -657,16 +657,16 @@ struct nge_softc {
 	void			*nge_intrhand;
 	device_t		nge_miibus;
 	int			nge_if_flags;
-	u_int8_t		nge_type;
-	u_int8_t		nge_link;
-	u_int8_t		nge_width;
+	uint8_t			nge_type;
+	uint8_t			nge_link;
+	uint8_t			nge_width;
 #define NGE_WIDTH_32BITS	0
 #define NGE_WIDTH_64BITS	1
 	struct nge_list_data	*nge_ldata;
 	struct nge_ring_data	nge_cdata;
 	struct callout		nge_stat_ch;
 	struct mtx		nge_mtx;
-	u_int8_t		nge_tbi;
+	uint8_t			nge_tbi;
 	struct ifmedia		nge_ifmedia;
 #ifdef DEVICE_POLLING
 	int			rxcycles;


More information about the svn-src-head mailing list