diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 1995-10-31 18:41:49 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1995-10-31 18:41:49 +0000 |
| commit | c227cb34569910a3bd8edb1a8cf2683d5431ca2a (patch) | |
| tree | 9711854502756ff53e8dd251556997aa8fd32df5 /sys/dev | |
| parent | dc9deb292c258d2da350f88ba1be36a40dfdbd96 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ed/if_ed.c | 48 | ||||
| -rw-r--r-- | sys/dev/ic/i82586.h | 6 | ||||
| -rw-r--r-- | sys/dev/lnc/if_lnc.c | 78 | ||||
| -rw-r--r-- | sys/dev/lnc/if_lncvar.h | 4 |
4 files changed, 70 insertions, 66 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index 7d62ac2222ee..f873611299ea 100644 --- a/sys/dev/ed/if_ed.c +++ b/sys/dev/ed/if_ed.c @@ -13,7 +13,7 @@ * the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000, * and a variety of similar clones. * - * $Id: if_ed.c,v 1.81 1995/10/28 15:39:01 phk Exp $ + * $Id: if_ed.c,v 1.82 1995/10/28 22:46:26 pst Exp $ */ #include "ed.h" @@ -107,21 +107,21 @@ struct ed_softc { struct kern_devconf kdc; /* kernel configuration database info */ } ed_softc[NED]; -int ed_attach(struct isa_device *); -void ed_init(int); +static int ed_attach(struct isa_device *); +static void ed_init(int); void edintr(int); -int ed_ioctl(struct ifnet *, int, caddr_t); -int ed_probe(struct isa_device *); -void ed_start(struct ifnet *); -void ed_reset(int); -void ed_watchdog(int); -int ed_probe_generic8390(struct ed_softc *); -int ed_probe_WD80x3(struct isa_device *); -int ed_probe_3Com(struct isa_device *); -int ed_probe_Novell(struct isa_device *); -int ed_probe_pccard(struct isa_device *, u_char *); +static int ed_ioctl(struct ifnet *, int, caddr_t); +static int ed_probe(struct isa_device *); +static void ed_start(struct ifnet *); +static void ed_reset(int); +static void ed_watchdog(int); +static int ed_probe_generic8390(struct ed_softc *); +static int ed_probe_WD80x3(struct isa_device *); +static int ed_probe_3Com(struct isa_device *); +static int ed_probe_Novell(struct isa_device *); +static int ed_probe_pccard(struct isa_device *, u_char *); -void ds_getmcaf(); +static void ds_getmcaf(); static void ed_get_packet(struct ed_softc *, char *, int /* u_short */ , int); static void ed_stop(int); @@ -130,10 +130,11 @@ static inline void ed_rint(); static inline void ed_xmit(); static inline char *ed_ring_copy(); -void ed_pio_readmem(), ed_pio_writemem(); -u_short ed_pio_write_mbufs(); +static void ed_pio_readmem(), ed_pio_writemem(); +static u_short ed_pio_write_mbufs(); -void ed_setrcr(struct ifnet *, struct ed_softc *); +static void ed_setrcr(struct ifnet *, struct ed_softc *); +static u_long ds_crc(u_char *ep); #include "crd.h" #if NCRD > 0 @@ -144,8 +145,8 @@ void ed_setrcr(struct ifnet *, struct ed_softc *); * PC-Card (PCMCIA) specific code. */ static int card_intr(struct pccard_dev *); /* Interrupt handler */ -void edunload(struct pccard_dev *); /* Disable driver */ -void edsuspend(struct pccard_dev *); /* Suspend driver */ +static void edunload(struct pccard_dev *); /* Disable driver */ +static void edsuspend(struct pccard_dev *); /* Suspend driver */ static int edinit(struct pccard_dev *, int); /* init device */ static struct pccard_drv ed_info = @@ -166,7 +167,7 @@ static struct pccard_drv ed_info = * edinit with first=0. This is called when the user suspends * the system, or the APM code suspends the system. */ -void +static void edsuspend(struct pccard_dev *dp) { printf("ed%d: suspending\n", dp->isahd.id_unit); @@ -177,10 +178,9 @@ edsuspend(struct pccard_dev *dp) * the device's existence before initialising it. * Once initialised, the device table may be set up. */ -int +static int edinit(struct pccard_dev *dp, int first) { - int s; struct ed_softc *sc = &ed_softc[dp->isahd.id_unit]; /* * validate unit number. @@ -219,7 +219,7 @@ edinit(struct pccard_dev *dp, int first) * and ensure that any driver entry points such as * read and write do not hang. */ -void +static void edunload(struct pccard_dev *dp) { struct ed_softc *sc = &ed_softc[dp->isahd.id_unit]; @@ -2788,7 +2788,7 @@ ed_setrcr(ifp, sc) /* * Compute crc for ethernet address */ -u_long +static u_long ds_crc(ep) u_char *ep; { diff --git a/sys/dev/ic/i82586.h b/sys/dev/ic/i82586.h index 577313d81e5a..844bcd4cd011 100644 --- a/sys/dev/ic/i82586.h +++ b/sys/dev/ic/i82586.h @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: i82586.h,v 1.1 1993/10/12 06:53:10 rgrimes Exp $ */ /* @@ -309,14 +309,14 @@ ie_setup_config(volatile struct ie_config_cmd *cmd, cmd->ie_junk = 0xff; } -inline caddr_t +static inline caddr_t Align(caddr_t ptr) { unsigned long l = (unsigned long)ptr; l = (l + 3) & ~3L; return (caddr_t)l; } -inline void +static inline void ie_ack(volatile struct ie_sys_ctl_block *scb, u_int mask, int unit, void (*ca)(int)) { diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c index b0a1b7fc05ce..a04c39e637f4 100644 --- a/sys/dev/lnc/if_lnc.c +++ b/sys/dev/lnc/if_lnc.c @@ -128,18 +128,20 @@ struct lnc_softc { } lnc_softc[NLNC]; /* Function prototypes */ -int bicc_probe(struct isa_device *); -int depca_probe(struct isa_device *); -int lance_probe(int); -int ne2100_probe(struct isa_device *); -int pcnet_probe(int); -void lnc_init(int); -void lnc_start(struct ifnet *); -int lnc_ioctl(struct ifnet *, int, caddr_t); -void lnc_watchdog(int); -int lnc_probe(struct isa_device *); -int lnc_attach(struct isa_device *); -void lnc_dump_state(int); +static int bicc_probe(struct isa_device *); +static int depca_probe(struct isa_device *); +static int lance_probe(int); +static int ne2100_probe(struct isa_device *); +static int pcnet_probe(int); +static void lnc_init(int); +static void lnc_start(struct ifnet *); +static int lnc_ioctl(struct ifnet *, int, caddr_t); +static void lnc_watchdog(int); +static int lnc_probe(struct isa_device *); +static int lnc_attach(struct isa_device *); +#ifdef DEBUG +static void lnc_dump_state(int); +#endif /* DEBUG */ struct isa_driver lncdriver = {lnc_probe, lnc_attach, "lnc"}; @@ -214,25 +216,27 @@ lnc_registerdev(struct isa_device *isa_dev) } -void +#ifdef notyet +static void lnc_setladrf(struct ifnet *ifp, struct lnc_softc *sc) { } +#endif /* notyet */ -void +static void lnc_stop(int unit) { write_csr(unit, CSR0, STOP); } -void +static void lnc_reset(int unit) { lnc_init(unit); } -void +static void lnc_free_mbufs(struct lnc_softc *sc) { int i; @@ -254,7 +258,7 @@ lnc_free_mbufs(struct lnc_softc *sc) m_freem(sc->mbufs); } -inline int +static inline int alloc_mbuf_cluster(struct lnc_softc *sc, struct host_ring_entry *desc) { register struct mds *md = desc->md; @@ -287,7 +291,7 @@ alloc_mbuf_cluster(struct lnc_softc *sc, struct host_ring_entry *desc) return(0); } -inline struct mbuf * +static inline struct mbuf * chain_mbufs(struct lnc_softc *sc, int start_of_packet, int pkt_len) { struct mbuf *head, *m; @@ -321,7 +325,7 @@ chain_mbufs(struct lnc_softc *sc, int start_of_packet, int pkt_len) return(head); } -inline struct mbuf * +static inline struct mbuf * mbuf_packet(struct lnc_softc *sc, int start_of_packet, int pkt_len) { @@ -396,7 +400,7 @@ mbuf_packet(struct lnc_softc *sc, int start_of_packet, int pkt_len) } -inline void +static inline void lnc_rint(int unit) { register struct lnc_softc *sc = &lnc_softc[unit]; @@ -586,7 +590,7 @@ lnc_rint(int unit) outw(sc->rdp, RINT | INEA); } -inline void +static inline void lnc_tint(int unit) { register struct lnc_softc *sc = &lnc_softc[unit]; @@ -821,7 +825,7 @@ lnc_tint(int unit) } -int +static int lnc_probe(struct isa_device * isa_dev) { int nports; @@ -849,7 +853,7 @@ lnc_probe(struct isa_device * isa_dev) return (0); } -int +static int ne2100_probe(struct isa_device * isa_dev) { struct lnc_softc *sc = &lnc_softc[isa_dev->id_unit]; @@ -876,7 +880,7 @@ ne2100_probe(struct isa_device * isa_dev) } } -int +static int bicc_probe(struct isa_device * isa_dev) { struct lnc_softc *sc = &lnc_softc[isa_dev->id_unit]; @@ -919,7 +923,7 @@ int i; * you get the next byte in the ring. The mac address is stored after a * signature so keep searching for the signature first. */ -int +static int dec_macaddr_extract(u_char ring[], struct lnc_softc * sc) { const unsigned char signature[] = {0xff, 0x00, 0x55, 0xaa, 0xff, 0x00, 0x55, 0xaa}; @@ -945,7 +949,7 @@ dec_macaddr_extract(u_char ring[], struct lnc_softc * sc) return (0); } -int +static int depca_probe(struct isa_device * isa_dev) { int i; @@ -970,7 +974,7 @@ depca_probe(struct isa_device * isa_dev) return (0); } -int +static int lance_probe(int unit) { write_csr(unit, CSR0, STOP); @@ -990,7 +994,7 @@ lance_probe(int unit) return (UNKNOWN); } -int +static int pcnet_probe(int unit) { u_long chip_id; @@ -1026,7 +1030,7 @@ pcnet_probe(int unit) return (type); } -int +static int lnc_attach(struct isa_device * isa_dev) { struct lnc_softc *sc = &lnc_softc[isa_dev->id_unit]; @@ -1113,7 +1117,7 @@ lnc_attach(struct isa_device * isa_dev) return (1); } -void +static void lnc_init(int unit) { struct lnc_softc *sc = &lnc_softc[unit]; @@ -1371,7 +1375,7 @@ lncintr(int unit) -inline int +static inline int mbuf_to_buffer(struct mbuf *m, char *buffer) { @@ -1386,7 +1390,7 @@ mbuf_to_buffer(struct mbuf *m, char *buffer) return(len); } -inline struct mbuf * +static inline struct mbuf * chain_to_cluster(struct mbuf *m) { struct mbuf *new; @@ -1411,7 +1415,7 @@ chain_to_cluster(struct mbuf *m) * flags should be ok at those points too. */ -void +static void lnc_start(struct ifnet *ifp) { @@ -1569,7 +1573,7 @@ lnc_start(struct ifnet *ifp) LNCSTATS(trans_ring_full) } -int +static int lnc_ioctl(struct ifnet * ifp, int command, caddr_t data) { @@ -1663,7 +1667,7 @@ lnc_ioctl(struct ifnet * ifp, int command, caddr_t data) return error; } -void +static void lnc_watchdog(int unit) { log(LOG_ERR, "lnc%d: Device timeout -- Resetting\n", unit); @@ -1672,7 +1676,7 @@ lnc_watchdog(int unit) } #ifdef DEBUG -void +static void lnc_dump_state(int unit) { struct lnc_softc *sc = &lnc_softc[unit]; @@ -1723,7 +1727,7 @@ lnc_dump_state(int unit) outw(sc->rap, CSR0); } -void +static void mbuf_dump_chain(struct mbuf * m) { diff --git a/sys/dev/lnc/if_lncvar.h b/sys/dev/lnc/if_lncvar.h index c555ad8dd6e6..5f4dd3233add 100644 --- a/sys/dev/lnc/if_lncvar.h +++ b/sys/dev/lnc/if_lncvar.h @@ -100,12 +100,12 @@ #define TRANS_MD3 \ "\20\6BUFF\5UFLO\4RES\3LCOL\2LCAR\1RTRY" -char *nic_ident[] = {"Unknown", +static char *nic_ident[] = {"Unknown", "BICC", "NE2100", "DEPCA"}; -char *ic_ident[] = {"Unknown", +static char *ic_ident[] = {"Unknown", "LANCE, Am7990", "C-LANCE, Am79C90", "PCnet-ISA, Am79C960", |
