diff options
author | imp <imp@FreeBSD.org> | 2005-02-24 22:33:05 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-02-24 22:33:05 +0000 |
commit | b5521d6df746ce6e4a69360def49ec22058017c9 (patch) | |
tree | 5029a9853f80584a87f9c3fc558ef077b42f5c62 /sys/pci | |
parent | 3341256644fc97a2c2df017479c65b7efd008a68 (diff) | |
download | FreeBSD-src-b5521d6df746ce6e4a69360def49ec22058017c9.zip FreeBSD-src-b5521d6df746ce6e4a69360def49ec22058017c9.tar.gz |
Fix style(9) issues with __P removal.
Noticed by: bde
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/agp_nvidia.c | 20 | ||||
-rw-r--r-- | sys/pci/if_dc.c | 138 | ||||
-rw-r--r-- | sys/pci/if_mn.c | 4 | ||||
-rw-r--r-- | sys/pci/if_pcn.c | 77 | ||||
-rw-r--r-- | sys/pci/if_rl.c | 74 | ||||
-rw-r--r-- | sys/pci/if_sf.c | 72 | ||||
-rw-r--r-- | sys/pci/if_sk.c | 112 | ||||
-rw-r--r-- | sys/pci/if_ste.c | 74 | ||||
-rw-r--r-- | sys/pci/if_ti.c | 114 | ||||
-rw-r--r-- | sys/pci/if_tl.c | 111 | ||||
-rw-r--r-- | sys/pci/if_vr.c | 74 | ||||
-rw-r--r-- | sys/pci/if_wb.c | 86 | ||||
-rw-r--r-- | sys/pci/if_xl.c | 117 | ||||
-rw-r--r-- | sys/pci/ncr.c | 72 |
14 files changed, 561 insertions, 584 deletions
diff --git a/sys/pci/agp_nvidia.c b/sys/pci/agp_nvidia.c index dfec868..0d9f5b7 100644 --- a/sys/pci/agp_nvidia.c +++ b/sys/pci/agp_nvidia.c @@ -84,16 +84,16 @@ struct agp_nvidia_softc { off_t pg_offset; }; -static const char * agp_nvidia_match (device_t dev); -static int agp_nvidia_probe (device_t); -static int agp_nvidia_attach (device_t); -static int agp_nvidia_detach (device_t); -static u_int32_t agp_nvidia_get_aperture (device_t); -static int agp_nvidia_set_aperture (device_t, u_int32_t); -static int agp_nvidia_bind_page (device_t, int, vm_offset_t); -static int agp_nvidia_unbind_page (device_t, int); - -static int nvidia_init_iorr (u_int32_t, u_int32_t); +static const char *agp_nvidia_match(device_t dev); +static int agp_nvidia_probe(device_t); +static int agp_nvidia_attach(device_t); +static int agp_nvidia_detach(device_t); +static u_int32_t agp_nvidia_get_aperture(device_t); +static int agp_nvidia_set_aperture(device_t, u_int32_t); +static int agp_nvidia_bind_page(device_t, int, vm_offset_t); +static int agp_nvidia_unbind_page(device_t, int); + +static int nvidia_init_iorr(u_int32_t, u_int32_t); static const char * agp_nvidia_match (device_t dev) diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c index bd62d3f..b3394b9 100644 --- a/sys/pci/if_dc.c +++ b/sys/pci/if_dc.c @@ -221,77 +221,73 @@ static struct dc_type dc_devs[] = { { 0, 0, NULL } }; -static int dc_probe (device_t); -static int dc_attach (device_t); -static int dc_detach (device_t); -static int dc_suspend (device_t); -static int dc_resume (device_t); -static struct dc_type *dc_devtype (device_t); -static int dc_newbuf (struct dc_softc *, int, int); -static int dc_encap (struct dc_softc *, struct mbuf **); -static void dc_pnic_rx_bug_war (struct dc_softc *, int); -static int dc_rx_resync (struct dc_softc *); -static void dc_rxeof (struct dc_softc *); -static void dc_txeof (struct dc_softc *); -static void dc_tick (void *); -static void dc_tx_underrun (struct dc_softc *); -static void dc_intr (void *); -static void dc_start (struct ifnet *); -static int dc_ioctl (struct ifnet *, u_long, caddr_t); -static void dc_init (void *); -static void dc_stop (struct dc_softc *); -static void dc_watchdog (struct ifnet *); -static void dc_shutdown (device_t); -static int dc_ifmedia_upd (struct ifnet *); -static void dc_ifmedia_sts (struct ifnet *, struct ifmediareq *); - -static void dc_delay (struct dc_softc *); -static void dc_eeprom_idle (struct dc_softc *); -static void dc_eeprom_putbyte (struct dc_softc *, int); -static void dc_eeprom_getword (struct dc_softc *, int, u_int16_t *); -static void dc_eeprom_getword_pnic - (struct dc_softc *, int, u_int16_t *); -static void dc_eeprom_getword_xircom - (struct dc_softc *, int, u_int16_t *); -static void dc_eeprom_width (struct dc_softc *); -static void dc_read_eeprom (struct dc_softc *, caddr_t, int, int, int); - -static void dc_mii_writebit (struct dc_softc *, int); -static int dc_mii_readbit (struct dc_softc *); -static void dc_mii_sync (struct dc_softc *); -static void dc_mii_send (struct dc_softc *, u_int32_t, int); -static int dc_mii_readreg (struct dc_softc *, struct dc_mii_frame *); -static int dc_mii_writereg (struct dc_softc *, struct dc_mii_frame *); -static int dc_miibus_readreg (device_t, int, int); -static int dc_miibus_writereg (device_t, int, int, int); -static void dc_miibus_statchg (device_t); -static void dc_miibus_mediainit (device_t); - -static void dc_setcfg (struct dc_softc *, int); -static uint32_t dc_mchash_le (struct dc_softc *, const uint8_t *); -static uint32_t dc_mchash_be (const uint8_t *); -static void dc_setfilt_21143 (struct dc_softc *); -static void dc_setfilt_asix (struct dc_softc *); -static void dc_setfilt_admtek (struct dc_softc *); -static void dc_setfilt_xircom (struct dc_softc *); - -static void dc_setfilt (struct dc_softc *); - -static void dc_reset (struct dc_softc *); -static int dc_list_rx_init (struct dc_softc *); -static int dc_list_tx_init (struct dc_softc *); - -static void dc_read_srom (struct dc_softc *, int); -static void dc_parse_21143_srom (struct dc_softc *); -static void dc_decode_leaf_sia (struct dc_softc *, struct dc_eblock_sia *); -static void dc_decode_leaf_mii (struct dc_softc *, struct dc_eblock_mii *); -static void dc_decode_leaf_sym (struct dc_softc *, struct dc_eblock_sym *); -static void dc_apply_fixup (struct dc_softc *, int); - -static void dc_dma_map_txbuf (void *, bus_dma_segment_t *, int, bus_size_t, - int); -static void dc_dma_map_rxbuf (void *, bus_dma_segment_t *, int, bus_size_t, - int); +static int dc_probe(device_t); +static int dc_attach(device_t); +static int dc_detach(device_t); +static int dc_suspend(device_t); +static int dc_resume(device_t); +static struct dc_type *dc_devtype(device_t); +static int dc_newbuf(struct dc_softc *, int, int); +static int dc_encap(struct dc_softc *, struct mbuf **); +static void dc_pnic_rx_bug_war(struct dc_softc *, int); +static int dc_rx_resync(struct dc_softc *); +static void dc_rxeof(struct dc_softc *); +static void dc_txeof(struct dc_softc *); +static void dc_tick(void *); +static void dc_tx_underrun(struct dc_softc *); +static void dc_intr(void *); +static void dc_start(struct ifnet *); +static int dc_ioctl(struct ifnet *, u_long, caddr_t); +static void dc_init(void *); +static void dc_stop(struct dc_softc *); +static void dc_watchdog(struct ifnet *); +static void dc_shutdown(device_t); +static int dc_ifmedia_upd(struct ifnet *); +static void dc_ifmedia_sts(struct ifnet *, struct ifmediareq *); + +static void dc_delay(struct dc_softc *); +static void dc_eeprom_idle(struct dc_softc *); +static void dc_eeprom_putbyte(struct dc_softc *, int); +static void dc_eeprom_getword(struct dc_softc *, int, u_int16_t *); +static void dc_eeprom_getword_pnic(struct dc_softc *, int, u_int16_t *); +static void dc_eeprom_getword_xircom(struct dc_softc *, int, u_int16_t *); +static void dc_eeprom_width(struct dc_softc *); +static void dc_read_eeprom(struct dc_softc *, caddr_t, int, int, int); + +static void dc_mii_writebit(struct dc_softc *, int); +static int dc_mii_readbit(struct dc_softc *); +static void dc_mii_sync(struct dc_softc *); +static void dc_mii_send(struct dc_softc *, u_int32_t, int); +static int dc_mii_readreg(struct dc_softc *, struct dc_mii_frame *); +static int dc_mii_writereg(struct dc_softc *, struct dc_mii_frame *); +static int dc_miibus_readreg(device_t, int, int); +static int dc_miibus_writereg(device_t, int, int, int); +static void dc_miibus_statchg(device_t); +static void dc_miibus_mediainit(device_t); + +static void dc_setcfg(struct dc_softc *, int); +static uint32_t dc_mchash_le(struct dc_softc *, const uint8_t *); +static uint32_t dc_mchash_be(const uint8_t *); +static void dc_setfilt_21143(struct dc_softc *); +static void dc_setfilt_asix(struct dc_softc *); +static void dc_setfilt_admtek(struct dc_softc *); +static void dc_setfilt_xircom(struct dc_softc *); + +static void dc_setfilt(struct dc_softc *); + +static void dc_reset(struct dc_softc *); +static int dc_list_rx_init(struct dc_softc *); +static int dc_list_tx_init(struct dc_softc *); + +static void dc_read_srom(struct dc_softc *, int); +static void dc_parse_21143_srom(struct dc_softc *); +static void dc_decode_leaf_sia(struct dc_softc *, struct dc_eblock_sia *); +static void dc_decode_leaf_mii(struct dc_softc *, struct dc_eblock_mii *); +static void dc_decode_leaf_sym(struct dc_softc *, struct dc_eblock_sym *); +static void dc_apply_fixup(struct dc_softc *, int); + +static void dc_dma_map_txbuf(void *, bus_dma_segment_t *, int, bus_size_t, int); +static void dc_dma_map_rxbuf(void *, bus_dma_segment_t *, int, bus_size_t, int); #ifdef DC_USEIOSPACE #define DC_RES SYS_RES_IOPORT diff --git a/sys/pci/if_mn.c b/sys/pci/if_mn.c index 2a4ce91..aa8ef46 100644 --- a/sys/pci/if_mn.c +++ b/sys/pci/if_mn.c @@ -165,8 +165,8 @@ struct mn_softc; struct sockaddr; struct rtentry; -static int mn_probe (device_t self); -static int mn_attach (device_t self); +static int mn_probe(device_t self); +static int mn_attach(device_t self); static void mn_create_channel(struct mn_softc *sc, int chan); static int mn_reset(struct mn_softc *sc); static struct trxd * mn_alloc_desc(void); diff --git a/sys/pci/if_pcn.c b/sys/pci/if_pcn.c index 93d30d8..6305e29 100644 --- a/sys/pci/if_pcn.c +++ b/sys/pci/if_pcn.c @@ -123,45 +123,44 @@ static struct pcn_chipid { { 0, NULL }, }; -static char * pcn_chipid_name(u_int32_t); -static u_int32_t pcn_chip_id (device_t); - -static u_int32_t pcn_csr_read (struct pcn_softc *, int); -static u_int16_t pcn_csr_read16 (struct pcn_softc *, int); -static u_int16_t pcn_bcr_read16 (struct pcn_softc *, int); -static void pcn_csr_write (struct pcn_softc *, int, int); -static u_int32_t pcn_bcr_read (struct pcn_softc *, int); -static void pcn_bcr_write (struct pcn_softc *, int, int); - -static int pcn_probe (device_t); -static int pcn_attach (device_t); -static int pcn_detach (device_t); - -static int pcn_newbuf (struct pcn_softc *, int, struct mbuf *); -static int pcn_encap (struct pcn_softc *, - struct mbuf *, u_int32_t *); -static void pcn_rxeof (struct pcn_softc *); -static void pcn_txeof (struct pcn_softc *); -static void pcn_intr (void *); -static void pcn_tick (void *); -static void pcn_start (struct ifnet *); -static int pcn_ioctl (struct ifnet *, u_long, caddr_t); -static void pcn_init (void *); -static void pcn_stop (struct pcn_softc *); -static void pcn_watchdog (struct ifnet *); -static void pcn_shutdown (device_t); -static int pcn_ifmedia_upd (struct ifnet *); -static void pcn_ifmedia_sts (struct ifnet *, struct ifmediareq *); - -static int pcn_miibus_readreg (device_t, int, int); -static int pcn_miibus_writereg (device_t, int, int, int); -static void pcn_miibus_statchg (device_t); - -static void pcn_setfilt (struct ifnet *); -static void pcn_setmulti (struct pcn_softc *); -static void pcn_reset (struct pcn_softc *); -static int pcn_list_rx_init (struct pcn_softc *); -static int pcn_list_tx_init (struct pcn_softc *); +static char * pcn_chipid_name(u_int32_t); +static u_int32_t pcn_chip_id(device_t); + +static u_int32_t pcn_csr_read(struct pcn_softc *, int); +static u_int16_t pcn_csr_read16(struct pcn_softc *, int); +static u_int16_t pcn_bcr_read16(struct pcn_softc *, int); +static void pcn_csr_write(struct pcn_softc *, int, int); +static u_int32_t pcn_bcr_read(struct pcn_softc *, int); +static void pcn_bcr_write(struct pcn_softc *, int, int); + +static int pcn_probe(device_t); +static int pcn_attach(device_t); +static int pcn_detach(device_t); + +static int pcn_newbuf(struct pcn_softc *, int, struct mbuf *); +static int pcn_encap(struct pcn_softc *, struct mbuf *, u_int32_t *); +static void pcn_rxeof(struct pcn_softc *); +static void pcn_txeof(struct pcn_softc *); +static void pcn_intr(void *); +static void pcn_tick(void *); +static void pcn_start(struct ifnet *); +static int pcn_ioctl(struct ifnet *, u_long, caddr_t); +static void pcn_init(void *); +static void pcn_stop(struct pcn_softc *); +static void pcn_watchdog(struct ifnet *); +static void pcn_shutdown(device_t); +static int pcn_ifmedia_upd(struct ifnet *); +static void pcn_ifmedia_sts(struct ifnet *, struct ifmediareq *); + +static int pcn_miibus_readreg(device_t, int, int); +static int pcn_miibus_writereg(device_t, int, int, int); +static void pcn_miibus_statchg(device_t); + +static void pcn_setfilt(struct ifnet *); +static void pcn_setmulti(struct pcn_softc *); +static void pcn_reset(struct pcn_softc *); +static int pcn_list_rx_init(struct pcn_softc *); +static int pcn_list_tx_init(struct pcn_softc *); #ifdef PCN_USEIOSPACE #define PCN_RES SYS_RES_IOPORT diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c index d71d26b..e71cbb8 100644 --- a/sys/pci/if_rl.c +++ b/sys/pci/if_rl.c @@ -174,47 +174,47 @@ static struct rl_type rl_devs[] = { { 0, 0, 0, NULL } }; -static int rl_attach (device_t); -static int rl_detach (device_t); -static void rl_dma_map_rxbuf (void *, bus_dma_segment_t *, int, int); -static void rl_dma_map_txbuf (void *, bus_dma_segment_t *, int, int); -static void rl_eeprom_putbyte (struct rl_softc *, int); -static void rl_eeprom_getword (struct rl_softc *, int, uint16_t *); -static int rl_encap (struct rl_softc *, struct mbuf * ); -static int rl_list_tx_init (struct rl_softc *); -static int rl_ifmedia_upd (struct ifnet *); -static void rl_ifmedia_sts (struct ifnet *, struct ifmediareq *); -static int rl_ioctl (struct ifnet *, u_long, caddr_t); -static void rl_intr (void *); -static void rl_init (void *); -static void rl_init_locked (struct rl_softc *sc); -static void rl_mii_send (struct rl_softc *, uint32_t, int); -static void rl_mii_sync (struct rl_softc *); -static int rl_mii_readreg (struct rl_softc *, struct rl_mii_frame *); -static int rl_mii_writereg (struct rl_softc *, struct rl_mii_frame *); -static int rl_miibus_readreg (device_t, int, int); -static void rl_miibus_statchg (device_t); -static int rl_miibus_writereg (device_t, int, int, int); +static int rl_attach(device_t); +static int rl_detach(device_t); +static void rl_dma_map_rxbuf(void *, bus_dma_segment_t *, int, int); +static void rl_dma_map_txbuf(void *, bus_dma_segment_t *, int, int); +static void rl_eeprom_putbyte(struct rl_softc *, int); +static void rl_eeprom_getword(struct rl_softc *, int, uint16_t *); +static int rl_encap(struct rl_softc *, struct mbuf * ); +static int rl_list_tx_init(struct rl_softc *); +static int rl_ifmedia_upd(struct ifnet *); +static void rl_ifmedia_sts(struct ifnet *, struct ifmediareq *); +static int rl_ioctl(struct ifnet *, u_long, caddr_t); +static void rl_intr(void *); +static void rl_init(void *); +static void rl_init_locked(struct rl_softc *sc); +static void rl_mii_send(struct rl_softc *, uint32_t, int); +static void rl_mii_sync(struct rl_softc *); +static int rl_mii_readreg(struct rl_softc *, struct rl_mii_frame *); +static int rl_mii_writereg(struct rl_softc *, struct rl_mii_frame *); +static int rl_miibus_readreg(device_t, int, int); +static void rl_miibus_statchg(device_t); +static int rl_miibus_writereg(device_t, int, int, int); #ifdef DEVICE_POLLING -static void rl_poll (struct ifnet *ifp, enum poll_cmd cmd, +static void rl_poll(struct ifnet *ifp, enum poll_cmd cmd, int count); -static void rl_poll_locked (struct ifnet *ifp, enum poll_cmd cmd, +static void rl_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count); #endif -static int rl_probe (device_t); -static void rl_read_eeprom (struct rl_softc *, uint8_t *, int, int, int); -static void rl_reset (struct rl_softc *); -static int rl_resume (device_t); -static void rl_rxeof (struct rl_softc *); -static void rl_setmulti (struct rl_softc *); -static void rl_shutdown (device_t); -static void rl_start (struct ifnet *); -static void rl_start_locked (struct ifnet *); -static void rl_stop (struct rl_softc *); -static int rl_suspend (device_t); -static void rl_tick (void *); -static void rl_txeof (struct rl_softc *); -static void rl_watchdog (struct ifnet *); +static int rl_probe(device_t); +static void rl_read_eeprom(struct rl_softc *, uint8_t *, int, int, int); +static void rl_reset(struct rl_softc *); +static int rl_resume(device_t); +static void rl_rxeof(struct rl_softc *); +static void rl_setmulti(struct rl_softc *); +static void rl_shutdown(device_t); +static void rl_start(struct ifnet *); +static void rl_start_locked(struct ifnet *); +static void rl_stop(struct rl_softc *); +static int rl_suspend(device_t); +static void rl_tick(void *); +static void rl_txeof(struct rl_softc *); +static void rl_watchdog(struct ifnet *); #ifdef RL_USEIOSPACE #define RL_RES SYS_RES_IOPORT diff --git a/sys/pci/if_sf.c b/sys/pci/if_sf.c index 539ecdb..ed91f01 100644 --- a/sys/pci/if_sf.c +++ b/sys/pci/if_sf.c @@ -128,52 +128,50 @@ static struct sf_type sf_devs[] = { { 0, 0, NULL } }; -static int sf_probe (device_t); -static int sf_attach (device_t); -static int sf_detach (device_t); -static void sf_intr (void *); -static void sf_stats_update (void *); -static void sf_rxeof (struct sf_softc *); -static void sf_txeof (struct sf_softc *); -static int sf_encap (struct sf_softc *, - struct sf_tx_bufdesc_type0 *, - struct mbuf *); -static void sf_start (struct ifnet *); -static int sf_ioctl (struct ifnet *, u_long, caddr_t); -static void sf_init (void *); -static void sf_stop (struct sf_softc *); -static void sf_watchdog (struct ifnet *); -static void sf_shutdown (device_t); -static int sf_ifmedia_upd (struct ifnet *); -static void sf_ifmedia_sts (struct ifnet *, struct ifmediareq *); -static void sf_reset (struct sf_softc *); -static int sf_init_rx_ring (struct sf_softc *); -static void sf_init_tx_ring (struct sf_softc *); -static int sf_newbuf (struct sf_softc *, - struct sf_rx_bufdesc_type0 *, - struct mbuf *); -static void sf_setmulti (struct sf_softc *); -static int sf_setperf (struct sf_softc *, int, caddr_t); -static int sf_sethash (struct sf_softc *, caddr_t, int); +static int sf_probe(device_t); +static int sf_attach(device_t); +static int sf_detach(device_t); +static void sf_intr(void *); +static void sf_stats_update(void *); +static void sf_rxeof(struct sf_softc *); +static void sf_txeof(struct sf_softc *); +static int sf_encap(struct sf_softc *, struct sf_tx_bufdesc_type0 *, + struct mbuf *); +static void sf_start(struct ifnet *); +static int sf_ioctl(struct ifnet *, u_long, caddr_t); +static void sf_init(void *); +static void sf_stop(struct sf_softc *); +static void sf_watchdog(struct ifnet *); +static void sf_shutdown(device_t); +static int sf_ifmedia_upd(struct ifnet *); +static void sf_ifmedia_sts(struct ifnet *, struct ifmediareq *); +static void sf_reset(struct sf_softc *); +static int sf_init_rx_ring(struct sf_softc *); +static void sf_init_tx_ring(struct sf_softc *); +static int sf_newbuf(struct sf_softc *, struct sf_rx_bufdesc_type0 *, + struct mbuf *); +static void sf_setmulti(struct sf_softc *); +static int sf_setperf(struct sf_softc *, int, caddr_t); +static int sf_sethash(struct sf_softc *, caddr_t, int); #ifdef notdef -static int sf_setvlan (struct sf_softc *, int, u_int32_t); +static int sf_setvlan(struct sf_softc *, int, u_int32_t); #endif -static u_int8_t sf_read_eeprom (struct sf_softc *, int); +static u_int8_t sf_read_eeprom(struct sf_softc *, int); -static int sf_miibus_readreg (device_t, int, int); -static int sf_miibus_writereg (device_t, int, int, int); -static void sf_miibus_statchg (device_t); +static int sf_miibus_readreg(device_t, int, int); +static int sf_miibus_writereg(device_t, int, int, int); +static void sf_miibus_statchg(device_t); #ifdef DEVICE_POLLING -static void sf_poll (struct ifnet *ifp, enum poll_cmd cmd, +static void sf_poll(struct ifnet *ifp, enum poll_cmd cmd, int count); -static void sf_poll_locked (struct ifnet *ifp, enum poll_cmd cmd, +static void sf_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count); #endif /* DEVICE_POLLING */ -static u_int32_t csr_read_4 (struct sf_softc *, int); -static void csr_write_4 (struct sf_softc *, int, u_int32_t); -static void sf_txthresh_adjust (struct sf_softc *); +static u_int32_t csr_read_4(struct sf_softc *, int); +static void csr_write_4(struct sf_softc *, int, u_int32_t); +static void sf_txthresh_adjust(struct sf_softc *); #ifdef SF_USEIOSPACE #define SF_RES SYS_RES_IOPORT diff --git a/sys/pci/if_sk.c b/sys/pci/if_sk.c index 2529cc5..89e5e22 100644 --- a/sys/pci/if_sk.c +++ b/sys/pci/if_sk.c @@ -178,68 +178,68 @@ static struct sk_type sk_devs[] = { { 0, 0, NULL } }; -static int skc_probe (device_t); -static int skc_attach (device_t); -static int skc_detach (device_t); -static void skc_shutdown (device_t); -static int sk_detach (device_t); -static int sk_probe (device_t); -static int sk_attach (device_t); -static void sk_tick (void *); -static void sk_intr (void *); -static void sk_intr_xmac (struct sk_if_softc *); -static void sk_intr_bcom (struct sk_if_softc *); -static void sk_intr_yukon (struct sk_if_softc *); -static void sk_rxeof (struct sk_if_softc *); -static void sk_txeof (struct sk_if_softc *); -static int sk_encap (struct sk_if_softc *, struct mbuf *, +static int skc_probe(device_t); +static int skc_attach(device_t); +static int skc_detach(device_t); +static void skc_shutdown(device_t); +static int sk_detach(device_t); +static int sk_probe(device_t); +static int sk_attach(device_t); +static void sk_tick(void *); +static void sk_intr(void *); +static void sk_intr_xmac(struct sk_if_softc *); +static void sk_intr_bcom(struct sk_if_softc *); +static void sk_intr_yukon(struct sk_if_softc *); +static void sk_rxeof(struct sk_if_softc *); +static void sk_txeof(struct sk_if_softc *); +static int sk_encap(struct sk_if_softc *, struct mbuf *, u_int32_t *); -static void sk_start (struct ifnet *); -static int sk_ioctl (struct ifnet *, u_long, caddr_t); -static void sk_init (void *); -static void sk_init_xmac (struct sk_if_softc *); -static void sk_init_yukon (struct sk_if_softc *); -static void sk_stop (struct sk_if_softc *); -static void sk_watchdog (struct ifnet *); -static int sk_ifmedia_upd (struct ifnet *); -static void sk_ifmedia_sts (struct ifnet *, struct ifmediareq *); -static void sk_reset (struct sk_softc *); -static int sk_newbuf (struct sk_if_softc *, +static void sk_start(struct ifnet *); +static int sk_ioctl(struct ifnet *, u_long, caddr_t); +static void sk_init(void *); +static void sk_init_xmac(struct sk_if_softc *); +static void sk_init_yukon(struct sk_if_softc *); +static void sk_stop(struct sk_if_softc *); +static void sk_watchdog(struct ifnet *); +static int sk_ifmedia_upd(struct ifnet *); +static void sk_ifmedia_sts(struct ifnet *, struct ifmediareq *); +static void sk_reset(struct sk_softc *); +static int sk_newbuf(struct sk_if_softc *, struct sk_chain *, struct mbuf *); -static int sk_alloc_jumbo_mem (struct sk_if_softc *); -static void *sk_jalloc (struct sk_if_softc *); -static void sk_jfree (void *, void *); -static int sk_init_rx_ring (struct sk_if_softc *); -static void sk_init_tx_ring (struct sk_if_softc *); -static u_int32_t sk_win_read_4 (struct sk_softc *, int); -static u_int16_t sk_win_read_2 (struct sk_softc *, int); -static u_int8_t sk_win_read_1 (struct sk_softc *, int); -static void sk_win_write_4 (struct sk_softc *, int, u_int32_t); -static void sk_win_write_2 (struct sk_softc *, int, u_int32_t); -static void sk_win_write_1 (struct sk_softc *, int, u_int32_t); -static u_int8_t sk_vpd_readbyte (struct sk_softc *, int); -static void sk_vpd_read_res (struct sk_softc *, struct vpd_res *, int); -static void sk_vpd_read (struct sk_softc *); - -static int sk_miibus_readreg (device_t, int, int); -static int sk_miibus_writereg (device_t, int, int, int); -static void sk_miibus_statchg (device_t); - -static int sk_xmac_miibus_readreg (struct sk_if_softc *, int, int); -static int sk_xmac_miibus_writereg (struct sk_if_softc *, int, int, +static int sk_alloc_jumbo_mem(struct sk_if_softc *); +static void *sk_jalloc(struct sk_if_softc *); +static void sk_jfree(void *, void *); +static int sk_init_rx_ring(struct sk_if_softc *); +static void sk_init_tx_ring(struct sk_if_softc *); +static u_int32_t sk_win_read_4(struct sk_softc *, int); +static u_int16_t sk_win_read_2(struct sk_softc *, int); +static u_int8_t sk_win_read_1(struct sk_softc *, int); +static void sk_win_write_4(struct sk_softc *, int, u_int32_t); +static void sk_win_write_2(struct sk_softc *, int, u_int32_t); +static void sk_win_write_1(struct sk_softc *, int, u_int32_t); +static u_int8_t sk_vpd_readbyte(struct sk_softc *, int); +static void sk_vpd_read_res(struct sk_softc *, struct vpd_res *, int); +static void sk_vpd_read(struct sk_softc *); + +static int sk_miibus_readreg(device_t, int, int); +static int sk_miibus_writereg(device_t, int, int, int); +static void sk_miibus_statchg(device_t); + +static int sk_xmac_miibus_readreg(struct sk_if_softc *, int, int); +static int sk_xmac_miibus_writereg(struct sk_if_softc *, int, int, int); -static void sk_xmac_miibus_statchg (struct sk_if_softc *); +static void sk_xmac_miibus_statchg(struct sk_if_softc *); -static int sk_marv_miibus_readreg (struct sk_if_softc *, int, int); -static int sk_marv_miibus_writereg (struct sk_if_softc *, int, int, +static int sk_marv_miibus_readreg(struct sk_if_softc *, int, int); +static int sk_marv_miibus_writereg(struct sk_if_softc *, int, int, int); -static void sk_marv_miibus_statchg (struct sk_if_softc *); +static void sk_marv_miibus_statchg(struct sk_if_softc *); -static uint32_t sk_xmchash (const uint8_t *); -static uint32_t sk_gmchash (const uint8_t *); -static void sk_setfilt (struct sk_if_softc *, caddr_t, int); -static void sk_setmulti (struct sk_if_softc *); -static void sk_setpromisc (struct sk_if_softc *); +static uint32_t sk_xmchash(const uint8_t *); +static uint32_t sk_gmchash(const uint8_t *); +static void sk_setfilt(struct sk_if_softc *, caddr_t, int); +static void sk_setmulti(struct sk_if_softc *); +static void sk_setpromisc(struct sk_if_softc *); #ifdef SK_USEIOSPACE #define SK_RES SYS_RES_IOPORT diff --git a/sys/pci/if_ste.c b/sys/pci/if_ste.c index 660627f..ac5a2b5 100644 --- a/sys/pci/if_ste.c +++ b/sys/pci/if_ste.c @@ -87,44 +87,42 @@ static struct ste_type ste_devs[] = { { 0, 0, NULL } }; -static int ste_probe (device_t); -static int ste_attach (device_t); -static int ste_detach (device_t); -static void ste_init (void *); -static void ste_intr (void *); -static void ste_rxeoc (struct ste_softc *); -static void ste_rxeof (struct ste_softc *); -static void ste_txeoc (struct ste_softc *); -static void ste_txeof (struct ste_softc *); -static void ste_stats_update (void *); -static void ste_stop (struct ste_softc *); -static void ste_reset (struct ste_softc *); -static int ste_ioctl (struct ifnet *, u_long, caddr_t); -static int ste_encap (struct ste_softc *, struct ste_chain *, - struct mbuf *); -static void ste_start (struct ifnet *); -static void ste_watchdog (struct ifnet *); -static void ste_shutdown (device_t); -static int ste_newbuf (struct ste_softc *, - struct ste_chain_onefrag *, - struct mbuf *); -static int ste_ifmedia_upd (struct ifnet *); -static void ste_ifmedia_sts (struct ifnet *, struct ifmediareq *); - -static void ste_mii_sync (struct ste_softc *); -static void ste_mii_send (struct ste_softc *, u_int32_t, int); -static int ste_mii_readreg (struct ste_softc *, struct ste_mii_frame *); -static int ste_mii_writereg (struct ste_softc *, struct ste_mii_frame *); -static int ste_miibus_readreg (device_t, int, int); -static int ste_miibus_writereg (device_t, int, int, int); -static void ste_miibus_statchg (device_t); - -static int ste_eeprom_wait (struct ste_softc *); -static int ste_read_eeprom (struct ste_softc *, caddr_t, int, int, int); -static void ste_wait (struct ste_softc *); -static void ste_setmulti (struct ste_softc *); -static int ste_init_rx_list (struct ste_softc *); -static void ste_init_tx_list (struct ste_softc *); +static int ste_probe(device_t); +static int ste_attach(device_t); +static int ste_detach(device_t); +static void ste_init(void *); +static void ste_intr(void *); +static void ste_rxeoc(struct ste_softc *); +static void ste_rxeof(struct ste_softc *); +static void ste_txeoc(struct ste_softc *); +static void ste_txeof(struct ste_softc *); +static void ste_stats_update(void *); +static void ste_stop(struct ste_softc *); +static void ste_reset(struct ste_softc *); +static int ste_ioctl(struct ifnet *, u_long, caddr_t); +static int ste_encap(struct ste_softc *, struct ste_chain *, struct mbuf *); +static void ste_start(struct ifnet *); +static void ste_watchdog(struct ifnet *); +static void ste_shutdown(device_t); +static int ste_newbuf(struct ste_softc *, struct ste_chain_onefrag *, + struct mbuf *); +static int ste_ifmedia_upd(struct ifnet *); +static void ste_ifmedia_sts(struct ifnet *, struct ifmediareq *); + +static void ste_mii_sync(struct ste_softc *); +static void ste_mii_send(struct ste_softc *, u_int32_t, int); +static int ste_mii_readreg(struct ste_softc *, struct ste_mii_frame *); +static int ste_mii_writereg(struct ste_softc *, struct ste_mii_frame *); +static int ste_miibus_readreg(device_t, int, int); +static int ste_miibus_writereg(device_t, int, int, int); +static void ste_miibus_statchg(device_t); + +static int ste_eeprom_wait(struct ste_softc *); +static int ste_read_eeprom(struct ste_softc *, caddr_t, int, int, int); +static void ste_wait(struct ste_softc *); +static void ste_setmulti(struct ste_softc *); +static int ste_init_rx_list(struct ste_softc *); +static void ste_init_tx_list(struct ste_softc *); #ifdef STE_USEIOSPACE #define STE_RES SYS_RES_IOPORT diff --git a/sys/pci/if_ti.c b/sys/pci/if_ti.c index 856dab9..9af8393 100644 --- a/sys/pci/if_ti.c +++ b/sys/pci/if_ti.c @@ -195,67 +195,63 @@ static struct cdevsw ti_cdevsw = { .d_name = "ti", }; -static int ti_probe (device_t); -static int ti_attach (device_t); -static int ti_detach (device_t); -static void ti_txeof (struct ti_softc *); -static void ti_rxeof (struct ti_softc *); - -static void ti_stats_update (struct ti_softc *); -static int ti_encap (struct ti_softc *, struct mbuf *, u_int32_t *); - -static void ti_intr (void *); -static void ti_start (struct ifnet *); -static int ti_ioctl (struct ifnet *, u_long, caddr_t); -static void ti_init (void *); -static void ti_init2 (struct ti_softc *); -static void ti_stop (struct ti_softc *); -static void ti_watchdog (struct ifnet *); -static void ti_shutdown (device_t); -static int ti_ifmedia_upd (struct ifnet *); -static void ti_ifmedia_sts (struct ifnet *, struct ifmediareq *); - -static u_int32_t ti_eeprom_putbyte (struct ti_softc *, int); -static u_int8_t ti_eeprom_getbyte (struct ti_softc *, int, u_int8_t *); -static int ti_read_eeprom (struct ti_softc *, caddr_t, int, int); - -static void ti_add_mcast (struct ti_softc *, struct ether_addr *); -static void ti_del_mcast (struct ti_softc *, struct ether_addr *); -static void ti_setmulti (struct ti_softc *); - -static void ti_mem (struct ti_softc *, u_int32_t, - u_int32_t, caddr_t); -static int ti_copy_mem (struct ti_softc *, u_int32_t, - u_int32_t, caddr_t, int, int); -static int ti_copy_scratch (struct ti_softc *, u_int32_t, - u_int32_t, caddr_t, int, int, int); -static int ti_bcopy_swap (const void *, void *, size_t, - ti_swap_type); -static void ti_loadfw (struct ti_softc *); -static void ti_cmd (struct ti_softc *, struct ti_cmd_desc *); -static void ti_cmd_ext (struct ti_softc *, struct ti_cmd_desc *, - caddr_t, int); -static void ti_handle_events (struct ti_softc *); +static int ti_probe(device_t); +static int ti_attach(device_t); +static int ti_detach(device_t); +static void ti_txeof(struct ti_softc *); +static void ti_rxeof(struct ti_softc *); + +static void ti_stats_update(struct ti_softc *); +static int ti_encap(struct ti_softc *, struct mbuf *, u_int32_t *); + +static void ti_intr(void *); +static void ti_start(struct ifnet *); +static int ti_ioctl(struct ifnet *, u_long, caddr_t); +static void ti_init(void *); +static void ti_init2(struct ti_softc *); +static void ti_stop(struct ti_softc *); +static void ti_watchdog(struct ifnet *); +static void ti_shutdown(device_t); +static int ti_ifmedia_upd(struct ifnet *); +static void ti_ifmedia_sts(struct ifnet *, struct ifmediareq *); + +static u_int32_t ti_eeprom_putbyte(struct ti_softc *, int); +static u_int8_t ti_eeprom_getbyte(struct ti_softc *, int, u_int8_t *); +static int ti_read_eeprom(struct ti_softc *, caddr_t, int, int); + +static void ti_add_mcast(struct ti_softc *, struct ether_addr *); +static void ti_del_mcast(struct ti_softc *, struct ether_addr *); +static void ti_setmulti(struct ti_softc *); + +static void ti_mem(struct ti_softc *, u_int32_t, u_int32_t, caddr_t); +static int ti_copy_mem(struct ti_softc *, u_int32_t, u_int32_t, caddr_t, int, int); +static int ti_copy_scratch(struct ti_softc *, u_int32_t, u_int32_t, caddr_t, + int, int, int); +static int ti_bcopy_swap(const void *, void *, size_t, ti_swap_type); +static void ti_loadfw(struct ti_softc *); +static void ti_cmd(struct ti_softc *, struct ti_cmd_desc *); +static void ti_cmd_ext(struct ti_softc *, struct ti_cmd_desc *, caddr_t, int); +static void ti_handle_events(struct ti_softc *); #ifdef TI_PRIVATE_JUMBOS -static int ti_alloc_jumbo_mem (struct ti_softc *); -static void *ti_jalloc (struct ti_softc *); -static void ti_jfree (void *, void *); +static int ti_alloc_jumbo_mem(struct ti_softc *); +static void *ti_jalloc(struct ti_softc *); +static void ti_jfree(void *, void *); #endif /* TI_PRIVATE_JUMBOS */ -static int ti_newbuf_std (struct ti_softc *, int, struct mbuf *); -static int ti_newbuf_mini (struct ti_softc *, int, struct mbuf *); -static int ti_newbuf_jumbo (struct ti_softc *, int, struct mbuf *); -static int ti_init_rx_ring_std (struct ti_softc *); -static void ti_free_rx_ring_std (struct ti_softc *); -static int ti_init_rx_ring_jumbo (struct ti_softc *); -static void ti_free_rx_ring_jumbo (struct ti_softc *); -static int ti_init_rx_ring_mini (struct ti_softc *); -static void ti_free_rx_ring_mini (struct ti_softc *); -static void ti_free_tx_ring (struct ti_softc *); -static int ti_init_tx_ring (struct ti_softc *); - -static int ti_64bitslot_war (struct ti_softc *); -static int ti_chipinit (struct ti_softc *); -static int ti_gibinit (struct ti_softc *); +static int ti_newbuf_std(struct ti_softc *, int, struct mbuf *); +static int ti_newbuf_mini(struct ti_softc *, int, struct mbuf *); +static int ti_newbuf_jumbo(struct ti_softc *, int, struct mbuf *); +static int ti_init_rx_ring_std(struct ti_softc *); +static void ti_free_rx_ring_std(struct ti_softc *); +static int ti_init_rx_ring_jumbo(struct ti_softc *); +static void ti_free_rx_ring_jumbo(struct ti_softc *); +static int ti_init_rx_ring_mini(struct ti_softc *); +static void ti_free_rx_ring_mini(struct ti_softc *); +static void ti_free_tx_ring(struct ti_softc *); +static int ti_init_tx_ring(struct ti_softc *); + +static int ti_64bitslot_war(struct ti_softc *); +static int ti_chipinit(struct ti_softc *); +static int ti_gibinit(struct ti_softc *); #ifdef TI_JUMBO_HDRSPLIT static __inline void ti_hdr_split (struct mbuf *top, int hdr_len, diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c index 187c905..1415f21 100644 --- a/sys/pci/if_tl.c +++ b/sys/pci/if_tl.c @@ -261,62 +261,61 @@ static struct tl_type tl_devs[] = { { 0, 0, NULL } }; -static int tl_probe (device_t); -static int tl_attach (device_t); -static int tl_detach (device_t); -static int tl_intvec_rxeoc (void *, u_int32_t); -static int tl_intvec_txeoc (void *, u_int32_t); -static int tl_intvec_txeof (void *, u_int32_t); -static int tl_intvec_rxeof (void *, u_int32_t); -static int tl_intvec_adchk (void *, u_int32_t); -static int tl_intvec_netsts (void *, u_int32_t); - -static int tl_newbuf (struct tl_softc *, struct tl_chain_onefrag *); -static void tl_stats_update (void *); -static int tl_encap (struct tl_softc *, struct tl_chain *, - struct mbuf *); - -static void tl_intr (void *); -static void tl_start (struct ifnet *); -static int tl_ioctl (struct ifnet *, u_long, caddr_t); -static void tl_init (void *); -static void tl_stop (struct tl_softc *); -static void tl_watchdog (struct ifnet *); -static void tl_shutdown (device_t); -static int tl_ifmedia_upd (struct ifnet *); -static void tl_ifmedia_sts (struct ifnet *, struct ifmediareq *); - -static u_int8_t tl_eeprom_putbyte (struct tl_softc *, int); -static u_int8_t tl_eeprom_getbyte (struct tl_softc *, int, u_int8_t *); -static int tl_read_eeprom (struct tl_softc *, caddr_t, int, int); - -static void tl_mii_sync (struct tl_softc *); -static void tl_mii_send (struct tl_softc *, u_int32_t, int); -static int tl_mii_readreg (struct tl_softc *, struct tl_mii_frame *); -static int tl_mii_writereg (struct tl_softc *, struct tl_mii_frame *); -static int tl_miibus_readreg (device_t, int, int); -static int tl_miibus_writereg (device_t, int, int, int); -static void tl_miibus_statchg (device_t); - -static void tl_setmode (struct tl_softc *, int); -static uint32_t tl_mchash (const uint8_t *); -static void tl_setmulti (struct tl_softc *); -static void tl_setfilt (struct tl_softc *, caddr_t, int); -static void tl_softreset (struct tl_softc *, int); -static void tl_hardreset (device_t); -static int tl_list_rx_init (struct tl_softc *); -static int tl_list_tx_init (struct tl_softc *); - -static u_int8_t tl_dio_read8 (struct tl_softc *, int); -static u_int16_t tl_dio_read16 (struct tl_softc *, int); -static u_int32_t tl_dio_read32 (struct tl_softc *, int); -static void tl_dio_write8 (struct tl_softc *, int, int); -static void tl_dio_write16 (struct tl_softc *, int, int); -static void tl_dio_write32 (struct tl_softc *, int, int); -static void tl_dio_setbit (struct tl_softc *, int, int); -static void tl_dio_clrbit (struct tl_softc *, int, int); -static void tl_dio_setbit16 (struct tl_softc *, int, int); -static void tl_dio_clrbit16 (struct tl_softc *, int, int); +static int tl_probe(device_t); +static int tl_attach(device_t); +static int tl_detach(device_t); +static int tl_intvec_rxeoc(void *, u_int32_t); +static int tl_intvec_txeoc(void *, u_int32_t); +static int tl_intvec_txeof(void *, u_int32_t); +static int tl_intvec_rxeof(void *, u_int32_t); +static int tl_intvec_adchk(void *, u_int32_t); +static int tl_intvec_netsts(void *, u_int32_t); + +static int tl_newbuf(struct tl_softc *, struct tl_chain_onefrag *); +static void tl_stats_update(void *); +static int tl_encap(struct tl_softc *, struct tl_chain *, struct mbuf *); + +static void tl_intr(void *); +static void tl_start(struct ifnet *); +static int tl_ioctl(struct ifnet *, u_long, caddr_t); +static void tl_init(void *); +static void tl_stop(struct tl_softc *); +static void tl_watchdog(struct ifnet *); +static void tl_shutdown(device_t); +static int tl_ifmedia_upd(struct ifnet *); +static void tl_ifmedia_sts(struct ifnet *, struct ifmediareq *); + +static u_int8_t tl_eeprom_putbyte(struct tl_softc *, int); +static u_int8_t tl_eeprom_getbyte(struct tl_softc *, int, u_int8_t *); +static int tl_read_eeprom(struct tl_softc *, caddr_t, int, int); + +static void tl_mii_sync(struct tl_softc *); +static void tl_mii_send(struct tl_softc *, u_int32_t, int); +static int tl_mii_readreg(struct tl_softc *, struct tl_mii_frame *); +static int tl_mii_writereg(struct tl_softc *, struct tl_mii_frame *); +static int tl_miibus_readreg(device_t, int, int); +static int tl_miibus_writereg(device_t, int, int, int); +static void tl_miibus_statchg(device_t); + +static void tl_setmode(struct tl_softc *, int); +static uint32_t tl_mchash(const uint8_t *); +static void tl_setmulti(struct tl_softc *); +static void tl_setfilt(struct tl_softc *, caddr_t, int); +static void tl_softreset(struct tl_softc *, int); +static void tl_hardreset(device_t); +static int tl_list_rx_init(struct tl_softc *); +static int tl_list_tx_init(struct tl_softc *); + +static u_int8_t tl_dio_read8(struct tl_softc *, int); +static u_int16_t tl_dio_read16(struct tl_softc *, int); +static u_int32_t tl_dio_read32(struct tl_softc *, int); +static void tl_dio_write8(struct tl_softc *, int, int); +static void tl_dio_write16(struct tl_softc *, int, int); +static void tl_dio_write32(struct tl_softc *, int, int); +static void tl_dio_setbit(struct tl_softc *, int, int); +static void tl_dio_clrbit(struct tl_softc *, int, int); +static void tl_dio_setbit16(struct tl_softc *, int, int); +static void tl_dio_clrbit16(struct tl_softc *, int, int); #ifdef TL_USEIOSPACE #define TL_RES SYS_RES_IOPORT diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c index ac13ec1..843be85 100644 --- a/sys/pci/if_vr.c +++ b/sys/pci/if_vr.c @@ -126,47 +126,45 @@ static struct vr_type vr_devs[] = { { 0, 0, NULL } }; -static int vr_probe (device_t); -static int vr_attach (device_t); -static int vr_detach (device_t); - -static int vr_newbuf (struct vr_softc *, - struct vr_chain_onefrag *, - struct mbuf *); -static int vr_encap (struct vr_softc *, struct vr_chain *, - struct mbuf * ); - -static void vr_rxeof (struct vr_softc *); -static void vr_rxeoc (struct vr_softc *); -static void vr_txeof (struct vr_softc *); -static void vr_tick (void *); -static void vr_intr (void *); -static void vr_start (struct ifnet *); -static void vr_start_locked (struct ifnet *); -static int vr_ioctl (struct ifnet *, u_long, caddr_t); -static void vr_init (void *); -static void vr_init_locked (struct vr_softc *); -static void vr_stop (struct vr_softc *); -static void vr_watchdog (struct ifnet *); -static void vr_shutdown (device_t); -static int vr_ifmedia_upd (struct ifnet *); -static void vr_ifmedia_sts (struct ifnet *, struct ifmediareq *); +static int vr_probe(device_t); +static int vr_attach(device_t); +static int vr_detach(device_t); + +static int vr_newbuf(struct vr_softc *, struct vr_chain_onefrag *, + struct mbuf *); +static int vr_encap(struct vr_softc *, struct vr_chain *, struct mbuf * ); + +static void vr_rxeof(struct vr_softc *); +static void vr_rxeoc(struct vr_softc *); +static void vr_txeof(struct vr_softc *); +static void vr_tick(void *); +static void vr_intr(void *); +static void vr_start(struct ifnet *); +static void vr_start_locked(struct ifnet *); +static int vr_ioctl(struct ifnet *, u_long, caddr_t); +static void vr_init(void *); +static void vr_init_locked(struct vr_softc *); +static void vr_stop(struct vr_softc *); +static void vr_watchdog(struct ifnet *); +static void vr_shutdown(device_t); +static int vr_ifmedia_upd(struct ifnet *); +static void vr_ifmedia_sts(struct ifnet *, struct ifmediareq *); #ifdef VR_USESWSHIFT -static void vr_mii_sync (struct vr_softc *); -static void vr_mii_send (struct vr_softc *, uint32_t, int); +static void vr_mii_sync(struct vr_softc *); +static void vr_mii_send(struct vr_softc *, uint32_t, int); #endif -static int vr_mii_readreg (struct vr_softc *, struct vr_mii_frame *); -static int vr_mii_writereg (struct vr_softc *, struct vr_mii_frame *); -static int vr_miibus_readreg (device_t, uint16_t, uint16_t); -static int vr_miibus_writereg (device_t, uint16_t, uint16_t, uint16_t); -static void vr_miibus_statchg (device_t); - -static void vr_setcfg (struct vr_softc *, int); -static void vr_setmulti (struct vr_softc *); -static void vr_reset (struct vr_softc *); -static int vr_list_rx_init (struct vr_softc *); -static int vr_list_tx_init (struct vr_softc *); +static int vr_mii_readreg(struct vr_softc *, struct vr_mii_frame *); +static int vr_mii_writereg(struct vr_softc *, struct vr_mii_frame *); +static int vr_miibus_readreg(device_t, uint16_t, uint16_t); +static int vr_miibus_writereg(device_t, uint16_t, uint16_t, uint16_t); +static void vr_miibus_statchg(device_t); + +static void vr_setcfg(struct vr_softc *, int); +static void vr_setmulti(struct vr_softc *); +static void vr_reset(struct vr_softc *); +static int vr_list_rx_init(struct vr_softc *); +static int vr_list_tx_init(struct vr_softc *); #ifdef VR_USEIOSPACE #define VR_RES SYS_RES_IOPORT diff --git a/sys/pci/if_wb.c b/sys/pci/if_wb.c index abd8bac..e22d61c 100644 --- a/sys/pci/if_wb.c +++ b/sys/pci/if_wb.c @@ -140,50 +140,48 @@ static struct wb_type wb_devs[] = { { 0, 0, NULL } }; -static int wb_probe (device_t); -static int wb_attach (device_t); -static int wb_detach (device_t); - -static void wb_bfree (void *addr, void *args); -static int wb_newbuf (struct wb_softc *, - struct wb_chain_onefrag *, - struct mbuf *); -static int wb_encap (struct wb_softc *, struct wb_chain *, - struct mbuf *); - -static void wb_rxeof (struct wb_softc *); -static void wb_rxeoc (struct wb_softc *); -static void wb_txeof (struct wb_softc *); -static void wb_txeoc (struct wb_softc *); -static void wb_intr (void *); -static void wb_tick (void *); -static void wb_start (struct ifnet *); -static int wb_ioctl (struct ifnet *, u_long, caddr_t); -static void wb_init (void *); -static void wb_stop (struct wb_softc *); -static void wb_watchdog (struct ifnet *); -static void wb_shutdown (device_t); -static int wb_ifmedia_upd (struct ifnet *); -static void wb_ifmedia_sts (struct ifnet *, struct ifmediareq *); - -static void wb_eeprom_putbyte (struct wb_softc *, int); -static void wb_eeprom_getword (struct wb_softc *, int, u_int16_t *); -static void wb_read_eeprom (struct wb_softc *, caddr_t, int, int, int); -static void wb_mii_sync (struct wb_softc *); -static void wb_mii_send (struct wb_softc *, u_int32_t, int); -static int wb_mii_readreg (struct wb_softc *, struct wb_mii_frame *); -static int wb_mii_writereg (struct wb_softc *, struct wb_mii_frame *); - -static void wb_setcfg (struct wb_softc *, u_int32_t); -static void wb_setmulti (struct wb_softc *); -static void wb_reset (struct wb_softc *); -static void wb_fixmedia (struct wb_softc *); -static int wb_list_rx_init (struct wb_softc *); -static int wb_list_tx_init (struct wb_softc *); - -static int wb_miibus_readreg (device_t, int, int); -static int wb_miibus_writereg (device_t, int, int, int); -static void wb_miibus_statchg (device_t); +static int wb_probe(device_t); +static int wb_attach(device_t); +static int wb_detach(device_t); + +static void wb_bfree(void *addr, void *args); +static int wb_newbuf(struct wb_softc *, struct wb_chain_onefrag *, + struct mbuf *); +static int wb_encap(struct wb_softc *, struct wb_chain *, struct mbuf *); + +static void wb_rxeof(struct wb_softc *); +static void wb_rxeoc(struct wb_softc *); +static void wb_txeof(struct wb_softc *); +static void wb_txeoc(struct wb_softc *); +static void wb_intr(void *); +static void wb_tick(void *); +static void wb_start(struct ifnet *); +static int wb_ioctl(struct ifnet *, u_long, caddr_t); +static void wb_init(void *); +static void wb_stop(struct wb_softc *); +static void wb_watchdog(struct ifnet *); +static void wb_shutdown(device_t); +static int wb_ifmedia_upd(struct ifnet *); +static void wb_ifmedia_sts(struct ifnet *, struct ifmediareq *); + +static void wb_eeprom_putbyte(struct wb_softc *, int); +static void wb_eeprom_getword(struct wb_softc *, int, u_int16_t *); +static void wb_read_eeprom(struct wb_softc *, caddr_t, int, int, int); +static void wb_mii_sync(struct wb_softc *); +static void wb_mii_send(struct wb_softc *, u_int32_t, int); +static int wb_mii_readreg(struct wb_softc *, struct wb_mii_frame *); +static int wb_mii_writereg(struct wb_softc *, struct wb_mii_frame *); + +static void wb_setcfg(struct wb_softc *, u_int32_t); +static void wb_setmulti(struct wb_softc *); +static void wb_reset(struct wb_softc *); +static void wb_fixmedia(struct wb_softc *); +static int wb_list_rx_init(struct wb_softc *); +static int wb_list_tx_init(struct wb_softc *); + +static int wb_miibus_readreg(device_t, int, int); +static int wb_miibus_writereg(device_t, int, int, int); +static void wb_miibus_statchg(device_t); #ifdef WB_USEIOSPACE #define WB_RES SYS_RES_IOPORT diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c index 3cd39da..6d6a283 100644 --- a/sys/pci/if_xl.c +++ b/sys/pci/if_xl.c @@ -219,70 +219,65 @@ static struct xl_type xl_devs[] = { { 0, 0, NULL } }; -static int xl_probe (device_t); -static int xl_attach (device_t); -static int xl_detach (device_t); - -static int xl_newbuf (struct xl_softc *, struct xl_chain_onefrag *); -static void xl_stats_update (void *); -static void xl_stats_update_locked - (struct xl_softc *); -static int xl_encap (struct xl_softc *, struct xl_chain *, - struct mbuf *); -static void xl_rxeof (struct xl_softc *); -static int xl_rx_resync (struct xl_softc *); -static void xl_txeof (struct xl_softc *); -static void xl_txeof_90xB (struct xl_softc *); -static void xl_txeoc (struct xl_softc *); -static void xl_intr (void *); -static void xl_start (struct ifnet *); -static void xl_start_locked (struct ifnet *); -static void xl_start_90xB_locked - (struct ifnet *); -static int xl_ioctl (struct ifnet *, u_long, caddr_t); -static void xl_init (void *); -static void xl_init_locked (struct xl_softc *); -static void xl_stop (struct xl_softc *); -static void xl_watchdog (struct ifnet *); -static void xl_shutdown (device_t); -static int xl_suspend (device_t); -static int xl_resume (device_t); - -static int xl_ifmedia_upd (struct ifnet *); -static void xl_ifmedia_sts (struct ifnet *, struct ifmediareq *); - -static int xl_eeprom_wait (struct xl_softc *); -static int xl_read_eeprom (struct xl_softc *, caddr_t, int, int, int); -static void xl_mii_sync (struct xl_softc *); -static void xl_mii_send (struct xl_softc *, u_int32_t, int); -static int xl_mii_readreg (struct xl_softc *, struct xl_mii_frame *); -static int xl_mii_writereg (struct xl_softc *, struct xl_mii_frame *); - -static void xl_setcfg (struct xl_softc *); -static void xl_setmode (struct xl_softc *, int); -static void xl_setmulti (struct xl_softc *); -static void xl_setmulti_hash (struct xl_softc *); -static void xl_reset (struct xl_softc *); -static int xl_list_rx_init (struct xl_softc *); -static int xl_list_tx_init (struct xl_softc *); -static int xl_list_tx_init_90xB (struct xl_softc *); -static void xl_wait (struct xl_softc *); -static void xl_mediacheck (struct xl_softc *); -static void xl_choose_media (struct xl_softc *sc, int *media); -static void xl_choose_xcvr (struct xl_softc *, int); -static void xl_dma_map_addr (void *, bus_dma_segment_t *, int, int); -static void xl_dma_map_rxbuf (void *, bus_dma_segment_t *, int, bus_size_t, - int); -static void xl_dma_map_txbuf (void *, bus_dma_segment_t *, int, bus_size_t, - int); +static int xl_probe(device_t); +static int xl_attach(device_t); +static int xl_detach(device_t); + +static int xl_newbuf(struct xl_softc *, struct xl_chain_onefrag *); +static void xl_stats_update(void *); +static void xl_stats_update_locked(struct xl_softc *); +static int xl_encap(struct xl_softc *, struct xl_chain *, struct mbuf *); +static void xl_rxeof(struct xl_softc *); +static int xl_rx_resync(struct xl_softc *); +static void xl_txeof(struct xl_softc *); +static void xl_txeof_90xB(struct xl_softc *); +static void xl_txeoc(struct xl_softc *); +static void xl_intr(void *); +static void xl_start(struct ifnet *); +static void xl_start_locked(struct ifnet *); +static void xl_start_90xB_locked(struct ifnet *); +static int xl_ioctl(struct ifnet *, u_long, caddr_t); +static void xl_init(void *); +static void xl_init_locked(struct xl_softc *); +static void xl_stop(struct xl_softc *); +static void xl_watchdog(struct ifnet *); +static void xl_shutdown(device_t); +static int xl_suspend(device_t); +static int xl_resume(device_t); + +static int xl_ifmedia_upd(struct ifnet *); +static void xl_ifmedia_sts(struct ifnet *, struct ifmediareq *); + +static int xl_eeprom_wait(struct xl_softc *); +static int xl_read_eeprom(struct xl_softc *, caddr_t, int, int, int); +static void xl_mii_sync(struct xl_softc *); +static void xl_mii_send(struct xl_softc *, u_int32_t, int); +static int xl_mii_readreg(struct xl_softc *, struct xl_mii_frame *); +static int xl_mii_writereg(struct xl_softc *, struct xl_mii_frame *); + +static void xl_setcfg(struct xl_softc *); +static void xl_setmode(struct xl_softc *, int); +static void xl_setmulti(struct xl_softc *); +static void xl_setmulti_hash(struct xl_softc *); +static void xl_reset(struct xl_softc *); +static int xl_list_rx_init(struct xl_softc *); +static int xl_list_tx_init(struct xl_softc *); +static int xl_list_tx_init_90xB(struct xl_softc *); +static void xl_wait(struct xl_softc *); +static void xl_mediacheck(struct xl_softc *); +static void xl_choose_media(struct xl_softc *sc, int *media); +static void xl_choose_xcvr(struct xl_softc *, int); +static void xl_dma_map_addr(void *, bus_dma_segment_t *, int, int); +static void xl_dma_map_rxbuf(void *, bus_dma_segment_t *, int, bus_size_t, int); +static void xl_dma_map_txbuf(void *, bus_dma_segment_t *, int, bus_size_t, int); #ifdef notdef -static void xl_testpacket (struct xl_softc *); +static void xl_testpacket(struct xl_softc *); #endif -static int xl_miibus_readreg (device_t, int, int); -static int xl_miibus_writereg (device_t, int, int, int); -static void xl_miibus_statchg (device_t); -static void xl_miibus_mediainit (device_t); +static int xl_miibus_readreg(device_t, int, int); +static int xl_miibus_writereg(device_t, int, int, int); +static void xl_miibus_statchg(device_t); +static void xl_miibus_mediainit(device_t); static device_method_t xl_methods[] = { /* Device interface */ diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c index 187bc8c..e6e9c75 100644 --- a/sys/pci/ncr.c +++ b/sys/pci/ncr.c @@ -1257,46 +1257,46 @@ struct scripth { */ #ifdef _KERNEL -static nccb_p ncr_alloc_nccb (ncb_p np, u_long target, u_long lun); -static void ncr_complete (ncb_p np, nccb_p cp); -static int ncr_delta (int * from, int * to); -static void ncr_exception (ncb_p np); -static void ncr_free_nccb (ncb_p np, nccb_p cp); -static void ncr_freeze_devq (ncb_p np, struct cam_path *path); -static void ncr_selectclock (ncb_p np, u_char scntl3); -static void ncr_getclock (ncb_p np, u_char multiplier); -static nccb_p ncr_get_nccb (ncb_p np, u_long t,u_long l); +static nccb_p ncr_alloc_nccb(ncb_p np, u_long target, u_long lun); +static void ncr_complete(ncb_p np, nccb_p cp); +static int ncr_delta(int * from, int * to); +static void ncr_exception(ncb_p np); +static void ncr_free_nccb(ncb_p np, nccb_p cp); +static void ncr_freeze_devq(ncb_p np, struct cam_path *path); +static void ncr_selectclock(ncb_p np, u_char scntl3); +static void ncr_getclock(ncb_p np, u_char multiplier); +static nccb_p ncr_get_nccb(ncb_p np, u_long t,u_long l); #if 0 -static u_int32_t ncr_info (int unit); +static u_int32_t ncr_info(int unit); #endif -static void ncr_init (ncb_p np, char * msg, u_long code); -static void ncr_intr (void *vnp); -static void ncr_int_ma (ncb_p np, u_char dstat); -static void ncr_int_sir (ncb_p np); -static void ncr_int_sto (ncb_p np); +static void ncr_init(ncb_p np, char * msg, u_long code); +static void ncr_intr(void *vnp); +static void ncr_int_ma(ncb_p np, u_char dstat); +static void ncr_int_sir(ncb_p np); +static void ncr_int_sto(ncb_p np); #if 0 -static void ncr_min_phys (struct buf *bp); +static void ncr_min_phys(struct buf *bp); #endif -static void ncr_poll (struct cam_sim *sim); -static void ncb_profile (ncb_p np, nccb_p cp); -static void ncr_script_copy_and_bind - (ncb_p np, ncrcmd *src, ncrcmd *dst, int len); -static void ncr_script_fill (struct script * scr, struct scripth *scrh); -static int ncr_scatter (struct dsb* phys, vm_offset_t vaddr, - vm_size_t datalen); -static void ncr_getsync (ncb_p np, u_char sfac, u_char *fakp, - u_char *scntl3p); -static void ncr_setsync (ncb_p np, nccb_p cp,u_char scntl3,u_char sxfer, - u_char period); -static void ncr_setwide (ncb_p np, nccb_p cp, u_char wide, u_char ack); -static int ncr_show_msg (u_char * msg); -static int ncr_snooptest (ncb_p np); -static void ncr_action (struct cam_sim *sim, union ccb *ccb); -static void ncr_timeout (void *arg); -static void ncr_wakeup (ncb_p np, u_long code); - -static int ncr_probe (device_t dev); -static int ncr_attach (device_t dev); +static void ncr_poll(struct cam_sim *sim); +static void ncb_profile(ncb_p np, nccb_p cp); +static void ncr_script_copy_and_bind(cb_p np, ncrcmd *src, ncrcmd *dst, + int len); +static void ncr_script_fill(struct script * scr, struct scripth *scrh); +static int ncr_scatter(struct dsb* phys, vm_offset_t vaddr, + vm_size_t datalen); +static void ncr_getsync(ncb_p np, u_char sfac, u_char *fakp, + u_char *scntl3p); +static void ncr_setsync(ncb_p np, nccb_p cp,u_char scntl3,u_char sxfer, + u_char period); +static void ncr_setwide(ncb_p np, nccb_p cp, u_char wide, u_char ack); +static int ncr_show_msg(u_char * msg); +static int ncr_snooptest(ncb_p np); +static void ncr_action(struct cam_sim *sim, union ccb *ccb); +static void ncr_timeout(void *arg); +static void ncr_wakeup(ncb_p np, u_long code); + +static int ncr_probe(device_t dev); +static int ncr_attach(device_t dev); #endif /* _KERNEL */ |