summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/amd64/fpu.c4
-rw-r--r--sys/amd64/amd64/tsc.c10
-rw-r--r--sys/amd64/include/clock.h4
-rw-r--r--sys/amd64/include/pmap.h3
-rw-r--r--sys/amd64/isa/clock.c10
-rw-r--r--sys/amd64/isa/npx.c4
-rw-r--r--sys/amd64/pci/pci_bus.c4
-rw-r--r--sys/amd64/pci/pci_cfgreg.c4
-rw-r--r--sys/dev/ar/if_ar.c42
-rw-r--r--sys/dev/ar/if_ar_isa.c42
-rw-r--r--sys/dev/ed/if_ed.c4
-rw-r--r--sys/dev/ep/if_ep.c28
-rw-r--r--sys/dev/fdc/fdc.c16
-rw-r--r--sys/dev/fe/if_fe.c28
-rw-r--r--sys/dev/ie/if_ie.c11
-rw-r--r--sys/dev/joy/joy.c7
-rw-r--r--sys/dev/kbd/kbdtables.h16
-rw-r--r--sys/dev/lnc/if_lnc.c2
-rw-r--r--sys/dev/lnc/if_lncvar.h13
-rw-r--r--sys/dev/mcd/mcd.c4
-rw-r--r--sys/dev/mse/mse.c7
-rw-r--r--sys/dev/rc/rc.c14
-rw-r--r--sys/dev/si/si.c20
-rw-r--r--sys/dev/sio/sio.c102
-rw-r--r--sys/dev/sio/sioreg.h10
-rw-r--r--sys/dev/syscons/syscons.c23
-rw-r--r--sys/dev/syscons/syscons.h6
-rw-r--r--sys/i386/i386/tsc.c10
-rw-r--r--sys/i386/include/clock.h4
-rw-r--r--sys/i386/include/cronyx.h5
-rw-r--r--sys/i386/include/pmap.h3
-rw-r--r--sys/i386/isa/aic6360.c6
-rw-r--r--sys/i386/isa/asc.c26
-rw-r--r--sys/i386/isa/bt742a.c7
-rw-r--r--sys/i386/isa/clock.c10
-rw-r--r--sys/i386/isa/cronyx.c79
-rw-r--r--sys/i386/isa/ctx.c14
-rw-r--r--sys/i386/isa/cx.c17
-rw-r--r--sys/i386/isa/fd.c16
-rw-r--r--sys/i386/isa/ft.c42
-rw-r--r--sys/i386/isa/gpib.c212
-rw-r--r--sys/i386/isa/if_ar.c42
-rw-r--r--sys/i386/isa/if_cx.c229
-rw-r--r--sys/i386/isa/if_ed.c4
-rw-r--r--sys/i386/isa/if_eg.c28
-rw-r--r--sys/i386/isa/if_el.c40
-rw-r--r--sys/i386/isa/if_ep.c28
-rw-r--r--sys/i386/isa/if_fe.c28
-rw-r--r--sys/i386/isa/if_ie.c11
-rw-r--r--sys/i386/isa/if_ix.c4
-rw-r--r--sys/i386/isa/if_le.c23
-rw-r--r--sys/i386/isa/if_lnc.c2
-rw-r--r--sys/i386/isa/if_lnc.h13
-rw-r--r--sys/i386/isa/joy.c7
-rw-r--r--sys/i386/isa/kbdtables.h16
-rw-r--r--sys/i386/isa/labpc.c28
-rw-r--r--sys/i386/isa/lpt.c4
-rw-r--r--sys/i386/isa/matcd/matcd.c15
-rw-r--r--sys/i386/isa/matcd/options.h2
-rw-r--r--sys/i386/isa/mcd.c4
-rw-r--r--sys/i386/isa/mse.c7
-rw-r--r--sys/i386/isa/ncr5380.c2
-rw-r--r--sys/i386/isa/npx.c4
-rw-r--r--sys/i386/isa/pcaudio.c12
-rw-r--r--sys/i386/isa/pcibus.c4
-rw-r--r--sys/i386/isa/pcicx.c12
-rw-r--r--sys/i386/isa/psm.c15
-rw-r--r--sys/i386/isa/rc.c14
-rw-r--r--sys/i386/isa/seagate.c4
-rw-r--r--sys/i386/isa/si.c20
-rw-r--r--sys/i386/isa/sio.c102
-rw-r--r--sys/i386/isa/sioreg.h10
-rw-r--r--sys/i386/isa/spigot.c10
-rw-r--r--sys/i386/isa/syscons.c23
-rw-r--r--sys/i386/isa/syscons.h6
-rw-r--r--sys/i386/isa/tw.c49
-rw-r--r--sys/i386/isa/ultra14f.c10
-rw-r--r--sys/i386/isa/wcd.c4
-rw-r--r--sys/i386/isa/wd7000.c15
-rw-r--r--sys/i386/isa/wt.c4
-rw-r--r--sys/i386/pci/pci_bus.c4
-rw-r--r--sys/i386/pci/pci_cfgreg.c4
-rw-r--r--sys/i386/pci/pci_pir.c4
-rw-r--r--sys/isa/atrtc.c10
-rw-r--r--sys/isa/fd.c16
-rw-r--r--sys/isa/joy.c7
-rw-r--r--sys/isa/kbdtables.h16
-rw-r--r--sys/isa/sio.c102
-rw-r--r--sys/isa/sioreg.h10
-rw-r--r--sys/isa/syscons.c23
-rw-r--r--sys/isa/syscons.h6
91 files changed, 776 insertions, 1170 deletions
diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c
index ccfef1b..54cb5bf 100644
--- a/sys/amd64/amd64/fpu.c
+++ b/sys/amd64/amd64/fpu.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)npx.c 7.2 (Berkeley) 5/12/91
- * $Id: npx.c,v 1.24 1995/09/19 18:55:14 bde Exp $
+ * $Id: npx.c,v 1.25 1995/10/28 13:07:21 phk Exp $
*/
#include "npx.h"
@@ -111,7 +111,7 @@ SYSCTL_INT(_hw,HW_FLOATINGPT, floatingpoint,
CTLFLAG_RD, &hw_float, 0,
"Floatingpoint instructions executed in hardware");
-u_int npx0_imask = SWI_CLOCK_MASK;
+static u_int npx0_imask = SWI_CLOCK_MASK;
struct proc *npxproc;
static bool_t npx_ex16;
diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c
index 82e0b18..86a1eec 100644
--- a/sys/amd64/amd64/tsc.c
+++ b/sys/amd64/amd64/tsc.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.38 1995/10/28 15:38:49 phk Exp $
+ * $Id: clock.c,v 1.39 1995/11/29 19:57:22 wollman Exp $
*/
/*
@@ -130,7 +130,7 @@ clkintr(struct clockframe frame)
setdelayed();
}
#else
-void
+static void
clkintr(struct clockframe frame)
{
timer_func(&frame);
@@ -245,7 +245,7 @@ release_timer2()
* The RTC chip requires that we read status register C (RTC_INTR)
* to acknowledge an interrupt, before it will generate the next one.
*/
-void
+static void
rtcintr(struct clockframe frame)
{
u_char stat;
@@ -256,8 +256,8 @@ rtcintr(struct clockframe frame)
}
#ifdef DDB
-static void
-printrtc(void)
+void
+DDB_printrtc(void)
{
printf("%02x/%02x/%02x %02x:%02x:%02x, A = %02x, B = %02x, C = %02x\n",
rtcin(RTC_YEAR), rtcin(RTC_MONTH), rtcin(RTC_DAY),
diff --git a/sys/amd64/include/clock.h b/sys/amd64/include/clock.h
index c231f5e..542e628 100644
--- a/sys/amd64/include/clock.h
+++ b/sys/amd64/include/clock.h
@@ -3,7 +3,7 @@
* Garrett Wollman, September 1994.
* This file is in the public domain.
*
- * $Id$
+ * $Id: clock.h,v 1.6 1995/11/29 19:57:16 wollman Exp $
*/
#ifndef _MACHINE_CLOCK_H_
@@ -66,8 +66,6 @@ extern u_int timer0_prescaler_count;
#ifdef I586_CPU
void calibrate_cyclecounter __P((void));
#endif
-void clkintr __P((struct clockframe frame));
-void rtcintr __P((struct clockframe frame));
#ifdef I586_CPU
static __inline u_long
diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h
index ed000e1..fa91bff 100644
--- a/sys/amd64/include/pmap.h
+++ b/sys/amd64/include/pmap.h
@@ -42,7 +42,7 @@
*
* from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
* from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
- * $Id: pmap.h,v 1.28 1995/07/19 06:37:12 davidg Exp $
+ * $Id: pmap.h,v 1.29 1995/12/03 18:37:44 bde Exp $
*/
#ifndef _MACHINE_PMAP_H_
@@ -209,7 +209,6 @@ void pmap_activate __P((pmap_t, struct pcb *));
pmap_t pmap_kernel __P((void));
boolean_t pmap_page_exists __P((pmap_t, vm_offset_t));
pt_entry_t * __pure pmap_pte __P((pmap_t, vm_offset_t)) __pure2;
-vm_page_t pmap_pte_vm_page __P((pmap_t, vm_offset_t));
void *pmap_mapdev __P((vm_offset_t, vm_size_t));
void pmap_growkernel __P((vm_offset_t));
void pmap_bootstrap __P(( vm_offset_t, vm_offset_t));
diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c
index 82e0b18..86a1eec 100644
--- a/sys/amd64/isa/clock.c
+++ b/sys/amd64/isa/clock.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.38 1995/10/28 15:38:49 phk Exp $
+ * $Id: clock.c,v 1.39 1995/11/29 19:57:22 wollman Exp $
*/
/*
@@ -130,7 +130,7 @@ clkintr(struct clockframe frame)
setdelayed();
}
#else
-void
+static void
clkintr(struct clockframe frame)
{
timer_func(&frame);
@@ -245,7 +245,7 @@ release_timer2()
* The RTC chip requires that we read status register C (RTC_INTR)
* to acknowledge an interrupt, before it will generate the next one.
*/
-void
+static void
rtcintr(struct clockframe frame)
{
u_char stat;
@@ -256,8 +256,8 @@ rtcintr(struct clockframe frame)
}
#ifdef DDB
-static void
-printrtc(void)
+void
+DDB_printrtc(void)
{
printf("%02x/%02x/%02x %02x:%02x:%02x, A = %02x, B = %02x, C = %02x\n",
rtcin(RTC_YEAR), rtcin(RTC_MONTH), rtcin(RTC_DAY),
diff --git a/sys/amd64/isa/npx.c b/sys/amd64/isa/npx.c
index ccfef1b..54cb5bf 100644
--- a/sys/amd64/isa/npx.c
+++ b/sys/amd64/isa/npx.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)npx.c 7.2 (Berkeley) 5/12/91
- * $Id: npx.c,v 1.24 1995/09/19 18:55:14 bde Exp $
+ * $Id: npx.c,v 1.25 1995/10/28 13:07:21 phk Exp $
*/
#include "npx.h"
@@ -111,7 +111,7 @@ SYSCTL_INT(_hw,HW_FLOATINGPT, floatingpoint,
CTLFLAG_RD, &hw_float, 0,
"Floatingpoint instructions executed in hardware");
-u_int npx0_imask = SWI_CLOCK_MASK;
+static u_int npx0_imask = SWI_CLOCK_MASK;
struct proc *npxproc;
static bool_t npx_ex16;
diff --git a/sys/amd64/pci/pci_bus.c b/sys/amd64/pci/pci_bus.c
index 1832320..ea6fb5f 100644
--- a/sys/amd64/pci/pci_bus.c
+++ b/sys/amd64/pci/pci_bus.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pcibus.c,v 1.18 1995/10/17 15:23:14 se Exp $
+** $Id: pcibus.c,v 1.19 1995/10/17 23:30:11 se Exp $
**
** pci bus subroutines for i386 architecture.
**
@@ -113,7 +113,7 @@ pcibus_imask_include (int irq, unsigned* maskptr);
static int
pcibus_imask_exclude (int irq, unsigned* maskptr);
-struct pcibus i386pci = {
+static struct pcibus i386pci = {
"pci",
pcibus_setup,
pcibus_tag,
diff --git a/sys/amd64/pci/pci_cfgreg.c b/sys/amd64/pci/pci_cfgreg.c
index 1832320..ea6fb5f 100644
--- a/sys/amd64/pci/pci_cfgreg.c
+++ b/sys/amd64/pci/pci_cfgreg.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pcibus.c,v 1.18 1995/10/17 15:23:14 se Exp $
+** $Id: pcibus.c,v 1.19 1995/10/17 23:30:11 se Exp $
**
** pci bus subroutines for i386 architecture.
**
@@ -113,7 +113,7 @@ pcibus_imask_include (int irq, unsigned* maskptr);
static int
pcibus_imask_exclude (int irq, unsigned* maskptr);
-struct pcibus i386pci = {
+static struct pcibus i386pci = {
"pci",
pcibus_setup,
pcibus_tag,
diff --git a/sys/dev/ar/if_ar.c b/sys/dev/ar/if_ar.c
index 10c923a..114b181 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.1.1.1 1995/11/21 02:32:04 peter Exp $
+ * $Id: if_ar.c,v 1.2 1995/12/05 02:00:33 davidg Exp $
*/
/*
@@ -145,10 +145,10 @@ struct ar_softc {
struct kern_devconf kdc;
};
-struct ar_softc *ar_sc_ind[NAR*NPORT];
+static struct ar_softc *ar_sc_ind[NAR*NPORT];
-int arprobe(struct isa_device *id);
-int arattach(struct isa_device *id);
+static int arprobe(struct isa_device *id);
+static int arattach(struct isa_device *id);
/*
* This translate from irq numbers to
@@ -199,9 +199,9 @@ static struct kern_devconf kdc_arc_template = {
DC_CLS_NETIF
};
-void arstart(struct ifnet *ifp);
-int arioctl(struct ifnet *ifp, int cmd, caddr_t data);
-void arwatchdog(struct ifnet *ifp);
+static void arstart(struct ifnet *ifp);
+static int arioctl(struct ifnet *ifp, int cmd, caddr_t data);
+static void arwatchdog(struct ifnet *ifp);
static void ar_up(struct ar_softc *sc);
static void ar_down(struct ar_softc *sc);
@@ -244,7 +244,8 @@ static inline void arc_registerdev(struct isa_device *dvp)
* Probe to see if it is there.
* Get its information and fill it in.
*/
-int arprobe(struct isa_device *id)
+static int
+arprobe(struct isa_device *id)
{
struct ar_hardc *hc = &ar_hardc[id->id_unit];
u_int tmp;
@@ -337,7 +338,8 @@ int arprobe(struct isa_device *id)
* Fill in the info for each port.
* Attach each port to sppp and bpf.
*/
-int arattach(struct isa_device *id)
+static int
+arattach(struct isa_device *id)
{
struct ar_hardc *hc = &ar_hardc[id->id_unit];
struct ar_softc *sc;
@@ -431,7 +433,6 @@ void arintr(int unit)
sca_regs *sca = hc->sca;
u_char isr0, isr1, isr2, arisr;
int scano;
- static int intno = 0;
arisr = inb(hc->iobase + AR_ISTAT);
@@ -497,7 +498,8 @@ void arintr(int unit)
* that clears that should ensure that the transmitter and it's DMA is
* in a "good" idle state.
*/
-void arstart(struct ifnet *ifp)
+static void
+arstart(struct ifnet *ifp)
{
struct ar_softc *sc = ARUNIT2SC(ifp->if_unit);
int i, len, tlen;
@@ -612,7 +614,8 @@ void arstart(struct ifnet *ifp)
ARC_SET_OFF(sc->hc->iobase);
}
-int arioctl(struct ifnet *ifp, int cmd, caddr_t data)
+static int
+arioctl(struct ifnet *ifp, int cmd, caddr_t data)
{
int s, error;
int was_up, should_be_up;
@@ -664,7 +667,8 @@ int arioctl(struct ifnet *ifp, int cmd, caddr_t data)
/*
* This is to catch lost tx interrupts.
*/
-void arwatchdog(struct ifnet *ifp)
+static void
+arwatchdog(struct ifnet *ifp)
{
struct ar_softc *sc = ARUNIT2SC(ifp->if_unit);
@@ -1078,7 +1082,8 @@ void ar_init_tx_dmac(struct ar_softc *sc)
* Return the length and status of the packet.
* Return nonzero if there is a packet available.
*/
-int ar_packet_avail(struct ar_softc *sc,
+static int
+ar_packet_avail(struct ar_softc *sc,
int *len,
u_char *rxstat)
{
@@ -1120,7 +1125,8 @@ int ar_packet_avail(struct ar_softc *sc,
* Take into account that buffers wrap and that a packet may
* be larger than a buffer.
*/
-void ar_copy_rxbuf(struct mbuf *m,
+static void
+ar_copy_rxbuf(struct mbuf *m,
struct ar_softc *sc,
int len)
{
@@ -1164,7 +1170,8 @@ void ar_copy_rxbuf(struct mbuf *m,
/*
* Just eat a packet. Update pointers to point to the next packet.
*/
-void ar_eat_packet(struct ar_softc *sc)
+static void
+ar_eat_packet(struct ar_softc *sc)
{
sca_descriptor *rxdesc;
sca_descriptor *endp;
@@ -1203,7 +1210,8 @@ void ar_eat_packet(struct ar_softc *sc)
* While there is packets available in the rx buffer, read them out
* into mbufs and ship them off.
*/
-void ar_get_packets(struct ar_softc *sc)
+static void
+ar_get_packets(struct ar_softc *sc)
{
sca_descriptor *rxdesc;
struct mbuf *m = NULL;
diff --git a/sys/dev/ar/if_ar_isa.c b/sys/dev/ar/if_ar_isa.c
index 10c923a..114b181 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.1.1.1 1995/11/21 02:32:04 peter Exp $
+ * $Id: if_ar.c,v 1.2 1995/12/05 02:00:33 davidg Exp $
*/
/*
@@ -145,10 +145,10 @@ struct ar_softc {
struct kern_devconf kdc;
};
-struct ar_softc *ar_sc_ind[NAR*NPORT];
+static struct ar_softc *ar_sc_ind[NAR*NPORT];
-int arprobe(struct isa_device *id);
-int arattach(struct isa_device *id);
+static int arprobe(struct isa_device *id);
+static int arattach(struct isa_device *id);
/*
* This translate from irq numbers to
@@ -199,9 +199,9 @@ static struct kern_devconf kdc_arc_template = {
DC_CLS_NETIF
};
-void arstart(struct ifnet *ifp);
-int arioctl(struct ifnet *ifp, int cmd, caddr_t data);
-void arwatchdog(struct ifnet *ifp);
+static void arstart(struct ifnet *ifp);
+static int arioctl(struct ifnet *ifp, int cmd, caddr_t data);
+static void arwatchdog(struct ifnet *ifp);
static void ar_up(struct ar_softc *sc);
static void ar_down(struct ar_softc *sc);
@@ -244,7 +244,8 @@ static inline void arc_registerdev(struct isa_device *dvp)
* Probe to see if it is there.
* Get its information and fill it in.
*/
-int arprobe(struct isa_device *id)
+static int
+arprobe(struct isa_device *id)
{
struct ar_hardc *hc = &ar_hardc[id->id_unit];
u_int tmp;
@@ -337,7 +338,8 @@ int arprobe(struct isa_device *id)
* Fill in the info for each port.
* Attach each port to sppp and bpf.
*/
-int arattach(struct isa_device *id)
+static int
+arattach(struct isa_device *id)
{
struct ar_hardc *hc = &ar_hardc[id->id_unit];
struct ar_softc *sc;
@@ -431,7 +433,6 @@ void arintr(int unit)
sca_regs *sca = hc->sca;
u_char isr0, isr1, isr2, arisr;
int scano;
- static int intno = 0;
arisr = inb(hc->iobase + AR_ISTAT);
@@ -497,7 +498,8 @@ void arintr(int unit)
* that clears that should ensure that the transmitter and it's DMA is
* in a "good" idle state.
*/
-void arstart(struct ifnet *ifp)
+static void
+arstart(struct ifnet *ifp)
{
struct ar_softc *sc = ARUNIT2SC(ifp->if_unit);
int i, len, tlen;
@@ -612,7 +614,8 @@ void arstart(struct ifnet *ifp)
ARC_SET_OFF(sc->hc->iobase);
}
-int arioctl(struct ifnet *ifp, int cmd, caddr_t data)
+static int
+arioctl(struct ifnet *ifp, int cmd, caddr_t data)
{
int s, error;
int was_up, should_be_up;
@@ -664,7 +667,8 @@ int arioctl(struct ifnet *ifp, int cmd, caddr_t data)
/*
* This is to catch lost tx interrupts.
*/
-void arwatchdog(struct ifnet *ifp)
+static void
+arwatchdog(struct ifnet *ifp)
{
struct ar_softc *sc = ARUNIT2SC(ifp->if_unit);
@@ -1078,7 +1082,8 @@ void ar_init_tx_dmac(struct ar_softc *sc)
* Return the length and status of the packet.
* Return nonzero if there is a packet available.
*/
-int ar_packet_avail(struct ar_softc *sc,
+static int
+ar_packet_avail(struct ar_softc *sc,
int *len,
u_char *rxstat)
{
@@ -1120,7 +1125,8 @@ int ar_packet_avail(struct ar_softc *sc,
* Take into account that buffers wrap and that a packet may
* be larger than a buffer.
*/
-void ar_copy_rxbuf(struct mbuf *m,
+static void
+ar_copy_rxbuf(struct mbuf *m,
struct ar_softc *sc,
int len)
{
@@ -1164,7 +1170,8 @@ void ar_copy_rxbuf(struct mbuf *m,
/*
* Just eat a packet. Update pointers to point to the next packet.
*/
-void ar_eat_packet(struct ar_softc *sc)
+static void
+ar_eat_packet(struct ar_softc *sc)
{
sca_descriptor *rxdesc;
sca_descriptor *endp;
@@ -1203,7 +1210,8 @@ void ar_eat_packet(struct ar_softc *sc)
* While there is packets available in the rx buffer, read them out
* into mbufs and ship them off.
*/
-void ar_get_packets(struct ar_softc *sc)
+static void
+ar_get_packets(struct ar_softc *sc)
{
sca_descriptor *rxdesc;
struct mbuf *m = NULL;
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index 9dee324..b3d8f03 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.88 1995/12/05 02:00:43 davidg Exp $
+ * $Id: if_ed.c,v 1.89 1995/12/05 13:01:33 davidg Exp $
*/
/*
@@ -92,7 +92,7 @@
/*
* ed_softc: per line info and status
*/
-struct ed_softc {
+static struct ed_softc {
struct arpcom arpcom; /* ethernet common */
char *type_str; /* pointer to type string */
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c
index 54536f6..8df642f 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.34 1995/11/04 17:07:26 bde Exp $
+ * $Id: if_ep.c,v 1.35 1995/12/05 02:00:52 davidg Exp $
*
* Promiscuous mode added and interrupt logic slightly changed
* to reduce the number of adapter failures. Transceiver select
@@ -112,17 +112,17 @@ static int epioctl __P((struct ifnet * ifp, int, caddr_t));
static void epmbuffill __P((caddr_t, int));
static void epmbufempty __P((struct ep_softc *));
-void epinit __P((int));
-void epread __P((struct ep_softc *));
+static void epinit __P((int));
+static void epread __P((struct ep_softc *));
void epreset __P((int));
-void epstart __P((struct ifnet *));
-void epstop __P((int));
-void epwatchdog __P((struct ifnet *));
+static void epstart __P((struct ifnet *));
+static void epstop __P((int));
+static void epwatchdog __P((struct ifnet *));
static int send_ID_sequence __P((int));
static int get_eeprom_data __P((int, int));
-struct ep_softc ep_softc[NEP];
+static struct ep_softc ep_softc[NEP];
#define ep_ftst(f) (sc->stat&(f))
#define ep_fset(f) (sc->stat|=(f))
@@ -156,9 +156,9 @@ ep_registerdev(struct isa_device *id)
dev_attach(&kdc_ep[id->id_unit]);
}
-int ep_current_tag = EP_LAST_TAG + 1;
+static int ep_current_tag = EP_LAST_TAG + 1;
-struct {
+static struct {
int epb_addr; /* address of this board */
char epb_used; /* was this entry already used for configuring ? */
}
@@ -488,7 +488,7 @@ epattach(is)
* The order in here seems important. Otherwise we may not receive
* interrupts. ?!
*/
-void
+static void
epinit(unit)
int unit;
{
@@ -648,7 +648,7 @@ epinit(unit)
static const char padmap[] = {0, 3, 2, 1};
-void
+static void
epstart(ifp)
struct ifnet *ifp;
{
@@ -872,7 +872,7 @@ rescan:
splx(x);
}
-void
+static void
epread(sc)
register struct ep_softc *sc;
{
@@ -1243,7 +1243,7 @@ epioctl(ifp, cmd, data)
return (error);
}
-void
+static void
epwatchdog(ifp)
struct ifnet *ifp;
{
@@ -1259,7 +1259,7 @@ epwatchdog(ifp)
epintr(ifp->if_unit);
}
-void
+static void
epstop(unit)
int unit;
{
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 4e9c091..e394e13 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.74 1995/12/08 23:20:26 phk Exp $
+ * $Id: fd.c,v 1.75 1995/12/09 09:10:12 julian Exp $
*
*/
@@ -200,7 +200,7 @@ fd_goaway(struct kern_devconf *kdc, int force)
#define FD_360in5_25 14
-struct fd_type fd_types[NUMTYPES] =
+static struct fd_type fd_types[NUMTYPES] =
{
{ 21,2,0xFF,0x04,82,3444,1,FDC_500KBPS,2,0x0C,2 }, /* 1.72M in HD 3.5in */
{ 18,2,0xFF,0x1B,82,2952,1,FDC_500KBPS,2,0x6C,1 }, /* 1.48M in HD 3.5in */
@@ -230,7 +230,7 @@ struct fdc_data fdc_data[NFDC];
* Per drive structure. *
* N per controller (DRVS_PER_CTLR) *
\***********************************************************************/
-struct fd_data {
+static struct fd_data {
struct fdc_data *fdc; /* pointer to controller structure */
int fdsu; /* this units number on this controller */
int type; /* Drive type (FD_1440...) */
@@ -360,7 +360,7 @@ static struct cdevsw fd_cdevsw =
seltrue, nommap, fdstrategy, "fd",
&fd_bdevsw, -1 };
-struct isa_device *fdcdevs[NFDC];
+static struct isa_device *fdcdevs[NFDC];
/*
* Provide hw.devconf information.
@@ -393,7 +393,7 @@ fdc_err(fdcu_t fdcu, const char *s)
* # of input bytes, input bytes as ints ...
*/
-int
+static int
fd_cmd(fdcu_t fdcu, int n_out, ...)
{
u_char cmd;
@@ -433,7 +433,7 @@ fd_cmd(fdcu_t fdcu, int n_out, ...)
return 0;
}
-int
+static int
fd_sense_drive_status(fdc_p fdc, int *st3p)
{
int st3;
@@ -448,7 +448,7 @@ fd_sense_drive_status(fdc_p fdc, int *st3p)
return 0;
}
-int
+static int
fd_sense_int(fdc_p fdc, int *st0p, int *cylp)
{
int st0, cyl;
@@ -485,7 +485,7 @@ fd_sense_int(fdc_p fdc, int *st0p, int *cylp)
}
-int
+static int
fd_read_status(fdc_p fdc, int fdsu)
{
int i, ret;
diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c
index a366f05..b043a6e 100644
--- a/sys/dev/fe/if_fe.c
+++ b/sys/dev/fe/if_fe.c
@@ -191,7 +191,7 @@ static struct fe_filter const fe_filter_all = { FE_FILTER_ALL };
/*
* fe_softc: per line info and status
*/
-struct fe_softc {
+static struct fe_softc {
/* Used by "common" codes. */
struct arpcom arpcom; /* ethernet common */
@@ -246,13 +246,13 @@ struct fe_softc {
#define IFNET2SOFTC(P) ( ( struct fe_softc * )(P) )
/* Standard driver entry points. These can be static. */
-int fe_probe ( struct isa_device * );
-int fe_attach ( struct isa_device * );
-void fe_init ( int );
-int fe_ioctl ( struct ifnet *, int, caddr_t );
-void fe_start ( struct ifnet * );
-void fe_reset ( int );
-void fe_watchdog ( struct ifnet * );
+static int fe_probe ( struct isa_device * );
+static int fe_attach ( struct isa_device * );
+static void fe_init ( int );
+static int fe_ioctl ( struct ifnet *, int, caddr_t );
+static void fe_start ( struct ifnet * );
+static void fe_reset ( int );
+static void fe_watchdog ( struct ifnet * );
/* Local functions. Order of declaration is confused. FIXME. */
static int fe_probe_fmv ( struct isa_device *, struct fe_softc * );
@@ -385,7 +385,7 @@ static struct fe_probe_list const fe_probe_list [] =
* or number of i/o addresses used (if found)
*/
-int
+static int
fe_probe ( struct isa_device * isa_dev )
{
struct fe_softc * sc, * u;
@@ -1052,7 +1052,7 @@ fe_init_mbh ( struct fe_softc * sc )
/*
* Install interface into kernel networking data structures
*/
-int
+static int
fe_attach ( struct isa_device *isa_dev )
{
struct fe_softc *sc = &fe_softc[isa_dev->id_unit];
@@ -1170,7 +1170,7 @@ fe_attach ( struct isa_device *isa_dev )
/*
* Reset interface.
*/
-void
+static void
fe_reset ( int unit )
{
/*
@@ -1186,7 +1186,7 @@ fe_reset ( int unit )
* All buffered packets, both transmitting and receiving,
* if any, will be lost by stopping the interface.
*/
-void
+static void
fe_stop ( int unit )
{
struct fe_softc *sc = &fe_softc[unit];
@@ -1243,7 +1243,7 @@ fe_stop ( int unit )
* Device timeout/watchdog routine. Entered if the device neglects to
* generate an interrupt after a transmit has been started on it.
*/
-void
+static void
fe_watchdog ( struct ifnet *ifp )
{
struct fe_softc *sc = (struct fe_softc *)ifp;
@@ -1271,7 +1271,7 @@ fe_watchdog ( struct ifnet *ifp )
/*
* Initialize device.
*/
-void
+static void
fe_init ( int unit )
{
struct fe_softc *sc = &fe_softc[unit];
diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c
index 069867a..b825f70 100644
--- a/sys/dev/ie/if_ie.c
+++ b/sys/dev/ie/if_ie.c
@@ -43,7 +43,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ie.c,v 1.29 1995/11/18 08:35:49 bde Exp $
+ * $Id: if_ie.c,v 1.30 1995/12/05 02:01:08 davidg Exp $
*/
/*
@@ -161,7 +161,7 @@ iomem, and to make 16-pointers, we subtract iomem and and with 0xffff.
#include <net/bpfdesc.h>
#endif
-extern int check_ie_present __P((int unit, caddr_t where, unsigned size));
+static int check_ie_present __P((int unit, caddr_t where, unsigned size));
static struct mbuf *last_not_for_us;
@@ -234,7 +234,7 @@ enum ie_hardware {
IE_UNKNOWN
};
-const char *ie_hardware_names[] = {
+static const char *ie_hardware_names[] = {
"StarLAN 10",
"EN100",
"StarLAN Fiber",
@@ -274,7 +274,7 @@ both transmit and receive buffers.
/*
* Ethernet status, per interface.
*/
-struct ie_softc {
+static struct ie_softc {
struct arpcom arpcom;
void (*ie_reset_586)(int);
void (*ie_chan_attn)(int);
@@ -1358,7 +1358,8 @@ iestart(ifp)
/*
* Check to see if there's an 82586 out there.
*/
-int check_ie_present(unit, where, size)
+static int
+check_ie_present(unit, where, size)
int unit;
caddr_t where;
unsigned size;
diff --git a/sys/dev/joy/joy.c b/sys/dev/joy/joy.c
index 99008ad..351c456 100644
--- a/sys/dev/joy/joy.c
+++ b/sys/dev/joy/joy.c
@@ -81,7 +81,8 @@ static struct {
extern int timer0_max_count;
-int joyprobe (struct isa_device *), joyattach (struct isa_device *);
+static int joyprobe (struct isa_device *);
+static int joyattach (struct isa_device *);
struct isa_driver joydriver = {joyprobe, joyattach, "joy"};
@@ -99,7 +100,7 @@ static struct cdevsw joy_cdevsw =
static int get_tick ();
-int
+static int
joyprobe (struct isa_device *dev)
{
#ifdef WANT_JOYSTICK_CONNECTED
@@ -111,7 +112,7 @@ joyprobe (struct isa_device *dev)
#endif
}
-int
+static int
joyattach (struct isa_device *dev)
{
int unit = dev->id_unit;
diff --git a/sys/dev/kbd/kbdtables.h b/sys/dev/kbd/kbdtables.h
index a761053..9130c78 100644
--- a/sys/dev/kbd/kbdtables.h
+++ b/sys/dev/kbd/kbdtables.h
@@ -25,13 +25,13 @@
* (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: kbdtables.h,v 1.28 1995/03/27 19:41:11 sos Exp $
+ * $Id: kbdtables.h,v 1.29 1995/03/28 21:30:13 sos Exp $
*/
#define SET8 0x80 /* set eight bit on */
#ifdef DKKEYMAP
-keymap_t key_map = { 0x6C, /* DK iso8859 keymap */
+static keymap_t key_map = { 0x6C, /* DK iso8859 keymap */
/* alt
* scan cntrl alt alt cntrl
* code base shift cntrl shift alt shift cntrl shift spcl flgs
@@ -149,7 +149,7 @@ keymap_t key_map = { 0x6C, /* DK iso8859 keymap */
#endif
#ifdef UKKEYMAP
-keymap_t key_map = { 0x6C, /* uk iso8859 keymap */
+static keymap_t key_map = { 0x6C, /* uk iso8859 keymap */
/* alt
* scan cntrl alt alt cntrl
* code base shift cntrl shift alt shift cntrl shift spcl flgs
@@ -267,7 +267,7 @@ keymap_t key_map = { 0x6C, /* uk iso8859 keymap */
#endif
#ifdef GRKEYMAP
-keymap_t key_map = { 0x6C, /* german iso8859 keymap */
+static keymap_t key_map = { 0x6C, /* german iso8859 keymap */
/* alt
* scan cntrl alt alt cntrl
* code base shift cntrl shift alt shift cntrl shift spcl flgs
@@ -385,7 +385,7 @@ keymap_t key_map = { 0x6C, /* german iso8859 keymap */
#endif
#ifdef SWKEYMAP
-keymap_t key_map = { 0x6C, /* swedish iso8859 keymap */
+static keymap_t key_map = { 0x6C, /* swedish iso8859 keymap */
/* alt
* scan cntrl alt alt cntrl
* code base shift cntrl shift alt shift cntrl shift spcl flgs
@@ -503,7 +503,7 @@ keymap_t key_map = { 0x6C, /* swedish iso8859 keymap */
#endif
#ifdef RUKEYMAP
-keymap_t key_map = { 0xEC, /* keys number */
+static keymap_t key_map = { 0xEC, /* keys number */
/* alt
* scan cntrl alt alt cntrl
* code base shift cntrl shift alt shift cntrl shift spcl flgs
@@ -751,7 +751,7 @@ keymap_t key_map = { 0xEC, /* keys number */
#endif
#if !defined(DKKEYMAP) && !defined(UKKEYMAP) && !defined(GRKEYMAP) && !defined(SWKEYMAP) && !defined(RUKEYMAP)
-keymap_t key_map = { 0x6C, /* US iso8859 keymap */
+static keymap_t key_map = { 0x6C, /* US iso8859 keymap */
/* alt
* scan cntrl alt alt cntrl
* code base shift cntrl shift alt shift cntrl shift spcl flgs
@@ -869,7 +869,7 @@ keymap_t key_map = { 0x6C, /* US iso8859 keymap */
#endif
-fkeytab_t fkey_tab[96] = {
+static fkeytab_t fkey_tab[96] = {
/* 01-04 */ {"\033[M", 3}, {"\033[N", 3}, {"\033[O", 3}, {"\033[P", 3},
/* 05-08 */ {"\033[Q", 3}, {"\033[R", 3}, {"\033[S", 3}, {"\033[T", 3},
/* 09-12 */ {"\033[U", 3}, {"\033[V", 3}, {"\033[W", 3}, {"\033[X", 3},
diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c
index ffc57a7..c3f12c5 100644
--- a/sys/dev/lnc/if_lnc.c
+++ b/sys/dev/lnc/if_lnc.c
@@ -100,7 +100,7 @@
#include <i386/isa/isa_device.h>
#include <i386/isa/if_lnc.h>
-struct lnc_softc {
+static struct lnc_softc {
struct arpcom arpcom; /* see ../../netinet/if_ether.h */
struct nic_info nic; /* NIC specific info */
int nrdre;
diff --git a/sys/dev/lnc/if_lncvar.h b/sys/dev/lnc/if_lncvar.h
index 5f4dd32..20966a6 100644
--- a/sys/dev/lnc/if_lncvar.h
+++ b/sys/dev/lnc/if_lncvar.h
@@ -100,19 +100,6 @@
#define TRANS_MD3 \
"\20\6BUFF\5UFLO\4RES\3LCOL\2LCAR\1RTRY"
-static char *nic_ident[] = {"Unknown",
- "BICC",
- "NE2100",
- "DEPCA"};
-
-static char *ic_ident[] = {"Unknown",
- "LANCE, Am7990",
- "C-LANCE, Am79C90",
- "PCnet-ISA, Am79C960",
- "PCnet-ISA+, Am79C961",
- "PCnet-32, Am79C965",
- "PCnet-PCI, Am79C970"};
-
struct nic_info {
int ident; /* Type of card */
int ic; /* Type of ic, Am7990, Am79C960 etc. */
diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c
index 8bd2782..c7c973d 100644
--- a/sys/dev/mcd/mcd.c
+++ b/sys/dev/mcd/mcd.c
@@ -40,7 +40,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: mcd.c,v 1.52 1995/12/08 11:14:34 julian Exp $
+ * $Id: mcd.c,v 1.53 1995/12/08 23:20:34 phk Exp $
*/
static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
@@ -138,7 +138,7 @@ struct mcd_mbx {
short mode;
};
-struct mcd_data {
+static struct mcd_data {
short type;
char *name;
short config;
diff --git a/sys/dev/mse/mse.c b/sys/dev/mse/mse.c
index 2196a4c..768387e 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.20 1995/12/08 11:14:40 julian Exp $
+ * $Id: mse.c,v 1.21 1995/12/08 23:20:35 phk Exp $
*/
/*
* Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and
@@ -90,7 +90,7 @@ static struct cdevsw mse_cdevsw =
* sc_disablemouse() and sc_getmouse() routines must be called spl'd().
*/
#define PROTOBYTES 5
-struct mse_softc {
+static struct mse_softc {
int sc_flags;
int sc_mousetype;
struct selinfo sc_selp;
@@ -188,7 +188,7 @@ static void mse_enableati(), mse_disableati(), mse_getati();
* Keep the Logitech last, since I haven't figured out how to probe it
* properly yet. (Someday I'll have the documentation.)
*/
-struct mse_types {
+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 */
@@ -425,7 +425,6 @@ mseintr(unit)
int unit;
{
register struct mse_softc *sc = &mse_sc[unit];
- pid_t p;
#ifdef DEBUG
static int mse_intrcnt = 0;
diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c
index 206b38f..71d4fc0 100644
--- a/sys/dev/rc/rc.c
+++ b/sys/dev/rc/rc.c
@@ -62,8 +62,8 @@
/* Prototypes */
-int rcprobe __P((struct isa_device *));
-int rcattach __P((struct isa_device *));
+static int rcprobe __P((struct isa_device *));
+static int rcattach __P((struct isa_device *));
/*-
* This space intentionally left blank to stop __LINE__ from screwing up
@@ -151,8 +151,8 @@ static struct rc_chans {
static int rc_scheduled_event = 0;
/* for pstat -t */
-struct tty rc_tty[NRC * CD180_NCHAN];
-int nrc_tty = NRC * CD180_NCHAN;
+static struct tty rc_tty[NRC * CD180_NCHAN];
+static int nrc_tty = NRC * CD180_NCHAN;
/* Flags */
#define RC_DTR_OFF 0x0001 /* DTR wait, for close/open */
@@ -199,7 +199,8 @@ static void rc_wait0 __P((int nec, int unit, int chan, int line));
/**********************************************/
/* Quick device probing */
-int rcprobe(dvp)
+static int
+rcprobe(dvp)
struct isa_device *dvp;
{
int irq = ffs(dvp->id_irq) - 1;
@@ -253,7 +254,8 @@ rc_registerdev(id)
dev_attach(&kdc_rc[unit]);
}
-int rcattach(dvp)
+static int
+rcattach(dvp)
struct isa_device *dvp;
{
register int i, chan, nec = dvp->id_iobase;
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c
index 1e930c3..9fe26bb 100644
--- a/sys/dev/si/si.c
+++ b/sys/dev/si/si.c
@@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
- * $Id: si.c,v 1.23 1995/12/08 11:15:05 julian Exp $
+ * $Id: si.c,v 1.24 1995/12/08 23:20:41 phk Exp $
*/
#ifndef lint
@@ -102,11 +102,11 @@ static void si_disc_optim __P((struct tty *tp, struct termios *t,
static void sihardclose __P((struct si_port *pp));
static void sidtrwakeup __P((void *chan));
-int siparam __P((struct tty *, struct termios *));
+static int siparam __P((struct tty *, struct termios *));
-extern void si_registerdev __P((struct isa_device *id));
-extern int siprobe __P((struct isa_device *id));
-extern int siattach __P((struct isa_device *id));
+static void si_registerdev __P((struct isa_device *id));
+static int siprobe __P((struct isa_device *id));
+static int siattach __P((struct isa_device *id));
static void si_modem_state __P((struct si_port *pp, struct tty *tp, int hi_ip));
struct isa_driver sidriver =
@@ -171,7 +171,7 @@ struct si_softc {
} devfs_token[32]; /* what is the max per card? */
#endif
};
-struct si_softc si_softc[NSI]; /* up to 4 elements */
+static struct si_softc si_softc[NSI]; /* up to 4 elements */
#ifndef B2000 /* not standard, but the hardware knows it. */
# define B2000 2000
@@ -258,7 +258,7 @@ static struct kern_devconf si_kdc[NSI] = { {
DC_CLS_SERIAL, /* class */
} };
-void
+static void
si_registerdev(id)
struct isa_device *id;
{
@@ -272,7 +272,7 @@ si_registerdev(id)
}
/* Look for a valid board at the given mem addr */
-int
+static int
siprobe(id)
struct isa_device *id;
{
@@ -473,7 +473,7 @@ bad_irq:
/*
* Attach the device. Initialize the card.
*/
-int
+static int
siattach(id)
struct isa_device *id;
{
@@ -1412,7 +1412,7 @@ out:
* this may sleep, does not flush, nor wait for drain, nor block writes
* caller must arrange this if it's important..
*/
-int
+static int
siparam(tp, t)
register struct tty *tp;
register struct termios *t;
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 61cd485..b3a01b9 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -31,11 +31,10 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.125 1995/12/08 11:15:12 julian Exp $
+ * $Id: sio.c,v 1.126 1995/12/08 23:20:44 phk Exp $
*/
#include "sio.h"
-#if NSIO > 0
/*
* Serial driver, based on 386BSD-0.1 com driver.
* Mostly rewritten to use pseudo-DMA.
@@ -174,8 +173,6 @@ struct com_s {
bool_t active_out; /* nonzero if the callout device is open */
u_char cfcr_image; /* copy of value written to CFCR */
u_char ftl; /* current rx fifo trigger level */
- u_char ftl_init; /* ftl_max for next open() */
- u_char ftl_max; /* maximum ftl for curent open() */
bool_t hasfifo; /* nonzero for 16550 UARTs */
bool_t loses_outints; /* nonzero if device loses output interrupts */
u_char mcr_image; /* copy of value written to MCR */
@@ -320,7 +317,6 @@ static struct cdevsw sio_cdevsw =
static int comconsole = -1;
static speed_t comdefaultrate = TTYDEF_SPEED;
static u_int com_events; /* input chars + weighted output completions */
-static int commajor;
static int sio_timeout;
static int sio_timeouts_until_log;
#if 0 /* XXX */
@@ -376,8 +372,8 @@ static struct kern_devconf kdc_sio[NSIO] = { {
* PC-Card (PCMCIA) specific code.
*/
static int card_intr(struct pccard_dev *); /* Interrupt handler */
-void siounload(struct pccard_dev *); /* Disable driver */
-void siosuspend(struct pccard_dev *); /* Suspend driver */
+static void siounload(struct pccard_dev *); /* Disable driver */
+static void siosuspend(struct pccard_dev *); /* Suspend driver */
static int sioinit(struct pccard_dev *, int); /* init device */
static struct pccard_drv sio_info =
@@ -398,7 +394,7 @@ static struct pccard_drv sio_info =
* sioinit with first=0. This is called when the user suspends
* the system, or the APM code suspends the system.
*/
-void
+static void
siosuspend(struct pccard_dev *dp)
{
printf("sio%d: suspending\n", dp->isahd.id_unit);
@@ -451,12 +447,10 @@ sioinit(struct pccard_dev *dp, int first)
* and ensure that any driver entry points such as
* read and write do not hang.
*/
-void
+static void
siounload(struct pccard_dev *dp)
{
struct com_s *com;
- struct tty *tp;
- int s,unit,nowhere;
com = com_addr(dp->isahd.id_unit);
if (!com->iobase) {
@@ -815,37 +809,60 @@ sioattach(isdp)
goto determined_type;
}
}
- outb(iobase + com_fifo, FIFO_ENABLE | FIFO_TRIGGER_14);
+ outb(iobase + com_fifo, FIFO_ENABLE | FIFO_RX_HIGH);
DELAY(100);
switch (inb(com->int_id_port) & IIR_FIFO_MASK) {
- case FIFO_TRIGGER_1:
+ case FIFO_RX_LOW:
printf(" 16450");
kdc_sio[unit].kdc_description =
"Serial port: National 16450 or compatible";
break;
- case FIFO_TRIGGER_4:
+ case FIFO_RX_MEDL:
printf(" 16450?");
kdc_sio[unit].kdc_description =
"Serial port: maybe National 16450";
break;
- case FIFO_TRIGGER_8:
+ case FIFO_RX_MEDH:
printf(" 16550?");
kdc_sio[unit].kdc_description =
"Serial port: maybe National 16550";
break;
- case FIFO_TRIGGER_14:
- printf(" 16550A");
+ case FIFO_RX_HIGH:
if (COM_NOFIFO(isdp)) {
printf(" fifo disabled");
kdc_sio[unit].kdc_description =
"Serial port: National 16550A, FIFO disabled";
} else {
com->hasfifo = TRUE;
- com->ftl_init = FIFO_TRIGGER_14;
com->tx_fifo_size = 16;
kdc_sio[unit].kdc_description =
"Serial port: National 16550A or compatible";
}
+ /*
+ * Check for the Startech ST16C650 chip.
+ * it has a shadow register under the com_iir,
+ * which can only be accessed when cfcr == 0xff
+ */
+ {
+ u_char i, j;
+
+ i = inb(iobase + com_iir);
+ outb(iobase + com_cfcr, 0xff);
+ outb(iobase + com_iir, 0x0);
+ outb(iobase + com_cfcr, CFCR_8BITS);
+ j = inb(iobase + com_iir);
+ outb(iobase + com_iir, i);
+ if (i != j) {
+ printf(" 16550A");
+ } else {
+ com->tx_fifo_size = 32;
+ printf(" 16650");
+ kdc_sio[unit].kdc_description =
+ "Serial port: Startech 16C650 or similar";
+ }
+ if (!com->tx_fifo_size)
+ printf(" fifo disabled");
+ }
break;
}
outb(iobase + com_fifo, 0);
@@ -867,7 +884,7 @@ determined_type: ;
kdc_sio[unit].kdc_state = (unit == comconsole) ? DC_BUSY : DC_IDLE;
#ifdef KGDB
- if (kgdb_dev == makedev(commajor, unit)) {
+ if (kgdb_dev == makedev(CDEV_MAJOR, unit)) {
if (unit == comconsole)
kgdb_dev = -1; /* can't debug over console port */
else {
@@ -1018,7 +1035,6 @@ open_top:
tp->t_termios = mynor & CALLOUT_MASK
? com->it_out : com->it_in;
(void)commctl(com, TIOCM_DTR | TIOCM_RTS, DMSET);
- com->ftl_max = com->ftl_init;
com->poll = com->no_irq;
com->poll_output = com->loses_outints;
++com->wopeners;
@@ -1045,8 +1061,7 @@ open_top:
*/
while (TRUE) {
outb(iobase + com_fifo,
- FIFO_RCV_RST | FIFO_XMT_RST
- | FIFO_ENABLE | com->ftl);
+ FIFO_RCV_RST | FIFO_XMT_RST | com->ftl);
DELAY(100);
if (!(inb(com->line_status_port) & LSR_RXRDY))
break;
@@ -1161,7 +1176,7 @@ comhardclose(com)
outb(iobase + com_cfcr, com->cfcr_image &= ~CFCR_SBREAK);
#ifdef KGDB
/* do not disable interrupts or hang up if debugging */
- if (kgdb_dev != makedev(commajor, unit))
+ if (kgdb_dev != makedev(CDEV_MAJOR, unit))
#endif
{
outb(iobase + com_ier, 0);
@@ -1373,7 +1388,7 @@ siointr1(com)
if (recv_data == FRAME_END
&& ( com->tp == NULL
|| !(com->tp->t_state & TS_ISOPEN))
- && kgdb_dev == makedev(commajor, unit)) {
+ && kgdb_dev == makedev(CDEV_MAJOR, unit)) {
kgdb_connect(0);
continue;
}
@@ -1882,10 +1897,8 @@ comparam(tp, t)
* latencies are larger.
*/
com->ftl = t->c_ospeed <= 4800
- ? FIFO_TRIGGER_1 : FIFO_TRIGGER_14;
- if (com->ftl > com->ftl_max)
- com->ftl = com->ftl_max;
- outb(iobase + com_fifo, FIFO_ENABLE | com->ftl);
+ ? 0 : FIFO_ENABLE | FIFO_RX_HIGH;
+ outb(iobase + com_fifo, com->ftl);
}
/*
@@ -2252,30 +2265,6 @@ comwakeup(chan)
log(LOG_ERR, "sio%d: %u more %s%s (total %lu)\n",
unit, delta, error_desc[errnum],
delta == 1 ? "" : "s", total);
-#if 0
- /*
- * XXX if we resurrect this then we should move
- * the dropping of the ftl to somewhere with less
- * latency.
- */
- if (errnum == CE_OVERRUN && com->hasfifo
- && com->ftl > FIFO_TRIGGER_1) {
- static u_char ftl_in_bytes[] =
- { 1, 4, 8, 14, };
-
- com->ftl_init = FIFO_TRIGGER_8;
-#define FIFO_TRIGGER_DELTA FIFO_TRIGGER_4
- com->ftl_max =
- com->ftl -= FIFO_TRIGGER_DELTA;
- outb(com->iobase + com_fifo,
- FIFO_ENABLE | com->ftl);
- log(LOG_DEBUG,
- "sio%d: reduced fifo trigger level to %d\n",
- unit,
- ftl_in_bytes[com->ftl
- / FIFO_TRIGGER_DELTA]);
- }
-#endif
}
}
}
@@ -2403,12 +2392,6 @@ siocnprobe(cp)
{
int unit;
- /* locate the major number */
- /* XXX - should be elsewhere since KGDB uses it */
- for (commajor = 0; commajor < nchrdev; commajor++)
- if (cdevsw[commajor].d_open == sioopen)
- break;
-
/* XXX: ick */
unit = DEV_TO_UNIT(CONUNIT);
siocniobase = CONADDR;
@@ -2416,7 +2399,7 @@ siocnprobe(cp)
/* make sure hardware exists? XXX */
/* initialize required fields */
- cp->cn_dev = makedev(commajor, unit);
+ cp->cn_dev = makedev(CDEV_MAJOR, unit);
#ifdef COMCONSOLE
cp->cn_pri = CN_REMOTE; /* Force a serial port console */
#else
@@ -2625,4 +2608,3 @@ static void sio_drvinit(void *unused)
SYSINIT(siodev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,sio_drvinit,NULL)
-#endif /* NSIO > 0 */
diff --git a/sys/dev/sio/sioreg.h b/sys/dev/sio/sioreg.h
index d43bcdf..bc77dd6 100644
--- a/sys/dev/sio/sioreg.h
+++ b/sys/dev/sio/sioreg.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)comreg.h 7.2 (Berkeley) 5/9/91
- * $Id: sioreg.h,v 1.2 1993/10/16 19:17:18 rgrimes Exp $
+ * $Id: sioreg.h,v 1.3 1995/01/20 07:34:18 wpaul Exp $
*/
@@ -59,10 +59,10 @@
#define FIFO_RCV_RST 0x02
#define FIFO_XMT_RST 0x04
#define FIFO_DMA_MODE 0x08
-#define FIFO_TRIGGER_1 0x00
-#define FIFO_TRIGGER_4 0x40
-#define FIFO_TRIGGER_8 0x80
-#define FIFO_TRIGGER_14 0xc0
+#define FIFO_RX_LOW 0x00
+#define FIFO_RX_MEDL 0x40
+#define FIFO_RX_MEDH 0x80
+#define FIFO_RX_HIGH 0xc0
/* character format control register */
#define CFCR_DLAB 0x80
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index db7c92d..6c3634d 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.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: syscons.c,v 1.134 1995/12/07 12:46:08 davidg Exp $
+ * $Id: syscons.c,v 1.135 1995/12/08 11:15:28 julian Exp $
*/
#include "sc.h"
@@ -109,7 +109,6 @@ static const u_int n_fkey_tab = sizeof(fkey_tab) / sizeof(*fkey_tab);
static int delayed_next_scr = FALSE;
static long scrn_blank_time = 0; /* screen saver timeout value */
int scrn_blanked = FALSE; /* screen saver active flag */
-static int scrn_saver = 0; /* screen saver routine */
static long scrn_time_stamp;
u_char scr_map[256];
static char *video_mode_ptr = NULL;
@@ -126,10 +125,15 @@ static u_short mouse_or_mask[16] = {
0x0c00, 0x0c00, 0x0600, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000
};
-extern void none_saver(int blank);
-void none_saver(int blank) { }
+static void none_saver(int blank) { }
+
void (*current_saver) __P((int blank)) = none_saver;
+static int scattach(struct isa_device *dev);
+static int scparam(struct tty *tp, struct termios *t);
+static int scprobe(struct isa_device *dev);
+static void scstart(struct tty *tp);
+
/* OS specific stuff */
#ifdef not_yet_done
#define VIRTUAL_TTY(x) (sccons[x] = ttymalloc(sccons[x]))
@@ -138,8 +142,7 @@ struct tty *sccons[MAXCONS+1];
#else
#define VIRTUAL_TTY(x) &sccons[x]
#define CONSOLE_TTY &sccons[MAXCONS]
-struct tty sccons[MAXCONS+1];
-int nsccons = MAXCONS+1;
+static struct tty sccons[MAXCONS+1];
#endif
#define MONO_BUF pa_to_va(0xB0000)
#define CGA_BUF pa_to_va(0xB8000)
@@ -195,7 +198,7 @@ mask2attr(struct term_stat *term)
return attr;
}
-int
+static int
scprobe(struct isa_device *dev)
{
int i, retries = 5;
@@ -284,7 +287,7 @@ scresume(void *dummy)
}
#endif
-int
+static int
scattach(struct isa_device *dev)
{
scr_stat *scp;
@@ -528,7 +531,7 @@ scintr(int unit)
}
}
-int
+static int
scparam(struct tty *tp, struct termios *t)
{
tp->t_ispeed = t->c_ispeed;
@@ -1147,7 +1150,7 @@ set_mouse_pos:
return(ENOTTY);
}
-void
+static void
scstart(struct tty *tp)
{
struct clist *rbp;
diff --git a/sys/dev/syscons/syscons.h b/sys/dev/syscons/syscons.h
index ab928ac..6c895e2 100644
--- a/sys/dev/syscons/syscons.h
+++ b/sys/dev/syscons/syscons.h
@@ -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: syscons.h,v 1.12 1995/11/04 17:07:52 bde Exp $
+ * $Id: syscons.h,v 1.13 1995/11/28 00:17:32 ache Exp $
*/
#ifndef _I386_ISA_SYSCONS_H_
@@ -177,10 +177,6 @@ typedef struct default_attr {
} default_attr;
/* function prototypes */
-int scprobe(struct isa_device *dev);
-int scattach(struct isa_device *dev);
-int scparam(struct tty *tp, struct termios *t);
-void scstart(struct tty *tp);
static void scinit(void);
static u_int scgetc(int noblock);
static scr_stat *get_scr_stat(dev_t dev);
diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c
index 82e0b18..86a1eec 100644
--- a/sys/i386/i386/tsc.c
+++ b/sys/i386/i386/tsc.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.38 1995/10/28 15:38:49 phk Exp $
+ * $Id: clock.c,v 1.39 1995/11/29 19:57:22 wollman Exp $
*/
/*
@@ -130,7 +130,7 @@ clkintr(struct clockframe frame)
setdelayed();
}
#else
-void
+static void
clkintr(struct clockframe frame)
{
timer_func(&frame);
@@ -245,7 +245,7 @@ release_timer2()
* The RTC chip requires that we read status register C (RTC_INTR)
* to acknowledge an interrupt, before it will generate the next one.
*/
-void
+static void
rtcintr(struct clockframe frame)
{
u_char stat;
@@ -256,8 +256,8 @@ rtcintr(struct clockframe frame)
}
#ifdef DDB
-static void
-printrtc(void)
+void
+DDB_printrtc(void)
{
printf("%02x/%02x/%02x %02x:%02x:%02x, A = %02x, B = %02x, C = %02x\n",
rtcin(RTC_YEAR), rtcin(RTC_MONTH), rtcin(RTC_DAY),
diff --git a/sys/i386/include/clock.h b/sys/i386/include/clock.h
index c231f5e..542e628 100644
--- a/sys/i386/include/clock.h
+++ b/sys/i386/include/clock.h
@@ -3,7 +3,7 @@
* Garrett Wollman, September 1994.
* This file is in the public domain.
*
- * $Id$
+ * $Id: clock.h,v 1.6 1995/11/29 19:57:16 wollman Exp $
*/
#ifndef _MACHINE_CLOCK_H_
@@ -66,8 +66,6 @@ extern u_int timer0_prescaler_count;
#ifdef I586_CPU
void calibrate_cyclecounter __P((void));
#endif
-void clkintr __P((struct clockframe frame));
-void rtcintr __P((struct clockframe frame));
#ifdef I586_CPU
static __inline u_long
diff --git a/sys/i386/include/cronyx.h b/sys/i386/include/cronyx.h
index 0ea0e65..c98094e 100644
--- a/sys/i386/include/cronyx.h
+++ b/sys/i386/include/cronyx.h
@@ -477,16 +477,11 @@ extern cx_opt_x21_t opt_x21_dflt; /* default x21 options */
int cx_probe_board (int port);
void cx_init (cx_board_t *b, int num, int port, int irq, int dma);
-void cx_init_board (cx_board_t *b, int num, int port, int irq, int dma,
- int chain, int rev, int osc, int rev2, int osc2);
void cx_setup_board (cx_board_t *b);
void cx_setup_chan (cx_chan_t *c);
void cx_chan_dtr (cx_chan_t *c, int on);
void cx_chan_rts (cx_chan_t *c, int on);
void cx_cmd (int base, int cmd);
-void cx_disable_dma (cx_board_t *b);
-void cx_reinit_board (cx_board_t *b);
-int cx_chan_dsr (cx_chan_t *c);
int cx_chan_cd (cx_chan_t *c);
void cx_clock (long hz, long ba, int *clk, int *div);
diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h
index ed000e1..fa91bff 100644
--- a/sys/i386/include/pmap.h
+++ b/sys/i386/include/pmap.h
@@ -42,7 +42,7 @@
*
* from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
* from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
- * $Id: pmap.h,v 1.28 1995/07/19 06:37:12 davidg Exp $
+ * $Id: pmap.h,v 1.29 1995/12/03 18:37:44 bde Exp $
*/
#ifndef _MACHINE_PMAP_H_
@@ -209,7 +209,6 @@ void pmap_activate __P((pmap_t, struct pcb *));
pmap_t pmap_kernel __P((void));
boolean_t pmap_page_exists __P((pmap_t, vm_offset_t));
pt_entry_t * __pure pmap_pte __P((pmap_t, vm_offset_t)) __pure2;
-vm_page_t pmap_pte_vm_page __P((pmap_t, vm_offset_t));
void *pmap_mapdev __P((vm_offset_t, vm_size_t));
void pmap_growkernel __P((vm_offset_t));
void pmap_bootstrap __P(( vm_offset_t, vm_offset_t));
diff --git a/sys/i386/isa/aic6360.c b/sys/i386/isa/aic6360.c
index e740bdd..e865eab 100644
--- a/sys/i386/isa/aic6360.c
+++ b/sys/i386/isa/aic6360.c
@@ -31,7 +31,7 @@
*/
/*
- * $Id: aic6360.c,v 1.14 1995/11/29 10:26:51 phk Exp $
+ * $Id: aic6360.c,v 1.15 1995/12/06 23:42:13 bde Exp $
*
* Acknowledgements: Many of the algorithms used in this driver are
* inspired by the work of Julian Elischer (julian@tfs.com) and
@@ -564,7 +564,7 @@ struct aic_tinfo {
u_char persgst; /* Period suggestion */
u_char offsgst; /* Offset suggestion */
u_char syncdata; /* True negotiated synch parameters */
-} tinfo_t;
+};
/* Register a linenumber (for debugging) */
#if AIC_DEBUG
@@ -578,7 +578,7 @@ struct aic_tinfo {
#endif
#ifdef __FreeBSD__
-struct aic_data { /* One of these per adapter */
+static struct aic_data { /* One of these per adapter */
#else
struct aic_softc { /* One of these per adapter */
/* Auto config stuff */
diff --git a/sys/i386/isa/asc.c b/sys/i386/isa/asc.c
index b072c5f..8b666e46 100644
--- a/sys/i386/isa/asc.c
+++ b/sys/i386/isa/asc.c
@@ -34,7 +34,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
- * $Id: asc.c,v 1.9 1995/12/06 23:42:22 bde Exp $
+ * $Id: asc.c,v 1.10 1995/12/08 11:13:47 julian Exp $
*/
#include "asc.h"
@@ -199,8 +199,8 @@ struct asc_unit {
/***
*** THE PER-DRIVER RECORD FOR ISA.C
***/
-int ascprobe (struct isa_device *isdp);
-int ascattach(struct isa_device *isdp);
+static int ascprobe (struct isa_device *isdp);
+static int ascattach(struct isa_device *isdp);
struct isa_driver ascdriver = { ascprobe, ascattach, "asc" };
#ifndef FREEBSD_1_X
@@ -218,10 +218,6 @@ static struct cdevsw asc_cdevsw =
ascioctl, nostop, nullreset, nodevtotty, /* asc */
ascselect, nommap, NULL, "asc", NULL, -1 };
-struct asc_softc {
- struct isa_device *dev;
-} asc_softc[NASC];
-
static struct kern_devconf kdc_asc[NASC] = { {
0, 0, 0, /* filled in by dev_attach */
"asc", 0, { MDDT_ISA, 0, "tty" },
@@ -349,7 +345,6 @@ buffer_allocate(struct asc_unit *scu)
static void
dma_restart(struct asc_unit *scu)
{
- unsigned char al=scu->cmd_byte;
isa_dmastart(B_READ, scu->sbuf.base+scu->sbuf.wptr,
scu->linesize, scu->dma_num);
/*** this is done in sub_20, after dmastart ? ***/
@@ -371,7 +366,7 @@ dma_restart(struct asc_unit *scu)
/*** asc_reset
*** resets the scanner and the config bytes...
***/
-void
+static void
asc_reset(struct asc_unit *scu)
{
scu->cfg_byte = 0 ; /* clear... */
@@ -392,7 +387,7 @@ asc_reset(struct asc_unit *scu)
*** - if address group matches (status byte has reasonable value)
*** cannot check interrupt/dma, only clear the config byte.
***/
-int
+static int
ascprobe (struct isa_device *isdp)
{
int unit = isdp->id_unit;
@@ -443,7 +438,8 @@ ascprobe (struct isa_device *isdp)
scu->dma_byte = ASC_CNF_DMA3;
break;
default:
- lprintf("asc%d.probe: unsupported DMA %d (only 1 or 3)\n", scu->dma_num);
+ lprintf("asc%d.probe: unsupported DMA %d (only 1 or 3)\n",
+ unit, scu->dma_num);
return PROBE_FAIL;
}
asc_reset(scu);
@@ -460,7 +456,7 @@ ascprobe (struct isa_device *isdp)
*** finish initialization of unit structure, get geometry value (?)
***/
-int
+static int
ascattach(struct isa_device *isdp)
{
int unit = isdp->id_unit;
@@ -576,7 +572,7 @@ ascopen(dev_t dev, int flags, int fmt, struct proc *p)
int unit = UNIT(minor(dev)) & UNIT_MASK;
struct asc_unit *scu = unittab + unit;
- lprintf("asc%d.open: minor %d icnt %d\n", unit, minor(dev), scu->icnt);
+ lprintf("asc%d.open: minor %d icnt %ld\n", unit, minor(dev), scu->icnt);
if ( unit >= NASC || !( scu->flags & ATTACHED ) ) {
lprintf("asc%d.open: unit was not attached successfully, flags 0x%04x\n",
@@ -611,7 +607,7 @@ ascopen(dev_t dev, int flags, int fmt, struct proc *p)
return SUCCESS;
}
-int
+static int
asc_startread(struct asc_unit *scu)
{
/*** from here on, things can be delayed to the first read/ioctl ***/
@@ -800,7 +796,7 @@ ascioctl(dev_t dev, int cmd, caddr_t data, int flags, struct proc *p)
unit, minor(dev));
if ( unit >= NASC || !( scu->flags & ATTACHED ) ) {
- lprintf("asc%d.ioctl: unit was not attached successfully 0x04x\n",
+ lprintf("asc%d.ioctl: unit was not attached successfully %0x04x\n",
unit, scu->flags);
return ENXIO;
}
diff --git a/sys/i386/isa/bt742a.c b/sys/i386/isa/bt742a.c
index 329ab87..0ffd88a 100644
--- a/sys/i386/isa/bt742a.c
+++ b/sys/i386/isa/bt742a.c
@@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
- * $Id: bt742a.c,v 1.45 1995/12/07 09:13:48 peter Exp $
+ * $Id: bt742a.c,v 1.46 1995/12/07 12:45:55 davidg Exp $
*/
/*
@@ -40,6 +40,8 @@
#include "bt.h"
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/sysctl.h>
#include <sys/errno.h>
#include <sys/ioctl.h>
#include <sys/malloc.h>
@@ -375,7 +377,7 @@ struct bt_sync_value {
#define PAGESIZ 4096
#define INVALIDATE_CACHE {asm volatile( ".byte 0x0F ;.byte 0x08" ); }
-struct bt_data {
+static struct bt_data {
short bt_base; /* base port for each board */
struct bt_mbx bt_mbx; /* all our mailboxes */
struct bt_ccb *bt_ccb_free; /* list of free CCBs */
@@ -394,6 +396,7 @@ struct bt_data {
#define BT_SHOWCMDS 0x04
#define BT_SHOWMISC 0x08
static int bt_debug = 0;
+SYSCTL_INT(_debug, OID_AUTO, bt742a_debug, CTLFLAG_RW, &bt_debug, 0, "");
#ifdef KERNEL
static int btprobe();
diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c
index 82e0b18..86a1eec 100644
--- a/sys/i386/isa/clock.c
+++ b/sys/i386/isa/clock.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.38 1995/10/28 15:38:49 phk Exp $
+ * $Id: clock.c,v 1.39 1995/11/29 19:57:22 wollman Exp $
*/
/*
@@ -130,7 +130,7 @@ clkintr(struct clockframe frame)
setdelayed();
}
#else
-void
+static void
clkintr(struct clockframe frame)
{
timer_func(&frame);
@@ -245,7 +245,7 @@ release_timer2()
* The RTC chip requires that we read status register C (RTC_INTR)
* to acknowledge an interrupt, before it will generate the next one.
*/
-void
+static void
rtcintr(struct clockframe frame)
{
u_char stat;
@@ -256,8 +256,8 @@ rtcintr(struct clockframe frame)
}
#ifdef DDB
-static void
-printrtc(void)
+void
+DDB_printrtc(void)
{
printf("%02x/%02x/%02x %02x:%02x:%02x, A = %02x, B = %02x, C = %02x\n",
rtcin(RTC_YEAR), rtcin(RTC_MONTH), rtcin(RTC_DAY),
diff --git a/sys/i386/isa/cronyx.c b/sys/i386/isa/cronyx.c
index c5ed8f4..944e536 100644
--- a/sys/i386/isa/cronyx.c
+++ b/sys/i386/isa/cronyx.c
@@ -58,15 +58,18 @@ static unsigned char dmamask [] = {
BCR0_DMA_DIS, BCR0_DMA_5, BCR0_DMA_6, BCR0_DMA_7,
};
-long cx_rxbaud = CX_SPEED_DFLT; /* receiver baud rate */
-long cx_txbaud = CX_SPEED_DFLT; /* transmitter baud rate */
+static long cx_rxbaud = CX_SPEED_DFLT; /* receiver baud rate */
+static long cx_txbaud = CX_SPEED_DFLT; /* transmitter baud rate */
-int cx_univ_mode = M_ASYNC; /* univ. chan. mode: async or sync */
-int cx_sync_mode = M_HDLC; /* sync. chan. mode: HDLC, Bisync or X.21 */
-int cx_iftype = 0; /* univ. chan. interface: upper/lower */
+static int cx_univ_mode = M_ASYNC; /* univ. chan. mode: async or sync */
+static int cx_sync_mode = M_HDLC; /* sync. chan. mode: HDLC, Bisync or X.21 */
+static int cx_iftype = 0; /* univ. chan. interface: upper/lower */
static int cx_probe_chip (int base);
static void cx_setup_chip (cx_chip_t *c);
+static void cx_init_board (cx_board_t *b, int num, int port, int irq, int dma,
+ int chain, int rev, int osc, int rev2, int osc2);
+static void cx_reinit_board (cx_board_t *b);
/*
* Wait for CCR to clear.
@@ -158,7 +161,8 @@ static int cx_probe_chained_board (int port, int *c0, int *c1)
/*
* Check if the CD2400 board is present at the given base port.
*/
-int cx_probe_board (int port)
+int
+cx_probe_board (int port)
{
int c0, c1, c2=0, c3=0, result;
@@ -245,7 +249,8 @@ void cx_init (cx_board_t *b, int num, int port, int irq, int dma)
/*
* Initialize the board structure, given the type of the board.
*/
-void cx_init_board (cx_board_t *b, int num, int port, int irq, int dma,
+static void
+cx_init_board (cx_board_t *b, int num, int port, int irq, int dma,
int chain, int rev, int osc, int rev2, int osc2)
{
cx_chan_t *c;
@@ -504,7 +509,8 @@ void cx_init_board (cx_board_t *b, int num, int port, int irq, int dma,
/*
* Reinitialize all channels, using new options and baud rate.
*/
-void cx_reinit_board (cx_board_t *b)
+static void
+cx_reinit_board (cx_board_t *b)
{
cx_chan_t *c;
@@ -800,53 +806,20 @@ void cx_chan_dtr (cx_chan_t *c, int on)
* Control RTS signal for the channel.
* Turn it on/off.
*/
-void cx_chan_rts (cx_chan_t *c, int on)
+void
+cx_chan_rts (cx_chan_t *c, int on)
{
c->rts = on ? 1 : 0;
outb (CAR(c->chip->port), c->num & 3);
outb (MSVR_RTS(c->chip->port), on ? MSV_RTS : 0);
}
-/*
- * Get the state of DSR signal of the channel.
- */
-int cx_chan_dsr (cx_chan_t *c)
-{
- unsigned char sigval;
-
- if (c->mode == M_ASYNC) {
- outb (CAR(c->chip->port), c->num & 3);
- return (inb (MSVR(c->chip->port)) & MSV_DSR ? 1 : 0);
- }
-
- /*
- * Channels 4..7 and 12..15 don't have DSR signal available.
- */
- switch (c->num) {
- default:
- return (1);
-
- case 1: case 2: case 3:
- if (c->type == T_UNIV_RS232)
- return (1);
- case 0:
- sigval = inw (BSR(c->board->port)) >> 8;
- break;
-
- case 9: case 10: case 11:
- if (c->type == T_UNIV_RS232)
- return (1);
- case 8:
- sigval = inw (BSR(c->board->port+0x10)) >> 8;
- break;
- }
- return (~sigval >> (c->num & 3) & 1);
-}
/*
* Get the state of CARRIER signal of the channel.
*/
-int cx_chan_cd (cx_chan_t *c)
+int
+cx_chan_cd (cx_chan_t *c)
{
unsigned char sigval;
@@ -898,13 +871,7 @@ void cx_clock (long hz, long ba, int *clk, int *div)
*div = 255;
}
-void cx_disable_dma (cx_board_t *b)
-{
- /* Disable DMA channel. */
- outb (DMA_MASK, (b->dma & 3) | DMA_MASK_CLEAR);
-}
-
-cx_chan_opt_t chan_opt_dflt = { /* mode-independent options */
+static cx_chan_opt_t chan_opt_dflt = { /* mode-independent options */
{ /* cor4 */
7, /* FIFO threshold, odd is better */
0,
@@ -936,7 +903,7 @@ cx_chan_opt_t chan_opt_dflt = { /* mode-independent options */
},
};
-cx_opt_async_t opt_async_dflt = { /* default async options */
+static cx_opt_async_t opt_async_dflt = { /* default async options */
{ /* cor1 */
8-1, /* 8-bit char length */
0, /* don't ignore parity */
@@ -979,7 +946,7 @@ cx_opt_async_t opt_async_dflt = { /* default async options */
0, 0, 0, 0, 0, 0, 0, /* clear schr1-4, scrl, scrh, lnxt */
};
-cx_opt_hdlc_t opt_hdlc_dflt = { /* default hdlc options */
+static cx_opt_hdlc_t opt_hdlc_dflt = { /* default hdlc options */
{ /* cor1 */
2, /* 2 inter-frame flags */
0, /* no-address mode */
@@ -1008,7 +975,7 @@ cx_opt_hdlc_t opt_hdlc_dflt = { /* default hdlc options */
POLY_V41, /* use V.41 CRC polynomial */
};
-cx_opt_bisync_t opt_bisync_dflt = { /* default bisync options */
+static cx_opt_bisync_t opt_bisync_dflt = { /* default bisync options */
{ /* cor1 */
8-1, /* 8-bit char length */
0, /* don't ignore parity */
@@ -1036,7 +1003,7 @@ cx_opt_bisync_t opt_bisync_dflt = { /* default bisync options */
POLY_16, /* use CRC-16 polynomial */
};
-cx_opt_x21_t opt_x21_dflt = { /* default x21 options */
+static cx_opt_x21_t opt_x21_dflt = { /* default x21 options */
{ /* cor1 */
8-1, /* 8-bit char length */
0, /* don't ignore parity */
diff --git a/sys/i386/isa/ctx.c b/sys/i386/isa/ctx.c
index 7739cea..e2631a6 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.12 1995/12/08 11:13:56 julian Exp $
+ * $Id: ctx.c,v 1.13 1995/12/08 23:20:21 phk Exp $
*/
/*
@@ -132,14 +132,14 @@
#include <machine/ioctl_ctx.h>
-int waitvb(short);
+static int waitvb(short);
/* state flags */
#define OPEN (0x01) /* device is open */
#define UNIT(x) ((x) & 0x07)
-int ctxprobe(), ctxattach();
+static int ctxprobe(), ctxattach();
struct isa_driver ctxdriver = {ctxprobe, ctxattach, "ctx"};
static d_open_t ctxopen;
@@ -162,7 +162,7 @@ static struct cdevsw ctx_cdevsw =
* Per unit shadow registers (because the dumb hardware is RO)
*/
-struct ctx_soft_registers {
+static struct ctx_soft_registers {
u_char *lutp;
u_char cp0;
u_char cp1;
@@ -195,7 +195,7 @@ ctx_registerdev(struct isa_device *id)
dev_attach(&kdc_ctx[id->id_unit]);
}
-int
+static int
ctxprobe(struct isa_device * devp)
{
int status;
@@ -210,7 +210,7 @@ ctxprobe(struct isa_device * devp)
return (status);
}
-int
+static int
ctxattach(struct isa_device * devp)
{
struct ctx_soft_registers *sr;
@@ -452,7 +452,7 @@ ctxioctl(dev_t dev, int cmd, caddr_t data, int flags, struct proc *p)
return (error);
}
-int
+static int
waitvb(short port)
{ /* wait for a vertical blank, */
if (inb(port) == 0xff) /* 0xff means no board present */
diff --git a/sys/i386/isa/cx.c b/sys/i386/isa/cx.c
index d50a569..8e72dda 100644
--- a/sys/i386/isa/cx.c
+++ b/sys/i386/isa/cx.c
@@ -76,7 +76,7 @@ extern cx_board_t cxboard [NCX]; /* adapter state structures */
extern cx_chan_t *cxchan [NCX*NCHAN]; /* unit to channel struct pointer */
#if __FreeBSD__ >= 2
extern struct kern_devconf kdc_cx [NCX];
-struct tty cx_tty [NCX*NCHAN]; /* tty data */
+static struct tty cx_tty [NCX*NCHAN]; /* tty data */
static d_open_t cxopen;
static d_close_t cxclose;
@@ -98,8 +98,8 @@ static struct cdevsw cx_cdevsw =
struct tty *cx_tty [NCX*NCHAN]; /* tty data */
#endif
-void cxoproc (struct tty *tp);
-int cxparam (struct tty *tp, struct termios *t);
+static void cxoproc (struct tty *tp);
+static int cxparam (struct tty *tp, struct termios *t);
void cxswitch (cx_chan_t *c, cx_soft_opt_t new);
int cxopen (dev_t dev, int flag, int mode, struct proc *p)
@@ -493,7 +493,8 @@ int cxioctl (dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
/*
* Fill transmitter buffer with data.
*/
-void cxout (cx_chan_t *c, char b)
+static void
+cxout (cx_chan_t *c, char b)
{
unsigned char *buf, *p, sym;
unsigned short port = c->chip->port, len = 0, cnt_port, sts_port;
@@ -604,10 +605,6 @@ void cxoproc (struct tty *tp)
cxout (c, 'B');
}
}
-#if defined (__FreeBSD__) && __FreeBSD__ < 2
- if (tp->t_state & (TS_SO_OCOMPLETE | TS_SO_OLOWAT) || tp->t_wsel)
- ttwwakeup (tp);
-#else /* FreeBSD 2.x and BSDI */
#ifndef TS_ASLEEP /* FreeBSD some time after 2.0.5 */
ttwwakeup(tp);
#else
@@ -619,11 +616,11 @@ void cxoproc (struct tty *tp)
selwakeup(&tp->t_wsel);
}
#endif
-#endif
splx (s);
}
-int cxparam (struct tty *tp, struct termios *t)
+static int
+cxparam (struct tty *tp, struct termios *t)
{
int unit = UNIT (tp->t_dev);
cx_chan_t *c = cxchan[unit];
diff --git a/sys/i386/isa/fd.c b/sys/i386/isa/fd.c
index 4e9c091..e394e13 100644
--- a/sys/i386/isa/fd.c
+++ b/sys/i386/isa/fd.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.74 1995/12/08 23:20:26 phk Exp $
+ * $Id: fd.c,v 1.75 1995/12/09 09:10:12 julian Exp $
*
*/
@@ -200,7 +200,7 @@ fd_goaway(struct kern_devconf *kdc, int force)
#define FD_360in5_25 14
-struct fd_type fd_types[NUMTYPES] =
+static struct fd_type fd_types[NUMTYPES] =
{
{ 21,2,0xFF,0x04,82,3444,1,FDC_500KBPS,2,0x0C,2 }, /* 1.72M in HD 3.5in */
{ 18,2,0xFF,0x1B,82,2952,1,FDC_500KBPS,2,0x6C,1 }, /* 1.48M in HD 3.5in */
@@ -230,7 +230,7 @@ struct fdc_data fdc_data[NFDC];
* Per drive structure. *
* N per controller (DRVS_PER_CTLR) *
\***********************************************************************/
-struct fd_data {
+static struct fd_data {
struct fdc_data *fdc; /* pointer to controller structure */
int fdsu; /* this units number on this controller */
int type; /* Drive type (FD_1440...) */
@@ -360,7 +360,7 @@ static struct cdevsw fd_cdevsw =
seltrue, nommap, fdstrategy, "fd",
&fd_bdevsw, -1 };
-struct isa_device *fdcdevs[NFDC];
+static struct isa_device *fdcdevs[NFDC];
/*
* Provide hw.devconf information.
@@ -393,7 +393,7 @@ fdc_err(fdcu_t fdcu, const char *s)
* # of input bytes, input bytes as ints ...
*/
-int
+static int
fd_cmd(fdcu_t fdcu, int n_out, ...)
{
u_char cmd;
@@ -433,7 +433,7 @@ fd_cmd(fdcu_t fdcu, int n_out, ...)
return 0;
}
-int
+static int
fd_sense_drive_status(fdc_p fdc, int *st3p)
{
int st3;
@@ -448,7 +448,7 @@ fd_sense_drive_status(fdc_p fdc, int *st3p)
return 0;
}
-int
+static int
fd_sense_int(fdc_p fdc, int *st0p, int *cylp)
{
int st0, cyl;
@@ -485,7 +485,7 @@ fd_sense_int(fdc_p fdc, int *st0p, int *cylp)
}
-int
+static int
fd_read_status(fdc_p fdc, int fdsu)
{
int i, ret;
diff --git a/sys/i386/isa/ft.c b/sys/i386/isa/ft.c
index 8d116d5..f9e52b5 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.22 1995/05/30 08:01:41 rgrimes Exp $
+ * $Id: ft.c,v 1.23 1995/11/20 12:41:40 phk Exp $
*
* 01/19/95 ++sg
* Cleaned up recalibrate/seek code at attach time for FreeBSD 2.x.
@@ -145,7 +145,7 @@ enum {
};
/* Tape geometries table */
-QIC_Geom ftgtbl[] = {
+static QIC_Geom ftgtbl[] = {
{ 0, 0, "Unformatted", "Unknown", 0, 0, 0, 0, 0 }, /* XXX */
{ 1, 1, "QIC-40", "205/550", 20, 68, 2176, 128, 21760 },
{ 1, 2, "QIC-40", "307.5/550", 20, 102, 3264, 128, 32640 },
@@ -165,7 +165,7 @@ QIC_Geom ftgtbl[] = {
};
#define NGEOM (sizeof(ftgtbl) / sizeof(QIC_Geom))
-QIC_Geom *ftg = NULL; /* Current tape's geometry */
+static QIC_Geom *ftg = NULL; /* Current tape's geometry */
/*
* things relating to asynchronous commands
@@ -237,7 +237,7 @@ extern struct fdc_data fdc_data[NFDC];
/***********************************************************************\
* Per tape drive structure. *
\***********************************************************************/
-struct ft_data {
+static struct ft_data {
struct fdc_data *fdc; /* pointer to controller structure */
int ftsu; /* this units number on this controller */
int type; /* Drive type (Mountain, Colorado) */
@@ -292,10 +292,7 @@ struct ft_data {
int ftopen(dev_t, int);
int ftclose(dev_t, int);
-void ftstrategy(struct buf *);
int ftioctl(dev_t, int, caddr_t, int, struct proc *);
-int ftdump(dev_t);
-int ftsize(dev_t);
static timeout_t ft_timeout;
static void async_cmd(ftu_t);
static void async_req(ftu_t, int);
@@ -2126,20 +2123,6 @@ ftclose(dev_t dev, int flags)
return(set_fdcmode(dev, FDC_DISK_MODE)); /* Otherwise, close tape */
}
-
-/*
- * Perform strategy on a given buffer (not!). Changed so that the
- * driver will at least return 'Operation not supported'.
- */
-void
-ftstrategy(struct buf *bp)
-{
- bp->b_error = ENODEV;
- bp->b_flags |= B_ERROR;
- biodone(bp);
-}
-
-
/*
* Read or write a segment.
*/
@@ -2603,21 +2586,4 @@ badreq:
return(ENXIO);
}
-/*
- * Not implemented
- */
-int
-ftdump(dev_t dev)
-{
- return(EINVAL);
-}
-
-/*
- * Not implemented
- */
-int
-ftsize(dev_t dev)
-{
- return(EINVAL);
-}
#endif
diff --git a/sys/i386/isa/gpib.c b/sys/i386/isa/gpib.c
index 43388bc..d2a7481 100644
--- a/sys/i386/isa/gpib.c
+++ b/sys/i386/isa/gpib.c
@@ -54,25 +54,24 @@
-int initgpib(void);
-void closegpib(void);
-int sendgpibfifo(unsigned char device,char *data,int count);
-int sendrawgpib(unsigned char device,char *data,int count);
-int sendrawgpibfifo(unsigned char device,char *data,int count);
-int readgpibfifo(unsigned char device,char *data,int count);
-void showregs(void);
-void enableremote(unsigned char device);
-void gotolocal(unsigned char device);
-void menableremote(unsigned char *device);
-void mgotolocal(unsigned char *device);
-void mtrigger(unsigned char *device);
-void trigger(unsigned char device);
-void mdevclear(unsigned char *device);
-void devclear(unsigned char device);
-char spoll(unsigned char device);
-
-int gpprobe(struct isa_device *dvp);
-int gpattach();
+static int initgpib(void);
+static void closegpib(void);
+static int sendgpibfifo(unsigned char device,char *data,int count);
+static int sendrawgpibfifo(unsigned char device,char *data,int count);
+static int readgpibfifo(unsigned char device,char *data,int count);
+#if 0
+static void showregs(void);
+#endif
+static void enableremote(unsigned char device);
+static void gotolocal(unsigned char device);
+static void menableremote(unsigned char *device);
+static void mgotolocal(unsigned char *device);
+static void mtrigger(unsigned char *device);
+static void trigger(unsigned char device);
+static char spoll(unsigned char device);
+
+static int gpprobe(struct isa_device *dvp);
+static int gpattach();
struct isa_driver gpdriver = {gpprobe, gpattach, "gp"};
@@ -108,7 +107,7 @@ static int oldcount;
static char oldbytes[2];
/*Probe routine*/
/*This needs to be changed to be a bit more robust*/
-int
+static int
gpprobe(struct isa_device *dvp)
{
int status;
@@ -130,7 +129,7 @@ else if ((inb(KSR)&0xF7)==0x14) sc->sc_type=1;
* gpattach()
* Attach device and print the type of card to the screen.
*/
-int
+static int
gpattach(isdp)
struct isa_device *isdp;
{
@@ -453,9 +452,10 @@ gpioctl(dev_t dev, int cmd, caddr_t data, int flags, struct proc *p)
+#if 0
/*Just in case you want a dump of the registers...*/
-void showregs() {
+static void showregs() {
printf ("NAT4882:\n");
printf ("ISR1=%X\t",inb(ISR1));
printf ("ISR2=%X\t",inb(ISR2));
@@ -482,11 +482,13 @@ void showregs() {
}
+#endif
/*Set up the NAT4882 and TURBO488 registers */
/*This will be nonsense to you unless you have a data sheet from
National Instruments. They should give you one if you call them*/
-int initgpib() {
+static int
+initgpib() {
outb(CMDR,0x20);
outb(CFG,0x16);
outb(IMR3,0);
@@ -535,9 +537,11 @@ return(0);
/*This is kind of Brute force.. But it works*/
-void closegpib() {
+static void
+closegpib()
+{
outb(AUXMR,chip_reset);
- }
+}
/*GPIB ROUTINES:
These will also make little sense unless you have a data sheet.
@@ -553,7 +557,8 @@ void closegpib() {
forces the GPIB line true, no matter what the fancy circuitry of the
NAT4882 wants to do with it*/
-void enableremote(unsigned char device)
+static void
+enableremote(unsigned char device)
{
int status;
@@ -586,7 +591,8 @@ status=EWOULDBLOCK;
after enableremote is called, and is reset only on a close of the
gpib device */
-void gotolocal(unsigned char device)
+static void
+gotolocal(unsigned char device)
{ int status;
status=EWOULDBLOCK;
@@ -621,7 +627,8 @@ outb(AUXMR,0x5E); /*Clear SYNC*/
}
-void menableremote(unsigned char *device)
+static void
+menableremote(unsigned char *device)
{
int status, counter = 0;
@@ -656,7 +663,8 @@ status=EWOULDBLOCK;
}
-void mgotolocal(unsigned char *device)
+static void
+mgotolocal(unsigned char *device)
{ int status;
int counter=0;
status=EWOULDBLOCK;
@@ -693,7 +701,8 @@ status=EWOULDBLOCK;
/*Trigger a device. What happens depends on how the device is
configured. */
-void trigger(unsigned char device)
+static void
+trigger(unsigned char device)
{ int status;
status=EWOULDBLOCK;
@@ -728,7 +737,8 @@ status=EWOULDBLOCK;
/*Trigger multiple devices by addressing them all to listen, and then
sending GET*/
-void mtrigger(unsigned char *device)
+static void
+mtrigger(unsigned char *device)
{ int status=EWOULDBLOCK;
int counter=0;
if(device[0]<32){
@@ -763,132 +773,9 @@ void mtrigger(unsigned char *device)
}
}
-
-void mdevclear(unsigned char *device)
-{ int status=EWOULDBLOCK;
- int counter=0;
-
- if (device[counter]<32) do {
- if (!(inb(ISR2)&0x08)) do {
- status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
- }
- while (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK); /*Wait to send next cmd*/
- outb(CDOR,(device[counter]&31)+32);
- counter++;
- } while (device[counter]<32);
-
- if (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK) do {
- status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
- }
- while (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK); /*Wait to send next cmd*/
- outb(AUXMR,0x5E); /*Clear SYNC*/
- outb (CDOR,0x14); /*send DCL*/
-
-
- if (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK) do {
- status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
- }
- while (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK); /*Wait to send next cmd*/
-
- outb(AUXMR,0x5E);
- outb (CDOR,63);/*unaddress device*/
-
-
- if (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK) do {
- status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
- }
- while (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK); /*Wait to send next cmd*/
- outb(AUXMR,0x5E); /*Clear SYNC*/
- outb (CDOR,63);
- if (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK) do {
- status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
- }
- while (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK); /*Wait to send next cmd*/
-
- }
-void devclear(unsigned char device)
-{ int status=EWOULDBLOCK;
-
-
- if (device<32) {
- if (!(inb(ISR2)&0x08)) do {
- status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
- }
- while (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK); /*Wait to send next cmd*/
- outb(CDOR,(device&31)+32);
-
- }
-
- if (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK) do {
- status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
- }
- while (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK); /*Wait to send next cmd*/
- outb(AUXMR,0x5E); /*Clear SYNC*/
- outb (CDOR,0x14); /*send DCL*/
-
-
- if (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK) do {
- status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
- }
- while (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK); /*Wait to send next cmd*/
-
- outb(AUXMR,0x5E);
- outb (CDOR,63);/*unaddress device*/
- if (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK) do {
- status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
- }
- while (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK); /*Wait to send next cmd*/
-
- outb(AUXMR,0x5E); /*Clear SYNC*/
- outb (CDOR,63);
- if (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK) do {
- status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",1);
- }
- while (!(inb(ISR2)&0x08)&&status==EWOULDBLOCK); /*Wait to send next cmd*/
-
- }
/*This is not used now, but it should work with NI's 8 bit gpib board
since it does not use the TURBO488 registers at all */
-int sendrawgpib(unsigned char device,char *data,int count)
- {
- int status;
- int counter;
- int counter2;
- int done;
-
- counter=0;
-
-
-
- do {
-done=EWOULDBLOCK;
-counter2=5;
-do{
- status=inb(ISR1);
- if (!(status&2)&&counter2){ DELAY(4); counter2--;}
- if (!(status&2)&&!counter2) done=tsleep((caddr_t)&gpib_sc, GPIBPRI,"gpibpoll",1);
- }
- while (!(status&2)&&(done==EWOULDBLOCK));
- if (done!=EWOULDBLOCK) return(done);
-
- if ((data[counter+1]==0)||(count+1)==0){
-
- outb(AUXMR,seoi); /*Set EOI for the last byte*/
- outb(AUXMR,0x5E); /*Clear SYNC*/
- outb(CDOR,data[counter]);
- }
- else outb(CDOR,data[counter]);
- counter++;
- count--;
- }
- while((data[counter-1]!=0)&&(count+1)!=0);
- do
- status=inb(ISR1);
- while (!(status&2)&&tsleep((caddr_t)&gpib_sc, GPIBPRI,"gpibpoll",1)==EWOULDBLOCK);
-return(counter-1);
-
-}
/*Send data through the TURBO488 FIFOS to a device that is already
addressed to listen. This is used by the write call when someone is
@@ -896,7 +783,8 @@ return(counter-1);
/*The last byte of each write is held off until either the next
write or close, so it can be sent with EOI set*/
-int sendrawgpibfifo(unsigned char device,char *data,int count)
+static int
+sendrawgpibfifo(unsigned char device,char *data,int count)
{
int status;
int counter;
@@ -940,12 +828,8 @@ status=EWOULDBLOCK;
}
-
-
-
-
-
-int sendgpibfifo(unsigned char device,char *data,int count)
+static int
+sendgpibfifo(unsigned char device,char *data,int count)
{
int status;
int counter;
@@ -1094,7 +978,8 @@ outb(AUXMR,0x5E); /*Clear SYNC*/
}
-int readgpibfifo(unsigned char device,char *data,int count)
+static int
+readgpibfifo(unsigned char device,char *data,int count)
{
int status;
int status2 = 0;
@@ -1200,7 +1085,8 @@ outb(AUXMR,0x5E); /*Clear SYNC*/
/* Return the status byte from device */
-char spoll(unsigned char device)
+static char
+spoll(unsigned char device)
{
int status=EWOULDBLOCK;
unsigned int statusbyte;
diff --git a/sys/i386/isa/if_ar.c b/sys/i386/isa/if_ar.c
index 10c923a..114b181 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.1.1.1 1995/11/21 02:32:04 peter Exp $
+ * $Id: if_ar.c,v 1.2 1995/12/05 02:00:33 davidg Exp $
*/
/*
@@ -145,10 +145,10 @@ struct ar_softc {
struct kern_devconf kdc;
};
-struct ar_softc *ar_sc_ind[NAR*NPORT];
+static struct ar_softc *ar_sc_ind[NAR*NPORT];
-int arprobe(struct isa_device *id);
-int arattach(struct isa_device *id);
+static int arprobe(struct isa_device *id);
+static int arattach(struct isa_device *id);
/*
* This translate from irq numbers to
@@ -199,9 +199,9 @@ static struct kern_devconf kdc_arc_template = {
DC_CLS_NETIF
};
-void arstart(struct ifnet *ifp);
-int arioctl(struct ifnet *ifp, int cmd, caddr_t data);
-void arwatchdog(struct ifnet *ifp);
+static void arstart(struct ifnet *ifp);
+static int arioctl(struct ifnet *ifp, int cmd, caddr_t data);
+static void arwatchdog(struct ifnet *ifp);
static void ar_up(struct ar_softc *sc);
static void ar_down(struct ar_softc *sc);
@@ -244,7 +244,8 @@ static inline void arc_registerdev(struct isa_device *dvp)
* Probe to see if it is there.
* Get its information and fill it in.
*/
-int arprobe(struct isa_device *id)
+static int
+arprobe(struct isa_device *id)
{
struct ar_hardc *hc = &ar_hardc[id->id_unit];
u_int tmp;
@@ -337,7 +338,8 @@ int arprobe(struct isa_device *id)
* Fill in the info for each port.
* Attach each port to sppp and bpf.
*/
-int arattach(struct isa_device *id)
+static int
+arattach(struct isa_device *id)
{
struct ar_hardc *hc = &ar_hardc[id->id_unit];
struct ar_softc *sc;
@@ -431,7 +433,6 @@ void arintr(int unit)
sca_regs *sca = hc->sca;
u_char isr0, isr1, isr2, arisr;
int scano;
- static int intno = 0;
arisr = inb(hc->iobase + AR_ISTAT);
@@ -497,7 +498,8 @@ void arintr(int unit)
* that clears that should ensure that the transmitter and it's DMA is
* in a "good" idle state.
*/
-void arstart(struct ifnet *ifp)
+static void
+arstart(struct ifnet *ifp)
{
struct ar_softc *sc = ARUNIT2SC(ifp->if_unit);
int i, len, tlen;
@@ -612,7 +614,8 @@ void arstart(struct ifnet *ifp)
ARC_SET_OFF(sc->hc->iobase);
}
-int arioctl(struct ifnet *ifp, int cmd, caddr_t data)
+static int
+arioctl(struct ifnet *ifp, int cmd, caddr_t data)
{
int s, error;
int was_up, should_be_up;
@@ -664,7 +667,8 @@ int arioctl(struct ifnet *ifp, int cmd, caddr_t data)
/*
* This is to catch lost tx interrupts.
*/
-void arwatchdog(struct ifnet *ifp)
+static void
+arwatchdog(struct ifnet *ifp)
{
struct ar_softc *sc = ARUNIT2SC(ifp->if_unit);
@@ -1078,7 +1082,8 @@ void ar_init_tx_dmac(struct ar_softc *sc)
* Return the length and status of the packet.
* Return nonzero if there is a packet available.
*/
-int ar_packet_avail(struct ar_softc *sc,
+static int
+ar_packet_avail(struct ar_softc *sc,
int *len,
u_char *rxstat)
{
@@ -1120,7 +1125,8 @@ int ar_packet_avail(struct ar_softc *sc,
* Take into account that buffers wrap and that a packet may
* be larger than a buffer.
*/
-void ar_copy_rxbuf(struct mbuf *m,
+static void
+ar_copy_rxbuf(struct mbuf *m,
struct ar_softc *sc,
int len)
{
@@ -1164,7 +1170,8 @@ void ar_copy_rxbuf(struct mbuf *m,
/*
* Just eat a packet. Update pointers to point to the next packet.
*/
-void ar_eat_packet(struct ar_softc *sc)
+static void
+ar_eat_packet(struct ar_softc *sc)
{
sca_descriptor *rxdesc;
sca_descriptor *endp;
@@ -1203,7 +1210,8 @@ void ar_eat_packet(struct ar_softc *sc)
* While there is packets available in the rx buffer, read them out
* into mbufs and ship them off.
*/
-void ar_get_packets(struct ar_softc *sc)
+static void
+ar_get_packets(struct ar_softc *sc)
{
sca_descriptor *rxdesc;
struct mbuf *m = NULL;
diff --git a/sys/i386/isa/if_cx.c b/sys/i386/isa/if_cx.c
index 8ea6810..cedd6e8 100644
--- a/sys/i386/isa/if_cx.c
+++ b/sys/i386/isa/if_cx.c
@@ -19,7 +19,6 @@
#undef DEBUG
#include "cx.h"
-#if NCX > 0
#include "bpfilter.h"
#include <sys/param.h>
@@ -39,55 +38,25 @@
#include <net/bpfdesc.h>
#endif
-#ifdef __FreeBSD__
-# include <i386/isa/isa_device.h>
-# if __FreeBSD__ < 2
-# include <machine/pio.h>
-# else
-# ifdef DEVFS
+#include <i386/isa/isa_device.h>
+#ifdef DEVFS
extern struct cdevsw cx_cdevsw;
-# include <sys/devfsext.h>
-# endif /*DEVFS*/
-# include <sys/devconf.h>
-# endif
-# define watchdog_func_t void(*)(struct ifnet *)
-# define start_func_t void(*)(struct ifnet*)
-#endif
-
-#ifdef __bsdi__
-# if INET
-# include <netinet/in.h>
-# include <netinet/in_systm.h>
-# include <netinet/ip.h>
-# endif
-# include <sys/device.h>
-# include <i386/isa/isavar.h>
-# include <i386/isa/icu.h>
-# include <machine/inline.h>
-# include <net/if_slvar.h>
-# include <net/if_p2p.h>
-# define timeout_func_t void(*)()
-# define init_func_t int(*)()
-# define watchdog_func_t int(*)()
-# define start_func_t int(*)()
-struct cxsoftc {
- struct device dev; /* base device */
- struct isadev isadev; /* ISA device */
- struct intrhand intr; /* interrupt vectoring */
-};
-#endif
+#include <sys/devfsext.h>
+#endif /*DEVFS*/
+#include <sys/devconf.h>
+#define watchdog_func_t void(*)(struct ifnet *)
+#define start_func_t void(*)(struct ifnet*)
#include <net/if_sppp.h>
#include <machine/cronyx.h>
#include <i386/isa/cxreg.h>
-extern int cxprobe __P((struct isa_device *id));
-extern int cxattach __P((struct isa_device *id));
-extern void cxput __P((cx_chan_t *c, char b));
-extern void cxsend __P((cx_chan_t *c));
-extern void cxrinth __P((cx_chan_t *c));
-extern int cxtinth __P((cx_chan_t *c));
-extern void cxswitch __P((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));
+static void cxsend __P((cx_chan_t *c));
+static void cxrinth __P((cx_chan_t *c));
+static int cxtinth __P((cx_chan_t *c));
#ifdef DEBUG
# define print(s) printf s
@@ -105,28 +74,22 @@ extern void cxswitch __P((cx_chan_t *c, cx_soft_opt_t new));
* Our ifnet pointer holds the buffer large enough to contain
* any of sppp and p2p structures.
*/
-#ifdef __bsdi__
-# define SPPPSZ (sizeof (struct sppp))
-# define P2PSZ (sizeof (struct p2pcom))
-# define IFSTRUCTSZ (SPPPSZ>P2PSZ ? SPPPSZ : P2PSZ)
-#else
-# define IFSTRUCTSZ (sizeof (struct sppp))
-#endif
+#define IFSTRUCTSZ (sizeof (struct sppp))
#define IFNETSZ (sizeof (struct ifnet))
-int cxsioctl (struct ifnet *ifp, int cmd, caddr_t data);
-void cxstart (struct ifnet *ifp);
-void cxwatchdog (struct ifnet *ifp);
-void cxinput (cx_chan_t *c, void *buf, unsigned len);
-int cxrinta (cx_chan_t *c);
-void cxtinta (cx_chan_t *c);
-void cxmint (cx_chan_t *c);
-void cxtimeout (caddr_t a);
-void cxdown (cx_chan_t *c);
-void cxup (cx_chan_t *c);
+static int cxsioctl (struct ifnet *ifp, int cmd, caddr_t data);
+static void cxstart (struct ifnet *ifp);
+static void cxwatchdog (struct ifnet *ifp);
+static void cxinput (cx_chan_t *c, void *buf, unsigned len);
+extern int cxrinta (cx_chan_t *c);
+extern void cxtinta (cx_chan_t *c);
+extern void cxmint (cx_chan_t *c);
+extern void cxtimeout (caddr_t a);
+static void cxdown (cx_chan_t *c);
+static void cxup (cx_chan_t *c);
-cx_board_t cxboard [NCX]; /* adapter state structures */
-cx_chan_t *cxchan [NCX*NCHAN]; /* unit to channel struct pointer */
+cx_board_t cxboard [NCX]; /* adapter state structures */
+cx_chan_t *cxchan [NCX*NCHAN]; /* unit to channel struct pointer */
static unsigned short irq_valid_values [] = { 3, 5, 7, 10, 11, 12, 15, 0 };
static unsigned short drq_valid_values [] = { 5, 6, 7, 0 };
@@ -134,14 +97,12 @@ static unsigned short port_valid_values [] = {
0x240, 0x260, 0x280, 0x300, 0x320, 0x380, 0x3a0, 0,
};
-#if __FreeBSD__ >= 2
static char cxdescription [80];
struct kern_devconf kdc_cx [NCX] = { {
0, 0, 0, "cx", 0, { MDDT_ISA, 0, "net" },
isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, &kdc_isa0, 0,
DC_IDLE, cxdescription, DC_CLS_SERIAL
} };
-#endif
/*
* Check that the value is contained in the list of correct values.
@@ -221,34 +182,14 @@ static struct mbuf *makembuf (void *buf, unsigned len)
/*
* Test the presence of the adapter on the given i/o port.
*/
-#ifdef __FreeBSD__
-int cxprobe (struct isa_device *id)
+static int
+cxprobe (struct isa_device *id)
{
int unit = id->id_unit;
int iobase = id->id_iobase;
int irq = id->id_irq;
int drq = id->id_drq;
int irqnum;
-#endif
-#ifdef __bsdi__
-int cxprobe (struct device *parent, struct cfdata *cf, void *aux)
-{
- int unit = cf->cf_unit;
- int iobase = ((struct isa_attach_args*)aux)->ia_iobase;
- int irq = ((struct isa_attach_args*)aux)->ia_irq;
- int drq = ((struct isa_attach_args*)aux)->ia_drq;
- int irqnum, i;
-
- for (i=0; i<NCX; ++i)
- if (i != unit && cxboard[i].port == iobase)
- return (0);
- if (irq == IRQUNK) {
- irq = isa_irqalloc (IRQ3|IRQ5|IRQ7|IRQ10|IRQ11|IRQ12|IRQ15);
- if (! irq)
- return (0);
- ((struct isa_attach_args*)aux)->ia_irq = irq;
- }
-#endif
irqnum = ffs (irq) - 1;
print (("cx%d: probe iobase=0x%x irq=%d drq=%d\n",
@@ -274,24 +215,13 @@ int cxprobe (struct device *parent, struct cfdata *cf, void *aux)
/*
* The adapter is present, initialize the driver structures.
*/
-#ifdef __FreeBSD__
-int cxattach (struct isa_device *id)
+static int
+cxattach (struct isa_device *id)
{
int unit = id->id_unit;
int iobase = id->id_iobase;
int irq = id->id_irq;
int drq = id->id_drq;
-#endif
-#ifdef __bsdi__
-void cxattach (struct device *parent, struct device *self, void *aux)
-{
- int unit = self->dv_unit;
- int iobase = ((struct isa_attach_args*)aux)->ia_iobase;
- int irq = ((struct isa_attach_args*)aux)->ia_irq;
- int drq = ((struct isa_attach_args*)aux)->ia_drq;
- struct cxsoftc *sc = (struct cxsoftc*) self;
- void cxintr (cx_board_t *b);
-#endif
cx_board_t *b = cxboard + unit;
int i;
@@ -359,7 +289,6 @@ void cxattach (struct device *parent, struct device *self, void *aux)
if (unit == 0)
timeout ((timeout_func_t) cxtimeout, 0, hz*5);
-#if __FreeBSD__ >= 2
if (unit != 0)
kdc_cx[unit] = kdc_cx[0];
kdc_cx[unit].kdc_unit = unit;
@@ -367,8 +296,6 @@ void cxattach (struct device *parent, struct device *self, void *aux)
sprintf (cxdescription, "Cronyx-Sigma-%s sync/async serial adapter",
b->name);
dev_attach (&kdc_cx[unit]);
-#endif
-#ifdef __FreeBSD__
printf ("cx%d: <Cronyx-%s>\n", unit, b->name);
#ifdef DEVFS
{
@@ -379,27 +306,15 @@ void cxattach (struct device *parent, struct device *self, void *aux)
}
#endif
return (1);
-#endif
-#ifdef __bsdi__
- printf (": <Cronyx-%s>\n", b->name);
- isa_establish (&sc->isadev, &sc->dev);
- sc->intr.ih_fun = (int(*)()) cxintr;
- sc->intr.ih_arg = (void*) b;
- intr_establish (irq, &sc->intr, DV_NET);
-#endif
}
-#ifdef __FreeBSD__
struct isa_driver cxdriver = { cxprobe, cxattach, "cx" };
-#endif
-#ifdef __bsdi__
-struct cfdriver cxcd = { 0, "cx", cxprobe, cxattach, sizeof (struct cxsoftc) };
-#endif
/*
* Process an ioctl request.
*/
-int cxsioctl (struct ifnet *ifp, int cmd, caddr_t data)
+static int
+cxsioctl (struct ifnet *ifp, int cmd, caddr_t data)
{
cx_chan_t *q, *c = cxchan[ifp->if_unit];
int error, s, was_up, should_be_up;
@@ -417,11 +332,6 @@ int cxsioctl (struct ifnet *ifp, int cmd, caddr_t data)
return (EBUSY);
was_up = (ifp->if_flags & IFF_RUNNING) != 0;
-#ifdef __bsdi__
- if (c->sopt.ext)
- error = p2p_ioctl (ifp, cmd, data);
- else
-#endif
error = sppp_ioctl (ifp, cmd, data);
if (error)
return (error);
@@ -476,7 +386,8 @@ int cxsioctl (struct ifnet *ifp, int cmd, caddr_t data)
/*
* Stop the interface. Called on splimp().
*/
-void cxdown (cx_chan_t *c)
+static void
+cxdown (cx_chan_t *c)
{
unsigned short port = c->chip->port;
@@ -495,18 +406,16 @@ void cxdown (cx_chan_t *c)
/*
* Start the interface. Called on splimp().
*/
-void cxup (cx_chan_t *c)
+static void
+cxup (cx_chan_t *c)
{
unsigned short port = c->chip->port;
/* The interface is up, start it */
- print (("cx%d.%d: cxup\n", c->board->num, c->num));
+ print (("cx%d.%d: cxup\n", c->board->num, c->num));
-#if __FreeBSD__ >= 2
- /* Mark the board busy on the first startup.
- * Never goes idle. */
kdc_cx[c->board->num].kdc_state = DC_BUSY;
-#endif
+
/* Initialize channel, enable receiver and transmitter */
cx_cmd (port, CCR_INITCH | CCR_ENRX | CCR_ENTX);
/* Repeat the command, to avoid the rev.H bug */
@@ -529,7 +438,8 @@ void cxup (cx_chan_t *c)
/*
* Fill transmitter buffer with data.
*/
-void cxput (cx_chan_t *c, char b)
+static void
+cxput (cx_chan_t *c, char b)
{
struct mbuf *m;
unsigned char *buf;
@@ -556,17 +466,6 @@ void cxput (cx_chan_t *c, char b)
}
/* Get the packet to send. */
-#ifdef __bsdi__
- if (c->sopt.ext) {
- struct p2pcom *p = (struct p2pcom*) c->master;
- int s = splimp ();
-
- IF_DEQUEUE (&p->p2p_isnd, m)
- if (! m)
- IF_DEQUEUE (&c->master->if_snd, m)
- splx (s);
- } else
-#endif
m = sppp_dequeue (c->master);
if (! m)
return;
@@ -607,7 +506,8 @@ ret:
* off of the interface queue, and copy it to the interface
* before starting the output.
*/
-void cxsend (cx_chan_t *c)
+static void
+cxsend (cx_chan_t *c)
{
unsigned short port = c->chip->port;
@@ -649,7 +549,8 @@ void cxsend (cx_chan_t *c)
* Start output on the (master) interface and all slave interfaces.
* Always called on splimp().
*/
-void cxstart (struct ifnet *ifp)
+static void
+cxstart (struct ifnet *ifp)
{
cx_chan_t *q, *c = cxchan[ifp->if_unit];
@@ -672,7 +573,8 @@ void cxstart (struct ifnet *ifp)
* Recover after lost transmit interrupts.
* Always called on splimp().
*/
-void cxwatchdog (struct ifnet *ifp)
+static void
+cxwatchdog (struct ifnet *ifp)
{
cx_chan_t *q, *c = cxchan[ifp->if_unit];
@@ -696,7 +598,8 @@ void cxwatchdog (struct ifnet *ifp)
* Handle receive interrupts, including receive errors and
* receive timeout interrupt.
*/
-void cxrinth (cx_chan_t *c)
+static void
+cxrinth (cx_chan_t *c)
{
unsigned short port = c->chip->port;
unsigned short len, risr = inw (RISR(port));
@@ -765,7 +668,8 @@ void cxrinth (cx_chan_t *c)
/*
* Handle transmit interrupt.
*/
-int cxtinth (cx_chan_t *c)
+static int
+cxtinth (cx_chan_t *c)
{
unsigned short port = c->chip->port;
unsigned char tisr = inb (TISR(port));
@@ -803,15 +707,10 @@ int cxtinth (cx_chan_t *c)
return (teoir);
}
-#ifdef __FreeBSD__
-void cxintr (int bnum)
+void
+cxintr (int bnum)
{
cx_board_t *b = cxboard + bnum;
-#endif
-#ifdef __bsdi__
-void cxintr (cx_board_t *b)
-{
-#endif
while (! (inw (BSR(b->port)) & BSR_NOINTR)) {
/* Acknowledge the interrupt to enter the interrupt context. */
/* Read the local interrupt vector register. */
@@ -891,7 +790,8 @@ void cxintr (cx_board_t *b)
/*
* Process the received packet.
*/
-void cxinput (cx_chan_t *c, void *buf, unsigned len)
+static void
+cxinput (cx_chan_t *c, void *buf, unsigned len)
{
/* Make an mbuf. */
struct mbuf *m = makembuf (buf, len);
@@ -921,30 +821,12 @@ void cxinput (cx_chan_t *c, void *buf, unsigned len)
c->master->if_ibytes -= len + 3;
c->ifp->if_ibytes += len + 3;
-#ifdef __bsdi__
- if (c->sopt.ext) {
- struct p2pcom *p = (struct p2pcom*) c->master;
- (*p->p2p_input) (p, m);
- } else
-#endif
sppp_input (c->master, m);
}
void cxswitch (cx_chan_t *c, cx_soft_opt_t new)
{
-#ifdef __bsdi__
- if (new.ext && ! c->sopt.ext) {
- /* Switch to external ppp implementation (BSDI) */
- sppp_detach (c->ifp);
- bzero ((void*) c->ifp + IFNETSZ, IFSTRUCTSZ-IFNETSZ);
- } else if (! new.ext && c->sopt.ext) {
- /* Switch to built-in ppp implementation */
- bzero ((void*) c->ifp + IFNETSZ, IFSTRUCTSZ-IFNETSZ);
- sppp_attach (c->ifp);
- }
-#else
new.ext = 0;
-#endif
if (! new.ext) {
struct sppp *sp = (struct sppp*) c->ifp;
@@ -959,6 +841,3 @@ void cxswitch (cx_chan_t *c, cx_soft_opt_t new)
}
c->sopt = new;
}
-#endif /* NCX */
-
-
diff --git a/sys/i386/isa/if_ed.c b/sys/i386/isa/if_ed.c
index 9dee324..b3d8f03 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.88 1995/12/05 02:00:43 davidg Exp $
+ * $Id: if_ed.c,v 1.89 1995/12/05 13:01:33 davidg Exp $
*/
/*
@@ -92,7 +92,7 @@
/*
* ed_softc: per line info and status
*/
-struct ed_softc {
+static struct ed_softc {
struct arpcom arpcom; /* ethernet common */
char *type_str; /* pointer to type string */
diff --git a/sys/i386/isa/if_eg.c b/sys/i386/isa/if_eg.c
index ff20a24..767c67f 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.7 1995/11/04 17:07:22 bde Exp $
+ * $Id: if_eg.c,v 1.8 1995/12/05 02:00:47 davidg Exp $
*/
/* To do:
@@ -98,7 +98,7 @@
/*
* Ethernet software status per interface.
*/
-struct eg_softc {
+static struct eg_softc {
/* struct device sc_dev; */
/* struct intrhand sc_ih; */
struct arpcom sc_arpcom; /* Ethernet common part */
@@ -116,8 +116,8 @@ struct eg_softc {
struct kern_devconf kdc; /* kernel configuration database */
} eg_softc[NEG];
-int egprobe (struct isa_device *);
-int egattach (struct isa_device *);
+static int egprobe (struct isa_device *);
+static int egattach (struct isa_device *);
struct isa_driver egdriver = {
egprobe, egattach, "eg", 0
@@ -149,7 +149,6 @@ static void eginit __P((struct eg_softc *));
static int egioctl (struct ifnet *, int, caddr_t);
static void egrecv(struct eg_softc *);
static void egstart(struct ifnet *);
-static void egreset(int);
static inline void egread __P((struct eg_softc *, caddr_t, int));
static void egstop __P((struct eg_softc *));
@@ -305,7 +304,7 @@ egreadPCB(sc)
* Real stuff
*/
-int
+static int
egprobe(struct isa_device * id)
{
struct eg_softc *sc = &eg_softc[id->id_unit];
@@ -364,7 +363,7 @@ egprobe(struct isa_device * id)
return 8;
}
-int
+static int
egattach (struct isa_device *id)
{
struct eg_softc *sc = &eg_softc[id->id_unit];
@@ -808,21 +807,6 @@ egioctl(ifp, command, data)
}
static void
-egreset(int unit)
-{
- struct eg_softc *sc = &eg_softc[unit];
- int s;
-
- log(LOG_ERR, "eg%d: device timeout\n", unit);
- sc->sc_arpcom.ac_if.if_oerrors++;
-
- s = splimp();
- egstop(sc);
- eginit(sc);
- splx(s);
-}
-
-static void
egstop(sc)
register struct eg_softc *sc;
{
diff --git a/sys/i386/isa/if_el.c b/sys/i386/isa/if_el.c
index 12f71d2..7a92026 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.18 1995/11/04 17:07:24 bde Exp $
+ * $Id: if_el.c,v 1.19 1995/12/05 02:00:49 davidg Exp $
*/
/* Except of course for the portions of code lifted from other FreeBSD
* drivers (mainly elread, elget and el_ioctl)
@@ -20,7 +20,6 @@
* - Does not currently support multicasts
*/
#include "el.h"
-#if NEL > 0
#include "bpfilter.h"
#include <sys/param.h>
@@ -77,7 +76,7 @@
#endif
/* el_softc: per line info and status */
-struct el_softc {
+static struct el_softc {
struct arpcom arpcom; /* Ethernet common */
u_short el_base; /* Base I/O addr */
caddr_t bpf; /* BPF magic cookie */
@@ -85,13 +84,13 @@ struct el_softc {
} el_softc[NEL];
/* Prototypes */
-int el_attach(struct isa_device *);
-void el_init(int);
-int el_ioctl(struct ifnet *,int,caddr_t);
-int el_probe(struct isa_device *);
-void el_start(struct ifnet *);
-void el_reset(int);
-void el_watchdog(struct ifnet *);
+static int el_attach(struct isa_device *);
+static void el_init(int);
+static int el_ioctl(struct ifnet *,int,caddr_t);
+static int el_probe(struct isa_device *);
+static void el_start(struct ifnet *);
+static void el_reset(int);
+static void el_watchdog(struct ifnet *);
static void el_stop(int);
static int el_xmit(struct el_softc *,int);
@@ -126,7 +125,8 @@ el_registerdev(struct isa_device *id)
}
/* Probe routine. See if the card is there and at the right place. */
-int el_probe(struct isa_device *idev)
+static int
+el_probe(struct isa_device *idev)
{
struct el_softc *sc;
u_short base; /* Just for convenience */
@@ -186,7 +186,8 @@ int el_probe(struct isa_device *idev)
* this is called, we know that the card exists at the given I/O address.
* We still assume that the IRQ given is correct.
*/
-int el_attach(struct isa_device *idev)
+static int
+el_attach(struct isa_device *idev)
{
struct el_softc *sc;
struct ifnet *ifp;
@@ -250,7 +251,8 @@ int el_attach(struct isa_device *idev)
}
/* This routine resets the interface. */
-void el_reset(int unit)
+static void
+el_reset(int unit)
{
int s;
@@ -292,7 +294,8 @@ static inline void el_hardreset(int unit)
}
/* Initialize interface. */
-void el_init(int unit)
+static void
+el_init(int unit)
{
struct el_softc *sc;
struct ifnet *ifp;
@@ -344,7 +347,8 @@ void el_init(int unit)
* them, giving the receiver a chance between datagrams. Call only
* from splimp or interrupt level!
*/
-void el_start(struct ifnet *ifp)
+static void
+el_start(struct ifnet *ifp)
{
struct el_softc *sc;
u_short base;
@@ -687,7 +691,7 @@ elget(buf, totlen, off0, ifp)
* Process an ioctl request. This code needs some work - it looks
* pretty ugly.
*/
-int
+static int
el_ioctl(ifp, command, data)
register struct ifnet *ifp;
int command;
@@ -817,10 +821,10 @@ el_ioctl(ifp, command, data)
}
/* Device timeout routine */
-void el_watchdog(struct ifnet *ifp)
+static void
+el_watchdog(struct ifnet *ifp)
{
log(LOG_ERR,"el%d: device timeout\n",ifp->if_unit);
ifp->if_oerrors++;
el_reset(ifp->if_unit);
}
-#endif
diff --git a/sys/i386/isa/if_ep.c b/sys/i386/isa/if_ep.c
index 54536f6..8df642f 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.34 1995/11/04 17:07:26 bde Exp $
+ * $Id: if_ep.c,v 1.35 1995/12/05 02:00:52 davidg Exp $
*
* Promiscuous mode added and interrupt logic slightly changed
* to reduce the number of adapter failures. Transceiver select
@@ -112,17 +112,17 @@ static int epioctl __P((struct ifnet * ifp, int, caddr_t));
static void epmbuffill __P((caddr_t, int));
static void epmbufempty __P((struct ep_softc *));
-void epinit __P((int));
-void epread __P((struct ep_softc *));
+static void epinit __P((int));
+static void epread __P((struct ep_softc *));
void epreset __P((int));
-void epstart __P((struct ifnet *));
-void epstop __P((int));
-void epwatchdog __P((struct ifnet *));
+static void epstart __P((struct ifnet *));
+static void epstop __P((int));
+static void epwatchdog __P((struct ifnet *));
static int send_ID_sequence __P((int));
static int get_eeprom_data __P((int, int));
-struct ep_softc ep_softc[NEP];
+static struct ep_softc ep_softc[NEP];
#define ep_ftst(f) (sc->stat&(f))
#define ep_fset(f) (sc->stat|=(f))
@@ -156,9 +156,9 @@ ep_registerdev(struct isa_device *id)
dev_attach(&kdc_ep[id->id_unit]);
}
-int ep_current_tag = EP_LAST_TAG + 1;
+static int ep_current_tag = EP_LAST_TAG + 1;
-struct {
+static struct {
int epb_addr; /* address of this board */
char epb_used; /* was this entry already used for configuring ? */
}
@@ -488,7 +488,7 @@ epattach(is)
* The order in here seems important. Otherwise we may not receive
* interrupts. ?!
*/
-void
+static void
epinit(unit)
int unit;
{
@@ -648,7 +648,7 @@ epinit(unit)
static const char padmap[] = {0, 3, 2, 1};
-void
+static void
epstart(ifp)
struct ifnet *ifp;
{
@@ -872,7 +872,7 @@ rescan:
splx(x);
}
-void
+static void
epread(sc)
register struct ep_softc *sc;
{
@@ -1243,7 +1243,7 @@ epioctl(ifp, cmd, data)
return (error);
}
-void
+static void
epwatchdog(ifp)
struct ifnet *ifp;
{
@@ -1259,7 +1259,7 @@ epwatchdog(ifp)
epintr(ifp->if_unit);
}
-void
+static void
epstop(unit)
int unit;
{
diff --git a/sys/i386/isa/if_fe.c b/sys/i386/isa/if_fe.c
index a366f05..b043a6e 100644
--- a/sys/i386/isa/if_fe.c
+++ b/sys/i386/isa/if_fe.c
@@ -191,7 +191,7 @@ static struct fe_filter const fe_filter_all = { FE_FILTER_ALL };
/*
* fe_softc: per line info and status
*/
-struct fe_softc {
+static struct fe_softc {
/* Used by "common" codes. */
struct arpcom arpcom; /* ethernet common */
@@ -246,13 +246,13 @@ struct fe_softc {
#define IFNET2SOFTC(P) ( ( struct fe_softc * )(P) )
/* Standard driver entry points. These can be static. */
-int fe_probe ( struct isa_device * );
-int fe_attach ( struct isa_device * );
-void fe_init ( int );
-int fe_ioctl ( struct ifnet *, int, caddr_t );
-void fe_start ( struct ifnet * );
-void fe_reset ( int );
-void fe_watchdog ( struct ifnet * );
+static int fe_probe ( struct isa_device * );
+static int fe_attach ( struct isa_device * );
+static void fe_init ( int );
+static int fe_ioctl ( struct ifnet *, int, caddr_t );
+static void fe_start ( struct ifnet * );
+static void fe_reset ( int );
+static void fe_watchdog ( struct ifnet * );
/* Local functions. Order of declaration is confused. FIXME. */
static int fe_probe_fmv ( struct isa_device *, struct fe_softc * );
@@ -385,7 +385,7 @@ static struct fe_probe_list const fe_probe_list [] =
* or number of i/o addresses used (if found)
*/
-int
+static int
fe_probe ( struct isa_device * isa_dev )
{
struct fe_softc * sc, * u;
@@ -1052,7 +1052,7 @@ fe_init_mbh ( struct fe_softc * sc )
/*
* Install interface into kernel networking data structures
*/
-int
+static int
fe_attach ( struct isa_device *isa_dev )
{
struct fe_softc *sc = &fe_softc[isa_dev->id_unit];
@@ -1170,7 +1170,7 @@ fe_attach ( struct isa_device *isa_dev )
/*
* Reset interface.
*/
-void
+static void
fe_reset ( int unit )
{
/*
@@ -1186,7 +1186,7 @@ fe_reset ( int unit )
* All buffered packets, both transmitting and receiving,
* if any, will be lost by stopping the interface.
*/
-void
+static void
fe_stop ( int unit )
{
struct fe_softc *sc = &fe_softc[unit];
@@ -1243,7 +1243,7 @@ fe_stop ( int unit )
* Device timeout/watchdog routine. Entered if the device neglects to
* generate an interrupt after a transmit has been started on it.
*/
-void
+static void
fe_watchdog ( struct ifnet *ifp )
{
struct fe_softc *sc = (struct fe_softc *)ifp;
@@ -1271,7 +1271,7 @@ fe_watchdog ( struct ifnet *ifp )
/*
* Initialize device.
*/
-void
+static void
fe_init ( int unit )
{
struct fe_softc *sc = &fe_softc[unit];
diff --git a/sys/i386/isa/if_ie.c b/sys/i386/isa/if_ie.c
index 069867a..b825f70 100644
--- a/sys/i386/isa/if_ie.c
+++ b/sys/i386/isa/if_ie.c
@@ -43,7 +43,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ie.c,v 1.29 1995/11/18 08:35:49 bde Exp $
+ * $Id: if_ie.c,v 1.30 1995/12/05 02:01:08 davidg Exp $
*/
/*
@@ -161,7 +161,7 @@ iomem, and to make 16-pointers, we subtract iomem and and with 0xffff.
#include <net/bpfdesc.h>
#endif
-extern int check_ie_present __P((int unit, caddr_t where, unsigned size));
+static int check_ie_present __P((int unit, caddr_t where, unsigned size));
static struct mbuf *last_not_for_us;
@@ -234,7 +234,7 @@ enum ie_hardware {
IE_UNKNOWN
};
-const char *ie_hardware_names[] = {
+static const char *ie_hardware_names[] = {
"StarLAN 10",
"EN100",
"StarLAN Fiber",
@@ -274,7 +274,7 @@ both transmit and receive buffers.
/*
* Ethernet status, per interface.
*/
-struct ie_softc {
+static struct ie_softc {
struct arpcom arpcom;
void (*ie_reset_586)(int);
void (*ie_chan_attn)(int);
@@ -1358,7 +1358,8 @@ iestart(ifp)
/*
* Check to see if there's an 82586 out there.
*/
-int check_ie_present(unit, where, size)
+static int
+check_ie_present(unit, where, size)
int unit;
caddr_t where;
unsigned size;
diff --git a/sys/i386/isa/if_ix.c b/sys/i386/isa/if_ix.c
index 765b559..e8d323f 100644
--- a/sys/i386/isa/if_ix.c
+++ b/sys/i386/isa/if_ix.c
@@ -28,7 +28,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_ix.c,v 1.14 1995/11/04 17:07:31 bde Exp $
+ * $Id: if_ix.c,v 1.15 1995/12/05 02:01:11 davidg Exp $
*/
#include "ix.h"
@@ -83,7 +83,7 @@ extern char all_es_snpa[], all_is_snpa[], all_l1is_snpa[], all_l2is_snpa[];
#include <i386/isa/icu.h>
#include <i386/isa/if_ixreg.h>
-ix_softc_t ix_softc[NIX];
+static ix_softc_t ix_softc[NIX];
#define DEBUGNONE 0x0000
#define DEBUGPROBE 0x0001
diff --git a/sys/i386/isa/if_le.c b/sys/i386/isa/if_le.c
index 241f47c..10efff4 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.24 1995/12/05 02:01:13 davidg Exp $
+ * $Id: if_le.c,v 1.25 1995/12/07 12:46:00 davidg Exp $
*/
/*
@@ -267,9 +267,9 @@ struct le_board {
};
-le_softc_t le_softc[NLE];
+static le_softc_t le_softc[NLE];
-const le_board_t le_boards[] = {
+static const le_board_t le_boards[] = {
#if !defined(LE_NOLEMAC)
{ lemac_probe }, /* DE20[345] */
#endif
@@ -286,7 +286,7 @@ struct isa_driver ledriver = {
le_probe, le_attach, "le",
};
-unsigned le_intrs[NLE];
+static unsigned le_intrs[NLE];
#define LE_ADDREQUAL(a1, a2) \
(((u_short *)a1)[0] == ((u_short *)a2)[0] \
@@ -841,13 +841,13 @@ static const int lemac_irqs[] = { IRQ5, IRQ10, IRQ11, IRQ15 };
/*
* Some tuning/monitoring variables.
*/
-unsigned lemac_deftxmax = 16; /* see lemac_max above */
-unsigned lemac_txnospc = 0; /* total # of tranmit starvations */
+static unsigned lemac_deftxmax = 16; /* see lemac_max above */
+static unsigned lemac_txnospc = 0; /* total # of tranmit starvations */
-unsigned lemac_tne_intrs = 0; /* total # of tranmit done intrs */
-unsigned lemac_rne_intrs = 0; /* total # of receive done intrs */
-unsigned lemac_txd_intrs = 0; /* total # of tranmit error intrs */
-unsigned lemac_rxd_intrs = 0; /* total # of receive error intrs */
+static unsigned lemac_tne_intrs = 0; /* total # of tranmit done intrs */
+static unsigned lemac_rne_intrs = 0; /* total # of receive done intrs */
+static unsigned lemac_txd_intrs = 0; /* total # of tranmit error intrs */
+static unsigned lemac_rxd_intrs = 0; /* total # of receive error intrs */
static int
@@ -1104,7 +1104,6 @@ lemac_rne_intr(
} else { /* end if (*rxptr & LEMAC_RX_OK) */
sc->le_if.if_ierrors++;
}
-next:
LE_OUTB(sc, LEMAC_REG_FMQ, rxpg); /* Return this page to Free Memory Queue */
} /* end while (recv_count--) */
@@ -1356,7 +1355,7 @@ static int lance_tx_intr(le_softc_t *sc);
#define LN_DESC_MAX 128
#if LN_DOSTATS
-struct {
+static struct {
unsigned lance_rx_misses;
unsigned lance_rx_badcrc;
unsigned lance_rx_badalign;
diff --git a/sys/i386/isa/if_lnc.c b/sys/i386/isa/if_lnc.c
index ffc57a7..c3f12c5 100644
--- a/sys/i386/isa/if_lnc.c
+++ b/sys/i386/isa/if_lnc.c
@@ -100,7 +100,7 @@
#include <i386/isa/isa_device.h>
#include <i386/isa/if_lnc.h>
-struct lnc_softc {
+static struct lnc_softc {
struct arpcom arpcom; /* see ../../netinet/if_ether.h */
struct nic_info nic; /* NIC specific info */
int nrdre;
diff --git a/sys/i386/isa/if_lnc.h b/sys/i386/isa/if_lnc.h
index 5f4dd32..20966a6 100644
--- a/sys/i386/isa/if_lnc.h
+++ b/sys/i386/isa/if_lnc.h
@@ -100,19 +100,6 @@
#define TRANS_MD3 \
"\20\6BUFF\5UFLO\4RES\3LCOL\2LCAR\1RTRY"
-static char *nic_ident[] = {"Unknown",
- "BICC",
- "NE2100",
- "DEPCA"};
-
-static char *ic_ident[] = {"Unknown",
- "LANCE, Am7990",
- "C-LANCE, Am79C90",
- "PCnet-ISA, Am79C960",
- "PCnet-ISA+, Am79C961",
- "PCnet-32, Am79C965",
- "PCnet-PCI, Am79C970"};
-
struct nic_info {
int ident; /* Type of card */
int ic; /* Type of ic, Am7990, Am79C960 etc. */
diff --git a/sys/i386/isa/joy.c b/sys/i386/isa/joy.c
index 99008ad..351c456 100644
--- a/sys/i386/isa/joy.c
+++ b/sys/i386/isa/joy.c
@@ -81,7 +81,8 @@ static struct {
extern int timer0_max_count;
-int joyprobe (struct isa_device *), joyattach (struct isa_device *);
+static int joyprobe (struct isa_device *);
+static int joyattach (struct isa_device *);
struct isa_driver joydriver = {joyprobe, joyattach, "joy"};
@@ -99,7 +100,7 @@ static struct cdevsw joy_cdevsw =
static int get_tick ();
-int
+static int
joyprobe (struct isa_device *dev)
{
#ifdef WANT_JOYSTICK_CONNECTED
@@ -111,7 +112,7 @@ joyprobe (struct isa_device *dev)
#endif
}
-int
+static int
joyattach (struct isa_device *dev)
{
int unit = dev->id_unit;
diff --git a/sys/i386/isa/kbdtables.h b/sys/i386/isa/kbdtables.h
index a761053..9130c78 100644
--- a/sys/i386/isa/kbdtables.h
+++ b/sys/i386/isa/kbdtables.h
@@ -25,13 +25,13 @@
* (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: kbdtables.h,v 1.28 1995/03/27 19:41:11 sos Exp $
+ * $Id: kbdtables.h,v 1.29 1995/03/28 21:30:13 sos Exp $
*/
#define SET8 0x80 /* set eight bit on */
#ifdef DKKEYMAP
-keymap_t key_map = { 0x6C, /* DK iso8859 keymap */
+static keymap_t key_map = { 0x6C, /* DK iso8859 keymap */
/* alt
* scan cntrl alt alt cntrl
* code base shift cntrl shift alt shift cntrl shift spcl flgs
@@ -149,7 +149,7 @@ keymap_t key_map = { 0x6C, /* DK iso8859 keymap */
#endif
#ifdef UKKEYMAP
-keymap_t key_map = { 0x6C, /* uk iso8859 keymap */
+static keymap_t key_map = { 0x6C, /* uk iso8859 keymap */
/* alt
* scan cntrl alt alt cntrl
* code base shift cntrl shift alt shift cntrl shift spcl flgs
@@ -267,7 +267,7 @@ keymap_t key_map = { 0x6C, /* uk iso8859 keymap */
#endif
#ifdef GRKEYMAP
-keymap_t key_map = { 0x6C, /* german iso8859 keymap */
+static keymap_t key_map = { 0x6C, /* german iso8859 keymap */
/* alt
* scan cntrl alt alt cntrl
* code base shift cntrl shift alt shift cntrl shift spcl flgs
@@ -385,7 +385,7 @@ keymap_t key_map = { 0x6C, /* german iso8859 keymap */
#endif
#ifdef SWKEYMAP
-keymap_t key_map = { 0x6C, /* swedish iso8859 keymap */
+static keymap_t key_map = { 0x6C, /* swedish iso8859 keymap */
/* alt
* scan cntrl alt alt cntrl
* code base shift cntrl shift alt shift cntrl shift spcl flgs
@@ -503,7 +503,7 @@ keymap_t key_map = { 0x6C, /* swedish iso8859 keymap */
#endif
#ifdef RUKEYMAP
-keymap_t key_map = { 0xEC, /* keys number */
+static keymap_t key_map = { 0xEC, /* keys number */
/* alt
* scan cntrl alt alt cntrl
* code base shift cntrl shift alt shift cntrl shift spcl flgs
@@ -751,7 +751,7 @@ keymap_t key_map = { 0xEC, /* keys number */
#endif
#if !defined(DKKEYMAP) && !defined(UKKEYMAP) && !defined(GRKEYMAP) && !defined(SWKEYMAP) && !defined(RUKEYMAP)
-keymap_t key_map = { 0x6C, /* US iso8859 keymap */
+static keymap_t key_map = { 0x6C, /* US iso8859 keymap */
/* alt
* scan cntrl alt alt cntrl
* code base shift cntrl shift alt shift cntrl shift spcl flgs
@@ -869,7 +869,7 @@ keymap_t key_map = { 0x6C, /* US iso8859 keymap */
#endif
-fkeytab_t fkey_tab[96] = {
+static fkeytab_t fkey_tab[96] = {
/* 01-04 */ {"\033[M", 3}, {"\033[N", 3}, {"\033[O", 3}, {"\033[P", 3},
/* 05-08 */ {"\033[Q", 3}, {"\033[R", 3}, {"\033[S", 3}, {"\033[T", 3},
/* 09-12 */ {"\033[U", 3}, {"\033[V", 3}, {"\033[W", 3}, {"\033[X", 3},
diff --git a/sys/i386/isa/labpc.c b/sys/i386/isa/labpc.c
index a3287d6..7185088 100644
--- a/sys/i386/isa/labpc.c
+++ b/sys/i386/isa/labpc.c
@@ -166,7 +166,7 @@ static inline void loutb(int port, u_char val)
#define loutb(port, val) outb(port, val)
#endif
-struct ctlr **labpcs; /* XXX: Should be dynamic */
+static struct ctlr **labpcs; /* XXX: Should be dynamic */
/* CR_EXPR: A macro that sets the shadow register in addition to
* sending out the data.
@@ -277,11 +277,10 @@ struct ctlr **labpcs; /* XXX: Should be dynamic */
#define DCR(LABPC) ((LABPC)->base + 0x13)
-extern int labpcattach(struct isa_device *dev);
-extern int labpcdetach(struct isa_device *dev);
-extern int labpcprobe(struct isa_device *dev);
+static int labpcattach(struct isa_device *dev);
+static int labpcprobe(struct isa_device *dev);
struct isa_driver labpcdriver =
- { labpcprobe, labpcattach, "labpc", 0 /* , labpcdetach */ };
+ { labpcprobe, labpcattach, "labpc", 0 };
static d_open_t labpcopen;
static d_close_t labpcclose;
@@ -430,7 +429,8 @@ labpcinit(void)
return 0;
}
-int labpcprobe(struct isa_device *dev)
+static int
+labpcprobe(struct isa_device *dev)
{
static unit;
struct ctlr scratch, *ctlr;
@@ -503,7 +503,8 @@ int labpcprobe(struct isa_device *dev)
/* attach: Set things in a normal state.
*/
-int labpcattach(struct isa_device *dev)
+static int
+labpcattach(struct isa_device *dev)
{
struct ctlr *ctlr = labpcs[dev->id_unit];
char name[32];
@@ -528,16 +529,6 @@ int labpcattach(struct isa_device *dev)
return 1;
}
-int
-labpcdetach(struct isa_device *id)
-{
- struct ctlr *ctlr = labpcs[id->id_unit];
- CR_CLR(ctlr, 3);
- reset(ctlr);
- dev_detach(&ctlr->kdc);
- return 0;
-}
-
/* Null handlers:
*/
static void null_intr (struct ctlr *ctlr) { }
@@ -891,7 +882,8 @@ ad_strategy(struct buf *bp, struct ctlr *ctlr)
*
* 2. No interrupt support yet.
*/
-void da_strategy(struct buf *bp, struct ctlr *ctlr)
+static void
+da_strategy(struct buf *bp, struct ctlr *ctlr)
{
int len;
u_char *data;
diff --git a/sys/i386/isa/lpt.c b/sys/i386/isa/lpt.c
index df0d0d9..a3b1287 100644
--- a/sys/i386/isa/lpt.c
+++ b/sys/i386/isa/lpt.c
@@ -46,7 +46,7 @@
* SUCH DAMAGE.
*
* from: unknown origin, 386BSD 0.1
- * $Id: lpt.c,v 1.46 1995/12/08 11:14:30 julian Exp $
+ * $Id: lpt.c,v 1.47 1995/12/08 23:20:32 phk Exp $
*/
/*
@@ -200,7 +200,7 @@ int lptflag = 1;
#define LPTUNIT(s) ((s)&0x03)
#define LPTFLAGS(s) ((s)&0xfc)
-struct lpt_softc {
+static struct lpt_softc {
short sc_port;
short sc_state;
/* default case: negative prime, negative ack, handshake strobe,
diff --git a/sys/i386/isa/matcd/matcd.c b/sys/i386/isa/matcd/matcd.c
index 20f5116..43726c5 100644
--- a/sys/i386/isa/matcd/matcd.c
+++ b/sys/i386/isa/matcd/matcd.c
@@ -337,7 +337,7 @@ static char MATCDVERSION[]="Version 1(26) 18-Oct-95";
static char MATCDCOPYRIGHT[] = "Matsushita CD-ROM driver, Copr. 1994,1995 Frank Durda IV";
/* The proceeding strings may not be changed*/
-/* $Id:$ */
+/* $Id: matcd.c,v 1.12 1995/12/08 11:16:24 julian Exp $ */
/*---------------------------------------------------------------------------
Include declarations
@@ -546,8 +546,8 @@ static struct kern_devconf kdc_matcd[TOTALDRIVES] = { { /*<12>*/
--- not any more :)
---------------------------------------------------------------------------*/
-extern int matcd_probe(struct isa_device *dev);
-extern int matcd_attach(struct isa_device *dev);
+static int matcd_probe(struct isa_device *dev);
+static int matcd_attach(struct isa_device *dev);
struct isa_driver matcddriver={matcd_probe, matcd_attach, /*<16>*/
"matcdc"}; /*<20>*/
@@ -1276,7 +1276,8 @@ int matcdsize(dev_t dev)
---------------------------------------------------------------------------*/
-int matcd_probe(struct isa_device *dev)
+static int
+matcd_probe(struct isa_device *dev)
{
int i,cdrive;
unsigned char y;
@@ -1450,7 +1451,8 @@ static inline void matcd_register(struct isa_device *id)
what it would be.
---------------------------------------------------------------------------*/
-int matcd_attach(struct isa_device *dev)
+static int
+matcd_attach(struct isa_device *dev)
{
int i;
unsigned int z,cdrive;
@@ -1801,7 +1803,8 @@ NOTE - Undocumented action of hardware: If you change (or reaffirm) data
not fully understood.
---------------------------------------------------------------------------*/
-int matcd_setmode(int ldrive, int mode)
+static int
+matcd_setmode(int ldrive, int mode)
{
struct matcd_data *cd;
int retries;
diff --git a/sys/i386/isa/matcd/options.h b/sys/i386/isa/matcd/options.h
index f7ba057..e145e16 100644
--- a/sys/i386/isa/matcd/options.h
+++ b/sys/i386/isa/matcd/options.h
@@ -195,7 +195,7 @@
---------------------------------------------------------------------------*/
#ifdef AUTOHUNT
-int port_hints[]={
+static int port_hints[]={
0x230, /*SB Pro & SB16*/
0x240, /*SB Pro & SB16*/
0x250, /*Creative omniCD standalone boards*/
diff --git a/sys/i386/isa/mcd.c b/sys/i386/isa/mcd.c
index 8bd2782..c7c973d 100644
--- a/sys/i386/isa/mcd.c
+++ b/sys/i386/isa/mcd.c
@@ -40,7 +40,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: mcd.c,v 1.52 1995/12/08 11:14:34 julian Exp $
+ * $Id: mcd.c,v 1.53 1995/12/08 23:20:34 phk Exp $
*/
static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
@@ -138,7 +138,7 @@ struct mcd_mbx {
short mode;
};
-struct mcd_data {
+static struct mcd_data {
short type;
char *name;
short config;
diff --git a/sys/i386/isa/mse.c b/sys/i386/isa/mse.c
index 2196a4c..768387e 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.20 1995/12/08 11:14:40 julian Exp $
+ * $Id: mse.c,v 1.21 1995/12/08 23:20:35 phk Exp $
*/
/*
* Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and
@@ -90,7 +90,7 @@ static struct cdevsw mse_cdevsw =
* sc_disablemouse() and sc_getmouse() routines must be called spl'd().
*/
#define PROTOBYTES 5
-struct mse_softc {
+static struct mse_softc {
int sc_flags;
int sc_mousetype;
struct selinfo sc_selp;
@@ -188,7 +188,7 @@ static void mse_enableati(), mse_disableati(), mse_getati();
* Keep the Logitech last, since I haven't figured out how to probe it
* properly yet. (Someday I'll have the documentation.)
*/
-struct mse_types {
+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 */
@@ -425,7 +425,6 @@ mseintr(unit)
int unit;
{
register struct mse_softc *sc = &mse_sc[unit];
- pid_t p;
#ifdef DEBUG
static int mse_intrcnt = 0;
diff --git a/sys/i386/isa/ncr5380.c b/sys/i386/isa/ncr5380.c
index 59cd738..66036da 100644
--- a/sys/i386/isa/ncr5380.c
+++ b/sys/i386/isa/ncr5380.c
@@ -195,7 +195,7 @@ typedef struct {
target_t target[8]; /* target state data */
} adapter_t;
-adapter_t ncadata[NNCA];
+static adapter_t ncadata[NNCA];
#define IS_BUSY(a,b) ((a)->target[(b)->xfer->sc_link->target].busy &\
(1 << (b)->xfer->sc_link->lun))
diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c
index ccfef1b..54cb5bf 100644
--- a/sys/i386/isa/npx.c
+++ b/sys/i386/isa/npx.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)npx.c 7.2 (Berkeley) 5/12/91
- * $Id: npx.c,v 1.24 1995/09/19 18:55:14 bde Exp $
+ * $Id: npx.c,v 1.25 1995/10/28 13:07:21 phk Exp $
*/
#include "npx.h"
@@ -111,7 +111,7 @@ SYSCTL_INT(_hw,HW_FLOATINGPT, floatingpoint,
CTLFLAG_RD, &hw_float, 0,
"Floatingpoint instructions executed in hardware");
-u_int npx0_imask = SWI_CLOCK_MASK;
+static u_int npx0_imask = SWI_CLOCK_MASK;
struct proc *npxproc;
static bool_t npx_ex16;
diff --git a/sys/i386/isa/pcaudio.c b/sys/i386/isa/pcaudio.c
index 070ec8f..85ebd01 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.22 1995/12/08 11:14:45 julian Exp $
+ * $Id: pcaudio.c,v 1.23 1995/12/08 23:20:36 phk Exp $
*/
#include "pca.h"
@@ -87,8 +87,8 @@ static int pca_sleep = 0;
static int pca_initialized = 0;
void pcaintr(struct clockframe *frame);
-int pcaprobe(struct isa_device *dvp);
-int pcaattach(struct isa_device *dvp);
+static int pcaprobe(struct isa_device *dvp);
+static int pcaattach(struct isa_device *dvp);
struct isa_driver pcadriver = {
pcaprobe, pcaattach, "pca",
@@ -107,7 +107,7 @@ static struct cdevsw pca_cdevsw =
pcaselect, nommap, NULL, "pca", NULL, -1 };
-inline void conv(const void *table, void *buff, unsigned long n)
+static inline void conv(const void *table, void *buff, unsigned long n)
{
__asm__("1:\tmovb (%2), %3\n"
"\txlatb\n"
@@ -232,7 +232,7 @@ pca_wait(void)
}
-int
+static int
pcaprobe(struct isa_device *dvp)
{
return(-1);
@@ -261,7 +261,7 @@ pca_registerdev(struct isa_device *id)
}
-int
+static int
pcaattach(struct isa_device *dvp)
{
printf("pca%d: PC speaker audio driver\n", dvp->id_unit);
diff --git a/sys/i386/isa/pcibus.c b/sys/i386/isa/pcibus.c
index 1832320..ea6fb5f 100644
--- a/sys/i386/isa/pcibus.c
+++ b/sys/i386/isa/pcibus.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pcibus.c,v 1.18 1995/10/17 15:23:14 se Exp $
+** $Id: pcibus.c,v 1.19 1995/10/17 23:30:11 se Exp $
**
** pci bus subroutines for i386 architecture.
**
@@ -113,7 +113,7 @@ pcibus_imask_include (int irq, unsigned* maskptr);
static int
pcibus_imask_exclude (int irq, unsigned* maskptr);
-struct pcibus i386pci = {
+static struct pcibus i386pci = {
"pci",
pcibus_setup,
pcibus_tag,
diff --git a/sys/i386/isa/pcicx.c b/sys/i386/isa/pcicx.c
index f5b31c9..4e4953d 100644
--- a/sys/i386/isa/pcicx.c
+++ b/sys/i386/isa/pcicx.c
@@ -47,18 +47,6 @@
#include <i386/isa/icu.h>
#include <i386/isa/pcic.h>
-void
-pcic_print_regs (int slot)
-{
- int i, j;
-
- for (i = 0; i < 0x40; i += 16) {
- for (j = 0; j < 16; ++j)
- printf ("%02x ", pcic_getb (slot, i + j));
- printf ("\n");
- }
-}
-
/*
* map a portion of the card's memory space into system memory
* space.
diff --git a/sys/i386/isa/psm.c b/sys/i386/isa/psm.c
index 010f9db..cdef519 100644
--- a/sys/i386/isa/psm.c
+++ b/sys/i386/isa/psm.c
@@ -101,9 +101,9 @@
#define min(x,y) (x < y ? x : y)
#endif min
-int psmprobe (struct isa_device *);
-int psmattach (struct isa_device *);
-void psm_poll_status(void);
+static int psmprobe (struct isa_device *);
+static int psmattach (struct isa_device *);
+static void psm_poll_status(void);
static int psmaddr[NPSM]; /* Base I/O port addresses per unit */
@@ -162,7 +162,8 @@ static inline void psm_command(int ioport, u_char value)
outb(ioport+DATA, value);
}
-int psmprobe(struct isa_device *dvp)
+static int
+psmprobe(struct isa_device *dvp)
{
/* XXX: Needs a real probe routine. */
@@ -187,7 +188,8 @@ int psmprobe(struct isa_device *dvp)
return (4);
}
-int psmattach(struct isa_device *dvp)
+static int
+psmattach(struct isa_device *dvp)
{
int unit = dvp->id_unit;
int ioport = dvp->id_iobase;
@@ -290,7 +292,8 @@ psmopen(dev_t dev, int flag, int fmt, struct proc *p)
return(0);
}
-void psm_poll_status(void)
+static void
+psm_poll_status(void)
{
while(inb(AUX_PORT+STATUS)&0x03) {
diff --git a/sys/i386/isa/rc.c b/sys/i386/isa/rc.c
index 206b38f..71d4fc0 100644
--- a/sys/i386/isa/rc.c
+++ b/sys/i386/isa/rc.c
@@ -62,8 +62,8 @@
/* Prototypes */
-int rcprobe __P((struct isa_device *));
-int rcattach __P((struct isa_device *));
+static int rcprobe __P((struct isa_device *));
+static int rcattach __P((struct isa_device *));
/*-
* This space intentionally left blank to stop __LINE__ from screwing up
@@ -151,8 +151,8 @@ static struct rc_chans {
static int rc_scheduled_event = 0;
/* for pstat -t */
-struct tty rc_tty[NRC * CD180_NCHAN];
-int nrc_tty = NRC * CD180_NCHAN;
+static struct tty rc_tty[NRC * CD180_NCHAN];
+static int nrc_tty = NRC * CD180_NCHAN;
/* Flags */
#define RC_DTR_OFF 0x0001 /* DTR wait, for close/open */
@@ -199,7 +199,8 @@ static void rc_wait0 __P((int nec, int unit, int chan, int line));
/**********************************************/
/* Quick device probing */
-int rcprobe(dvp)
+static int
+rcprobe(dvp)
struct isa_device *dvp;
{
int irq = ffs(dvp->id_irq) - 1;
@@ -253,7 +254,8 @@ rc_registerdev(id)
dev_attach(&kdc_rc[unit]);
}
-int rcattach(dvp)
+static int
+rcattach(dvp)
struct isa_device *dvp;
{
register int i, chan, nec = dvp->id_iobase;
diff --git a/sys/i386/isa/seagate.c b/sys/i386/isa/seagate.c
index 76a5215..8f613ee 100644
--- a/sys/i386/isa/seagate.c
+++ b/sys/i386/isa/seagate.c
@@ -60,7 +60,7 @@
* that category, with the possible exception of scanners and
* some of the older MO drives.
*
- * $Id: seagate.c,v 1.13 1995/12/06 23:50:20 bde Exp $
+ * $Id: seagate.c,v 1.14 1995/12/07 12:46:04 davidg Exp $
*/
/*
@@ -283,7 +283,7 @@ typedef struct adapter {
target_t target[8]; /* target state data */
} adapter_t;
-adapter_t seadata[NSEA];
+static adapter_t seadata[NSEA];
#define IS_BUSY(a,b) ((a)->target[(b)->xfer->sc_link->target].busy &\
(1 << (b)->xfer->sc_link->lun))
diff --git a/sys/i386/isa/si.c b/sys/i386/isa/si.c
index 1e930c3..9fe26bb 100644
--- a/sys/i386/isa/si.c
+++ b/sys/i386/isa/si.c
@@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
- * $Id: si.c,v 1.23 1995/12/08 11:15:05 julian Exp $
+ * $Id: si.c,v 1.24 1995/12/08 23:20:41 phk Exp $
*/
#ifndef lint
@@ -102,11 +102,11 @@ static void si_disc_optim __P((struct tty *tp, struct termios *t,
static void sihardclose __P((struct si_port *pp));
static void sidtrwakeup __P((void *chan));
-int siparam __P((struct tty *, struct termios *));
+static int siparam __P((struct tty *, struct termios *));
-extern void si_registerdev __P((struct isa_device *id));
-extern int siprobe __P((struct isa_device *id));
-extern int siattach __P((struct isa_device *id));
+static void si_registerdev __P((struct isa_device *id));
+static int siprobe __P((struct isa_device *id));
+static int siattach __P((struct isa_device *id));
static void si_modem_state __P((struct si_port *pp, struct tty *tp, int hi_ip));
struct isa_driver sidriver =
@@ -171,7 +171,7 @@ struct si_softc {
} devfs_token[32]; /* what is the max per card? */
#endif
};
-struct si_softc si_softc[NSI]; /* up to 4 elements */
+static struct si_softc si_softc[NSI]; /* up to 4 elements */
#ifndef B2000 /* not standard, but the hardware knows it. */
# define B2000 2000
@@ -258,7 +258,7 @@ static struct kern_devconf si_kdc[NSI] = { {
DC_CLS_SERIAL, /* class */
} };
-void
+static void
si_registerdev(id)
struct isa_device *id;
{
@@ -272,7 +272,7 @@ si_registerdev(id)
}
/* Look for a valid board at the given mem addr */
-int
+static int
siprobe(id)
struct isa_device *id;
{
@@ -473,7 +473,7 @@ bad_irq:
/*
* Attach the device. Initialize the card.
*/
-int
+static int
siattach(id)
struct isa_device *id;
{
@@ -1412,7 +1412,7 @@ out:
* this may sleep, does not flush, nor wait for drain, nor block writes
* caller must arrange this if it's important..
*/
-int
+static int
siparam(tp, t)
register struct tty *tp;
register struct termios *t;
diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c
index 61cd485..b3a01b9 100644
--- a/sys/i386/isa/sio.c
+++ b/sys/i386/isa/sio.c
@@ -31,11 +31,10 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.125 1995/12/08 11:15:12 julian Exp $
+ * $Id: sio.c,v 1.126 1995/12/08 23:20:44 phk Exp $
*/
#include "sio.h"
-#if NSIO > 0
/*
* Serial driver, based on 386BSD-0.1 com driver.
* Mostly rewritten to use pseudo-DMA.
@@ -174,8 +173,6 @@ struct com_s {
bool_t active_out; /* nonzero if the callout device is open */
u_char cfcr_image; /* copy of value written to CFCR */
u_char ftl; /* current rx fifo trigger level */
- u_char ftl_init; /* ftl_max for next open() */
- u_char ftl_max; /* maximum ftl for curent open() */
bool_t hasfifo; /* nonzero for 16550 UARTs */
bool_t loses_outints; /* nonzero if device loses output interrupts */
u_char mcr_image; /* copy of value written to MCR */
@@ -320,7 +317,6 @@ static struct cdevsw sio_cdevsw =
static int comconsole = -1;
static speed_t comdefaultrate = TTYDEF_SPEED;
static u_int com_events; /* input chars + weighted output completions */
-static int commajor;
static int sio_timeout;
static int sio_timeouts_until_log;
#if 0 /* XXX */
@@ -376,8 +372,8 @@ static struct kern_devconf kdc_sio[NSIO] = { {
* PC-Card (PCMCIA) specific code.
*/
static int card_intr(struct pccard_dev *); /* Interrupt handler */
-void siounload(struct pccard_dev *); /* Disable driver */
-void siosuspend(struct pccard_dev *); /* Suspend driver */
+static void siounload(struct pccard_dev *); /* Disable driver */
+static void siosuspend(struct pccard_dev *); /* Suspend driver */
static int sioinit(struct pccard_dev *, int); /* init device */
static struct pccard_drv sio_info =
@@ -398,7 +394,7 @@ static struct pccard_drv sio_info =
* sioinit with first=0. This is called when the user suspends
* the system, or the APM code suspends the system.
*/
-void
+static void
siosuspend(struct pccard_dev *dp)
{
printf("sio%d: suspending\n", dp->isahd.id_unit);
@@ -451,12 +447,10 @@ sioinit(struct pccard_dev *dp, int first)
* and ensure that any driver entry points such as
* read and write do not hang.
*/
-void
+static void
siounload(struct pccard_dev *dp)
{
struct com_s *com;
- struct tty *tp;
- int s,unit,nowhere;
com = com_addr(dp->isahd.id_unit);
if (!com->iobase) {
@@ -815,37 +809,60 @@ sioattach(isdp)
goto determined_type;
}
}
- outb(iobase + com_fifo, FIFO_ENABLE | FIFO_TRIGGER_14);
+ outb(iobase + com_fifo, FIFO_ENABLE | FIFO_RX_HIGH);
DELAY(100);
switch (inb(com->int_id_port) & IIR_FIFO_MASK) {
- case FIFO_TRIGGER_1:
+ case FIFO_RX_LOW:
printf(" 16450");
kdc_sio[unit].kdc_description =
"Serial port: National 16450 or compatible";
break;
- case FIFO_TRIGGER_4:
+ case FIFO_RX_MEDL:
printf(" 16450?");
kdc_sio[unit].kdc_description =
"Serial port: maybe National 16450";
break;
- case FIFO_TRIGGER_8:
+ case FIFO_RX_MEDH:
printf(" 16550?");
kdc_sio[unit].kdc_description =
"Serial port: maybe National 16550";
break;
- case FIFO_TRIGGER_14:
- printf(" 16550A");
+ case FIFO_RX_HIGH:
if (COM_NOFIFO(isdp)) {
printf(" fifo disabled");
kdc_sio[unit].kdc_description =
"Serial port: National 16550A, FIFO disabled";
} else {
com->hasfifo = TRUE;
- com->ftl_init = FIFO_TRIGGER_14;
com->tx_fifo_size = 16;
kdc_sio[unit].kdc_description =
"Serial port: National 16550A or compatible";
}
+ /*
+ * Check for the Startech ST16C650 chip.
+ * it has a shadow register under the com_iir,
+ * which can only be accessed when cfcr == 0xff
+ */
+ {
+ u_char i, j;
+
+ i = inb(iobase + com_iir);
+ outb(iobase + com_cfcr, 0xff);
+ outb(iobase + com_iir, 0x0);
+ outb(iobase + com_cfcr, CFCR_8BITS);
+ j = inb(iobase + com_iir);
+ outb(iobase + com_iir, i);
+ if (i != j) {
+ printf(" 16550A");
+ } else {
+ com->tx_fifo_size = 32;
+ printf(" 16650");
+ kdc_sio[unit].kdc_description =
+ "Serial port: Startech 16C650 or similar";
+ }
+ if (!com->tx_fifo_size)
+ printf(" fifo disabled");
+ }
break;
}
outb(iobase + com_fifo, 0);
@@ -867,7 +884,7 @@ determined_type: ;
kdc_sio[unit].kdc_state = (unit == comconsole) ? DC_BUSY : DC_IDLE;
#ifdef KGDB
- if (kgdb_dev == makedev(commajor, unit)) {
+ if (kgdb_dev == makedev(CDEV_MAJOR, unit)) {
if (unit == comconsole)
kgdb_dev = -1; /* can't debug over console port */
else {
@@ -1018,7 +1035,6 @@ open_top:
tp->t_termios = mynor & CALLOUT_MASK
? com->it_out : com->it_in;
(void)commctl(com, TIOCM_DTR | TIOCM_RTS, DMSET);
- com->ftl_max = com->ftl_init;
com->poll = com->no_irq;
com->poll_output = com->loses_outints;
++com->wopeners;
@@ -1045,8 +1061,7 @@ open_top:
*/
while (TRUE) {
outb(iobase + com_fifo,
- FIFO_RCV_RST | FIFO_XMT_RST
- | FIFO_ENABLE | com->ftl);
+ FIFO_RCV_RST | FIFO_XMT_RST | com->ftl);
DELAY(100);
if (!(inb(com->line_status_port) & LSR_RXRDY))
break;
@@ -1161,7 +1176,7 @@ comhardclose(com)
outb(iobase + com_cfcr, com->cfcr_image &= ~CFCR_SBREAK);
#ifdef KGDB
/* do not disable interrupts or hang up if debugging */
- if (kgdb_dev != makedev(commajor, unit))
+ if (kgdb_dev != makedev(CDEV_MAJOR, unit))
#endif
{
outb(iobase + com_ier, 0);
@@ -1373,7 +1388,7 @@ siointr1(com)
if (recv_data == FRAME_END
&& ( com->tp == NULL
|| !(com->tp->t_state & TS_ISOPEN))
- && kgdb_dev == makedev(commajor, unit)) {
+ && kgdb_dev == makedev(CDEV_MAJOR, unit)) {
kgdb_connect(0);
continue;
}
@@ -1882,10 +1897,8 @@ comparam(tp, t)
* latencies are larger.
*/
com->ftl = t->c_ospeed <= 4800
- ? FIFO_TRIGGER_1 : FIFO_TRIGGER_14;
- if (com->ftl > com->ftl_max)
- com->ftl = com->ftl_max;
- outb(iobase + com_fifo, FIFO_ENABLE | com->ftl);
+ ? 0 : FIFO_ENABLE | FIFO_RX_HIGH;
+ outb(iobase + com_fifo, com->ftl);
}
/*
@@ -2252,30 +2265,6 @@ comwakeup(chan)
log(LOG_ERR, "sio%d: %u more %s%s (total %lu)\n",
unit, delta, error_desc[errnum],
delta == 1 ? "" : "s", total);
-#if 0
- /*
- * XXX if we resurrect this then we should move
- * the dropping of the ftl to somewhere with less
- * latency.
- */
- if (errnum == CE_OVERRUN && com->hasfifo
- && com->ftl > FIFO_TRIGGER_1) {
- static u_char ftl_in_bytes[] =
- { 1, 4, 8, 14, };
-
- com->ftl_init = FIFO_TRIGGER_8;
-#define FIFO_TRIGGER_DELTA FIFO_TRIGGER_4
- com->ftl_max =
- com->ftl -= FIFO_TRIGGER_DELTA;
- outb(com->iobase + com_fifo,
- FIFO_ENABLE | com->ftl);
- log(LOG_DEBUG,
- "sio%d: reduced fifo trigger level to %d\n",
- unit,
- ftl_in_bytes[com->ftl
- / FIFO_TRIGGER_DELTA]);
- }
-#endif
}
}
}
@@ -2403,12 +2392,6 @@ siocnprobe(cp)
{
int unit;
- /* locate the major number */
- /* XXX - should be elsewhere since KGDB uses it */
- for (commajor = 0; commajor < nchrdev; commajor++)
- if (cdevsw[commajor].d_open == sioopen)
- break;
-
/* XXX: ick */
unit = DEV_TO_UNIT(CONUNIT);
siocniobase = CONADDR;
@@ -2416,7 +2399,7 @@ siocnprobe(cp)
/* make sure hardware exists? XXX */
/* initialize required fields */
- cp->cn_dev = makedev(commajor, unit);
+ cp->cn_dev = makedev(CDEV_MAJOR, unit);
#ifdef COMCONSOLE
cp->cn_pri = CN_REMOTE; /* Force a serial port console */
#else
@@ -2625,4 +2608,3 @@ static void sio_drvinit(void *unused)
SYSINIT(siodev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,sio_drvinit,NULL)
-#endif /* NSIO > 0 */
diff --git a/sys/i386/isa/sioreg.h b/sys/i386/isa/sioreg.h
index d43bcdf..bc77dd6 100644
--- a/sys/i386/isa/sioreg.h
+++ b/sys/i386/isa/sioreg.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)comreg.h 7.2 (Berkeley) 5/9/91
- * $Id: sioreg.h,v 1.2 1993/10/16 19:17:18 rgrimes Exp $
+ * $Id: sioreg.h,v 1.3 1995/01/20 07:34:18 wpaul Exp $
*/
@@ -59,10 +59,10 @@
#define FIFO_RCV_RST 0x02
#define FIFO_XMT_RST 0x04
#define FIFO_DMA_MODE 0x08
-#define FIFO_TRIGGER_1 0x00
-#define FIFO_TRIGGER_4 0x40
-#define FIFO_TRIGGER_8 0x80
-#define FIFO_TRIGGER_14 0xc0
+#define FIFO_RX_LOW 0x00
+#define FIFO_RX_MEDL 0x40
+#define FIFO_RX_MEDH 0x80
+#define FIFO_RX_HIGH 0xc0
/* character format control register */
#define CFCR_DLAB 0x80
diff --git a/sys/i386/isa/spigot.c b/sys/i386/isa/spigot.c
index e46a1ba..ccfabe3 100644
--- a/sys/i386/isa/spigot.c
+++ b/sys/i386/isa/spigot.c
@@ -77,7 +77,7 @@ error "Can only have 1 spigot configured."
#include <i386/isa/isa_device.h>
-struct spigot_softc {
+static struct spigot_softc {
u_long flags;
u_long maddr;
struct proc *p;
@@ -94,8 +94,8 @@ struct spigot_softc {
#define UNIT(dev) minor(dev)
-int spigot_probe(struct isa_device *id);
-int spigot_attach(struct isa_device *id);
+static int spigot_probe(struct isa_device *id);
+static int spigot_attach(struct isa_device *id);
struct isa_driver spigotdriver = {spigot_probe, spigot_attach, "spigot"};
@@ -146,7 +146,7 @@ spigot_registerdev(struct isa_device *id)
dev_attach(&kdc_spigot[id->id_unit]);
}
-int
+static int
spigot_probe(struct isa_device *devp)
{
int status;
@@ -167,7 +167,7 @@ struct spigot_softc *ss=(struct spigot_softc *)&spigot_softc[devp->id_unit];
return(status);
}
-int
+static int
spigot_attach(struct isa_device *devp)
{
char name[32];
diff --git a/sys/i386/isa/syscons.c b/sys/i386/isa/syscons.c
index db7c92d..6c3634d 100644
--- a/sys/i386/isa/syscons.c
+++ b/sys/i386/isa/syscons.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: syscons.c,v 1.134 1995/12/07 12:46:08 davidg Exp $
+ * $Id: syscons.c,v 1.135 1995/12/08 11:15:28 julian Exp $
*/
#include "sc.h"
@@ -109,7 +109,6 @@ static const u_int n_fkey_tab = sizeof(fkey_tab) / sizeof(*fkey_tab);
static int delayed_next_scr = FALSE;
static long scrn_blank_time = 0; /* screen saver timeout value */
int scrn_blanked = FALSE; /* screen saver active flag */
-static int scrn_saver = 0; /* screen saver routine */
static long scrn_time_stamp;
u_char scr_map[256];
static char *video_mode_ptr = NULL;
@@ -126,10 +125,15 @@ static u_short mouse_or_mask[16] = {
0x0c00, 0x0c00, 0x0600, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000
};
-extern void none_saver(int blank);
-void none_saver(int blank) { }
+static void none_saver(int blank) { }
+
void (*current_saver) __P((int blank)) = none_saver;
+static int scattach(struct isa_device *dev);
+static int scparam(struct tty *tp, struct termios *t);
+static int scprobe(struct isa_device *dev);
+static void scstart(struct tty *tp);
+
/* OS specific stuff */
#ifdef not_yet_done
#define VIRTUAL_TTY(x) (sccons[x] = ttymalloc(sccons[x]))
@@ -138,8 +142,7 @@ struct tty *sccons[MAXCONS+1];
#else
#define VIRTUAL_TTY(x) &sccons[x]
#define CONSOLE_TTY &sccons[MAXCONS]
-struct tty sccons[MAXCONS+1];
-int nsccons = MAXCONS+1;
+static struct tty sccons[MAXCONS+1];
#endif
#define MONO_BUF pa_to_va(0xB0000)
#define CGA_BUF pa_to_va(0xB8000)
@@ -195,7 +198,7 @@ mask2attr(struct term_stat *term)
return attr;
}
-int
+static int
scprobe(struct isa_device *dev)
{
int i, retries = 5;
@@ -284,7 +287,7 @@ scresume(void *dummy)
}
#endif
-int
+static int
scattach(struct isa_device *dev)
{
scr_stat *scp;
@@ -528,7 +531,7 @@ scintr(int unit)
}
}
-int
+static int
scparam(struct tty *tp, struct termios *t)
{
tp->t_ispeed = t->c_ispeed;
@@ -1147,7 +1150,7 @@ set_mouse_pos:
return(ENOTTY);
}
-void
+static void
scstart(struct tty *tp)
{
struct clist *rbp;
diff --git a/sys/i386/isa/syscons.h b/sys/i386/isa/syscons.h
index ab928ac..6c895e2 100644
--- a/sys/i386/isa/syscons.h
+++ b/sys/i386/isa/syscons.h
@@ -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: syscons.h,v 1.12 1995/11/04 17:07:52 bde Exp $
+ * $Id: syscons.h,v 1.13 1995/11/28 00:17:32 ache Exp $
*/
#ifndef _I386_ISA_SYSCONS_H_
@@ -177,10 +177,6 @@ typedef struct default_attr {
} default_attr;
/* function prototypes */
-int scprobe(struct isa_device *dev);
-int scattach(struct isa_device *dev);
-int scparam(struct tty *tp, struct termios *t);
-void scstart(struct tty *tp);
static void scinit(void);
static u_int scgetc(int noblock);
static scr_stat *get_scr_stat(dev_t dev);
diff --git a/sys/i386/isa/tw.c b/sys/i386/isa/tw.c
index 79a0a11..7772707 100644
--- a/sys/i386/isa/tw.c
+++ b/sys/i386/isa/tw.c
@@ -198,8 +198,8 @@
#define TWPRI (PZERO+8) /* I don't know any better, so let's */
/* use the same as the line printer */
-int twprobe();
-int twattach();
+static int twprobe();
+static int twattach();
void twintr(int unit);
struct isa_driver twdriver = {
@@ -228,7 +228,7 @@ static struct cdevsw tw_cdevsw =
#define TW_SIZE 3*60 /* Enough for about 10 sec. of input */
-struct tw_sc {
+static struct tw_sc {
u_int sc_port; /* I/O Port */
u_int sc_state; /* Current software control state */
struct selinfo sc_selp; /* Information for select() */
@@ -266,7 +266,7 @@ static int twchecktime(int target, int tol);
*/
#define TWDELAYCOUNT 161 /* Works on my 486DX/33 */
-int twdelaycount;
+static int twdelaycount;
/*
* Twdelay25 is used for very short delays of about 25us.
@@ -314,7 +314,8 @@ static void twdelayn(int n)
}
}
-int twprobe(idp)
+static int
+twprobe(idp)
struct isa_device *idp;
{
struct tw_sc sc;
@@ -353,7 +354,8 @@ int twprobe(idp)
return(0);
}
-int twattach(idp)
+static int
+twattach(idp)
struct isa_device *idp;
{
struct tw_sc *sc;
@@ -402,7 +404,6 @@ int twclose(dev, flag, mode, p)
{
struct tw_sc *sc = &tw_sc[TWUNIT(dev)];
int s;
- int port = sc->sc_port;
s = spltty();
sc->sc_state = 0;
@@ -523,7 +524,7 @@ int twselect(dev, rw, p)
*/
#define X10_START_LENGTH 4
-char X10_START[] = { 1, 1, 1, 0 };
+static char X10_START[] = { 1, 1, 1, 0 };
/*
* Each bit of the 4-bit house code and 5-bit key code
@@ -533,7 +534,7 @@ char X10_START[] = { 1, 1, 1, 0 };
*/
#define X10_HOUSE_LENGTH 8
-char X10_HOUSE[16][8] = {
+static char X10_HOUSE[16][8] = {
0, 1, 1, 0, 1, 0, 0, 1, /* A = 0110 */
1, 0, 1, 0, 1, 0, 0, 1, /* B = 1110 */
0, 1, 0, 1, 1, 0, 0, 1, /* C = 0010 */
@@ -553,7 +554,7 @@ char X10_HOUSE[16][8] = {
};
#define X10_KEY_LENGTH 10
-char X10_KEY[32][10] = {
+static char X10_KEY[32][10] = {
0, 1, 1, 0, 1, 0, 0, 1, 0, 1, /* 01100 => 1 */
1, 0, 1, 0, 1, 0, 0, 1, 0, 1, /* 11100 => 2 */
0, 1, 0, 1, 1, 0, 0, 1, 0, 1, /* 00100 => 3 */
@@ -592,13 +593,17 @@ char X10_KEY[32][10] = {
* Tables for mapping received X-10 code back to house/key number.
*/
-short X10_HOUSE_INV[16] = { 12, 4, 2, 10, 14, 6, 0, 8,
- 13, 5, 3, 11, 15, 7, 1, 9 };
+static short X10_HOUSE_INV[16] = {
+ 12, 4, 2, 10, 14, 6, 0, 8,
+ 13, 5, 3, 11, 15, 7, 1, 9
+};
-short X10_KEY_INV[32] = { 12, 16, 4, 17, 2, 18, 10, 19,
- 14, 20, 6, 21, 0, 22, 8, 23,
- 13, 24, 5, 25, 3, 26, 11, 27,
- 15, 28, 7, 29, 1, 30, 9, 31 };
+static short X10_KEY_INV[32] = {
+ 12, 16, 4, 17, 2, 18, 10, 19,
+ 14, 20, 6, 21, 0, 22, 8, 23,
+ 13, 24, 5, 25, 3, 26, 11, 27,
+ 15, 28, 7, 29, 1, 30, 9, 31
+};
/*
* Transmit a packet containing house code h and key code k
@@ -606,9 +611,10 @@ short X10_KEY_INV[32] = { 12, 16, 4, 17, 2, 18, 10, 19,
#define TWRETRY 10 /* Try 10 times to sync with AC line */
-static int twsend(sc, h, k, cnt)
-struct tw_sc *sc;
-int h, k, cnt;
+static int
+twsend(sc, h, k, cnt)
+ struct tw_sc *sc;
+ int h, k, cnt;
{
int i;
int port = sc->sc_port;
@@ -800,8 +806,9 @@ int cnt;
* Abort reception that has failed to complete in the required time.
*/
-void twabortrcv(sc)
-struct tw_sc *sc;
+static void
+twabortrcv(sc)
+ struct tw_sc *sc;
{
int s;
u_char pkt[3];
diff --git a/sys/i386/isa/ultra14f.c b/sys/i386/isa/ultra14f.c
index ca7b7e2..2b65f24 100644
--- a/sys/i386/isa/ultra14f.c
+++ b/sys/i386/isa/ultra14f.c
@@ -22,7 +22,7 @@
* today: Fri Jun 2 17:21:03 EST 1994
* added 24F support ++sg
*
- * $Id: ultra14f.c,v 1.40 1995/12/06 23:50:39 bde Exp $
+ * $Id: ultra14f.c,v 1.41 1995/12/07 12:46:10 davidg Exp $
*/
#include <sys/types.h>
@@ -79,7 +79,7 @@ extern int hz;
#define UHA_NSEG 33 /* number of dma segments supported */
/************************** board definitions *******************************/
-struct uha_reg
+static struct uha_reg
{
int id; /* product id reg */
int type; /* product type reg */
@@ -95,7 +95,7 @@ struct uha_reg
int icmptr; /* incoming mail ptr */
} *uhareg[NUHA];
-struct uha_bits
+static struct uha_bits
{
/* uha_lint (read) */
unsigned char ldip;
@@ -251,7 +251,7 @@ struct mscp {
long int hashkey;
};
-struct uha_data {
+static struct uha_data {
int flags;
#define UHA_INIT 0x01
#define UHA_24F 0x02
@@ -279,7 +279,7 @@ static int uha_init __P((int unit));
static int uha24_init __P((int unit));
static struct mscp *cheat;
-unsigned long int scratch;
+static unsigned long int scratch;
#define EISA_MAX_SLOTS 16 /* XXX This should go into a comon header */
static uha_slot = 0; /* slot last board was found in */
static uha_unit = 0;
diff --git a/sys/i386/isa/wcd.c b/sys/i386/isa/wcd.c
index f0d1fa4..9ee71c1 100644
--- a/sys/i386/isa/wcd.c
+++ b/sys/i386/isa/wcd.c
@@ -57,7 +57,7 @@ static struct cdevsw wcd_cdevsw =
&wcd_bdevsw, -1 };
-extern int wcdattach(struct atapi*, int, struct atapi_params*, int, struct kern_devconf*);
+static int wcdattach(struct atapi*, int, struct atapi_params*, int, struct kern_devconf*);
#define NUNIT (NWDC*2) /* Max. number of devices */
#define UNIT(d) ((minor(d) >> 3) & 3) /* Unit part of minor device number */
@@ -278,7 +278,7 @@ static int wcd_goaway (struct kern_devconf *kdc, int force)
return 0;
}
-int
+static int
wcdattach (struct atapi *ata, int unit, struct atapi_params *ap, int debug,
struct kern_devconf *parent)
{
diff --git a/sys/i386/isa/wd7000.c b/sys/i386/isa/wd7000.c
index b716d54..fac7697 100644
--- a/sys/i386/isa/wd7000.c
+++ b/sys/i386/isa/wd7000.c
@@ -216,10 +216,10 @@ struct wds_setup {
static int wdsunit=0;
-u_char wds_data[NWDS][BUFSIZ];
-u_char wds_data_in_use[NWDS];
+static u_char wds_data[NWDS][BUFSIZ];
+static u_char wds_data_in_use[NWDS];
-struct wds {
+static struct wds {
int addr;
struct wds_req wdsr[MAXSIMUL];
struct wds_mb ombs[WDS_NOMB], imbs[WDS_NIMB];
@@ -329,7 +329,7 @@ wds_scsi_cmd(struct scsi_xfer *sxp)
struct wds_req *r;
int unit = sxp->sc_link->adapter_unit;
int base;
- u_char c, *p;
+ u_char c;
int i;
base = wds[unit].addr;
@@ -483,7 +483,6 @@ wds_done(int unit, struct wds_cmd *c, u_char stat)
{
struct wds_req *r;
int i;
- char slask[80];
r = (struct wds_req *)NULL;
@@ -557,7 +556,7 @@ wds_getvers(int unit)
{
struct wds_req *r;
int base;
- u_char c, *p;
+ u_char c;
int i;
base = wds[unit].addr;
@@ -613,9 +612,7 @@ int
wdsattach(struct isa_device *dev)
{
int masunit;
- static int firstswitch[NWDS];
static u_long versprobe=0; /* max 32 controllers */
- int r;
int unit = dev->id_unit;
struct scsibus_data *scbus;
@@ -657,7 +654,6 @@ wds_init(struct isa_device *dev)
{
struct wds_setup init;
int base;
- u_char *p, c;
int unit, i;
struct wds_cmd wc;
@@ -731,7 +727,6 @@ int
wds_cmd(int base, u_char *p, int l)
{
int s=splbio();
- u_char c;
while(l--)
{
diff --git a/sys/i386/isa/wt.c b/sys/i386/isa/wt.c
index 7ea8b7e..93aaf1f 100644
--- a/sys/i386/isa/wt.c
+++ b/sys/i386/isa/wt.c
@@ -19,7 +19,7 @@
* the original CMU copyright notice.
*
* Version 1.3, Thu Nov 11 12:09:13 MSK 1993
- * $Id: wt.c,v 1.24 1995/12/08 11:15:48 julian Exp $
+ * $Id: wt.c,v 1.25 1995/12/08 23:20:54 phk Exp $
*
*/
@@ -169,7 +169,7 @@ typedef struct {
#endif
} wtinfo_t;
-wtinfo_t wttab[NWT]; /* tape info by unit number */
+static wtinfo_t wttab[NWT]; /* tape info by unit number */
static int wtwait (wtinfo_t *t, int catch, char *msg);
static int wtcmd (wtinfo_t *t, int cmd);
diff --git a/sys/i386/pci/pci_bus.c b/sys/i386/pci/pci_bus.c
index 1832320..ea6fb5f 100644
--- a/sys/i386/pci/pci_bus.c
+++ b/sys/i386/pci/pci_bus.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pcibus.c,v 1.18 1995/10/17 15:23:14 se Exp $
+** $Id: pcibus.c,v 1.19 1995/10/17 23:30:11 se Exp $
**
** pci bus subroutines for i386 architecture.
**
@@ -113,7 +113,7 @@ pcibus_imask_include (int irq, unsigned* maskptr);
static int
pcibus_imask_exclude (int irq, unsigned* maskptr);
-struct pcibus i386pci = {
+static struct pcibus i386pci = {
"pci",
pcibus_setup,
pcibus_tag,
diff --git a/sys/i386/pci/pci_cfgreg.c b/sys/i386/pci/pci_cfgreg.c
index 1832320..ea6fb5f 100644
--- a/sys/i386/pci/pci_cfgreg.c
+++ b/sys/i386/pci/pci_cfgreg.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pcibus.c,v 1.18 1995/10/17 15:23:14 se Exp $
+** $Id: pcibus.c,v 1.19 1995/10/17 23:30:11 se Exp $
**
** pci bus subroutines for i386 architecture.
**
@@ -113,7 +113,7 @@ pcibus_imask_include (int irq, unsigned* maskptr);
static int
pcibus_imask_exclude (int irq, unsigned* maskptr);
-struct pcibus i386pci = {
+static struct pcibus i386pci = {
"pci",
pcibus_setup,
pcibus_tag,
diff --git a/sys/i386/pci/pci_pir.c b/sys/i386/pci/pci_pir.c
index 1832320..ea6fb5f 100644
--- a/sys/i386/pci/pci_pir.c
+++ b/sys/i386/pci/pci_pir.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pcibus.c,v 1.18 1995/10/17 15:23:14 se Exp $
+** $Id: pcibus.c,v 1.19 1995/10/17 23:30:11 se Exp $
**
** pci bus subroutines for i386 architecture.
**
@@ -113,7 +113,7 @@ pcibus_imask_include (int irq, unsigned* maskptr);
static int
pcibus_imask_exclude (int irq, unsigned* maskptr);
-struct pcibus i386pci = {
+static struct pcibus i386pci = {
"pci",
pcibus_setup,
pcibus_tag,
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c
index 82e0b18..86a1eec 100644
--- a/sys/isa/atrtc.c
+++ b/sys/isa/atrtc.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.38 1995/10/28 15:38:49 phk Exp $
+ * $Id: clock.c,v 1.39 1995/11/29 19:57:22 wollman Exp $
*/
/*
@@ -130,7 +130,7 @@ clkintr(struct clockframe frame)
setdelayed();
}
#else
-void
+static void
clkintr(struct clockframe frame)
{
timer_func(&frame);
@@ -245,7 +245,7 @@ release_timer2()
* The RTC chip requires that we read status register C (RTC_INTR)
* to acknowledge an interrupt, before it will generate the next one.
*/
-void
+static void
rtcintr(struct clockframe frame)
{
u_char stat;
@@ -256,8 +256,8 @@ rtcintr(struct clockframe frame)
}
#ifdef DDB
-static void
-printrtc(void)
+void
+DDB_printrtc(void)
{
printf("%02x/%02x/%02x %02x:%02x:%02x, A = %02x, B = %02x, C = %02x\n",
rtcin(RTC_YEAR), rtcin(RTC_MONTH), rtcin(RTC_DAY),
diff --git a/sys/isa/fd.c b/sys/isa/fd.c
index 4e9c091..e394e13 100644
--- a/sys/isa/fd.c
+++ b/sys/isa/fd.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.74 1995/12/08 23:20:26 phk Exp $
+ * $Id: fd.c,v 1.75 1995/12/09 09:10:12 julian Exp $
*
*/
@@ -200,7 +200,7 @@ fd_goaway(struct kern_devconf *kdc, int force)
#define FD_360in5_25 14
-struct fd_type fd_types[NUMTYPES] =
+static struct fd_type fd_types[NUMTYPES] =
{
{ 21,2,0xFF,0x04,82,3444,1,FDC_500KBPS,2,0x0C,2 }, /* 1.72M in HD 3.5in */
{ 18,2,0xFF,0x1B,82,2952,1,FDC_500KBPS,2,0x6C,1 }, /* 1.48M in HD 3.5in */
@@ -230,7 +230,7 @@ struct fdc_data fdc_data[NFDC];
* Per drive structure. *
* N per controller (DRVS_PER_CTLR) *
\***********************************************************************/
-struct fd_data {
+static struct fd_data {
struct fdc_data *fdc; /* pointer to controller structure */
int fdsu; /* this units number on this controller */
int type; /* Drive type (FD_1440...) */
@@ -360,7 +360,7 @@ static struct cdevsw fd_cdevsw =
seltrue, nommap, fdstrategy, "fd",
&fd_bdevsw, -1 };
-struct isa_device *fdcdevs[NFDC];
+static struct isa_device *fdcdevs[NFDC];
/*
* Provide hw.devconf information.
@@ -393,7 +393,7 @@ fdc_err(fdcu_t fdcu, const char *s)
* # of input bytes, input bytes as ints ...
*/
-int
+static int
fd_cmd(fdcu_t fdcu, int n_out, ...)
{
u_char cmd;
@@ -433,7 +433,7 @@ fd_cmd(fdcu_t fdcu, int n_out, ...)
return 0;
}
-int
+static int
fd_sense_drive_status(fdc_p fdc, int *st3p)
{
int st3;
@@ -448,7 +448,7 @@ fd_sense_drive_status(fdc_p fdc, int *st3p)
return 0;
}
-int
+static int
fd_sense_int(fdc_p fdc, int *st0p, int *cylp)
{
int st0, cyl;
@@ -485,7 +485,7 @@ fd_sense_int(fdc_p fdc, int *st0p, int *cylp)
}
-int
+static int
fd_read_status(fdc_p fdc, int fdsu)
{
int i, ret;
diff --git a/sys/isa/joy.c b/sys/isa/joy.c
index 99008ad..351c456 100644
--- a/sys/isa/joy.c
+++ b/sys/isa/joy.c
@@ -81,7 +81,8 @@ static struct {
extern int timer0_max_count;
-int joyprobe (struct isa_device *), joyattach (struct isa_device *);
+static int joyprobe (struct isa_device *);
+static int joyattach (struct isa_device *);
struct isa_driver joydriver = {joyprobe, joyattach, "joy"};
@@ -99,7 +100,7 @@ static struct cdevsw joy_cdevsw =
static int get_tick ();
-int
+static int
joyprobe (struct isa_device *dev)
{
#ifdef WANT_JOYSTICK_CONNECTED
@@ -111,7 +112,7 @@ joyprobe (struct isa_device *dev)
#endif
}
-int
+static int
joyattach (struct isa_device *dev)
{
int unit = dev->id_unit;
diff --git a/sys/isa/kbdtables.h b/sys/isa/kbdtables.h
index a761053..9130c78 100644
--- a/sys/isa/kbdtables.h
+++ b/sys/isa/kbdtables.h
@@ -25,13 +25,13 @@
* (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: kbdtables.h,v 1.28 1995/03/27 19:41:11 sos Exp $
+ * $Id: kbdtables.h,v 1.29 1995/03/28 21:30:13 sos Exp $
*/
#define SET8 0x80 /* set eight bit on */
#ifdef DKKEYMAP
-keymap_t key_map = { 0x6C, /* DK iso8859 keymap */
+static keymap_t key_map = { 0x6C, /* DK iso8859 keymap */
/* alt
* scan cntrl alt alt cntrl
* code base shift cntrl shift alt shift cntrl shift spcl flgs
@@ -149,7 +149,7 @@ keymap_t key_map = { 0x6C, /* DK iso8859 keymap */
#endif
#ifdef UKKEYMAP
-keymap_t key_map = { 0x6C, /* uk iso8859 keymap */
+static keymap_t key_map = { 0x6C, /* uk iso8859 keymap */
/* alt
* scan cntrl alt alt cntrl
* code base shift cntrl shift alt shift cntrl shift spcl flgs
@@ -267,7 +267,7 @@ keymap_t key_map = { 0x6C, /* uk iso8859 keymap */
#endif
#ifdef GRKEYMAP
-keymap_t key_map = { 0x6C, /* german iso8859 keymap */
+static keymap_t key_map = { 0x6C, /* german iso8859 keymap */
/* alt
* scan cntrl alt alt cntrl
* code base shift cntrl shift alt shift cntrl shift spcl flgs
@@ -385,7 +385,7 @@ keymap_t key_map = { 0x6C, /* german iso8859 keymap */
#endif
#ifdef SWKEYMAP
-keymap_t key_map = { 0x6C, /* swedish iso8859 keymap */
+static keymap_t key_map = { 0x6C, /* swedish iso8859 keymap */
/* alt
* scan cntrl alt alt cntrl
* code base shift cntrl shift alt shift cntrl shift spcl flgs
@@ -503,7 +503,7 @@ keymap_t key_map = { 0x6C, /* swedish iso8859 keymap */
#endif
#ifdef RUKEYMAP
-keymap_t key_map = { 0xEC, /* keys number */
+static keymap_t key_map = { 0xEC, /* keys number */
/* alt
* scan cntrl alt alt cntrl
* code base shift cntrl shift alt shift cntrl shift spcl flgs
@@ -751,7 +751,7 @@ keymap_t key_map = { 0xEC, /* keys number */
#endif
#if !defined(DKKEYMAP) && !defined(UKKEYMAP) && !defined(GRKEYMAP) && !defined(SWKEYMAP) && !defined(RUKEYMAP)
-keymap_t key_map = { 0x6C, /* US iso8859 keymap */
+static keymap_t key_map = { 0x6C, /* US iso8859 keymap */
/* alt
* scan cntrl alt alt cntrl
* code base shift cntrl shift alt shift cntrl shift spcl flgs
@@ -869,7 +869,7 @@ keymap_t key_map = { 0x6C, /* US iso8859 keymap */
#endif
-fkeytab_t fkey_tab[96] = {
+static fkeytab_t fkey_tab[96] = {
/* 01-04 */ {"\033[M", 3}, {"\033[N", 3}, {"\033[O", 3}, {"\033[P", 3},
/* 05-08 */ {"\033[Q", 3}, {"\033[R", 3}, {"\033[S", 3}, {"\033[T", 3},
/* 09-12 */ {"\033[U", 3}, {"\033[V", 3}, {"\033[W", 3}, {"\033[X", 3},
diff --git a/sys/isa/sio.c b/sys/isa/sio.c
index 61cd485..b3a01b9 100644
--- a/sys/isa/sio.c
+++ b/sys/isa/sio.c
@@ -31,11 +31,10 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.125 1995/12/08 11:15:12 julian Exp $
+ * $Id: sio.c,v 1.126 1995/12/08 23:20:44 phk Exp $
*/
#include "sio.h"
-#if NSIO > 0
/*
* Serial driver, based on 386BSD-0.1 com driver.
* Mostly rewritten to use pseudo-DMA.
@@ -174,8 +173,6 @@ struct com_s {
bool_t active_out; /* nonzero if the callout device is open */
u_char cfcr_image; /* copy of value written to CFCR */
u_char ftl; /* current rx fifo trigger level */
- u_char ftl_init; /* ftl_max for next open() */
- u_char ftl_max; /* maximum ftl for curent open() */
bool_t hasfifo; /* nonzero for 16550 UARTs */
bool_t loses_outints; /* nonzero if device loses output interrupts */
u_char mcr_image; /* copy of value written to MCR */
@@ -320,7 +317,6 @@ static struct cdevsw sio_cdevsw =
static int comconsole = -1;
static speed_t comdefaultrate = TTYDEF_SPEED;
static u_int com_events; /* input chars + weighted output completions */
-static int commajor;
static int sio_timeout;
static int sio_timeouts_until_log;
#if 0 /* XXX */
@@ -376,8 +372,8 @@ static struct kern_devconf kdc_sio[NSIO] = { {
* PC-Card (PCMCIA) specific code.
*/
static int card_intr(struct pccard_dev *); /* Interrupt handler */
-void siounload(struct pccard_dev *); /* Disable driver */
-void siosuspend(struct pccard_dev *); /* Suspend driver */
+static void siounload(struct pccard_dev *); /* Disable driver */
+static void siosuspend(struct pccard_dev *); /* Suspend driver */
static int sioinit(struct pccard_dev *, int); /* init device */
static struct pccard_drv sio_info =
@@ -398,7 +394,7 @@ static struct pccard_drv sio_info =
* sioinit with first=0. This is called when the user suspends
* the system, or the APM code suspends the system.
*/
-void
+static void
siosuspend(struct pccard_dev *dp)
{
printf("sio%d: suspending\n", dp->isahd.id_unit);
@@ -451,12 +447,10 @@ sioinit(struct pccard_dev *dp, int first)
* and ensure that any driver entry points such as
* read and write do not hang.
*/
-void
+static void
siounload(struct pccard_dev *dp)
{
struct com_s *com;
- struct tty *tp;
- int s,unit,nowhere;
com = com_addr(dp->isahd.id_unit);
if (!com->iobase) {
@@ -815,37 +809,60 @@ sioattach(isdp)
goto determined_type;
}
}
- outb(iobase + com_fifo, FIFO_ENABLE | FIFO_TRIGGER_14);
+ outb(iobase + com_fifo, FIFO_ENABLE | FIFO_RX_HIGH);
DELAY(100);
switch (inb(com->int_id_port) & IIR_FIFO_MASK) {
- case FIFO_TRIGGER_1:
+ case FIFO_RX_LOW:
printf(" 16450");
kdc_sio[unit].kdc_description =
"Serial port: National 16450 or compatible";
break;
- case FIFO_TRIGGER_4:
+ case FIFO_RX_MEDL:
printf(" 16450?");
kdc_sio[unit].kdc_description =
"Serial port: maybe National 16450";
break;
- case FIFO_TRIGGER_8:
+ case FIFO_RX_MEDH:
printf(" 16550?");
kdc_sio[unit].kdc_description =
"Serial port: maybe National 16550";
break;
- case FIFO_TRIGGER_14:
- printf(" 16550A");
+ case FIFO_RX_HIGH:
if (COM_NOFIFO(isdp)) {
printf(" fifo disabled");
kdc_sio[unit].kdc_description =
"Serial port: National 16550A, FIFO disabled";
} else {
com->hasfifo = TRUE;
- com->ftl_init = FIFO_TRIGGER_14;
com->tx_fifo_size = 16;
kdc_sio[unit].kdc_description =
"Serial port: National 16550A or compatible";
}
+ /*
+ * Check for the Startech ST16C650 chip.
+ * it has a shadow register under the com_iir,
+ * which can only be accessed when cfcr == 0xff
+ */
+ {
+ u_char i, j;
+
+ i = inb(iobase + com_iir);
+ outb(iobase + com_cfcr, 0xff);
+ outb(iobase + com_iir, 0x0);
+ outb(iobase + com_cfcr, CFCR_8BITS);
+ j = inb(iobase + com_iir);
+ outb(iobase + com_iir, i);
+ if (i != j) {
+ printf(" 16550A");
+ } else {
+ com->tx_fifo_size = 32;
+ printf(" 16650");
+ kdc_sio[unit].kdc_description =
+ "Serial port: Startech 16C650 or similar";
+ }
+ if (!com->tx_fifo_size)
+ printf(" fifo disabled");
+ }
break;
}
outb(iobase + com_fifo, 0);
@@ -867,7 +884,7 @@ determined_type: ;
kdc_sio[unit].kdc_state = (unit == comconsole) ? DC_BUSY : DC_IDLE;
#ifdef KGDB
- if (kgdb_dev == makedev(commajor, unit)) {
+ if (kgdb_dev == makedev(CDEV_MAJOR, unit)) {
if (unit == comconsole)
kgdb_dev = -1; /* can't debug over console port */
else {
@@ -1018,7 +1035,6 @@ open_top:
tp->t_termios = mynor & CALLOUT_MASK
? com->it_out : com->it_in;
(void)commctl(com, TIOCM_DTR | TIOCM_RTS, DMSET);
- com->ftl_max = com->ftl_init;
com->poll = com->no_irq;
com->poll_output = com->loses_outints;
++com->wopeners;
@@ -1045,8 +1061,7 @@ open_top:
*/
while (TRUE) {
outb(iobase + com_fifo,
- FIFO_RCV_RST | FIFO_XMT_RST
- | FIFO_ENABLE | com->ftl);
+ FIFO_RCV_RST | FIFO_XMT_RST | com->ftl);
DELAY(100);
if (!(inb(com->line_status_port) & LSR_RXRDY))
break;
@@ -1161,7 +1176,7 @@ comhardclose(com)
outb(iobase + com_cfcr, com->cfcr_image &= ~CFCR_SBREAK);
#ifdef KGDB
/* do not disable interrupts or hang up if debugging */
- if (kgdb_dev != makedev(commajor, unit))
+ if (kgdb_dev != makedev(CDEV_MAJOR, unit))
#endif
{
outb(iobase + com_ier, 0);
@@ -1373,7 +1388,7 @@ siointr1(com)
if (recv_data == FRAME_END
&& ( com->tp == NULL
|| !(com->tp->t_state & TS_ISOPEN))
- && kgdb_dev == makedev(commajor, unit)) {
+ && kgdb_dev == makedev(CDEV_MAJOR, unit)) {
kgdb_connect(0);
continue;
}
@@ -1882,10 +1897,8 @@ comparam(tp, t)
* latencies are larger.
*/
com->ftl = t->c_ospeed <= 4800
- ? FIFO_TRIGGER_1 : FIFO_TRIGGER_14;
- if (com->ftl > com->ftl_max)
- com->ftl = com->ftl_max;
- outb(iobase + com_fifo, FIFO_ENABLE | com->ftl);
+ ? 0 : FIFO_ENABLE | FIFO_RX_HIGH;
+ outb(iobase + com_fifo, com->ftl);
}
/*
@@ -2252,30 +2265,6 @@ comwakeup(chan)
log(LOG_ERR, "sio%d: %u more %s%s (total %lu)\n",
unit, delta, error_desc[errnum],
delta == 1 ? "" : "s", total);
-#if 0
- /*
- * XXX if we resurrect this then we should move
- * the dropping of the ftl to somewhere with less
- * latency.
- */
- if (errnum == CE_OVERRUN && com->hasfifo
- && com->ftl > FIFO_TRIGGER_1) {
- static u_char ftl_in_bytes[] =
- { 1, 4, 8, 14, };
-
- com->ftl_init = FIFO_TRIGGER_8;
-#define FIFO_TRIGGER_DELTA FIFO_TRIGGER_4
- com->ftl_max =
- com->ftl -= FIFO_TRIGGER_DELTA;
- outb(com->iobase + com_fifo,
- FIFO_ENABLE | com->ftl);
- log(LOG_DEBUG,
- "sio%d: reduced fifo trigger level to %d\n",
- unit,
- ftl_in_bytes[com->ftl
- / FIFO_TRIGGER_DELTA]);
- }
-#endif
}
}
}
@@ -2403,12 +2392,6 @@ siocnprobe(cp)
{
int unit;
- /* locate the major number */
- /* XXX - should be elsewhere since KGDB uses it */
- for (commajor = 0; commajor < nchrdev; commajor++)
- if (cdevsw[commajor].d_open == sioopen)
- break;
-
/* XXX: ick */
unit = DEV_TO_UNIT(CONUNIT);
siocniobase = CONADDR;
@@ -2416,7 +2399,7 @@ siocnprobe(cp)
/* make sure hardware exists? XXX */
/* initialize required fields */
- cp->cn_dev = makedev(commajor, unit);
+ cp->cn_dev = makedev(CDEV_MAJOR, unit);
#ifdef COMCONSOLE
cp->cn_pri = CN_REMOTE; /* Force a serial port console */
#else
@@ -2625,4 +2608,3 @@ static void sio_drvinit(void *unused)
SYSINIT(siodev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,sio_drvinit,NULL)
-#endif /* NSIO > 0 */
diff --git a/sys/isa/sioreg.h b/sys/isa/sioreg.h
index d43bcdf..bc77dd6 100644
--- a/sys/isa/sioreg.h
+++ b/sys/isa/sioreg.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)comreg.h 7.2 (Berkeley) 5/9/91
- * $Id: sioreg.h,v 1.2 1993/10/16 19:17:18 rgrimes Exp $
+ * $Id: sioreg.h,v 1.3 1995/01/20 07:34:18 wpaul Exp $
*/
@@ -59,10 +59,10 @@
#define FIFO_RCV_RST 0x02
#define FIFO_XMT_RST 0x04
#define FIFO_DMA_MODE 0x08
-#define FIFO_TRIGGER_1 0x00
-#define FIFO_TRIGGER_4 0x40
-#define FIFO_TRIGGER_8 0x80
-#define FIFO_TRIGGER_14 0xc0
+#define FIFO_RX_LOW 0x00
+#define FIFO_RX_MEDL 0x40
+#define FIFO_RX_MEDH 0x80
+#define FIFO_RX_HIGH 0xc0
/* character format control register */
#define CFCR_DLAB 0x80
diff --git a/sys/isa/syscons.c b/sys/isa/syscons.c
index db7c92d..6c3634d 100644
--- a/sys/isa/syscons.c
+++ b/sys/isa/syscons.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: syscons.c,v 1.134 1995/12/07 12:46:08 davidg Exp $
+ * $Id: syscons.c,v 1.135 1995/12/08 11:15:28 julian Exp $
*/
#include "sc.h"
@@ -109,7 +109,6 @@ static const u_int n_fkey_tab = sizeof(fkey_tab) / sizeof(*fkey_tab);
static int delayed_next_scr = FALSE;
static long scrn_blank_time = 0; /* screen saver timeout value */
int scrn_blanked = FALSE; /* screen saver active flag */
-static int scrn_saver = 0; /* screen saver routine */
static long scrn_time_stamp;
u_char scr_map[256];
static char *video_mode_ptr = NULL;
@@ -126,10 +125,15 @@ static u_short mouse_or_mask[16] = {
0x0c00, 0x0c00, 0x0600, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000
};
-extern void none_saver(int blank);
-void none_saver(int blank) { }
+static void none_saver(int blank) { }
+
void (*current_saver) __P((int blank)) = none_saver;
+static int scattach(struct isa_device *dev);
+static int scparam(struct tty *tp, struct termios *t);
+static int scprobe(struct isa_device *dev);
+static void scstart(struct tty *tp);
+
/* OS specific stuff */
#ifdef not_yet_done
#define VIRTUAL_TTY(x) (sccons[x] = ttymalloc(sccons[x]))
@@ -138,8 +142,7 @@ struct tty *sccons[MAXCONS+1];
#else
#define VIRTUAL_TTY(x) &sccons[x]
#define CONSOLE_TTY &sccons[MAXCONS]
-struct tty sccons[MAXCONS+1];
-int nsccons = MAXCONS+1;
+static struct tty sccons[MAXCONS+1];
#endif
#define MONO_BUF pa_to_va(0xB0000)
#define CGA_BUF pa_to_va(0xB8000)
@@ -195,7 +198,7 @@ mask2attr(struct term_stat *term)
return attr;
}
-int
+static int
scprobe(struct isa_device *dev)
{
int i, retries = 5;
@@ -284,7 +287,7 @@ scresume(void *dummy)
}
#endif
-int
+static int
scattach(struct isa_device *dev)
{
scr_stat *scp;
@@ -528,7 +531,7 @@ scintr(int unit)
}
}
-int
+static int
scparam(struct tty *tp, struct termios *t)
{
tp->t_ispeed = t->c_ispeed;
@@ -1147,7 +1150,7 @@ set_mouse_pos:
return(ENOTTY);
}
-void
+static void
scstart(struct tty *tp)
{
struct clist *rbp;
diff --git a/sys/isa/syscons.h b/sys/isa/syscons.h
index ab928ac..6c895e2 100644
--- a/sys/isa/syscons.h
+++ b/sys/isa/syscons.h
@@ -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: syscons.h,v 1.12 1995/11/04 17:07:52 bde Exp $
+ * $Id: syscons.h,v 1.13 1995/11/28 00:17:32 ache Exp $
*/
#ifndef _I386_ISA_SYSCONS_H_
@@ -177,10 +177,6 @@ typedef struct default_attr {
} default_attr;
/* function prototypes */
-int scprobe(struct isa_device *dev);
-int scattach(struct isa_device *dev);
-int scparam(struct tty *tp, struct termios *t);
-void scstart(struct tty *tp);
static void scinit(void);
static u_int scgetc(int noblock);
static scr_stat *get_scr_stat(dev_t dev);
OpenPOWER on IntegriCloud