projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
need to omit qv/qd from bootxx's
[unix-history]
/
usr
/
src
/
sys
/
vax
/
stand
/
mba.c
diff --git
a/usr/src/sys/vax/stand/mba.c
b/usr/src/sys/vax/stand/mba.c
index
5b0f9fc
..
e647357
100644
(file)
--- a/
usr/src/sys/vax/stand/mba.c
+++ b/
usr/src/sys/vax/stand/mba.c
@@
-3,7
+3,7
@@
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)mba.c 7.
2 (Berkeley) 2/21/87
+ * @(#)mba.c 7.
5 (Berkeley) %G%
*/
#include "../machine/pte.h"
*/
#include "../machine/pte.h"
@@
-20,17
+20,15
@@
#include "saio.h"
#include "savax.h"
#include "saio.h"
#include "savax.h"
-mbastart(io, func)
+mbastart(io,
unit,
func)
register struct iob *io;
register struct iob *io;
- int func;
+ int
unit,
func;
{
{
- struct mba_regs *mba = mbamba(io->i_
uni
t);
- struct mba_drv *drv = mbadrv(io->i_unit);
+ struct mba_regs *mba = mbamba(io->i_
adap
t);
+ struct mba_drv *drv = mbadrv(io->i_
adapt,
unit);
register struct pte *pte = mba->mba_map;
register struct pte *pte = mba->mba_map;
- int npf;
- unsigned v;
- int o;
- int vaddr;
+ unsigned int v;
+ int npf, o, vaddr;
v = btop(io->i_ma);
o = (int)io->i_ma & PGOFSET;
v = btop(io->i_ma);
o = (int)io->i_ma & PGOFSET;
@@
-47,12
+45,12
@@
mbastart(io, func)
case F_RDDATA: /* standard read */
drv->mbd_cs1 = MB_RCOM|MB_GO;
case F_RDDATA: /* standard read */
drv->mbd_cs1 = MB_RCOM|MB_GO;
- mbawait(io);
+ mbawait(io
, unit
);
return(0);
case F_WRDATA: /* standard write */
drv->mbd_cs1 = MB_WCOM|MB_GO;
return(0);
case F_WRDATA: /* standard write */
drv->mbd_cs1 = MB_WCOM|MB_GO;
- mbawait(io);
+ mbawait(io
, unit
);
return(0);
/* the following commands apply to disks only */
return(0);
/* the following commands apply to disks only */
@@
-78,7
+76,7
@@
mbastart(io, func)
default:
goto error;
}
default:
goto error;
}
- mbawait(io);
+ mbawait(io
, unit
);
if ((drv->mbd_dt & MBDT_TAP) == 0)
return (0);
error:
if ((drv->mbd_dt & MBDT_TAP) == 0)
return (0);
error:
@@
-87,11
+85,12
@@
error:
return (1);
}
return (1);
}
-mbawait(io)
+mbawait(io
, unit
)
register struct iob *io;
register struct iob *io;
+ int unit;
{
{
- struct mba_regs *mba = mbamba(io->i_
uni
t);
- struct mba_drv *drv = mbadrv(io->i_unit);
+ struct mba_regs *mba = mbamba(io->i_
adap
t);
+ struct mba_drv *drv = mbadrv(io->i_
adapt,
unit);
while (mba->mba_sr & MBSR_DTBUSY)
DELAY(100);
while (mba->mba_sr & MBSR_DTBUSY)
DELAY(100);
@@
-102,10
+101,8
@@
mbainit(mbanum)
{
register struct mba_regs *mba = mbaddr[mbanum];
{
register struct mba_regs *mba = mbaddr[mbanum];
- if (badaddr((char *)mba, sizeof(long))) {
- printf("nonexistent mba");
+ if (badaddr((char *)mba, sizeof(long)))
return (0);
return (0);
- }
if ((mbaact & (1<<mbanum)) == 0) {
mba->mba_cr = MBCR_INIT;
mbaact |= 1<<mbanum;
if ((mbaact & (1<<mbanum)) == 0) {
mba->mba_cr = MBCR_INIT;
mbaact |= 1<<mbanum;