diff options
author | phk <phk@FreeBSD.org> | 1995-12-14 09:55:16 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1995-12-14 09:55:16 +0000 |
commit | 9cb413a93c0c68c45292e4086ffc7cc2f6d36d3e (patch) | |
tree | 9887f4bf5939f3591e9b3a4f6e1865f9a1f810d8 /sys/pci | |
parent | 63ec2c0ae9b44c5394bae5d6ee7fea5be9659585 (diff) | |
download | FreeBSD-src-9cb413a93c0c68c45292e4086ffc7cc2f6d36d3e.zip FreeBSD-src-9cb413a93c0c68c45292e4086ffc7cc2f6d36d3e.tar.gz |
Another mega commit to staticize things.
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/aic7870.c | 8 | ||||
-rw-r--r-- | sys/pci/bt9xx.c | 5 | ||||
-rw-r--r-- | sys/pci/if_de.c | 4 | ||||
-rw-r--r-- | sys/pci/if_vx.c | 80 | ||||
-rw-r--r-- | sys/pci/meteor.c | 10 | ||||
-rw-r--r-- | sys/pci/ncr.c | 21 | ||||
-rw-r--r-- | sys/pci/pci.c | 6 | ||||
-rw-r--r-- | sys/pci/pcisupport.c | 10 |
8 files changed, 48 insertions, 96 deletions
diff --git a/sys/pci/aic7870.c b/sys/pci/aic7870.c index 9febf05..0182e5f 100644 --- a/sys/pci/aic7870.c +++ b/sys/pci/aic7870.c @@ -19,7 +19,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: aic7870.c,v 1.18 1995/11/05 04:51:58 gibbs Exp $ + * $Id: aic7870.c,v 1.19 1995/11/07 05:33:27 gibbs Exp $ */ #include <pci.h> @@ -57,11 +57,11 @@ #define DIFACTNEGEN 0x00000001ul /* aic7870 only */ static char* aic7870_probe __P((pcici_t tag, pcidi_t type)); -void aic7870_attach __P((pcici_t config_id, int unit)); +static void aic7870_attach __P((pcici_t config_id, int unit)); static u_char aic3940_count; -struct pci_device ahc_pci_driver = { +static struct pci_device ahc_pci_driver = { "ahc", aic7870_probe, aic7870_attach, @@ -103,7 +103,7 @@ aic7870_probe (pcici_t tag, pcidi_t type) } -void +static void aic7870_attach(config_id, unit) pcici_t config_id; int unit; diff --git a/sys/pci/bt9xx.c b/sys/pci/bt9xx.c index a982139..48f9c6b 100644 --- a/sys/pci/bt9xx.c +++ b/sys/pci/bt9xx.c @@ -19,7 +19,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id$ + * $Id: bt9xx.c,v 1.1 1995/12/12 08:58:04 gibbs Exp $ */ #include <pci.h> @@ -42,7 +42,7 @@ static char* bt_pci_probe __P((pcici_t tag, pcidi_t type)); static void bt_pci_attach __P((pcici_t config_id, int unit)); static int bt_pci_intr __P((void *arg)); -struct pci_device bt_pci_driver = { +static struct pci_device bt_pci_driver = { "bt", bt_pci_probe, bt_pci_attach, @@ -72,7 +72,6 @@ bt_pci_attach(config_id, unit) int unit; { u_long io_port; - u_long id; unsigned opri = 0; struct bt_data *bt; diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c index 5d9dbd3..7a8a5d3 100644 --- a/sys/pci/if_de.c +++ b/sys/pci/if_de.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_de.c,v 1.38 1995/11/29 11:19:02 asami Exp $ + * $Id: if_de.c,v 1.39 1995/12/07 12:47:34 davidg Exp $ * */ @@ -350,7 +350,7 @@ static const char *tulip_chipdescs[] = { #if defined(__FreeBSD__) typedef void ifnet_ret_t; typedef int ioctl_cmd_t; -tulip_softc_t *tulips[NDE]; +static tulip_softc_t *tulips[NDE]; #define TULIP_UNIT_TO_SOFTC(unit) (tulips[unit]) #endif #if defined(__bsdi__) diff --git a/sys/pci/if_vx.c b/sys/pci/if_vx.c index 2c135fd..23d98fa 100644 --- a/sys/pci/if_vx.c +++ b/sys/pci/if_vx.c @@ -105,18 +105,15 @@ static int vxioctl __P((struct ifnet * ifp, int, caddr_t)); static void vxmbuffill __P((caddr_t, int)); static void vxmbufempty __P((struct vx_softc *)); -void vxinit __P((int)); -void vxintr __P((int)); -void vxread __P((struct vx_softc *)); -void vxreset __P((int)); -void vxstart __P((struct ifnet *)); -void vxstop __P((int)); -void vxwatchdog __P((struct ifnet *)); +static void vxinit __P((int)); +static void vxintr __P((int)); +static void vxread __P((struct vx_softc *)); +static void vxreset __P((int)); +static void vxstart __P((struct ifnet *)); +static void vxstop __P((int)); +static void vxwatchdog __P((struct ifnet *)); -static int send_ID_sequence __P((int)); -static int get_eeprom_data __P((int, int)); - -struct vx_softc vx_softc[NVX]; +static struct vx_softc vx_softc[NVX]; #define vx_ftst(f) (sc->stat&(f)) #define vx_fset(f) (sc->stat|=(f)) @@ -310,7 +307,7 @@ vx_pci_attach( static u_long vx_pci_count; -struct pci_device vxdevice = { +static struct pci_device vxdevice = { "vx", vx_pci_probe, vx_pci_attach, @@ -324,7 +321,7 @@ DATA_SET (pcidevice_set, vxdevice); * The order in here seems important. Otherwise we may not receive * interrupts. ?! */ -void +static void vxinit(unit) int unit; { @@ -477,7 +474,7 @@ vxinit(unit) static const char padmap[] = {0, 3, 2, 1}; -void +static void vxstart(ifp) struct ifnet *ifp; { @@ -599,15 +596,12 @@ readcheck: goto startagain; } -void +static void vxintr(unit) int unit; { - int i; register int status; register struct vx_softc *sc = &vx_softc[unit]; - struct ifnet *ifp = &sc->arpcom.ac_if; - struct mbuf *m; int x; x=splbio(); @@ -704,7 +698,7 @@ rescan: splx(x); } -void +static void vxread(sc) register struct vx_softc *sc; { @@ -1057,7 +1051,7 @@ vxioctl(ifp, cmd, data) return (error); } -void +static void vxreset(unit) int unit; { @@ -1068,7 +1062,7 @@ vxreset(unit) splx(s); } -void +static void vxwatchdog(ifp) struct ifnet *ifp; { @@ -1085,7 +1079,7 @@ vxwatchdog(ifp) vxintr(ifp->if_unit); } -void +static void vxstop(unit) int unit; { @@ -1104,48 +1098,6 @@ vxstop(unit) outw(BASE + VX_COMMAND, SET_RX_FILTER); } - -static int -send_ID_sequence(port) - int port; -{ - int cx, al; - - for (al = 0xff, cx = 0; cx < 255; cx++) { - outb(port, al); - al <<= 1; - if (al & 0x100) - al ^= 0xcf; - } - return (1); -} - - -/* - * We get eeprom data from the id_port given an offset into the eeprom. - * Basically; after the ID_sequence is sent to all of the cards; they enter - * the ID_CMD state where they will accept command requests. 0x80-0xbf loads - * the eeprom data. We then read the port 16 times and with every read; the - * cards check for contention (ie: if one card writes a 0 bit and another - * writes a 1 bit then the host sees a 0. At the end of the cycle; each card - * compares the data on the bus; if there is a difference then that card goes - * into ID_WAIT state again). In the meantime; one bit of data is returned in - * the AX register which is conveniently returned to us by inb(). Hence; we - * read 16 times getting one bit of data with each read. - */ -static int -get_eeprom_data(id_port, offset) - int id_port; - int offset; -{ - int i, data = 0; - outb(id_port, 0x80 + offset); - DELAY(1000); - for (i = 0; i < 16; i++) - data = (data << 1) | (inw(id_port) & 1); - return (data); -} - /* * We suppose this is always called inside a splimp(){...}splx() region */ diff --git a/sys/pci/meteor.c b/sys/pci/meteor.c index 0f50ddf..db8ef12 100644 --- a/sys/pci/meteor.c +++ b/sys/pci/meteor.c @@ -78,7 +78,7 @@ #include <machine/ioctl_meteor.h> -extern int meteor_intr __P((void *arg)); +static int meteor_intr __P((void *arg)); /* enough memory for 640x48 RGB16, or YUV (16 storage bits/pixel) or 450x340 RGB24 (32 storage bits/pixel) @@ -148,9 +148,9 @@ typedef struct { #endif } meteor_reg_t; -meteor_reg_t meteor[NMETEOR]; +static meteor_reg_t meteor[NMETEOR]; -u_long read_intr_wait; +static u_long read_intr_wait; #define METPRI (PZERO+8)|PCATCH /*--------------------------------------------------------- @@ -164,7 +164,7 @@ static char* met_probe (pcici_t tag, pcidi_t type); static void met_attach(pcici_t tag, int unit); static u_long met_count; -struct pci_device met_device = { +static struct pci_device met_device = { "meteor", met_probe, met_attach, @@ -484,7 +484,7 @@ met_probe (pcici_t tag, pcidi_t type) /* interrupt handling routine complete meteor_read() if using interrupts */ -int +static int meteor_intr( void *arg) { register meteor_reg_t *mtr = (meteor_reg_t *) arg; diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c index 093c156..1163614 100644 --- a/sys/pci/ncr.c +++ b/sys/pci/ncr.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: ncr.c,v 1.49 1995/09/21 17:27:28 se Exp $ +** $Id: ncr.c,v 1.50 1995/12/07 12:47:40 davidg Exp $ ** ** Device driver for the NCR 53C810 PCI-SCSI-Controller. ** @@ -174,6 +174,7 @@ #include <sys/malloc.h> #include <sys/buf.h> #include <sys/kernel.h> +#include <sys/sysctl.h> #ifndef __NetBSD__ #include <machine/clock.h> #include <machine/cpu.h> /* bootverbose */ @@ -1253,9 +1254,9 @@ static void ncr_attach (pcici_t tag, int unit); static char ident[] = - "\n$Id: ncr.c,v 1.49 1995/09/21 17:27:28 se Exp $\n"; + "\n$Id: ncr.c,v 1.50 1995/12/07 12:47:40 davidg Exp $\n"; -u_long ncr_version = NCR_VERSION * 11 +static u_long ncr_version = NCR_VERSION * 11 + (u_long) sizeof (struct ncb) * 7 + (u_long) sizeof (struct ccb) * 5 + (u_long) sizeof (struct lcb) * 3 @@ -1264,13 +1265,13 @@ u_long ncr_version = NCR_VERSION * 11 #ifdef KERNEL #ifndef __NetBSD__ -u_long nncr=MAX_UNITS; -ncb_p ncrp [MAX_UNITS]; +static ncb_p ncrp [MAX_UNITS]; #endif /* !__NetBSD__ */ static int ncr_debug = SCSI_DEBUG_FLAGS; +SYSCTL_INT(_debug, OID_AUTO, ncr_debug, CTLFLAG_RW, &ncr_debug, 0, ""); -int ncr_cache; /* to be aligned _NOT_ static */ +static int ncr_cache; /* to be aligned _NOT_ static */ /*========================================================== ** @@ -1298,7 +1299,7 @@ struct cfdriver ncrcd = { static u_long ncr_count; -struct pci_device ncr_device = { +static struct pci_device ncr_device = { "ncr", ncr_probe, ncr_attach, @@ -1310,7 +1311,7 @@ DATA_SET (pcidevice_set, ncr_device); #endif /* !__NetBSD__ */ -struct scsi_adapter ncr_switch = +static struct scsi_adapter ncr_switch = { ncr_start, ncr_min_phys, @@ -1322,7 +1323,7 @@ struct scsi_adapter ncr_switch = #endif /* !__NetBSD__ */ }; -struct scsi_device ncr_dev = +static struct scsi_device ncr_dev = { NULL, /* Use default error handler */ NULL, /* have a queue, served by this */ @@ -3506,7 +3507,7 @@ ncr_intr(arg) { ncb_p np = arg; #else /* !__NetBSD__ */ -int +static int ncr_intr(np) ncb_p np; { diff --git a/sys/pci/pci.c b/sys/pci/pci.c index c80da37..f9263b8 100644 --- a/sys/pci/pci.c +++ b/sys/pci/pci.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: pci.c,v 1.35 1995/12/06 15:52:23 se Exp $ +** $Id: pci.c,v 1.36 1995/12/07 12:47:42 davidg Exp $ ** ** General subroutines for the PCI bus. ** pci_configure () @@ -139,7 +139,7 @@ pci_bridge_config (void); unsigned pci_max_burst_len = 3; /* 2=16Byte, 3=32Byte, 4=64Byte, ... */ unsigned pci_mechanism = 0; unsigned pci_maxdevice = 0; -struct pcibus* pcibus; +static struct pcibus* pcibus; /*-------------------------------------------------------- ** @@ -1132,7 +1132,7 @@ pci_internalize (struct kern_devconf *kdcp, struct sysctl_req *re) **----------------------------------------------------------------------- */ -struct pci_int_desc* +static struct pci_int_desc* pci_int_desc [PCI_MAX_IRQ]; #ifndef NO_SHARED_IRQ diff --git a/sys/pci/pcisupport.c b/sys/pci/pcisupport.c index c65dcb6..3b6ebd0 100644 --- a/sys/pci/pcisupport.c +++ b/sys/pci/pcisupport.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: pcisupport.c,v 1.22 1995/09/14 17:26:24 se Exp $ +** $Id: pcisupport.c,v 1.23 1995/12/05 20:40:10 bde Exp $ ** ** Device driver for DEC/INTEL PCI chipsets. ** @@ -63,7 +63,7 @@ static char* chipset_probe (pcici_t tag, pcidi_t type); static void chipset_attach(pcici_t tag, int unit); static u_long chipset_count; -struct pci_device chipset_device = { +static struct pci_device chipset_device = { "chip", chipset_probe, chipset_attach, @@ -448,7 +448,7 @@ static char* vga_probe (pcici_t tag, pcidi_t type); static void vga_attach (pcici_t tag, int unit); static u_long vga_count; -struct pci_device vga_device = { +static struct pci_device vga_device = { "vga", vga_probe, vga_attach, @@ -505,7 +505,7 @@ static char* lkm_probe (pcici_t tag, pcidi_t type); static void lkm_attach (pcici_t tag, int unit); static u_long lkm_count; -struct pci_device lkm_device = { +static struct pci_device lkm_device = { "lkm", lkm_probe, lkm_attach, @@ -540,7 +540,7 @@ static char* ign_probe (pcici_t tag, pcidi_t type); static void ign_attach (pcici_t tag, int unit); static u_long ign_count; -struct pci_device ign_device = { +static struct pci_device ign_device = { NULL, ign_probe, ign_attach, |