summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-12-15 00:54:32 +0000
committerbde <bde@FreeBSD.org>1995-12-15 00:54:32 +0000
commit78ea2a381b4a1829338088dc12e054d05bd32b59 (patch)
tree0e4fed627017f370a1dc320465630b9b87d4f4af /sys/dev
parent54924772e9c10201de95bda5b1765dc4efc93604 (diff)
downloadFreeBSD-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/dev')
-rw-r--r--sys/dev/ar/if_ar.c6
-rw-r--r--sys/dev/ar/if_ar_isa.c6
-rw-r--r--sys/dev/ed/if_ed.c28
-rw-r--r--sys/dev/ep/if_ep.c7
-rw-r--r--sys/dev/fe/if_fe.c1
-rw-r--r--sys/dev/joy/joy.c5
-rw-r--r--sys/dev/lnc/if_lnc.c41
-rw-r--r--sys/dev/mse/mse.c32
-rw-r--r--sys/dev/speaker/spkr.c9
9 files changed, 92 insertions, 43 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;
OpenPOWER on IntegriCloud