diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2008-05-22 21:03:42 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2008-05-22 21:03:42 +0000 |
commit | 578abe2da9e2d6deda2ce0488cd48578721b3666 (patch) | |
tree | d1e6fcca31ee9b978f20e6949b6d6e759786bdeb /sys/dev/pci | |
parent | 5cd97437cdbd6368e86fc7f68cc021f9a9d8b779 (diff) |
ANSI function definitions.
ok dlg@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_txp.c | 137 |
1 files changed, 43 insertions, 94 deletions
diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c index 043e5073810..37d04b09e7c 100644 --- a/sys/dev/pci/if_txp.c +++ b/sys/dev/pci/if_txp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_txp.c,v 1.89 2008/05/22 19:23:04 mk Exp $ */ +/* $OpenBSD: if_txp.c,v 1.90 2008/05/22 21:03:41 brad Exp $ */ /* * Copyright (c) 2001 @@ -149,9 +149,7 @@ const struct pci_matchid txp_devices[] = { }; int -txp_probe(parent, match, aux) - struct device *parent; - void *match, *aux; +txp_probe(struct device *parent, void *match, void *aux) { return (pci_matchbyid((struct pci_attach_args *)aux, txp_devices, sizeof(txp_devices)/sizeof(txp_devices[0]))); @@ -249,9 +247,7 @@ txp_attachhook(void *vsc) } void -txp_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +txp_attach(struct device *parent, struct device *self, void *aux) { struct txp_softc *sc = (struct txp_softc *)self; struct pci_attach_args *pa = aux; @@ -298,8 +294,7 @@ txp_attach(parent, self, aux) } int -txp_chip_init(sc) - struct txp_softc *sc; +txp_chip_init(struct txp_softc *sc) { /* disable interrupts */ WRITE_REG(sc, TXP_IER, 0); @@ -336,8 +331,7 @@ txp_chip_init(sc) } int -txp_reset_adapter(sc) - struct txp_softc *sc; +txp_reset_adapter(struct txp_softc *sc) { u_int32_t r; int i; @@ -363,8 +357,7 @@ txp_reset_adapter(sc) } int -txp_download_fw(sc) - struct txp_softc *sc; +txp_download_fw(struct txp_softc *sc) { struct txp_fw_file_header *fileheader; struct txp_fw_section_header *secthead; @@ -450,8 +443,7 @@ fail: } int -txp_download_fw_wait(sc) - struct txp_softc *sc; +txp_download_fw_wait(struct txp_softc *sc) { u_int32_t i, r; @@ -478,12 +470,9 @@ txp_download_fw_wait(sc) } int -txp_download_fw_section(sc, sect, sectnum, buf, buflen) - struct txp_softc *sc; - struct txp_fw_section_header *sect; - int sectnum; - u_char *buf; - size_t buflen; +txp_download_fw_section(struct txp_softc *sc, + struct txp_fw_section_header *sect, int sectnum, u_char *buf, + size_t buflen) { struct txp_dma_alloc dma; int rseg, err = 0; @@ -559,8 +548,7 @@ bail: } int -txp_intr(vsc) - void *vsc; +txp_intr(void *vsc) { struct txp_softc *sc = vsc; struct txp_hostvar *hv = sc->sc_hostvar; @@ -613,10 +601,8 @@ txp_intr(vsc) } void -txp_rx_reclaim(sc, r, dma) - struct txp_softc *sc; - struct txp_rx_ring *r; - struct txp_dma_alloc *dma; +txp_rx_reclaim(struct txp_softc *sc, struct txp_rx_ring *r, + struct txp_dma_alloc *dma) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct txp_rx_desc *rxd; @@ -759,8 +745,7 @@ next: } void -txp_rxbuf_reclaim(sc) - struct txp_softc *sc; +txp_rxbuf_reclaim(struct txp_softc *sc) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct txp_hostvar *hv = sc->sc_hostvar; @@ -841,10 +826,8 @@ err_sd: * Reclaim mbufs and entries from a transmit ring. */ void -txp_tx_reclaim(sc, r, dma) - struct txp_softc *sc; - struct txp_tx_ring *r; - struct txp_dma_alloc *dma; +txp_tx_reclaim(struct txp_softc *sc, struct txp_tx_ring *r, + struct txp_dma_alloc *dma) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; u_int32_t idx = TXP_OFFSET2IDX(letoh32(*(r->r_off))); @@ -896,8 +879,7 @@ txp_tx_reclaim(sc, r, dma) } void -txp_shutdown(vsc) - void *vsc; +txp_shutdown(void *vsc) { struct txp_softc *sc = (struct txp_softc *)vsc; @@ -913,8 +895,7 @@ txp_shutdown(vsc) } int -txp_alloc_rings(sc) - struct txp_softc *sc; +txp_alloc_rings(struct txp_softc *sc) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct txp_boot_record *boot; @@ -1178,11 +1159,8 @@ bail_boot: } int -txp_dma_malloc(sc, size, dma, mapflags) - struct txp_softc *sc; - bus_size_t size; - struct txp_dma_alloc *dma; - int mapflags; +txp_dma_malloc(struct txp_softc *sc, bus_size_t size, + struct txp_dma_alloc *dma, int mapflags) { int r; @@ -1216,9 +1194,7 @@ fail_0: } void -txp_dma_free(sc, dma) - struct txp_softc *sc; - struct txp_dma_alloc *dma; +txp_dma_free(struct txp_softc *sc, struct txp_dma_alloc *dma) { bus_dmamap_unload(sc->sc_dmat, dma->dma_map); bus_dmamem_unmap(sc->sc_dmat, dma->dma_vaddr, dma->dma_map->dm_mapsize); @@ -1227,10 +1203,7 @@ txp_dma_free(sc, dma) } int -txp_ioctl(ifp, command, data) - struct ifnet *ifp; - u_long command; - caddr_t data; +txp_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct txp_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; @@ -1298,8 +1271,7 @@ txp_ioctl(ifp, command, data) } void -txp_init(sc) - struct txp_softc *sc; +txp_init(struct txp_softc *sc) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; int s; @@ -1331,8 +1303,7 @@ txp_init(sc) } void -txp_tick(vsc) - void *vsc; +txp_tick(void *vsc) { struct txp_softc *sc = vsc; struct ifnet *ifp = &sc->sc_arpcom.ac_if; @@ -1371,8 +1342,7 @@ out: } void -txp_start(ifp) - struct ifnet *ifp; +txp_start(struct ifnet *ifp) { struct txp_softc *sc = ifp->if_softc; struct txp_tx_ring *r = &sc->sc_txhir; @@ -1558,11 +1528,9 @@ oactive1: * Handle simple commands sent to the typhoon */ int -txp_command(sc, id, in1, in2, in3, out1, out2, out3, wait) - struct txp_softc *sc; - u_int16_t id, in1, *out1; - u_int32_t in2, in3, *out2, *out3; - int wait; +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) { struct txp_rsp_desc *rsp = NULL; @@ -1583,14 +1551,9 @@ txp_command(sc, id, in1, in2, in3, out1, out2, out3, wait) } int -txp_command2(sc, id, in1, in2, in3, in_extp, in_extn, rspp, wait) - struct txp_softc *sc; - u_int16_t id, in1; - u_int32_t in2, in3; - struct txp_ext_desc *in_extp; - u_int8_t in_extn; - struct txp_rsp_desc **rspp; - int wait; +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,struct txp_rsp_desc **rspp, int wait) { struct txp_hostvar *hv = sc->sc_hostvar; struct txp_cmd_desc *cmd; @@ -1663,12 +1626,8 @@ txp_command2(sc, id, in1, in2, in3, in_extp, in_extn, rspp, wait) } int -txp_response(sc, ridx, id, seq, rspp) - struct txp_softc *sc; - u_int32_t ridx; - u_int16_t id; - u_int16_t seq; - struct txp_rsp_desc **rspp; +txp_response(struct txp_softc *sc, u_int32_t ridx, u_int16_t id, + u_int16_t seq, struct txp_rsp_desc **rspp) { struct txp_hostvar *hv = sc->sc_hostvar; struct txp_rsp_desc *rsp; @@ -1715,9 +1674,8 @@ txp_response(sc, ridx, id, seq, rspp) } void -txp_rsp_fixup(sc, rsp, dst) - struct txp_softc *sc; - struct txp_rsp_desc *rsp, *dst; +txp_rsp_fixup(struct txp_softc *sc, struct txp_rsp_desc *rsp, + struct txp_rsp_desc *dst) { struct txp_rsp_desc *src = rsp; struct txp_hostvar *hv = sc->sc_hostvar; @@ -1742,8 +1700,7 @@ txp_rsp_fixup(sc, rsp, dst) } int -txp_cmd_desc_numfree(sc) - struct txp_softc *sc; +txp_cmd_desc_numfree(struct txp_softc *sc) { struct txp_hostvar *hv = sc->sc_hostvar; struct txp_boot_record *br = sc->sc_boot; @@ -1767,8 +1724,7 @@ txp_cmd_desc_numfree(sc) } void -txp_stop(sc) - struct txp_softc *sc; +txp_stop(struct txp_softc *sc) { txp_command(sc, TXP_CMD_TX_DISABLE, 0, 0, 0, NULL, NULL, NULL, 1); txp_command(sc, TXP_CMD_RX_DISABLE, 0, 0, 0, NULL, NULL, NULL, 1); @@ -1777,14 +1733,12 @@ txp_stop(sc) } void -txp_watchdog(ifp) - struct ifnet *ifp; +txp_watchdog(struct ifnet *ifp) { } int -txp_ifmedia_upd(ifp) - struct ifnet *ifp; +txp_ifmedia_upd(struct ifnet *ifp) { struct txp_softc *sc = ifp->if_softc; struct ifmedia *ifm = &sc->sc_ifmedia; @@ -1820,9 +1774,7 @@ txp_ifmedia_upd(ifp) } void -txp_ifmedia_sts(ifp, ifmr) - struct ifnet *ifp; - struct ifmediareq *ifmr; +txp_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) { struct txp_softc *sc = ifp->if_softc; struct ifmedia *ifm = &sc->sc_ifmedia; @@ -1891,8 +1843,7 @@ bail: } void -txp_show_descriptor(d) - void *d; +txp_show_descriptor(void *d) { struct txp_cmd_desc *cmd = d; struct txp_rsp_desc *rsp = d; @@ -1937,8 +1888,7 @@ txp_show_descriptor(d) } void -txp_set_filter(sc) - struct txp_softc *sc; +txp_set_filter(struct txp_softc *sc) { struct arpcom *ac = &sc->sc_arpcom; struct ifnet *ifp = &sc->sc_arpcom.ac_if; @@ -2001,8 +1951,7 @@ setit: } void -txp_capabilities(sc) - struct txp_softc *sc; +txp_capabilities(struct txp_softc *sc) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct txp_rsp_desc *rsp = NULL; |