Remove unused functions and variables, make things static, and other cleanups.

This commit is contained in:
Poul-Henning Kamp 1995-10-28 15:39:31 +00:00
parent 404392d45c
commit 4ccc87c594
46 changed files with 270 additions and 531 deletions

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
* $Id: trap.c,v 1.60 1995/10/04 07:07:44 julian Exp $
* $Id: trap.c,v 1.61 1995/10/09 04:36:01 bde Exp $
*/
/*
@ -181,7 +181,7 @@ trap(frame)
struct proc *p = curproc;
u_quad_t sticks = 0;
int i = 0, ucode = 0, type, code;
#ifdef DIAGNOSTIC
#ifdef DEBUG
u_long eva;
#endif
@ -609,7 +609,6 @@ trap_pfault(frame, usermode)
if (map != kernel_map) {
vm_offset_t v;
vm_page_t ptepg;
/*
* Keep swapout from messing with us during this
@ -931,7 +930,6 @@ void
linux_syscall(frame)
struct trapframe frame;
{
int i;
struct proc *p = curproc;
struct sysent *callp;
u_quad_t sticks;

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
* $Id: clock.c,v 1.36 1995/08/25 19:24:56 bde Exp $
* $Id: clock.c,v 1.37 1995/10/12 20:39:49 wollman Exp $
*/
/*
@ -505,7 +505,7 @@ void
resettodr()
{
unsigned long tm;
int y, m, fd, r, s;
int y, m, s;
if (disable_rtc_set)
return;

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
* $Id: clock.c,v 1.36 1995/08/25 19:24:56 bde Exp $
* $Id: clock.c,v 1.37 1995/10/12 20:39:49 wollman Exp $
*/
/*
@ -505,7 +505,7 @@ void
resettodr()
{
unsigned long tm;
int y, m, fd, r, s;
int y, m, s;
if (disable_rtc_set)
return;

View File

@ -13,7 +13,7 @@
* the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000,
* and a variety of similar clones.
*
* $Id: if_ed.c,v 1.79 1995/10/21 00:55:23 phk Exp $
* $Id: if_ed.c,v 1.80 1995/10/26 20:29:27 julian Exp $
*/
#include "ed.h"
@ -307,7 +307,6 @@ static inline void
ed_registerdev(struct isa_device *id, const char *descr)
{
struct kern_devconf *kdc = &ed_softc[id->id_unit].kdc;
char *longdescr;
*kdc = kdc_ed_template;
kdc->kdc_unit = id->id_unit;
kdc->kdc_parentdata = id;
@ -1289,7 +1288,7 @@ ed_probe_pccard(isa_dev, ether)
struct ed_softc *sc = &ed_softc[isa_dev->id_unit];
int i;
u_int memsize;
u_char iptr, isa16bit, sum;
u_char isa16bit;
sc->nic_addr = isa_dev->id_iobase;
sc->gone = 0;

View File

@ -38,7 +38,7 @@
*/
/*
* $Id: if_ep.c,v 1.31 1995/10/13 19:47:44 wollman Exp $
* $Id: if_ep.c,v 1.32 1995/10/26 20:29:37 julian Exp $
*
* Promiscuous mode added and interrupt logic slightly changed
* to reduce the number of adapter failures. Transceiver select
@ -309,7 +309,6 @@ epprobe(is)
{
struct ep_softc *sc = &ep_softc[is->id_unit];
u_short k;
int i;
ep_registerdev(is);
@ -778,11 +777,8 @@ void
epintr(unit)
int unit;
{
int i;
register int status;
register struct ep_softc *sc = &ep_softc[unit];
struct ifnet *ifp = &sc->arpcom.ac_if;
struct mbuf *m;
int x;
x=splbio();

View File

@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
* $Id: fd.c,v 1.65 1995/10/04 07:01:23 joerg Exp $
* $Id: fd.c,v 1.66 1995/10/09 15:00:36 joerg Exp $
*
*/
@ -978,7 +978,6 @@ Fdopen(dev_t dev, int flags, int mode, struct proc *p)
fdu_t fdu = FDUNIT(minor(dev));
int type = FDTYPE(minor(dev));
fdc_p fdc;
int st3;
#if NFT > 0
/* check for a tape open */
@ -1260,7 +1259,7 @@ fdintr(fdcu_t fdcu)
static int
fdstate(fdcu_t fdcu, fdc_p fdc)
{
int read, format, head, sec = 0, i = 0, sectrac, st0, cyl, st3;
int read, format, head, sec = 0, sectrac, st0, cyl, st3;
unsigned long blknum;
fdu_t fdu = fdc->fdu;
fd_p fd;

View File

@ -229,7 +229,6 @@ lnc_stop(int unit)
void
lnc_reset(int unit)
{
int s;
lnc_init(unit);
}
@ -825,10 +824,10 @@ lnc_tint(int unit)
int
lnc_probe(struct isa_device * isa_dev)
{
int nports;
int vsw;
int nports;
#ifdef DIAGNOSTIC
int vsw;
vsw = inw(isa_dev->id_iobase + PCNET_VSW);
printf("Vendor Specific Word = %x\n", vsw);
#endif
@ -1120,7 +1119,6 @@ lnc_init(int unit)
struct lnc_softc *sc = &lnc_softc[unit];
int s, i;
char *lnc_mem;
struct mbuf *m = 0;
/* Check that interface has valid address */
@ -1423,7 +1421,6 @@ lnc_start(struct ifnet *ifp)
int end_of_packet;
struct mbuf *head, *m;
int len, chunk;
char *buffer;
int addr;
int no_entries_needed;

View File

@ -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.45 1995/08/15 19:56:59 joerg Exp $
* $Id: mcd.c,v 1.46 1995/09/08 11:07:48 bde Exp $
*/
static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
@ -169,10 +169,11 @@ int mcdclose(dev_t dev, int flags, int fmt, struct proc *p);
void mcdstrategy(struct buf *bp);
int mcdioctl(dev_t dev, int cmd, caddr_t addr, int flags, struct proc *p);
int mcdsize(dev_t dev);
static void mcd_done(struct mcd_mbx *mbx);
static void mcd_start(int unit);
static int mcd_getdisklabel(int unit);
#ifdef NOTYET
static void mcd_configure(struct mcd_data *cd);
#endif
static int mcd_get(int unit, char *buf, int nmax);
static int mcd_setflags(int unit,struct mcd_data *cd);
static int mcd_getstat(int unit,int sflg);
@ -203,8 +204,8 @@ static int mcd_lock_door(int unit, int lock);
static int mcd_close_tray(int unit);
extern int hz;
extern int mcd_probe(struct isa_device *dev);
extern int mcd_attach(struct isa_device *dev);
static int mcd_probe(struct isa_device *dev);
static int mcd_attach(struct isa_device *dev);
struct isa_driver mcddriver = { mcd_probe, mcd_attach, "mcd" };
#define mcd_put(port,byte) outb(port,byte)
@ -248,7 +249,6 @@ mcd_registerdev(struct isa_device *id)
int mcd_attach(struct isa_device *dev)
{
struct mcd_data *cd = mcd_data + dev->id_unit;
int i;
cd->iobase = dev->id_iobase;
cd->flags |= MCDINIT;
@ -449,7 +449,6 @@ static void mcd_start(int unit)
struct mcd_data *cd = mcd_data + unit;
struct buf *bp, *qp = &cd->head;
struct partition *p;
int part;
register s = splbio();
if (cd->flags & MCDMBXBSY) {
@ -679,11 +678,13 @@ drqs[] = {
};
#endif
#ifdef NOT_YET
static void
mcd_configure(struct mcd_data *cd)
{
outb(cd->iobase+mcd_config,cd->config);
}
#endif
/* Wait for non-busy - return 0 on timeout */
static int
@ -707,7 +708,6 @@ mcd_probe(struct isa_device *dev)
int port = dev->id_iobase;
int unit = dev->id_unit;
int i, j;
int status;
unsigned char stbytes[3];
mcd_registerdev(dev);
@ -796,7 +796,6 @@ mcd_waitrdy(int port,int dly)
static int
mcd_getreply(int unit,int dly)
{
int i;
struct mcd_data *cd = mcd_data + unit;
int port = cd->iobase;
@ -854,7 +853,6 @@ mcd_setflags(int unit, struct mcd_data *cd)
static int
mcd_get(int unit, char *buf, int nmax)
{
int port = mcd_data[unit].iobase;
int i,k;
for (i=0; i<nmax; i++) {
@ -926,7 +924,6 @@ static int
mcd_volinfo(int unit)
{
struct mcd_data *cd = mcd_data + unit;
int i;
/* Just return if we already have it */
if (cd->flags & MCDVOLINFO) return 0;

View File

@ -41,7 +41,7 @@
*/
/* $Id: scd.c,v 1.6 1995/09/08 11:07:55 bde Exp $ */
/* $Id: scd.c,v 1.7 1995/09/19 18:55:15 bde Exp $ */
/* Please send any comments to micke@dynas.se */
@ -100,7 +100,7 @@
#define SCDBLKSIZE 2048
#ifdef SCD_DEBUG
int scd_debuglevel = SCD_DEBUG;
static int scd_debuglevel = SCD_DEBUG;
# define XDEBUG(level, data) {if (scd_debuglevel >= level) printf data;}
#else
# define XDEBUG(level, data)
@ -118,7 +118,7 @@ struct scd_mbx {
short count;
};
struct scd_data {
static struct scd_data {
int iobase;
char double_speed;
char *name;
@ -156,7 +156,6 @@ static int msf2hsg(bcd_t *msf);
static void process_attention(unsigned unit);
static inline void write_control(unsigned port, unsigned data);
static int waitfor_status_bits(int unit, int bits_set, int bits_clear);
static int waitfor_attention(int unit);
static int send_cmd(u_int unit, u_char cmd, u_int nargs, ...);
static void init_drive(unsigned unit);
static int spin_up(unsigned unit);
@ -184,8 +183,8 @@ static int scd_toc_entrys(int unit, struct ioc_read_toc_entry *te);
extern int hz;
int scd_probe(struct isa_device *dev);
int scd_attach(struct isa_device *dev);
static int scd_probe(struct isa_device *dev);
static int scd_attach(struct isa_device *dev);
struct isa_driver scddriver = { scd_probe, scd_attach, "scd" };
static struct kern_devconf kdc_scd[NSCD] = { {
@ -212,7 +211,6 @@ scd_registerdev(struct isa_device *id)
int scd_attach(struct isa_device *dev)
{
struct scd_data *cd = scd_data + dev->id_unit;
int i;
cd->iobase = dev->id_iobase; /* Already set by probe, but ... */
@ -287,8 +285,6 @@ scdclose(dev_t dev, int flags, int fmt, struct proc *p)
{
int unit,part,phys;
struct scd_data *cd;
int rlen;
char rdata[10];
unit = scd_unit(dev);
if (unit >= NSCD)
@ -386,7 +382,6 @@ scd_start(int unit)
struct scd_data *cd = scd_data + unit;
struct buf *bp, *qp = &cd->head;
struct partition *p;
int part;
register s = splbio();
if (cd->flags & SCDMBXBSY) {
@ -511,7 +506,7 @@ scd_playtracks(int unit, struct ioc_play_track *pt)
struct ioc_play_msf msf;
int a = pt->start_track;
int z = pt->end_track;
int rc, i;
int rc;
if (!(cd->flags & SCDTOC) && (rc = read_toc(unit)) != 0) {
if (rc == -ERR_NOT_SPINNING) {
@ -638,7 +633,6 @@ static int
scd_eject(int unit)
{
struct scd_data *cd = scd_data + unit;
int port = cd->iobase;
cd->audio_status = CD_AS_AUDIO_INVALID;
cd->flags &= ~(SCDSPINNING|SCDTOC);
@ -794,10 +788,9 @@ scd_doread(int state, struct scd_mbx *mbxin)
int port = mbx->port;
struct buf *bp = mbx->bp;
struct scd_data *cd = scd_data + unit;
int reg,i,k,c;
int reg,i;
int blknum;
caddr_t addr;
char rdata[10];
static char sdata[3]; /* Must be preserved between calls to this function */
loop:
@ -836,7 +829,6 @@ trystat:
mbx->sz = cd->blksize;
firstblock:
/* for first block */
mbx->nblk = (bp->b_bcount + (mbx->sz-1)) / mbx->sz;
mbx->skip = 0;
@ -1093,7 +1085,6 @@ process_attention(unsigned unit)
unsigned port = scd_data[unit].iobase;
unsigned char code;
int count = 0;
int i;
while (IS_ATTENTION(port) && count++ < 30) {
write_control(port, CBIT_ATTENTION_CLEAR);
@ -1314,7 +1305,6 @@ get_result(u_int unit, int result_len, u_char *result)
{
unsigned int port = scd_data[unit].iobase;
unsigned int res_reg = port + IREG_RESULT;
unsigned char c;
int loop_index = 2; /* send_cmd() reads two bytes ... */
XDEBUG(1, ("scd%d: DEBUG: get_result: bytes=%d\n", unit, result_len));
@ -1375,7 +1365,8 @@ send_cmd(u_int unit, u_char cmd, u_int nargs, ...)
outb(port+OREG_COMMAND, cmd);
if (rc = waitfor_status_bits(unit, SBIT_RESULT_READY, SBIT_BUSY))
rc = waitfor_status_bits(unit, SBIT_RESULT_READY, SBIT_BUSY);
if (rc)
return -0x100;
reg = port + IREG_RESULT;

View File

@ -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.9 1995/09/22 20:00:12 peter Exp $
* $Id: si.c,v 1.10 1995/10/21 09:10:49 peter Exp $
*/
#ifndef lint
@ -1198,11 +1198,9 @@ si_Sioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
volatile struct si_reg *regp;
struct si_tcsi *dp;
struct si_pstat *sps;
BYTE *bp;
int i, *ip, error = 0;
int *ip, error = 0;
int oldspl;
int card, port;
unsigned short *usp;
int mynor = minor(dev);
DPRINT((0, DBG_ENTRY|DBG_IOCTL, "si_Sioctl(%x,%x,%x,%x)\n",
@ -1675,7 +1673,7 @@ siintr(int unit)
volatile struct si_channel *ccbp;
register struct tty *tp;
volatile caddr_t maddr;
BYTE op, ip, cc;
BYTE op, ip;
int x, card, port, n, i;
volatile BYTE *z;
BYTE c;

View File

@ -13,7 +13,7 @@
*
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
* $Id: apm.c,v 1.12 1995/05/30 07:58:06 rgrimes Exp $
* $Id: apm.c,v 1.13 1995/07/16 10:11:30 bde Exp $
*/
#include "apm.h"
@ -202,7 +202,7 @@ apm_enable_disable_pm(struct apm_softc *sc, int enable)
static void
apm_driver_version(void)
{
u_long eax, ebx, ecx, i;
u_long eax, ebx, ecx;
#ifdef APM_DEBUG
eax = (APM_BIOS<<8) | APM_INSTCHECK;
@ -667,7 +667,6 @@ int
#ifdef MACH_KERNEL
int unit = devc->unit;
#endif /* MACH_KERNEL */
struct apm_softc *sc = &apm_softc[unit];
switch (apm_version) {
case APMINI_CANTFIND:
@ -787,7 +786,6 @@ apmattach(struct bus_device *dvp)
#define APM_KERNBASE VM_MIN_KERNEL_ADDRESS
#endif /* MACH_KERNEL */
struct apm_softc *sc = &apm_softc[unit];
int i;
master_softc = sc; /* XXX */
sc->initialized = 0;
@ -924,7 +922,6 @@ apmioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p)
{
struct apm_softc *sc = &apm_softc[minor(dev)];
int error = 0;
int pl;
#ifdef APM_DEBUG
printf("APM ioctl: minor = %d, cmd = 0x%x\n", minor(dev), cmd);

View File

@ -13,7 +13,7 @@
*
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
* $Id: apm.c,v 1.12 1995/05/30 07:58:06 rgrimes Exp $
* $Id: apm.c,v 1.13 1995/07/16 10:11:30 bde Exp $
*/
#include "apm.h"
@ -202,7 +202,7 @@ apm_enable_disable_pm(struct apm_softc *sc, int enable)
static void
apm_driver_version(void)
{
u_long eax, ebx, ecx, i;
u_long eax, ebx, ecx;
#ifdef APM_DEBUG
eax = (APM_BIOS<<8) | APM_INSTCHECK;
@ -667,7 +667,6 @@ int
#ifdef MACH_KERNEL
int unit = devc->unit;
#endif /* MACH_KERNEL */
struct apm_softc *sc = &apm_softc[unit];
switch (apm_version) {
case APMINI_CANTFIND:
@ -787,7 +786,6 @@ apmattach(struct bus_device *dvp)
#define APM_KERNBASE VM_MIN_KERNEL_ADDRESS
#endif /* MACH_KERNEL */
struct apm_softc *sc = &apm_softc[unit];
int i;
master_softc = sc; /* XXX */
sc->initialized = 0;
@ -924,7 +922,6 @@ apmioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p)
{
struct apm_softc *sc = &apm_softc[minor(dev)];
int error = 0;
int pl;
#ifdef APM_DEBUG
printf("APM ioctl: minor = %d, cmd = 0x%x\n", minor(dev), cmd);

View File

@ -14,7 +14,7 @@
*
* commenced: Sun Sep 27 18:14:01 PDT 1992
*
* $Id: aha1742.c,v 1.36 1995/08/23 23:02:24 gibbs Exp $
* $Id: aha1742.c,v 1.37 1995/09/19 18:55:06 bde Exp $
*/
#include <sys/types.h>
@ -262,24 +262,24 @@ struct ahb_data {
int numecbs;
} *ahbdata[NAHB];
int ahbprobe();
int ahbprobe1 __P((struct isa_device *dev));
int ahb_attach();
int ahb_init __P((int unit));
inthand2_t ahbintr;
int32 ahb_scsi_cmd();
timeout_t ahb_timeout;
void ahb_done();
static struct ecb *cheat;
void ahb_free_ecb();
void ahbminphys();
struct ecb *ahb_ecb_phys_kv();
u_int32 ahb_adapter_info();
static int ahbprobe();
static int ahbprobe1 __P((struct isa_device *dev));
static int ahb_attach();
static int ahb_init __P((int unit));
inthand2_t ahbintr;
static int32 ahb_scsi_cmd();
static timeout_t ahb_timeout;
static void ahb_done();
static struct ecb *cheat;
static void ahb_free_ecb();
static void ahbminphys();
static struct ecb *ahb_ecb_phys_kv();
static u_int32 ahb_adapter_info();
#define EISA_MAX_SLOTS 16 /* XXX This should go into a comon header */
static ahb_slot = 0; /* slot last board was found in */
static ahb_unit = 0;
int ahb_debug = 0;
static int ahb_slot = 0; /* slot last board was found in */
static int ahb_unit = 0;
static int ahb_debug = 0;
#define AHB_SHOWECBS 0x01
#define AHB_SHOWINTS 0x02
#define AHB_SHOWCMDS 0x04
@ -296,7 +296,7 @@ struct isa_driver ahbdriver =
"ahb"
};
struct scsi_adapter ahb_switch =
static struct scsi_adapter ahb_switch =
{
ahb_scsi_cmd,
ahbminphys,
@ -308,7 +308,7 @@ struct scsi_adapter ahb_switch =
};
/* the below structure is so we have a default dev struct for our link struct */
struct scsi_device ahb_dev =
static struct scsi_device ahb_dev =
{
NULL, /* Use default error handler */
NULL, /* have a queue, served by this */
@ -354,7 +354,7 @@ main()
/*
* Function to send a command out through a mailbox
*/
void
static void
ahb_send_mbox(int unit, int opcode, int target, struct ecb *ecb)
{
int port = ahbdata[unit]->baseport;
@ -382,7 +382,7 @@ ahb_send_mbox(int unit, int opcode, int target, struct ecb *ecb)
/*
* Function to poll for command completion when in poll mode
*/
int
static int
ahb_poll(int unit, int wait)
{ /* in msec */
struct ahb_data *ahb = ahbdata[unit];
@ -412,7 +412,7 @@ ahb_poll(int unit, int wait)
/*
* Function to send an immediate type command to the adapter
*/
void
static void
ahb_send_immed(int unit, int target, u_long cmd)
{
int port = ahbdata[unit]->baseport;
@ -441,7 +441,7 @@ ahb_send_immed(int unit, int target, u_long cmd)
* If we find one, note it's address (slot) and call
* the actual probe routine to check it out.
*/
int
static int
ahbprobe(dev)
struct isa_device *dev;
{
@ -476,7 +476,7 @@ ahbprobe(dev)
* as an argument, takes the isa_device structure from
* autoconf.c.
*/
int
static int
ahbprobe1(dev)
struct isa_device *dev;
{
@ -533,7 +533,7 @@ ahbprobe1(dev)
/*
* Attach all the sub-devices we can find
*/
int
static int
ahb_attach(dev)
struct isa_device *dev;
{
@ -571,7 +571,7 @@ ahb_attach(dev)
* Return some information to the caller about
* the adapter and it's capabilities
*/
u_int32
static u_int32
ahb_adapter_info(unit)
int unit;
{
@ -669,7 +669,7 @@ ahbintr(unit)
* adaptor, now we look to see how the operation
* went.
*/
void
static void
ahb_done(unit, ecb, state)
int unit, state;
struct ecb *ecb;
@ -753,7 +753,7 @@ done: xs->flags |= ITSDONE;
* A ecb (and hence a mbx-out is put onto the
* free list.
*/
void
static void
ahb_free_ecb(unit, ecb, flags)
int unit, flags;
struct ecb *ecb;
@ -784,7 +784,7 @@ ahb_free_ecb(unit, ecb, flags)
* new one. If so, put it in the hash table too
* otherwise either return an error or sleep
*/
struct ecb *
static struct ecb *
ahb_get_ecb(unit, flags)
int unit, flags;
{
@ -840,7 +840,7 @@ gottit: if (!(flags & SCSI_NOMASK))
* given a physical address, find the ecb that
* it corresponds to:
*/
struct ecb *
static struct ecb *
ahb_ecb_phys_kv(ahb, ecb_phys)
struct ahb_data *ahb;
physaddr ecb_phys;
@ -859,7 +859,7 @@ ahb_ecb_phys_kv(ahb, ecb_phys)
/*
* Start the board, ready for normal operation
*/
int
static int
ahb_init(unit)
int unit;
{
@ -955,7 +955,7 @@ ahb_init(unit)
#define min(x,y) (x < y ? x : y)
#endif /* min */
void
static void
ahbminphys(bp)
struct buf *bp;
{
@ -969,7 +969,7 @@ ahbminphys(bp)
* the data address. Also needs the unit, target
* and lu
*/
int32
static int32
ahb_scsi_cmd(xs)
struct scsi_xfer *xs;
{
@ -1181,7 +1181,7 @@ ahb_scsi_cmd(xs)
return (COMPLETE);
}
void
static void
ahb_timeout(void *arg1)
{
struct ecb * ecb = (struct ecb *)arg1;
@ -1236,7 +1236,7 @@ ahb_timeout(void *arg1)
}
#ifdef AHBDEBUG
void
static void
ahb_print_ecb(ecb)
struct ecb *ecb;
{
@ -1253,7 +1253,7 @@ ahb_print_ecb(ecb)
show_scsi_cmd(ecb->xs);
}
void
static void
ahb_print_active_ecb(int unit)
{
struct ahb_data *ahb = ahbdata[unit];

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
* $Id: trap.c,v 1.60 1995/10/04 07:07:44 julian Exp $
* $Id: trap.c,v 1.61 1995/10/09 04:36:01 bde Exp $
*/
/*
@ -181,7 +181,7 @@ trap(frame)
struct proc *p = curproc;
u_quad_t sticks = 0;
int i = 0, ucode = 0, type, code;
#ifdef DIAGNOSTIC
#ifdef DEBUG
u_long eva;
#endif
@ -609,7 +609,6 @@ trap_pfault(frame, usermode)
if (map != kernel_map) {
vm_offset_t v;
vm_page_t ptepg;
/*
* Keep swapout from messing with us during this
@ -931,7 +930,6 @@ void
linux_syscall(frame)
struct trapframe frame;
{
int i;
struct proc *p = curproc;
struct sysent *callp;
u_quad_t sticks;

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
* $Id: clock.c,v 1.36 1995/08/25 19:24:56 bde Exp $
* $Id: clock.c,v 1.37 1995/10/12 20:39:49 wollman Exp $
*/
/*
@ -505,7 +505,7 @@ void
resettodr()
{
unsigned long tm;
int y, m, fd, r, s;
int y, m, s;
if (disable_rtc_set)
return;

View File

@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
* $Id: aha1542.c,v 1.47 1995/09/19 18:55:04 bde Exp $
* $Id: aha1542.c,v 1.48 1995/10/01 15:09:51 dufault Exp $
*/
/*
@ -293,7 +293,7 @@ struct aha_extbios
int aha_debug = 1;
#endif /*AHADEBUG */
struct aha_data {
static struct aha_data {
short aha_base; /* base port for each board */
/*
* xor this with a physaddr to get a kv addr and visa versa
@ -318,18 +318,18 @@ struct aha_data {
struct scsi_link sc_link; /* prototype for subdevs */
} *ahadata[NAHA];
struct aha_ccb *aha_get_ccb();
int ahaprobe();
void aha_done();
int ahaattach();
inthand2_t ahaintr;
int32 aha_scsi_cmd();
timeout_t aha_timeout;
void ahaminphys();
u_int32 aha_adapter_info();
inthand2_t ahaintr;
static struct aha_ccb *aha_get_ccb();
static int ahaprobe();
static void aha_done();
static int ahaattach();
static int32 aha_scsi_cmd();
static timeout_t aha_timeout;
static void ahaminphys();
static u_int32 aha_adapter_info();
#ifdef KERNEL
struct scsi_adapter aha_switch =
static struct scsi_adapter aha_switch =
{
aha_scsi_cmd,
ahaminphys,
@ -341,7 +341,7 @@ struct scsi_adapter aha_switch =
};
/* the below structure is so we have a default dev struct for out link struct */
struct scsi_device aha_dev =
static struct scsi_device aha_dev =
{
NULL, /* Use default error handler */
NULL, /* have a queue, served by this */
@ -393,8 +393,8 @@ static int ahaunit = 0;
#define AHA_RESET_TIMEOUT 2000 /* time to wait for reset (mSec) */
int aha_poll __P((int, struct scsi_xfer *, struct aha_ccb *));
int aha_init __P((int));
static int aha_poll __P((int, struct scsi_xfer *, struct aha_ccb *));
static int aha_init __P((int));
#ifndef KERNEL
main()
@ -421,7 +421,7 @@ main()
* commands tells it to read in a scsi command but that one is done
* separately. This is only called during set-up.
*/
int
static int
aha_cmd(unit, icnt, ocnt, wait, retval, opcode, args)
int unit;
int icnt;
@ -540,7 +540,7 @@ aha_cmd(unit, icnt, ocnt, wait, retval, opcode, args)
* as an argument, takes the isa_device structure from
* autoconf.c
*/
int
static int
ahaprobe(dev)
struct isa_device *dev;
{
@ -619,7 +619,7 @@ ahaprobe(dev)
/*
* Attach all the sub-devices we can find
*/
int
static int
ahaattach(dev)
struct isa_device *dev;
{
@ -658,7 +658,7 @@ ahaattach(dev)
* Return some information to the caller about the adapter and its
* capabilities.
*/
u_int32
static u_int32
aha_adapter_info(unit)
int unit;
{
@ -781,7 +781,7 @@ ahaintr(unit)
* A ccb (and hence a mbx-out) is put onto the
* free list.
*/
void
static void
aha_free_ccb(unit, ccb, flags)
int unit;
struct aha_ccb *ccb;
@ -810,7 +810,7 @@ aha_free_ccb(unit, ccb, flags)
/*
* Get a free ccb (and hence mbox-out entry)
*/
struct aha_ccb *
static struct aha_ccb *
aha_get_ccb(unit, flags)
int unit;
int flags;
@ -874,7 +874,7 @@ put_host_stat(int host_stat)
* adaptor, now we look to see how the operation
* went. Wake up the owner if waiting
*/
void
static void
aha_done(unit, ccb)
int unit;
struct aha_ccb *ccb;
@ -1002,7 +1002,7 @@ static char *board_rev(int unit, int type)
/*
* Start the board, ready for normal operation
*/
int
static int
aha_init(unit)
int unit;
{
@ -1262,7 +1262,7 @@ aha_init(unit)
return 0;
}
void
static void
ahaminphys(bp)
struct buf *bp;
{
@ -1273,7 +1273,8 @@ ahaminphys(bp)
}
}
int aha_escape(xs, ccb)
static int
aha_escape(xs, ccb)
struct scsi_xfer *xs;
struct aha_ccb *ccb;
{
@ -1363,7 +1364,7 @@ static int physcontig(int kv, int len)
* the data address. Also needs the unit, target
* and lu
*/
int32
static int32
aha_scsi_cmd(xs)
struct scsi_xfer *xs;
{
@ -1624,7 +1625,7 @@ aha_scsi_cmd(xs)
/*
* Poll a particular unit, looking for a particular xs
*/
int
static int
aha_poll(unit, xs, ccb)
int unit;
struct scsi_xfer *xs;
@ -1719,7 +1720,7 @@ static struct bus_speed
{0xff,450}
};
int
static int
aha_set_bus_speed(unit)
int unit;
{
@ -1769,7 +1770,7 @@ static char aha_test_string[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijk
u_char aha_scratch_buf[256];
int
static int
aha_bus_speed_check(unit, speed)
int unit, speed;
{
@ -1822,7 +1823,7 @@ aha_bus_speed_check(unit, speed)
}
#endif /*TUNE_1542*/
void
static void
aha_timeout(void *arg1)
{
struct aha_ccb * ccb = (struct aha_ccb *)arg1;

View File

@ -14,7 +14,7 @@
*
* commenced: Sun Sep 27 18:14:01 PDT 1992
*
* $Id: aha1742.c,v 1.36 1995/08/23 23:02:24 gibbs Exp $
* $Id: aha1742.c,v 1.37 1995/09/19 18:55:06 bde Exp $
*/
#include <sys/types.h>
@ -262,24 +262,24 @@ struct ahb_data {
int numecbs;
} *ahbdata[NAHB];
int ahbprobe();
int ahbprobe1 __P((struct isa_device *dev));
int ahb_attach();
int ahb_init __P((int unit));
inthand2_t ahbintr;
int32 ahb_scsi_cmd();
timeout_t ahb_timeout;
void ahb_done();
static struct ecb *cheat;
void ahb_free_ecb();
void ahbminphys();
struct ecb *ahb_ecb_phys_kv();
u_int32 ahb_adapter_info();
static int ahbprobe();
static int ahbprobe1 __P((struct isa_device *dev));
static int ahb_attach();
static int ahb_init __P((int unit));
inthand2_t ahbintr;
static int32 ahb_scsi_cmd();
static timeout_t ahb_timeout;
static void ahb_done();
static struct ecb *cheat;
static void ahb_free_ecb();
static void ahbminphys();
static struct ecb *ahb_ecb_phys_kv();
static u_int32 ahb_adapter_info();
#define EISA_MAX_SLOTS 16 /* XXX This should go into a comon header */
static ahb_slot = 0; /* slot last board was found in */
static ahb_unit = 0;
int ahb_debug = 0;
static int ahb_slot = 0; /* slot last board was found in */
static int ahb_unit = 0;
static int ahb_debug = 0;
#define AHB_SHOWECBS 0x01
#define AHB_SHOWINTS 0x02
#define AHB_SHOWCMDS 0x04
@ -296,7 +296,7 @@ struct isa_driver ahbdriver =
"ahb"
};
struct scsi_adapter ahb_switch =
static struct scsi_adapter ahb_switch =
{
ahb_scsi_cmd,
ahbminphys,
@ -308,7 +308,7 @@ struct scsi_adapter ahb_switch =
};
/* the below structure is so we have a default dev struct for our link struct */
struct scsi_device ahb_dev =
static struct scsi_device ahb_dev =
{
NULL, /* Use default error handler */
NULL, /* have a queue, served by this */
@ -354,7 +354,7 @@ main()
/*
* Function to send a command out through a mailbox
*/
void
static void
ahb_send_mbox(int unit, int opcode, int target, struct ecb *ecb)
{
int port = ahbdata[unit]->baseport;
@ -382,7 +382,7 @@ ahb_send_mbox(int unit, int opcode, int target, struct ecb *ecb)
/*
* Function to poll for command completion when in poll mode
*/
int
static int
ahb_poll(int unit, int wait)
{ /* in msec */
struct ahb_data *ahb = ahbdata[unit];
@ -412,7 +412,7 @@ ahb_poll(int unit, int wait)
/*
* Function to send an immediate type command to the adapter
*/
void
static void
ahb_send_immed(int unit, int target, u_long cmd)
{
int port = ahbdata[unit]->baseport;
@ -441,7 +441,7 @@ ahb_send_immed(int unit, int target, u_long cmd)
* If we find one, note it's address (slot) and call
* the actual probe routine to check it out.
*/
int
static int
ahbprobe(dev)
struct isa_device *dev;
{
@ -476,7 +476,7 @@ ahbprobe(dev)
* as an argument, takes the isa_device structure from
* autoconf.c.
*/
int
static int
ahbprobe1(dev)
struct isa_device *dev;
{
@ -533,7 +533,7 @@ ahbprobe1(dev)
/*
* Attach all the sub-devices we can find
*/
int
static int
ahb_attach(dev)
struct isa_device *dev;
{
@ -571,7 +571,7 @@ ahb_attach(dev)
* Return some information to the caller about
* the adapter and it's capabilities
*/
u_int32
static u_int32
ahb_adapter_info(unit)
int unit;
{
@ -669,7 +669,7 @@ ahbintr(unit)
* adaptor, now we look to see how the operation
* went.
*/
void
static void
ahb_done(unit, ecb, state)
int unit, state;
struct ecb *ecb;
@ -753,7 +753,7 @@ done: xs->flags |= ITSDONE;
* A ecb (and hence a mbx-out is put onto the
* free list.
*/
void
static void
ahb_free_ecb(unit, ecb, flags)
int unit, flags;
struct ecb *ecb;
@ -784,7 +784,7 @@ ahb_free_ecb(unit, ecb, flags)
* new one. If so, put it in the hash table too
* otherwise either return an error or sleep
*/
struct ecb *
static struct ecb *
ahb_get_ecb(unit, flags)
int unit, flags;
{
@ -840,7 +840,7 @@ gottit: if (!(flags & SCSI_NOMASK))
* given a physical address, find the ecb that
* it corresponds to:
*/
struct ecb *
static struct ecb *
ahb_ecb_phys_kv(ahb, ecb_phys)
struct ahb_data *ahb;
physaddr ecb_phys;
@ -859,7 +859,7 @@ ahb_ecb_phys_kv(ahb, ecb_phys)
/*
* Start the board, ready for normal operation
*/
int
static int
ahb_init(unit)
int unit;
{
@ -955,7 +955,7 @@ ahb_init(unit)
#define min(x,y) (x < y ? x : y)
#endif /* min */
void
static void
ahbminphys(bp)
struct buf *bp;
{
@ -969,7 +969,7 @@ ahbminphys(bp)
* the data address. Also needs the unit, target
* and lu
*/
int32
static int32
ahb_scsi_cmd(xs)
struct scsi_xfer *xs;
{
@ -1181,7 +1181,7 @@ ahb_scsi_cmd(xs)
return (COMPLETE);
}
void
static void
ahb_timeout(void *arg1)
{
struct ecb * ecb = (struct ecb *)arg1;
@ -1236,7 +1236,7 @@ ahb_timeout(void *arg1)
}
#ifdef AHBDEBUG
void
static void
ahb_print_ecb(ecb)
struct ecb *ecb;
{
@ -1253,7 +1253,7 @@ ahb_print_ecb(ecb)
show_scsi_cmd(ecb->xs);
}
void
static void
ahb_print_active_ecb(int unit)
{
struct ahb_data *ahb = ahbdata[unit];

View File

@ -31,7 +31,7 @@
*/
/*
* $Id: aic6360.c,v 1.10 1995/08/23 23:02:25 gibbs Exp $
* $Id: aic6360.c,v 1.11 1995/09/19 18:55:07 bde Exp $
*
* Acknowledgements: Many of the algorithms used in this driver are
* inspired by the work of Julian Elischer (julian@tfs.com) and
@ -796,7 +796,6 @@ aicprobe(parent, self, aux)
struct aic_softc *aic = (void *)self;
struct isa_attach_args *ia = aux;
#endif
int i, len, ic;
#ifdef __FreeBSD__
if (unit >= NAIC) {
@ -875,7 +874,6 @@ aic_find(aic)
{
u_short iobase = aic->iobase;
char chip_id[sizeof(IDSTRING)]; /* For chips that support it */
char *start;
int i;
/* Remove aic6360 from possible powerdown mode */
@ -1172,7 +1170,6 @@ aic_scsi_cmd(xs)
struct acb *acb;
int s = 0;
int flags;
u_short iobase = aic->iobase;
SC_DEBUG(sc, SDEV_DB2, ("aic_scsi_cmd\n"));
AIC_TRACE(("aic_scsi_cmd\n"));
@ -1363,11 +1360,10 @@ aic_sched(aic)
register struct aic_softc *aic;
#endif
{
struct scsi_xfer *xs;
struct scsi_link *sc;
struct acb *acb;
u_short iobase = aic->iobase;
int t, l;
int t;
u_char simode0, simode1, scsiseq;
AIC_TRACE(("aic_sched\n"));
@ -1427,8 +1423,6 @@ aic_done(acb)
#else
struct aic_softc *aic = sc->adapter_softc;
#endif
u_short iobase = aic->iobase;
struct acb *acb2;
AIC_TRACE(("aic_done "));
@ -1853,7 +1847,6 @@ aic_msgout(aic)
register u_short iobase = aic->iobase;
struct aic_tinfo *ti;
struct acb *acb;
u_char dmastat, scsisig;
/* First determine what to send. If we haven't seen a
* phasechange this is a retransmission request.
@ -1964,7 +1957,6 @@ aic_dataout(aic)
{
register u_short iobase = aic->iobase;
register u_char dmastat;
struct acb *acb = aic->nexus;
int amount, olddleft = aic->dleft;
#define DOUTAMOUNT 128 /* Full FIFO */
@ -2085,8 +2077,7 @@ aic_datain(aic)
{
register u_short iobase = aic->iobase;
register u_char dmastat;
struct acb *acb = aic->nexus;
int amount, olddleft = aic->dleft;
int olddleft = aic->dleft;
#define DINAMOUNT 128 /* Default amount of data to transfer */
/* Enable DATA IN transfers */
@ -2222,9 +2213,7 @@ aicintr(aic)
register struct scsi_link *sc;
register u_short iobase = aic->iobase;
struct aic_tinfo *ti;
int done, amount;
u_char sstat0, sstat1, scsisig, dmastat, sstat2;
u_char scsiseq, simode0, simode1, sxfrctl0;
u_char sstat0, sstat1, sstat2, sxfrctl0;
LOGLINE(aic);

View File

@ -60,8 +60,8 @@
#include <i386/isa/isa.h>
#include <i386/isa/isa_device.h>
extern u_char d_inb(u_int port);
extern void d_outb(u_int port, u_char data);
static u_char d_inb(u_int port);
static void d_outb(u_int port, u_char data);
static struct kern_devconf kdc_bqu[NBQU] = { {
0, 0, 0, /* filled in by dev_attach */
@ -108,8 +108,8 @@ static struct kern_devconf kdc_bqu[NBQU] = { {
#define DEB2(x)
#endif
int bquprobe(struct isa_device *idp);
int bquattach(struct isa_device *idp);
static int bquprobe(struct isa_device *idp);
static int bquattach(struct isa_device *idp);
struct isa_driver bqudriver = {
@ -132,7 +132,7 @@ b004_base_addresses[B004_CHANCE] = {
};
void
static void
d_outb(u_int port, u_char data)
{
@ -140,7 +140,7 @@ d_outb(u_int port, u_char data)
outb(port,data);
}
u_char d_inb(u_int port)
static u_char d_inb(u_int port)
{
u_char ap;
ap=inb(port);
@ -533,7 +533,7 @@ bqu_registerdev(struct isa_device *id)
dev_attach(&kdc_bqu[id->id_unit]);
}
int
static int
bquattach(struct isa_device *idp)
{
kdc_bqu[idp->id_unit].kdc_state = DC_IDLE;
@ -547,7 +547,7 @@ bquattach(struct isa_device *idp)
* and sets up all relevant data-structures.
*/
int
static int
bquprobe(struct isa_device *idp)
{
unsigned int test;

View File

@ -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.40 1995/08/23 23:02:27 gibbs Exp $
* $Id: bt742a.c,v 1.41 1995/09/19 18:55:08 bde Exp $
*/
/*
@ -389,22 +389,22 @@ struct bt_data {
#define BT_SHOWINTS 0x02
#define BT_SHOWCMDS 0x04
#define BT_SHOWMISC 0x08
int bt_debug = 0;
static int bt_debug = 0;
#ifdef KERNEL
int btprobe();
int btattach();
inthand2_t btintr;
int32 bt_scsi_cmd();
int bt_poll __P((int unit, struct scsi_xfer *xs, struct bt_ccb *ccb));
void bt_timeout(void *);
int bt_init __P((int unit));
void bt_inquire_setup_information();
void bt_done();
void btminphys();
u_int32 bt_adapter_info();
struct bt_ccb *bt_get_ccb();
struct bt_ccb *bt_ccb_phys_kv();
static int btprobe();
static int btattach();
inthand2_t btintr;
static int32 bt_scsi_cmd();
static int bt_poll __P((int unit, struct scsi_xfer *xs, struct bt_ccb *ccb));
static void bt_timeout(void *);
static int bt_init __P((int unit));
static void bt_inquire_setup_information();
static void bt_done();
static void btminphys();
static u_int32 bt_adapter_info();
static struct bt_ccb *bt_get_ccb();
static struct bt_ccb *bt_ccb_phys_kv();
static int btunit = 0;
static int btprobing = 0;
@ -416,7 +416,7 @@ struct isa_driver btdriver =
"bt"
};
struct scsi_adapter bt_switch =
static struct scsi_adapter bt_switch =
{
bt_scsi_cmd,
btminphys,
@ -428,7 +428,7 @@ struct scsi_adapter bt_switch =
};
/* the below structure is so we have a default dev struct for out link struct */
struct scsi_device bt_dev =
static struct scsi_device bt_dev =
{
NULL, /* Use default error handler */
NULL, /* have a queue, served by this */
@ -488,7 +488,7 @@ main()
* scsi command, which is read in via the dma; one of the adapter commands
* tells it to read in a scsi command.
*/
int
static int
bt_cmd(unit, icnt, ocnt, wait, retval, opcode, args)
int unit;
int icnt;
@ -612,7 +612,7 @@ bt_cmd(unit, icnt, ocnt, wait, retval, opcode, args)
* as an argument, takes the isa_device structure from
* autoconf.c
*/
int
static int
btprobe(dev)
struct isa_device *dev;
{
@ -686,7 +686,7 @@ btprobe(dev)
/*
* Attach all the sub-devices we can find
*/
int
static int
btattach(dev)
struct isa_device *dev;
{
@ -727,7 +727,7 @@ btattach(dev)
* Return some information to the caller about the adapter and its
* capabilities.
*/
u_int32
static u_int32
bt_adapter_info(unit)
int unit;
{
@ -868,7 +868,7 @@ btintr(unit)
/*
* A ccb is put onto the free list.
*/
void
static void
bt_free_ccb(unit, ccb, flags)
int unit;
struct bt_ccb *ccb;
@ -899,7 +899,7 @@ bt_free_ccb(unit, ccb, flags)
* If there are none, see if we can allocate a new one. If so, put it in
* the hash table too otherwise either return an error or sleep.
*/
struct bt_ccb *
static struct bt_ccb *
bt_get_ccb(unit, flags)
int unit;
int flags;
@ -907,8 +907,6 @@ bt_get_ccb(unit, flags)
struct bt_data *bt = btdata[unit];
unsigned opri;
struct bt_ccb *ccbp;
struct bt_mbx *wmbx; /* Mail Box pointer specified unit */
BT_MBO *wmbo; /* Out Mail Box pointer */
int hashnum;
opri = splbio();
@ -960,7 +958,7 @@ bt_get_ccb(unit, flags)
* given a physical address, find the ccb that
* it corresponds to:
*/
struct bt_ccb *
static struct bt_ccb *
bt_ccb_phys_kv(bt, ccb_phys)
struct bt_data *bt;
physaddr ccb_phys;
@ -979,7 +977,7 @@ bt_ccb_phys_kv(bt, ccb_phys)
/*
* Get a MBO and then Send it
*/
BT_MBO *
static BT_MBO *
bt_send_mbo(int unit, int flags, int cmd, struct bt_ccb *ccb)
{
struct bt_data *bt = btdata[unit];
@ -1038,12 +1036,11 @@ bt_send_mbo(int unit, int flags, int cmd, struct bt_ccb *ccb)
* adaptor, now we look to see how the operation
* went. Wake up the owner if waiting
*/
void
static void
bt_done(unit, ccb)
int unit;
struct bt_ccb *ccb;
{
struct bt_data *bt = btdata[unit];
struct scsi_sense_data *s1, *s2;
struct scsi_xfer *xs = ccb->xfer;
@ -1099,7 +1096,7 @@ bt_done(unit, ccb)
/*
* Start the board, ready for normal operation
*/
int
static int
bt_init(unit)
int unit;
{
@ -1294,12 +1291,11 @@ bt_init(unit)
return 0;
}
void
static void
bt_inquire_setup_information(
int unit,
struct bt_ext_info *info )
{
struct bt_data *bt = btdata[unit];
struct bt_setup setup;
struct bt_sync_value sync;
char dummy[8];
@ -1409,7 +1405,7 @@ bt_inquire_setup_information(
#define min(x,y) (x < y ? x : y)
#endif /* min */
void
static void
btminphys(bp)
struct buf *bp;
{
@ -1422,23 +1418,17 @@ btminphys(bp)
* start a scsi operation given the command and the data address. Also needs
* the unit, target and lu.
*/
int32
static int32
bt_scsi_cmd(xs)
struct scsi_xfer *xs;
{
struct scsi_sense_data *s1, *s2;
struct bt_ccb *ccb;
struct bt_scat_gath *sg;
int seg; /* scatter gather seg being worked on */
int i = 0;
int c = 0;
int thiskv;
physaddr thisphys, nextphys;
int unit = xs->sc_link->adapter_unit;
int bytes_this_seg, bytes_this_page, datalen, flags;
struct iovec *iovp;
struct bt_data *bt = btdata[unit];
BT_MBO *mbo;
SC_DEBUG(xs->sc_link, SDEV_DB2, ("bt_scsi_cmd\n"));
/*
@ -1603,14 +1593,13 @@ bt_scsi_cmd(xs)
/*
* Poll a particular unit, looking for a particular xs
*/
int
static int
bt_poll(unit, xs, ccb)
int unit;
struct scsi_xfer *xs;
struct bt_ccb *ccb;
{
struct bt_data *bt = btdata[unit];
int done = 0;
int count = xs->timeout;
u_char stat;
@ -1671,7 +1660,7 @@ bt_poll(unit, xs, ccb)
return (COMPLETE);
}
void
static void
bt_timeout(void *arg1)
{
struct bt_ccb * ccb = (struct bt_ccb *)arg1;
@ -1727,7 +1716,7 @@ bt_timeout(void *arg1)
}
#ifdef UTEST
void
static void
bt_print_ccb(ccb)
struct bt_ccb *ccb;
{
@ -1743,7 +1732,7 @@ bt_print_ccb(ccb)
,ccb->flags);
}
void
static void
bt_print_active_ccbs(int unit)
{
struct bt_data *bt = btdata[unit];

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
* $Id: clock.c,v 1.36 1995/08/25 19:24:56 bde Exp $
* $Id: clock.c,v 1.37 1995/10/12 20:39:49 wollman Exp $
*/
/*
@ -505,7 +505,7 @@ void
resettodr()
{
unsigned long tm;
int y, m, fd, r, s;
int y, m, s;
if (disable_rtc_set)
return;

View File

@ -485,7 +485,6 @@ 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;
struct tty *tp = c->ttyp;
int i;
if (! tp)
return;

View File

@ -35,7 +35,7 @@
*
* from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91
* from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $
* $Id: diskslice_machdep.c,v 1.15 1995/08/23 10:41:57 jkh Exp $
* $Id: diskslice_machdep.c,v 1.16 1995/08/23 11:43:45 jkh Exp $
*/
#include <stddef.h>
@ -167,7 +167,6 @@ dsinit(dname, dev, strat, lp, sspp)
u_long mbr_offset;
char partname[2];
u_long secpercyl;
int slice;
char *sname;
struct diskslice *sp;
struct diskslices *ssp;
@ -369,7 +368,6 @@ extended(dname, dev, strat, lp, ssp, ext_offset, ext_size, base_ext_offset,
u_char *cp;
int dospart;
struct dos_partition *dp;
int end_slice;
u_long ext_offsets[NDOSPART];
u_long ext_sizes[NDOSPART];
char partname[2];

View File

@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
* $Id: fd.c,v 1.65 1995/10/04 07:01:23 joerg Exp $
* $Id: fd.c,v 1.66 1995/10/09 15:00:36 joerg Exp $
*
*/
@ -978,7 +978,6 @@ Fdopen(dev_t dev, int flags, int mode, struct proc *p)
fdu_t fdu = FDUNIT(minor(dev));
int type = FDTYPE(minor(dev));
fdc_p fdc;
int st3;
#if NFT > 0
/* check for a tape open */
@ -1260,7 +1259,7 @@ fdintr(fdcu_t fdcu)
static int
fdstate(fdcu_t fdcu, fdc_p fdc)
{
int read, format, head, sec = 0, i = 0, sectrac, st0, cyl, st3;
int read, format, head, sec = 0, sectrac, st0, cyl, st3;
unsigned long blknum;
fdu_t fdu = fdc->fdu;
fd_p fd;

View File

@ -91,10 +91,6 @@ int
gpprobe(struct isa_device *dvp)
{
int status;
short port;
u_char data;
u_char mask;
int i;
struct gpib_softc *sc = &gpib_sc;
@ -145,11 +141,8 @@ gpopen(dev, flags, fmt, p)
struct proc *p;
{
struct gpib_softc *sc = &gpib_sc;
int delay; /* slept time in 1/hz seconds of tsleep */
int err;
u_char sta, unit;
int status;
int counter;
u_char unit;
int status;
unit= minor(dev);
@ -468,7 +461,6 @@ void showregs() {
National Instruments. They should give you one if you call them*/
int initgpib() {
int counter;
outb(CMDR,0x20);
outb(CFG,0x16);
outb(IMR3,0);
@ -538,8 +530,7 @@ void closegpib() {
void enableremote(unsigned char device)
{
int status;
unsigned char bsrval;
char c;
status=EWOULDBLOCK;
if (status==EWOULDBLOCK) do {
status=tsleep((caddr_t)&gpib_sc,GPIBPRI,"gpibpoll",2);
@ -606,10 +597,7 @@ outb(AUXMR,0x5E); /*Clear SYNC*/
void menableremote(unsigned char *device)
{
int status;
unsigned char bsrval;
char c;
int counter=0;
int status, counter = 0;
status=EWOULDBLOCK;
if (status==EWOULDBLOCK) do {
@ -1189,8 +1177,6 @@ outb(AUXMR,0x5E); /*Clear SYNC*/
char spoll(unsigned char device)
{
int status=EWOULDBLOCK;
int counter;
int done;
unsigned int statusbyte;
if (!(inb(ISR2)&8)) do

View File

@ -13,7 +13,7 @@
* the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000,
* and a variety of similar clones.
*
* $Id: if_ed.c,v 1.79 1995/10/21 00:55:23 phk Exp $
* $Id: if_ed.c,v 1.80 1995/10/26 20:29:27 julian Exp $
*/
#include "ed.h"
@ -307,7 +307,6 @@ static inline void
ed_registerdev(struct isa_device *id, const char *descr)
{
struct kern_devconf *kdc = &ed_softc[id->id_unit].kdc;
char *longdescr;
*kdc = kdc_ed_template;
kdc->kdc_unit = id->id_unit;
kdc->kdc_parentdata = id;
@ -1289,7 +1288,7 @@ ed_probe_pccard(isa_dev, ether)
struct ed_softc *sc = &ed_softc[isa_dev->id_unit];
int i;
u_int memsize;
u_char iptr, isa16bit, sum;
u_char isa16bit;
sc->nic_addr = isa_dev->id_iobase;
sc->gone = 0;

View File

@ -6,7 +6,7 @@
*
* Questions, comments, bug reports and fixes to kimmel@cs.umass.edu.
*
* $Id: if_el.c,v 1.15 1995/10/13 19:47:43 wollman Exp $
* $Id: if_el.c,v 1.16 1995/10/26 20:29:34 julian Exp $
*/
/* Except of course for the portions of code lifted from other FreeBSD
* drivers (mainly elread, elget and el_ioctl)
@ -194,7 +194,6 @@ int el_attach(struct isa_device *idev)
struct ifaddr *ifa;
struct sockaddr_dl *sdl;
u_short base;
int t;
dprintf(("Attaching el%d...\n",idev->id_unit));
@ -626,7 +625,7 @@ elget(buf, totlen, off0, ifp)
int totlen, off0;
struct ifnet *ifp;
{
struct mbuf *top, **mp, *m, *p;
struct mbuf *top, **mp, *m;
int off = off0, len;
register caddr_t cp = buf;
char *epkt;

View File

@ -38,7 +38,7 @@
*/
/*
* $Id: if_ep.c,v 1.31 1995/10/13 19:47:44 wollman Exp $
* $Id: if_ep.c,v 1.32 1995/10/26 20:29:37 julian Exp $
*
* Promiscuous mode added and interrupt logic slightly changed
* to reduce the number of adapter failures. Transceiver select
@ -309,7 +309,6 @@ epprobe(is)
{
struct ep_softc *sc = &ep_softc[is->id_unit];
u_short k;
int i;
ep_registerdev(is);
@ -778,11 +777,8 @@ void
epintr(unit)
int unit;
{
int i;
register int status;
register struct ep_softc *sc = &ep_softc[unit];
struct ifnet *ifp = &sc->arpcom.ac_if;
struct mbuf *m;
int x;
x=splbio();

View File

@ -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.10 1995/10/13 19:47:48 wollman Exp $
* $Id: if_ix.c,v 1.11 1995/10/26 20:29:45 julian Exp $
*/
#include "ix.h"
@ -189,7 +189,6 @@ static inline void
ix_registerdev(struct isa_device *id, const char *descr)
{
struct kern_devconf *kdc = &ix_softc[id->id_unit].kdc;
char *longdescr;
*kdc = kdc_ix_template;
kdc->kdc_unit = id->id_unit;
kdc->kdc_parentdata = id;
@ -1501,7 +1500,6 @@ ixioctl(struct ifnet *ifp, int cmd, caddr_t data) {
int unit = ifp->if_unit;
int status = 0;
int s;
ix_softc_t *sc = &ix_softc[unit];
DEBUGBEGIN(DEBUGIOCTL)
DEBUGDO(printf("ixioctl:");)

View File

@ -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.20 1995/10/13 19:47:49 wollman Exp $
* $Id: if_le.c,v 1.21 1995/10/26 20:29:48 julian Exp $
*/
/*
@ -853,8 +853,7 @@ lemac_probe(
const le_board_t *bd,
int *msize)
{
int irq, portval, cksum;
long membase;
int irq, portval;
LE_OUTB(sc, LEMAC_REG_IOP, LEMAC_IOP_EEINIT);
DELAY(LEMAC_EEP_DELAY);
@ -981,7 +980,7 @@ lemac_init(
int unit)
{
le_softc_t *sc = &le_softc[unit];
int regval, s;
int s;
if ((sc->le_flags & IFF_UP) == 0)
return;
@ -1081,7 +1080,6 @@ lemac_rne_intr(
le_softc_t *sc)
{
int rxcount, rxlen, rxpg;
struct mbuf *m;
u_char *rxptr;
lemac_rne_intrs++;

View File

@ -229,7 +229,6 @@ lnc_stop(int unit)
void
lnc_reset(int unit)
{
int s;
lnc_init(unit);
}
@ -825,10 +824,10 @@ lnc_tint(int unit)
int
lnc_probe(struct isa_device * isa_dev)
{
int nports;
int vsw;
int nports;
#ifdef DIAGNOSTIC
int vsw;
vsw = inw(isa_dev->id_iobase + PCNET_VSW);
printf("Vendor Specific Word = %x\n", vsw);
#endif
@ -1120,7 +1119,6 @@ lnc_init(int unit)
struct lnc_softc *sc = &lnc_softc[unit];
int s, i;
char *lnc_mem;
struct mbuf *m = 0;
/* Check that interface has valid address */
@ -1423,7 +1421,6 @@ lnc_start(struct ifnet *ifp)
int end_of_packet;
struct mbuf *head, *m;
int len, chunk;
char *buffer;
int addr;
int no_entries_needed;

View File

@ -47,7 +47,7 @@
*/
/*
* $Id: if_ze.c,v 1.21 1995/10/13 19:47:52 wollman Exp $
* $Id: if_ze.c,v 1.22 1995/10/26 20:29:51 julian Exp $
*/
#include "ze.h"
@ -341,9 +341,9 @@ ze_probe(isa_dev)
struct isa_device *isa_dev;
{
struct ze_softc *sc = &ze_softc[isa_dev->id_unit];
int i, x, re_init_flag;
int i;
u_int memsize;
u_char iptr, memwidth, sum, tmp;
u_char tmp;
int slot;
if ((slot = ze_find_adapter (isa_dev->id_maddr, isa_dev->id_reconfig)) < 0)
@ -774,7 +774,6 @@ ze_init(unit)
struct ze_softc *sc = &ze_softc[unit];
struct ifnet *ifp = &sc->arpcom.ac_if;
int i, s;
u_char command;
pcic_power_on(sc->slot);
@ -979,7 +978,6 @@ ze_start(ifp)
struct mbuf *m0, *m;
caddr_t buffer;
int len;
u_char laar_tmp;
outloop:
/*
@ -1074,7 +1072,7 @@ ze_rint(unit)
int unit;
{
register struct ze_softc *sc = &ze_softc[unit];
u_char boundry, current;
u_char boundry;
u_short len;
struct ed_ring *packet_ptr;
@ -1337,7 +1335,6 @@ ze_ioctl(ifp, command, data)
{
register struct ifaddr *ifa = (struct ifaddr *)data;
struct ze_softc *sc = &ze_softc[ifp->if_unit];
struct ifreq *ifr = (struct ifreq *)data;
int s, error = 0;
s = splnet();
@ -1490,13 +1487,6 @@ ze_get_packet(sc, buf, len)
{
struct ether_header *eh;
struct mbuf *m, *head = NULL;
u_short off;
int resid;
u_short etype;
struct trailer_header {
u_short trail_type;
u_short trail_residual;
} trailer_header;
/* Allocate a header mbuf */
MGETHDR(m, M_DONTWAIT, MT_DATA);

View File

@ -34,7 +34,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* From: if_ep.c,v 1.9 1994/01/25 10:46:29 deraadt Exp $
* $Id: if_zp.c,v 1.9 1995/10/13 19:47:53 wollman Exp $
* $Id: if_zp.c,v 1.10 1995/10/26 20:29:53 julian Exp $
*/
/*-
* TODO:
@ -247,8 +247,6 @@ struct zp_softc {
#ifdef MACH_KERNEL
static int send_ID_sequence(), f_is_eeprom_busy();
static u_short get_eeprom_data();
int zpprobe(), zpopen(), zpoutput(), zpsetinput(), zpgetstat(),
zpsetstat(), zpintr();
void zpattach(), zpinit(), zpstart(), zpread(), zpreset(),
@ -292,9 +290,6 @@ struct isa_driver zpdriver = {
"zp"
};
static int send_ID_sequence __P((u_short));
static u_short get_eeprom_data __P((int, int));
static int f_is_eeprom_busy __P((struct isa_device *));
#endif /* MACH_KERNEL */
@ -461,12 +456,8 @@ zpprobe(struct isa_device * isa_dev)
#else /* MACH_KERNEL */
struct zp_softc *sc = &zp_softc[isa_dev->id_unit];
#endif /* MACH_KERNEL */
int i, x;
u_int memsize;
u_char iptr, memwidth, sum, tmp;
int slot;
u_short k;
int id_port = 0x100; /* XXX */
int re_init_flag;
#ifdef ZP_DEBUG
@ -653,9 +644,6 @@ re_init:
sc->ep_io_addr = isa_dev->id_iobase;
#endif /* MACH_KERNEL */
GO_WINDOW(0);
#if 0
k = get_eeprom_data(BASE, EEPROM_ADDR_CFG); /* get addr cfg */
#endif
k = read_eeprom_data(BASE, EEPROM_ADDR_CFG); /* get addr cfg */
#ifndef ORIGINAL
sc->if_port = k >> 14;
@ -1503,7 +1491,6 @@ zpintr(unit)
struct ifnet *ifp = &sc->ds_if;
#else /* MACH_KERNEL */
struct ifnet *ifp = &sc->arpcom.ac_if;
struct mbuf *m;
#endif /* MACH_KERNEL */
#ifdef ZP_DEBUG
@ -1629,11 +1616,8 @@ zpread(sc)
struct mbuf *mcur, *m, *m0, *top;
int totlen, lenthisone;
int save_totlen;
u_short etype;
int off, resid;
int count, spinwait;
int off;
#endif /* MACH_KERNEL */
int i;
#ifdef ZP_DEBUG
printf("### zpread ####\n");
@ -1941,8 +1925,7 @@ zpioctl(ifp, cmd, data)
{
register struct ifaddr *ifa = (struct ifaddr *) data;
struct zp_softc *sc = &zp_softc[ifp->if_unit];
struct ifreq *ifr = (struct ifreq *) data;
int s, error = 0;
int error = 0;
#ifdef ZP_DEBUG
printf("### zpioctl ####\n");
@ -2086,87 +2069,12 @@ zpstop(unit)
}
/*
* This is adapted straight from the book. There's probably a better way.
*/
static int
send_ID_sequence(port)
u_short port;
{
char cx, al;
#ifdef ZP_DEBUG2
printf("### send_ID_sequence ####\n");
#ifdef MACH_KERNEL
cngetc();
#endif /* MACH_KERNEL */
#endif /* ZP_DEBUG */
cx = 0x0ff;
al = 0x0ff;
outb(port, 0x0);
DELAY(1000);
outb(port, 0x0);
DELAY(1000);
loop1:cx--;
outb(port, al);
if (!(al & 0x80)) {
al = al << 1;
goto loop1;
}
al = al << 1;
al ^= 0xcf;
if (cx)
goto loop1;
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 u_short
get_eeprom_data(id_port, offset)
int id_port;
int offset;
{
int i, data = 0;
#ifdef ZP_DEBUG2
printf("### get_eeprom_data ####\n");
#ifdef MACH_KERNEL
cngetc();
#endif /* MACH_KERNEL */
#endif /* ZP_DEBUG */
outb(id_port, 0x80 + offset);
DELAY(1000);
for (i = 0; i < 16; i++)
data = (data << 1) | (inw(id_port) & 1);
return (data);
}
static u_short
read_eeprom_data(id_port, offset)
int id_port;
int offset;
{
int i, data = 0;
#ifdef ZP_DEBUG
printf("### read_eeprom_data ####\n");
@ -2182,56 +2090,6 @@ read_eeprom_data(id_port, offset)
static int
#ifdef MACH_KERNEL
f_is_eeprom_busy(dev)
struct bus_device *dev;
#else /* MACH_KERNEL */
f_is_eeprom_busy(is)
struct isa_device *is;
#endif /* MACH_KERNEL */
{
int i = 0, j;
#ifdef MACH_KERNEL
register struct zp_softc *sc = &zp_softc[dev->unit];
#else /* MACH_KERNEL */
register struct zp_softc *sc = &zp_softc[is->id_unit];
#endif /* MACH_KERNEL */
#ifdef ZP_DEBUG
printf("### f_is_eeprom_busy ####\n");
printf("BASE: %x\n", BASE);
#ifdef MACH_KERNEL
cngetc();
#endif /* MACH_KERNEL */
#endif /* ZP_DEBUG */
while (i++ < 100) {
j = inw(BASE + EP_W0_EEPROM_COMMAND);
if (j & EEPROM_BUSY)
DELAY(100);
else
break;
}
if (i >= 100) {
#ifdef MACH_KERNEL
printf("\nzp%d: eeprom failed to come ready.\n", dev->unit);
#else /* MACH_KERNEL */
printf("\nzp%d: eeprom failed to come ready.\n", is->id_unit);
#endif /* MACH_KERNEL */
return (1);
}
if (j & EEPROM_TST_MODE) {
#ifdef MACH_KERNEL
printf("\nzp%d: 3c589 in test mode. Erase pencil mark!\n", dev->unit);
#else /* MACH_KERNEL */
printf("\nzp%d: 3c589 in test mode. Erase pencil mark!\n", is->id_unit);
#endif /* MACH_KERNEL */
return (1);
}
return (0);
}
#ifndef MACH_KERNEL
void

View File

@ -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.45 1995/08/15 19:56:59 joerg Exp $
* $Id: mcd.c,v 1.46 1995/09/08 11:07:48 bde Exp $
*/
static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
@ -169,10 +169,11 @@ int mcdclose(dev_t dev, int flags, int fmt, struct proc *p);
void mcdstrategy(struct buf *bp);
int mcdioctl(dev_t dev, int cmd, caddr_t addr, int flags, struct proc *p);
int mcdsize(dev_t dev);
static void mcd_done(struct mcd_mbx *mbx);
static void mcd_start(int unit);
static int mcd_getdisklabel(int unit);
#ifdef NOTYET
static void mcd_configure(struct mcd_data *cd);
#endif
static int mcd_get(int unit, char *buf, int nmax);
static int mcd_setflags(int unit,struct mcd_data *cd);
static int mcd_getstat(int unit,int sflg);
@ -203,8 +204,8 @@ static int mcd_lock_door(int unit, int lock);
static int mcd_close_tray(int unit);
extern int hz;
extern int mcd_probe(struct isa_device *dev);
extern int mcd_attach(struct isa_device *dev);
static int mcd_probe(struct isa_device *dev);
static int mcd_attach(struct isa_device *dev);
struct isa_driver mcddriver = { mcd_probe, mcd_attach, "mcd" };
#define mcd_put(port,byte) outb(port,byte)
@ -248,7 +249,6 @@ mcd_registerdev(struct isa_device *id)
int mcd_attach(struct isa_device *dev)
{
struct mcd_data *cd = mcd_data + dev->id_unit;
int i;
cd->iobase = dev->id_iobase;
cd->flags |= MCDINIT;
@ -449,7 +449,6 @@ static void mcd_start(int unit)
struct mcd_data *cd = mcd_data + unit;
struct buf *bp, *qp = &cd->head;
struct partition *p;
int part;
register s = splbio();
if (cd->flags & MCDMBXBSY) {
@ -679,11 +678,13 @@ drqs[] = {
};
#endif
#ifdef NOT_YET
static void
mcd_configure(struct mcd_data *cd)
{
outb(cd->iobase+mcd_config,cd->config);
}
#endif
/* Wait for non-busy - return 0 on timeout */
static int
@ -707,7 +708,6 @@ mcd_probe(struct isa_device *dev)
int port = dev->id_iobase;
int unit = dev->id_unit;
int i, j;
int status;
unsigned char stbytes[3];
mcd_registerdev(dev);
@ -796,7 +796,6 @@ mcd_waitrdy(int port,int dly)
static int
mcd_getreply(int unit,int dly)
{
int i;
struct mcd_data *cd = mcd_data + unit;
int port = cd->iobase;
@ -854,7 +853,6 @@ mcd_setflags(int unit, struct mcd_data *cd)
static int
mcd_get(int unit, char *buf, int nmax)
{
int port = mcd_data[unit].iobase;
int i,k;
for (i=0; i<nmax; i++) {
@ -926,7 +924,6 @@ static int
mcd_volinfo(int unit)
{
struct mcd_data *cd = mcd_data + unit;
int i;
/* Just return if we already have it */
if (cd->flags & MCDVOLINFO) return 0;

View File

@ -41,7 +41,7 @@
*/
/* $Id: scd.c,v 1.6 1995/09/08 11:07:55 bde Exp $ */
/* $Id: scd.c,v 1.7 1995/09/19 18:55:15 bde Exp $ */
/* Please send any comments to micke@dynas.se */
@ -100,7 +100,7 @@
#define SCDBLKSIZE 2048
#ifdef SCD_DEBUG
int scd_debuglevel = SCD_DEBUG;
static int scd_debuglevel = SCD_DEBUG;
# define XDEBUG(level, data) {if (scd_debuglevel >= level) printf data;}
#else
# define XDEBUG(level, data)
@ -118,7 +118,7 @@ struct scd_mbx {
short count;
};
struct scd_data {
static struct scd_data {
int iobase;
char double_speed;
char *name;
@ -156,7 +156,6 @@ static int msf2hsg(bcd_t *msf);
static void process_attention(unsigned unit);
static inline void write_control(unsigned port, unsigned data);
static int waitfor_status_bits(int unit, int bits_set, int bits_clear);
static int waitfor_attention(int unit);
static int send_cmd(u_int unit, u_char cmd, u_int nargs, ...);
static void init_drive(unsigned unit);
static int spin_up(unsigned unit);
@ -184,8 +183,8 @@ static int scd_toc_entrys(int unit, struct ioc_read_toc_entry *te);
extern int hz;
int scd_probe(struct isa_device *dev);
int scd_attach(struct isa_device *dev);
static int scd_probe(struct isa_device *dev);
static int scd_attach(struct isa_device *dev);
struct isa_driver scddriver = { scd_probe, scd_attach, "scd" };
static struct kern_devconf kdc_scd[NSCD] = { {
@ -212,7 +211,6 @@ scd_registerdev(struct isa_device *id)
int scd_attach(struct isa_device *dev)
{
struct scd_data *cd = scd_data + dev->id_unit;
int i;
cd->iobase = dev->id_iobase; /* Already set by probe, but ... */
@ -287,8 +285,6 @@ scdclose(dev_t dev, int flags, int fmt, struct proc *p)
{
int unit,part,phys;
struct scd_data *cd;
int rlen;
char rdata[10];
unit = scd_unit(dev);
if (unit >= NSCD)
@ -386,7 +382,6 @@ scd_start(int unit)
struct scd_data *cd = scd_data + unit;
struct buf *bp, *qp = &cd->head;
struct partition *p;
int part;
register s = splbio();
if (cd->flags & SCDMBXBSY) {
@ -511,7 +506,7 @@ scd_playtracks(int unit, struct ioc_play_track *pt)
struct ioc_play_msf msf;
int a = pt->start_track;
int z = pt->end_track;
int rc, i;
int rc;
if (!(cd->flags & SCDTOC) && (rc = read_toc(unit)) != 0) {
if (rc == -ERR_NOT_SPINNING) {
@ -638,7 +633,6 @@ static int
scd_eject(int unit)
{
struct scd_data *cd = scd_data + unit;
int port = cd->iobase;
cd->audio_status = CD_AS_AUDIO_INVALID;
cd->flags &= ~(SCDSPINNING|SCDTOC);
@ -794,10 +788,9 @@ scd_doread(int state, struct scd_mbx *mbxin)
int port = mbx->port;
struct buf *bp = mbx->bp;
struct scd_data *cd = scd_data + unit;
int reg,i,k,c;
int reg,i;
int blknum;
caddr_t addr;
char rdata[10];
static char sdata[3]; /* Must be preserved between calls to this function */
loop:
@ -836,7 +829,6 @@ trystat:
mbx->sz = cd->blksize;
firstblock:
/* for first block */
mbx->nblk = (bp->b_bcount + (mbx->sz-1)) / mbx->sz;
mbx->skip = 0;
@ -1093,7 +1085,6 @@ process_attention(unsigned unit)
unsigned port = scd_data[unit].iobase;
unsigned char code;
int count = 0;
int i;
while (IS_ATTENTION(port) && count++ < 30) {
write_control(port, CBIT_ATTENTION_CLEAR);
@ -1314,7 +1305,6 @@ get_result(u_int unit, int result_len, u_char *result)
{
unsigned int port = scd_data[unit].iobase;
unsigned int res_reg = port + IREG_RESULT;
unsigned char c;
int loop_index = 2; /* send_cmd() reads two bytes ... */
XDEBUG(1, ("scd%d: DEBUG: get_result: bytes=%d\n", unit, result_len));
@ -1375,7 +1365,8 @@ send_cmd(u_int unit, u_char cmd, u_int nargs, ...)
outb(port+OREG_COMMAND, cmd);
if (rc = waitfor_status_bits(unit, SBIT_RESULT_READY, SBIT_BUSY))
rc = waitfor_status_bits(unit, SBIT_RESULT_READY, SBIT_BUSY);
if (rc)
return -0x100;
reg = port + IREG_RESULT;

View File

@ -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.9 1995/09/22 20:00:12 peter Exp $
* $Id: si.c,v 1.10 1995/10/21 09:10:49 peter Exp $
*/
#ifndef lint
@ -1198,11 +1198,9 @@ si_Sioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
volatile struct si_reg *regp;
struct si_tcsi *dp;
struct si_pstat *sps;
BYTE *bp;
int i, *ip, error = 0;
int *ip, error = 0;
int oldspl;
int card, port;
unsigned short *usp;
int mynor = minor(dev);
DPRINT((0, DBG_ENTRY|DBG_IOCTL, "si_Sioctl(%x,%x,%x,%x)\n",
@ -1675,7 +1673,7 @@ siintr(int unit)
volatile struct si_channel *ccbp;
register struct tty *tp;
volatile caddr_t maddr;
BYTE op, ip, cc;
BYTE op, ip;
int x, card, port, n, i;
volatile BYTE *z;
BYTE c;

View File

@ -190,16 +190,12 @@ struct spigot_softc *ss = (struct spigot_softc *)&spigot_softc[UNIT(dev)];
int
spigot_write(dev_t dev, struct uio *uio, int ioflag)
{
struct spigot_softc *ss = (struct spigot_softc *)&spigot_softc[UNIT(dev)];
return ENXIO;
}
int
spigot_read(dev_t dev, struct uio *uio, int ioflag)
{
struct spigot_softc *ss = (struct spigot_softc *)&spigot_softc[UNIT(dev)];
return ENXIO;
}
@ -244,9 +240,6 @@ struct spigot_info *info;
int
spigot_select(dev_t dev, int rw, struct proc *p)
{
struct spigot_softc *ss = (struct spigot_softc *)&spigot_softc[UNIT(dev)];
int s;
int r;
return ENXIO;
}

View File

@ -353,7 +353,6 @@ int twopen(dev, flag, mode, p)
{
struct tw_sc *sc = &tw_sc[TWUNIT(dev)];
int s;
int port;
s = spltty();
if(sc->sc_state == 0) {
@ -477,8 +476,7 @@ int twselect(dev, rw, p)
struct proc *p;
{
struct tw_sc *sc;
struct proc *pp;
int s, i;
int s;
sc = &tw_sc[TWUNIT(dev)];
s = spltty();
@ -668,7 +666,7 @@ int h, k, cnt;
static int wait_for_zero(sc)
struct tw_sc *sc;
{
int i, old, new, max, cnt;
int i, old, new, max;
int port = sc->sc_port + tw_control;
old = sc->sc_xphase;

View File

@ -245,7 +245,8 @@ static int wcd_goaway (struct kern_devconf *kdc, int force)
return 0;
}
int wcdattach (struct atapi *ata, int unit, struct atapi_params *ap, int debug,
static int
wcdattach (struct atapi *ata, int unit, struct atapi_params *ap, int debug,
struct kern_devconf *parent)
{
struct wcd *t;
@ -368,7 +369,8 @@ void wcd_describe (struct wcd *t)
printf ("\n");
}
int wcd_open (dev_t dev, int rawflag)
static int
wcd_open (dev_t dev, int rawflag)
{
int lun = UNIT(dev);
struct wcd *t;

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
* $Id: wd.c,v 1.87 1995/10/14 15:41:10 davidg Exp $
* $Id: wd.c,v 1.88 1995/10/21 00:55:27 phk Exp $
*/
/* TODO:
@ -122,7 +122,7 @@ static struct kern_devconf kdc_wd[NWD] = { {
DC_CLS_DISK /* class */
} };
struct kern_devconf kdc_wdc[NWDC] = { {
static struct kern_devconf kdc_wdc[NWDC] = { {
0, 0, 0, /* filled in by kern_devconf.c */
"wdc", 0, { MDDT_ISA, 0 },
isa_generic_externalize, 0, wdc_goaway, ISA_EXTERNALLEN,
@ -253,7 +253,7 @@ static struct buf rwdbuf[NWD]; /* buffers for raw IO */
static int wdprobe(struct isa_device *dvp);
static int wdattach(struct isa_device *dvp);
static void wdustart(struct disk *du);
void wdstart(int ctrlr);
static void wdstart(int ctrlr);
static int wdcontrol(struct buf *bp);
static int wdcommand(struct disk *du, u_int cylinder, u_int head,
u_int sector, u_int count, u_int command);

View File

@ -81,7 +81,7 @@ static struct kern_devconf kdc_wds[NWDS] = { {
DC_CLS_MISC /* class */
} };
struct scsi_device wds_dev =
static struct scsi_device wds_dev =
{
NULL,
NULL,
@ -211,7 +211,7 @@ struct wds_setup {
#define WDS_NIMB 8
#define MAXSIMUL 8
int wdsunit=0;
static int wdsunit=0;
u_char wds_data[NWDS][BUFSIZ];
u_char wds_data_in_use[NWDS];
@ -223,17 +223,17 @@ struct wds {
struct scsi_link sc_link;
} wds[NWDS];
int wdsprobe(struct isa_device *);
void wds_minphys(struct buf *);
struct wds_req *wdsr_alloc(int);
int32 wds_scsi_cmd(struct scsi_xfer *);
u_int32 wds_adapter_info(int);
static int wdsprobe(struct isa_device *);
static void wds_minphys(struct buf *);
static struct wds_req *wdsr_alloc(int);
static int32 wds_scsi_cmd(struct scsi_xfer *);
static u_int32 wds_adapter_info(int);
inthand2_t wdsintr;
int wds_done(int, struct wds_cmd *, u_char);
int wdsattach(struct isa_device *);
int wds_init(struct isa_device *);
int wds_cmd(int, u_char *, int);
void wds_wait(int, int, int);
static int wds_done(int, struct wds_cmd *, u_char);
static int wdsattach(struct isa_device *);
static int wds_init(struct isa_device *);
static int wds_cmd(int, u_char *, int);
static void wds_wait(int, int, int);
struct isa_driver wdsdriver =
{
@ -242,7 +242,7 @@ struct isa_driver wdsdriver =
"wds"
};
struct scsi_adapter wds_switch =
static struct scsi_adapter wds_switch =
{
wds_scsi_cmd,
wds_minphys,
@ -550,7 +550,7 @@ wds_done(int unit, struct wds_cmd *c, u_char stat)
return 0;
}
int
static int
wds_getvers(int unit)
{
struct wds_req *r;

View File

@ -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.18 1995/09/05 05:45:34 julian Exp $
* $Id: wt.c,v 1.19 1995/09/08 11:08:03 bde Exp $
*
*/
@ -201,7 +201,8 @@ wt_registerdev(struct isa_device *id)
/*
* Probe for the presence of the device.
*/
int wtprobe (struct isa_device *id)
static int
wtprobe (struct isa_device *id)
{
wtinfo_t *t = wttab + id->id_unit;
@ -247,7 +248,8 @@ int wtprobe (struct isa_device *id)
/*
* Device is found, configure it.
*/
int wtattach (struct isa_device *id)
static int
wtattach (struct isa_device *id)
{
wtinfo_t *t = wttab + id->id_unit;

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
* $Id: clock.c,v 1.36 1995/08/25 19:24:56 bde Exp $
* $Id: clock.c,v 1.37 1995/10/12 20:39:49 wollman Exp $
*/
/*
@ -505,7 +505,7 @@ void
resettodr()
{
unsigned long tm;
int y, m, fd, r, s;
int y, m, s;
if (disable_rtc_set)
return;

View File

@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
* $Id: fd.c,v 1.65 1995/10/04 07:01:23 joerg Exp $
* $Id: fd.c,v 1.66 1995/10/09 15:00:36 joerg Exp $
*
*/
@ -978,7 +978,6 @@ Fdopen(dev_t dev, int flags, int mode, struct proc *p)
fdu_t fdu = FDUNIT(minor(dev));
int type = FDTYPE(minor(dev));
fdc_p fdc;
int st3;
#if NFT > 0
/* check for a tape open */
@ -1260,7 +1259,7 @@ fdintr(fdcu_t fdcu)
static int
fdstate(fdcu_t fdcu, fdc_p fdc)
{
int read, format, head, sec = 0, i = 0, sectrac, st0, cyl, st3;
int read, format, head, sec = 0, sectrac, st0, cyl, st3;
unsigned long blknum;
fdu_t fdu = fdc->fdu;
fd_p fd;

View File

@ -35,7 +35,7 @@
*
* from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91
* from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $
* $Id: diskslice_machdep.c,v 1.15 1995/08/23 10:41:57 jkh Exp $
* $Id: diskslice_machdep.c,v 1.16 1995/08/23 11:43:45 jkh Exp $
*/
#include <stddef.h>
@ -167,7 +167,6 @@ dsinit(dname, dev, strat, lp, sspp)
u_long mbr_offset;
char partname[2];
u_long secpercyl;
int slice;
char *sname;
struct diskslice *sp;
struct diskslices *ssp;
@ -369,7 +368,6 @@ extended(dname, dev, strat, lp, ssp, ext_offset, ext_size, base_ext_offset,
u_char *cp;
int dospart;
struct dos_partition *dp;
int end_slice;
u_long ext_offsets[NDOSPART];
u_long ext_sizes[NDOSPART];
char partname[2];

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
* $Id: trap.c,v 1.60 1995/10/04 07:07:44 julian Exp $
* $Id: trap.c,v 1.61 1995/10/09 04:36:01 bde Exp $
*/
/*
@ -181,7 +181,7 @@ trap(frame)
struct proc *p = curproc;
u_quad_t sticks = 0;
int i = 0, ucode = 0, type, code;
#ifdef DIAGNOSTIC
#ifdef DEBUG
u_long eva;
#endif
@ -609,7 +609,6 @@ trap_pfault(frame, usermode)
if (map != kernel_map) {
vm_offset_t v;
vm_page_t ptepg;
/*
* Keep swapout from messing with us during this
@ -931,7 +930,6 @@ void
linux_syscall(frame)
struct trapframe frame;
{
int i;
struct proc *p = curproc;
struct sysent *callp;
u_quad_t sticks;