diff options
author | bde <bde@FreeBSD.org> | 1995-12-15 00:54:32 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-12-15 00:54:32 +0000 |
commit | 78ea2a381b4a1829338088dc12e054d05bd32b59 (patch) | |
tree | 0e4fed627017f370a1dc320465630b9b87d4f4af /sys | |
parent | 54924772e9c10201de95bda5b1765dc4efc93604 (diff) | |
download | FreeBSD-src-78ea2a381b4a1829338088dc12e054d05bd32b59.zip FreeBSD-src-78ea2a381b4a1829338088dc12e054d05bd32b59.tar.gz |
Completed function declarations and/or added prototypes and/or added
#includes to get prototypes.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ar/if_ar.c | 6 | ||||
-rw-r--r-- | sys/dev/ar/if_ar_isa.c | 6 | ||||
-rw-r--r-- | sys/dev/ed/if_ed.c | 28 | ||||
-rw-r--r-- | sys/dev/ep/if_ep.c | 7 | ||||
-rw-r--r-- | sys/dev/fe/if_fe.c | 1 | ||||
-rw-r--r-- | sys/dev/joy/joy.c | 5 | ||||
-rw-r--r-- | sys/dev/lnc/if_lnc.c | 41 | ||||
-rw-r--r-- | sys/dev/mse/mse.c | 32 | ||||
-rw-r--r-- | sys/dev/speaker/spkr.c | 9 | ||||
-rw-r--r-- | sys/i386/isa/aic6360.c | 15 | ||||
-rw-r--r-- | sys/i386/isa/atapi.c | 9 | ||||
-rw-r--r-- | sys/i386/isa/ctx.c | 5 | ||||
-rw-r--r-- | sys/i386/isa/cx.c | 10 | ||||
-rw-r--r-- | sys/i386/isa/ft.c | 5 | ||||
-rw-r--r-- | sys/i386/isa/gpib.c | 2 | ||||
-rw-r--r-- | sys/i386/isa/if_ar.c | 6 | ||||
-rw-r--r-- | sys/i386/isa/if_cx.c | 3 | ||||
-rw-r--r-- | sys/i386/isa/if_ed.c | 28 | ||||
-rw-r--r-- | sys/i386/isa/if_eg.c | 10 | ||||
-rw-r--r-- | sys/i386/isa/if_el.c | 3 | ||||
-rw-r--r-- | sys/i386/isa/if_ep.c | 7 | ||||
-rw-r--r-- | sys/i386/isa/if_fe.c | 1 | ||||
-rw-r--r-- | sys/i386/isa/if_ix.c | 3 | ||||
-rw-r--r-- | sys/i386/isa/if_le.c | 3 | ||||
-rw-r--r-- | sys/i386/isa/if_lnc.c | 41 | ||||
-rw-r--r-- | sys/i386/isa/joy.c | 5 | ||||
-rw-r--r-- | sys/i386/isa/mse.c | 32 | ||||
-rw-r--r-- | sys/i386/isa/pcaudio.c | 5 | ||||
-rw-r--r-- | sys/i386/isa/spkr.c | 9 | ||||
-rw-r--r-- | sys/i386/isa/tw.c | 9 | ||||
-rw-r--r-- | sys/isa/joy.c | 5 |
31 files changed, 242 insertions, 109 deletions
diff --git a/sys/dev/ar/if_ar.c b/sys/dev/ar/if_ar.c index 114b181..27ae67b 100644 --- a/sys/dev/ar/if_ar.c +++ b/sys/dev/ar/if_ar.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ar.c,v 1.2 1995/12/05 02:00:33 davidg Exp $ + * $Id: if_ar.c,v 1.3 1995/12/10 13:38:34 phk Exp $ */ /* @@ -202,6 +202,10 @@ static struct kern_devconf kdc_arc_template = { static void arstart(struct ifnet *ifp); static int arioctl(struct ifnet *ifp, int cmd, caddr_t data); static void arwatchdog(struct ifnet *ifp); +static int ar_packet_avail(struct ar_softc *sc, int *len, u_char *rxstat); +static void ar_copy_rxbuf(struct mbuf *m, struct ar_softc *sc, int len); +static void ar_eat_packet(struct ar_softc *sc); +static void ar_get_packets(struct ar_softc *sc); static void ar_up(struct ar_softc *sc); static void ar_down(struct ar_softc *sc); diff --git a/sys/dev/ar/if_ar_isa.c b/sys/dev/ar/if_ar_isa.c index 114b181..27ae67b 100644 --- a/sys/dev/ar/if_ar_isa.c +++ b/sys/dev/ar/if_ar_isa.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ar.c,v 1.2 1995/12/05 02:00:33 davidg Exp $ + * $Id: if_ar.c,v 1.3 1995/12/10 13:38:34 phk Exp $ */ /* @@ -202,6 +202,10 @@ static struct kern_devconf kdc_arc_template = { static void arstart(struct ifnet *ifp); static int arioctl(struct ifnet *ifp, int cmd, caddr_t data); static void arwatchdog(struct ifnet *ifp); +static int ar_packet_avail(struct ar_softc *sc, int *len, u_char *rxstat); +static void ar_copy_rxbuf(struct mbuf *m, struct ar_softc *sc, int len); +static void ar_eat_packet(struct ar_softc *sc); +static void ar_get_packets(struct ar_softc *sc); static void ar_up(struct ar_softc *sc); static void ar_down(struct ar_softc *sc); diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index b3d8f03..9cacad5 100644 --- a/sys/dev/ed/if_ed.c +++ b/sys/dev/ed/if_ed.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ed.c,v 1.89 1995/12/05 13:01:33 davidg Exp $ + * $Id: if_ed.c,v 1.90 1995/12/10 13:38:37 phk Exp $ */ /* @@ -92,7 +92,7 @@ /* * ed_softc: per line info and status */ -static struct ed_softc { +struct ed_softc { struct arpcom arpcom; /* ethernet common */ char *type_str; /* pointer to type string */ @@ -132,7 +132,9 @@ static struct ed_softc { u_char rec_page_stop; /* last page of RX ring-buffer */ u_char next_packet; /* pointer to next unread RX packet */ struct kern_devconf kdc; /* kernel configuration database info */ -} ed_softc[NED]; +}; + +static struct ed_softc ed_softc[NED]; static int ed_attach __P((struct isa_device *)); static void ed_init __P((struct ifnet *)); @@ -149,16 +151,21 @@ static int ed_probe_3Com __P((struct isa_device *)); static int ed_probe_Novell __P((struct isa_device *)); static int ed_probe_pccard __P((struct isa_device *, u_char *)); -static void ds_getmcaf(); +static void ds_getmcaf __P((struct ed_softc *, u_long *)); -static void ed_get_packet(struct ed_softc *, char *, int /* u_short */ , int); +static void ed_get_packet(struct ed_softc *, char *, /* u_short */ int, int); -static inline void ed_rint(); -static inline void ed_xmit(); -static inline char *ed_ring_copy(); +static void ed_rint __P((struct ed_softc *)); +static void ed_xmit __P((struct ed_softc *)); +static char * ed_ring_copy __P((struct ed_softc *, char *, char *, + /* u_short */ int)); -static void ed_pio_readmem(), ed_pio_writemem(); -static u_short ed_pio_write_mbufs(); +static void ed_pio_readmem __P((struct ed_softc *, /* u_short */ int, + unsigned char *, /* u_short */ int)); +static void ed_pio_writemem __P((struct ed_softc *, char *, + /* u_short */ int, /* u_short */ int)); +static u_short ed_pio_write_mbufs __P((struct ed_softc *, struct mbuf *, + /* u_short */ int)); static void ed_setrcr(struct ed_softc *); static u_long ds_crc(u_char *ep); @@ -167,6 +174,7 @@ static u_long ds_crc(u_char *ep); #if NCRD > 0 #include <sys/select.h> #include <pccard/card.h> +#include <pccard/driver.h> #include <pccard/slot.h> /* * PC-Card (PCMCIA) specific code. diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c index 8df642f..c5016f3 100644 --- a/sys/dev/ep/if_ep.c +++ b/sys/dev/ep/if_ep.c @@ -38,7 +38,7 @@ */ /* - * $Id: if_ep.c,v 1.35 1995/12/05 02:00:52 davidg Exp $ + * $Id: if_ep.c,v 1.36 1995/12/10 13:38:41 phk Exp $ * * Promiscuous mode added and interrupt logic slightly changed * to reduce the number of adapter failures. Transceiver select @@ -59,6 +59,7 @@ #if defined(__FreeBSD__) #include <sys/systm.h> #include <sys/kernel.h> +#include <sys/conf.h> #include <sys/devconf.h> #endif #include <sys/mbuf.h> @@ -106,6 +107,10 @@ #include <i386/isa/icu.h> #include <i386/isa/if_epreg.h> +static int eeprom_rdy __P((struct isa_device *is)); +static int ep_look_for_board_at __P((struct isa_device *is)); +static int get_e __P((struct isa_device *is, int offset)); + static int epprobe __P((struct isa_device *)); static int epattach __P((struct isa_device *)); static int epioctl __P((struct ifnet * ifp, int, caddr_t)); diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c index b043a6e..1a3b2b6 100644 --- a/sys/dev/fe/if_fe.c +++ b/sys/dev/fe/if_fe.c @@ -53,6 +53,7 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/conf.h> #include <sys/errno.h> #include <sys/ioctl.h> #include <sys/mbuf.h> diff --git a/sys/dev/joy/joy.c b/sys/dev/joy/joy.c index 351c456..55a8e5a 100644 --- a/sys/dev/joy/joy.c +++ b/sys/dev/joy/joy.c @@ -40,6 +40,7 @@ #include <sys/devfsext.h> #endif /*DEVFS*/ +#include <machine/clock.h> #include <machine/joystick.h> #include <i386/isa/isa.h> @@ -79,8 +80,6 @@ static struct { } joy[NJOY]; -extern int timer0_max_count; - static int joyprobe (struct isa_device *); static int joyattach (struct isa_device *); @@ -97,7 +96,7 @@ static struct cdevsw joy_cdevsw = joyioctl, nostop, nullreset, nodevtotty,/*joystick */ seltrue, nommap, NULL, "joy", NULL, -1 }; -static int get_tick (); +static int get_tick __P((void)); static int diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c index c3f12c5..2370c8b 100644 --- a/sys/dev/lnc/if_lnc.c +++ b/sys/dev/lnc/if_lnc.c @@ -73,6 +73,7 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/conf.h> #include <sys/errno.h> #include <sys/ioccom.h> #include <sys/sockio.h> @@ -127,21 +128,33 @@ static struct lnc_softc { LNCSTATS_STRUCT } lnc_softc[NLNC]; -/* Function prototypes */ -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(struct ifnet *); -static int lnc_probe(struct isa_device *); -static int lnc_attach(struct isa_device *); +static void lnc_setladrf __P((struct ifnet *ifp, struct lnc_softc *sc)); +static void lnc_stop __P((int unit)); +static void lnc_reset __P((int unit)); +static void lnc_free_mbufs __P((struct lnc_softc *sc)); +static int alloc_mbuf_cluster __P((struct lnc_softc *sc, struct host_ring_entry *desc)); +static struct mbuf *chain_mbufs __P((struct lnc_softc *sc, int start_of_packet, int pkt_len)); +static struct mbuf *mbuf_packet __P((struct lnc_softc *sc, int start_of_packet, int pkt_len)); +static void lnc_rint __P((int unit)); +static void lnc_tint __P((int unit)); +static int lnc_probe __P((struct isa_device *isa_dev)); +static int ne2100_probe __P((struct isa_device *isa_dev)); +static int bicc_probe __P((struct isa_device *isa_dev)); +static int dec_macaddr_extract __P((u_char ring[], struct lnc_softc *sc)); +static int depca_probe __P((struct isa_device *isa_dev)); +static int lance_probe __P((int unit)); +static int pcnet_probe __P((int unit)); +static int lnc_attach __P((struct isa_device *isa_dev)); +static void lnc_init __P((int unit)); +static int mbuf_to_buffer __P((struct mbuf *m, char *buffer)); +static struct mbuf *chain_to_cluster __P((struct mbuf *m)); +static void lnc_start __P((struct ifnet *ifp)); +static int lnc_ioctl __P((struct ifnet *ifp, int command, caddr_t data)); +static void lnc_watchdog __P((struct ifnet *ifp)); #ifdef DEBUG -static void lnc_dump_state(int); -#endif /* DEBUG */ +static void lnc_dump_state __P((int unit)); +static void mbuf_dump_chain __P((struct mbuf *m)); +#endif struct isa_driver lncdriver = {lnc_probe, lnc_attach, "lnc"}; diff --git a/sys/dev/mse/mse.c b/sys/dev/mse/mse.c index 99d0fae..01df850 100644 --- a/sys/dev/mse/mse.c +++ b/sys/dev/mse/mse.c @@ -11,7 +11,7 @@ * this software for any purpose. It is provided "as is" * without express or implied warranty. * - * $Id: mse.c,v 1.22 1995/12/10 13:39:00 phk Exp $ + * $Id: mse.c,v 1.23 1995/12/15 00:29:30 bde Exp $ */ /* * Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and @@ -94,9 +94,9 @@ static struct mse_softc { int sc_mousetype; struct selinfo sc_selp; u_int sc_port; - void (*sc_enablemouse)(); - void (*sc_disablemouse)(); - void (*sc_getmouse)(); + void (*sc_enablemouse) __P((u_int port)); + void (*sc_disablemouse) __P((u_int port)); + void (*sc_getmouse) __P((u_int port, int *dx, int *dy, int *but)); int sc_deltax; int sc_deltay; int sc_obuttons; @@ -163,8 +163,10 @@ static struct mse_softc { #define MSE_DISINTR 0x10 #define MSE_INTREN 0x00 -static int mse_probelogi(); -static void mse_enablelogi(), mse_disablelogi(), mse_getlogi(); +static int mse_probelogi __P((struct isa_device *idp)); +static void mse_disablelogi __P((u_int port)); +static void mse_getlogi __P((u_int port, int *dx, int *dy, int *but)); +static void mse_enablelogi __P((u_int port)); /* * ATI Inport mouse definitions @@ -177,8 +179,10 @@ static void mse_enablelogi(), mse_disablelogi(), mse_getlogi(); #define MSE_INPORT_HOLD 0x20 #define MSE_INPORT_INTREN 0x09 -static int mse_probeati(); -static void mse_enableati(), mse_disableati(), mse_getati(); +static int mse_probeati __P((struct isa_device *idp)); +static void mse_enableati __P((u_int port)); +static void mse_disableati __P((u_int port)); +static void mse_getati __P((u_int port, int *dx, int *dy, int *but)); #define MSEPRI (PZERO + 3) @@ -189,10 +193,14 @@ static void mse_enableati(), mse_disableati(), mse_getati(); */ static struct mse_types { int m_type; /* Type of bus mouse */ - int (*m_probe)(); /* Probe routine to test for it */ - void (*m_enable)(); /* Start routine */ - void (*m_disable)(); /* Disable interrupts routine */ - void (*m_get)(); /* and get mouse status */ + int (*m_probe) __P((struct isa_device *idp)); + /* Probe routine to test for it */ + void (*m_enable) __P((u_int port)); + /* Start routine */ + void (*m_disable) __P((u_int port)); + /* Disable interrupts routine */ + void (*m_get) __P((u_int port, int *dx, int *dy, int *but)); + /* and get mouse status */ } mse_types[] = { { MSE_ATIINPORT, mse_probeati, mse_enableati, mse_disableati, mse_getati }, { MSE_LOGITECH, mse_probelogi, mse_enablelogi, mse_disablelogi, mse_getlogi }, diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c index 07cdb72..b81d8dd 100644 --- a/sys/dev/speaker/spkr.c +++ b/sys/dev/speaker/spkr.c @@ -4,7 +4,7 @@ * v1.4 by Eric S. Raymond (esr@snark.thyrsus.com) Aug 1993 * modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su> * - * $Id: spkr.c,v 1.21 1995/12/08 11:15:21 julian Exp $ + * $Id: spkr.c,v 1.22 1995/12/08 23:20:48 phk Exp $ */ #include "speaker.h" @@ -81,6 +81,13 @@ static struct cdevsw spkr_cdevsw = #define SPKRPRI PSOCK static char endtone, endrest; +static void tone __P((unsigned int thz, unsigned int ticks)); +static void rest __P((int ticks)); +static void playinit __P((void)); +static void playtone __P((int pitch, int value, int sustain)); +static int abs __P((int n)); +static void playstring __P((char *cp, size_t slen)); + static void tone(thz, ticks) /* emit tone of frequency thz for given number of ticks */ unsigned int thz, ticks; diff --git a/sys/i386/isa/aic6360.c b/sys/i386/isa/aic6360.c index e865eab..b8defba 100644 --- a/sys/i386/isa/aic6360.c +++ b/sys/i386/isa/aic6360.c @@ -31,7 +31,7 @@ */ /* - * $Id: aic6360.c,v 1.15 1995/12/06 23:42:13 bde Exp $ + * $Id: aic6360.c,v 1.16 1995/12/10 13:38:19 phk Exp $ * * Acknowledgements: Many of the algorithms used in this driver are * inspired by the work of Julian Elischer (julian@tfs.com) and @@ -690,15 +690,22 @@ int aicintr __P((struct aic_softc *)); static void aic_init __P((struct aic_softc *)); #endif static void aic_done __P((struct acb *)); +static void aic_dataout __P((struct aic_data *aic)); #ifdef __FreeBSD__ +static void aic_datain __P((struct aic_data *aic)); static int32 aic_scsi_cmd __P((struct scsi_xfer *)); static int aic_poll __P((int, struct acb *)); #else +static void aic_datain __P((struct aic_softc *aic)); static int aic_scsi_cmd __P((struct scsi_xfer *)); static int aic_poll __P((struct aic_softc *, struct acb *)); #endif void aic_add_timeout __P((struct acb *, int)); void aic_remove_timeout __P((struct acb *)); +static void aic6360_reset __P((struct aic_data *aic)); +static u_short aicphase __P((struct aic_data *aic)); +static void aic_msgin __P((struct aic_data *aic)); +static void aic_msgout __P((struct aic_data *aic)); #ifdef __FreeBSD__ static timeout_t aic_timeout; static void aic_sched __P((struct aic_data *)); @@ -710,9 +717,9 @@ static void aic_sched __P((struct aic_softc *)); static void aic_scsi_reset __P((struct aic_softc *)); #endif #if AIC_DEBUG -void aic_print_active_acb(); -void aic_dump_driver(); -void aic_dump6360(); +void aic_print_active_acb __P((void)); +void aic_dump6360 __P((void)); +void aic_dump_driver __P((void)); #endif /* Linkup to the rest of the kernel */ diff --git a/sys/i386/isa/atapi.c b/sys/i386/isa/atapi.c index 40a1d57..09c29c2 100644 --- a/sys/i386/isa/atapi.c +++ b/sys/i386/isa/atapi.c @@ -764,7 +764,7 @@ void atapi_request_callback (struct atapi *ata, int unit, u_char cmd, u_char a1, u_char a2, u_char a3, u_char a4, u_char a5, u_char a6, u_char a7, u_char a8, u_char a9, u_char a10, u_char a11, u_char a12, u_char a13, u_char a14, u_char a15, - char *addr, int count, void (*done)(), void *x, void *y) + char *addr, int count, atapi_callback_t *done, void *x, void *y) { struct atapicmd *ac; @@ -925,13 +925,18 @@ void (*atapi_request_callback_ptr) (struct atapi *ata, int unit, u_char cmd, u_char a1, u_char a2, u_char a3, u_char a4, u_char a5, u_char a6, u_char a7, u_char a8, u_char a9, u_char a10, u_char a11, u_char a12, u_char a13, u_char a14, u_char a15, - char *addr, int count, void (*done)(), void *x, void *y); + char *addr, int count, atapi_callback_t *done, void *x, void *y); struct atapires (*atapi_request_immediate_ptr) (struct atapi *ata, int unit, u_char cmd, u_char a1, u_char a2, u_char a3, u_char a4, u_char a5, u_char a6, u_char a7, u_char a8, u_char a9, u_char a10, u_char a11, u_char a12, u_char a13, u_char a14, u_char a15, char *addr, int count); +extern int atapi_lock (int ctlr); +/* + * XXX "ioconf.h" is not included by <sys/conf.h> for lkms, so we need this + * misplaced declaration. + */ extern void wdintr (int); /* diff --git a/sys/i386/isa/ctx.c b/sys/i386/isa/ctx.c index 4337961..4a80d1d 100644 --- a/sys/i386/isa/ctx.c +++ b/sys/i386/isa/ctx.c @@ -8,7 +8,7 @@ * of this software, nor does the author assume any responsibility * for damages incurred with its use. * - * $Id: ctx.c,v 1.14 1995/12/10 13:38:25 phk Exp $ + * $Id: ctx.c,v 1.15 1995/12/15 00:29:28 bde Exp $ */ /* @@ -138,7 +138,8 @@ static int waitvb(short); #define UNIT(x) ((x) & 0x07) -static int ctxprobe(), ctxattach(); +static int ctxprobe __P((struct isa_device *devp)); +static int ctxattach __P((struct isa_device *devp)); struct isa_driver ctxdriver = {ctxprobe, ctxattach, "ctx"}; static d_open_t ctxopen; diff --git a/sys/i386/isa/cx.c b/sys/i386/isa/cx.c index 09a92b1..75af7e8 100644 --- a/sys/i386/isa/cx.c +++ b/sys/i386/isa/cx.c @@ -61,8 +61,14 @@ #include <machine/cronyx.h> #include <i386/isa/cxreg.h> -extern void cxswitch (cx_chan_t *c, cx_soft_opt_t new); -extern timeout_t cxtimeout; +/* XXX imported from if_cx.c. */ +void cxswitch (cx_chan_t *c, cx_soft_opt_t new); + +/* XXX exported. */ +void cxmint (cx_chan_t *c); +int cxrinta (cx_chan_t *c); +void cxtinta (cx_chan_t *c); +timeout_t cxtimeout; #ifdef DEBUG # define print(s) printf s diff --git a/sys/i386/isa/ft.c b/sys/i386/isa/ft.c index f9e52b5..f191258 100644 --- a/sys/i386/isa/ft.c +++ b/sys/i386/isa/ft.c @@ -17,7 +17,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * ft.c - QIC-40/80 floppy tape driver - * $Id: ft.c,v 1.23 1995/11/20 12:41:40 phk Exp $ + * $Id: ft.c,v 1.24 1995/12/10 13:38:31 phk Exp $ * * 01/19/95 ++sg * Cleaned up recalibrate/seek code at attach time for FreeBSD 2.x. @@ -89,6 +89,8 @@ #include <i386/isa/rtc.h> #include <i386/isa/ftreg.h> +extern int ftintr __P((ftu_t ftu)); + /* Enable or disable debugging messages. */ #define FTDBGALL 0 /* 1 if you want everything */ /*#define DPRT(a) printf a */ @@ -293,6 +295,7 @@ static struct ft_data { int ftopen(dev_t, int); int ftclose(dev_t, int); int ftioctl(dev_t, int, caddr_t, int, struct proc *); +int ftattach(struct isa_device *, struct isa_device *, int); static timeout_t ft_timeout; static void async_cmd(ftu_t); static void async_req(ftu_t, int); diff --git a/sys/i386/isa/gpib.c b/sys/i386/isa/gpib.c index d2a7481..2b4f1ac 100644 --- a/sys/i386/isa/gpib.c +++ b/sys/i386/isa/gpib.c @@ -71,7 +71,7 @@ static void trigger(unsigned char device); static char spoll(unsigned char device); static int gpprobe(struct isa_device *dvp); -static int gpattach(); +static int gpattach(struct isa_device *dvp); struct isa_driver gpdriver = {gpprobe, gpattach, "gp"}; diff --git a/sys/i386/isa/if_ar.c b/sys/i386/isa/if_ar.c index 114b181..27ae67b 100644 --- a/sys/i386/isa/if_ar.c +++ b/sys/i386/isa/if_ar.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ar.c,v 1.2 1995/12/05 02:00:33 davidg Exp $ + * $Id: if_ar.c,v 1.3 1995/12/10 13:38:34 phk Exp $ */ /* @@ -202,6 +202,10 @@ static struct kern_devconf kdc_arc_template = { static void arstart(struct ifnet *ifp); static int arioctl(struct ifnet *ifp, int cmd, caddr_t data); static void arwatchdog(struct ifnet *ifp); +static int ar_packet_avail(struct ar_softc *sc, int *len, u_char *rxstat); +static void ar_copy_rxbuf(struct mbuf *m, struct ar_softc *sc, int len); +static void ar_eat_packet(struct ar_softc *sc); +static void ar_get_packets(struct ar_softc *sc); static void ar_up(struct ar_softc *sc); static void ar_down(struct ar_softc *sc); diff --git a/sys/i386/isa/if_cx.c b/sys/i386/isa/if_cx.c index cedd6e8..cd7c193 100644 --- a/sys/i386/isa/if_cx.c +++ b/sys/i386/isa/if_cx.c @@ -51,6 +51,9 @@ extern struct cdevsw cx_cdevsw; #include <machine/cronyx.h> #include <i386/isa/cxreg.h> +/* XXX exported. */ +void cxswitch (cx_chan_t *c, cx_soft_opt_t new); + static int cxprobe __P((struct isa_device *id)); static int cxattach __P((struct isa_device *id)); static void cxput __P((cx_chan_t *c, char b)); diff --git a/sys/i386/isa/if_ed.c b/sys/i386/isa/if_ed.c index b3d8f03..9cacad5 100644 --- a/sys/i386/isa/if_ed.c +++ b/sys/i386/isa/if_ed.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ed.c,v 1.89 1995/12/05 13:01:33 davidg Exp $ + * $Id: if_ed.c,v 1.90 1995/12/10 13:38:37 phk Exp $ */ /* @@ -92,7 +92,7 @@ /* * ed_softc: per line info and status */ -static struct ed_softc { +struct ed_softc { struct arpcom arpcom; /* ethernet common */ char *type_str; /* pointer to type string */ @@ -132,7 +132,9 @@ static struct ed_softc { u_char rec_page_stop; /* last page of RX ring-buffer */ u_char next_packet; /* pointer to next unread RX packet */ struct kern_devconf kdc; /* kernel configuration database info */ -} ed_softc[NED]; +}; + +static struct ed_softc ed_softc[NED]; static int ed_attach __P((struct isa_device *)); static void ed_init __P((struct ifnet *)); @@ -149,16 +151,21 @@ static int ed_probe_3Com __P((struct isa_device *)); static int ed_probe_Novell __P((struct isa_device *)); static int ed_probe_pccard __P((struct isa_device *, u_char *)); -static void ds_getmcaf(); +static void ds_getmcaf __P((struct ed_softc *, u_long *)); -static void ed_get_packet(struct ed_softc *, char *, int /* u_short */ , int); +static void ed_get_packet(struct ed_softc *, char *, /* u_short */ int, int); -static inline void ed_rint(); -static inline void ed_xmit(); -static inline char *ed_ring_copy(); +static void ed_rint __P((struct ed_softc *)); +static void ed_xmit __P((struct ed_softc *)); +static char * ed_ring_copy __P((struct ed_softc *, char *, char *, + /* u_short */ int)); -static void ed_pio_readmem(), ed_pio_writemem(); -static u_short ed_pio_write_mbufs(); +static void ed_pio_readmem __P((struct ed_softc *, /* u_short */ int, + unsigned char *, /* u_short */ int)); +static void ed_pio_writemem __P((struct ed_softc *, char *, + /* u_short */ int, /* u_short */ int)); +static u_short ed_pio_write_mbufs __P((struct ed_softc *, struct mbuf *, + /* u_short */ int)); static void ed_setrcr(struct ed_softc *); static u_long ds_crc(u_char *ep); @@ -167,6 +174,7 @@ static u_long ds_crc(u_char *ep); #if NCRD > 0 #include <sys/select.h> #include <pccard/card.h> +#include <pccard/driver.h> #include <pccard/slot.h> /* * PC-Card (PCMCIA) specific code. diff --git a/sys/i386/isa/if_eg.c b/sys/i386/isa/if_eg.c index 767c67f..3cd586a 100644 --- a/sys/i386/isa/if_eg.c +++ b/sys/i386/isa/if_eg.c @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_eg.c,v 1.8 1995/12/05 02:00:47 davidg Exp $ + * $Id: if_eg.c,v 1.9 1995/12/10 13:38:38 phk Exp $ */ /* To do: @@ -39,6 +39,7 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/conf.h> #include <sys/errno.h> #include <sys/ioctl.h> #include <sys/mbuf.h> @@ -145,6 +146,13 @@ eg_registerdev(struct isa_device *id, const char *descr) dev_attach(kdc); } +static void egprintpcb __P((struct eg_softc *sc)); +static void egprintstat __P((int b)); +static int egoutPCB __P((struct eg_softc *sc, int b)); +static int egreadPCBstat __P((struct eg_softc *sc, int statb)); +static int egreadPCBready __P((struct eg_softc *sc)); +static int egwritePCB __P((struct eg_softc *sc)); +static int egreadPCB __P((struct eg_softc *sc)); static void eginit __P((struct eg_softc *)); static int egioctl (struct ifnet *, int, caddr_t); static void egrecv(struct eg_softc *); diff --git a/sys/i386/isa/if_el.c b/sys/i386/isa/if_el.c index 7a92026..837a5f1 100644 --- a/sys/i386/isa/if_el.c +++ b/sys/i386/isa/if_el.c @@ -6,7 +6,7 @@ * * Questions, comments, bug reports and fixes to kimmel@cs.umass.edu. * - * $Id: if_el.c,v 1.19 1995/12/05 02:00:49 davidg Exp $ + * $Id: if_el.c,v 1.20 1995/12/10 13:38:39 phk Exp $ */ /* Except of course for the portions of code lifted from other FreeBSD * drivers (mainly elread, elget and el_ioctl) @@ -24,6 +24,7 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/conf.h> #include <sys/errno.h> #include <sys/ioctl.h> #include <sys/mbuf.h> diff --git a/sys/i386/isa/if_ep.c b/sys/i386/isa/if_ep.c index 8df642f..c5016f3 100644 --- a/sys/i386/isa/if_ep.c +++ b/sys/i386/isa/if_ep.c @@ -38,7 +38,7 @@ */ /* - * $Id: if_ep.c,v 1.35 1995/12/05 02:00:52 davidg Exp $ + * $Id: if_ep.c,v 1.36 1995/12/10 13:38:41 phk Exp $ * * Promiscuous mode added and interrupt logic slightly changed * to reduce the number of adapter failures. Transceiver select @@ -59,6 +59,7 @@ #if defined(__FreeBSD__) #include <sys/systm.h> #include <sys/kernel.h> +#include <sys/conf.h> #include <sys/devconf.h> #endif #include <sys/mbuf.h> @@ -106,6 +107,10 @@ #include <i386/isa/icu.h> #include <i386/isa/if_epreg.h> +static int eeprom_rdy __P((struct isa_device *is)); +static int ep_look_for_board_at __P((struct isa_device *is)); +static int get_e __P((struct isa_device *is, int offset)); + static int epprobe __P((struct isa_device *)); static int epattach __P((struct isa_device *)); static int epioctl __P((struct ifnet * ifp, int, caddr_t)); diff --git a/sys/i386/isa/if_fe.c b/sys/i386/isa/if_fe.c index b043a6e..1a3b2b6 100644 --- a/sys/i386/isa/if_fe.c +++ b/sys/i386/isa/if_fe.c @@ -53,6 +53,7 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/conf.h> #include <sys/errno.h> #include <sys/ioctl.h> #include <sys/mbuf.h> diff --git a/sys/i386/isa/if_ix.c b/sys/i386/isa/if_ix.c index e8d323f..f74db13 100644 --- a/sys/i386/isa/if_ix.c +++ b/sys/i386/isa/if_ix.c @@ -28,13 +28,14 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_ix.c,v 1.15 1995/12/05 02:01:11 davidg Exp $ + * $Id: if_ix.c,v 1.16 1995/12/10 13:38:47 phk Exp $ */ #include "ix.h" #include <sys/param.h> #include <sys/systm.h> +#include <sys/conf.h> #include <sys/mbuf.h> #include <sys/socket.h> #include <sys/ioctl.h> diff --git a/sys/i386/isa/if_le.c b/sys/i386/isa/if_le.c index 10efff4..7ecd417 100644 --- a/sys/i386/isa/if_le.c +++ b/sys/i386/isa/if_le.c @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_le.c,v 1.25 1995/12/07 12:46:00 davidg Exp $ + * $Id: if_le.c,v 1.26 1995/12/10 13:38:48 phk Exp $ */ /* @@ -40,6 +40,7 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/conf.h> #include <sys/mbuf.h> #include <sys/protosw.h> #include <sys/socket.h> diff --git a/sys/i386/isa/if_lnc.c b/sys/i386/isa/if_lnc.c index c3f12c5..2370c8b 100644 --- a/sys/i386/isa/if_lnc.c +++ b/sys/i386/isa/if_lnc.c @@ -73,6 +73,7 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/conf.h> #include <sys/errno.h> #include <sys/ioccom.h> #include <sys/sockio.h> @@ -127,21 +128,33 @@ static struct lnc_softc { LNCSTATS_STRUCT } lnc_softc[NLNC]; -/* Function prototypes */ -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(struct ifnet *); -static int lnc_probe(struct isa_device *); -static int lnc_attach(struct isa_device *); +static void lnc_setladrf __P((struct ifnet *ifp, struct lnc_softc *sc)); +static void lnc_stop __P((int unit)); +static void lnc_reset __P((int unit)); +static void lnc_free_mbufs __P((struct lnc_softc *sc)); +static int alloc_mbuf_cluster __P((struct lnc_softc *sc, struct host_ring_entry *desc)); +static struct mbuf *chain_mbufs __P((struct lnc_softc *sc, int start_of_packet, int pkt_len)); +static struct mbuf *mbuf_packet __P((struct lnc_softc *sc, int start_of_packet, int pkt_len)); +static void lnc_rint __P((int unit)); +static void lnc_tint __P((int unit)); +static int lnc_probe __P((struct isa_device *isa_dev)); +static int ne2100_probe __P((struct isa_device *isa_dev)); +static int bicc_probe __P((struct isa_device *isa_dev)); +static int dec_macaddr_extract __P((u_char ring[], struct lnc_softc *sc)); +static int depca_probe __P((struct isa_device *isa_dev)); +static int lance_probe __P((int unit)); +static int pcnet_probe __P((int unit)); +static int lnc_attach __P((struct isa_device *isa_dev)); +static void lnc_init __P((int unit)); +static int mbuf_to_buffer __P((struct mbuf *m, char *buffer)); +static struct mbuf *chain_to_cluster __P((struct mbuf *m)); +static void lnc_start __P((struct ifnet *ifp)); +static int lnc_ioctl __P((struct ifnet *ifp, int command, caddr_t data)); +static void lnc_watchdog __P((struct ifnet *ifp)); #ifdef DEBUG -static void lnc_dump_state(int); -#endif /* DEBUG */ +static void lnc_dump_state __P((int unit)); +static void mbuf_dump_chain __P((struct mbuf *m)); +#endif struct isa_driver lncdriver = {lnc_probe, lnc_attach, "lnc"}; diff --git a/sys/i386/isa/joy.c b/sys/i386/isa/joy.c index 351c456..55a8e5a 100644 --- a/sys/i386/isa/joy.c +++ b/sys/i386/isa/joy.c @@ -40,6 +40,7 @@ #include <sys/devfsext.h> #endif /*DEVFS*/ +#include <machine/clock.h> #include <machine/joystick.h> #include <i386/isa/isa.h> @@ -79,8 +80,6 @@ static struct { } joy[NJOY]; -extern int timer0_max_count; - static int joyprobe (struct isa_device *); static int joyattach (struct isa_device *); @@ -97,7 +96,7 @@ static struct cdevsw joy_cdevsw = joyioctl, nostop, nullreset, nodevtotty,/*joystick */ seltrue, nommap, NULL, "joy", NULL, -1 }; -static int get_tick (); +static int get_tick __P((void)); static int diff --git a/sys/i386/isa/mse.c b/sys/i386/isa/mse.c index 99d0fae..01df850 100644 --- a/sys/i386/isa/mse.c +++ b/sys/i386/isa/mse.c @@ -11,7 +11,7 @@ * this software for any purpose. It is provided "as is" * without express or implied warranty. * - * $Id: mse.c,v 1.22 1995/12/10 13:39:00 phk Exp $ + * $Id: mse.c,v 1.23 1995/12/15 00:29:30 bde Exp $ */ /* * Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and @@ -94,9 +94,9 @@ static struct mse_softc { int sc_mousetype; struct selinfo sc_selp; u_int sc_port; - void (*sc_enablemouse)(); - void (*sc_disablemouse)(); - void (*sc_getmouse)(); + void (*sc_enablemouse) __P((u_int port)); + void (*sc_disablemouse) __P((u_int port)); + void (*sc_getmouse) __P((u_int port, int *dx, int *dy, int *but)); int sc_deltax; int sc_deltay; int sc_obuttons; @@ -163,8 +163,10 @@ static struct mse_softc { #define MSE_DISINTR 0x10 #define MSE_INTREN 0x00 -static int mse_probelogi(); -static void mse_enablelogi(), mse_disablelogi(), mse_getlogi(); +static int mse_probelogi __P((struct isa_device *idp)); +static void mse_disablelogi __P((u_int port)); +static void mse_getlogi __P((u_int port, int *dx, int *dy, int *but)); +static void mse_enablelogi __P((u_int port)); /* * ATI Inport mouse definitions @@ -177,8 +179,10 @@ static void mse_enablelogi(), mse_disablelogi(), mse_getlogi(); #define MSE_INPORT_HOLD 0x20 #define MSE_INPORT_INTREN 0x09 -static int mse_probeati(); -static void mse_enableati(), mse_disableati(), mse_getati(); +static int mse_probeati __P((struct isa_device *idp)); +static void mse_enableati __P((u_int port)); +static void mse_disableati __P((u_int port)); +static void mse_getati __P((u_int port, int *dx, int *dy, int *but)); #define MSEPRI (PZERO + 3) @@ -189,10 +193,14 @@ static void mse_enableati(), mse_disableati(), mse_getati(); */ static struct mse_types { int m_type; /* Type of bus mouse */ - int (*m_probe)(); /* Probe routine to test for it */ - void (*m_enable)(); /* Start routine */ - void (*m_disable)(); /* Disable interrupts routine */ - void (*m_get)(); /* and get mouse status */ + int (*m_probe) __P((struct isa_device *idp)); + /* Probe routine to test for it */ + void (*m_enable) __P((u_int port)); + /* Start routine */ + void (*m_disable) __P((u_int port)); + /* Disable interrupts routine */ + void (*m_get) __P((u_int port, int *dx, int *dy, int *but)); + /* and get mouse status */ } mse_types[] = { { MSE_ATIINPORT, mse_probeati, mse_enableati, mse_disableati, mse_getati }, { MSE_LOGITECH, mse_probelogi, mse_enablelogi, mse_disablelogi, mse_getlogi }, diff --git a/sys/i386/isa/pcaudio.c b/sys/i386/isa/pcaudio.c index 85ebd01..a357784 100644 --- a/sys/i386/isa/pcaudio.c +++ b/sys/i386/isa/pcaudio.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pcaudio.c,v 1.23 1995/12/08 23:20:36 phk Exp $ + * $Id: pcaudio.c,v 1.24 1995/12/10 13:39:03 phk Exp $ */ #include "pca.h" @@ -106,6 +106,9 @@ static struct cdevsw pca_cdevsw = pcaioctl, nostop, nullreset, nodevtotty,/* pcaudio */ pcaselect, nommap, NULL, "pca", NULL, -1 }; +static void pca_continue __P((void)); +static void pca_init __P((void)); +static void pca_pause __P((void)); static inline void conv(const void *table, void *buff, unsigned long n) { diff --git a/sys/i386/isa/spkr.c b/sys/i386/isa/spkr.c index 07cdb72..b81d8dd 100644 --- a/sys/i386/isa/spkr.c +++ b/sys/i386/isa/spkr.c @@ -4,7 +4,7 @@ * v1.4 by Eric S. Raymond (esr@snark.thyrsus.com) Aug 1993 * modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su> * - * $Id: spkr.c,v 1.21 1995/12/08 11:15:21 julian Exp $ + * $Id: spkr.c,v 1.22 1995/12/08 23:20:48 phk Exp $ */ #include "speaker.h" @@ -81,6 +81,13 @@ static struct cdevsw spkr_cdevsw = #define SPKRPRI PSOCK static char endtone, endrest; +static void tone __P((unsigned int thz, unsigned int ticks)); +static void rest __P((int ticks)); +static void playinit __P((void)); +static void playtone __P((int pitch, int value, int sustain)); +static int abs __P((int n)); +static void playstring __P((char *cp, size_t slen)); + static void tone(thz, ticks) /* emit tone of frequency thz for given number of ticks */ unsigned int thz, ticks; diff --git a/sys/i386/isa/tw.c b/sys/i386/isa/tw.c index 7772707..0120189 100644 --- a/sys/i386/isa/tw.c +++ b/sys/i386/isa/tw.c @@ -198,9 +198,8 @@ #define TWPRI (PZERO+8) /* I don't know any better, so let's */ /* use the same as the line printer */ -static int twprobe(); -static int twattach(); -void twintr(int unit); +static int twprobe(struct isa_device *idp); +static int twattach(struct isa_device *idp); struct isa_driver twdriver = { twprobe, twattach, "tw" @@ -251,13 +250,15 @@ static struct tw_sc { #endif } tw_sc[NTW]; -static void twdelay25(); +static void twdelay25(void); static void twdelayn(int n); static void twsetuptimes(int *a); static int wait_for_zero(struct tw_sc *sc); static int twgetbytes(struct tw_sc *sc, u_char *p, int cnt); +static void twabortrcv(struct tw_sc *sc); static int twsend(struct tw_sc *sc, int h, int k, int cnt); static int next_zero(struct tw_sc *sc); +static int twputpkt(struct tw_sc *sc, u_char *p); static int twchecktime(int target, int tol); /* diff --git a/sys/isa/joy.c b/sys/isa/joy.c index 351c456..55a8e5a 100644 --- a/sys/isa/joy.c +++ b/sys/isa/joy.c @@ -40,6 +40,7 @@ #include <sys/devfsext.h> #endif /*DEVFS*/ +#include <machine/clock.h> #include <machine/joystick.h> #include <i386/isa/isa.h> @@ -79,8 +80,6 @@ static struct { } joy[NJOY]; -extern int timer0_max_count; - static int joyprobe (struct isa_device *); static int joyattach (struct isa_device *); @@ -97,7 +96,7 @@ static struct cdevsw joy_cdevsw = joyioctl, nostop, nullreset, nodevtotty,/*joystick */ seltrue, nommap, NULL, "joy", NULL, -1 }; -static int get_tick (); +static int get_tick __P((void)); static int |