diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c index a4ea930657aa..d77acb5fad8a 100644 --- a/sys/dev/ti/if_ti.c +++ b/sys/dev/ti/if_ti.c @@ -430,7 +430,8 @@ static u_int8_t ti_eeprom_getbyte(sc, addr, dest) /* * Read a sequence of bytes from the EEPROM. */ -static int ti_read_eeprom(sc, dest, off, cnt) +static int +ti_read_eeprom(sc, dest, off, cnt) struct ti_softc *sc; caddr_t dest; int off; @@ -453,7 +454,8 @@ static int ti_read_eeprom(sc, dest, off, cnt) * NIC memory access function. Can be used to either clear a section * of NIC local memory or (if buf is non-NULL) copy data into it. */ -static void ti_mem(sc, addr, len, buf) +static void +ti_mem(sc, addr, len, buf) struct ti_softc *sc; u_int32_t addr, len; caddr_t buf; @@ -824,7 +826,8 @@ ti_bcopy_swap(src, dst, len, swap_type) * is acceptable and see if we want the firmware for the Tigon 1 or * Tigon 2. */ -static void ti_loadfw(sc) +static void +ti_loadfw(sc) struct ti_softc *sc; { switch(sc->ti_hwrev) { @@ -882,7 +885,8 @@ static void ti_loadfw(sc) /* * Send the NIC a command via the command ring. */ -static void ti_cmd(sc, cmd) +static void +ti_cmd(sc, cmd) struct ti_softc *sc; struct ti_cmd_desc *cmd; { @@ -904,7 +908,8 @@ static void ti_cmd(sc, cmd) * Send the NIC an extended command. The 'len' parameter specifies the * number of command slots to include after the initial command. */ -static void ti_cmd_ext(sc, cmd, arg, len) +static void +ti_cmd_ext(sc, cmd, arg, len) struct ti_softc *sc; struct ti_cmd_desc *cmd; caddr_t arg; @@ -933,7 +938,8 @@ static void ti_cmd_ext(sc, cmd, arg, len) /* * Handle events that have triggered interrupts. */ -static void ti_handle_events(sc) +static void +ti_handle_events(sc) struct ti_softc *sc; { struct ti_event_desc *e; @@ -1009,7 +1015,8 @@ static void ti_handle_events(sc) * be tuned by changing a #define in if_tireg.h. */ -static int ti_alloc_jumbo_mem(sc) +static int +ti_alloc_jumbo_mem(sc) struct ti_softc *sc; { caddr_t ptr; @@ -1076,7 +1083,8 @@ static void *ti_jalloc(sc) /* * Release a jumbo buffer. */ -static void ti_jfree(buf, args) +static void +ti_jfree(buf, args) void *buf; void *args; { @@ -1112,7 +1120,8 @@ static void ti_jfree(buf, args) /* * Intialize a standard receive ring descriptor. */ -static int ti_newbuf_std(sc, i, m) +static int +ti_newbuf_std(sc, i, m) struct ti_softc *sc; int i; struct mbuf *m; @@ -1155,7 +1164,8 @@ static int ti_newbuf_std(sc, i, m) * Intialize a mini receive ring descriptor. This only applies to * the Tigon 2. */ -static int ti_newbuf_mini(sc, i, m) +static int +ti_newbuf_mini(sc, i, m) struct ti_softc *sc; int i; struct mbuf *m; @@ -1195,7 +1205,8 @@ static int ti_newbuf_mini(sc, i, m) * Initialize a jumbo receive ring descriptor. This allocates * a jumbo buffer from the pool managed internally by the driver. */ -static int ti_newbuf_jumbo(sc, i, m) +static int +ti_newbuf_jumbo(sc, i, m) struct ti_softc *sc; int i; struct mbuf *m; @@ -1400,7 +1411,8 @@ ti_newbuf_jumbo(sc, idx, m_old) * 256 ring entries and hope that our CPU is fast enough to keep up with * the NIC. */ -static int ti_init_rx_ring_std(sc) +static int +ti_init_rx_ring_std(sc) struct ti_softc *sc; { register int i; @@ -1417,7 +1429,8 @@ static int ti_init_rx_ring_std(sc) return(0); } -static void ti_free_rx_ring_std(sc) +static void +ti_free_rx_ring_std(sc) struct ti_softc *sc; { register int i; @@ -1434,7 +1447,8 @@ static void ti_free_rx_ring_std(sc) return; } -static int ti_init_rx_ring_jumbo(sc) +static int +ti_init_rx_ring_jumbo(sc) struct ti_softc *sc; { register int i; @@ -1451,7 +1465,8 @@ static int ti_init_rx_ring_jumbo(sc) return(0); } -static void ti_free_rx_ring_jumbo(sc) +static void +ti_free_rx_ring_jumbo(sc) struct ti_softc *sc; { register int i; @@ -1468,7 +1483,8 @@ static void ti_free_rx_ring_jumbo(sc) return; } -static int ti_init_rx_ring_mini(sc) +static int +ti_init_rx_ring_mini(sc) struct ti_softc *sc; { register int i; @@ -1484,7 +1500,8 @@ static int ti_init_rx_ring_mini(sc) return(0); } -static void ti_free_rx_ring_mini(sc) +static void +ti_free_rx_ring_mini(sc) struct ti_softc *sc; { register int i; @@ -1501,7 +1518,8 @@ static void ti_free_rx_ring_mini(sc) return; } -static void ti_free_tx_ring(sc) +static void +ti_free_tx_ring(sc) struct ti_softc *sc; { register int i; @@ -1521,7 +1539,8 @@ static void ti_free_tx_ring(sc) return; } -static int ti_init_tx_ring(sc) +static int +ti_init_tx_ring(sc) struct ti_softc *sc; { sc->ti_txcnt = 0; @@ -1535,7 +1554,8 @@ static int ti_init_tx_ring(sc) * but we have to support the old way too so that Tigon 1 cards will * work. */ -void ti_add_mcast(sc, addr) +void +ti_add_mcast(sc, addr) struct ti_softc *sc; struct ether_addr *addr; { @@ -1564,7 +1584,8 @@ void ti_add_mcast(sc, addr) return; } -void ti_del_mcast(sc, addr) +void +ti_del_mcast(sc, addr) struct ti_softc *sc; struct ether_addr *addr; { @@ -1607,7 +1628,8 @@ void ti_del_mcast(sc, addr) * state so we know what addresses have been programmed into the NIC at * any given time. */ -static void ti_setmulti(sc) +static void +ti_setmulti(sc) struct ti_softc *sc; { struct ifnet *ifp; @@ -1685,7 +1707,8 @@ static int ti_64bitslot_war(sc) * Do endian, PCI and DMA initialization. Also check the on-board ROM * self-test results. */ -static int ti_chipinit(sc) +static int +ti_chipinit(sc) struct ti_softc *sc; { u_int32_t cacheline; @@ -1849,7 +1872,8 @@ static int ti_chipinit(sc) * Initialize the general information block and firmware, and * start the CPU(s) running. */ -static int ti_gibinit(sc) +static int +ti_gibinit(sc) struct ti_softc *sc; { struct ti_rcb *rcb; @@ -2022,7 +2046,8 @@ static int ti_gibinit(sc) * Probe for a Tigon chip. Check the PCI vendor and device IDs * against our list and return its name if we find a match. */ -static int ti_probe(dev) +static int +ti_probe(dev) device_t dev; { struct ti_type *t; @@ -2073,7 +2098,8 @@ ti_mbuf_sanity(device_t dev) #endif -static int ti_attach(dev) +static int +ti_attach(dev) device_t dev; { u_int32_t command; @@ -2376,7 +2402,8 @@ ti_unref_special(device_t dev) } -static int ti_detach(dev) +static int +ti_detach(dev) device_t dev; { struct ti_softc *sc; @@ -2476,7 +2503,8 @@ ti_hdr_split(struct mbuf *top, int hdr_len, int pkt_len, int idx) * 3) the frame is from the standard receive ring */ -static void ti_rxeof(sc) +static void +ti_rxeof(sc) struct ti_softc *sc; { struct ifnet *ifp; @@ -2600,7 +2628,8 @@ static void ti_rxeof(sc) return; } -static void ti_txeof(sc) +static void +ti_txeof(sc) struct ti_softc *sc; { struct ti_tx_desc *cur_tx = NULL; @@ -2649,7 +2678,8 @@ static void ti_txeof(sc) return; } -static void ti_intr(xsc) +static void +ti_intr(xsc) void *xsc; { struct ti_softc *sc; @@ -2692,7 +2722,8 @@ static void ti_intr(xsc) return; } -static void ti_stats_update(sc) +static void +ti_stats_update(sc) struct ti_softc *sc; { struct ifnet *ifp; @@ -2713,7 +2744,8 @@ static void ti_stats_update(sc) * Encapsulate an mbuf chain in the tx ring by coupling the mbuf data * pointers to descriptors. */ -static int ti_encap(sc, m_head, txidx) +static int +ti_encap(sc, m_head, txidx) struct ti_softc *sc; struct mbuf *m_head; u_int32_t *txidx; @@ -2813,7 +2845,8 @@ static int ti_encap(sc, m_head, txidx) * Main transmit routine. To avoid having to do mbuf copies, we put pointers * to the mbuf data regions directly in the transmit descriptors. */ -static void ti_start(ifp) +static void +ti_start(ifp) struct ifnet *ifp; { struct ti_softc *sc; @@ -2879,7 +2912,8 @@ static void ti_start(ifp) return; } -static void ti_init(xsc) +static void +ti_init(xsc) void *xsc; { struct ti_softc *sc = xsc; @@ -2988,7 +3022,8 @@ static void ti_init2(sc) /* * Set media options. */ -static int ti_ifmedia_upd(ifp) +static int +ti_ifmedia_upd(ifp) struct ifnet *ifp; { struct ti_softc *sc; @@ -3089,7 +3124,8 @@ static int ti_ifmedia_upd(ifp) /* * Report current media status. */ -static void ti_ifmedia_sts(ifp, ifmr) +static void +ti_ifmedia_sts(ifp, ifmr) struct ifnet *ifp; struct ifmediareq *ifmr; { @@ -3138,7 +3174,8 @@ static void ti_ifmedia_sts(ifp, ifmr) return; } -static int ti_ioctl(ifp, command, data) +static int +ti_ioctl(ifp, command, data) struct ifnet *ifp; u_long command; caddr_t data; @@ -3533,7 +3570,8 @@ ti_ioctl2(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) return(error); } -static void ti_watchdog(ifp) +static void +ti_watchdog(ifp) struct ifnet *ifp; { struct ti_softc *sc; @@ -3565,7 +3603,8 @@ static void ti_watchdog(ifp) * Stop the adapter and free any mbufs allocated to the * RX and TX lists. */ -static void ti_stop(sc) +static void +ti_stop(sc) struct ti_softc *sc; { struct ifnet *ifp; @@ -3614,7 +3653,8 @@ static void ti_stop(sc) * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void ti_shutdown(dev) +static void +ti_shutdown(dev) device_t dev; { struct ti_softc *sc; diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c index 18f8fde950a5..f96e0e233fc9 100644 --- a/sys/dev/vr/if_vr.c +++ b/sys/dev/vr/if_vr.c @@ -234,7 +234,8 @@ DRIVER_MODULE(miibus, vr, miibus_driver, miibus_devclass, 0, 0); /* * Sync the PHYs by setting data bit and strobing the clock 32 times. */ -static void vr_mii_sync(sc) +static void +vr_mii_sync(sc) struct vr_softc *sc; { register int i; @@ -254,7 +255,8 @@ static void vr_mii_sync(sc) /* * Clock a series of bits through the MII. */ -static void vr_mii_send(sc, bits, cnt) +static void +vr_mii_send(sc, bits, cnt) struct vr_softc *sc; u_int32_t bits; int cnt; @@ -279,7 +281,8 @@ static void vr_mii_send(sc, bits, cnt) /* * Read an PHY register through the MII. */ -static int vr_mii_readreg(sc, frame) +static int +vr_mii_readreg(sc, frame) struct vr_softc *sc; struct vr_mii_frame *frame; @@ -373,7 +376,8 @@ static int vr_mii_readreg(sc, frame) /* * Write to a PHY register through the MII. */ -static int vr_mii_writereg(sc, frame) +static int +vr_mii_writereg(sc, frame) struct vr_softc *sc; struct vr_mii_frame *frame; @@ -421,7 +425,8 @@ static int vr_mii_writereg(sc, frame) return(0); } -static int vr_miibus_readreg(dev, phy, reg) +static int +vr_miibus_readreg(dev, phy, reg) device_t dev; int phy, reg; { @@ -438,7 +443,8 @@ static int vr_miibus_readreg(dev, phy, reg) return(frame.mii_data); } -static int vr_miibus_writereg(dev, phy, reg, data) +static int +vr_miibus_writereg(dev, phy, reg, data) device_t dev; u_int16_t phy, reg, data; { @@ -457,7 +463,8 @@ static int vr_miibus_writereg(dev, phy, reg, data) return(0); } -static void vr_miibus_statchg(dev) +static void +vr_miibus_statchg(dev) device_t dev; { struct vr_softc *sc; @@ -503,7 +510,8 @@ static u_int8_t vr_calchash(addr) /* * Program the 64-bit multicast hash filter. */ -static void vr_setmulti(sc) +static void +vr_setmulti(sc) struct vr_softc *sc; { struct ifnet *ifp; @@ -558,7 +566,8 @@ static void vr_setmulti(sc) * 'full-duplex' and '100Mbps' bits in the netconfig register, we * first have to put the transmit and/or receive logic in the idle state. */ -static void vr_setcfg(sc, media) +static void +vr_setcfg(sc, media) struct vr_softc *sc; int media; { @@ -580,7 +589,8 @@ static void vr_setcfg(sc, media) return; } -static void vr_reset(sc) +static void +vr_reset(sc) struct vr_softc *sc; { register int i; @@ -605,7 +615,8 @@ static void vr_reset(sc) * Probe for a VIA Rhine chip. Check the PCI vendor and device * IDs against our list and return a device name if we find a match. */ -static int vr_probe(dev) +static int +vr_probe(dev) device_t dev; { struct vr_type *t; @@ -628,7 +639,8 @@ static int vr_probe(dev) * Attach the interface. Allocate softc structures, do ifmedia * setup and ethernet/BPF attach. */ -static int vr_attach(dev) +static int +vr_attach(dev) device_t dev; { int i; @@ -814,7 +826,8 @@ static int vr_attach(dev) return(error); } -static int vr_detach(dev) +static int +vr_detach(dev) device_t dev; { struct vr_softc *sc; @@ -845,7 +858,8 @@ static int vr_detach(dev) /* * Initialize the transmit descriptors. */ -static int vr_list_tx_init(sc) +static int +vr_list_tx_init(sc) struct vr_softc *sc; { struct vr_chain_data *cd; @@ -876,7 +890,8 @@ static int vr_list_tx_init(sc) * we arrange the descriptors in a closed ring, so that the last descriptor * points back to the first. */ -static int vr_list_rx_init(sc) +static int +vr_list_rx_init(sc) struct vr_softc *sc; { struct vr_chain_data *cd; @@ -916,7 +931,8 @@ static int vr_list_rx_init(sc) * MCLBYTES is 2048, so we have to subtract one otherwise we'll * overflow the field and make a mess. */ -static int vr_newbuf(sc, c, m) +static int +vr_newbuf(sc, c, m) struct vr_softc *sc; struct vr_chain_onefrag *c; struct mbuf *m; @@ -954,7 +970,8 @@ static int vr_newbuf(sc, c, m) * A frame has been uploaded: pass the resulting mbuf chain up to * the higher level protocols. */ -static void vr_rxeof(sc) +static void +vr_rxeof(sc) struct vr_softc *sc; { struct ether_header *eh; @@ -1045,7 +1062,8 @@ static void vr_rxeof(sc) return; } -void vr_rxeoc(sc) +void +vr_rxeoc(sc) struct vr_softc *sc; { @@ -1063,7 +1081,8 @@ void vr_rxeoc(sc) * the list buffers. */ -static void vr_txeof(sc) +static void +vr_txeof(sc) struct vr_softc *sc; { struct vr_chain *cur_tx; @@ -1131,7 +1150,8 @@ static void vr_txeof(sc) /* * TX 'end of channel' interrupt handler. */ -static void vr_txeoc(sc) +static void +vr_txeoc(sc) struct vr_softc *sc; { struct ifnet *ifp; @@ -1147,7 +1167,8 @@ static void vr_txeoc(sc) return; } -static void vr_tick(xsc) +static void +vr_tick(xsc) void *xsc; { struct vr_softc *sc; @@ -1165,7 +1186,8 @@ static void vr_tick(xsc) return; } -static void vr_intr(arg) +static void +vr_intr(arg) void *arg; { struct vr_softc *sc; @@ -1244,7 +1266,8 @@ static void vr_intr(arg) * Encapsulate an mbuf chain in a descriptor by coupling the mbuf data * pointers to the fragment pointers. */ -static int vr_encap(sc, c, m_head) +static int +vr_encap(sc, c, m_head) struct vr_softc *sc; struct vr_chain *c; struct mbuf *m_head; @@ -1316,7 +1339,8 @@ static int vr_encap(sc, c, m_head) * physical addresses. */ -static void vr_start(ifp) +static void +vr_start(ifp) struct ifnet *ifp; { struct vr_softc *sc; @@ -1395,7 +1419,8 @@ static void vr_start(ifp) return; } -static void vr_init(xsc) +static void +vr_init(xsc) void *xsc; { struct vr_softc *sc = xsc; @@ -1503,7 +1528,8 @@ static void vr_init(xsc) /* * Set media options. */ -static int vr_ifmedia_upd(ifp) +static int +vr_ifmedia_upd(ifp) struct ifnet *ifp; { struct vr_softc *sc; @@ -1519,7 +1545,8 @@ static int vr_ifmedia_upd(ifp) /* * Report current media status. */ -static void vr_ifmedia_sts(ifp, ifmr) +static void +vr_ifmedia_sts(ifp, ifmr) struct ifnet *ifp; struct ifmediareq *ifmr; { @@ -1535,7 +1562,8 @@ static void vr_ifmedia_sts(ifp, ifmr) return; } -static int vr_ioctl(ifp, command, data) +static int +vr_ioctl(ifp, command, data) struct ifnet *ifp; u_long command; caddr_t data; @@ -1582,7 +1610,8 @@ static int vr_ioctl(ifp, command, data) return(error); } -static void vr_watchdog(ifp) +static void +vr_watchdog(ifp) struct ifnet *ifp; { struct vr_softc *sc; @@ -1609,7 +1638,8 @@ static void vr_watchdog(ifp) * Stop the adapter and free any mbufs allocated to the * RX and TX lists. */ -static void vr_stop(sc) +static void +vr_stop(sc) struct vr_softc *sc; { register int i; @@ -1663,7 +1693,8 @@ static void vr_stop(sc) * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void vr_shutdown(dev) +static void +vr_shutdown(dev) device_t dev; { struct vr_softc *sc; diff --git a/sys/pci/if_ti.c b/sys/pci/if_ti.c index a4ea930657aa..d77acb5fad8a 100644 --- a/sys/pci/if_ti.c +++ b/sys/pci/if_ti.c @@ -430,7 +430,8 @@ static u_int8_t ti_eeprom_getbyte(sc, addr, dest) /* * Read a sequence of bytes from the EEPROM. */ -static int ti_read_eeprom(sc, dest, off, cnt) +static int +ti_read_eeprom(sc, dest, off, cnt) struct ti_softc *sc; caddr_t dest; int off; @@ -453,7 +454,8 @@ static int ti_read_eeprom(sc, dest, off, cnt) * NIC memory access function. Can be used to either clear a section * of NIC local memory or (if buf is non-NULL) copy data into it. */ -static void ti_mem(sc, addr, len, buf) +static void +ti_mem(sc, addr, len, buf) struct ti_softc *sc; u_int32_t addr, len; caddr_t buf; @@ -824,7 +826,8 @@ ti_bcopy_swap(src, dst, len, swap_type) * is acceptable and see if we want the firmware for the Tigon 1 or * Tigon 2. */ -static void ti_loadfw(sc) +static void +ti_loadfw(sc) struct ti_softc *sc; { switch(sc->ti_hwrev) { @@ -882,7 +885,8 @@ static void ti_loadfw(sc) /* * Send the NIC a command via the command ring. */ -static void ti_cmd(sc, cmd) +static void +ti_cmd(sc, cmd) struct ti_softc *sc; struct ti_cmd_desc *cmd; { @@ -904,7 +908,8 @@ static void ti_cmd(sc, cmd) * Send the NIC an extended command. The 'len' parameter specifies the * number of command slots to include after the initial command. */ -static void ti_cmd_ext(sc, cmd, arg, len) +static void +ti_cmd_ext(sc, cmd, arg, len) struct ti_softc *sc; struct ti_cmd_desc *cmd; caddr_t arg; @@ -933,7 +938,8 @@ static void ti_cmd_ext(sc, cmd, arg, len) /* * Handle events that have triggered interrupts. */ -static void ti_handle_events(sc) +static void +ti_handle_events(sc) struct ti_softc *sc; { struct ti_event_desc *e; @@ -1009,7 +1015,8 @@ static void ti_handle_events(sc) * be tuned by changing a #define in if_tireg.h. */ -static int ti_alloc_jumbo_mem(sc) +static int +ti_alloc_jumbo_mem(sc) struct ti_softc *sc; { caddr_t ptr; @@ -1076,7 +1083,8 @@ static void *ti_jalloc(sc) /* * Release a jumbo buffer. */ -static void ti_jfree(buf, args) +static void +ti_jfree(buf, args) void *buf; void *args; { @@ -1112,7 +1120,8 @@ static void ti_jfree(buf, args) /* * Intialize a standard receive ring descriptor. */ -static int ti_newbuf_std(sc, i, m) +static int +ti_newbuf_std(sc, i, m) struct ti_softc *sc; int i; struct mbuf *m; @@ -1155,7 +1164,8 @@ static int ti_newbuf_std(sc, i, m) * Intialize a mini receive ring descriptor. This only applies to * the Tigon 2. */ -static int ti_newbuf_mini(sc, i, m) +static int +ti_newbuf_mini(sc, i, m) struct ti_softc *sc; int i; struct mbuf *m; @@ -1195,7 +1205,8 @@ static int ti_newbuf_mini(sc, i, m) * Initialize a jumbo receive ring descriptor. This allocates * a jumbo buffer from the pool managed internally by the driver. */ -static int ti_newbuf_jumbo(sc, i, m) +static int +ti_newbuf_jumbo(sc, i, m) struct ti_softc *sc; int i; struct mbuf *m; @@ -1400,7 +1411,8 @@ ti_newbuf_jumbo(sc, idx, m_old) * 256 ring entries and hope that our CPU is fast enough to keep up with * the NIC. */ -static int ti_init_rx_ring_std(sc) +static int +ti_init_rx_ring_std(sc) struct ti_softc *sc; { register int i; @@ -1417,7 +1429,8 @@ static int ti_init_rx_ring_std(sc) return(0); } -static void ti_free_rx_ring_std(sc) +static void +ti_free_rx_ring_std(sc) struct ti_softc *sc; { register int i; @@ -1434,7 +1447,8 @@ static void ti_free_rx_ring_std(sc) return; } -static int ti_init_rx_ring_jumbo(sc) +static int +ti_init_rx_ring_jumbo(sc) struct ti_softc *sc; { register int i; @@ -1451,7 +1465,8 @@ static int ti_init_rx_ring_jumbo(sc) return(0); } -static void ti_free_rx_ring_jumbo(sc) +static void +ti_free_rx_ring_jumbo(sc) struct ti_softc *sc; { register int i; @@ -1468,7 +1483,8 @@ static void ti_free_rx_ring_jumbo(sc) return; } -static int ti_init_rx_ring_mini(sc) +static int +ti_init_rx_ring_mini(sc) struct ti_softc *sc; { register int i; @@ -1484,7 +1500,8 @@ static int ti_init_rx_ring_mini(sc) return(0); } -static void ti_free_rx_ring_mini(sc) +static void +ti_free_rx_ring_mini(sc) struct ti_softc *sc; { register int i; @@ -1501,7 +1518,8 @@ static void ti_free_rx_ring_mini(sc) return; } -static void ti_free_tx_ring(sc) +static void +ti_free_tx_ring(sc) struct ti_softc *sc; { register int i; @@ -1521,7 +1539,8 @@ static void ti_free_tx_ring(sc) return; } -static int ti_init_tx_ring(sc) +static int +ti_init_tx_ring(sc) struct ti_softc *sc; { sc->ti_txcnt = 0; @@ -1535,7 +1554,8 @@ static int ti_init_tx_ring(sc) * but we have to support the old way too so that Tigon 1 cards will * work. */ -void ti_add_mcast(sc, addr) +void +ti_add_mcast(sc, addr) struct ti_softc *sc; struct ether_addr *addr; { @@ -1564,7 +1584,8 @@ void ti_add_mcast(sc, addr) return; } -void ti_del_mcast(sc, addr) +void +ti_del_mcast(sc, addr) struct ti_softc *sc; struct ether_addr *addr; { @@ -1607,7 +1628,8 @@ void ti_del_mcast(sc, addr) * state so we know what addresses have been programmed into the NIC at * any given time. */ -static void ti_setmulti(sc) +static void +ti_setmulti(sc) struct ti_softc *sc; { struct ifnet *ifp; @@ -1685,7 +1707,8 @@ static int ti_64bitslot_war(sc) * Do endian, PCI and DMA initialization. Also check the on-board ROM * self-test results. */ -static int ti_chipinit(sc) +static int +ti_chipinit(sc) struct ti_softc *sc; { u_int32_t cacheline; @@ -1849,7 +1872,8 @@ static int ti_chipinit(sc) * Initialize the general information block and firmware, and * start the CPU(s) running. */ -static int ti_gibinit(sc) +static int +ti_gibinit(sc) struct ti_softc *sc; { struct ti_rcb *rcb; @@ -2022,7 +2046,8 @@ static int ti_gibinit(sc) * Probe for a Tigon chip. Check the PCI vendor and device IDs * against our list and return its name if we find a match. */ -static int ti_probe(dev) +static int +ti_probe(dev) device_t dev; { struct ti_type *t; @@ -2073,7 +2098,8 @@ ti_mbuf_sanity(device_t dev) #endif -static int ti_attach(dev) +static int +ti_attach(dev) device_t dev; { u_int32_t command; @@ -2376,7 +2402,8 @@ ti_unref_special(device_t dev) } -static int ti_detach(dev) +static int +ti_detach(dev) device_t dev; { struct ti_softc *sc; @@ -2476,7 +2503,8 @@ ti_hdr_split(struct mbuf *top, int hdr_len, int pkt_len, int idx) * 3) the frame is from the standard receive ring */ -static void ti_rxeof(sc) +static void +ti_rxeof(sc) struct ti_softc *sc; { struct ifnet *ifp; @@ -2600,7 +2628,8 @@ static void ti_rxeof(sc) return; } -static void ti_txeof(sc) +static void +ti_txeof(sc) struct ti_softc *sc; { struct ti_tx_desc *cur_tx = NULL; @@ -2649,7 +2678,8 @@ static void ti_txeof(sc) return; } -static void ti_intr(xsc) +static void +ti_intr(xsc) void *xsc; { struct ti_softc *sc; @@ -2692,7 +2722,8 @@ static void ti_intr(xsc) return; } -static void ti_stats_update(sc) +static void +ti_stats_update(sc) struct ti_softc *sc; { struct ifnet *ifp; @@ -2713,7 +2744,8 @@ static void ti_stats_update(sc) * Encapsulate an mbuf chain in the tx ring by coupling the mbuf data * pointers to descriptors. */ -static int ti_encap(sc, m_head, txidx) +static int +ti_encap(sc, m_head, txidx) struct ti_softc *sc; struct mbuf *m_head; u_int32_t *txidx; @@ -2813,7 +2845,8 @@ static int ti_encap(sc, m_head, txidx) * Main transmit routine. To avoid having to do mbuf copies, we put pointers * to the mbuf data regions directly in the transmit descriptors. */ -static void ti_start(ifp) +static void +ti_start(ifp) struct ifnet *ifp; { struct ti_softc *sc; @@ -2879,7 +2912,8 @@ static void ti_start(ifp) return; } -static void ti_init(xsc) +static void +ti_init(xsc) void *xsc; { struct ti_softc *sc = xsc; @@ -2988,7 +3022,8 @@ static void ti_init2(sc) /* * Set media options. */ -static int ti_ifmedia_upd(ifp) +static int +ti_ifmedia_upd(ifp) struct ifnet *ifp; { struct ti_softc *sc; @@ -3089,7 +3124,8 @@ static int ti_ifmedia_upd(ifp) /* * Report current media status. */ -static void ti_ifmedia_sts(ifp, ifmr) +static void +ti_ifmedia_sts(ifp, ifmr) struct ifnet *ifp; struct ifmediareq *ifmr; { @@ -3138,7 +3174,8 @@ static void ti_ifmedia_sts(ifp, ifmr) return; } -static int ti_ioctl(ifp, command, data) +static int +ti_ioctl(ifp, command, data) struct ifnet *ifp; u_long command; caddr_t data; @@ -3533,7 +3570,8 @@ ti_ioctl2(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) return(error); } -static void ti_watchdog(ifp) +static void +ti_watchdog(ifp) struct ifnet *ifp; { struct ti_softc *sc; @@ -3565,7 +3603,8 @@ static void ti_watchdog(ifp) * Stop the adapter and free any mbufs allocated to the * RX and TX lists. */ -static void ti_stop(sc) +static void +ti_stop(sc) struct ti_softc *sc; { struct ifnet *ifp; @@ -3614,7 +3653,8 @@ static void ti_stop(sc) * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void ti_shutdown(dev) +static void +ti_shutdown(dev) device_t dev; { struct ti_softc *sc; diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c index 1c52f9a69e16..2702f3140495 100644 --- a/sys/pci/if_tl.c +++ b/sys/pci/if_tl.c @@ -413,7 +413,8 @@ static void tl_dio_write32(sc, reg, val) return; } -static void tl_dio_setbit(sc, reg, bit) +static void +tl_dio_setbit(sc, reg, bit) struct tl_softc *sc; int reg; int bit; @@ -428,7 +429,8 @@ static void tl_dio_setbit(sc, reg, bit) return; } -static void tl_dio_clrbit(sc, reg, bit) +static void +tl_dio_clrbit(sc, reg, bit) struct tl_softc *sc; int reg; int bit; @@ -588,7 +590,8 @@ static u_int8_t tl_eeprom_getbyte(sc, addr, dest) /* * Read a sequence of bytes from the EEPROM. */ -static int tl_read_eeprom(sc, dest, off, cnt) +static int +tl_read_eeprom(sc, dest, off, cnt) struct tl_softc *sc; caddr_t dest; int off; @@ -607,7 +610,8 @@ static int tl_read_eeprom(sc, dest, off, cnt) return(err ? 1 : 0); } -static void tl_mii_sync(sc) +static void +tl_mii_sync(sc) struct tl_softc *sc; { register int i; @@ -622,7 +626,8 @@ static void tl_mii_sync(sc) return; } -static void tl_mii_send(sc, bits, cnt) +static void +tl_mii_send(sc, bits, cnt) struct tl_softc *sc; u_int32_t bits; int cnt; @@ -640,7 +645,8 @@ static void tl_mii_send(sc, bits, cnt) } } -static int tl_mii_readreg(sc, frame) +static int +tl_mii_readreg(sc, frame) struct tl_softc *sc; struct tl_mii_frame *frame; @@ -735,7 +741,8 @@ static int tl_mii_readreg(sc, frame) return(0); } -static int tl_mii_writereg(sc, frame) +static int +tl_mii_writereg(sc, frame) struct tl_softc *sc; struct tl_mii_frame *frame; @@ -791,7 +798,8 @@ static int tl_mii_writereg(sc, frame) return(0); } -static int tl_miibus_readreg(dev, phy, reg) +static int +tl_miibus_readreg(dev, phy, reg) device_t dev; int phy, reg; { @@ -808,7 +816,8 @@ static int tl_miibus_readreg(dev, phy, reg) return(frame.mii_data); } -static int tl_miibus_writereg(dev, phy, reg, data) +static int +tl_miibus_writereg(dev, phy, reg, data) device_t dev; int phy, reg, data; { @@ -827,7 +836,8 @@ static int tl_miibus_writereg(dev, phy, reg, data) return(0); } -static void tl_miibus_statchg(dev) +static void +tl_miibus_statchg(dev) device_t dev; { struct tl_softc *sc; @@ -850,7 +860,8 @@ static void tl_miibus_statchg(dev) /* * Set modes for bitrate devices. */ -static void tl_setmode(sc, media) +static void +tl_setmode(sc, media) struct tl_softc *sc; int media; { @@ -879,7 +890,8 @@ static void tl_setmode(sc, media) * Bytes 0-2 and 3-5 are symmetrical, so are folded together. Then * the folded 24-bit value is split into 6-bit portions and XOR'd. */ -static int tl_calchash(addr) +static int +tl_calchash(addr) caddr_t addr; { int t; @@ -896,7 +908,8 @@ static int tl_calchash(addr) * hold the station address, which leaves us free to use the other * three for multicast addresses. */ -static void tl_setfilt(sc, addr, slot) +static void +tl_setfilt(sc, addr, slot) struct tl_softc *sc; caddr_t addr; int slot; @@ -928,7 +941,8 @@ static void tl_setfilt(sc, addr, slot) * the list once to find the tail, then traverse it again backwards to * update the multicast filter. */ -static void tl_setmulti(sc) +static void +tl_setmulti(sc) struct tl_softc *sc; { struct ifnet *ifp; @@ -986,7 +1000,8 @@ static void tl_setmulti(sc) * second pause at the end to 'wait for the clocks to start' but in my * experience this isn't necessary. */ -static void tl_hardreset(dev) +static void +tl_hardreset(dev) device_t dev; { struct tl_softc *sc; @@ -1012,7 +1027,8 @@ static void tl_hardreset(dev) return; } -static void tl_softreset(sc, internal) +static void +tl_softreset(sc, internal) struct tl_softc *sc; int internal; { @@ -1074,7 +1090,8 @@ static void tl_softreset(sc, internal) * Probe for a ThunderLAN chip. Check the PCI vendor and device IDs * against our list and return its name if we find a match. */ -static int tl_probe(dev) +static int +tl_probe(dev) device_t dev; { struct tl_type *t; @@ -1093,7 +1110,8 @@ static int tl_probe(dev) return(ENXIO); } -static int tl_attach(dev) +static int +tl_attach(dev) device_t dev; { int i; @@ -1340,7 +1358,8 @@ static int tl_attach(dev) return(error); } -static int tl_detach(dev) +static int +tl_detach(dev) device_t dev; { struct tl_softc *sc; @@ -1373,7 +1392,8 @@ static int tl_detach(dev) /* * Initialize the transmit lists. */ -static int tl_list_tx_init(sc) +static int +tl_list_tx_init(sc) struct tl_softc *sc; { struct tl_chain_data *cd; @@ -1400,7 +1420,8 @@ static int tl_list_tx_init(sc) /* * Initialize the RX lists and allocate mbufs for them. */ -static int tl_list_rx_init(sc) +static int +tl_list_rx_init(sc) struct tl_softc *sc; { struct tl_chain_data *cd; @@ -1431,7 +1452,8 @@ static int tl_list_rx_init(sc) return(0); } -static int tl_newbuf(sc, c) +static int +tl_newbuf(sc, c) struct tl_softc *sc; struct tl_chain_onefrag *c; { @@ -1484,7 +1506,8 @@ static int tl_newbuf(sc, c) * the buffers, it will generate an end of channel interrupt and wait * for us to empty the chain and restart the receiver. */ -static int tl_intvec_rxeof(xsc, type) +static int +tl_intvec_rxeof(xsc, type) void *xsc; u_int32_t type; { @@ -1553,7 +1576,8 @@ static int tl_intvec_rxeof(xsc, type) * the card has hit the end of the receive buffer chain and we need to * empty out the buffers and shift the pointer back to the beginning again. */ -static int tl_intvec_rxeoc(xsc, type) +static int +tl_intvec_rxeoc(xsc, type) void *xsc; u_int32_t type; { @@ -1576,7 +1600,8 @@ static int tl_intvec_rxeoc(xsc, type) return(r); } -static int tl_intvec_txeof(xsc, type) +static int +tl_intvec_txeof(xsc, type) void *xsc; u_int32_t type; { @@ -1628,7 +1653,8 @@ static int tl_intvec_txeof(xsc, type) * if the tl_txeoc flag is set, and only the TXEOC interrupt handler * can set this flag once tl_start() has cleared it. */ -static int tl_intvec_txeoc(xsc, type) +static int +tl_intvec_txeoc(xsc, type) void *xsc; u_int32_t type; { @@ -1664,7 +1690,8 @@ static int tl_intvec_txeoc(xsc, type) return(1); } -static int tl_intvec_adchk(xsc, type) +static int +tl_intvec_adchk(xsc, type) void *xsc; u_int32_t type; { @@ -1684,7 +1711,8 @@ static int tl_intvec_adchk(xsc, type) return(0); } -static int tl_intvec_netsts(xsc, type) +static int +tl_intvec_netsts(xsc, type) void *xsc; u_int32_t type; { @@ -1701,7 +1729,8 @@ static int tl_intvec_netsts(xsc, type) return(1); } -static void tl_intr(xsc) +static void +tl_intr(xsc) void *xsc; { struct tl_softc *sc; @@ -1776,7 +1805,8 @@ static void tl_intr(xsc) return; } -static void tl_stats_update(xsc) +static void +tl_stats_update(xsc) void *xsc; { struct tl_softc *sc; @@ -1838,7 +1868,8 @@ static void tl_stats_update(xsc) * Encapsulate an mbuf chain in a list by coupling the mbuf data * pointers to the fragment pointers. */ -static int tl_encap(sc, c, m_head) +static int +tl_encap(sc, c, m_head) struct tl_softc *sc; struct tl_chain *c; struct mbuf *m_head; @@ -1935,7 +1966,8 @@ static int tl_encap(sc, c, m_head) * copy of the pointers since the transmit list fragment pointers are * physical addresses. */ -static void tl_start(ifp) +static void +tl_start(ifp) struct ifnet *ifp; { struct tl_softc *sc; @@ -2028,7 +2060,8 @@ static void tl_start(ifp) return; } -static void tl_init(xsc) +static void +tl_init(xsc) void *xsc; { struct tl_softc *sc = xsc; @@ -2117,7 +2150,8 @@ static void tl_init(xsc) /* * Set media options. */ -static int tl_ifmedia_upd(ifp) +static int +tl_ifmedia_upd(ifp) struct ifnet *ifp; { struct tl_softc *sc; @@ -2138,7 +2172,8 @@ static int tl_ifmedia_upd(ifp) /* * Report current media status. */ -static void tl_ifmedia_sts(ifp, ifmr) +static void +tl_ifmedia_sts(ifp, ifmr) struct ifnet *ifp; struct ifmediareq *ifmr; { @@ -2169,7 +2204,8 @@ static void tl_ifmedia_sts(ifp, ifmr) return; } -static int tl_ioctl(ifp, command, data) +static int +tl_ioctl(ifp, command, data) struct ifnet *ifp; u_long command; caddr_t data; @@ -2234,7 +2270,8 @@ static int tl_ioctl(ifp, command, data) return(error); } -static void tl_watchdog(ifp) +static void +tl_watchdog(ifp) struct ifnet *ifp; { struct tl_softc *sc; @@ -2255,7 +2292,8 @@ static void tl_watchdog(ifp) * Stop the adapter and free any mbufs allocated to the * RX and TX lists. */ -static void tl_stop(sc) +static void +tl_stop(sc) struct tl_softc *sc; { register int i; @@ -2322,7 +2360,8 @@ static void tl_stop(sc) * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void tl_shutdown(dev) +static void +tl_shutdown(dev) device_t dev; { struct tl_softc *sc; diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c index 18f8fde950a5..f96e0e233fc9 100644 --- a/sys/pci/if_vr.c +++ b/sys/pci/if_vr.c @@ -234,7 +234,8 @@ DRIVER_MODULE(miibus, vr, miibus_driver, miibus_devclass, 0, 0); /* * Sync the PHYs by setting data bit and strobing the clock 32 times. */ -static void vr_mii_sync(sc) +static void +vr_mii_sync(sc) struct vr_softc *sc; { register int i; @@ -254,7 +255,8 @@ static void vr_mii_sync(sc) /* * Clock a series of bits through the MII. */ -static void vr_mii_send(sc, bits, cnt) +static void +vr_mii_send(sc, bits, cnt) struct vr_softc *sc; u_int32_t bits; int cnt; @@ -279,7 +281,8 @@ static void vr_mii_send(sc, bits, cnt) /* * Read an PHY register through the MII. */ -static int vr_mii_readreg(sc, frame) +static int +vr_mii_readreg(sc, frame) struct vr_softc *sc; struct vr_mii_frame *frame; @@ -373,7 +376,8 @@ static int vr_mii_readreg(sc, frame) /* * Write to a PHY register through the MII. */ -static int vr_mii_writereg(sc, frame) +static int +vr_mii_writereg(sc, frame) struct vr_softc *sc; struct vr_mii_frame *frame; @@ -421,7 +425,8 @@ static int vr_mii_writereg(sc, frame) return(0); } -static int vr_miibus_readreg(dev, phy, reg) +static int +vr_miibus_readreg(dev, phy, reg) device_t dev; int phy, reg; { @@ -438,7 +443,8 @@ static int vr_miibus_readreg(dev, phy, reg) return(frame.mii_data); } -static int vr_miibus_writereg(dev, phy, reg, data) +static int +vr_miibus_writereg(dev, phy, reg, data) device_t dev; u_int16_t phy, reg, data; { @@ -457,7 +463,8 @@ static int vr_miibus_writereg(dev, phy, reg, data) return(0); } -static void vr_miibus_statchg(dev) +static void +vr_miibus_statchg(dev) device_t dev; { struct vr_softc *sc; @@ -503,7 +510,8 @@ static u_int8_t vr_calchash(addr) /* * Program the 64-bit multicast hash filter. */ -static void vr_setmulti(sc) +static void +vr_setmulti(sc) struct vr_softc *sc; { struct ifnet *ifp; @@ -558,7 +566,8 @@ static void vr_setmulti(sc) * 'full-duplex' and '100Mbps' bits in the netconfig register, we * first have to put the transmit and/or receive logic in the idle state. */ -static void vr_setcfg(sc, media) +static void +vr_setcfg(sc, media) struct vr_softc *sc; int media; { @@ -580,7 +589,8 @@ static void vr_setcfg(sc, media) return; } -static void vr_reset(sc) +static void +vr_reset(sc) struct vr_softc *sc; { register int i; @@ -605,7 +615,8 @@ static void vr_reset(sc) * Probe for a VIA Rhine chip. Check the PCI vendor and device * IDs against our list and return a device name if we find a match. */ -static int vr_probe(dev) +static int +vr_probe(dev) device_t dev; { struct vr_type *t; @@ -628,7 +639,8 @@ static int vr_probe(dev) * Attach the interface. Allocate softc structures, do ifmedia * setup and ethernet/BPF attach. */ -static int vr_attach(dev) +static int +vr_attach(dev) device_t dev; { int i; @@ -814,7 +826,8 @@ static int vr_attach(dev) return(error); } -static int vr_detach(dev) +static int +vr_detach(dev) device_t dev; { struct vr_softc *sc; @@ -845,7 +858,8 @@ static int vr_detach(dev) /* * Initialize the transmit descriptors. */ -static int vr_list_tx_init(sc) +static int +vr_list_tx_init(sc) struct vr_softc *sc; { struct vr_chain_data *cd; @@ -876,7 +890,8 @@ static int vr_list_tx_init(sc) * we arrange the descriptors in a closed ring, so that the last descriptor * points back to the first. */ -static int vr_list_rx_init(sc) +static int +vr_list_rx_init(sc) struct vr_softc *sc; { struct vr_chain_data *cd; @@ -916,7 +931,8 @@ static int vr_list_rx_init(sc) * MCLBYTES is 2048, so we have to subtract one otherwise we'll * overflow the field and make a mess. */ -static int vr_newbuf(sc, c, m) +static int +vr_newbuf(sc, c, m) struct vr_softc *sc; struct vr_chain_onefrag *c; struct mbuf *m; @@ -954,7 +970,8 @@ static int vr_newbuf(sc, c, m) * A frame has been uploaded: pass the resulting mbuf chain up to * the higher level protocols. */ -static void vr_rxeof(sc) +static void +vr_rxeof(sc) struct vr_softc *sc; { struct ether_header *eh; @@ -1045,7 +1062,8 @@ static void vr_rxeof(sc) return; } -void vr_rxeoc(sc) +void +vr_rxeoc(sc) struct vr_softc *sc; { @@ -1063,7 +1081,8 @@ void vr_rxeoc(sc) * the list buffers. */ -static void vr_txeof(sc) +static void +vr_txeof(sc) struct vr_softc *sc; { struct vr_chain *cur_tx; @@ -1131,7 +1150,8 @@ static void vr_txeof(sc) /* * TX 'end of channel' interrupt handler. */ -static void vr_txeoc(sc) +static void +vr_txeoc(sc) struct vr_softc *sc; { struct ifnet *ifp; @@ -1147,7 +1167,8 @@ static void vr_txeoc(sc) return; } -static void vr_tick(xsc) +static void +vr_tick(xsc) void *xsc; { struct vr_softc *sc; @@ -1165,7 +1186,8 @@ static void vr_tick(xsc) return; } -static void vr_intr(arg) +static void +vr_intr(arg) void *arg; { struct vr_softc *sc; @@ -1244,7 +1266,8 @@ static void vr_intr(arg) * Encapsulate an mbuf chain in a descriptor by coupling the mbuf data * pointers to the fragment pointers. */ -static int vr_encap(sc, c, m_head) +static int +vr_encap(sc, c, m_head) struct vr_softc *sc; struct vr_chain *c; struct mbuf *m_head; @@ -1316,7 +1339,8 @@ static int vr_encap(sc, c, m_head) * physical addresses. */ -static void vr_start(ifp) +static void +vr_start(ifp) struct ifnet *ifp; { struct vr_softc *sc; @@ -1395,7 +1419,8 @@ static void vr_start(ifp) return; } -static void vr_init(xsc) +static void +vr_init(xsc) void *xsc; { struct vr_softc *sc = xsc; @@ -1503,7 +1528,8 @@ static void vr_init(xsc) /* * Set media options. */ -static int vr_ifmedia_upd(ifp) +static int +vr_ifmedia_upd(ifp) struct ifnet *ifp; { struct vr_softc *sc; @@ -1519,7 +1545,8 @@ static int vr_ifmedia_upd(ifp) /* * Report current media status. */ -static void vr_ifmedia_sts(ifp, ifmr) +static void +vr_ifmedia_sts(ifp, ifmr) struct ifnet *ifp; struct ifmediareq *ifmr; { @@ -1535,7 +1562,8 @@ static void vr_ifmedia_sts(ifp, ifmr) return; } -static int vr_ioctl(ifp, command, data) +static int +vr_ioctl(ifp, command, data) struct ifnet *ifp; u_long command; caddr_t data; @@ -1582,7 +1610,8 @@ static int vr_ioctl(ifp, command, data) return(error); } -static void vr_watchdog(ifp) +static void +vr_watchdog(ifp) struct ifnet *ifp; { struct vr_softc *sc; @@ -1609,7 +1638,8 @@ static void vr_watchdog(ifp) * Stop the adapter and free any mbufs allocated to the * RX and TX lists. */ -static void vr_stop(sc) +static void +vr_stop(sc) struct vr_softc *sc; { register int i; @@ -1663,7 +1693,8 @@ static void vr_stop(sc) * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void vr_shutdown(dev) +static void +vr_shutdown(dev) device_t dev; { struct vr_softc *sc; diff --git a/sys/pci/if_wb.c b/sys/pci/if_wb.c index aa2f161343d9..e17b9aacf76c 100644 --- a/sys/pci/if_wb.c +++ b/sys/pci/if_wb.c @@ -244,7 +244,8 @@ DRIVER_MODULE(miibus, wb, miibus_driver, miibus_devclass, 0, 0); /* * Send a read command and address to the EEPROM, check for ACK. */ -static void wb_eeprom_putbyte(sc, addr) +static void +wb_eeprom_putbyte(sc, addr) struct wb_softc *sc; int addr; { @@ -274,7 +275,8 @@ static void wb_eeprom_putbyte(sc, addr) /* * Read a word of data stored in the EEPROM at address 'addr.' */ -static void wb_eeprom_getword(sc, addr, dest) +static void +wb_eeprom_getword(sc, addr, dest) struct wb_softc *sc; int addr; u_int16_t *dest; @@ -315,7 +317,8 @@ static void wb_eeprom_getword(sc, addr, dest) /* * Read a sequence of words from the EEPROM. */ -static void wb_read_eeprom(sc, dest, off, cnt, swap) +static void +wb_read_eeprom(sc, dest, off, cnt, swap) struct wb_softc *sc; caddr_t dest; int off; @@ -340,7 +343,8 @@ static void wb_read_eeprom(sc, dest, off, cnt, swap) /* * Sync the PHYs by setting data bit and strobing the clock 32 times. */ -static void wb_mii_sync(sc) +static void +wb_mii_sync(sc) struct wb_softc *sc; { register int i; @@ -360,7 +364,8 @@ static void wb_mii_sync(sc) /* * Clock a series of bits through the MII. */ -static void wb_mii_send(sc, bits, cnt) +static void +wb_mii_send(sc, bits, cnt) struct wb_softc *sc; u_int32_t bits; int cnt; @@ -385,7 +390,8 @@ static void wb_mii_send(sc, bits, cnt) /* * Read an PHY register through the MII. */ -static int wb_mii_readreg(sc, frame) +static int +wb_mii_readreg(sc, frame) struct wb_softc *sc; struct wb_mii_frame *frame; @@ -481,7 +487,8 @@ static int wb_mii_readreg(sc, frame) /* * Write to a PHY register through the MII. */ -static int wb_mii_writereg(sc, frame) +static int +wb_mii_writereg(sc, frame) struct wb_softc *sc; struct wb_mii_frame *frame; @@ -526,7 +533,8 @@ static int wb_mii_writereg(sc, frame) return(0); } -static int wb_miibus_readreg(dev, phy, reg) +static int +wb_miibus_readreg(dev, phy, reg) device_t dev; int phy, reg; { @@ -544,7 +552,8 @@ static int wb_miibus_readreg(dev, phy, reg) return(frame.mii_data); } -static int wb_miibus_writereg(dev, phy, reg, data) +static int +wb_miibus_writereg(dev, phy, reg, data) device_t dev; int phy, reg, data; { @@ -564,7 +573,8 @@ static int wb_miibus_writereg(dev, phy, reg, data) return(0); } -static void wb_miibus_statchg(dev) +static void +wb_miibus_statchg(dev) device_t dev; { struct wb_softc *sc; @@ -613,7 +623,8 @@ static u_int8_t wb_calchash(addr) /* * Program the 64-bit multicast hash filter. */ -static void wb_setmulti(sc) +static void +wb_setmulti(sc) struct wb_softc *sc; { struct ifnet *ifp; @@ -668,7 +679,8 @@ static void wb_setmulti(sc) * 'full-duplex' and '100Mbps' bits in the netconfig register, we * first have to put the transmit and/or receive logic in the idle state. */ -static void wb_setcfg(sc, media) +static void +wb_setcfg(sc, media) struct wb_softc *sc; u_int32_t media; { @@ -706,7 +718,8 @@ static void wb_setcfg(sc, media) return; } -static void wb_reset(sc) +static void +wb_reset(sc) struct wb_softc *sc; { register int i; @@ -747,7 +760,8 @@ static void wb_reset(sc) return; } -static void wb_fixmedia(sc) +static void +wb_fixmedia(sc) struct wb_softc *sc; { struct mii_data *mii = NULL; @@ -779,7 +793,8 @@ static void wb_fixmedia(sc) * Probe for a Winbond chip. Check the PCI vendor and device * IDs against our list and return a device name if we find a match. */ -static int wb_probe(dev) +static int +wb_probe(dev) device_t dev; { struct wb_type *t; @@ -802,7 +817,8 @@ static int wb_probe(dev) * Attach the interface. Allocate softc structures, do ifmedia * setup and ethernet/BPF attach. */ -static int wb_attach(dev) +static int +wb_attach(dev) device_t dev; { u_char eaddr[ETHER_ADDR_LEN]; @@ -975,7 +991,8 @@ static int wb_attach(dev) return(error); } -static int wb_detach(dev) +static int +wb_detach(dev) device_t dev; { struct wb_softc *sc; @@ -1007,7 +1024,8 @@ static int wb_detach(dev) /* * Initialize the transmit descriptors. */ -static int wb_list_tx_init(sc) +static int +wb_list_tx_init(sc) struct wb_softc *sc; { struct wb_chain_data *cd; @@ -1040,7 +1058,8 @@ static int wb_list_tx_init(sc) * we arrange the descriptors in a closed ring, so that the last descriptor * points back to the first. */ -static int wb_list_rx_init(sc) +static int +wb_list_rx_init(sc) struct wb_softc *sc; { struct wb_chain_data *cd; @@ -1073,7 +1092,8 @@ static int wb_list_rx_init(sc) return(0); } -static void wb_bfree(buf, args) +static void +wb_bfree(buf, args) void *buf; void *args; { @@ -1083,7 +1103,8 @@ static void wb_bfree(buf, args) /* * Initialize an RX descriptor and attach an MBUF cluster. */ -static int wb_newbuf(sc, c, m) +static int +wb_newbuf(sc, c, m) struct wb_softc *sc; struct wb_chain_onefrag *c; struct mbuf *m; @@ -1118,7 +1139,8 @@ static int wb_newbuf(sc, c, m) * A frame has been uploaded: pass the resulting mbuf chain up to * the higher level protocols. */ -static void wb_rxeof(sc) +static void +wb_rxeof(sc) struct wb_softc *sc; { struct ether_header *eh; @@ -1190,7 +1212,8 @@ static void wb_rxeof(sc) } } -void wb_rxeoc(sc) +void +wb_rxeoc(sc) struct wb_softc *sc; { wb_rxeof(sc); @@ -1208,7 +1231,8 @@ void wb_rxeoc(sc) * A frame was downloaded to the chip. It's safe for us to clean up * the list buffers. */ -static void wb_txeof(sc) +static void +wb_txeof(sc) struct wb_softc *sc; { struct wb_chain *cur_tx; @@ -1264,7 +1288,8 @@ static void wb_txeof(sc) /* * TX 'end of channel' interrupt handler. */ -static void wb_txeoc(sc) +static void +wb_txeoc(sc) struct wb_softc *sc; { struct ifnet *ifp; @@ -1287,7 +1312,8 @@ static void wb_txeoc(sc) return; } -static void wb_intr(arg) +static void +wb_intr(arg) void *arg; { struct wb_softc *sc; @@ -1374,7 +1400,8 @@ static void wb_intr(arg) return; } -static void wb_tick(xsc) +static void +wb_tick(xsc) void *xsc; { struct wb_softc *sc; @@ -1397,7 +1424,8 @@ static void wb_tick(xsc) * Encapsulate an mbuf chain in a descriptor by coupling the mbuf data * pointers to the fragment pointers. */ -static int wb_encap(sc, c, m_head) +static int +wb_encap(sc, c, m_head) struct wb_softc *sc; struct wb_chain *c; struct mbuf *m_head; @@ -1491,7 +1519,8 @@ static int wb_encap(sc, c, m_head) * physical addresses. */ -static void wb_start(ifp) +static void +wb_start(ifp) struct ifnet *ifp; { struct wb_softc *sc; @@ -1584,7 +1613,8 @@ static void wb_start(ifp) return; } -static void wb_init(xsc) +static void +wb_init(xsc) void *xsc; { struct wb_softc *sc = xsc; @@ -1705,7 +1735,8 @@ static void wb_init(xsc) /* * Set media options. */ -static int wb_ifmedia_upd(ifp) +static int +wb_ifmedia_upd(ifp) struct ifnet *ifp; { struct wb_softc *sc; @@ -1721,7 +1752,8 @@ static int wb_ifmedia_upd(ifp) /* * Report current media status. */ -static void wb_ifmedia_sts(ifp, ifmr) +static void +wb_ifmedia_sts(ifp, ifmr) struct ifnet *ifp; struct ifmediareq *ifmr; { @@ -1739,7 +1771,8 @@ static void wb_ifmedia_sts(ifp, ifmr) return; } -static int wb_ioctl(ifp, command, data) +static int +wb_ioctl(ifp, command, data) struct ifnet *ifp; u_long command; caddr_t data; @@ -1786,7 +1819,8 @@ static int wb_ioctl(ifp, command, data) return(error); } -static void wb_watchdog(ifp) +static void +wb_watchdog(ifp) struct ifnet *ifp; { struct wb_softc *sc; @@ -1816,7 +1850,8 @@ static void wb_watchdog(ifp) * Stop the adapter and free any mbufs allocated to the * RX and TX lists. */ -static void wb_stop(sc) +static void +wb_stop(sc) struct wb_softc *sc; { register int i; @@ -1868,7 +1903,8 @@ static void wb_stop(sc) * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void wb_shutdown(dev) +static void +wb_shutdown(dev) device_t dev; { struct wb_softc *sc; diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c index 782361cd2c9e..a577ec196151 100644 --- a/sys/pci/if_xl.c +++ b/sys/pci/if_xl.c @@ -322,7 +322,8 @@ DRIVER_MODULE(miibus, xl, miibus_driver, miibus_devclass, 0, 0); * but it isn't called during normal operation so we can afford * to make it a function. */ -static void xl_wait(sc) +static void +xl_wait(sc) struct xl_softc *sc; { register int i; @@ -358,7 +359,8 @@ static void xl_wait(sc) /* * Sync the PHYs by setting data bit and strobing the clock 32 times. */ -static void xl_mii_sync(sc) +static void +xl_mii_sync(sc) struct xl_softc *sc; { register int i; @@ -379,7 +381,8 @@ static void xl_mii_sync(sc) /* * Clock a series of bits through the MII. */ -static void xl_mii_send(sc, bits, cnt) +static void +xl_mii_send(sc, bits, cnt) struct xl_softc *sc; u_int32_t bits; int cnt; @@ -405,7 +408,8 @@ static void xl_mii_send(sc, bits, cnt) /* * Read an PHY register through the MII. */ -static int xl_mii_readreg(sc, frame) +static int +xl_mii_readreg(sc, frame) struct xl_softc *sc; struct xl_mii_frame *frame; @@ -503,7 +507,8 @@ static int xl_mii_readreg(sc, frame) /* * Write to a PHY register through the MII. */ -static int xl_mii_writereg(sc, frame) +static int +xl_mii_writereg(sc, frame) struct xl_softc *sc; struct xl_mii_frame *frame; @@ -553,7 +558,8 @@ static int xl_mii_writereg(sc, frame) return(0); } -static int xl_miibus_readreg(dev, phy, reg) +static int +xl_miibus_readreg(dev, phy, reg) device_t dev; int phy, reg; { @@ -581,7 +587,8 @@ static int xl_miibus_readreg(dev, phy, reg) return(frame.mii_data); } -static int xl_miibus_writereg(dev, phy, reg, data) +static int +xl_miibus_writereg(dev, phy, reg, data) device_t dev; int phy, reg, data; { @@ -604,7 +611,8 @@ static int xl_miibus_writereg(dev, phy, reg, data) return(0); } -static void xl_miibus_statchg(dev) +static void +xl_miibus_statchg(dev) device_t dev; { struct xl_softc *sc; @@ -641,7 +649,8 @@ static void xl_miibus_statchg(dev) * point we will get a callback telling is that it's safe to add our * extra media. */ -static void xl_miibus_mediainit(dev) +static void +xl_miibus_mediainit(dev) device_t dev; { struct xl_softc *sc; @@ -689,7 +698,8 @@ static void xl_miibus_mediainit(dev) * The EEPROM is slow: give it time to come ready after issuing * it a command. */ -static int xl_eeprom_wait(sc) +static int +xl_eeprom_wait(sc) struct xl_softc *sc; { int i; @@ -713,7 +723,8 @@ static int xl_eeprom_wait(sc) * Read a sequence of words from the EEPROM. Note that ethernet address * data is stored in the EEPROM in network byte order. */ -static int xl_read_eeprom(sc, dest, off, cnt, swap) +static int +xl_read_eeprom(sc, dest, off, cnt, swap) struct xl_softc *sc; caddr_t dest; int off; @@ -800,7 +811,8 @@ static u_int8_t xl_calchash(addr) * NICs older than the 3c905B have only one multicast option, which * is to enable reception of all multicast frames. */ -static void xl_setmulti(sc) +static void +xl_setmulti(sc) struct xl_softc *sc; { struct ifnet *ifp; @@ -835,7 +847,8 @@ static void xl_setmulti(sc) /* * 3c905B adapters have a hash filter that we can program. */ -static void xl_setmulti_hash(sc) +static void +xl_setmulti_hash(sc) struct xl_softc *sc; { struct ifnet *ifp; @@ -881,7 +894,8 @@ static void xl_setmulti_hash(sc) } #ifdef notdef -static void xl_testpacket(sc) +static void +xl_testpacket(sc) struct xl_softc *sc; { struct mbuf *m; @@ -910,7 +924,8 @@ static void xl_testpacket(sc) } #endif -static void xl_setcfg(sc) +static void +xl_setcfg(sc) struct xl_softc *sc; { u_int32_t icfg; @@ -930,7 +945,8 @@ static void xl_setcfg(sc) return; } -static void xl_setmode(sc, media) +static void +xl_setmode(sc, media) struct xl_softc *sc; int media; { @@ -1025,7 +1041,8 @@ static void xl_setmode(sc, media) return; } -static void xl_reset(sc) +static void +xl_reset(sc) struct xl_softc *sc; { register int i; @@ -1076,7 +1093,8 @@ static void xl_reset(sc) * Probe for a 3Com Etherlink XL chip. Check the PCI vendor and device * IDs against our list and return a device name if we find a match. */ -static int xl_probe(dev) +static int +xl_probe(dev) device_t dev; { struct xl_type *t; @@ -1107,7 +1125,8 @@ static int xl_probe(dev) * will try to guess the media options values and warn the user of a * possible manufacturing defect with his adapter/system/whatever. */ -static void xl_mediacheck(sc) +static void +xl_mediacheck(sc) struct xl_softc *sc; { @@ -1147,7 +1166,8 @@ static void xl_mediacheck(sc) return; } -static void xl_choose_xcvr(sc, verbose) +static void +xl_choose_xcvr(sc, verbose) struct xl_softc *sc; int verbose; { @@ -1242,7 +1262,8 @@ static void xl_choose_xcvr(sc, verbose) * Attach the interface. Allocate softc structures, do ifmedia * setup and ethernet/BPF attach. */ -static int xl_attach(dev) +static int +xl_attach(dev) device_t dev; { u_char eaddr[ETHER_ADDR_LEN]; @@ -1633,7 +1654,8 @@ static int xl_attach(dev) return(error); } -static int xl_detach(dev) +static int +xl_detach(dev) device_t dev; { struct xl_softc *sc; @@ -1672,7 +1694,8 @@ static int xl_detach(dev) /* * Initialize the transmit descriptors. */ -static int xl_list_tx_init(sc) +static int +xl_list_tx_init(sc) struct xl_softc *sc; { struct xl_chain_data *cd; @@ -1738,7 +1761,8 @@ static int xl_list_tx_init_90xB(sc) * we arrange the descriptors in a closed ring, so that the last descriptor * points back to the first. */ -static int xl_list_rx_init(sc) +static int +xl_list_rx_init(sc) struct xl_softc *sc; { struct xl_chain_data *cd; @@ -1772,7 +1796,8 @@ static int xl_list_rx_init(sc) /* * Initialize an RX descriptor and attach an MBUF cluster. */ -static int xl_newbuf(sc, c) +static int +xl_newbuf(sc, c) struct xl_softc *sc; struct xl_chain_onefrag *c; { @@ -1801,7 +1826,8 @@ static int xl_newbuf(sc, c) return(0); } -static int xl_rx_resync(sc) +static int +xl_rx_resync(sc) struct xl_softc *sc; { struct xl_chain_onefrag *pos; @@ -1827,7 +1853,8 @@ static int xl_rx_resync(sc) * A frame has been uploaded: pass the resulting mbuf chain up to * the higher level protocols. */ -static void xl_rxeof(sc) +static void +xl_rxeof(sc) struct xl_softc *sc; { struct ether_header *eh; @@ -1943,7 +1970,8 @@ static void xl_rxeof(sc) * A frame was downloaded to the chip. It's safe for us to clean up * the list buffers. */ -static void xl_txeof(sc) +static void +xl_txeof(sc) struct xl_softc *sc; { struct xl_chain *cur_tx; @@ -2035,7 +2063,8 @@ static void xl_txeof_90xB(sc) * only get a 'TX complete' interrupt if there's a transmit error, * so this is really TX error handler. */ -static void xl_txeoc(sc) +static void +xl_txeoc(sc) struct xl_softc *sc; { u_int8_t txstat; @@ -2097,7 +2126,8 @@ static void xl_txeoc(sc) return; } -static void xl_intr(arg) +static void +xl_intr(arg) void *arg; { struct xl_softc *sc; @@ -2156,7 +2186,8 @@ static void xl_intr(arg) return; } -static void xl_stats_update(xsc) +static void +xl_stats_update(xsc) void *xsc; { struct xl_softc *sc; @@ -2211,7 +2242,8 @@ static void xl_stats_update(xsc) * Encapsulate an mbuf chain in a descriptor by coupling the mbuf data * pointers to the fragment pointers. */ -static int xl_encap(sc, c, m_head) +static int +xl_encap(sc, c, m_head) struct xl_softc *sc; struct xl_chain *c; struct mbuf *m_head; @@ -2291,7 +2323,8 @@ static int xl_encap(sc, c, m_head) * copy of the pointers since the transmit list fragment pointers are * physical addresses. */ -static void xl_start(ifp) +static void +xl_start(ifp) struct ifnet *ifp; { struct xl_softc *sc; @@ -2541,7 +2574,8 @@ static void xl_start_90xB(ifp) return; } -static void xl_init(xsc) +static void +xl_init(xsc) void *xsc; { struct xl_softc *sc = xsc; @@ -2750,7 +2784,8 @@ static void xl_init(xsc) /* * Set media options. */ -static int xl_ifmedia_upd(ifp) +static int +xl_ifmedia_upd(ifp) struct ifnet *ifp; { struct xl_softc *sc; @@ -2790,7 +2825,8 @@ static int xl_ifmedia_upd(ifp) /* * Report current media status. */ -static void xl_ifmedia_sts(ifp, ifmr) +static void +xl_ifmedia_sts(ifp, ifmr) struct ifnet *ifp; struct ifmediareq *ifmr; { @@ -2854,7 +2890,8 @@ static void xl_ifmedia_sts(ifp, ifmr) return; } -static int xl_ioctl(ifp, command, data) +static int +xl_ioctl(ifp, command, data) struct ifnet *ifp; u_long command; caddr_t data; @@ -2929,7 +2966,8 @@ static int xl_ioctl(ifp, command, data) return(error); } -static void xl_watchdog(ifp) +static void +xl_watchdog(ifp) struct ifnet *ifp; { struct xl_softc *sc; @@ -2965,7 +3003,8 @@ static void xl_watchdog(ifp) * Stop the adapter and free any mbufs allocated to the * RX and TX lists. */ -static void xl_stop(sc) +static void +xl_stop(sc) struct xl_softc *sc; { register int i; @@ -3034,7 +3073,8 @@ static void xl_stop(sc) * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void xl_shutdown(dev) +static void +xl_shutdown(dev) device_t dev; { struct xl_softc *sc; @@ -3049,7 +3089,8 @@ static void xl_shutdown(dev) return; } -static int xl_suspend(dev) +static int +xl_suspend(dev) device_t dev; { struct xl_softc *sc; @@ -3063,7 +3104,8 @@ static int xl_suspend(dev) return(0); } -static int xl_resume(dev) +static int +xl_resume(dev) device_t dev; { struct xl_softc *sc;