From owner-svn-src-head@FreeBSD.ORG Wed Mar 11 09:06:39 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91148106566C; Wed, 11 Mar 2009 09:06:39 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7ED718FC22; Wed, 11 Mar 2009 09:06:39 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2B96doE090032; Wed, 11 Mar 2009 09:06:39 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2B96dYG090030; Wed, 11 Mar 2009 09:06:39 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200903110906.n2B96dYG090030@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 11 Mar 2009 09:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189689 - head/sys/dev/txp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2009 09:06:40 -0000 Author: yongari Date: Wed Mar 11 09:06:39 2009 New Revision: 189689 URL: http://svn.freebsd.org/changeset/base/189689 Log: s/u_int8_t/uint8_t/g s/u_int16_t/uint16_t/g s/u_int32_t/uint32_t/g s/u_int64_t/uint64_t/g Modified: head/sys/dev/txp/if_txp.c head/sys/dev/txp/if_txpreg.h Modified: head/sys/dev/txp/if_txp.c ============================================================================== --- head/sys/dev/txp/if_txp.c Wed Mar 11 08:49:17 2009 (r189688) +++ head/sys/dev/txp/if_txp.c Wed Mar 11 09:06:39 2009 (r189689) @@ -136,12 +136,12 @@ static void txp_rxring_empty(struct txp_ static void txp_set_filter(struct txp_softc *); static int txp_cmd_desc_numfree(struct txp_softc *); -static int txp_command(struct txp_softc *, u_int16_t, u_int16_t, u_int32_t, - u_int32_t, u_int16_t *, u_int32_t *, u_int32_t *, int); -static int txp_command2(struct txp_softc *, u_int16_t, u_int16_t, - u_int32_t, u_int32_t, struct txp_ext_desc *, u_int8_t, +static int txp_command(struct txp_softc *, uint16_t, uint16_t, uint32_t, + uint32_t, uint16_t *, uint32_t *, uint32_t *, int); +static int txp_command2(struct txp_softc *, uint16_t, uint16_t, + uint32_t, uint32_t, struct txp_ext_desc *, uint8_t, struct txp_rsp_desc **, int); -static int txp_response(struct txp_softc *, u_int32_t, u_int16_t, u_int16_t, +static int txp_response(struct txp_softc *, uint32_t, uint16_t, uint16_t, struct txp_rsp_desc **); static void txp_rsp_fixup(struct txp_softc *, struct txp_rsp_desc *, struct txp_rsp_desc *); @@ -209,8 +209,8 @@ txp_attach(device_t dev) { struct txp_softc *sc; struct ifnet *ifp; - u_int16_t p1; - u_int32_t p2; + uint16_t p1; + uint32_t p2; int error = 0, rid; u_char eaddr[6]; @@ -296,12 +296,12 @@ txp_attach(device_t dev) goto fail; } - eaddr[0] = ((u_int8_t *)&p1)[1]; - eaddr[1] = ((u_int8_t *)&p1)[0]; - eaddr[2] = ((u_int8_t *)&p2)[3]; - eaddr[3] = ((u_int8_t *)&p2)[2]; - eaddr[4] = ((u_int8_t *)&p2)[1]; - eaddr[5] = ((u_int8_t *)&p2)[0]; + eaddr[0] = ((uint8_t *)&p1)[1]; + eaddr[1] = ((uint8_t *)&p1)[0]; + eaddr[2] = ((uint8_t *)&p2)[3]; + eaddr[3] = ((uint8_t *)&p2)[2]; + eaddr[4] = ((uint8_t *)&p2)[1]; + eaddr[5] = ((uint8_t *)&p2)[0]; sc->sc_cold = 0; @@ -451,7 +451,7 @@ txp_chip_init(struct txp_softc *sc) static int txp_reset_adapter(struct txp_softc *sc) { - u_int32_t r; + uint32_t r; int i; r = 0; @@ -481,7 +481,7 @@ txp_download_fw(struct txp_softc *sc) struct txp_fw_file_header *fileheader; struct txp_fw_section_header *secthead; int error, sect; - u_int32_t r, i, ier, imr; + uint32_t r, i, ier, imr; r = 0; error = 0; @@ -528,7 +528,7 @@ txp_download_fw(struct txp_softc *sc) goto fail; } - secthead = (struct txp_fw_section_header *)(((u_int8_t *)tc990image) + + secthead = (struct txp_fw_section_header *)(((uint8_t *)tc990image) + sizeof(struct txp_fw_file_header)); for (sect = 0; sect < fileheader->nsections; sect++) { @@ -538,7 +538,7 @@ txp_download_fw(struct txp_softc *sc) goto fail; } secthead = (struct txp_fw_section_header *) - (((u_int8_t *)secthead) + secthead->nbytes + + (((uint8_t *)secthead) + secthead->nbytes + sizeof(*secthead)); } @@ -566,7 +566,7 @@ fail: static int txp_download_fw_wait(struct txp_softc *sc) { - u_int32_t i, r; + uint32_t i, r; r = 0; for (i = 0; i < 10000; i++) { @@ -598,14 +598,14 @@ txp_download_fw_section(struct txp_softc vm_offset_t dma; int rseg, err = 0; struct mbuf m; - u_int16_t csum; + uint16_t csum; /* Skip zero length sections */ if (sect->nbytes == 0) return (0); /* Make sure we aren't past the end of the image */ - rseg = ((u_int8_t *)sect) - ((u_int8_t *)tc990image); + rseg = ((uint8_t *)sect) - ((uint8_t *)tc990image); if (rseg >= sizeof(tc990image)) { device_printf(sc->sc_dev, "fw invalid section address, " "section %d\n", sectnum); @@ -620,7 +620,7 @@ txp_download_fw_section(struct txp_softc return (-1); } - bcopy(((u_int8_t *)sect) + sizeof(*sect), sc->sc_fwbuf, sect->nbytes); + bcopy(((uint8_t *)sect) + sizeof(*sect), sc->sc_fwbuf, sect->nbytes); dma = vtophys(sc->sc_fwbuf); /* @@ -662,7 +662,7 @@ txp_intr(void *vsc) { struct txp_softc *sc = vsc; struct txp_hostvar *hv = sc->sc_hostvar; - u_int32_t isr; + uint32_t isr; /* mask all interrupts */ TXP_LOCK(sc); @@ -709,7 +709,7 @@ txp_rx_reclaim(struct txp_softc *sc, str struct txp_rx_desc *rxd; struct mbuf *m; struct txp_swdesc *sd = NULL; - u_int32_t roff, woff; + uint32_t roff, woff; TXP_LOCK_ASSERT(sc); roff = *r->r_roff; @@ -797,7 +797,7 @@ txp_rxbuf_reclaim(struct txp_softc *sc) struct txp_hostvar *hv = sc->sc_hostvar; struct txp_rxbuf_desc *rbd; struct txp_swdesc *sd; - u_int32_t i; + uint32_t i; TXP_LOCK_ASSERT(sc); if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) @@ -840,8 +840,8 @@ static void txp_tx_reclaim(struct txp_softc *sc, struct txp_tx_ring *r) { struct ifnet *ifp = sc->sc_ifp; - u_int32_t idx = TXP_OFFSET2IDX(*(r->r_off)); - u_int32_t cons = r->r_cons, cnt = r->r_cnt; + uint32_t idx = TXP_OFFSET2IDX(*(r->r_off)); + uint32_t cons = r->r_cons, cnt = r->r_cnt; struct txp_tx_desc *txd = r->r_desc + cons; struct txp_swdesc *sd = sc->sc_txd + cons; struct mbuf *m; @@ -909,7 +909,7 @@ txp_alloc_rings(struct txp_softc *sc) { struct txp_boot_record *boot; struct txp_ldata *ld; - u_int32_t r; + uint32_t r; int i; r = 0; @@ -997,7 +997,7 @@ txp_alloc_rings(struct txp_softc *sc) sc->sc_rxbufprod = 0; /* zero dma */ - bzero(&ld->txp_zero, sizeof(u_int32_t)); + bzero(&ld->txp_zero, sizeof(uint32_t)); boot->br_zero_lo = vtophys(&ld->txp_zero); boot->br_zero_hi = 0; @@ -1148,8 +1148,8 @@ static void txp_init_locked(struct txp_softc *sc) { struct ifnet *ifp; - u_int16_t p1; - u_int32_t p2; + uint16_t p1; + uint32_t p2; TXP_LOCK_ASSERT(sc); ifp = sc->sc_ifp; @@ -1163,12 +1163,12 @@ txp_init_locked(struct txp_softc *sc) NULL, NULL, NULL, 1); /* Set station address. */ - ((u_int8_t *)&p1)[1] = IF_LLADDR(sc->sc_ifp)[0]; - ((u_int8_t *)&p1)[0] = IF_LLADDR(sc->sc_ifp)[1]; - ((u_int8_t *)&p2)[3] = IF_LLADDR(sc->sc_ifp)[2]; - ((u_int8_t *)&p2)[2] = IF_LLADDR(sc->sc_ifp)[3]; - ((u_int8_t *)&p2)[1] = IF_LLADDR(sc->sc_ifp)[4]; - ((u_int8_t *)&p2)[0] = IF_LLADDR(sc->sc_ifp)[5]; + ((uint8_t *)&p1)[1] = IF_LLADDR(sc->sc_ifp)[0]; + ((uint8_t *)&p1)[0] = IF_LLADDR(sc->sc_ifp)[1]; + ((uint8_t *)&p2)[3] = IF_LLADDR(sc->sc_ifp)[2]; + ((uint8_t *)&p2)[2] = IF_LLADDR(sc->sc_ifp)[3]; + ((uint8_t *)&p2)[1] = IF_LLADDR(sc->sc_ifp)[4]; + ((uint8_t *)&p2)[0] = IF_LLADDR(sc->sc_ifp)[5]; txp_command(sc, TXP_CMD_STATION_ADDRESS_WRITE, p1, p2, 0, NULL, NULL, NULL, 1); @@ -1250,7 +1250,7 @@ txp_start_locked(struct ifnet *ifp) struct txp_frag_desc *fxd; struct mbuf *m, *m0; struct txp_swdesc *sd; - u_int32_t firstprod, firstcnt, prod, cnt; + uint32_t firstprod, firstcnt, prod, cnt; TXP_LOCK_ASSERT(sc); if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != @@ -1349,8 +1349,8 @@ oactive: * Handle simple commands sent to the typhoon */ static int -txp_command(struct txp_softc *sc, u_int16_t id, u_int16_t in1, u_int32_t in2, - u_int32_t in3, u_int16_t *out1, u_int32_t *out2, u_int32_t *out3, int wait) +txp_command(struct txp_softc *sc, uint16_t id, uint16_t in1, uint32_t in2, + uint32_t in3, uint16_t *out1, uint32_t *out2, uint32_t *out3, int wait) { struct txp_rsp_desc *rsp = NULL; @@ -1371,15 +1371,15 @@ txp_command(struct txp_softc *sc, u_int1 } static int -txp_command2(struct txp_softc *sc, u_int16_t id, u_int16_t in1, u_int32_t in2, - u_int32_t in3, struct txp_ext_desc *in_extp, u_int8_t in_extn, +txp_command2(struct txp_softc *sc, uint16_t id, uint16_t in1, uint32_t in2, + uint32_t in3, struct txp_ext_desc *in_extp, uint8_t in_extn, struct txp_rsp_desc **rspp, int wait) { struct txp_hostvar *hv = sc->sc_hostvar; struct txp_cmd_desc *cmd; struct txp_ext_desc *ext; - u_int32_t idx, i; - u_int16_t seq; + uint32_t idx, i; + uint16_t seq; if (txp_cmd_desc_numfree(sc) < (in_extn + 1)) { device_printf(sc->sc_dev, "no free cmd descriptors\n"); @@ -1387,7 +1387,7 @@ txp_command2(struct txp_softc *sc, u_int } idx = sc->sc_cmdring.lastwrite; - cmd = (struct txp_cmd_desc *)(((u_int8_t *)sc->sc_cmdring.base) + idx); + cmd = (struct txp_cmd_desc *)(((uint8_t *)sc->sc_cmdring.base) + idx); bzero(cmd, sizeof(*cmd)); cmd->cmd_numdesc = in_extn; @@ -1404,7 +1404,7 @@ txp_command2(struct txp_softc *sc, u_int idx = 0; for (i = 0; i < in_extn; i++) { - ext = (struct txp_ext_desc *)(((u_int8_t *)sc->sc_cmdring.base) + idx); + ext = (struct txp_ext_desc *)(((uint8_t *)sc->sc_cmdring.base) + idx); bcopy(in_extp, ext, sizeof(struct txp_ext_desc)); in_extp++; idx += sizeof(struct txp_cmd_desc); @@ -1439,14 +1439,14 @@ txp_command2(struct txp_softc *sc, u_int } static int -txp_response(struct txp_softc *sc, u_int32_t ridx, u_int16_t id, u_int16_t seq, +txp_response(struct txp_softc *sc, uint32_t ridx, uint16_t id, uint16_t seq, struct txp_rsp_desc **rspp) { struct txp_hostvar *hv = sc->sc_hostvar; struct txp_rsp_desc *rsp; while (ridx != hv->hv_resp_write_idx) { - rsp = (struct txp_rsp_desc *)(((u_int8_t *)sc->sc_rspring.base) + ridx); + rsp = (struct txp_rsp_desc *)(((uint8_t *)sc->sc_rspring.base) + ridx); if (id == rsp->rsp_id && rsp->rsp_seq == seq) { *rspp = (struct txp_rsp_desc *)malloc( @@ -1491,7 +1491,7 @@ txp_rsp_fixup(struct txp_softc *sc, stru { struct txp_rsp_desc *src = rsp; struct txp_hostvar *hv = sc->sc_hostvar; - u_int32_t i, ridx; + uint32_t i, ridx; ridx = hv->hv_resp_read_idx; @@ -1515,7 +1515,7 @@ txp_cmd_desc_numfree(struct txp_softc *s { struct txp_hostvar *hv = sc->sc_hostvar; struct txp_boot_record *br = sc->sc_boot; - u_int32_t widx, ridx, nfree; + uint32_t widx, ridx, nfree; widx = sc->sc_cmdring.lastwrite; ridx = hv->hv_cmd_read_idx; @@ -1563,7 +1563,7 @@ txp_ifmedia_upd(struct ifnet *ifp) { struct txp_softc *sc = ifp->if_softc; struct ifmedia *ifm = &sc->sc_ifmedia; - u_int16_t new_xcvr; + uint16_t new_xcvr; TXP_LOCK(sc); if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER) { @@ -1607,7 +1607,7 @@ txp_ifmedia_sts(struct ifnet *ifp, struc { struct txp_softc *sc = ifp->if_softc; struct ifmedia *ifm = &sc->sc_ifmedia; - u_int16_t bmsr, bmcr, anar, anlpar; + uint16_t bmsr, bmcr, anar, anlpar; ifmr->ifm_status = IFM_AVALID; ifmr->ifm_active = IFM_ETHER; @@ -1722,9 +1722,9 @@ static void txp_set_filter(struct txp_softc *sc) { struct ifnet *ifp = sc->sc_ifp; - u_int32_t crc, carry, hashbit, hash[2]; - u_int16_t filter; - u_int8_t octet; + uint32_t crc, carry, hashbit, hash[2]; + uint16_t filter; + uint8_t octet; int i, j, mcnt = 0; struct ifmultiaddr *ifma; char *enm; @@ -1765,7 +1765,7 @@ txp_set_filter(struct txp_softc *sc) carry; } } - hashbit = (u_int16_t)(crc & (64 - 1)); + hashbit = (uint16_t)(crc & (64 - 1)); hash[hashbit / 32] |= (1 << hashbit % 32); } IF_ADDR_UNLOCK(ifp); Modified: head/sys/dev/txp/if_txpreg.h ============================================================================== --- head/sys/dev/txp/if_txpreg.h Wed Mar 11 08:49:17 2009 (r189688) +++ head/sys/dev/txp/if_txpreg.h Wed Mar 11 09:06:39 2009 (r189689) @@ -225,12 +225,12 @@ #define TXP_STAT_UDPCKSUMGOOD 0x0200 struct txp_tx_desc { - volatile u_int8_t tx_flags; /* type/descriptor flags */ - volatile u_int8_t tx_numdesc; /* number of descriptors */ - volatile u_int16_t tx_totlen; /* total packet length */ - volatile u_int32_t tx_addrlo; /* virt addr low word */ - volatile u_int32_t tx_addrhi; /* virt addr high word */ - volatile u_int32_t tx_pflags; /* processing flags */ + volatile uint8_t tx_flags; /* type/descriptor flags */ + volatile uint8_t tx_numdesc; /* number of descriptors */ + volatile uint16_t tx_totlen; /* total packet length */ + volatile uint32_t tx_addrlo; /* virt addr low word */ + volatile uint32_t tx_addrhi; /* virt addr high word */ + volatile uint32_t tx_pflags; /* processing flags */ }; #define TX_FLAGS_TYPE_M 0x07 /* type mask */ #define TX_FLAGS_TYPE_FRAG 0x00 /* type: fragment */ @@ -256,21 +256,21 @@ struct txp_tx_desc { #define TX_PFLAGS_VLANTAG_S 12 /* amount to shift tag */ struct txp_rx_desc { - volatile u_int8_t rx_flags; /* type/descriptor flags */ - volatile u_int8_t rx_numdesc; /* number of descriptors */ - volatile u_int16_t rx_len; /* frame length */ + volatile uint8_t rx_flags; /* type/descriptor flags */ + volatile uint8_t rx_numdesc; /* number of descriptors */ + volatile uint16_t rx_len; /* frame length */ #ifdef notdef - volatile u_int32_t rx_vaddrlo; /* virtual address, lo word */ - volatile u_int32_t rx_vaddrhi; /* virtual address, hi word */ + volatile uint32_t rx_vaddrlo; /* virtual address, lo word */ + volatile uint32_t rx_vaddrhi; /* virtual address, hi word */ #endif union { struct txp_swdesc *rx_sd; - u_int64_t rx_dummy; + uint64_t rx_dummy; } txp_rx_u; - volatile u_int32_t rx_stat; /* status */ - volatile u_int16_t rx_filter; /* filter status */ - volatile u_int16_t rx_hash; /* hash status */ - volatile u_int32_t rx_vlan; /* vlan tag/priority */ + volatile uint32_t rx_stat; /* status */ + volatile uint16_t rx_filter; /* filter status */ + volatile uint16_t rx_hash; /* hash status */ + volatile uint32_t rx_vlan; /* vlan tag/priority */ }; #define rx_sd txp_rx_u.rx_sd @@ -316,15 +316,15 @@ struct txp_rx_desc { struct txp_rxbuf_desc { - volatile u_int32_t rb_paddrlo; - volatile u_int32_t rb_paddrhi; + volatile uint32_t rb_paddrlo; + volatile uint32_t rb_paddrhi; #ifdef notdef - volatile u_int32_t rb_vaddrlo; - volatile u_int32_t rb_vaddrhi; + volatile uint32_t rb_vaddrlo; + volatile uint32_t rb_vaddrhi; #endif union { struct txp_swdesc *rb_sd; - u_int64_t rb_dummy; + uint64_t rb_dummy; } txp_rb_u; }; @@ -332,20 +332,20 @@ struct txp_rxbuf_desc { /* Extension descriptor */ struct txp_ext_desc { - volatile u_int32_t ext_1; - volatile u_int32_t ext_2; - volatile u_int32_t ext_3; - volatile u_int32_t ext_4; + volatile uint32_t ext_1; + volatile uint32_t ext_2; + volatile uint32_t ext_3; + volatile uint32_t ext_4; }; struct txp_cmd_desc { - volatile u_int8_t cmd_flags; - volatile u_int8_t cmd_numdesc; - volatile u_int16_t cmd_id; - volatile u_int16_t cmd_seq; - volatile u_int16_t cmd_par1; - volatile u_int32_t cmd_par2; - volatile u_int32_t cmd_par3; + volatile uint8_t cmd_flags; + volatile uint8_t cmd_numdesc; + volatile uint16_t cmd_id; + volatile uint16_t cmd_seq; + volatile uint16_t cmd_par1; + volatile uint32_t cmd_par2; + volatile uint32_t cmd_par3; }; #define CMD_FLAGS_TYPE_M 0x07 /* type mask */ #define CMD_FLAGS_TYPE_FRAG 0x00 /* type: fragment */ @@ -358,13 +358,13 @@ struct txp_cmd_desc { #define CMD_FLAGS_VALID 0x80 /* valid descriptor */ struct txp_rsp_desc { - volatile u_int8_t rsp_flags; - volatile u_int8_t rsp_numdesc; - volatile u_int16_t rsp_id; - volatile u_int16_t rsp_seq; - volatile u_int16_t rsp_par1; - volatile u_int32_t rsp_par2; - volatile u_int32_t rsp_par3; + volatile uint8_t rsp_flags; + volatile uint8_t rsp_numdesc; + volatile uint16_t rsp_id; + volatile uint16_t rsp_seq; + volatile uint16_t rsp_par1; + volatile uint32_t rsp_par2; + volatile uint32_t rsp_par3; }; #define RSP_FLAGS_TYPE_M 0x07 /* type mask */ #define RSP_FLAGS_TYPE_FRAG 0x00 /* type: fragment */ @@ -376,12 +376,12 @@ struct txp_rsp_desc { #define RSP_FLAGS_ERROR 0x40 /* response error */ struct txp_frag_desc { - volatile u_int8_t frag_flags; /* type/descriptor flags */ - volatile u_int8_t frag_rsvd1; - volatile u_int16_t frag_len; /* bytes in this fragment */ - volatile u_int32_t frag_addrlo; /* phys addr low word */ - volatile u_int32_t frag_addrhi; /* phys addr high word */ - volatile u_int32_t frag_rsvd2; + volatile uint8_t frag_flags; /* type/descriptor flags */ + volatile uint8_t frag_rsvd1; + volatile uint16_t frag_len; /* bytes in this fragment */ + volatile uint32_t frag_addrlo; /* phys addr low word */ + volatile uint32_t frag_addrhi; /* phys addr high word */ + volatile uint32_t frag_rsvd2; }; #define FRAG_FLAGS_TYPE_M 0x07 /* type mask */ #define FRAG_FLAGS_TYPE_FRAG 0x00 /* type: fragment */ @@ -392,44 +392,44 @@ struct txp_frag_desc { #define FRAG_FLAGS_TYPE_RESP 0x05 /* type: response */ struct txp_opt_desc { - u_int8_t opt_desctype:3, + uint8_t opt_desctype:3, opt_rsvd:1, opt_type:4; - u_int8_t opt_num; - u_int16_t opt_dep1; - u_int32_t opt_dep2; - u_int32_t opt_dep3; - u_int32_t opt_dep4; + uint8_t opt_num; + uint16_t opt_dep1; + uint32_t opt_dep2; + uint32_t opt_dep3; + uint32_t opt_dep4; }; struct txp_ipsec_desc { - u_int8_t ipsec_desctpe:3, + uint8_t ipsec_desctpe:3, ipsec_rsvd:1, ipsec_type:4; - u_int8_t ipsec_num; - u_int16_t ipsec_flags; - u_int16_t ipsec_ah1; - u_int16_t ipsec_esp1; - u_int16_t ipsec_ah2; - u_int16_t ipsec_esp2; - u_int32_t ipsec_rsvd1; + uint8_t ipsec_num; + uint16_t ipsec_flags; + uint16_t ipsec_ah1; + uint16_t ipsec_esp1; + uint16_t ipsec_ah2; + uint16_t ipsec_esp2; + uint32_t ipsec_rsvd1; }; struct txp_tcpseg_desc { - u_int8_t tcpseg_desctype:3, + uint8_t tcpseg_desctype:3, tcpseg_rsvd:1, tcpseg_type:4; - u_int8_t tcpseg_num; + uint8_t tcpseg_num; - u_int16_t tcpseg_mss:12, + uint16_t tcpseg_mss:12, tcpseg_misc:4; - u_int32_t tcpseg_respaddr; - u_int32_t tcpseg_txbytes; - u_int32_t tcpseg_lss; + uint32_t tcpseg_respaddr; + uint32_t tcpseg_txbytes; + uint32_t tcpseg_lss; }; /* @@ -463,48 +463,48 @@ struct txp_tcpseg_desc { * boot record (pointers to rings) */ struct txp_boot_record { - volatile u_int32_t br_hostvar_lo; /* host ring pointer */ - volatile u_int32_t br_hostvar_hi; - volatile u_int32_t br_txlopri_lo; /* tx low pri ring */ - volatile u_int32_t br_txlopri_hi; - volatile u_int32_t br_txlopri_siz; - volatile u_int32_t br_txhipri_lo; /* tx high pri ring */ - volatile u_int32_t br_txhipri_hi; - volatile u_int32_t br_txhipri_siz; - volatile u_int32_t br_rxlopri_lo; /* rx low pri ring */ - volatile u_int32_t br_rxlopri_hi; - volatile u_int32_t br_rxlopri_siz; - volatile u_int32_t br_rxbuf_lo; /* rx buffer ring */ - volatile u_int32_t br_rxbuf_hi; - volatile u_int32_t br_rxbuf_siz; - volatile u_int32_t br_cmd_lo; /* command ring */ - volatile u_int32_t br_cmd_hi; - volatile u_int32_t br_cmd_siz; - volatile u_int32_t br_resp_lo; /* response ring */ - volatile u_int32_t br_resp_hi; - volatile u_int32_t br_resp_siz; - volatile u_int32_t br_zero_lo; /* zero word */ - volatile u_int32_t br_zero_hi; - volatile u_int32_t br_rxhipri_lo; /* rx high pri ring */ - volatile u_int32_t br_rxhipri_hi; - volatile u_int32_t br_rxhipri_siz; + volatile uint32_t br_hostvar_lo; /* host ring pointer */ + volatile uint32_t br_hostvar_hi; + volatile uint32_t br_txlopri_lo; /* tx low pri ring */ + volatile uint32_t br_txlopri_hi; + volatile uint32_t br_txlopri_siz; + volatile uint32_t br_txhipri_lo; /* tx high pri ring */ + volatile uint32_t br_txhipri_hi; + volatile uint32_t br_txhipri_siz; + volatile uint32_t br_rxlopri_lo; /* rx low pri ring */ + volatile uint32_t br_rxlopri_hi; + volatile uint32_t br_rxlopri_siz; + volatile uint32_t br_rxbuf_lo; /* rx buffer ring */ + volatile uint32_t br_rxbuf_hi; + volatile uint32_t br_rxbuf_siz; + volatile uint32_t br_cmd_lo; /* command ring */ + volatile uint32_t br_cmd_hi; + volatile uint32_t br_cmd_siz; + volatile uint32_t br_resp_lo; /* response ring */ + volatile uint32_t br_resp_hi; + volatile uint32_t br_resp_siz; + volatile uint32_t br_zero_lo; /* zero word */ + volatile uint32_t br_zero_hi; + volatile uint32_t br_rxhipri_lo; /* rx high pri ring */ + volatile uint32_t br_rxhipri_hi; + volatile uint32_t br_rxhipri_siz; }; /* * hostvar structure (shared with typhoon) */ struct txp_hostvar { - volatile u_int32_t hv_rx_hi_read_idx; /* host->arm */ - volatile u_int32_t hv_rx_lo_read_idx; /* host->arm */ - volatile u_int32_t hv_rx_buf_write_idx; /* host->arm */ - volatile u_int32_t hv_resp_read_idx; /* host->arm */ - volatile u_int32_t hv_tx_lo_desc_read_idx; /* arm->host */ - volatile u_int32_t hv_tx_hi_desc_read_idx; /* arm->host */ - volatile u_int32_t hv_rx_lo_write_idx; /* arm->host */ - volatile u_int32_t hv_rx_buf_read_idx; /* arm->host */ - volatile u_int32_t hv_cmd_read_idx; /* arm->host */ - volatile u_int32_t hv_resp_write_idx; /* arm->host */ - volatile u_int32_t hv_rx_hi_write_idx; /* arm->host */ + volatile uint32_t hv_rx_hi_read_idx; /* host->arm */ + volatile uint32_t hv_rx_lo_read_idx; /* host->arm */ + volatile uint32_t hv_rx_buf_write_idx; /* host->arm */ + volatile uint32_t hv_resp_read_idx; /* host->arm */ + volatile uint32_t hv_tx_lo_desc_read_idx; /* arm->host */ + volatile uint32_t hv_tx_hi_desc_read_idx; /* arm->host */ + volatile uint32_t hv_rx_lo_write_idx; /* arm->host */ + volatile uint32_t hv_rx_buf_read_idx; /* arm->host */ + volatile uint32_t hv_cmd_read_idx; /* arm->host */ + volatile uint32_t hv_resp_write_idx; /* arm->host */ + volatile uint32_t hv_rx_hi_write_idx; /* arm->host */ }; /* @@ -546,23 +546,23 @@ struct txp_hostvar { struct txp_cmd_ring { struct txp_cmd_desc *base; - u_int32_t lastwrite; - u_int32_t size; + uint32_t lastwrite; + uint32_t size; }; struct txp_rsp_ring { struct txp_rsp_desc *base; - u_int32_t lastwrite; - u_int32_t size; + uint32_t lastwrite; + uint32_t size; }; struct txp_tx_ring { struct txp_tx_desc *r_desc; /* base address of descs */ - u_int32_t r_reg; /* register to activate */ - u_int32_t r_prod; /* producer */ - u_int32_t r_cons; /* consumer */ - u_int32_t r_cnt; /* # descs in use */ - volatile u_int32_t *r_off; /* hostvar index pointer */ + uint32_t r_reg; /* register to activate */ + uint32_t r_prod; /* producer */ + uint32_t r_cons; /* consumer */ + uint32_t r_cnt; /* # descs in use */ + volatile uint32_t *r_off; /* hostvar index pointer */ }; struct txp_swdesc { @@ -572,8 +572,8 @@ struct txp_swdesc { struct txp_rx_ring { struct txp_rx_desc *r_desc; /* base address of descs */ - volatile u_int32_t *r_roff; /* hv read offset ptr */ - volatile u_int32_t *r_woff; /* hv write offset ptr */ + volatile uint32_t *r_roff; /* hv read offset ptr */ + volatile uint32_t *r_woff; /* hv write offset ptr */ }; struct txp_ldata { @@ -586,7 +586,7 @@ struct txp_ldata { struct txp_rx_desc txp_rxloring[RX_ENTRIES]; struct txp_cmd_desc txp_cmdring[CMD_ENTRIES]; struct txp_rsp_desc txp_rspring[RSP_ENTRIES]; - u_int32_t txp_zero; + uint32_t txp_zero; }; struct txp_softc { @@ -611,25 +611,25 @@ struct txp_softc { struct txp_tx_ring sc_txhir, sc_txlor; struct txp_rxbuf_desc *sc_rxbufs; struct txp_rx_ring sc_rxhir, sc_rxlor; - u_int16_t sc_xcvr; - u_int16_t sc_seq; + uint16_t sc_xcvr; + uint16_t sc_seq; int sc_cold; - u_int32_t sc_rx_capability, sc_tx_capability; + uint32_t sc_rx_capability, sc_tx_capability; }; struct txp_fw_file_header { - u_int8_t magicid[8]; /* TYPHOON\0 */ - u_int32_t version; - u_int32_t nsections; - u_int32_t addr; - u_int32_t hmac[5]; + uint8_t magicid[8]; /* TYPHOON\0 */ + uint32_t version; + uint32_t nsections; + uint32_t addr; + uint32_t hmac[5]; }; struct txp_fw_section_header { - u_int32_t nbytes; - u_int16_t cksum; - u_int16_t reserved; - u_int32_t addr; + uint32_t nbytes; + uint16_t cksum; + uint16_t reserved; + uint32_t addr; }; #define TXP_MAX_SEGLEN 0xffff @@ -660,7 +660,7 @@ struct txp_fw_section_header { #define TXP_DEVICEID_3CR990B_SRV 0x990A struct txp_type { - u_int16_t txp_vid; - u_int16_t txp_did; + uint16_t txp_vid; + uint16_t txp_did; char *txp_name; };