summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386/isa')
-rw-r--r--sys/i386/isa/aha1542.c17
-rw-r--r--sys/i386/isa/aha1742.c13
-rw-r--r--sys/i386/isa/bt742a.c18
-rw-r--r--sys/i386/isa/clock.c4
-rw-r--r--sys/i386/isa/fd.c14
-rw-r--r--sys/i386/isa/icu.s6
-rw-r--r--sys/i386/isa/if_ed.c4
-rw-r--r--sys/i386/isa/if_is.c2
-rw-r--r--sys/i386/isa/isa.c11
-rw-r--r--sys/i386/isa/isa_device.h8
-rw-r--r--sys/i386/isa/mcd.c21
-rw-r--r--sys/i386/isa/sound/dmabuf.c8
-rw-r--r--sys/i386/isa/sound/os.h13
-rw-r--r--sys/i386/isa/sound/soundcard.c8
-rw-r--r--sys/i386/isa/ultra14f.c15
-rw-r--r--sys/i386/isa/wd.c12
-rw-r--r--sys/i386/isa/wt.c37
17 files changed, 103 insertions, 108 deletions
diff --git a/sys/i386/isa/aha1542.c b/sys/i386/isa/aha1542.c
index 10cb47c..c0e50eb 100644
--- a/sys/i386/isa/aha1542.c
+++ b/sys/i386/isa/aha1542.c
@@ -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.15 1993/11/18 05:02:12 rgrimes Exp $
+ * $Id: aha1542.c,v 1.16 1993/11/25 01:31:22 wollman Exp $
*/
/*
@@ -38,12 +38,7 @@
#ifdef KERNEL
#include "ddb.h"
-#if NDDB > 0
-int Debugger();
-#else /* NDDB */
-#define Debugger() panic("should call debugger here (adaptec.c)")
-#endif /* NDDB */
-extern int hz;
+#include "kernel.h"
#else /*KERNEL */
#define NAHA 1
#endif /*KERNEL */
@@ -686,7 +681,7 @@ ahaintr(unit)
#endif /*AHADEBUG */
}
if (ccb) {
- untimeout(aha_timeout, ccb);
+ untimeout(aha_timeout, (caddr_t)ccb);
aha_done(unit, ccb);
}
aha->aha_mbx.mbi[i].stat = AHA_MBI_FREE;
@@ -776,7 +771,7 @@ aha_done(unit, ccb)
*/
if (!(xs->flags & INUSE)) {
printf("aha%d: exiting but not in use!\n", unit);
- Debugger();
+ Debugger("aha1542");
}
if (((ccb->host_stat != AHA_OK) || (ccb->target_stat != SCSI_OK))
&& ((xs->flags & SCSI_ERR_OK) == 0)) {
@@ -1252,7 +1247,7 @@ aha_poll(unit, xs, ccb)
* because we are polling,
* take out the timeout entry aha_timeout made
*/
- untimeout(aha_timeout, ccb);
+ untimeout(aha_timeout, (caddr_t)ccb);
count = 2000;
while (count) {
/*
@@ -1428,7 +1423,7 @@ aha_timeout(caddr_t arg1, int arg2)
*/
if (ccb->mbx->cmd != AHA_MBO_FREE) {
printf("\nadapter not taking commands.. frozen?!\n");
- Debugger();
+ Debugger("aha1542");
}
/*
* If it has been through before, then
diff --git a/sys/i386/isa/aha1742.c b/sys/i386/isa/aha1742.c
index a1457db..991f580 100644
--- a/sys/i386/isa/aha1742.c
+++ b/sys/i386/isa/aha1742.c
@@ -14,7 +14,7 @@
*
* commenced: Sun Sep 27 18:14:01 PDT 1992
*
- * $Id: aha1742.c,v 1.11 1993/11/18 05:02:15 rgrimes Exp $
+ * $Id: aha1742.c,v 1.12 1993/11/25 01:31:25 wollman Exp $
*/
#include <sys/types.h>
@@ -46,11 +46,6 @@ int Debugger();
# endif /* DDB */
# else
#include "ddb.h"
-#if NDDB > 0
-int Debugger();
-#else /* NDDB */
-#define Debugger() panic("should call debugger here (adaptec.c)")
-#endif /* NDDB */
#endif /* netbsd */
#else /* KERNEL */
#define NAHB 1
@@ -61,7 +56,7 @@ typedef timeout_func_t timeout_t;
#endif
typedef unsigned long int physaddr;
-extern int hz;
+#include "kernel.h"
#define KVTOPHYS(x) vtophys(x)
@@ -360,7 +355,7 @@ ahb_send_mbox(int unit, int opcode, int target, struct ecb *ecb)
}
if (wait == 0) {
printf("ahb%d: board not responding\n", unit);
- Debugger();
+ Debugger("aha1742");
}
outl(port + MBOXOUT0, KVTOPHYS(ecb)); /* don't know this will work */
outb(port + ATTN, opcode | target);
@@ -416,7 +411,7 @@ ahb_send_immed(int unit, int target, u_long cmd)
DELAY(10);
} if (wait == 0) {
printf("ahb%d: board not responding\n", unit);
- Debugger();
+ Debugger("aha1742");
}
outl(port + MBOXOUT0, cmd); /* don't know this will work */
outb(port + G2CNTRL, G2CNTRL_SET_HOST_READY);
diff --git a/sys/i386/isa/bt742a.c b/sys/i386/isa/bt742a.c
index 4d9947b..5062f1b 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.10 1993/11/18 05:02:17 rgrimes Exp $
+ * $Id: bt742a.c,v 1.11 1993/11/25 01:31:27 wollman Exp $
*/
/*
@@ -39,16 +39,11 @@
#ifdef KERNEL
#include "ddb.h"
-#if NDDB > 0
-int Debugger();
-#else /* NDDB */
-#define Debugger() panic("should call debugger here (bt742a.c)")
-#endif /* NDDB */
+#include "kernel.h"
#else /*KERNEL */
#define NBT 1
#endif /*KERNEL */
-extern int hz;
typedef unsigned long int physaddr;
/*
@@ -721,7 +716,7 @@ btintr(unit)
}
wmbi->stat = BT_MBI_FREE;
if (ccb) {
- untimeout(bt_timeout, ccb);
+ untimeout(bt_timeout, (caddr_t)ccb);
bt_done(unit, ccb);
}
/* Set the IN mail Box pointer for next */ bt_nextmbx(wmbi, wmbx, mbi);
@@ -900,7 +895,8 @@ bt_send_mbo(int unit, int flags, int cmd, struct bt_ccb *ccb)
return ((BT_MBO *) 0);
}
outb(BT_CMD_DATA_PORT, 0x01); /* Enable */
- sleep(wmbx, PRIBIO); /*XXX *//*can't do this! */
+ tsleep((caddr_t)wmbx, PRIBIO, "btsend", 0);
+ /* XXX */ /*can't do this! */
/* May be servicing an int */
}
/* Link CCB to the Mail Box */
@@ -1401,7 +1397,7 @@ bt_poll(unit, xs, ccb)
* because we are polling, take out the timeout entry
* bt_timeout made
*/
- untimeout(bt_timeout, ccb);
+ untimeout(bt_timeout, (caddr_t)ccb);
count = 2000;
while (count) {
/*
@@ -1456,7 +1452,7 @@ bt_timeout(caddr_t arg1, int arg2)
if (bt_ccb_phys_kv(bt, ccb->mbx->ccb_addr) == ccb &&
ccb->mbx->cmd != BT_MBO_FREE) {
printf("bt%d: not taking commands!\n", unit);
- Debugger();
+ Debugger("bt742a");
}
/*
* If it has been through before, then
diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c
index 836bff0..cc26d18 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.3 1993/11/04 01:56:31 ache Exp $
+ * $Id: clock.c,v 1.4 1993/11/25 01:31:29 wollman Exp $
*/
/*
@@ -233,7 +233,7 @@ resettodr()
* Wire clock interrupt in.
*/
#define V(s) __CONCAT(V, s)
-extern V(clk)();
+extern void V(clk)();
void
enablertclock()
diff --git a/sys/i386/isa/fd.c b/sys/i386/isa/fd.c
index 9dcc2cb..ef24eb0 100644
--- a/sys/i386/isa/fd.c
+++ b/sys/i386/isa/fd.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.14 1993/12/16 19:47:42 ache Exp $
+ * $Id: fd.c,v 1.16 1993/12/19 00:40:49 ache Exp $
*
*/
@@ -165,6 +165,8 @@ typedef int fdsu_t;
typedef struct fd_data *fd_p;
typedef struct fdc_data *fdc_p;
+static int retrier(fdcu_t);
+
#define DEVIDLE 0
#define FINDWORK 1
#define DOSEEK 2
@@ -391,7 +393,7 @@ void fdstrategy(struct buf *bp)
dp = &(fdc->head);
s = splbio();
disksort(dp, bp);
- untimeout(fd_turnoff,fdu); /* a good idea */
+ untimeout(fd_turnoff, (caddr_t)fdu); /* a good idea */
fdstart(fdcu);
splx(s);
return;
@@ -762,7 +764,7 @@ fdstate(fdcu, fdc)
TRACE1("fd%d",fdu);
TRACE1("[%s]",fdstates[fdc->state]);
TRACE1("(0x%x)",fd->flags);
- untimeout(fd_turnoff, fdu);
+ untimeout(fd_turnoff, (caddr_t)fdu);
timeout(fd_turnoff, (caddr_t)fdu, 4 * hz);
switch (fdc->state)
{
@@ -810,7 +812,7 @@ fdstate(fdcu, fdc)
timeout(fd_timeout, (caddr_t)fdcu, 2 * hz);
return(0); /* will return later */
case SEEKWAIT:
- untimeout(fd_timeout,fdcu);
+ untimeout(fd_timeout, (caddr_t)fdcu);
/* allow heads to settle */
timeout(fd_pseudointr, (caddr_t)fdcu, hz / 50);
fdc->state = SEEKCOMPLETE;
@@ -883,7 +885,7 @@ fdstate(fdcu, fdc)
timeout(fd_timeout, (caddr_t)fdcu, 2 * hz);
return(0); /* will return later */
case IOCOMPLETE: /* IO DONE, post-analyze */
- untimeout(fd_timeout,fdcu);
+ untimeout(fd_timeout, (caddr_t)fdcu);
for(i=0;i<7;i++)
{
fdc->status[i] = in_fdc(fdcu);
@@ -994,7 +996,7 @@ fdstate(fdcu, fdc)
return(1); /* Come back immediatly to new state */
}
-int
+static int
retrier(fdcu)
fdcu_t fdcu;
{
diff --git a/sys/i386/isa/icu.s b/sys/i386/isa/icu.s
index 1a71ead..fd4f523 100644
--- a/sys/i386/isa/icu.s
+++ b/sys/i386/isa/icu.s
@@ -36,7 +36,7 @@
*
* @(#)icu.s 7.2 (Berkeley) 5/21/91
*
- * $Id: icu.s,v 1.4 1993/11/13 02:25:21 davidg Exp $
+ * $Id: icu.s,v 1.5 1993/11/25 01:31:33 wollman Exp $
*/
/*
@@ -211,6 +211,10 @@ none_to_unpend:
DONET(NETISR_ISO, _clnlintr, 9)
#endif /* ISO */
+#ifdef CCITT
+ DONET(NETISR_CCITT, _pkintr, 29)
+#endif /* CCITT */
+
FASTSPL($0)
test_ASTs:
btrl $NETISR_SCLK,_netisr
diff --git a/sys/i386/isa/if_ed.c b/sys/i386/isa/if_ed.c
index 30d37e6..5ab5507 100644
--- a/sys/i386/isa/if_ed.c
+++ b/sys/i386/isa/if_ed.c
@@ -20,7 +20,7 @@
*/
/*
- * $Id: if_ed.c,v 2.16 1993/11/29 16:55:56 davidg Exp davidg $
+ * $Id: if_ed.c,v 1.25 1993/11/29 17:07:26 davidg Exp $
*/
/*
@@ -1596,7 +1596,7 @@ outloop:
/* copy trailer_header into a data structure */
m_copydata(m0, off, sizeof(struct trailer_header),
- &trailer_header.ether_type);
+ (caddr_t)&trailer_header.ether_type);
/* copy residual data */
m_copydata(m0, off+sizeof(struct trailer_header),
diff --git a/sys/i386/isa/if_is.c b/sys/i386/isa/if_is.c
index 2216604..318c5b1 100644
--- a/sys/i386/isa/if_is.c
+++ b/sys/i386/isa/if_is.c
@@ -502,7 +502,7 @@ is_start(ifp)
/* copy trailer_header into a data structure */
m_copydata(m0, off, sizeof(struct trailer_header),
- &trailer_header.ether_type);
+ (caddr_t)&trailer_header.ether_type);
/* copy residual data */
resid = trailer_header.ether_residual -
diff --git a/sys/i386/isa/isa.c b/sys/i386/isa/isa.c
index b40ce6e..c689200 100644
--- a/sys/i386/isa/isa.c
+++ b/sys/i386/isa/isa.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: isa.c,v 1.9 1993/11/17 00:21:03 ache Exp $
+ * $Id: isa.c,v 1.10 1993/11/25 01:31:39 wollman Exp $
*/
/*
@@ -322,19 +322,22 @@ config_isadev(isdp, mp)
#define IDTVEC(name) __CONCAT(X,name)
/* default interrupt vector table entries */
-extern IDTVEC(intr0), IDTVEC(intr1), IDTVEC(intr2), IDTVEC(intr3),
+typedef void inthand_t();
+typedef void (*inthand_func_t)();
+extern inthand_t
+ IDTVEC(intr0), IDTVEC(intr1), IDTVEC(intr2), IDTVEC(intr3),
IDTVEC(intr4), IDTVEC(intr5), IDTVEC(intr6), IDTVEC(intr7),
IDTVEC(intr8), IDTVEC(intr9), IDTVEC(intr10), IDTVEC(intr11),
IDTVEC(intr12), IDTVEC(intr13), IDTVEC(intr14), IDTVEC(intr15);
-static *defvec[16] = {
+static inthand_func_t defvec[16] = {
&IDTVEC(intr0), &IDTVEC(intr1), &IDTVEC(intr2), &IDTVEC(intr3),
&IDTVEC(intr4), &IDTVEC(intr5), &IDTVEC(intr6), &IDTVEC(intr7),
&IDTVEC(intr8), &IDTVEC(intr9), &IDTVEC(intr10), &IDTVEC(intr11),
&IDTVEC(intr12), &IDTVEC(intr13), &IDTVEC(intr14), &IDTVEC(intr15) };
/* out of range default interrupt vector gate entry */
-extern IDTVEC(intrdefault);
+extern inthand_t IDTVEC(intrdefault);
/*
* Fill in default interrupt table (in case of spuruious interrupt
diff --git a/sys/i386/isa/isa_device.h b/sys/i386/isa/isa_device.h
index d11f8b4..f119df4 100644
--- a/sys/i386/isa/isa_device.h
+++ b/sys/i386/isa/isa_device.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa_device.h 7.1 (Berkeley) 5/9/91
- * $Id: isa_device.h,v 1.2 1993/10/16 13:45:59 rgrimes Exp $
+ * $Id: isa_device.h,v 1.3 1993/11/07 17:44:32 wollman Exp $
*/
#ifndef _I386_ISA_ISA_DEVICE_H_
@@ -51,7 +51,7 @@ struct isa_device {
short id_drq; /* DMA request */
caddr_t id_maddr; /* physical i/o memory address on bus (if any)*/
int id_msize; /* size of i/o memory */
- int (*id_intr)(); /* interrupt interface routine */
+ void (*id_intr)(); /* interrupt interface routine */
int id_unit; /* unit number */
int id_flags; /* flags */
int id_scsiid; /* scsi id if needed */
@@ -75,4 +75,8 @@ extern struct isa_device isa_devtab_bio[], isa_devtab_tty[], isa_devtab_net[],
isa_devtab_null[];
extern struct isa_device *find_isadev(/* table, driver, unit*/);
+
+extern void isa_dmastart(int, caddr_t, unsigned, unsigned);
+extern void isa_dmadone(int, caddr_t, int, int);
+
#endif /* _I386_ISA_ISA_DEVICE_H_ */
diff --git a/sys/i386/isa/mcd.c b/sys/i386/isa/mcd.c
index 97b3f51..f4802bc 100644
--- a/sys/i386/isa/mcd.c
+++ b/sys/i386/isa/mcd.c
@@ -34,7 +34,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.2 1993/10/16 13:46:13 rgrimes Exp $
+ * $Id: mcd.c,v 1.3 1993/11/25 01:31:43 wollman Exp $
*/
static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
@@ -68,7 +68,7 @@ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
#undef MCD_TO_WARNING_ON
#endif
#else
-#define MCD_TRACE(fmt,a,b,c,d) {if (mcd_data[unit].debug) {printf("mcd%d st=%02x: ",unit,mcd_data[unit].status); printf(fmt,a,b,c,d);}}
+#define MCD_TRACE(fmt,a,b,c,xd) {if (mcd_data[unit].debug) {printf("mcd%d st=%02x: ",unit,mcd_data[unit].status); printf(fmt,a,b,c,xd);}}
#endif
#define mcd_part(dev) ((minor(dev)) & 7)
@@ -158,7 +158,7 @@ static void hsg2msf(int hsg, bcd_t *msf);
static int msf2hsg(bcd_t *msf);
static int mcd_volinfo(int unit);
static int mcd_waitrdy(int port,int dly);
-static void mcd_doread(int state, struct mcd_mbx *mbxin);
+static void mcd_doread(caddr_t, int);
#ifndef MCDMINI
static int mcd_setmode(int unit, int mode);
static int mcd_getqchan(int unit, struct mcd_qchninfo *q);
@@ -397,7 +397,7 @@ static void mcd_start(int unit)
cd->mbx.p_offset = p->p_offset;
/* calling the read routine */
- mcd_doread(MCD_S_BEGIN,&(cd->mbx));
+ mcd_doread((caddr_t)MCD_S_BEGIN, (int)&(cd->mbx));
/* triggers mcd_start, when successful finished */
return;
}
@@ -811,8 +811,13 @@ mcdintr(unit)
*/
static struct mcd_mbx *mbxsave;
-static void mcd_doread(int state, struct mcd_mbx *mbxin)
+/*
+ * Good thing Alphas come with real CD players...
+ */
+static void mcd_doread(caddr_t xstate, int xmbxin)
{
+ int state = (int)xstate;
+ struct mcd_mbx *mbxin = (struct mcd_mbx *)xmbxin;
struct mcd_mbx *mbx = (state!=MCD_S_BEGIN) ? mbxsave : mbxin;
int unit = mbx->unit;
int port = mbx->port;
@@ -836,7 +841,7 @@ loop:
timeout((timeout_func_t)mcd_doread,(caddr_t)MCD_S_WAITSTAT,hz/100); /* XXX */
return;
case MCD_S_WAITSTAT:
- untimeout(mcd_doread,MCD_S_WAITSTAT);
+ untimeout(mcd_doread, (caddr_t)MCD_S_WAITSTAT);
if (mbx->count-- >= 0) {
if (inb(port+mcd_xfer) & MCD_ST_BUSY) {
timeout((timeout_func_t)mcd_doread,(caddr_t)MCD_S_WAITSTAT,hz/100); /* XXX */
@@ -873,7 +878,7 @@ loop:
}
case MCD_S_WAITMODE:
- untimeout(mcd_doread,MCD_S_WAITMODE);
+ untimeout(mcd_doread, (caddr_t)MCD_S_WAITMODE);
if (mbx->count-- < 0) {
#ifdef MCD_TO_WARNING_ON
printf("mcd%d: timeout set mode\n",unit);
@@ -911,7 +916,7 @@ nextblock:
timeout((timeout_func_t)mcd_doread,(caddr_t)MCD_S_WAITREAD,hz/100); /* XXX */
return;
case MCD_S_WAITREAD:
- untimeout(mcd_doread,MCD_S_WAITREAD);
+ untimeout(mcd_doread,(caddr_t)MCD_S_WAITREAD);
if (mbx->count-- > 0) {
k = inb(port+mcd_xfer);
if ((k & 2)==0) {
diff --git a/sys/i386/isa/sound/dmabuf.c b/sys/i386/isa/sound/dmabuf.c
index da20ec5..ace02d1 100644
--- a/sys/i386/isa/sound/dmabuf.c
+++ b/sys/i386/isa/sound/dmabuf.c
@@ -510,9 +510,9 @@ DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode)
printk ("sound: Invalid DMA mode for device %d\n", dev);
isa_dmastart ((dma_mode == DMA_MODE_READ) ? B_READ : B_WRITE,
- snd_raw_buf_phys[dev][0],
- sound_buffsizes[dev],
- chan);
+ (caddr_t)snd_raw_buf_phys[dev][0],
+ (unsigned)sound_buffsizes[dev],
+ (unsigned)chan);
#else
#ifdef ISC
printk ("sound: Invalid DMA mode for device %d\n", dev);
@@ -540,7 +540,7 @@ DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode)
#else
#ifdef __386BSD__
isa_dmastart ((dma_mode == DMA_MODE_READ) ? B_READ : B_WRITE,
- physaddr,
+ (caddr_t)physaddr,
count,
chan);
#else
diff --git a/sys/i386/isa/sound/os.h b/sys/i386/isa/sound/os.h
index 60fb96c..fba2098 100644
--- a/sys/i386/isa/sound/os.h
+++ b/sys/i386/isa/sound/os.h
@@ -110,12 +110,12 @@ typedef struct uio snd_rw_buf;
* user space. The count is number of bytes to be moved.
*/
#define COPY_FROM_USER(target, source, offs, count) \
- do { if (uiomove(target, count, source)) { \
+ do { if (uiomove(target, count, (struct uio *)source)) { \
printf ("sb: Bad copyin()!\n"); \
} } while(0)
/* Like COPY_FOM_USER but for writes. */
#define COPY_TO_USER(target, offs, source, count) \
- do { if (uiomove(source, count, target)) { \
+ do { if (uiomove(source, count, (struct uio *)target)) { \
printf ("sb: Bad copyout()!\n"); \
} } while(0)
/*
@@ -123,10 +123,10 @@ typedef struct uio snd_rw_buf;
* short (16 bit) or long (32 bit) at a time.
* The same restrictions apply than for COPY_*_USER
*/
-#define GET_BYTE_FROM_USER(target, addr, offs) {uiomove((char*)&(target), 1, addr);}
-#define GET_SHORT_FROM_USER(target, addr, offs) {uiomove((char*)&(target), 2, addr);}
-#define GET_WORD_FROM_USER(target, addr, offs) {uiomove((char*)&(target), 4, addr);}
-#define PUT_WORD_TO_USER(addr, offs, data) {uiomove((char*)&(data), 4, addr);}
+#define GET_BYTE_FROM_USER(target, addr, offs) {uiomove((char*)&(target), 1, (struct uio *)addr);}
+#define GET_SHORT_FROM_USER(target, addr, offs) {uiomove((char*)&(target), 2, (struct uio *)addr);}
+#define GET_WORD_FROM_USER(target, addr, offs) {uiomove((char*)&(target), 4, (struct uio *)addr);}
+#define PUT_WORD_TO_USER(addr, offs, data) {uiomove((char*)&(data), 4, (struct uio *)addr);}
/*
* The way how the ioctl arguments are passed is another nonportable thing.
@@ -224,6 +224,7 @@ typedef struct uio snd_rw_buf;
*
*/
#define GET_TIME() get_time()
+extern long get_time(void);
/*#define GET_TIME() (lbolt)*/ /* Returns current time (1/HZ secs since boot) */
/*
diff --git a/sys/i386/isa/sound/soundcard.c b/sys/i386/isa/sound/soundcard.c
index b9044f3..593f928 100644
--- a/sys/i386/isa/sound/soundcard.c
+++ b/sys/i386/isa/sound/soundcard.c
@@ -75,7 +75,7 @@ int sndwrite (int dev, struct uio *uio);
int sndselect (int dev, int rw);
static void sound_mem_init(void);
-int
+long
get_time()
{
extern struct timeval time;
@@ -393,7 +393,7 @@ sndattach (struct isa_device *dev)
static int midi_initialized = 0;
static int seq_initialized = 0;
static int generic_midi_initialized = 0;
- unsigned long mem_start = 0xefffffff;
+ unsigned long mem_start = 0xefffffffUL;
struct address_info hw_config;
hw_config.io_base = dev->id_iobase;
@@ -514,7 +514,7 @@ void
sound_stop_timer (void)
{
if (timer_running)
- untimeout (sequencer_timer, 0);
+ untimeout ((timeout_func_t)sequencer_timer, 0); /* XXX should fix */
timer_running = 0;
}
@@ -555,7 +555,7 @@ sound_mem_init (void)
if (sound_buffsizes[dev] > dma_pagesize)
sound_buffsizes[dev] = dma_pagesize;
- sound_buffsizes[dev] &= 0xfffff000; /* Truncate to n*4k */
+ sound_buffsizes[dev] &= ~0xfff; /* Truncate to n*4k */
if (sound_buffsizes[dev] < 4096)
sound_buffsizes[dev] = 4096;
diff --git a/sys/i386/isa/ultra14f.c b/sys/i386/isa/ultra14f.c
index 9ed59f9..5f6d7b0 100644
--- a/sys/i386/isa/ultra14f.c
+++ b/sys/i386/isa/ultra14f.c
@@ -19,7 +19,7 @@
* commenced: Sun Sep 27 18:14:01 PDT 1992
* slight mod to make work with 34F as well: Wed Jun 2 18:05:48 WST 1993
*
- * $Id: ultra14f.c,v 1.12 1993/11/18 05:02:20 rgrimes Exp $
+ * $Id: ultra14f.c,v 1.13 1993/11/25 01:31:50 wollman Exp $
*/
#include <sys/types.h>
@@ -46,11 +46,6 @@
#ifdef KERNEL
#include "ddb.h"
-#if NDDB > 0
-int Debugger();
-#else /* NDDB */
-#define Debugger() panic("should call debugger here")
-#endif /* NDDB */
#else /*KERNEL */
#define NUHA 1
#endif /*KERNEL */
@@ -321,7 +316,7 @@ uha_send_mbox(int unit, struct mscp *mscp)
}
if (spincount == 0) {
printf("uha%d: uha_send_mbox, board not responding\n", unit);
- Debugger();
+ Debugger("ultra14f");
}
outl(port + UHA_OGM0, KVTOPHYS(mscp));
outb(port + UHA_LINT, (UHA_OGMINT));
@@ -348,7 +343,7 @@ uha_abort(int unit, struct mscp *mscp)
if (spincount == 0);
{
printf("uha%d: uha_abort, board not responding\n", unit);
- Debugger();
+ Debugger("ultra14f");
}
outl(port + UHA_OGM0, KVTOPHYS(mscp));
outb(port + UHA_LINT, UHA_ABORT);
@@ -360,7 +355,7 @@ uha_abort(int unit, struct mscp *mscp)
}
if (abortcount == 0) {
printf("uha%d: uha_abort, board not responding\n", unit);
- Debugger();
+ Debugger("ultra14f");
}
if ((inb(port + UHA_SINT) & 0x10) != 0) {
outb(port + UHA_SINT, UHA_ABORT_ACK);
@@ -528,7 +523,7 @@ uhaintr(unit)
printf("uha: BAD MSCP RETURNED\n");
return (0); /* whatever it was, it'll timeout */
}
- untimeout(uha_timeout, mscp);
+ untimeout(uha_timeout, (caddr_t)mscp);
uha_done(unit, mscp);
}
diff --git a/sys/i386/isa/wd.c b/sys/i386/isa/wd.c
index 85790cb..4852adb 100644
--- a/sys/i386/isa/wd.c
+++ b/sys/i386/isa/wd.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
- * $Id: wd.c,v 1.16 1993/11/23 21:36:37 nate Exp $
+ * $Id: wd.c,v 1.17 1993/11/25 01:31:52 wollman Exp $
*/
/* TODO:peel out buffer at low ipl, speed improvement */
@@ -46,6 +46,7 @@
#include "param.h"
#include "dkbad.h"
#include "systm.h"
+#include "kernel.h"
#include "conf.h"
#include "file.h"
#include "stat.h"
@@ -532,7 +533,7 @@ RETRY:
}
/* then send it! */
- outsw (wdc+wd_data, addr+du->dk_skip * DEV_BSIZE,
+ outsw (wdc + wd_data, (caddr_t)addr + du->dk_skip * DEV_BSIZE,
DEV_BSIZE/sizeof(short));
du->dk_bc -= DEV_BSIZE;
wdtimeout_status[unit] = 2;
@@ -634,11 +635,11 @@ outt:
/* suck in data */
insw (wdc+wd_data,
- (int)bp->b_un.b_addr + du->dk_skip * DEV_BSIZE, chk);
+ (caddr_t)bp->b_un.b_addr + du->dk_skip * DEV_BSIZE, chk);
du->dk_bc -= chk * sizeof(short);
/* for obselete fractional sector reads */
- while (chk++ < 256) insw (wdc+wd_data, &dummy, 1);
+ while (chk++ < 256) insw (wdc + wd_data, (caddr_t)&dummy, 1);
}
wdxfer[du->dk_unit]++;
@@ -1298,7 +1299,8 @@ wddump(dev_t dev) /* dump core after a system crash */
blkcnt = secpercyl - (blknum % secpercyl);
/* keep transfer within current cylinder */
#endif
- pmap_enter(kernel_pmap, CADDR1, trunc_page(addr), VM_PROT_READ, TRUE);
+ pmap_enter(kernel_pmap, (vm_offset_t)CADDR1,
+ trunc_page(addr), VM_PROT_READ, TRUE);
/* compute disk address */
cylin = blknum / secpercyl;
diff --git a/sys/i386/isa/wt.c b/sys/i386/isa/wt.c
index ccfb3fd..1e97553 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$
+ * $Id: wt.c,v 1.4 1993/12/13 18:38:43 alm Exp $
*
*/
@@ -54,6 +54,8 @@
#if NWT > 0
#include "sys/param.h"
+#include "systm.h"
+#include "kernel.h"
#include "sys/buf.h"
#include "sys/fcntl.h"
#include "sys/malloc.h"
@@ -150,13 +152,11 @@ typedef struct {
wtinfo_t wttab[NWT]; /* tape info by unit number */
-extern int hz; /* number of ticks per second */
-
static int wtwait (wtinfo_t *t, int catch, char *msg);
static int wtcmd (wtinfo_t *t, int cmd);
static int wtstart (wtinfo_t *t, unsigned mode, void *vaddr, unsigned len);
static void wtdma (wtinfo_t *t);
-static void wtimer (wtinfo_t *t);
+static void wtimer (caddr_t, int);
static void wtclock (wtinfo_t *t);
static int wtreset (wtinfo_t *t);
static int wtsense (wtinfo_t *t, int verb, int ignor);
@@ -166,16 +166,8 @@ static int wtreadfm (wtinfo_t *t);
static int wtwritefm (wtinfo_t *t);
static int wtpoll (wtinfo_t *t, int mask, int bits);
+/* XXX */
extern void DELAY (int usec);
-extern void bcopy (void *from, void *to, unsigned len);
-extern void isa_dmastart (int flags, void *addr, unsigned len, unsigned chan);
-extern void isa_dmadone (int flags, void *addr, unsigned len, int chan);
-extern void printf (char *str, ...);
-extern int splbio (void);
-extern int splx (int level);
-extern void timeout (void (*func) (), void *arg, int timo);
-extern int tsleep (void *chan, int priority, char *msg, int timo);
-extern void wakeup (void *chan);
/*
* Probe for the presence of the device.
@@ -569,7 +561,7 @@ void wtintr (int u)
"rewind busy?\n" : "rewind finished\n"));
t->flags &= ~TPREW; /* Rewind finished. */
wtsense (t, 1, TP_WRP);
- wakeup (t);
+ wakeup ((caddr_t)t);
return;
}
@@ -582,7 +574,7 @@ void wtintr (int u)
if (! (s & t->NOEXCEP)) /* operation failed */
wtsense (t, 1, (t->flags & TPRMARK) ? TP_WRP : 0);
t->flags &= ~(TPRMARK | TPWMARK); /* operation finished */
- wakeup (t);
+ wakeup ((caddr_t)t);
return;
}
@@ -617,7 +609,7 @@ void wtintr (int u)
t->flags |= TPVOL; /* end of file */
else
t->flags |= TPEXCEP; /* i/o error */
- wakeup (t);
+ wakeup ((caddr_t)t);
return;
}
@@ -629,7 +621,7 @@ void wtintr (int u)
}
if (t->dmacount > t->dmatotal) /* short last block */
t->dmacount = t->dmatotal;
- wakeup (t); /* wake up user level */
+ wakeup ((caddr_t)t); /* wake up user level */
DEBUG (("i/o finished, %d\n", t->dmacount));
}
@@ -670,7 +662,7 @@ static int wtreadfm (wtinfo_t *t)
/* write marker to the tape */
static int wtwritefm (wtinfo_t *t)
{
- tsleep (wtwritefm, WTPRI, "wtwfm", hz); /* timeout: 1 second */
+ tsleep ((caddr_t)wtwritefm, WTPRI, "wtwfm", hz); /* timeout: 1 second */
t->flags &= ~(TPRO | TPWO);
if (! wtcmd (t, QIC_WRITEFM)) {
wtsense (t, 1, 0);
@@ -703,7 +695,7 @@ static int wtpoll (wtinfo_t *t, int mask, int bits)
s = inb (t->STATPORT);
if ((s & mask) != bits)
return (s);
- tsleep (wtpoll, WTPRI, "wtpoll", 1); /* timeout: 1 tick */
+ tsleep ((caddr_t)wtpoll, WTPRI, "wtpoll", 1); /* timeout: 1 tick */
}
}
@@ -733,7 +725,7 @@ static int wtwait (wtinfo_t *t, int catch, char *msg)
DEBUG (("wtwait() `%s'\n", msg));
while (t->flags & (TPACTIVE | TPREW | TPRMARK | TPWMARK))
- if (error = tsleep (t, WTPRI | catch, msg, 0))
+ if (error = tsleep ((caddr_t)t, WTPRI | catch, msg, 0))
return (error);
return (0);
}
@@ -781,7 +773,7 @@ static void wtclock (wtinfo_t *t)
t->flags |= TPTIMER;
/* Some controllers seem to lose dma interrupts too often.
* To make the tape stream we need 1 tick timeout. */
- timeout (wtimer, t, (t->flags & TPACTIVE) ? 1 : hz);
+ timeout (wtimer, (caddr_t)t, (t->flags & TPACTIVE) ? 1 : hz);
}
}
@@ -790,8 +782,9 @@ static void wtclock (wtinfo_t *t)
* This is necessary in case interrupts get eaten due to
* multiple devices on a single IRQ line.
*/
-static void wtimer (wtinfo_t *t)
+static void wtimer (caddr_t xt, int dummy)
{
+ wtinfo_t *t = (wtinfo_t *)xt;
int s;
t->flags &= ~TPTIMER;
OpenPOWER on IntegriCloud