printf -> kprintf, sprintf -> ksprintf
This commit is contained in:
parent
01d75c7c68
commit
9beb92aad7
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: md_root.c,v 1.1 1996/05/20 01:17:31 chuck Exp $ */
|
||||
/* $NetBSD: md_root.c,v 1.2 1996/10/10 23:41:01 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Gordon W. Ross
|
||||
|
@ -60,7 +60,7 @@ rd_attach_hook(unit, rd)
|
|||
rd->rd_addr = (caddr_t) rd_root_image;
|
||||
rd->rd_size = (size_t) rd_root_size;
|
||||
rd->rd_type = RD_KMEM_FIXED;
|
||||
printf(" fixed, %d blocks", MINIROOTSIZE);
|
||||
kprintf(" fixed, %d blocks", MINIROOTSIZE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pcc.c,v 1.6 1996/09/12 05:04:18 thorpej Exp $ */
|
||||
/* $NetBSD: pcc.c,v 1.7 1996/10/10 23:40:57 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Jason R. Thorpe
|
||||
|
@ -136,7 +136,7 @@ pccattach(parent, self, args)
|
|||
pccsc->sc_pcc = sys_pcc;
|
||||
pccsc->sc_pcc->int_vectr = PCC_VECBASE;
|
||||
|
||||
printf(": Peripheral Channel Controller, "
|
||||
kprintf(": Peripheral Channel Controller, "
|
||||
"rev %d, vecbase 0x%x\n", pccsc->sc_pcc->pcc_rev,
|
||||
pccsc->sc_pcc->int_vectr);
|
||||
|
||||
|
@ -185,11 +185,11 @@ pccprint(aux, cp)
|
|||
struct pcc_attach_args *pa = aux;
|
||||
|
||||
if (cp)
|
||||
printf("%s at %s", pa->pa_name, cp);
|
||||
kprintf("%s at %s", pa->pa_name, cp);
|
||||
|
||||
printf(" offset 0x%lx", pa->pa_offset);
|
||||
kprintf(" offset 0x%lx", pa->pa_offset);
|
||||
if (pa->pa_ipl != -1)
|
||||
printf(" ipl %d", pa->pa_ipl);
|
||||
kprintf(" ipl %d", pa->pa_ipl);
|
||||
|
||||
return (UNCONF);
|
||||
}
|
||||
|
@ -205,12 +205,12 @@ pccintr_establish(pccvec, hand, lvl, arg)
|
|||
{
|
||||
|
||||
if ((pccvec < 0) || (pccvec >= PCC_NVEC)) {
|
||||
printf("pcc: illegal vector offset: 0x%x\n", pccvec);
|
||||
kprintf("pcc: illegal vector offset: 0x%x\n", pccvec);
|
||||
panic("pccintr_establish");
|
||||
}
|
||||
|
||||
if ((lvl < 1) || (lvl > 7)) {
|
||||
printf("pcc: illegal interrupt level: %d\n", lvl);
|
||||
kprintf("pcc: illegal interrupt level: %d\n", lvl);
|
||||
panic("pccintr_establish");
|
||||
}
|
||||
|
||||
|
@ -223,7 +223,7 @@ pccintr_disestablish(pccvec)
|
|||
{
|
||||
|
||||
if ((pccvec < 0) || (pccvec >= PCC_NVEC)) {
|
||||
printf("pcc: illegal vector offset: 0x%x\n", pccvec);
|
||||
kprintf("pcc: illegal vector offset: 0x%x\n", pccvec);
|
||||
panic("pccintr_establish");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rd_root.c,v 1.1 1996/05/20 01:17:31 chuck Exp $ */
|
||||
/* $NetBSD: rd_root.c,v 1.2 1996/10/10 23:41:01 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Gordon W. Ross
|
||||
|
@ -60,7 +60,7 @@ rd_attach_hook(unit, rd)
|
|||
rd->rd_addr = (caddr_t) rd_root_image;
|
||||
rd->rd_size = (size_t) rd_root_size;
|
||||
rd->rd_type = RD_KMEM_FIXED;
|
||||
printf(" fixed, %d blocks", MINIROOTSIZE);
|
||||
kprintf(" fixed, %d blocks", MINIROOTSIZE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sbic.c,v 1.3 1996/08/26 06:47:42 thorpej Exp $ */
|
||||
/* $NetBSD: sbic.c,v 1.4 1996/10/10 23:41:03 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Changes Copyright (c) 1996 Steve Woodford
|
||||
|
@ -143,7 +143,7 @@ int sbicdma_hits = 0; /* number of DMA chains that were contiguous */
|
|||
int sbicdma_misses = 0; /* number of DMA chains that were not contiguous */
|
||||
int sbicdma_saves = 0;
|
||||
|
||||
#define QPRINTF(a) if (sbic_debug > 1) printf a
|
||||
#define QPRINTF(a) if (sbic_debug > 1) kprintf a
|
||||
|
||||
int sbic_debug = 0; /* Debug all chip related things */
|
||||
int sync_debug = 0; /* Debug all Synchronous Scsi related things */
|
||||
|
@ -201,7 +201,7 @@ sbic_save_ptrs(dev)
|
|||
do {
|
||||
GET_SBIC_asr(regs, asr);
|
||||
if( asr & SBIC_ASR_DBR ) {
|
||||
printf("sbic_save_ptrs: asr %02x canceled!\n", asr);
|
||||
kprintf("sbic_save_ptrs: asr %02x canceled!\n", asr);
|
||||
splx(s);
|
||||
return;
|
||||
}
|
||||
|
@ -258,7 +258,7 @@ sbic_save_ptrs(dev)
|
|||
|
||||
#ifdef DEBUG
|
||||
if ( data_pointer_debug )
|
||||
printf("save at (%x,%x):%x\n",
|
||||
kprintf("save at (%x,%x):%x\n",
|
||||
dev->sc_cur->dc_addr, dev->sc_cur->dc_count,count);
|
||||
sbicdma_saves++;
|
||||
#endif
|
||||
|
@ -342,7 +342,7 @@ sbic_load_ptrs(dev)
|
|||
|
||||
#ifdef DEBUG
|
||||
if ( data_pointer_debug )
|
||||
printf("DMA recalc:kv(%x,%x)pa(%x,%x)\n", acb->sc_kv.dc_addr,
|
||||
kprintf("DMA recalc:kv(%x,%x)pa(%x,%x)\n", acb->sc_kv.dc_addr,
|
||||
acb->sc_kv.dc_count,
|
||||
acb->sc_pa.dc_addr,
|
||||
acb->sc_tcnt);
|
||||
|
@ -388,7 +388,7 @@ sbic_scsicmd(xs)
|
|||
|
||||
if ( acb == NULL ) {
|
||||
#ifdef DEBUG
|
||||
printf("sbic_scsicmd: unable to queue request for target %d\n",
|
||||
kprintf("sbic_scsicmd: unable to queue request for target %d\n",
|
||||
slp->target);
|
||||
#ifdef DDB
|
||||
Debugger();
|
||||
|
@ -518,7 +518,7 @@ sbic_sched(dev)
|
|||
|
||||
#ifdef DEBUG
|
||||
if ( data_pointer_debug > 1 )
|
||||
printf("sbic_sched(%d,%d)\n", slp->target, slp->lun);
|
||||
kprintf("sbic_sched(%d,%d)\n", slp->target, slp->lun);
|
||||
#endif
|
||||
|
||||
dev->sc_xs = xs = acb->xs;
|
||||
|
@ -556,7 +556,7 @@ sbic_scsidone(acb, stat)
|
|||
|
||||
#ifdef DIAGNOSTIC
|
||||
if ( acb == NULL || xs == NULL ) {
|
||||
printf("sbic_scsidone -- (%d,%d) no scsi_xfer\n", dev->target, dev->lun);
|
||||
kprintf("sbic_scsidone -- (%d,%d) no scsi_xfer\n", dev->target, dev->lun);
|
||||
#ifdef DDB
|
||||
Debugger();
|
||||
#endif
|
||||
|
@ -571,7 +571,7 @@ sbic_scsidone(acb, stat)
|
|||
|
||||
#ifdef DEBUG
|
||||
if ( data_pointer_debug > 1 )
|
||||
printf("scsidone: (%d,%d)->(%d,%d)%02x\n", slp->target, slp->lun,
|
||||
kprintf("scsidone: (%d,%d)->(%d,%d)%02x\n", slp->target, slp->lun,
|
||||
dev->target, dev->lun, stat);
|
||||
|
||||
if ( xs->sc_link->target == dev->sc_link.adapter_target )
|
||||
|
@ -588,7 +588,7 @@ sbic_scsidone(acb, stat)
|
|||
|
||||
#ifdef DEBUG
|
||||
if ( report_sense )
|
||||
printf("sbic_scsidone: autosense %02x targ %d lun %d",
|
||||
kprintf("sbic_scsidone: autosense %02x targ %d lun %d",
|
||||
acb->cmd.opcode, slp->target, slp->lun);
|
||||
#endif
|
||||
|
||||
|
@ -624,7 +624,7 @@ sbic_scsidone(acb, stat)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (report_sense)
|
||||
printf(" => %02x %02x\n", xs->sense.flags,
|
||||
kprintf(" => %02x %02x\n", xs->sense.flags,
|
||||
xs->sense.extra_bytes[3]);
|
||||
#endif
|
||||
|
||||
|
@ -673,7 +673,7 @@ sbic_scsidone(acb, stat)
|
|||
else if ( acb->chain.tqe_next ) {
|
||||
TAILQ_REMOVE(&dev->ready_list, acb, chain);
|
||||
} else {
|
||||
printf("%s: can't find matching acb\n", dev->sc_dev.dv_xname);
|
||||
kprintf("%s: can't find matching acb\n", dev->sc_dev.dv_xname);
|
||||
#ifdef DDB
|
||||
Debugger();
|
||||
#endif
|
||||
|
@ -736,7 +736,7 @@ sbicwait(regs, until, timeo, line)
|
|||
if ( timeo-- == 0 ) {
|
||||
int csr;
|
||||
GET_SBIC_csr(regs, csr);
|
||||
printf("sbicwait TIMEO @%d with asr=x%x csr=x%x\n", line, val, csr);
|
||||
kprintf("sbicwait TIMEO @%d with asr=x%x csr=x%x\n", line, val, csr);
|
||||
#if defined(DDB) && defined(DEBUG)
|
||||
Debugger();
|
||||
#endif
|
||||
|
@ -763,7 +763,7 @@ sbicabort(dev, where)
|
|||
GET_SBIC_asr(regs, asr);
|
||||
GET_SBIC_csr(regs, csr);
|
||||
|
||||
printf ("%s: abort %s: csr = 0x%02x, asr = 0x%02x\n",
|
||||
kprintf ("%s: abort %s: csr = 0x%02x, asr = 0x%02x\n",
|
||||
dev->sc_dev.dv_xname, where, csr, asr);
|
||||
|
||||
/*
|
||||
|
@ -777,7 +777,7 @@ sbicabort(dev, where)
|
|||
* But we don't know what direction it needs to go
|
||||
*/
|
||||
GET_SBIC_data(regs, asr);
|
||||
printf("%s: abort %s: clearing data buffer 0x%02x\n",
|
||||
kprintf("%s: abort %s: clearing data buffer 0x%02x\n",
|
||||
dev->sc_dev.dv_xname, where, asr);
|
||||
GET_SBIC_asr(regs, asr);
|
||||
if ( asr & SBIC_ASR_DBR ) /* Not the read direction, then */
|
||||
|
@ -787,7 +787,7 @@ sbicabort(dev, where)
|
|||
|
||||
WAIT_CIP(regs);
|
||||
|
||||
printf("%s: sbicabort - sending ABORT command\n", dev->sc_dev.dv_xname);
|
||||
kprintf("%s: sbicabort - sending ABORT command\n", dev->sc_dev.dv_xname);
|
||||
SET_SBIC_cmd(regs, SBIC_CMD_ABORT);
|
||||
WAIT_CIP(regs);
|
||||
|
||||
|
@ -797,14 +797,14 @@ sbicabort(dev, where)
|
|||
/*
|
||||
* ok, get more drastic..
|
||||
*/
|
||||
printf("%s: sbicabort - asr %x, trying to reset\n",
|
||||
kprintf("%s: sbicabort - asr %x, trying to reset\n",
|
||||
dev->sc_dev.dv_xname, asr);
|
||||
sbicreset(dev);
|
||||
dev->sc_flags &= ~SBICF_SELECTED;
|
||||
return SBIC_STATE_ERROR;
|
||||
}
|
||||
|
||||
printf("%s: sbicabort - sending DISC command\n", dev->sc_dev.dv_xname);
|
||||
kprintf("%s: sbicabort - sending DISC command\n", dev->sc_dev.dv_xname);
|
||||
SET_SBIC_cmd(regs, SBIC_CMD_DISC);
|
||||
|
||||
do {
|
||||
|
@ -882,7 +882,7 @@ sbicinit(dev)
|
|||
|
||||
#ifdef DEBUG
|
||||
if ( inhibit_sync )
|
||||
printf("%s: Inhibiting synchronous transfer %02x\n",
|
||||
kprintf("%s: Inhibiting synchronous transfer %02x\n",
|
||||
dev->sc_dev.dv_xname, inhibit_sync);
|
||||
#endif
|
||||
for (i = 0; i < 8; ++i) {
|
||||
|
@ -964,7 +964,7 @@ sbicerror(dev, csr)
|
|||
if ( xs->flags & SCSI_SILENT )
|
||||
return;
|
||||
|
||||
printf("%s: csr == 0x%02x\n", dev->sc_dev.dv_xname, csr);
|
||||
kprintf("%s: csr == 0x%02x\n", dev->sc_dev.dv_xname, csr);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1130,7 +1130,7 @@ sbicselectbus(dev)
|
|||
*/
|
||||
#ifdef DEBUG
|
||||
if ( sync_debug )
|
||||
printf("\nSending sync request to target %d ... ", id);
|
||||
kprintf("\nSending sync request to target %d ... ", id);
|
||||
#endif
|
||||
/*
|
||||
* setup scsi message sync message request
|
||||
|
@ -1147,7 +1147,7 @@ sbicselectbus(dev)
|
|||
dev->sc_sync[id].state = SYNC_SENT;
|
||||
#ifdef DEBUG
|
||||
if ( sync_debug )
|
||||
printf ("sent\n");
|
||||
kprintf ("sent\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1164,7 +1164,7 @@ sbicselectbus(dev)
|
|||
if ( dev->sc_sync[target].state == SYNC_DONE ) {
|
||||
#ifdef DEBUG
|
||||
if ( sync_debug )
|
||||
printf("select(%d): sync reg = 0x%02x\n", target,
|
||||
kprintf("select(%d): sync reg = 0x%02x\n", target,
|
||||
SBIC_SYN(dev->sc_sync[target].offset,
|
||||
dev->sc_sync[target].period));
|
||||
#endif
|
||||
|
@ -1173,7 +1173,7 @@ sbicselectbus(dev)
|
|||
} else {
|
||||
#ifdef DEBUG
|
||||
if ( sync_debug )
|
||||
printf("select(%d): sync reg = 0x%02x\n", target,
|
||||
kprintf("select(%d): sync reg = 0x%02x\n", target,
|
||||
SBIC_SYN(0,sbic_min_period));
|
||||
#endif
|
||||
SET_SBIC_syn(regs, SBIC_SYN(0, sbic_min_period));
|
||||
|
@ -1352,7 +1352,7 @@ sbicicmd(dev, cbuf, clen, buf, len)
|
|||
|
||||
#ifdef DEBUG
|
||||
if ( data_pointer_debug > 1 )
|
||||
printf("sbicicmd(%d,%d):%d\n", dev->target, dev->lun, acb->sc_kv.dc_count);
|
||||
kprintf("sbicicmd(%d,%d):%d\n", dev->target, dev->lun, acb->sc_kv.dc_count);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -1407,7 +1407,7 @@ sbicicmd(dev, cbuf, clen, buf, len)
|
|||
} else {
|
||||
#ifdef DEBUG
|
||||
if ( reselect_debug > 1 )
|
||||
printf("sbicicmd: handling disconnect\n");
|
||||
kprintf("sbicicmd: handling disconnect\n");
|
||||
#endif
|
||||
still_busy = SBIC_STATE_DISCONNECT;
|
||||
}
|
||||
|
@ -1435,7 +1435,7 @@ sbicicmd(dev, cbuf, clen, buf, len)
|
|||
*/
|
||||
#ifdef DEBUG
|
||||
if ( sbic_debug )
|
||||
printf("SBICICMD status phase (bsy=%d)\n", still_busy);
|
||||
kprintf("SBICICMD status phase (bsy=%d)\n", still_busy);
|
||||
#endif
|
||||
SET_SBIC_cmd_phase(regs, 0x46);
|
||||
SET_SBIC_cmd(regs, SBIC_CMD_SEL_ATN_XFER);
|
||||
|
@ -1463,7 +1463,7 @@ sbicicmd(dev, cbuf, clen, buf, len)
|
|||
if ( asr & SBIC_ASR_DBR ) {
|
||||
int i;
|
||||
|
||||
printf("sbicicmd: Waiting while sbic is jammed, CSR:%02x,ASR:%02x\n", csr,asr);
|
||||
kprintf("sbicicmd: Waiting while sbic is jammed, CSR:%02x,ASR:%02x\n", csr,asr);
|
||||
#ifdef DDB
|
||||
Debugger();
|
||||
#endif
|
||||
|
@ -1487,7 +1487,7 @@ sbicicmd(dev, cbuf, clen, buf, len)
|
|||
* wait for last command to complete
|
||||
*/
|
||||
if ( asr & SBIC_ASR_LCI ) {
|
||||
printf("sbicicmd: last command ignored\n");
|
||||
kprintf("sbicicmd: last command ignored\n");
|
||||
}
|
||||
else
|
||||
if ( still_busy >= SBIC_STATE_RUNNING ) /* Bsy */
|
||||
|
@ -1505,7 +1505,7 @@ sbicicmd(dev, cbuf, clen, buf, len)
|
|||
|
||||
#ifdef DEBUG
|
||||
if ( data_pointer_debug > 1 )
|
||||
printf("sbicicmd done(%d,%d):%d =%d=\n", dev->target, dev->lun,
|
||||
kprintf("sbicicmd done(%d,%d):%d =%d=\n", dev->target, dev->lun,
|
||||
acb->sc_kv.dc_count,
|
||||
dev->sc_stat[0]);
|
||||
#endif
|
||||
|
@ -1589,7 +1589,7 @@ sbicgo(dev, xs)
|
|||
|
||||
#ifdef DEBUG
|
||||
if ( data_pointer_debug > 1 )
|
||||
printf("sbicgo(%d,%d): usedma=%d\n", dev->target, dev->lun, usedma);
|
||||
kprintf("sbicgo(%d,%d): usedma=%d\n", dev->target, dev->lun, usedma);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -1612,7 +1612,7 @@ sbicgo(dev, xs)
|
|||
count = acb->sc_kv.dc_count;
|
||||
|
||||
if ( count && ((char *)kvtop(addr) != acb->sc_pa.dc_addr) ) {
|
||||
printf("sbic: DMA buffer mapping changed %x->%x\n",
|
||||
kprintf("sbic: DMA buffer mapping changed %x->%x\n",
|
||||
acb->sc_pa.dc_addr, kvtop(addr));
|
||||
#ifdef DDB
|
||||
Debugger();
|
||||
|
@ -1651,7 +1651,7 @@ sbicgo(dev, xs)
|
|||
|
||||
#ifdef DEBUG
|
||||
if ( data_pointer_debug > 1 ) {
|
||||
printf("sbicgo dmago:%d(%x:%x) dmacmd=0x%02x\n", dev->target,
|
||||
kprintf("sbicgo dmago:%d(%x:%x) dmacmd=0x%02x\n", dev->target,
|
||||
dev->sc_cur->dc_addr,
|
||||
dev->sc_tcnt,
|
||||
dev->sc_dmacmd);
|
||||
|
@ -1678,7 +1678,7 @@ sbicgo(dev, xs)
|
|||
GET_SBIC_asr(regs, asr);
|
||||
|
||||
if ( asr & SBIC_ASR_LCI )
|
||||
printf("sbicgo: LCI asr:%02x csr:%02x\n", asr, csr);
|
||||
kprintf("sbicgo: LCI asr:%02x csr:%02x\n", asr, csr);
|
||||
|
||||
if ( asr & SBIC_ASR_INT )
|
||||
GET_SBIC_csr(regs, csr);
|
||||
|
@ -1689,7 +1689,7 @@ sbicgo(dev, xs)
|
|||
if ( i == SBIC_STATE_DONE ) {
|
||||
if ( dev->sc_stat[0] == 0xff )
|
||||
#if 0
|
||||
printf("sbicgo: done & stat = 0xff\n");
|
||||
kprintf("sbicgo: done & stat = 0xff\n");
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
|
@ -1731,7 +1731,7 @@ sbicintr(dev)
|
|||
GET_SBIC_asr(regs, asr);
|
||||
|
||||
if ( asr & SBIC_ASR_LCI )
|
||||
printf("sbicgo: LCI asr:%02x csr:%02x\n", asr, csr);
|
||||
kprintf("sbicgo: LCI asr:%02x csr:%02x\n", asr, csr);
|
||||
|
||||
if ( asr & SBIC_ASR_INT )
|
||||
GET_SBIC_csr(regs, csr);
|
||||
|
@ -1786,7 +1786,7 @@ sbicpoll(dev)
|
|||
u_char z = 0;
|
||||
|
||||
if ( asr & SBIC_ASR_DBR ) {
|
||||
printf("sbipoll: Waiting while sbic is jammed, CSR:%02x,ASR:%02x\n", csr,asr);
|
||||
kprintf("sbipoll: Waiting while sbic is jammed, CSR:%02x,ASR:%02x\n", csr,asr);
|
||||
#ifdef DDB
|
||||
Debugger();
|
||||
#endif
|
||||
|
@ -1806,7 +1806,7 @@ sbicpoll(dev)
|
|||
}
|
||||
|
||||
if ( asr & SBIC_ASR_LCI )
|
||||
printf("sbicpoll: LCI asr:%02x csr:%02x\n", asr,csr);
|
||||
kprintf("sbicpoll: LCI asr:%02x csr:%02x\n", asr,csr);
|
||||
else
|
||||
if ( i == SBIC_STATE_RUNNING ) /* BSY */
|
||||
SBIC_WAIT(regs, SBIC_ASR_INT, sbic_cmd_wait);
|
||||
|
@ -1839,7 +1839,7 @@ sbicmsgin(dev)
|
|||
|
||||
#ifdef DEBUG
|
||||
if ( reselect_debug > 1 )
|
||||
printf("sbicmsgin asr=%02x\n", asr);
|
||||
kprintf("sbicmsgin asr=%02x\n", asr);
|
||||
#endif
|
||||
|
||||
GET_SBIC_selid (regs, csr);
|
||||
|
@ -1865,7 +1865,7 @@ sbicmsgin(dev)
|
|||
|
||||
#ifdef DEBUG
|
||||
if ( reselect_debug > 1 )
|
||||
printf("sbicmsgin: got %02x csr %02x\n", *tmpaddr, csr);
|
||||
kprintf("sbicmsgin: got %02x csr %02x\n", *tmpaddr, csr);
|
||||
#endif
|
||||
|
||||
tmpaddr++;
|
||||
|
@ -1881,14 +1881,14 @@ sbicmsgin(dev)
|
|||
}
|
||||
|
||||
if ( msgaddr[0] == 0xff ) {
|
||||
printf("sbicmsgin: sbic swallowed our message\n");
|
||||
kprintf("sbicmsgin: sbic swallowed our message\n");
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
if ( sync_debug ) {
|
||||
GET_SBIC_asr(regs, asr);
|
||||
printf("msgin done csr 0x%x asr 0x%x msg 0x%x\n", csr, asr, msgaddr[0]);
|
||||
kprintf("msgin done csr 0x%x asr 0x%x msg 0x%x\n", csr, asr, msgaddr[0]);
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
|
@ -1913,7 +1913,7 @@ sbicmsgin(dev)
|
|||
|
||||
#ifdef DEBUG
|
||||
if ( sync_debug )
|
||||
printf("target %d rejected sync, going async\n", dev->target);
|
||||
kprintf("target %d rejected sync, going async\n", dev->target);
|
||||
#endif
|
||||
|
||||
dev->sc_sync[dev->target].period = sbic_min_period;
|
||||
|
@ -1956,7 +1956,7 @@ sbicmsgin(dev)
|
|||
|
||||
#ifdef DEBUG
|
||||
if ( reselect_debug > 1 && msgaddr[0] == MSG_DISCONNECT )
|
||||
printf("sbicmsgin: got disconnect msg %s\n",
|
||||
kprintf("sbicmsgin: got disconnect msg %s\n",
|
||||
(dev->sc_flags & SBICF_ICMD) ? "rejecting" : "");
|
||||
#endif
|
||||
|
||||
|
@ -1992,7 +1992,7 @@ sbicmsgin(dev)
|
|||
|
||||
#ifdef DEBUG
|
||||
if ( sync_debug )
|
||||
printf ("GOT MSG %d! target %d acting weird.."
|
||||
kprintf ("GOT MSG %d! target %d acting weird.."
|
||||
" waiting for disconnect...\n", msgaddr[0], dev->target);
|
||||
#endif
|
||||
|
||||
|
@ -2078,12 +2078,12 @@ sbicmsgin(dev)
|
|||
dev->sc_sync[dev->target].period));
|
||||
#ifdef DEBUG
|
||||
if ( sync_debug )
|
||||
printf("msgin(%d): sync reg = 0x%02x\n", dev->target,
|
||||
kprintf("msgin(%d): sync reg = 0x%02x\n", dev->target,
|
||||
SBIC_SYN(dev->sc_sync[dev->target].offset,
|
||||
dev->sc_sync[dev->target].period));
|
||||
#endif
|
||||
|
||||
printf("%s: target %d now synchronous, period=%dns, offset=%d.\n",
|
||||
kprintf("%s: target %d now synchronous, period=%dns, offset=%d.\n",
|
||||
dev->sc_dev.dv_xname, dev->target,
|
||||
msgaddr[3] * 4, msgaddr[4]);
|
||||
|
||||
|
@ -2094,7 +2094,7 @@ sbicmsgin(dev)
|
|||
*/
|
||||
#ifdef DEBUG
|
||||
if ( sbic_debug || sync_debug )
|
||||
printf ("sbicmsgin: Rejecting message 0x%02x\n", msgaddr[0]);
|
||||
kprintf ("sbicmsgin: Rejecting message 0x%02x\n", msgaddr[0]);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -2177,7 +2177,7 @@ sbicnextstate(dev, csr, asr)
|
|||
#ifdef DEBUG
|
||||
dev->sc_dmatimo = 0;
|
||||
if ( data_pointer_debug > 1 )
|
||||
printf("next dmastop: %d(%x:%x)\n", dev->target,
|
||||
kprintf("next dmastop: %d(%x:%x)\n", dev->target,
|
||||
dev->sc_cur->dc_addr,
|
||||
dev->sc_tcnt);
|
||||
#endif
|
||||
|
@ -2209,7 +2209,7 @@ sbicnextstate(dev, csr, asr)
|
|||
* Verify that we expected to transfer data...
|
||||
*/
|
||||
if ( acb->sc_kv.dc_count <= 0 ) {
|
||||
printf("next: DATA phase with xfer count == %d, asr:0x%02x csr:0x%02x\n",
|
||||
kprintf("next: DATA phase with xfer count == %d, asr:0x%02x csr:0x%02x\n",
|
||||
acb->sc_kv.dc_count, asr, csr);
|
||||
goto abort;
|
||||
}
|
||||
|
@ -2227,7 +2227,7 @@ sbicnextstate(dev, csr, asr)
|
|||
|
||||
#ifdef DEBUG
|
||||
if ( data_pointer_debug > 1 )
|
||||
printf("next PIO: %d(%x:%x)\n", dev->target,
|
||||
kprintf("next PIO: %d(%x:%x)\n", dev->target,
|
||||
acb->sc_kv.dc_addr,
|
||||
acb->sc_kv.dc_count);
|
||||
#endif
|
||||
|
@ -2270,7 +2270,7 @@ sbicnextstate(dev, csr, asr)
|
|||
#ifdef DEBUG
|
||||
dev->sc_dmatimo = 1;
|
||||
if ( data_pointer_debug > 1 )
|
||||
printf("next DMA: %d(%x:%x)\n", dev->target,
|
||||
kprintf("next DMA: %d(%x:%x)\n", dev->target,
|
||||
dev->sc_cur->dc_addr,
|
||||
dev->sc_tcnt);
|
||||
#endif
|
||||
|
@ -2317,7 +2317,7 @@ sbicnextstate(dev, csr, asr)
|
|||
* but just for the sake of paranoia...
|
||||
*/
|
||||
SET_SBIC_cmd(regs, SBIC_CMD_CLR_ACK); /* Dunno what I'm ACKing */
|
||||
printf("Acking unknown msgin CSR:%02x",csr);
|
||||
kprintf("Acking unknown msgin CSR:%02x",csr);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2334,7 +2334,7 @@ sbicnextstate(dev, csr, asr)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (sync_debug)
|
||||
printf ("sending REJECT msg to last msg.\n");
|
||||
kprintf ("sending REJECT msg to last msg.\n");
|
||||
#endif
|
||||
|
||||
SEND_BYTE(regs, MSG_REJECT);
|
||||
|
@ -2354,7 +2354,7 @@ sbicnextstate(dev, csr, asr)
|
|||
|
||||
#ifdef DEBUG
|
||||
if ( reselect_debug > 1 )
|
||||
printf("sbicnext target %d disconnected\n", dev->target);
|
||||
kprintf("sbicnext target %d disconnected\n", dev->target);
|
||||
#endif
|
||||
|
||||
TAILQ_INSERT_HEAD(&dev->nexus_list, acb, chain);
|
||||
|
@ -2424,7 +2424,7 @@ sbicnextstate(dev, csr, asr)
|
|||
* If we didn't get an interrupt, somethink's up
|
||||
*/
|
||||
if ( (asr & SBIC_ASR_INT) == 0 ) {
|
||||
printf("%s: Reselect without identify? asr %x\n",
|
||||
kprintf("%s: Reselect without identify? asr %x\n",
|
||||
dev->sc_dev.dv_xname, asr);
|
||||
newlun = 0; /* XXXX */
|
||||
} else {
|
||||
|
@ -2447,7 +2447,7 @@ sbicnextstate(dev, csr, asr)
|
|||
/*
|
||||
* Whoops! Target didn't go to message in phase!!
|
||||
*/
|
||||
printf("RSLT_NI - not MESG_IN_PHASE %x\n", csr);
|
||||
kprintf("RSLT_NI - not MESG_IN_PHASE %x\n", csr);
|
||||
newlun = 0; /* XXXSCW */
|
||||
}
|
||||
}
|
||||
|
@ -2459,7 +2459,7 @@ sbicnextstate(dev, csr, asr)
|
|||
#ifdef DEBUG
|
||||
if ( reselect_debug > 1 ||
|
||||
(reselect_debug && csr == SBIC_CSR_RSLT_NI) ) {
|
||||
printf("sbicnext: reselect %s from targ %d lun %d\n",
|
||||
kprintf("sbicnext: reselect %s from targ %d lun %d\n",
|
||||
csr == SBIC_CSR_RSLT_NI ? "NI" : "IFY", newtarget, newlun);
|
||||
}
|
||||
#endif
|
||||
|
@ -2472,7 +2472,7 @@ sbicnextstate(dev, csr, asr)
|
|||
*/
|
||||
#ifdef DEBUG
|
||||
if ( reselect_debug > 1 ) {
|
||||
printf("%s: reselect %s with active command\n",
|
||||
kprintf("%s: reselect %s with active command\n",
|
||||
dev->sc_dev.dv_xname,
|
||||
csr == SBIC_CSR_RSLT_NI ? "NI" : "IFY");
|
||||
}
|
||||
|
@ -2520,7 +2520,7 @@ sbicnextstate(dev, csr, asr)
|
|||
}
|
||||
|
||||
if ( acb == NULL ) {
|
||||
printf("%s: reselect %s targ %d not in nexus_list %x\n",
|
||||
kprintf("%s: reselect %s targ %d not in nexus_list %x\n",
|
||||
dev->sc_dev.dv_xname,
|
||||
csr == SBIC_CSR_RSLT_NI ? "NI" : "IFY", newtarget,
|
||||
&dev->nexus_list.tqh_first);
|
||||
|
@ -2538,7 +2538,7 @@ sbicnextstate(dev, csr, asr)
|
|||
/*
|
||||
* Something unexpected happened -- deal with it.
|
||||
*/
|
||||
printf("next: aborting asr 0x%02x csr 0x%02x\n", asr, csr);
|
||||
kprintf("next: aborting asr 0x%02x csr 0x%02x\n", asr, csr);
|
||||
|
||||
#ifdef DDB
|
||||
Debugger();
|
||||
|
@ -2547,7 +2547,7 @@ sbicnextstate(dev, csr, asr)
|
|||
#ifdef DEBUG
|
||||
dev->sc_dmatimo = 0;
|
||||
if ( data_pointer_debug > 1 )
|
||||
printf("next dmastop: %d(%x:%x)\n", dev->target,
|
||||
kprintf("next dmastop: %d(%x:%x)\n", dev->target,
|
||||
dev->sc_cur->dc_addr,
|
||||
dev->sc_tcnt);
|
||||
#endif
|
||||
|
@ -2563,7 +2563,7 @@ sbicnextstate(dev, csr, asr)
|
|||
#ifdef DEBUG
|
||||
dev->sc_dmatimo = 0;
|
||||
if ( data_pointer_debug > 1 )
|
||||
printf("next dmastop: %d(%x:%x)\n", dev->target,
|
||||
kprintf("next dmastop: %d(%x:%x)\n", dev->target,
|
||||
dev->sc_cur->dc_addr,
|
||||
dev->sc_tcnt);
|
||||
#endif
|
||||
|
@ -2685,7 +2685,7 @@ sbictimeout(dev)
|
|||
|
||||
if ( dev->sc_dmatimo > 1 ) {
|
||||
|
||||
printf("%s: dma timeout #%d\n", dev->sc_dev.dv_xname,
|
||||
kprintf("%s: dma timeout #%d\n", dev->sc_dev.dv_xname,
|
||||
dev->sc_dmatimo - 1);
|
||||
|
||||
GET_SBIC_asr(dev->sc_sbicp, asr);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vme.c,v 1.2 1996/08/27 21:56:19 cgd Exp $ */
|
||||
/* $NetBSD: vme.c,v 1.3 1996/10/10 23:41:07 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Jason R. Thorpe
|
||||
|
@ -121,7 +121,7 @@ vmechip_print(aux, cp)
|
|||
panic("vmechip_print: impossible bustype");
|
||||
}
|
||||
|
||||
printf("%s at %s", busname, cp);
|
||||
kprintf("%s at %s", busname, cp);
|
||||
}
|
||||
|
||||
return (UNCONF);
|
||||
|
@ -159,7 +159,7 @@ vme_attach(parent, self, args)
|
|||
struct device *self;
|
||||
void *args;
|
||||
{
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
|
||||
/* We know va_bustype == VME_Dxx */
|
||||
(void) config_search(vme_search, self, args);
|
||||
|
@ -180,7 +180,7 @@ vme_search(parent, match, aux)
|
|||
|
||||
/* Send in the clones. */
|
||||
if (cf->cf_fstate == FSTATE_STAR) {
|
||||
printf("vme_search: device `%s' is cloned\n", name);
|
||||
kprintf("vme_search: device `%s' is cloned\n", name);
|
||||
panic("clone devices not allowed on VME");
|
||||
}
|
||||
|
||||
|
@ -199,12 +199,12 @@ vme_search(parent, match, aux)
|
|||
/* atype checked later */
|
||||
|
||||
if (va->va_ipl == -1) {
|
||||
printf("vme_search: device `%s%d' has wildcarded ipl\n",
|
||||
kprintf("vme_search: device `%s%d' has wildcarded ipl\n",
|
||||
name, unit);
|
||||
reject = 1;
|
||||
}
|
||||
if (va->va_vec == -1) {
|
||||
printf("vme_search: device `%s%d' has wildcarded vec\n",
|
||||
kprintf("vme_search: device `%s%d' has wildcarded vec\n",
|
||||
name, unit);
|
||||
reject = 1;
|
||||
}
|
||||
|
@ -218,20 +218,20 @@ vme_search(parent, match, aux)
|
|||
break; /* Just fine. */
|
||||
|
||||
case -1: /* wildcarded */
|
||||
printf("vme_search: device `%s%d' has wildcarded atype\n",
|
||||
kprintf("vme_search: device `%s%d' has wildcarded atype\n",
|
||||
name, unit);
|
||||
reject = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("vme_search: device `%s%d' has invalid atype `%d'\n",
|
||||
kprintf("vme_search: device `%s%d' has invalid atype `%d'\n",
|
||||
name, unit, va->va_atype);
|
||||
reject = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (reject) {
|
||||
printf("vme_search: rejecting device `%s%d'\n", name, unit);
|
||||
kprintf("vme_search: rejecting device `%s%d'\n", name, unit);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -252,9 +252,9 @@ vme_print(aux, cp)
|
|||
struct vme_attach_args *va = aux;
|
||||
|
||||
if (cp)
|
||||
printf("device at %s", cp);
|
||||
kprintf("device at %s", cp);
|
||||
|
||||
printf(" atype %d addr 0x%lx ipl %d vec 0x%x", va->va_atype,
|
||||
kprintf(" atype %d addr 0x%lx ipl %d vec 0x%x", va->va_atype,
|
||||
va->va_addr, va->va_ipl, va->va_vec);
|
||||
|
||||
return (UNCONF);
|
||||
|
@ -284,7 +284,7 @@ vmeintr_disestablish(ipl, vec)
|
|||
/* Disable VME IRQ if possible. */
|
||||
switch (sys_vmechip->sc_irqref[ipl]) {
|
||||
case 0:
|
||||
printf("vmeintr_disestablish: nothing using IRQ %d\n", ipl);
|
||||
kprintf("vmeintr_disestablish: nothing using IRQ %d\n", ipl);
|
||||
panic("vmeintr_disestablish");
|
||||
/* NOTREACHED */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vme_pcc.c,v 1.1 1996/04/26 19:00:14 chuck Exp $ */
|
||||
/* $NetBSD: vme_pcc.c,v 1.2 1996/10/10 23:41:09 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -115,7 +115,7 @@ vmechip_pcc_attach(parent, self, aux)
|
|||
|
||||
sys_vme_pcc = vme;
|
||||
|
||||
printf(": Type 1 VMEchip, scon jumper %s\n",
|
||||
kprintf(": Type 1 VMEchip, scon jumper %s\n",
|
||||
(vme->vme_scon & VME1_SCON_SWITCH) ? "enabled" : "disabled");
|
||||
|
||||
/* Attach children. */
|
||||
|
@ -157,11 +157,11 @@ vmechip_pcc_translate_addr(start, len, bustype, atype, addrp)
|
|||
break;
|
||||
|
||||
default:
|
||||
printf("vmechip: impossible atype `%d'\n", atype);
|
||||
kprintf("vmechip: impossible atype `%d'\n", atype);
|
||||
panic("vmechip_pcc_translate_addr");
|
||||
}
|
||||
|
||||
printf("vmechip: can't map %s atype %d addr 0x%lx len 0x%x\n",
|
||||
kprintf("vmechip: can't map %s atype %d addr 0x%lx len 0x%x\n",
|
||||
vmes_cd.cd_name, atype, start, len);
|
||||
break;
|
||||
|
||||
|
@ -189,11 +189,11 @@ vmechip_pcc_translate_addr(start, len, bustype, atype, addrp)
|
|||
break;
|
||||
|
||||
default:
|
||||
printf("vmechip: impossible atype `%d'\n", atype);
|
||||
kprintf("vmechip: impossible atype `%d'\n", atype);
|
||||
panic("vmechip_pcc_translate_addr");
|
||||
}
|
||||
|
||||
printf("vmechip: can't map %s atype %d addr 0x%lx len 0x%x\n",
|
||||
kprintf("vmechip: can't map %s atype %d addr 0x%lx len 0x%x\n",
|
||||
vmel_cd.cd_name, atype, start, len);
|
||||
break;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wdsc.c,v 1.5 1996/08/28 19:00:21 cgd Exp $ */
|
||||
/* $NetBSD: wdsc.c,v 1.6 1996/10/10 23:41:12 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Steve Woodford
|
||||
|
@ -141,7 +141,7 @@ wdsc_pcc_attach(pdp, dp, auxp)
|
|||
sc->sc_link.device = &wdsc_scsidev;
|
||||
sc->sc_link.openings = 2;
|
||||
|
||||
printf(": WD33C93 SCSI, target %d\n", sc->sc_link.adapter_target);
|
||||
kprintf(": WD33C93 SCSI, target %d\n", sc->sc_link.adapter_target);
|
||||
|
||||
sc->sc_cregs = (volatile void *)sys_pcc;
|
||||
sc->sc_sbicp = (sbic_regmap_p) PCC_VADDR(pa->pa_offset);
|
||||
|
@ -250,7 +250,7 @@ wdsc_dmanext(dev)
|
|||
/*
|
||||
* Shouldn't happen !!
|
||||
*/
|
||||
printf("wdsc_dmanext at end !!!\n");
|
||||
kprintf("wdsc_dmanext at end !!!\n");
|
||||
wdsc_dmastop(dev);
|
||||
return(0);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: zs.c,v 1.7 1996/08/27 21:56:23 cgd Exp $ */
|
||||
/* $NetBSD: zs.c,v 1.8 1996/10/10 23:41:16 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Gordon W. Ross
|
||||
|
@ -122,7 +122,7 @@ zs_config(zsc, chan_addr)
|
|||
u_char reset;
|
||||
|
||||
zsc_unit = zsc->zsc_dev.dv_unit;
|
||||
printf(": Zilog 8530 SCC\n");
|
||||
kprintf(": Zilog 8530 SCC\n");
|
||||
|
||||
/*
|
||||
* Initialize software state for each channel.
|
||||
|
@ -198,10 +198,10 @@ zsc_print(aux, name)
|
|||
struct zsc_attach_args *args = aux;
|
||||
|
||||
if (name != NULL)
|
||||
printf("%s: ", name);
|
||||
kprintf("%s: ", name);
|
||||
|
||||
if (args->channel != -1)
|
||||
printf(" channel %d", args->channel);
|
||||
kprintf(" channel %d", args->channel);
|
||||
|
||||
return UNCONF;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: z8530var.h,v 1.1 1996/04/26 19:40:58 chuck Exp $ */
|
||||
/* $NetBSD: z8530var.h,v 1.2 1996/10/10 23:41:23 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Gordon W. Ross
|
||||
|
@ -79,7 +79,7 @@ void zs_abort();
|
|||
/*
|
||||
* Some warts needed by z8530tty.c -
|
||||
* The default parity REALLY needs to be the same as the PROM uses,
|
||||
* or you can not see messages done with printf during boot-up...
|
||||
* or you can not see messages done with kprintf during boot-up...
|
||||
*/
|
||||
#define ZSTTY_MAJOR 12 /* XXX */
|
||||
#define ZSTTY_DEF_CFLAG (CREAD | CS8 | HUPCL)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: autoconf.c,v 1.10 1996/09/12 05:48:54 thorpej Exp $ */
|
||||
/* $NetBSD: autoconf.c,v 1.11 1996/10/10 23:41:29 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -135,7 +135,7 @@ mainbus_attach(parent, self, args)
|
|||
char **devices;
|
||||
int i;
|
||||
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
|
||||
/*
|
||||
* Attach children appropriate for this CPU.
|
||||
|
@ -177,7 +177,7 @@ mainbus_print(aux, cp)
|
|||
char *devname = aux;
|
||||
|
||||
if (cp)
|
||||
printf("%s at %s", devname, cp);
|
||||
kprintf("%s at %s", devname, cp);
|
||||
|
||||
return (UNCONF);
|
||||
}
|
||||
|
@ -255,17 +255,17 @@ getdisk(str, len, defpart, devp)
|
|||
register struct device *dv;
|
||||
|
||||
if ((dv = parsedisk(str, len, defpart, devp)) == NULL) {
|
||||
printf("use one of:");
|
||||
kprintf("use one of:");
|
||||
for (dv = alldevs.tqh_first; dv != NULL;
|
||||
dv = dv->dv_list.tqe_next) {
|
||||
if (dv->dv_class == DV_DISK)
|
||||
printf(" %s[a-h]", dv->dv_xname);
|
||||
kprintf(" %s[a-h]", dv->dv_xname);
|
||||
#ifdef NFSCLIENT
|
||||
if (dv->dv_class == DV_IFNET)
|
||||
printf(" %s", dv->dv_xname);
|
||||
kprintf(" %s", dv->dv_xname);
|
||||
#endif
|
||||
}
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
}
|
||||
return (dv);
|
||||
}
|
||||
|
@ -340,18 +340,18 @@ setroot()
|
|||
extern int ffs_mountroot __P((void *));
|
||||
#endif
|
||||
|
||||
printf("boot device: %s\n",
|
||||
kprintf("boot device: %s\n",
|
||||
(bootdv) ? bootdv->dv_xname : "<unknown>");
|
||||
|
||||
if (boothowto & RB_ASKNAME) {
|
||||
for (;;) {
|
||||
printf("root device ");
|
||||
kprintf("root device ");
|
||||
if (bootdv != NULL)
|
||||
printf("(default %s%c)",
|
||||
kprintf("(default %s%c)",
|
||||
bootdv->dv_xname,
|
||||
bootdv->dv_class == DV_DISK
|
||||
? 'a' : ' ');
|
||||
printf(": ");
|
||||
kprintf(": ");
|
||||
len = getstr(buf, sizeof(buf));
|
||||
if (len == 0 && bootdv != NULL) {
|
||||
strcpy(buf, bootdv->dv_xname);
|
||||
|
@ -381,12 +381,12 @@ setroot()
|
|||
goto gotswap;
|
||||
}
|
||||
for (;;) {
|
||||
printf("swap device ");
|
||||
kprintf("swap device ");
|
||||
if (bootdv != NULL)
|
||||
printf("(default %s%c)",
|
||||
kprintf("(default %s%c)",
|
||||
bootdv->dv_xname,
|
||||
bootdv->dv_class == DV_DISK?'b':' ');
|
||||
printf(": ");
|
||||
kprintf(": ");
|
||||
len = getstr(buf, sizeof(buf));
|
||||
if (len == 0 && bootdv != NULL) {
|
||||
switch (bootdv->dv_class) {
|
||||
|
@ -468,12 +468,12 @@ gotswap:
|
|||
mountroot = ffs_mountroot;
|
||||
majdev = major(rootdev);
|
||||
mindev = minor(rootdev);
|
||||
printf("root on %s%c\n", bootdv->dv_xname,
|
||||
kprintf("root on %s%c\n", bootdv->dv_xname,
|
||||
(mindev & PARTITIONMASK) + 'a');
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
printf("can't figure root, hope your kernel is right\n");
|
||||
kprintf("can't figure root, hope your kernel is right\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -518,7 +518,7 @@ getstr(cp, size)
|
|||
switch (c) {
|
||||
case '\n':
|
||||
case '\r':
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
*lp++ = '\0';
|
||||
return (len);
|
||||
case '\b':
|
||||
|
@ -527,21 +527,21 @@ getstr(cp, size)
|
|||
if (len) {
|
||||
--len;
|
||||
--lp;
|
||||
printf("\b \b");
|
||||
kprintf("\b \b");
|
||||
}
|
||||
continue;
|
||||
case '@':
|
||||
case 'u'&037:
|
||||
len = 0;
|
||||
lp = cp;
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
continue;
|
||||
default:
|
||||
if (len + 1 >= size || c < ' ') {
|
||||
printf("\007");
|
||||
kprintf("\007");
|
||||
continue;
|
||||
}
|
||||
printf("%c", c);
|
||||
kprintf("%c", c);
|
||||
++len;
|
||||
*lp++ = c;
|
||||
}
|
||||
|
@ -562,7 +562,7 @@ getdevunit(name, unit)
|
|||
int lunit;
|
||||
|
||||
/* compute length of name and decimal expansion of unit number */
|
||||
sprintf(num, "%d", unit);
|
||||
ksprintf(num, "%d", unit);
|
||||
lunit = strlen(num);
|
||||
if (strlen(name) + lunit >= sizeof(fullname) - 1)
|
||||
panic("config_attach: device name too long");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: clock.c,v 1.5 1996/09/12 05:10:44 thorpej Exp $ */
|
||||
/* $NetBSD: clock.c,v 1.6 1996/10/10 23:41:33 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -125,9 +125,9 @@ clock_config(dev, clockregs, nvram, nvramsize, initfunc)
|
|||
evcnt_attach(dev, "statintr", &clock_statcnt);
|
||||
|
||||
/* Print info about the clock. */
|
||||
printf(": Mostek MK48T0%d, %d bytes of NVRAM\n", (nvramsize / 1024),
|
||||
kprintf(": Mostek MK48T0%d, %d bytes of NVRAM\n", (nvramsize / 1024),
|
||||
nvramsize);
|
||||
printf("%s: delay_divisor %d\n", dev->dv_xname, delay_divisor);
|
||||
kprintf("%s: delay_divisor %d\n", dev->dv_xname, delay_divisor);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -145,14 +145,14 @@ cpu_initclocks()
|
|||
panic("clock not configured");
|
||||
|
||||
if (1000000 % hz) {
|
||||
printf("cannot get %d Hz clock; using 100 Hz\n", hz);
|
||||
kprintf("cannot get %d Hz clock; using 100 Hz\n", hz);
|
||||
hz = 100;
|
||||
tick = 1000000 / hz;
|
||||
}
|
||||
if (stathz == 0)
|
||||
stathz = hz;
|
||||
if (1000000 % stathz) {
|
||||
printf("cannot get %d Hz statclock; using 100 Hz\n", stathz);
|
||||
kprintf("cannot get %d Hz statclock; using 100 Hz\n", stathz);
|
||||
stathz = 100;
|
||||
}
|
||||
profhz = stathz; /* always */
|
||||
|
@ -316,7 +316,7 @@ inittodr(base)
|
|||
* in stead of preposterous. Don't bark.
|
||||
*/
|
||||
if (base != 0)
|
||||
printf("WARNING: preposterous time in file system\n");
|
||||
kprintf("WARNING: preposterous time in file system\n");
|
||||
/* not going to use it anyway, if the chip is readable */
|
||||
base = 21*SECYR + 186*SECDAY + SECDAY/2;
|
||||
badbase = 1;
|
||||
|
@ -330,7 +330,7 @@ inittodr(base)
|
|||
year = cl->cl_year;
|
||||
cl->cl_csr &= ~CLK_READ; /* time wears on */
|
||||
if ((time.tv_sec = chiptotime(sec, min, hour, day, mon, year)) == 0) {
|
||||
printf("WARNING: bad date in battery clock");
|
||||
kprintf("WARNING: bad date in battery clock");
|
||||
/*
|
||||
* Believe the time in the file system for lack of
|
||||
* anything better, resetting the clock.
|
||||
|
@ -345,10 +345,10 @@ inittodr(base)
|
|||
deltat = -deltat;
|
||||
if (waszero || deltat < 2 * SECDAY)
|
||||
return;
|
||||
printf("WARNING: clock %s %d days",
|
||||
kprintf("WARNING: clock %s %d days",
|
||||
time.tv_sec < base ? "lost" : "gained", deltat / SECDAY);
|
||||
}
|
||||
printf(" -- CHECK AND RESET THE DATE!\n");
|
||||
kprintf(" -- CHECK AND RESET THE DATE!\n");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: disksubr.c,v 1.8 1996/05/29 05:03:50 chuck Exp $ */
|
||||
/* $NetBSD: disksubr.c,v 1.9 1996/10/10 23:41:37 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Dale Rahn.
|
||||
|
@ -499,18 +499,18 @@ printlp(lp, str)
|
|||
{
|
||||
int i;
|
||||
|
||||
printf("%s\n", str);
|
||||
printf("magic1 %x\n", lp->d_magic);
|
||||
printf("magic2 %x\n", lp->d_magic2);
|
||||
printf("typename %s\n", lp->d_typename);
|
||||
printf("secsize %x nsect %x ntrack %x ncylinders %x\n",
|
||||
kprintf("%s\n", str);
|
||||
kprintf("magic1 %x\n", lp->d_magic);
|
||||
kprintf("magic2 %x\n", lp->d_magic2);
|
||||
kprintf("typename %s\n", lp->d_typename);
|
||||
kprintf("secsize %x nsect %x ntrack %x ncylinders %x\n",
|
||||
lp->d_secsize, lp->d_nsectors, lp->d_ntracks, lp->d_ncylinders);
|
||||
printf("Num partitions %x\n", lp->d_npartitions);
|
||||
kprintf("Num partitions %x\n", lp->d_npartitions);
|
||||
for (i = 0; i < lp->d_npartitions; i++) {
|
||||
struct partition *part = &lp->d_partitions[i];
|
||||
char *fstyp = fstypenames[part->p_fstype];
|
||||
|
||||
printf("%c: size %10x offset %10x type %7s frag %5x cpg %3x\n",
|
||||
kprintf("%c: size %10x offset %10x type %7s frag %5x cpg %3x\n",
|
||||
'a' + i, part->p_size, part->p_offset, fstyp,
|
||||
part->p_frag, part->p_cpg);
|
||||
}
|
||||
|
@ -523,13 +523,13 @@ printclp(clp, str)
|
|||
{
|
||||
int max, i;
|
||||
|
||||
printf("%s\n", str);
|
||||
printf("magic1 %x\n", clp->magic1);
|
||||
printf("magic2 %x\n", clp->magic2);
|
||||
printf("typename %s\n", clp->vid_vd);
|
||||
printf("secsize %x nsect %x ntrack %x ncylinders %x\n",
|
||||
kprintf("%s\n", str);
|
||||
kprintf("magic1 %x\n", clp->magic1);
|
||||
kprintf("magic2 %x\n", clp->magic2);
|
||||
kprintf("typename %s\n", clp->vid_vd);
|
||||
kprintf("secsize %x nsect %x ntrack %x ncylinders %x\n",
|
||||
clp->cfg_psm, clp->cfg_spt, clp->cfg_hds, clp->cfg_trk);
|
||||
printf("Num partitions %x\n", clp->partitions);
|
||||
kprintf("Num partitions %x\n", clp->partitions);
|
||||
max = clp->partitions < 16 ? clp->partitions : 16;
|
||||
for (i = 0; i < max; i++) {
|
||||
struct partition *part;
|
||||
|
@ -545,7 +545,7 @@ printclp(clp, str)
|
|||
|
||||
fstyp = fstypenames[part->p_fstype];
|
||||
|
||||
printf("%c: size %10x offset %10x type %7s frag %5x cpg %3x\n",
|
||||
kprintf("%c: size %10x offset %10x type %7s frag %5x cpg %3x\n",
|
||||
'a' + i, part->p_size, part->p_offset, fstyp,
|
||||
part->p_frag, part->p_cpg);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: isr.c,v 1.1 1996/04/26 19:26:43 chuck Exp $ */
|
||||
/* $NetBSD: isr.c,v 1.2 1996/10/10 23:41:40 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Jason R. Thorpe.
|
||||
|
@ -216,7 +216,7 @@ isrdispatch_autovec(evec)
|
|||
|
||||
list = &isr_autovec[ipl];
|
||||
if (list->lh_first == NULL) {
|
||||
printf("isrdispatch_autovec: ipl %d unexpected\n", ipl);
|
||||
kprintf("isrdispatch_autovec: ipl %d unexpected\n", ipl);
|
||||
if (++unexpected > 10)
|
||||
panic("too many unexpected interrupts");
|
||||
return;
|
||||
|
@ -231,7 +231,7 @@ isrdispatch_autovec(evec)
|
|||
else if (++straycount > 50)
|
||||
panic("isr_dispatch_autovec: too many stray interrupts");
|
||||
else
|
||||
printf("isrdispatch_autovec: stray level %d interrupt\n", ipl);
|
||||
kprintf("isrdispatch_autovec: stray level %d interrupt\n", ipl);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -257,7 +257,7 @@ isrdispatch_vectored(pc, evec, frame)
|
|||
isr = &isr_vectored[vec - ISRVECTORED];
|
||||
|
||||
if (isr->isr_func == NULL) {
|
||||
printf("isrdispatch_vectored: no handler for vec 0x%x\n", vec);
|
||||
kprintf("isrdispatch_vectored: no handler for vec 0x%x\n", vec);
|
||||
vectab[vec] = badtrap;
|
||||
return;
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ isrdispatch_vectored(pc, evec, frame)
|
|||
* Handler gets exception frame if argument is NULL.
|
||||
*/
|
||||
if ((*isr->isr_func)(isr->isr_arg ? isr->isr_arg : frame) == 0)
|
||||
printf("isrdispatch_vectored: vec 0x%x not claimed\n", vec);
|
||||
kprintf("isrdispatch_vectored: vec 0x%x not claimed\n", vec);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.11 1996/09/12 06:02:35 thorpej Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.12 1996/10/10 23:41:44 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -304,9 +304,9 @@ cpu_startup()
|
|||
/*
|
||||
* Good {morning,afternoon,evening,night}.
|
||||
*/
|
||||
printf(version);
|
||||
kprintf(version);
|
||||
identifycpu();
|
||||
printf("real mem = %d\n", ctob(physmem));
|
||||
kprintf("real mem = %d\n", ctob(physmem));
|
||||
|
||||
/*
|
||||
* Allocate space for system data structures.
|
||||
|
@ -482,8 +482,8 @@ again:
|
|||
#ifdef DEBUG
|
||||
pmapdebug = opmapdebug;
|
||||
#endif
|
||||
printf("avail mem = %d\n", ptoa(cnt.v_free_count));
|
||||
printf("using %d buffers containing %d bytes of memory\n",
|
||||
kprintf("avail mem = %d\n", ptoa(cnt.v_free_count));
|
||||
kprintf("using %d buffers containing %d bytes of memory\n",
|
||||
nbuf, bufpages * CLBYTES);
|
||||
/*
|
||||
* Set up CPU-specific registers, cache, etc.
|
||||
|
@ -596,39 +596,39 @@ identifycpu()
|
|||
switch (cputype) {
|
||||
#ifdef M68020
|
||||
case CPU_68020:
|
||||
sprintf(cpu_str, "MC68020 CPU");
|
||||
sprintf(fpu_str, "MC68881 FPU"); /* XXX */
|
||||
ksprintf(cpu_str, "MC68020 CPU");
|
||||
ksprintf(fpu_str, "MC68881 FPU"); /* XXX */
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef M68030
|
||||
case CPU_68030:
|
||||
sprintf(cpu_str, "MC68030 CPU+MMU");
|
||||
sprintf(fpu_str, "MC68882 FPU"); /* XXX */
|
||||
ksprintf(cpu_str, "MC68030 CPU+MMU");
|
||||
ksprintf(fpu_str, "MC68882 FPU"); /* XXX */
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef M68040
|
||||
case CPU_68040:
|
||||
sprintf(cpu_str, "MC68040 CPU+MMU+FPU");
|
||||
ksprintf(cpu_str, "MC68040 CPU+MMU+FPU");
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef M68060
|
||||
case CPU_68060:
|
||||
sprintf(cpu_str, "MC68060 CPU+MMU+FPU");
|
||||
ksprintf(cpu_str, "MC68060 CPU+MMU+FPU");
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
printf("unknown CPU type");
|
||||
kprintf("unknown CPU type");
|
||||
panic("startup");
|
||||
}
|
||||
|
||||
/* Fill in the MMU string; only need to handle one case. */
|
||||
switch (mmutype) {
|
||||
case MMU_68851:
|
||||
sprintf(mmu_str, "MC68851 MMU");
|
||||
ksprintf(mmu_str, "MC68851 MMU");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -639,7 +639,7 @@ identifycpu()
|
|||
#ifdef MVME147
|
||||
case MVME_147: {
|
||||
char *suffix = (char *)&boardid.suffix;
|
||||
len = sprintf(board_str, "%x", machineid);
|
||||
len = ksprintf(board_str, "%x", machineid);
|
||||
if (suffix[0] != '\0') {
|
||||
board_str[len++] = suffix[0];
|
||||
if (suffix[1] != '\0')
|
||||
|
@ -663,18 +663,18 @@ identifycpu()
|
|||
break; }
|
||||
#endif
|
||||
default:
|
||||
printf("unknown machine type: 0x%x\n", machineid);
|
||||
kprintf("unknown machine type: 0x%x\n", machineid);
|
||||
panic("startup");
|
||||
}
|
||||
|
||||
len = sprintf(cpu_model, "Motorola MVME-%s: %dMHz %s", board_str,
|
||||
len = ksprintf(cpu_model, "Motorola MVME-%s: %dMHz %s", board_str,
|
||||
cpuspeed, cpu_str);
|
||||
|
||||
if (mmu_str[0] != '\0')
|
||||
len += sprintf(cpu_model + len, ", %s", mmu_str);
|
||||
len += ksprintf(cpu_model + len, ", %s", mmu_str);
|
||||
|
||||
if (fpu_str[0] != '\0')
|
||||
len += sprintf(cpu_model + len, ", %s", fpu_str);
|
||||
len += ksprintf(cpu_model + len, ", %s", fpu_str);
|
||||
|
||||
#if defined(M68040) || defined(M68060)
|
||||
switch (cputype) {
|
||||
|
@ -684,7 +684,7 @@ identifycpu()
|
|||
}
|
||||
#endif
|
||||
|
||||
printf("%s\n", cpu_model);
|
||||
kprintf("%s\n", cpu_model);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -824,13 +824,13 @@ sendsig(catcher, sig, mask, code)
|
|||
(void)grow(p, (unsigned)fp);
|
||||
#ifdef DEBUG
|
||||
if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
|
||||
printf("sendsig(%d): sig %d ssp %x usp %x scp %x ft %d\n",
|
||||
kprintf("sendsig(%d): sig %d ssp %x usp %x scp %x ft %d\n",
|
||||
p->p_pid, sig, &oonstack, fp, &fp->sf_sc, ft);
|
||||
#endif
|
||||
if (useracc((caddr_t)fp, fsize, B_WRITE) == 0) {
|
||||
#ifdef DEBUG
|
||||
if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
|
||||
printf("sendsig(%d): useracc failed on sig %d\n",
|
||||
kprintf("sendsig(%d): useracc failed on sig %d\n",
|
||||
p->p_pid, sig);
|
||||
#endif
|
||||
/*
|
||||
|
@ -886,7 +886,7 @@ sendsig(catcher, sig, mask, code)
|
|||
frame->f_format = frame->f_vector = 0;
|
||||
#ifdef DEBUG
|
||||
if (sigdebug & SDB_FOLLOW)
|
||||
printf("sendsig(%d): copy out %d of frame %d\n",
|
||||
kprintf("sendsig(%d): copy out %d of frame %d\n",
|
||||
p->p_pid, exframesize[ft], ft);
|
||||
#endif
|
||||
}
|
||||
|
@ -895,7 +895,7 @@ sendsig(catcher, sig, mask, code)
|
|||
m68881_save(&kfp->sf_state.ss_fpstate);
|
||||
#ifdef DEBUG
|
||||
if ((sigdebug & SDB_FPSTATE) && *(char *)&kfp->sf_state.ss_fpstate)
|
||||
printf("sendsig(%d): copy out FP state (%x) to %x\n",
|
||||
kprintf("sendsig(%d): copy out FP state (%x) to %x\n",
|
||||
p->p_pid, *(u_int *)&kfp->sf_state.ss_fpstate,
|
||||
&kfp->sf_state.ss_fpstate);
|
||||
#endif
|
||||
|
@ -944,7 +944,7 @@ sendsig(catcher, sig, mask, code)
|
|||
frame->f_regs[SP] = (int)fp;
|
||||
#ifdef DEBUG
|
||||
if (sigdebug & SDB_FOLLOW)
|
||||
printf("sendsig(%d): sig %d scp %x fp %x sc_sp %x sc_ap %x\n",
|
||||
kprintf("sendsig(%d): sig %d scp %x fp %x sc_sp %x sc_ap %x\n",
|
||||
p->p_pid, sig, kfp->sf_scp, fp,
|
||||
kfp->sf_sc.sc_sp, kfp->sf_sc.sc_ap);
|
||||
#endif
|
||||
|
@ -954,7 +954,7 @@ sendsig(catcher, sig, mask, code)
|
|||
frame->f_pc = (int)PS_STRINGS - (esigcode - sigcode);
|
||||
#ifdef DEBUG
|
||||
if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
|
||||
printf("sendsig(%d): sig %d returns\n",
|
||||
kprintf("sendsig(%d): sig %d returns\n",
|
||||
p->p_pid, sig);
|
||||
#endif
|
||||
free((caddr_t)kfp, M_TEMP);
|
||||
|
@ -990,7 +990,7 @@ sys_sigreturn(p, v, retval)
|
|||
scp = SCARG(uap, sigcntxp);
|
||||
#ifdef DEBUG
|
||||
if (sigdebug & SDB_FOLLOW)
|
||||
printf("sigreturn: pid %d, scp %x\n", p->p_pid, scp);
|
||||
kprintf("sigreturn: pid %d, scp %x\n", p->p_pid, scp);
|
||||
#endif
|
||||
if ((int)scp & 1)
|
||||
return (EINVAL);
|
||||
|
@ -1074,7 +1074,7 @@ sys_sigreturn(p, v, retval)
|
|||
flags = fuword((caddr_t)rf);
|
||||
#ifdef DEBUG
|
||||
if (sigdebug & SDB_FOLLOW)
|
||||
printf("sigreturn(%d): sc_ap %x flags %x\n",
|
||||
kprintf("sigreturn(%d): sc_ap %x flags %x\n",
|
||||
p->p_pid, rf, flags);
|
||||
#endif
|
||||
/*
|
||||
|
@ -1086,7 +1086,7 @@ sys_sigreturn(p, v, retval)
|
|||
return (EJUSTRETURN);
|
||||
#ifdef DEBUG
|
||||
if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
|
||||
printf("sigreturn(%d): ssp %x usp %x scp %x ft %d\n",
|
||||
kprintf("sigreturn(%d): ssp %x usp %x scp %x ft %d\n",
|
||||
p->p_pid, &flags, scp->sc_sp, SCARG(uap, sigcntxp),
|
||||
(flags&SS_RTEFRAME) ? tstate.ss_frame.f_format : -1);
|
||||
#endif
|
||||
|
@ -1115,7 +1115,7 @@ sys_sigreturn(p, v, retval)
|
|||
bcopy((caddr_t)&tstate.ss_frame.F_u, (caddr_t)&frame->F_u, sz);
|
||||
#ifdef DEBUG
|
||||
if (sigdebug & SDB_FOLLOW)
|
||||
printf("sigreturn(%d): copy in %d of frame type %d\n",
|
||||
kprintf("sigreturn(%d): copy in %d of frame type %d\n",
|
||||
p->p_pid, sz, tstate.ss_frame.f_format);
|
||||
#endif
|
||||
}
|
||||
|
@ -1127,7 +1127,7 @@ sys_sigreturn(p, v, retval)
|
|||
m68881_restore(&tstate.ss_fpstate);
|
||||
#ifdef DEBUG
|
||||
if ((sigdebug & SDB_FPSTATE) && *(char *)&tstate.ss_fpstate)
|
||||
printf("sigreturn(%d): copied in FP state (%x) at %x\n",
|
||||
kprintf("sigreturn(%d): copied in FP state (%x) at %x\n",
|
||||
p->p_pid, *(u_int *)&tstate.ss_fpstate,
|
||||
&tstate.ss_fpstate);
|
||||
#endif
|
||||
|
@ -1135,7 +1135,7 @@ sys_sigreturn(p, v, retval)
|
|||
#ifdef DEBUG
|
||||
if ((sigdebug & SDB_FOLLOW) ||
|
||||
((sigdebug & SDB_KSTACK) && p->p_pid == sigpid))
|
||||
printf("sigreturn(%d): returns\n", p->p_pid);
|
||||
kprintf("sigreturn(%d): returns\n", p->p_pid);
|
||||
#endif
|
||||
return (EJUSTRETURN);
|
||||
}
|
||||
|
@ -1186,20 +1186,20 @@ boot(howto, bootstr)
|
|||
|
||||
#if defined(PANICWAIT) && !defined(DDB)
|
||||
if ((howto & RB_HALT) == 0 && panicstr) {
|
||||
printf("hit any key to reboot...\n");
|
||||
kprintf("hit any key to reboot...\n");
|
||||
(void)cngetc();
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Finally, halt/reboot the system. */
|
||||
if (howto & RB_HALT) {
|
||||
printf("halted\n\n");
|
||||
kprintf("halted\n\n");
|
||||
doboot(RB_HALT);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
printf("rebooting...\n");
|
||||
kprintf("rebooting...\n");
|
||||
delay(1000000);
|
||||
doboot(RB_AUTOBOOT);
|
||||
/*NOTREACHED*/
|
||||
|
@ -1268,33 +1268,33 @@ dumpsys()
|
|||
if (dumpsize == 0)
|
||||
return;
|
||||
}
|
||||
printf("\ndumping to dev %x, offset %d\n", dumpdev, dumplo);
|
||||
kprintf("\ndumping to dev %x, offset %d\n", dumpdev, dumplo);
|
||||
|
||||
printf("dump ");
|
||||
kprintf("dump ");
|
||||
switch ((*bdevsw[major(dumpdev)].d_dump)(dumpdev)) {
|
||||
|
||||
case ENXIO:
|
||||
printf("device bad\n");
|
||||
kprintf("device bad\n");
|
||||
break;
|
||||
|
||||
case EFAULT:
|
||||
printf("device not ready\n");
|
||||
kprintf("device not ready\n");
|
||||
break;
|
||||
|
||||
case EINVAL:
|
||||
printf("area improper\n");
|
||||
kprintf("area improper\n");
|
||||
break;
|
||||
|
||||
case EIO:
|
||||
printf("i/o error\n");
|
||||
kprintf("i/o error\n");
|
||||
break;
|
||||
|
||||
case EINTR:
|
||||
printf("aborted from console\n");
|
||||
kprintf("aborted from console\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("succeeded\n");
|
||||
kprintf("succeeded\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1319,7 +1319,7 @@ straytrap(pc, evec)
|
|||
int pc;
|
||||
u_short evec;
|
||||
{
|
||||
printf("unexpected trap (vector offset %x) from %x\n",
|
||||
kprintf("unexpected trap (vector offset %x) from %x\n",
|
||||
evec & 0xFFF, pc);
|
||||
}
|
||||
|
||||
|
@ -1395,13 +1395,13 @@ mvme68k_abort(cp)
|
|||
const char *cp;
|
||||
{
|
||||
#ifdef DDB
|
||||
printf("%s\n", cp);
|
||||
kprintf("%s\n", cp);
|
||||
Debugger();
|
||||
#else
|
||||
#ifdef PANICBUTTON
|
||||
panic(cp);
|
||||
#else
|
||||
printf("%s ignored\n", cp);
|
||||
kprintf("%s ignored\n", cp);
|
||||
#endif /* PANICBUTTON */
|
||||
#endif /* DDB */
|
||||
}
|
||||
|
@ -1419,27 +1419,27 @@ regdump(fp, sbytes)
|
|||
return;
|
||||
s = splhigh();
|
||||
doingdump = 1;
|
||||
printf("pid = %d, pc = %s, ",
|
||||
kprintf("pid = %d, pc = %s, ",
|
||||
curproc ? curproc->p_pid : -1, hexstr(fp->f_pc, 8));
|
||||
printf("ps = %s, ", hexstr(fp->f_sr, 4));
|
||||
printf("sfc = %s, ", hexstr(getsfc(), 4));
|
||||
printf("dfc = %s\n", hexstr(getdfc(), 4));
|
||||
printf("Registers:\n ");
|
||||
kprintf("ps = %s, ", hexstr(fp->f_sr, 4));
|
||||
kprintf("sfc = %s, ", hexstr(getsfc(), 4));
|
||||
kprintf("dfc = %s\n", hexstr(getdfc(), 4));
|
||||
kprintf("Registers:\n ");
|
||||
for (i = 0; i < 8; i++)
|
||||
printf(" %d", i);
|
||||
printf("\ndreg:");
|
||||
kprintf(" %d", i);
|
||||
kprintf("\ndreg:");
|
||||
for (i = 0; i < 8; i++)
|
||||
printf(" %s", hexstr(fp->f_regs[i], 8));
|
||||
printf("\nareg:");
|
||||
kprintf(" %s", hexstr(fp->f_regs[i], 8));
|
||||
kprintf("\nareg:");
|
||||
for (i = 0; i < 8; i++)
|
||||
printf(" %s", hexstr(fp->f_regs[i+8], 8));
|
||||
kprintf(" %s", hexstr(fp->f_regs[i+8], 8));
|
||||
if (sbytes > 0) {
|
||||
if (fp->f_sr & PSL_S) {
|
||||
printf("\n\nKernel stack (%s):",
|
||||
kprintf("\n\nKernel stack (%s):",
|
||||
hexstr((int)(((int *)&fp)-1), 8));
|
||||
dumpmem(((int *)&fp)-1, sbytes, 0);
|
||||
} else {
|
||||
printf("\n\nUser stack (%s):", hexstr(fp->f_regs[SP], 8));
|
||||
kprintf("\n\nUser stack (%s):", hexstr(fp->f_regs[SP], 8));
|
||||
dumpmem((int *)fp->f_regs[SP], sbytes, 1);
|
||||
}
|
||||
}
|
||||
|
@ -1458,9 +1458,9 @@ dumpmem(ptr, sz, ustack)
|
|||
|
||||
for (i = 0; i < sz; i++) {
|
||||
if ((i & 7) == 0)
|
||||
printf("\n%s: ", hexstr((int)ptr, 6));
|
||||
kprintf("\n%s: ", hexstr((int)ptr, 6));
|
||||
else
|
||||
printf(" ");
|
||||
kprintf(" ");
|
||||
if (ustack == 1) {
|
||||
if ((val = fuword(ptr++)) == -1)
|
||||
break;
|
||||
|
@ -1470,9 +1470,9 @@ dumpmem(ptr, sz, ustack)
|
|||
break;
|
||||
val = *ptr++;
|
||||
}
|
||||
printf("%s", hexstr(val, 8));
|
||||
kprintf("%s", hexstr(val, 8));
|
||||
}
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
}
|
||||
|
||||
char *
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pmap.c,v 1.3 1996/04/26 19:26:58 chuck Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.4 1996/10/10 23:41:50 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
|
@ -350,7 +350,7 @@ pmap_init(phys_start, phys_end)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_FOLLOW)
|
||||
printf("pmap_init(%x, %x)\n", phys_start, phys_end);
|
||||
kprintf("pmap_init(%x, %x)\n", phys_start, phys_end);
|
||||
#endif
|
||||
/*
|
||||
* Now that kernel map has been allocated, we can mark as
|
||||
|
@ -376,9 +376,9 @@ bogons:
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_INIT) {
|
||||
printf("pmap_init: Sysseg %x, Sysmap %x, Sysptmap %x\n",
|
||||
kprintf("pmap_init: Sysseg %x, Sysmap %x, Sysptmap %x\n",
|
||||
Sysseg, Sysmap, Sysptmap);
|
||||
printf(" pstart %x, pend %x, vstart %x, vend %x\n",
|
||||
kprintf(" pstart %x, pend %x, vstart %x, vend %x\n",
|
||||
avail_start, avail_end, virtual_avail, virtual_end);
|
||||
}
|
||||
#endif
|
||||
|
@ -399,7 +399,7 @@ bogons:
|
|||
pmap_attributes = (char *) addr;
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_INIT)
|
||||
printf("pmap_init: %x bytes: npages %x s0 %x(%x) tbl %x atr %x\n",
|
||||
kprintf("pmap_init: %x bytes: npages %x s0 %x(%x) tbl %x atr %x\n",
|
||||
s, npages, Segtabzero, Segtabzeropa,
|
||||
pv_table, pmap_attributes);
|
||||
#endif
|
||||
|
@ -442,7 +442,7 @@ bogons:
|
|||
#endif
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_INIT)
|
||||
printf("pmap_init: KPT: %d pages from %x to %x\n",
|
||||
kprintf("pmap_init: KPT: %d pages from %x to %x\n",
|
||||
atop(s), addr, addr + s);
|
||||
#endif
|
||||
|
||||
|
@ -481,7 +481,7 @@ bogons:
|
|||
panic("pmap_init: cannot map range to pt_map");
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_INIT)
|
||||
printf("pmap_init: pt_map [%x - %x)\n", addr, addr2);
|
||||
kprintf("pmap_init: pt_map [%x - %x)\n", addr, addr2);
|
||||
#endif
|
||||
|
||||
#if defined(M68040)
|
||||
|
@ -630,7 +630,7 @@ pmap_map(va, spa, epa, prot)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_FOLLOW)
|
||||
printf("pmap_map(%x, %x, %x, %x)\n", va, spa, epa, prot);
|
||||
kprintf("pmap_map(%x, %x, %x, %x)\n", va, spa, epa, prot);
|
||||
#endif
|
||||
|
||||
while (spa < epa) {
|
||||
|
@ -661,7 +661,7 @@ pmap_create(size)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & (PDB_FOLLOW|PDB_CREATE))
|
||||
printf("pmap_create(%x)\n", size);
|
||||
kprintf("pmap_create(%x)\n", size);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -692,7 +692,7 @@ pmap_pinit(pmap)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & (PDB_FOLLOW|PDB_CREATE))
|
||||
printf("pmap_pinit(%x)\n", pmap);
|
||||
kprintf("pmap_pinit(%x)\n", pmap);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -728,7 +728,7 @@ pmap_destroy(pmap)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_FOLLOW)
|
||||
printf("pmap_destroy(%x)\n", pmap);
|
||||
kprintf("pmap_destroy(%x)\n", pmap);
|
||||
#endif
|
||||
|
||||
simple_lock(&pmap->pm_lock);
|
||||
|
@ -752,7 +752,7 @@ pmap_release(pmap)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_FOLLOW)
|
||||
printf("pmap_release(%x)\n", pmap);
|
||||
kprintf("pmap_release(%x)\n", pmap);
|
||||
#endif
|
||||
|
||||
#ifdef notdef /* DIAGNOSTIC */
|
||||
|
@ -783,7 +783,7 @@ pmap_reference(pmap)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_FOLLOW)
|
||||
printf("pmap_reference(%x)\n", pmap);
|
||||
kprintf("pmap_reference(%x)\n", pmap);
|
||||
#endif
|
||||
|
||||
simple_lock(&pmap->pm_lock);
|
||||
|
@ -802,7 +802,7 @@ pmap_activate(pmap, pcb)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & (PDB_FOLLOW|PDB_SEGTAB))
|
||||
printf("pmap_activate(%x, %x)\n", pmap, pcb);
|
||||
kprintf("pmap_activate(%x, %x)\n", pmap, pcb);
|
||||
#endif
|
||||
|
||||
PMAP_ACTIVATE(pmap, pcb, pmap == curproc->p_vmspace->vm_map.pmap);
|
||||
|
@ -833,7 +833,7 @@ pmap_remove(pmap, sva, eva)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & (PDB_FOLLOW|PDB_REMOVE|PDB_PROTECT))
|
||||
printf("pmap_remove(%x, %x, %x)\n", pmap, sva, eva);
|
||||
kprintf("pmap_remove(%x, %x, %x)\n", pmap, sva, eva);
|
||||
#endif
|
||||
|
||||
if (pmap == NULL)
|
||||
|
@ -952,7 +952,7 @@ pmap_page_protect(pa, prot)
|
|||
#ifdef DEBUG
|
||||
if ((pmapdebug & (PDB_FOLLOW|PDB_PROTECT)) ||
|
||||
prot == VM_PROT_NONE && (pmapdebug & PDB_REMOVE))
|
||||
printf("pmap_page_protect(%x, %x)\n", pa, prot);
|
||||
kprintf("pmap_page_protect(%x, %x)\n", pa, prot);
|
||||
#endif
|
||||
if (pa < vm_first_phys || pa >= vm_last_phys)
|
||||
return;
|
||||
|
@ -988,7 +988,7 @@ pmap_page_protect(pa, prot)
|
|||
pv = pv->pv_next;
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_PARANOIA)
|
||||
printf("%s wired mapping for %x not removed\n",
|
||||
kprintf("%s wired mapping for %x not removed\n",
|
||||
"pmap_page_protect:", pa);
|
||||
#endif
|
||||
}
|
||||
|
@ -1013,7 +1013,7 @@ pmap_protect(pmap, sva, eva, prot)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & (PDB_FOLLOW|PDB_PROTECT))
|
||||
printf("pmap_protect(%x, %x, %x, %x)\n", pmap, sva, eva, prot);
|
||||
kprintf("pmap_protect(%x, %x, %x, %x)\n", pmap, sva, eva, prot);
|
||||
#endif
|
||||
|
||||
if (pmap == NULL)
|
||||
|
@ -1135,7 +1135,7 @@ pmap_enter(pmap, va, pa, prot, wired)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & (PDB_FOLLOW|PDB_ENTER))
|
||||
printf("pmap_enter(%x, %x, %x, %x, %x)\n",
|
||||
kprintf("pmap_enter(%x, %x, %x, %x, %x)\n",
|
||||
pmap, va, pa, prot, wired);
|
||||
#endif
|
||||
if (pmap == NULL)
|
||||
|
@ -1165,7 +1165,7 @@ pmap_enter(pmap, va, pa, prot, wired)
|
|||
opa = pmap_pte_pa(pte);
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_ENTER)
|
||||
printf("enter: pte %x, *pte %x\n", pte, *pte);
|
||||
kprintf("enter: pte %x, *pte %x\n", pte, *pte);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -1184,7 +1184,7 @@ pmap_enter(pmap, va, pa, prot, wired)
|
|||
if (pmap_pte_w_chg(pte, wired ? PG_W : 0)) {
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_ENTER)
|
||||
printf("enter: wiring change -> %x\n", wired);
|
||||
kprintf("enter: wiring change -> %x\n", wired);
|
||||
#endif
|
||||
if (wired)
|
||||
pmap->pm_stats.wired_count++;
|
||||
|
@ -1217,7 +1217,7 @@ pmap_enter(pmap, va, pa, prot, wired)
|
|||
if (opa) {
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_ENTER)
|
||||
printf("enter: removing old mapping %x\n", va);
|
||||
kprintf("enter: removing old mapping %x\n", va);
|
||||
#endif
|
||||
pmap_remove_mapping(pmap, va, pte, PRM_TFLUSH|PRM_CFLUSH);
|
||||
#ifdef PMAPSTATS
|
||||
|
@ -1250,7 +1250,7 @@ pmap_enter(pmap, va, pa, prot, wired)
|
|||
s = splimp();
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_ENTER)
|
||||
printf("enter: pv at %x: %x/%x/%x\n",
|
||||
kprintf("enter: pv at %x: %x/%x/%x\n",
|
||||
pv, pv->pv_va, pv->pv_pmap, pv->pv_next);
|
||||
#endif
|
||||
/*
|
||||
|
@ -1316,7 +1316,7 @@ pmap_enter(pmap, va, pa, prot, wired)
|
|||
if (pv->pv_flags & PV_CI) {
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_CACHE)
|
||||
printf("enter: pa %x already CI'ed\n",
|
||||
kprintf("enter: pa %x already CI'ed\n",
|
||||
pa);
|
||||
#endif
|
||||
checkpv = cacheable = FALSE;
|
||||
|
@ -1328,7 +1328,7 @@ pmap_enter(pmap, va, pa, prot, wired)
|
|||
(va & pmap_aliasmask)))) {
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_CACHE)
|
||||
printf("enter: pa %x CI'ing all\n",
|
||||
kprintf("enter: pa %x CI'ing all\n",
|
||||
pa);
|
||||
#endif
|
||||
cacheable = FALSE;
|
||||
|
@ -1386,7 +1386,7 @@ validate:
|
|||
#endif
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_ENTER)
|
||||
printf("enter: new pte value %x\n", npte);
|
||||
kprintf("enter: new pte value %x\n", npte);
|
||||
#endif
|
||||
/*
|
||||
* Remember if this was a wiring-only change.
|
||||
|
@ -1456,7 +1456,7 @@ pmap_change_wiring(pmap, va, wired)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_FOLLOW)
|
||||
printf("pmap_change_wiring(%x, %x, %x)\n", pmap, va, wired);
|
||||
kprintf("pmap_change_wiring(%x, %x, %x)\n", pmap, va, wired);
|
||||
#endif
|
||||
if (pmap == NULL)
|
||||
return;
|
||||
|
@ -1470,7 +1470,7 @@ pmap_change_wiring(pmap, va, wired)
|
|||
*/
|
||||
if (!pmap_ste_v(pmap, va)) {
|
||||
if (pmapdebug & PDB_PARANOIA)
|
||||
printf("pmap_change_wiring: invalid STE for %x\n", va);
|
||||
kprintf("pmap_change_wiring: invalid STE for %x\n", va);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
|
@ -1479,7 +1479,7 @@ pmap_change_wiring(pmap, va, wired)
|
|||
*/
|
||||
if (!pmap_pte_v(pte)) {
|
||||
if (pmapdebug & PDB_PARANOIA)
|
||||
printf("pmap_change_wiring: invalid PTE for %x\n", va);
|
||||
kprintf("pmap_change_wiring: invalid PTE for %x\n", va);
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
|
@ -1512,7 +1512,7 @@ pmap_extract(pmap, va)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_FOLLOW)
|
||||
printf("pmap_extract(%x, %x) -> ", pmap, va);
|
||||
kprintf("pmap_extract(%x, %x) -> ", pmap, va);
|
||||
#endif
|
||||
pa = 0;
|
||||
if (pmap && pmap_ste_v(pmap, va))
|
||||
|
@ -1521,7 +1521,7 @@ pmap_extract(pmap, va)
|
|||
pa = (pa & PG_FRAME) | (va & ~PG_FRAME);
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_FOLLOW)
|
||||
printf("%x\n", pa);
|
||||
kprintf("%x\n", pa);
|
||||
#endif
|
||||
return(pa);
|
||||
}
|
||||
|
@ -1542,7 +1542,7 @@ void pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr)
|
|||
{
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_FOLLOW)
|
||||
printf("pmap_copy(%x, %x, %x, %x, %x)\n",
|
||||
kprintf("pmap_copy(%x, %x, %x, %x, %x)\n",
|
||||
dst_pmap, src_pmap, dst_addr, len, src_addr);
|
||||
#endif
|
||||
}
|
||||
|
@ -1559,7 +1559,7 @@ void pmap_update()
|
|||
{
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_FOLLOW)
|
||||
printf("pmap_update()\n");
|
||||
kprintf("pmap_update()\n");
|
||||
#endif
|
||||
TBIA();
|
||||
}
|
||||
|
@ -1594,7 +1594,7 @@ pmap_collect(pmap)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_FOLLOW)
|
||||
printf("pmap_collect(%x)\n", pmap);
|
||||
kprintf("pmap_collect(%x)\n", pmap);
|
||||
#endif
|
||||
#ifdef PMAPSTATS
|
||||
kpt_stats.collectscans++;
|
||||
|
@ -1619,7 +1619,7 @@ pmap_collect(pmap)
|
|||
#ifdef DEBUG
|
||||
if (pv->pv_va < (vm_offset_t)Sysmap ||
|
||||
pv->pv_va >= (vm_offset_t)Sysmap + HP_MAX_PTSIZE)
|
||||
printf("collect: kernel PT VA out of range\n");
|
||||
kprintf("collect: kernel PT VA out of range\n");
|
||||
else
|
||||
goto ok;
|
||||
pmap_pvdump(pa);
|
||||
|
@ -1634,7 +1634,7 @@ ok:
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & (PDB_PTPAGE|PDB_COLLECT)) {
|
||||
printf("collect: freeing KPT page at %x (ste %x@%x)\n",
|
||||
kprintf("collect: freeing KPT page at %x (ste %x@%x)\n",
|
||||
pv->pv_va, *pv->pv_ptste, pv->pv_ptste);
|
||||
opmapdebug = pmapdebug;
|
||||
pmapdebug |= PDB_PTPAGE;
|
||||
|
@ -1664,7 +1664,7 @@ ok:
|
|||
if (kpt == (struct kpt_page *)0)
|
||||
panic("pmap_collect: lost a KPT page");
|
||||
if (pmapdebug & (PDB_PTPAGE|PDB_COLLECT))
|
||||
printf("collect: %x (%x) to free list\n",
|
||||
kprintf("collect: %x (%x) to free list\n",
|
||||
kpt->kpt_va, kpa);
|
||||
#endif
|
||||
*pkpt = kpt->kpt_next;
|
||||
|
@ -1679,11 +1679,11 @@ ok:
|
|||
pmapdebug = opmapdebug;
|
||||
|
||||
if (*ste != SG_NV)
|
||||
printf("collect: kernel STE at %x still valid (%x)\n",
|
||||
kprintf("collect: kernel STE at %x still valid (%x)\n",
|
||||
ste, *ste);
|
||||
ste = &Sysptmap[ste - pmap_ste(pmap_kernel(), 0)];
|
||||
if (*ste != SG_NV)
|
||||
printf("collect: kernel PTmap at %x still valid (%x)\n",
|
||||
kprintf("collect: kernel PTmap at %x still valid (%x)\n",
|
||||
ste, *ste);
|
||||
#endif
|
||||
}
|
||||
|
@ -1711,7 +1711,7 @@ pmap_zero_page(phys)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_FOLLOW)
|
||||
printf("pmap_zero_page(%x)\n", phys);
|
||||
kprintf("pmap_zero_page(%x)\n", phys);
|
||||
#endif
|
||||
kva = (vm_offset_t) CADDR1;
|
||||
pmap_enter(pmap_kernel(), kva, phys, VM_PROT_READ|VM_PROT_WRITE, TRUE);
|
||||
|
@ -1742,7 +1742,7 @@ pmap_copy_page(src, dst)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_FOLLOW)
|
||||
printf("pmap_copy_page(%x, %x)\n", src, dst);
|
||||
kprintf("pmap_copy_page(%x, %x)\n", src, dst);
|
||||
#endif
|
||||
skva = (vm_offset_t) CADDR1;
|
||||
dkva = (vm_offset_t) CADDR2;
|
||||
|
@ -1775,7 +1775,7 @@ pmap_pageable(pmap, sva, eva, pageable)
|
|||
{
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_FOLLOW)
|
||||
printf("pmap_pageable(%x, %x, %x, %x)\n",
|
||||
kprintf("pmap_pageable(%x, %x, %x, %x)\n",
|
||||
pmap, sva, eva, pageable);
|
||||
#endif
|
||||
/*
|
||||
|
@ -1792,7 +1792,7 @@ pmap_pageable(pmap, sva, eva, pageable)
|
|||
|
||||
#ifdef DEBUG
|
||||
if ((pmapdebug & (PDB_FOLLOW|PDB_PTPAGE)) == PDB_PTPAGE)
|
||||
printf("pmap_pageable(%x, %x, %x, %x)\n",
|
||||
kprintf("pmap_pageable(%x, %x, %x, %x)\n",
|
||||
pmap, sva, eva, pageable);
|
||||
#endif
|
||||
if (!pmap_ste_v(pmap, sva))
|
||||
|
@ -1805,7 +1805,7 @@ pmap_pageable(pmap, sva, eva, pageable)
|
|||
return;
|
||||
#ifdef DEBUG
|
||||
if (pv->pv_va != sva || pv->pv_next) {
|
||||
printf("pmap_pageable: bad PT page va %x next %x\n",
|
||||
kprintf("pmap_pageable: bad PT page va %x next %x\n",
|
||||
pv->pv_va, pv->pv_next);
|
||||
return;
|
||||
}
|
||||
|
@ -1816,12 +1816,12 @@ pmap_pageable(pmap, sva, eva, pageable)
|
|||
pmap_changebit(pa, PG_M, FALSE);
|
||||
#ifdef DEBUG
|
||||
if ((PHYS_TO_VM_PAGE(pa)->flags & PG_CLEAN) == 0) {
|
||||
printf("pa %x: flags=%x: not clean\n",
|
||||
kprintf("pa %x: flags=%x: not clean\n",
|
||||
pa, PHYS_TO_VM_PAGE(pa)->flags);
|
||||
PHYS_TO_VM_PAGE(pa)->flags |= PG_CLEAN;
|
||||
}
|
||||
if (pmapdebug & PDB_PTPAGE)
|
||||
printf("pmap_pageable: PT page %x(%x) unmodified\n",
|
||||
kprintf("pmap_pageable: PT page %x(%x) unmodified\n",
|
||||
sva, *pmap_pte(pmap, sva));
|
||||
if (pmapdebug & PDB_WIRING)
|
||||
pmap_check_wiring("pageable", sva);
|
||||
|
@ -1839,7 +1839,7 @@ pmap_clear_modify(pa)
|
|||
{
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_FOLLOW)
|
||||
printf("pmap_clear_modify(%x)\n", pa);
|
||||
kprintf("pmap_clear_modify(%x)\n", pa);
|
||||
#endif
|
||||
pmap_changebit(pa, PG_M, FALSE);
|
||||
}
|
||||
|
@ -1855,7 +1855,7 @@ void pmap_clear_reference(pa)
|
|||
{
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_FOLLOW)
|
||||
printf("pmap_clear_reference(%x)\n", pa);
|
||||
kprintf("pmap_clear_reference(%x)\n", pa);
|
||||
#endif
|
||||
pmap_changebit(pa, PG_U, FALSE);
|
||||
}
|
||||
|
@ -1874,7 +1874,7 @@ pmap_is_referenced(pa)
|
|||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_FOLLOW) {
|
||||
boolean_t rv = pmap_testbit(pa, PG_U);
|
||||
printf("pmap_is_referenced(%x) -> %c\n", pa, "FT"[rv]);
|
||||
kprintf("pmap_is_referenced(%x) -> %c\n", pa, "FT"[rv]);
|
||||
return(rv);
|
||||
}
|
||||
#endif
|
||||
|
@ -1895,7 +1895,7 @@ pmap_is_modified(pa)
|
|||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_FOLLOW) {
|
||||
boolean_t rv = pmap_testbit(pa, PG_M);
|
||||
printf("pmap_is_modified(%x) -> %c\n", pa, "FT"[rv]);
|
||||
kprintf("pmap_is_modified(%x) -> %c\n", pa, "FT"[rv]);
|
||||
return(rv);
|
||||
}
|
||||
#endif
|
||||
|
@ -1927,10 +1927,10 @@ pmap_mapmulti(pmap, va)
|
|||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_MULTIMAP) {
|
||||
ste = pmap_ste(pmap, HPMMBASEADDR(va));
|
||||
printf("pmap_mapmulti(%x, %x): bste %x(%x)",
|
||||
kprintf("pmap_mapmulti(%x, %x): bste %x(%x)",
|
||||
pmap, va, ste, *ste);
|
||||
ste = pmap_ste(pmap, va);
|
||||
printf(" ste %x(%x)\n", ste, *ste);
|
||||
kprintf(" ste %x(%x)\n", ste, *ste);
|
||||
}
|
||||
#endif
|
||||
bste = pmap_ste(pmap, HPMMBASEADDR(va));
|
||||
|
@ -1971,7 +1971,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
|
|||
pt_entry_t opte;
|
||||
|
||||
if (pmapdebug & (PDB_FOLLOW|PDB_REMOVE|PDB_PROTECT))
|
||||
printf("pmap_remove_mapping(%x, %x, %x, %x)\n",
|
||||
kprintf("pmap_remove_mapping(%x, %x, %x, %x)\n",
|
||||
pmap, va, pte, flags);
|
||||
#endif
|
||||
|
||||
|
@ -2026,7 +2026,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
|
|||
*/
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_REMOVE)
|
||||
printf("remove: invalidating pte at %x\n", pte);
|
||||
kprintf("remove: invalidating pte at %x\n", pte);
|
||||
#endif
|
||||
bits = *pte & (PG_U|PG_M);
|
||||
*pte = PG_NV;
|
||||
|
@ -2105,7 +2105,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
|
|||
pv->pv_pmap && pv->pv_next == NULL && (pv->pv_flags & PV_CI)) {
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_CACHE)
|
||||
printf("remove: clearing CI for pa %x\n", pa);
|
||||
kprintf("remove: clearing CI for pa %x\n", pa);
|
||||
#endif
|
||||
pv->pv_flags &= ~PV_CI;
|
||||
pmap_changebit(pa, PG_CI, FALSE);
|
||||
|
@ -2126,7 +2126,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
|
|||
#endif
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & (PDB_REMOVE|PDB_PTPAGE))
|
||||
printf("remove: ste was %x@%x pte was %x@%x\n",
|
||||
kprintf("remove: ste was %x@%x pte was %x@%x\n",
|
||||
*ste, ste, opte, pmap_pte(pmap, va));
|
||||
#endif
|
||||
#if defined(M68040)
|
||||
|
@ -2149,7 +2149,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
|
|||
if (ptpmap != pmap_kernel()) {
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & (PDB_REMOVE|PDB_SEGTAB))
|
||||
printf("remove: stab %x, refcnt %d\n",
|
||||
kprintf("remove: stab %x, refcnt %d\n",
|
||||
ptpmap->pm_stab, ptpmap->pm_sref - 1);
|
||||
if ((pmapdebug & PDB_PARANOIA) &&
|
||||
ptpmap->pm_stab != (st_entry_t *)trunc_page(ste))
|
||||
|
@ -2158,7 +2158,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
|
|||
if (--(ptpmap->pm_sref) == 0) {
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug&(PDB_REMOVE|PDB_SEGTAB))
|
||||
printf("remove: free stab %x\n",
|
||||
kprintf("remove: free stab %x\n",
|
||||
ptpmap->pm_stab);
|
||||
#endif
|
||||
kmem_free_wakeup(st_map,
|
||||
|
@ -2270,7 +2270,7 @@ pmap_changebit(pa, bit, setem)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_BITS)
|
||||
printf("pmap_changebit(%x, %x, %s)\n",
|
||||
kprintf("pmap_changebit(%x, %x, %s)\n",
|
||||
pa, bit, setem ? "set" : "clear");
|
||||
#endif
|
||||
if (pa < vm_first_phys || pa >= vm_last_phys)
|
||||
|
@ -2390,7 +2390,7 @@ pmap_enter_ptpage(pmap, va)
|
|||
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & (PDB_FOLLOW|PDB_ENTER|PDB_PTPAGE))
|
||||
printf("pmap_enter_ptpage: pmap %x, va %x\n", pmap, va);
|
||||
kprintf("pmap_enter_ptpage: pmap %x, va %x\n", pmap, va);
|
||||
#endif
|
||||
#ifdef PMAPSTATS
|
||||
enter_stats.ptpneeded++;
|
||||
|
@ -2425,7 +2425,7 @@ pmap_enter_ptpage(pmap, va)
|
|||
PMAP_ACTIVATE(pmap, &curproc->p_addr->u_pcb, 1);
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE|PDB_SEGTAB))
|
||||
printf("enter: pmap %x stab %x(%x)\n",
|
||||
kprintf("enter: pmap %x stab %x(%x)\n",
|
||||
pmap, pmap->pm_stab, pmap->pm_stpa);
|
||||
#endif
|
||||
}
|
||||
|
@ -2450,7 +2450,7 @@ pmap_enter_ptpage(pmap, va)
|
|||
*ste = (u_int)addr | SG_RW | SG_U | SG_V;
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE|PDB_SEGTAB))
|
||||
printf("enter: alloc ste2 %d(%x)\n", ix, addr);
|
||||
kprintf("enter: alloc ste2 %d(%x)\n", ix, addr);
|
||||
#endif
|
||||
}
|
||||
ste = pmap_ste2(pmap, va);
|
||||
|
@ -2465,7 +2465,7 @@ pmap_enter_ptpage(pmap, va)
|
|||
ste = (st_entry_t *)((int)ste & ~(NBPG/SG4_LEV3SIZE-1));
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE|PDB_SEGTAB))
|
||||
printf("enter: ste2 %x (%x)\n",
|
||||
kprintf("enter: ste2 %x (%x)\n",
|
||||
pmap_ste2(pmap, va), ste);
|
||||
#endif
|
||||
}
|
||||
|
@ -2488,7 +2488,7 @@ pmap_enter_ptpage(pmap, va)
|
|||
*/
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & PDB_COLLECT)
|
||||
printf("enter: no KPT pages, collecting...\n");
|
||||
kprintf("enter: no KPT pages, collecting...\n");
|
||||
#endif
|
||||
pmap_collect(pmap_kernel());
|
||||
if ((kpt = kpt_free_list) == (struct kpt_page *)0)
|
||||
|
@ -2508,7 +2508,7 @@ pmap_enter_ptpage(pmap, va)
|
|||
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE)) {
|
||||
int ix = pmap_ste(pmap, va) - pmap_ste(pmap, 0);
|
||||
|
||||
printf("enter: add &Sysptmap[%d]: %x (KPT page %x)\n",
|
||||
kprintf("enter: add &Sysptmap[%d]: %x (KPT page %x)\n",
|
||||
ix, Sysptmap[ix], kpt->kpt_va);
|
||||
}
|
||||
#endif
|
||||
|
@ -2521,11 +2521,11 @@ pmap_enter_ptpage(pmap, va)
|
|||
else {
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE))
|
||||
printf("enter: about to fault UPT pg at %x\n", va);
|
||||
kprintf("enter: about to fault UPT pg at %x\n", va);
|
||||
#endif
|
||||
s = vm_fault(pt_map, va, VM_PROT_READ|VM_PROT_WRITE, FALSE);
|
||||
if (s != KERN_SUCCESS) {
|
||||
printf("vm_fault(pt_map, %x, RW, 0) -> %d\n", va, s);
|
||||
kprintf("vm_fault(pt_map, %x, RW, 0) -> %d\n", va, s);
|
||||
panic("pmap_enter: vm_fault failed");
|
||||
}
|
||||
ptpa = pmap_extract(pmap_kernel(), va);
|
||||
|
@ -2551,7 +2551,7 @@ pmap_enter_ptpage(pmap, va)
|
|||
pt_entry_t *pte = pmap_pte(pmap_kernel(), va);
|
||||
#ifdef DEBUG
|
||||
if ((pmapdebug & PDB_PARANOIA) && (*pte & PG_CCB) == 0)
|
||||
printf("%s PT no CCB: kva=%x ptpa=%x pte@%x=%x\n",
|
||||
kprintf("%s PT no CCB: kva=%x ptpa=%x pte@%x=%x\n",
|
||||
pmap == pmap_kernel() ? "Kernel" : "User",
|
||||
va, ptpa, pte, *pte);
|
||||
#endif
|
||||
|
@ -2580,7 +2580,7 @@ pmap_enter_ptpage(pmap, va)
|
|||
pv->pv_ptpmap = pmap;
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE))
|
||||
printf("enter: new PT page at PA %x, ste at %x\n", ptpa, ste);
|
||||
kprintf("enter: new PT page at PA %x, ste at %x\n", ptpa, ste);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -2606,7 +2606,7 @@ pmap_enter_ptpage(pmap, va)
|
|||
pmap->pm_sref++;
|
||||
#ifdef DEBUG
|
||||
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE|PDB_SEGTAB))
|
||||
printf("enter: stab %x refcnt %d\n",
|
||||
kprintf("enter: stab %x refcnt %d\n",
|
||||
pmap->pm_stab, pmap->pm_sref);
|
||||
#endif
|
||||
}
|
||||
|
@ -2631,12 +2631,12 @@ pmap_pvdump(pa)
|
|||
{
|
||||
register struct pv_entry *pv;
|
||||
|
||||
printf("pa %x", pa);
|
||||
kprintf("pa %x", pa);
|
||||
for (pv = pa_to_pvh(pa); pv; pv = pv->pv_next)
|
||||
printf(" -> pmap %x, va %x, ptste %x, ptpmap %x, flags %x",
|
||||
kprintf(" -> pmap %x, va %x, ptste %x, ptpmap %x, flags %x",
|
||||
pv->pv_pmap, pv->pv_va, pv->pv_ptste, pv->pv_ptpmap,
|
||||
pv->pv_flags);
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
@ -2655,7 +2655,7 @@ pmap_check_wiring(str, va)
|
|||
return;
|
||||
|
||||
if (!vm_map_lookup_entry(pt_map, va, &entry)) {
|
||||
printf("wired_check: entry for %x not found\n", va);
|
||||
kprintf("wired_check: entry for %x not found\n", va);
|
||||
return;
|
||||
}
|
||||
count = 0;
|
||||
|
@ -2663,7 +2663,7 @@ pmap_check_wiring(str, va)
|
|||
if (*pte)
|
||||
count++;
|
||||
if (entry->wired_count != count)
|
||||
printf("*%s*: %x: w%d/a%d\n",
|
||||
kprintf("*%s*: %x: w%d/a%d\n",
|
||||
str, va, entry->wired_count, count);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: trap.c,v 1.4 1996/09/07 22:26:52 mycroft Exp $ */
|
||||
/* $NetBSD: trap.c,v 1.5 1996/10/10 23:41:56 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -195,7 +195,7 @@ again:
|
|||
if (beenhere) {
|
||||
#ifdef DEBUG
|
||||
if (mmudebug & MDB_WBFAILED)
|
||||
printf(fromtrap ?
|
||||
kprintf(fromtrap ?
|
||||
"pid %d(%s): writeback aborted, pc=%x, fa=%x\n" :
|
||||
"pid %d(%s): writeback aborted in sigreturn, pc=%x\n",
|
||||
p->p_pid, p->p_comm, fp->f_pc, faultaddr);
|
||||
|
@ -248,7 +248,7 @@ trap(type, code, v, frame)
|
|||
|
||||
default:
|
||||
dopanic:
|
||||
printf("trap type %d, code = %x, v = %x\n", type, code, v);
|
||||
kprintf("trap type %d, code = %x, v = %x\n", type, code, v);
|
||||
#ifdef DDB
|
||||
if (kdb_trap(type, &frame))
|
||||
return;
|
||||
|
@ -289,7 +289,7 @@ copyfault:
|
|||
* The user has most likely trashed the RTE or FP state info
|
||||
* in the stack frame of a signal handler.
|
||||
*/
|
||||
printf("pid %d: kernel %s exception\n", p->p_pid,
|
||||
kprintf("pid %d: kernel %s exception\n", p->p_pid,
|
||||
type==T_COPERR ? "coprocessor" : "format");
|
||||
type |= T_USER;
|
||||
p->p_sigacts->ps_sigact[SIGILL] = SIG_DFL;
|
||||
|
@ -327,7 +327,7 @@ copyfault:
|
|||
case T_FPEMULI|T_USER: /* unimplemented FP instuction */
|
||||
case T_FPEMULD|T_USER: /* unimplemented FP data type */
|
||||
/* XXX need to FSAVE */
|
||||
printf("pid %d(%s): unimplemented FP %s at %x (EA %x)\n",
|
||||
kprintf("pid %d(%s): unimplemented FP %s at %x (EA %x)\n",
|
||||
p->p_pid, p->p_comm,
|
||||
frame.f_format == 2 ? "instruction" : "data type",
|
||||
frame.f_pc, frame.f_fmt2.f_iaddr);
|
||||
|
@ -488,7 +488,7 @@ copyfault:
|
|||
|
||||
#ifdef DEBUG
|
||||
if ((mmudebug & MDB_WBFOLLOW) || MDB_ISPID(p->p_pid))
|
||||
printf("trap: T_MMUFLT pid=%d, code=%x, v=%x, pc=%x, sr=%x\n",
|
||||
kprintf("trap: T_MMUFLT pid=%d, code=%x, v=%x, pc=%x, sr=%x\n",
|
||||
p->p_pid, code, v, frame.f_pc, frame.f_sr);
|
||||
#endif
|
||||
/*
|
||||
|
@ -511,7 +511,7 @@ copyfault:
|
|||
va = trunc_page((vm_offset_t)v);
|
||||
#ifdef DEBUG
|
||||
if (map == kernel_map && va == 0) {
|
||||
printf("trap: bad kernel access at %x\n", v);
|
||||
kprintf("trap: bad kernel access at %x\n", v);
|
||||
goto dopanic;
|
||||
}
|
||||
#endif
|
||||
|
@ -531,7 +531,7 @@ copyfault:
|
|||
rv = vm_fault(map, va, ftype, FALSE);
|
||||
#ifdef DEBUG
|
||||
if (rv && MDB_ISPID(p->p_pid))
|
||||
printf("vm_fault(%x, %x, %x, 0) -> %x\n",
|
||||
kprintf("vm_fault(%x, %x, %x, 0) -> %x\n",
|
||||
map, va, ftype, rv);
|
||||
#endif
|
||||
/*
|
||||
|
@ -564,9 +564,9 @@ copyfault:
|
|||
if (type == T_MMUFLT) {
|
||||
if (p->p_addr->u_pcb.pcb_onfault)
|
||||
goto copyfault;
|
||||
printf("vm_fault(%x, %x, %x, 0) -> %x\n",
|
||||
kprintf("vm_fault(%x, %x, %x, 0) -> %x\n",
|
||||
map, va, ftype, rv);
|
||||
printf(" type %x, code [mmu,,ssw]: %x\n",
|
||||
kprintf(" type %x, code [mmu,,ssw]: %x\n",
|
||||
type, code);
|
||||
goto dopanic;
|
||||
}
|
||||
|
@ -612,7 +612,7 @@ writeback(fp, docachepush)
|
|||
|
||||
#ifdef DEBUG
|
||||
if ((mmudebug & MDB_WBFOLLOW) || MDB_ISPID(p->p_pid)) {
|
||||
printf(" pid=%d, fa=%x,", p->p_pid, f->f_fa);
|
||||
kprintf(" pid=%d, fa=%x,", p->p_pid, f->f_fa);
|
||||
dumpssw(f->f_ssw);
|
||||
}
|
||||
wbstats.calls++;
|
||||
|
@ -628,13 +628,13 @@ writeback(fp, docachepush)
|
|||
*/
|
||||
#ifdef DEBUG
|
||||
if ((mmudebug & MDB_WBFOLLOW) || MDB_ISPID(p->p_pid)) {
|
||||
printf(" pushing %s to PA %x, data %x",
|
||||
kprintf(" pushing %s to PA %x, data %x",
|
||||
f7sz[(f->f_ssw & SSW4_SZMASK) >> 5],
|
||||
f->f_fa, f->f_pd0);
|
||||
if ((f->f_ssw & SSW4_SZMASK) == SSW4_SZLN)
|
||||
printf("/%x/%x/%x",
|
||||
kprintf("/%x/%x/%x",
|
||||
f->f_pd1, f->f_pd2, f->f_pd3);
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
}
|
||||
if (f->f_wb1s & SSW4_WBSV)
|
||||
panic("writeback: cache push with WB1S valid");
|
||||
|
@ -653,7 +653,7 @@ writeback(fp, docachepush)
|
|||
pmap_remove(pmap_kernel(), (vm_offset_t)vmmap,
|
||||
(vm_offset_t)&vmmap[NBPG]);
|
||||
} else
|
||||
printf("WARNING: pid %d(%s) uid %d: CPUSH not done\n",
|
||||
kprintf("WARNING: pid %d(%s) uid %d: CPUSH not done\n",
|
||||
p->p_pid, p->p_comm, p->p_ucred->cr_uid);
|
||||
} else if ((f->f_ssw & (SSW4_RW|SSW4_TTMASK)) == SSW4_TTM16) {
|
||||
/*
|
||||
|
@ -663,7 +663,7 @@ writeback(fp, docachepush)
|
|||
*/
|
||||
#ifdef DEBUG
|
||||
if ((mmudebug & MDB_WBFOLLOW) || MDB_ISPID(p->p_pid))
|
||||
printf(" MOVE16 to VA %x(%x), data %x/%x/%x/%x\n",
|
||||
kprintf(" MOVE16 to VA %x(%x), data %x/%x/%x/%x\n",
|
||||
f->f_fa, f->f_fa & ~0xF, f->f_pd0, f->f_pd1,
|
||||
f->f_pd2, f->f_pd3);
|
||||
if (f->f_wb1s & SSW4_WBSV)
|
||||
|
@ -678,7 +678,7 @@ writeback(fp, docachepush)
|
|||
fa = f->f_fa & ~0xF;
|
||||
#ifdef DEBUG
|
||||
if (mmudebug & MDB_WBFAILED)
|
||||
printf(wberrstr, p->p_pid, p->p_comm,
|
||||
kprintf(wberrstr, p->p_pid, p->p_comm,
|
||||
"MOVE16", fp->f_pc, f->f_fa,
|
||||
f->f_fa & ~0xF, f->f_pd0);
|
||||
#endif
|
||||
|
@ -730,7 +730,7 @@ writeback(fp, docachepush)
|
|||
fa = f->f_wb1a;
|
||||
#ifdef DEBUG
|
||||
if (mmudebug & MDB_WBFAILED)
|
||||
printf(wberrstr, p->p_pid, p->p_comm,
|
||||
kprintf(wberrstr, p->p_pid, p->p_comm,
|
||||
"#1", fp->f_pc, f->f_fa,
|
||||
f->f_wb1a, f->f_wb1d);
|
||||
#endif
|
||||
|
@ -774,7 +774,7 @@ writeback(fp, docachepush)
|
|||
fa = f->f_wb2a;
|
||||
#ifdef DEBUG
|
||||
if (mmudebug & MDB_WBFAILED) {
|
||||
printf(wberrstr, p->p_pid, p->p_comm,
|
||||
kprintf(wberrstr, p->p_pid, p->p_comm,
|
||||
"#2", fp->f_pc, f->f_fa,
|
||||
f->f_wb2a, f->f_wb2d);
|
||||
dumpssw(f->f_ssw);
|
||||
|
@ -818,7 +818,7 @@ writeback(fp, docachepush)
|
|||
fa = f->f_wb3a;
|
||||
#ifdef DEBUG
|
||||
if (mmudebug & MDB_WBFAILED)
|
||||
printf(wberrstr, p->p_pid, p->p_comm,
|
||||
kprintf(wberrstr, p->p_pid, p->p_comm,
|
||||
"#3", fp->f_pc, f->f_fa,
|
||||
f->f_wb3a, f->f_wb3d);
|
||||
#endif
|
||||
|
@ -834,24 +834,24 @@ writeback(fp, docachepush)
|
|||
dumpssw(ssw)
|
||||
register u_short ssw;
|
||||
{
|
||||
printf(" SSW: %x: ", ssw);
|
||||
kprintf(" SSW: %x: ", ssw);
|
||||
if (ssw & SSW4_CP)
|
||||
printf("CP,");
|
||||
kprintf("CP,");
|
||||
if (ssw & SSW4_CU)
|
||||
printf("CU,");
|
||||
kprintf("CU,");
|
||||
if (ssw & SSW4_CT)
|
||||
printf("CT,");
|
||||
kprintf("CT,");
|
||||
if (ssw & SSW4_CM)
|
||||
printf("CM,");
|
||||
kprintf("CM,");
|
||||
if (ssw & SSW4_MA)
|
||||
printf("MA,");
|
||||
kprintf("MA,");
|
||||
if (ssw & SSW4_ATC)
|
||||
printf("ATC,");
|
||||
kprintf("ATC,");
|
||||
if (ssw & SSW4_LK)
|
||||
printf("LK,");
|
||||
kprintf("LK,");
|
||||
if (ssw & SSW4_RW)
|
||||
printf("RW,");
|
||||
printf(" SZ=%s, TT=%s, TM=%s\n",
|
||||
kprintf("RW,");
|
||||
kprintf(" SZ=%s, TT=%s, TM=%s\n",
|
||||
f7sz[(ssw & SSW4_SZMASK) >> 5],
|
||||
f7tt[(ssw & SSW4_TTMASK) >> 3],
|
||||
f7tm[ssw & SSW4_TMMASK]);
|
||||
|
@ -865,16 +865,16 @@ dumpwb(num, s, a, d)
|
|||
register struct proc *p = curproc;
|
||||
vm_offset_t pa;
|
||||
|
||||
printf(" writeback #%d: VA %x, data %x, SZ=%s, TT=%s, TM=%s\n",
|
||||
kprintf(" writeback #%d: VA %x, data %x, SZ=%s, TT=%s, TM=%s\n",
|
||||
num, a, d, f7sz[(s & SSW4_SZMASK) >> 5],
|
||||
f7tt[(s & SSW4_TTMASK) >> 3], f7tm[s & SSW4_TMMASK]);
|
||||
printf(" PA ");
|
||||
kprintf(" PA ");
|
||||
pa = pmap_extract(&p->p_vmspace->vm_pmap, (vm_offset_t)a);
|
||||
if (pa == 0)
|
||||
printf("<invalid address>");
|
||||
kprintf("<invalid address>");
|
||||
else
|
||||
printf("%x, current value %x", pa, fuword((caddr_t)a));
|
||||
printf("\n");
|
||||
kprintf("%x, current value %x", pa, fuword((caddr_t)a));
|
||||
kprintf("\n");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cd.c,v 1.94 1996/08/13 08:55:38 explorer Exp $ */
|
||||
/* $NetBSD: cd.c,v 1.95 1996/10/10 23:34:14 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
|
@ -198,7 +198,7 @@ cdattach(parent, self, aux)
|
|||
if ((sa->sa_inqbuf->version & SID_ANSII) == 0)
|
||||
cd->flags |= CDF_ANCIENT;
|
||||
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -588,7 +588,7 @@ cdstart(v)
|
|||
CDRETRIES, 30000, bp, SCSI_NOSLEEP |
|
||||
((bp->b_flags & B_READ) ? SCSI_DATA_IN : SCSI_DATA_OUT))) {
|
||||
disk_unbusy(&cd->sc_dk, 0);
|
||||
printf("%s: not queued", cd->sc_dev.dv_xname);
|
||||
kprintf("%s: not queued", cd->sc_dev.dv_xname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ch.c,v 1.22 1996/09/18 02:34:31 thorpej Exp $ */
|
||||
/* $NetBSD: ch.c,v 1.23 1996/10/10 23:34:16 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Jason R. Thorpe <thorpej@and.com>
|
||||
|
@ -145,16 +145,16 @@ chattach(parent, self, aux)
|
|||
link->device_softc = sc;
|
||||
link->openings = 1;
|
||||
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
|
||||
/*
|
||||
* Get information about the device. Note we can't use
|
||||
* interrupts yet.
|
||||
*/
|
||||
if (ch_get_params(sc, SCSI_AUTOCONF))
|
||||
printf("%s: offline\n", sc->sc_dev.dv_xname);
|
||||
kprintf("%s: offline\n", sc->sc_dev.dv_xname);
|
||||
else {
|
||||
printf("%s: %d slot%s, %d drive%s, %d picker%s",
|
||||
kprintf("%s: %d slot%s, %d drive%s, %d picker%s",
|
||||
sc->sc_dev.dv_xname,
|
||||
sc->sc_counts[CHET_ST], (sc->sc_counts[CHET_ST] > 1) ?
|
||||
"s" : "",
|
||||
|
@ -163,15 +163,15 @@ chattach(parent, self, aux)
|
|||
sc->sc_counts[CHET_MT], (sc->sc_counts[CHET_MT] > 1) ?
|
||||
"s" : "");
|
||||
if (sc->sc_counts[CHET_IE])
|
||||
printf(", %d portal%s", sc->sc_counts[CHET_IE],
|
||||
kprintf(", %d portal%s", sc->sc_counts[CHET_IE],
|
||||
(sc->sc_counts[CHET_IE] > 1) ? "s" : "");
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
#ifdef CHANGER_DEBUG
|
||||
printf("%s: move mask: 0x%x 0x%x 0x%x 0x%x\n",
|
||||
kprintf("%s: move mask: 0x%x 0x%x 0x%x 0x%x\n",
|
||||
sc->sc_dev.dv_xname,
|
||||
sc->sc_movemask[CHET_MT], sc->sc_movemask[CHET_ST],
|
||||
sc->sc_movemask[CHET_IE], sc->sc_movemask[CHET_DT]);
|
||||
printf("%s: exchange mask: 0x%x 0x%x 0x%x 0x%x\n",
|
||||
kprintf("%s: exchange mask: 0x%x 0x%x 0x%x 0x%x\n",
|
||||
sc->sc_dev.dv_xname,
|
||||
sc->sc_exchangemask[CHET_MT], sc->sc_exchangemask[CHET_ST],
|
||||
sc->sc_exchangemask[CHET_IE], sc->sc_exchangemask[CHET_DT]);
|
||||
|
@ -521,7 +521,7 @@ ch_usergetelemstatus(sc, chet, uptr)
|
|||
st_hdr = (struct read_element_status_header *)data;
|
||||
avail = _2btol(st_hdr->count);
|
||||
if (avail != sc->sc_counts[chet])
|
||||
printf("%s: warning, READ ELEMENT STATUS avail != count\n",
|
||||
kprintf("%s: warning, READ ELEMENT STATUS avail != count\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
|
||||
user_data = (u_int8_t *)malloc(avail, M_DEVBUF, M_WAITOK);
|
||||
|
@ -605,7 +605,7 @@ ch_get_params(sc, scsiflags)
|
|||
sizeof(cmd), (u_char *)&sense_data, sizeof(sense_data), CHRETRIES,
|
||||
6000, NULL, scsiflags | SCSI_DATA_IN);
|
||||
if (error) {
|
||||
printf("%s: could not sense element address page\n",
|
||||
kprintf("%s: could not sense element address page\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
return (error);
|
||||
}
|
||||
|
@ -634,7 +634,7 @@ ch_get_params(sc, scsiflags)
|
|||
sizeof(cmd), (u_char *)&sense_data, sizeof(sense_data), CHRETRIES,
|
||||
6000, NULL, scsiflags | SCSI_DATA_IN);
|
||||
if (error) {
|
||||
printf("%s: could not sense capabilities page\n",
|
||||
kprintf("%s: could not sense capabilities page\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
return (error);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: scsi_base.c,v 1.38 1996/09/03 18:20:33 thorpej Exp $ */
|
||||
/* $NetBSD: scsi_base.c,v 1.39 1996/10/10 23:34:17 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Charles Hannum. All rights reserved.
|
||||
|
@ -106,7 +106,7 @@ scsi_get_xs(sc_link, flags)
|
|||
((flags & SCSI_NOSLEEP) != 0 ? M_NOWAIT : M_WAITOK));
|
||||
if (!xs) {
|
||||
sc_print_addr(sc_link);
|
||||
printf("cannot allocate scsi xs\n");
|
||||
kprintf("cannot allocate scsi xs\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ scsi_size(sc_link, flags)
|
|||
sizeof(scsi_cmd), (u_char *)&rdcap, sizeof(rdcap),
|
||||
2, 20000, NULL, flags | SCSI_DATA_IN) != 0) {
|
||||
sc_print_addr(sc_link);
|
||||
printf("could not get size\n");
|
||||
kprintf("could not get size\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -563,7 +563,7 @@ sc_err1(xs, async)
|
|||
|
||||
default:
|
||||
sc_print_addr(xs->sc_link);
|
||||
printf("unknown error category from scsi driver\n");
|
||||
kprintf("unknown error category from scsi driver\n");
|
||||
error = EIO;
|
||||
break;
|
||||
}
|
||||
|
@ -623,25 +623,25 @@ scsi_interpret_sense(xs)
|
|||
#ifdef SCSIDEBUG
|
||||
if ((sc_link->flags & SDEV_DB1) != 0) {
|
||||
int count;
|
||||
printf("code%x valid%x ",
|
||||
kprintf("code%x valid%x ",
|
||||
sense->error_code & SSD_ERRCODE,
|
||||
sense->error_code & SSD_ERRCODE_VALID ? 1 : 0);
|
||||
printf("seg%x key%x ili%x eom%x fmark%x\n",
|
||||
kprintf("seg%x key%x ili%x eom%x fmark%x\n",
|
||||
sense->segment,
|
||||
sense->flags & SSD_KEY,
|
||||
sense->flags & SSD_ILI ? 1 : 0,
|
||||
sense->flags & SSD_EOM ? 1 : 0,
|
||||
sense->flags & SSD_FILEMARK ? 1 : 0);
|
||||
printf("info: %x %x %x %x followed by %d extra bytes\n",
|
||||
kprintf("info: %x %x %x %x followed by %d extra bytes\n",
|
||||
sense->info[0],
|
||||
sense->info[1],
|
||||
sense->info[2],
|
||||
sense->info[3],
|
||||
sense->extra_len);
|
||||
printf("extra: ");
|
||||
kprintf("extra: ");
|
||||
for (count = 0; count < sense->extra_len; count++)
|
||||
printf("%x ", sense->extra_bytes[count]);
|
||||
printf("\n");
|
||||
kprintf("%x ", sense->extra_bytes[count]);
|
||||
kprintf("\n");
|
||||
}
|
||||
#endif /*SCSIDEBUG */
|
||||
/*
|
||||
|
@ -663,7 +663,7 @@ scsi_interpret_sense(xs)
|
|||
case 0x71: /* delayed error */
|
||||
sc_print_addr(sc_link);
|
||||
key = sense->flags & SSD_KEY;
|
||||
printf(" DELAYED ERROR, key = 0x%x\n", key);
|
||||
kprintf(" DELAYED ERROR, key = 0x%x\n", key);
|
||||
case 0x70:
|
||||
if ((sense->error_code & SSD_ERRCODE_VALID) != 0)
|
||||
info = _4btol(sense->info);
|
||||
|
@ -725,7 +725,7 @@ scsi_interpret_sense(xs)
|
|||
|
||||
if (key) {
|
||||
sc_print_addr(sc_link);
|
||||
printf("%s", error_mes[key - 1]);
|
||||
kprintf("%s", error_mes[key - 1]);
|
||||
if ((sense->error_code & SSD_ERRCODE_VALID) != 0) {
|
||||
switch (key) {
|
||||
case 0x2: /* NOT READY */
|
||||
|
@ -734,26 +734,26 @@ scsi_interpret_sense(xs)
|
|||
case 0x7: /* DATA PROTECT */
|
||||
break;
|
||||
case 0x8: /* BLANK CHECK */
|
||||
printf(", requested size: %d (decimal)",
|
||||
kprintf(", requested size: %d (decimal)",
|
||||
info);
|
||||
break;
|
||||
case 0xb:
|
||||
if (xs->retries)
|
||||
printf(", retrying");
|
||||
printf(", cmd 0x%x, info 0x%x",
|
||||
kprintf(", retrying");
|
||||
kprintf(", cmd 0x%x, info 0x%x",
|
||||
xs->cmd->opcode, info);
|
||||
break;
|
||||
default:
|
||||
printf(", info = %d (decimal)", info);
|
||||
kprintf(", info = %d (decimal)", info);
|
||||
}
|
||||
}
|
||||
if (sense->extra_len != 0) {
|
||||
int n;
|
||||
printf(", data =");
|
||||
kprintf(", data =");
|
||||
for (n = 0; n < sense->extra_len; n++)
|
||||
printf(" %02x", sense->extra_bytes[n]);
|
||||
kprintf(" %02x", sense->extra_bytes[n]);
|
||||
}
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
}
|
||||
return error;
|
||||
|
||||
|
@ -762,15 +762,15 @@ scsi_interpret_sense(xs)
|
|||
*/
|
||||
default:
|
||||
sc_print_addr(sc_link);
|
||||
printf("error code %d",
|
||||
kprintf("error code %d",
|
||||
sense->error_code & SSD_ERRCODE);
|
||||
if ((sense->error_code & SSD_ERRCODE_VALID) != 0) {
|
||||
struct scsi_sense_data_unextended *usense =
|
||||
(struct scsi_sense_data_unextended *)sense;
|
||||
printf(" at block no. %d (decimal)",
|
||||
kprintf(" at block no. %d (decimal)",
|
||||
_3btol(usense->block));
|
||||
}
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
return EIO;
|
||||
}
|
||||
}
|
||||
|
@ -788,7 +788,7 @@ sc_print_addr(sc_link)
|
|||
struct scsi_link *sc_link;
|
||||
{
|
||||
|
||||
printf("%s(%s:%d:%d): ",
|
||||
kprintf("%s(%s:%d:%d): ",
|
||||
sc_link->device_softc ?
|
||||
((struct device *)sc_link->device_softc)->dv_xname : "probe",
|
||||
((struct device *)sc_link->adapter_softc)->dv_xname,
|
||||
|
@ -803,18 +803,18 @@ void
|
|||
show_scsi_xs(xs)
|
||||
struct scsi_xfer *xs;
|
||||
{
|
||||
printf("xs(%p): ", xs);
|
||||
printf("flg(0x%x)", xs->flags);
|
||||
printf("sc_link(%p)", xs->sc_link);
|
||||
printf("retr(0x%x)", xs->retries);
|
||||
printf("timo(0x%x)", xs->timeout);
|
||||
printf("cmd(%p)", xs->cmd);
|
||||
printf("len(0x%x)", xs->cmdlen);
|
||||
printf("data(%p)", xs->data);
|
||||
printf("len(0x%x)", xs->datalen);
|
||||
printf("res(0x%x)", xs->resid);
|
||||
printf("err(0x%x)", xs->error);
|
||||
printf("bp(%p)", xs->bp);
|
||||
kprintf("xs(%p): ", xs);
|
||||
kprintf("flg(0x%x)", xs->flags);
|
||||
kprintf("sc_link(%p)", xs->sc_link);
|
||||
kprintf("retr(0x%x)", xs->retries);
|
||||
kprintf("timo(0x%x)", xs->timeout);
|
||||
kprintf("cmd(%p)", xs->cmd);
|
||||
kprintf("len(0x%x)", xs->cmdlen);
|
||||
kprintf("data(%p)", xs->data);
|
||||
kprintf("len(0x%x)", xs->datalen);
|
||||
kprintf("res(0x%x)", xs->resid);
|
||||
kprintf("err(0x%x)", xs->error);
|
||||
kprintf("bp(%p)", xs->bp);
|
||||
show_scsi_cmd(xs);
|
||||
}
|
||||
|
||||
|
@ -826,19 +826,19 @@ show_scsi_cmd(xs)
|
|||
int i = 0;
|
||||
|
||||
sc_print_addr(xs->sc_link);
|
||||
printf("command: ");
|
||||
kprintf("command: ");
|
||||
|
||||
if ((xs->flags & SCSI_RESET) == 0) {
|
||||
while (i < xs->cmdlen) {
|
||||
if (i)
|
||||
printf(",");
|
||||
printf("%x", b[i++]);
|
||||
kprintf(",");
|
||||
kprintf("%x", b[i++]);
|
||||
}
|
||||
printf("-[%d bytes]\n", xs->datalen);
|
||||
kprintf("-[%d bytes]\n", xs->datalen);
|
||||
if (xs->datalen)
|
||||
show_mem(xs->data, min(64, xs->datalen));
|
||||
} else
|
||||
printf("-RESET-\n");
|
||||
kprintf("-RESET-\n");
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -848,12 +848,12 @@ show_mem(address, num)
|
|||
{
|
||||
int x;
|
||||
|
||||
printf("------------------------------");
|
||||
kprintf("------------------------------");
|
||||
for (x = 0; x < num; x++) {
|
||||
if ((x % 16) == 0)
|
||||
printf("\n%03d: ", x);
|
||||
printf("%02x ", *address++);
|
||||
kprintf("\n%03d: ", x);
|
||||
kprintf("%02x ", *address++);
|
||||
}
|
||||
printf("\n------------------------------\n");
|
||||
kprintf("\n------------------------------\n");
|
||||
}
|
||||
#endif /*SCSIDEBUG */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: scsiconf.c,v 1.63 1996/09/03 18:20:35 thorpej Exp $ */
|
||||
/* $NetBSD: scsiconf.c,v 1.64 1996/10/10 23:34:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Charles Hannum. All rights reserved.
|
||||
|
@ -106,11 +106,11 @@ scsiprint(aux, pnp)
|
|||
|
||||
/* only "scsibus"es can attach to "scsi"s; easy. */
|
||||
if (pnp)
|
||||
printf("scsibus at %s", pnp);
|
||||
kprintf("scsibus at %s", pnp);
|
||||
|
||||
/* don't print channel if the controller says there can be only one. */
|
||||
if (l->channel != SCSI_CHANNEL_ONLY_ONE)
|
||||
printf(" channel %d", l->channel);
|
||||
kprintf(" channel %d", l->channel);
|
||||
|
||||
return (UNCONF);
|
||||
}
|
||||
|
@ -151,10 +151,10 @@ scsibusattach(parent, self, aux)
|
|||
|
||||
sc_link_proto->scsibus = sb->sc_dev.dv_unit;
|
||||
sb->adapter_link = sc_link_proto;
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
|
||||
#if defined(SCSI_DELAY) && SCSI_DELAY > 2
|
||||
printf("%s: waiting for scsi devices to settle\n",
|
||||
kprintf("%s: waiting for scsi devices to settle\n",
|
||||
sb->sc_dev.dv_xname);
|
||||
#else /* SCSI_DELAY > 2 */
|
||||
#undef SCSI_DELAY
|
||||
|
@ -436,7 +436,7 @@ scsibusprint(aux, pnp)
|
|||
int target, lun;
|
||||
|
||||
if (pnp != NULL)
|
||||
printf("%s", pnp);
|
||||
kprintf("%s", pnp);
|
||||
|
||||
inqbuf = sa->sa_inqbuf;
|
||||
|
||||
|
@ -512,7 +512,7 @@ scsibusprint(aux, pnp)
|
|||
scsi_strvis(product, inqbuf->product, 16);
|
||||
scsi_strvis(revision, inqbuf->revision, 4);
|
||||
|
||||
printf(" targ %d lun %d: <%s, %s, %s> SCSI%d %d/%s %s%s",
|
||||
kprintf(" targ %d lun %d: <%s, %s, %s> SCSI%d %d/%s %s%s",
|
||||
target, lun, vendor, product, revision,
|
||||
inqbuf->version & SID_ANSII, type, dtype,
|
||||
removable ? "removable" : "fixed", qtype);
|
||||
|
@ -643,7 +643,7 @@ scsi_probedev(scsi, target, lun)
|
|||
config_attach((struct device *)scsi, cf, &sa, scsibusprint);
|
||||
} else {
|
||||
scsibusprint(&sa, scsi->sc_dev.dv_xname);
|
||||
printf(" not configured\n");
|
||||
kprintf(" not configured\n");
|
||||
goto bad;
|
||||
}
|
||||
|
||||
|
@ -696,7 +696,7 @@ scsi_inqmatch(inqbuf, base, nmatches, matchsize, bestpriority)
|
|||
priority += len;
|
||||
|
||||
#if SCSIDEBUG
|
||||
printf("scsi_inqmatch: %d/%d/%d <%s, %s, %s>\n",
|
||||
kprintf("scsi_inqmatch: %d/%d/%d <%s, %s, %s>\n",
|
||||
priority, match->type, match->removable,
|
||||
match->vendor, match->product, match->revision);
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: scsipi_debug.h,v 1.5 1994/12/28 19:43:00 mycroft Exp $ */
|
||||
/* $NetBSD: scsipi_debug.h,v 1.6 1996/10/10 23:34:18 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Written by Julian Elischer (julian@tfs.com)
|
||||
|
@ -28,11 +28,11 @@
|
|||
#define SC_DEBUG(sc_link,Level,Printstuff) \
|
||||
if ((sc_link)->flags & (Level)) { \
|
||||
sc_print_addr(sc_link); \
|
||||
printf Printstuff; \
|
||||
kprintf Printstuff; \
|
||||
}
|
||||
#define SC_DEBUGN(sc_link,Level,Printstuff) \
|
||||
if ((sc_link)->flags & (Level)) { \
|
||||
printf Printstuff; \
|
||||
kprintf Printstuff; \
|
||||
}
|
||||
#else
|
||||
#define SC_DEBUG(A,B,C)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: scsipi_ioctl.c,v 1.21 1996/09/13 00:35:59 thorpej Exp $ */
|
||||
/* $NetBSD: scsipi_ioctl.c,v 1.22 1996/10/10 23:34:19 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Charles Hannum. All rights reserved.
|
||||
|
@ -127,13 +127,13 @@ scsi_user_done(xs)
|
|||
bp = xs->bp;
|
||||
if (!bp) { /* ALL user requests must have a buf */
|
||||
sc_print_addr(xs->sc_link);
|
||||
printf("User command with no buf\n");
|
||||
kprintf("User command with no buf\n");
|
||||
return;
|
||||
}
|
||||
si = si_find(bp);
|
||||
if (!si) {
|
||||
sc_print_addr(xs->sc_link);
|
||||
printf("User command with no ioctl\n");
|
||||
kprintf("User command with no ioctl\n");
|
||||
return;
|
||||
}
|
||||
screq = &si->si_screq;
|
||||
|
@ -156,7 +156,7 @@ scsi_user_done(xs)
|
|||
break;
|
||||
case XS_DRIVER_STUFFUP:
|
||||
sc_print_addr(sc_link);
|
||||
printf("host adapter code inconsistency\n");
|
||||
kprintf("host adapter code inconsistency\n");
|
||||
screq->retsts = SCCMD_UNKNOWN;
|
||||
break;
|
||||
case XS_TIMEOUT:
|
||||
|
@ -169,7 +169,7 @@ scsi_user_done(xs)
|
|||
break;
|
||||
default:
|
||||
sc_print_addr(sc_link);
|
||||
printf("unknown error category from host adapter code\n");
|
||||
kprintf("unknown error category from host adapter code\n");
|
||||
screq->retsts = SCCMD_UNKNOWN;
|
||||
break;
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ scsistrategy(bp)
|
|||
|
||||
si = si_find(bp);
|
||||
if (!si) {
|
||||
printf("user_strat: No ioctl\n");
|
||||
kprintf("user_strat: No ioctl\n");
|
||||
error = EINVAL;
|
||||
goto bad;
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ scsistrategy(bp)
|
|||
*/
|
||||
if (bp->b_bcount != screq->datalen) {
|
||||
sc_print_addr(sc_link);
|
||||
printf("physio split the request.. cannot proceed\n");
|
||||
kprintf("physio split the request.. cannot proceed\n");
|
||||
error = EIO;
|
||||
goto bad;
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ scsistrategy(bp)
|
|||
|
||||
if (screq->cmdlen > sizeof(struct scsi_generic)) {
|
||||
sc_print_addr(sc_link);
|
||||
printf("cmdlen too big\n");
|
||||
kprintf("cmdlen too big\n");
|
||||
error = EFAULT;
|
||||
goto bad;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sd.c,v 1.102 1996/07/05 16:19:16 christos Exp $ */
|
||||
/* $NetBSD: sd.c,v 1.103 1996/10/10 23:34:22 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
|
@ -205,14 +205,14 @@ sdattach(parent, self, aux)
|
|||
* the drive. We cannot use interrupts yet, so the
|
||||
* request must specify this.
|
||||
*/
|
||||
printf("\n");
|
||||
printf("%s: ", sd->sc_dev.dv_xname);
|
||||
kprintf("\n");
|
||||
kprintf("%s: ", sd->sc_dev.dv_xname);
|
||||
if (scsi_start(sd->sc_link, SSS_START,
|
||||
SCSI_AUTOCONF | SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE | SCSI_SILENT) ||
|
||||
sd_get_parms(sd, SCSI_AUTOCONF) != 0)
|
||||
printf("drive offline\n");
|
||||
kprintf("drive offline\n");
|
||||
else
|
||||
printf("%ldMB, %d cyl, %d head, %d sec, %d bytes/sec\n",
|
||||
kprintf("%ldMB, %d cyl, %d head, %d sec, %d bytes/sec\n",
|
||||
dp->disksize / (1048576 / dp->blksize), dp->cyls,
|
||||
dp->heads, dp->sectors, dp->blksize);
|
||||
}
|
||||
|
@ -603,7 +603,7 @@ sdstart(v)
|
|||
SDRETRIES, 10000, bp, SCSI_NOSLEEP |
|
||||
((bp->b_flags & B_READ) ? SCSI_DATA_IN : SCSI_DATA_OUT));
|
||||
if (error)
|
||||
printf("%s: not queued, error %d\n",
|
||||
kprintf("%s: not queued, error %d\n",
|
||||
sd->sc_dev.dv_xname, error);
|
||||
}
|
||||
}
|
||||
|
@ -801,7 +801,7 @@ sdgetdisklabel(sd)
|
|||
errstring = readdisklabel(MAKESDDEV(0, sd->sc_dev.dv_unit, RAW_PART),
|
||||
sdstrategy, lp, sd->sc_dk.dk_cpulabel);
|
||||
if (errstring) {
|
||||
printf("%s: %s\n", sd->sc_dev.dv_xname, errstring);
|
||||
kprintf("%s: %s\n", sd->sc_dev.dv_xname, errstring);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -918,12 +918,12 @@ sd_get_parms(sd, flags)
|
|||
fake_it:
|
||||
if ((sd->sc_link->quirks & SDEV_NOMODESENSE) == 0) {
|
||||
if (error == 0)
|
||||
printf("%s: mode sense (%d) returned nonsense",
|
||||
kprintf("%s: mode sense (%d) returned nonsense",
|
||||
sd->sc_dev.dv_xname, page);
|
||||
else
|
||||
printf("%s: could not mode sense (4/5)",
|
||||
kprintf("%s: could not mode sense (4/5)",
|
||||
sd->sc_dev.dv_xname);
|
||||
printf("; using fictitious geometry\n");
|
||||
kprintf("; using fictitious geometry\n");
|
||||
}
|
||||
/*
|
||||
* use adaptec standard fictitious geometry
|
||||
|
@ -1070,7 +1070,7 @@ sddump(dev, blkno, va, size)
|
|||
return ENXIO;
|
||||
#else /* SD_DUMP_NOT_TRUSTED */
|
||||
/* Let's just talk about this first... */
|
||||
printf("sd%d: dump addr 0x%x, blk %d\n", unit, va, blkno);
|
||||
kprintf("sd%d: dump addr 0x%x, blk %d\n", unit, va, blkno);
|
||||
delay(500 * 1000); /* half a second */
|
||||
#endif /* SD_DUMP_NOT_TRUSTED */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ss.c,v 1.11 1996/07/12 16:49:50 is Exp $ */
|
||||
/* $NetBSD: ss.c,v 1.12 1996/10/10 23:34:23 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Kenneth Stailey. All rights reserved.
|
||||
|
@ -186,7 +186,7 @@ ssopen(dev, flag, mode, p)
|
|||
unit, ss_cd.cd_ndevs));
|
||||
|
||||
if (sc_link->flags & SDEV_OPEN) {
|
||||
printf("%s: already open\n", ss->sc_dev.dv_xname);
|
||||
kprintf("%s: already open\n", ss->sc_dev.dv_xname);
|
||||
return (EBUSY);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ss_mustek.c,v 1.4 1996/05/05 19:52:57 christos Exp $ */
|
||||
/* $NetBSD: ss_mustek.c,v 1.5 1996/10/10 23:34:24 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Joachim Koenig-Baltes. All rights reserved.
|
||||
|
@ -108,16 +108,16 @@ mustek_attach(ss, sa)
|
|||
SC_DEBUG(sc_link, SDEV_DB1, ("mustek_attach: start\n"));
|
||||
ss->sio.scan_scanner_type = 0;
|
||||
|
||||
printf("\n%s: ", ss->sc_dev.dv_xname);
|
||||
kprintf("\n%s: ", ss->sc_dev.dv_xname);
|
||||
|
||||
/* first, check the model which determines resolutions */
|
||||
if (!bcmp(sa->sa_inqbuf->product, "MFS-06000CX", 11)) {
|
||||
ss->sio.scan_scanner_type = MUSTEK_06000CX;
|
||||
printf("Mustek 6000CX Flatbed 3-pass color scanner, 3 - 600 dpi\n");
|
||||
kprintf("Mustek 6000CX Flatbed 3-pass color scanner, 3 - 600 dpi\n");
|
||||
}
|
||||
if (!bcmp(sa->sa_inqbuf->product, "MFS-12000CX", 11)) {
|
||||
ss->sio.scan_scanner_type = MUSTEK_12000CX;
|
||||
printf("Mustek 12000CX Flatbed 3-pass color scanner, 6 - 1200 dpi\n");
|
||||
kprintf("Mustek 12000CX Flatbed 3-pass color scanner, 6 - 1200 dpi\n");
|
||||
}
|
||||
|
||||
SC_DEBUG(sc_link, SDEV_DB1, ("mustek_attach: scanner_type = %d\n",
|
||||
|
@ -485,7 +485,7 @@ mustek_read(ss, bp)
|
|||
if (scsi_scsi_cmd(sc_link, (struct scsi_generic *) &cmd, sizeof(cmd),
|
||||
(u_char *) bp->b_data, bp->b_bcount, MUSTEK_RETRIES, 10000, bp,
|
||||
SCSI_NOSLEEP | SCSI_DATA_IN) != SUCCESSFULLY_QUEUED)
|
||||
printf("%s: not queued\n", ss->sc_dev.dv_xname);
|
||||
kprintf("%s: not queued\n", ss->sc_dev.dv_xname);
|
||||
else {
|
||||
ss->sio.scan_lines -= lines_to_read;
|
||||
ss->sio.scan_window_size -= bp->b_bcount;
|
||||
|
@ -533,12 +533,12 @@ mustek_get_status(ss, timeout, update)
|
|||
bytes_per_line = _2ltol(data.bytes_per_line);
|
||||
lines = _3ltol(data.lines);
|
||||
if (lines != ss->sio.scan_lines) {
|
||||
printf("mustek: lines actual(%d) != computed(%ld)\n",
|
||||
kprintf("mustek: lines actual(%d) != computed(%ld)\n",
|
||||
lines, ss->sio.scan_lines);
|
||||
return (EIO);
|
||||
}
|
||||
if (bytes_per_line * lines != ss->sio.scan_window_size) {
|
||||
printf("mustek: win-size actual(%d) != computed(%ld)\n",
|
||||
kprintf("mustek: win-size actual(%d) != computed(%ld)\n",
|
||||
bytes_per_line * lines, ss->sio.scan_window_size);
|
||||
return (EIO);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: st.c,v 1.67 1996/05/24 02:04:29 thorpej Exp $ */
|
||||
/* $NetBSD: st.c,v 1.68 1996/10/10 23:34:25 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Charles Hannum. All rights reserved.
|
||||
|
@ -375,20 +375,20 @@ stattach(parent, self, aux)
|
|||
* the drive. We cannot use interrupts yet, so the
|
||||
* request must specify this.
|
||||
*/
|
||||
printf("\n");
|
||||
printf("%s: %s", st->sc_dev.dv_xname, st->quirkdata ? "rogue, " : "");
|
||||
kprintf("\n");
|
||||
kprintf("%s: %s", st->sc_dev.dv_xname, st->quirkdata ? "rogue, " : "");
|
||||
if (scsi_test_unit_ready(sc_link,
|
||||
SCSI_AUTOCONF | SCSI_SILENT | SCSI_IGNORE_MEDIA_CHANGE) ||
|
||||
st_mode_sense(st,
|
||||
SCSI_AUTOCONF | SCSI_SILENT | SCSI_IGNORE_MEDIA_CHANGE))
|
||||
printf("drive empty\n");
|
||||
kprintf("drive empty\n");
|
||||
else {
|
||||
printf("density code 0x%x, ", st->media_density);
|
||||
kprintf("density code 0x%x, ", st->media_density);
|
||||
if (st->media_blksize > 0)
|
||||
printf("%d-byte", st->media_blksize);
|
||||
kprintf("%d-byte", st->media_blksize);
|
||||
else
|
||||
printf("variable");
|
||||
printf(" blocks, write-%s\n",
|
||||
kprintf("variable");
|
||||
kprintf(" blocks, write-%s\n",
|
||||
(st->flags & ST_READONLY) ? "protected" : "enabled");
|
||||
}
|
||||
|
||||
|
@ -492,7 +492,7 @@ stopen(dev, flags, mode, p)
|
|||
* Only allow one at a time
|
||||
*/
|
||||
if (sc_link->flags & SDEV_OPEN) {
|
||||
printf("%s: already open\n", st->sc_dev.dv_xname);
|
||||
kprintf("%s: already open\n", st->sc_dev.dv_xname);
|
||||
return EBUSY;
|
||||
}
|
||||
|
||||
|
@ -672,7 +672,7 @@ st_mount_tape(dev, flags)
|
|||
return error;
|
||||
}
|
||||
if ((error = st_mode_select(st, 0)) != 0) {
|
||||
printf("%s: cannot set selected mode\n", st->sc_dev.dv_xname);
|
||||
kprintf("%s: cannot set selected mode\n", st->sc_dev.dv_xname);
|
||||
return error;
|
||||
}
|
||||
scsi_prevent(sc_link, PR_PREVENT,
|
||||
|
@ -843,7 +843,7 @@ ststrategy(bp)
|
|||
*/
|
||||
if (st->flags & ST_FIXEDBLOCKS) {
|
||||
if (bp->b_bcount % st->blksize) {
|
||||
printf("%s: bad request, must be multiple of %d\n",
|
||||
kprintf("%s: bad request, must be multiple of %d\n",
|
||||
st->sc_dev.dv_xname, st->blksize);
|
||||
bp->b_error = EIO;
|
||||
goto bad;
|
||||
|
@ -854,7 +854,7 @@ ststrategy(bp)
|
|||
*/
|
||||
else if (bp->b_bcount < st->blkmin ||
|
||||
(st->blkmax && bp->b_bcount > st->blkmax)) {
|
||||
printf("%s: bad request, must be between %d and %d\n",
|
||||
kprintf("%s: bad request, must be between %d and %d\n",
|
||||
st->sc_dev.dv_xname, st->blkmin, st->blkmax);
|
||||
bp->b_error = EIO;
|
||||
goto bad;
|
||||
|
@ -1026,7 +1026,7 @@ ststart(v)
|
|||
if (scsi_scsi_cmd(sc_link, (struct scsi_generic *) &cmd,
|
||||
sizeof(cmd), (u_char *) bp->b_data, bp->b_bcount, 0,
|
||||
100000, bp, flags | SCSI_NOSLEEP))
|
||||
printf("%s: not queued\n", st->sc_dev.dv_xname);
|
||||
kprintf("%s: not queued\n", st->sc_dev.dv_xname);
|
||||
} /* go back and see if we can cram more work in.. */
|
||||
}
|
||||
|
||||
|
@ -1212,7 +1212,7 @@ try_new_value:
|
|||
* drive. If not, put it back the way it was.
|
||||
*/
|
||||
if ((error = st_mode_select(st, 0)) != 0) {/* put it back as it was */
|
||||
printf("%s: cannot set selected mode\n", st->sc_dev.dv_xname);
|
||||
kprintf("%s: cannot set selected mode\n", st->sc_dev.dv_xname);
|
||||
st->density = hold_density;
|
||||
st->blksize = hold_blksize;
|
||||
if (st->blksize)
|
||||
|
@ -1727,7 +1727,7 @@ st_interpret_sense(xs)
|
|||
bp->b_resid = xs->resid;
|
||||
if (sense->error_code & SSD_ERRCODE_VALID &&
|
||||
(xs->flags & SCSI_SILENT) == 0)
|
||||
printf("%s: block wrong size, %d blocks residual\n",
|
||||
kprintf("%s: block wrong size, %d blocks residual\n",
|
||||
st->sc_dev.dv_xname, info);
|
||||
|
||||
/*
|
||||
|
@ -1768,7 +1768,7 @@ st_interpret_sense(xs)
|
|||
* the record was bigger than the read
|
||||
*/
|
||||
if ((xs->flags & SCSI_SILENT) == 0)
|
||||
printf("%s: %d-byte record too big\n",
|
||||
kprintf("%s: %d-byte record too big\n",
|
||||
st->sc_dev.dv_xname,
|
||||
xs->datalen - info);
|
||||
return EIO;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cd.c,v 1.94 1996/08/13 08:55:38 explorer Exp $ */
|
||||
/* $NetBSD: cd.c,v 1.95 1996/10/10 23:34:14 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
|
@ -198,7 +198,7 @@ cdattach(parent, self, aux)
|
|||
if ((sa->sa_inqbuf->version & SID_ANSII) == 0)
|
||||
cd->flags |= CDF_ANCIENT;
|
||||
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -588,7 +588,7 @@ cdstart(v)
|
|||
CDRETRIES, 30000, bp, SCSI_NOSLEEP |
|
||||
((bp->b_flags & B_READ) ? SCSI_DATA_IN : SCSI_DATA_OUT))) {
|
||||
disk_unbusy(&cd->sc_dk, 0);
|
||||
printf("%s: not queued", cd->sc_dev.dv_xname);
|
||||
kprintf("%s: not queued", cd->sc_dev.dv_xname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ch.c,v 1.22 1996/09/18 02:34:31 thorpej Exp $ */
|
||||
/* $NetBSD: ch.c,v 1.23 1996/10/10 23:34:16 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Jason R. Thorpe <thorpej@and.com>
|
||||
|
@ -145,16 +145,16 @@ chattach(parent, self, aux)
|
|||
link->device_softc = sc;
|
||||
link->openings = 1;
|
||||
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
|
||||
/*
|
||||
* Get information about the device. Note we can't use
|
||||
* interrupts yet.
|
||||
*/
|
||||
if (ch_get_params(sc, SCSI_AUTOCONF))
|
||||
printf("%s: offline\n", sc->sc_dev.dv_xname);
|
||||
kprintf("%s: offline\n", sc->sc_dev.dv_xname);
|
||||
else {
|
||||
printf("%s: %d slot%s, %d drive%s, %d picker%s",
|
||||
kprintf("%s: %d slot%s, %d drive%s, %d picker%s",
|
||||
sc->sc_dev.dv_xname,
|
||||
sc->sc_counts[CHET_ST], (sc->sc_counts[CHET_ST] > 1) ?
|
||||
"s" : "",
|
||||
|
@ -163,15 +163,15 @@ chattach(parent, self, aux)
|
|||
sc->sc_counts[CHET_MT], (sc->sc_counts[CHET_MT] > 1) ?
|
||||
"s" : "");
|
||||
if (sc->sc_counts[CHET_IE])
|
||||
printf(", %d portal%s", sc->sc_counts[CHET_IE],
|
||||
kprintf(", %d portal%s", sc->sc_counts[CHET_IE],
|
||||
(sc->sc_counts[CHET_IE] > 1) ? "s" : "");
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
#ifdef CHANGER_DEBUG
|
||||
printf("%s: move mask: 0x%x 0x%x 0x%x 0x%x\n",
|
||||
kprintf("%s: move mask: 0x%x 0x%x 0x%x 0x%x\n",
|
||||
sc->sc_dev.dv_xname,
|
||||
sc->sc_movemask[CHET_MT], sc->sc_movemask[CHET_ST],
|
||||
sc->sc_movemask[CHET_IE], sc->sc_movemask[CHET_DT]);
|
||||
printf("%s: exchange mask: 0x%x 0x%x 0x%x 0x%x\n",
|
||||
kprintf("%s: exchange mask: 0x%x 0x%x 0x%x 0x%x\n",
|
||||
sc->sc_dev.dv_xname,
|
||||
sc->sc_exchangemask[CHET_MT], sc->sc_exchangemask[CHET_ST],
|
||||
sc->sc_exchangemask[CHET_IE], sc->sc_exchangemask[CHET_DT]);
|
||||
|
@ -521,7 +521,7 @@ ch_usergetelemstatus(sc, chet, uptr)
|
|||
st_hdr = (struct read_element_status_header *)data;
|
||||
avail = _2btol(st_hdr->count);
|
||||
if (avail != sc->sc_counts[chet])
|
||||
printf("%s: warning, READ ELEMENT STATUS avail != count\n",
|
||||
kprintf("%s: warning, READ ELEMENT STATUS avail != count\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
|
||||
user_data = (u_int8_t *)malloc(avail, M_DEVBUF, M_WAITOK);
|
||||
|
@ -605,7 +605,7 @@ ch_get_params(sc, scsiflags)
|
|||
sizeof(cmd), (u_char *)&sense_data, sizeof(sense_data), CHRETRIES,
|
||||
6000, NULL, scsiflags | SCSI_DATA_IN);
|
||||
if (error) {
|
||||
printf("%s: could not sense element address page\n",
|
||||
kprintf("%s: could not sense element address page\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
return (error);
|
||||
}
|
||||
|
@ -634,7 +634,7 @@ ch_get_params(sc, scsiflags)
|
|||
sizeof(cmd), (u_char *)&sense_data, sizeof(sense_data), CHRETRIES,
|
||||
6000, NULL, scsiflags | SCSI_DATA_IN);
|
||||
if (error) {
|
||||
printf("%s: could not sense capabilities page\n",
|
||||
kprintf("%s: could not sense capabilities page\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
return (error);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: scsi_base.c,v 1.38 1996/09/03 18:20:33 thorpej Exp $ */
|
||||
/* $NetBSD: scsi_base.c,v 1.39 1996/10/10 23:34:17 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Charles Hannum. All rights reserved.
|
||||
|
@ -106,7 +106,7 @@ scsi_get_xs(sc_link, flags)
|
|||
((flags & SCSI_NOSLEEP) != 0 ? M_NOWAIT : M_WAITOK));
|
||||
if (!xs) {
|
||||
sc_print_addr(sc_link);
|
||||
printf("cannot allocate scsi xs\n");
|
||||
kprintf("cannot allocate scsi xs\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ scsi_size(sc_link, flags)
|
|||
sizeof(scsi_cmd), (u_char *)&rdcap, sizeof(rdcap),
|
||||
2, 20000, NULL, flags | SCSI_DATA_IN) != 0) {
|
||||
sc_print_addr(sc_link);
|
||||
printf("could not get size\n");
|
||||
kprintf("could not get size\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -563,7 +563,7 @@ sc_err1(xs, async)
|
|||
|
||||
default:
|
||||
sc_print_addr(xs->sc_link);
|
||||
printf("unknown error category from scsi driver\n");
|
||||
kprintf("unknown error category from scsi driver\n");
|
||||
error = EIO;
|
||||
break;
|
||||
}
|
||||
|
@ -623,25 +623,25 @@ scsi_interpret_sense(xs)
|
|||
#ifdef SCSIDEBUG
|
||||
if ((sc_link->flags & SDEV_DB1) != 0) {
|
||||
int count;
|
||||
printf("code%x valid%x ",
|
||||
kprintf("code%x valid%x ",
|
||||
sense->error_code & SSD_ERRCODE,
|
||||
sense->error_code & SSD_ERRCODE_VALID ? 1 : 0);
|
||||
printf("seg%x key%x ili%x eom%x fmark%x\n",
|
||||
kprintf("seg%x key%x ili%x eom%x fmark%x\n",
|
||||
sense->segment,
|
||||
sense->flags & SSD_KEY,
|
||||
sense->flags & SSD_ILI ? 1 : 0,
|
||||
sense->flags & SSD_EOM ? 1 : 0,
|
||||
sense->flags & SSD_FILEMARK ? 1 : 0);
|
||||
printf("info: %x %x %x %x followed by %d extra bytes\n",
|
||||
kprintf("info: %x %x %x %x followed by %d extra bytes\n",
|
||||
sense->info[0],
|
||||
sense->info[1],
|
||||
sense->info[2],
|
||||
sense->info[3],
|
||||
sense->extra_len);
|
||||
printf("extra: ");
|
||||
kprintf("extra: ");
|
||||
for (count = 0; count < sense->extra_len; count++)
|
||||
printf("%x ", sense->extra_bytes[count]);
|
||||
printf("\n");
|
||||
kprintf("%x ", sense->extra_bytes[count]);
|
||||
kprintf("\n");
|
||||
}
|
||||
#endif /*SCSIDEBUG */
|
||||
/*
|
||||
|
@ -663,7 +663,7 @@ scsi_interpret_sense(xs)
|
|||
case 0x71: /* delayed error */
|
||||
sc_print_addr(sc_link);
|
||||
key = sense->flags & SSD_KEY;
|
||||
printf(" DELAYED ERROR, key = 0x%x\n", key);
|
||||
kprintf(" DELAYED ERROR, key = 0x%x\n", key);
|
||||
case 0x70:
|
||||
if ((sense->error_code & SSD_ERRCODE_VALID) != 0)
|
||||
info = _4btol(sense->info);
|
||||
|
@ -725,7 +725,7 @@ scsi_interpret_sense(xs)
|
|||
|
||||
if (key) {
|
||||
sc_print_addr(sc_link);
|
||||
printf("%s", error_mes[key - 1]);
|
||||
kprintf("%s", error_mes[key - 1]);
|
||||
if ((sense->error_code & SSD_ERRCODE_VALID) != 0) {
|
||||
switch (key) {
|
||||
case 0x2: /* NOT READY */
|
||||
|
@ -734,26 +734,26 @@ scsi_interpret_sense(xs)
|
|||
case 0x7: /* DATA PROTECT */
|
||||
break;
|
||||
case 0x8: /* BLANK CHECK */
|
||||
printf(", requested size: %d (decimal)",
|
||||
kprintf(", requested size: %d (decimal)",
|
||||
info);
|
||||
break;
|
||||
case 0xb:
|
||||
if (xs->retries)
|
||||
printf(", retrying");
|
||||
printf(", cmd 0x%x, info 0x%x",
|
||||
kprintf(", retrying");
|
||||
kprintf(", cmd 0x%x, info 0x%x",
|
||||
xs->cmd->opcode, info);
|
||||
break;
|
||||
default:
|
||||
printf(", info = %d (decimal)", info);
|
||||
kprintf(", info = %d (decimal)", info);
|
||||
}
|
||||
}
|
||||
if (sense->extra_len != 0) {
|
||||
int n;
|
||||
printf(", data =");
|
||||
kprintf(", data =");
|
||||
for (n = 0; n < sense->extra_len; n++)
|
||||
printf(" %02x", sense->extra_bytes[n]);
|
||||
kprintf(" %02x", sense->extra_bytes[n]);
|
||||
}
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
}
|
||||
return error;
|
||||
|
||||
|
@ -762,15 +762,15 @@ scsi_interpret_sense(xs)
|
|||
*/
|
||||
default:
|
||||
sc_print_addr(sc_link);
|
||||
printf("error code %d",
|
||||
kprintf("error code %d",
|
||||
sense->error_code & SSD_ERRCODE);
|
||||
if ((sense->error_code & SSD_ERRCODE_VALID) != 0) {
|
||||
struct scsi_sense_data_unextended *usense =
|
||||
(struct scsi_sense_data_unextended *)sense;
|
||||
printf(" at block no. %d (decimal)",
|
||||
kprintf(" at block no. %d (decimal)",
|
||||
_3btol(usense->block));
|
||||
}
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
return EIO;
|
||||
}
|
||||
}
|
||||
|
@ -788,7 +788,7 @@ sc_print_addr(sc_link)
|
|||
struct scsi_link *sc_link;
|
||||
{
|
||||
|
||||
printf("%s(%s:%d:%d): ",
|
||||
kprintf("%s(%s:%d:%d): ",
|
||||
sc_link->device_softc ?
|
||||
((struct device *)sc_link->device_softc)->dv_xname : "probe",
|
||||
((struct device *)sc_link->adapter_softc)->dv_xname,
|
||||
|
@ -803,18 +803,18 @@ void
|
|||
show_scsi_xs(xs)
|
||||
struct scsi_xfer *xs;
|
||||
{
|
||||
printf("xs(%p): ", xs);
|
||||
printf("flg(0x%x)", xs->flags);
|
||||
printf("sc_link(%p)", xs->sc_link);
|
||||
printf("retr(0x%x)", xs->retries);
|
||||
printf("timo(0x%x)", xs->timeout);
|
||||
printf("cmd(%p)", xs->cmd);
|
||||
printf("len(0x%x)", xs->cmdlen);
|
||||
printf("data(%p)", xs->data);
|
||||
printf("len(0x%x)", xs->datalen);
|
||||
printf("res(0x%x)", xs->resid);
|
||||
printf("err(0x%x)", xs->error);
|
||||
printf("bp(%p)", xs->bp);
|
||||
kprintf("xs(%p): ", xs);
|
||||
kprintf("flg(0x%x)", xs->flags);
|
||||
kprintf("sc_link(%p)", xs->sc_link);
|
||||
kprintf("retr(0x%x)", xs->retries);
|
||||
kprintf("timo(0x%x)", xs->timeout);
|
||||
kprintf("cmd(%p)", xs->cmd);
|
||||
kprintf("len(0x%x)", xs->cmdlen);
|
||||
kprintf("data(%p)", xs->data);
|
||||
kprintf("len(0x%x)", xs->datalen);
|
||||
kprintf("res(0x%x)", xs->resid);
|
||||
kprintf("err(0x%x)", xs->error);
|
||||
kprintf("bp(%p)", xs->bp);
|
||||
show_scsi_cmd(xs);
|
||||
}
|
||||
|
||||
|
@ -826,19 +826,19 @@ show_scsi_cmd(xs)
|
|||
int i = 0;
|
||||
|
||||
sc_print_addr(xs->sc_link);
|
||||
printf("command: ");
|
||||
kprintf("command: ");
|
||||
|
||||
if ((xs->flags & SCSI_RESET) == 0) {
|
||||
while (i < xs->cmdlen) {
|
||||
if (i)
|
||||
printf(",");
|
||||
printf("%x", b[i++]);
|
||||
kprintf(",");
|
||||
kprintf("%x", b[i++]);
|
||||
}
|
||||
printf("-[%d bytes]\n", xs->datalen);
|
||||
kprintf("-[%d bytes]\n", xs->datalen);
|
||||
if (xs->datalen)
|
||||
show_mem(xs->data, min(64, xs->datalen));
|
||||
} else
|
||||
printf("-RESET-\n");
|
||||
kprintf("-RESET-\n");
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -848,12 +848,12 @@ show_mem(address, num)
|
|||
{
|
||||
int x;
|
||||
|
||||
printf("------------------------------");
|
||||
kprintf("------------------------------");
|
||||
for (x = 0; x < num; x++) {
|
||||
if ((x % 16) == 0)
|
||||
printf("\n%03d: ", x);
|
||||
printf("%02x ", *address++);
|
||||
kprintf("\n%03d: ", x);
|
||||
kprintf("%02x ", *address++);
|
||||
}
|
||||
printf("\n------------------------------\n");
|
||||
kprintf("\n------------------------------\n");
|
||||
}
|
||||
#endif /*SCSIDEBUG */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: scsi_debug.h,v 1.5 1994/12/28 19:43:00 mycroft Exp $ */
|
||||
/* $NetBSD: scsi_debug.h,v 1.6 1996/10/10 23:34:18 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Written by Julian Elischer (julian@tfs.com)
|
||||
|
@ -28,11 +28,11 @@
|
|||
#define SC_DEBUG(sc_link,Level,Printstuff) \
|
||||
if ((sc_link)->flags & (Level)) { \
|
||||
sc_print_addr(sc_link); \
|
||||
printf Printstuff; \
|
||||
kprintf Printstuff; \
|
||||
}
|
||||
#define SC_DEBUGN(sc_link,Level,Printstuff) \
|
||||
if ((sc_link)->flags & (Level)) { \
|
||||
printf Printstuff; \
|
||||
kprintf Printstuff; \
|
||||
}
|
||||
#else
|
||||
#define SC_DEBUG(A,B,C)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: scsi_ioctl.c,v 1.21 1996/09/13 00:35:59 thorpej Exp $ */
|
||||
/* $NetBSD: scsi_ioctl.c,v 1.22 1996/10/10 23:34:19 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Charles Hannum. All rights reserved.
|
||||
|
@ -127,13 +127,13 @@ scsi_user_done(xs)
|
|||
bp = xs->bp;
|
||||
if (!bp) { /* ALL user requests must have a buf */
|
||||
sc_print_addr(xs->sc_link);
|
||||
printf("User command with no buf\n");
|
||||
kprintf("User command with no buf\n");
|
||||
return;
|
||||
}
|
||||
si = si_find(bp);
|
||||
if (!si) {
|
||||
sc_print_addr(xs->sc_link);
|
||||
printf("User command with no ioctl\n");
|
||||
kprintf("User command with no ioctl\n");
|
||||
return;
|
||||
}
|
||||
screq = &si->si_screq;
|
||||
|
@ -156,7 +156,7 @@ scsi_user_done(xs)
|
|||
break;
|
||||
case XS_DRIVER_STUFFUP:
|
||||
sc_print_addr(sc_link);
|
||||
printf("host adapter code inconsistency\n");
|
||||
kprintf("host adapter code inconsistency\n");
|
||||
screq->retsts = SCCMD_UNKNOWN;
|
||||
break;
|
||||
case XS_TIMEOUT:
|
||||
|
@ -169,7 +169,7 @@ scsi_user_done(xs)
|
|||
break;
|
||||
default:
|
||||
sc_print_addr(sc_link);
|
||||
printf("unknown error category from host adapter code\n");
|
||||
kprintf("unknown error category from host adapter code\n");
|
||||
screq->retsts = SCCMD_UNKNOWN;
|
||||
break;
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ scsistrategy(bp)
|
|||
|
||||
si = si_find(bp);
|
||||
if (!si) {
|
||||
printf("user_strat: No ioctl\n");
|
||||
kprintf("user_strat: No ioctl\n");
|
||||
error = EINVAL;
|
||||
goto bad;
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ scsistrategy(bp)
|
|||
*/
|
||||
if (bp->b_bcount != screq->datalen) {
|
||||
sc_print_addr(sc_link);
|
||||
printf("physio split the request.. cannot proceed\n");
|
||||
kprintf("physio split the request.. cannot proceed\n");
|
||||
error = EIO;
|
||||
goto bad;
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ scsistrategy(bp)
|
|||
|
||||
if (screq->cmdlen > sizeof(struct scsi_generic)) {
|
||||
sc_print_addr(sc_link);
|
||||
printf("cmdlen too big\n");
|
||||
kprintf("cmdlen too big\n");
|
||||
error = EFAULT;
|
||||
goto bad;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: scsiconf.c,v 1.63 1996/09/03 18:20:35 thorpej Exp $ */
|
||||
/* $NetBSD: scsiconf.c,v 1.64 1996/10/10 23:34:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Charles Hannum. All rights reserved.
|
||||
|
@ -106,11 +106,11 @@ scsiprint(aux, pnp)
|
|||
|
||||
/* only "scsibus"es can attach to "scsi"s; easy. */
|
||||
if (pnp)
|
||||
printf("scsibus at %s", pnp);
|
||||
kprintf("scsibus at %s", pnp);
|
||||
|
||||
/* don't print channel if the controller says there can be only one. */
|
||||
if (l->channel != SCSI_CHANNEL_ONLY_ONE)
|
||||
printf(" channel %d", l->channel);
|
||||
kprintf(" channel %d", l->channel);
|
||||
|
||||
return (UNCONF);
|
||||
}
|
||||
|
@ -151,10 +151,10 @@ scsibusattach(parent, self, aux)
|
|||
|
||||
sc_link_proto->scsibus = sb->sc_dev.dv_unit;
|
||||
sb->adapter_link = sc_link_proto;
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
|
||||
#if defined(SCSI_DELAY) && SCSI_DELAY > 2
|
||||
printf("%s: waiting for scsi devices to settle\n",
|
||||
kprintf("%s: waiting for scsi devices to settle\n",
|
||||
sb->sc_dev.dv_xname);
|
||||
#else /* SCSI_DELAY > 2 */
|
||||
#undef SCSI_DELAY
|
||||
|
@ -436,7 +436,7 @@ scsibusprint(aux, pnp)
|
|||
int target, lun;
|
||||
|
||||
if (pnp != NULL)
|
||||
printf("%s", pnp);
|
||||
kprintf("%s", pnp);
|
||||
|
||||
inqbuf = sa->sa_inqbuf;
|
||||
|
||||
|
@ -512,7 +512,7 @@ scsibusprint(aux, pnp)
|
|||
scsi_strvis(product, inqbuf->product, 16);
|
||||
scsi_strvis(revision, inqbuf->revision, 4);
|
||||
|
||||
printf(" targ %d lun %d: <%s, %s, %s> SCSI%d %d/%s %s%s",
|
||||
kprintf(" targ %d lun %d: <%s, %s, %s> SCSI%d %d/%s %s%s",
|
||||
target, lun, vendor, product, revision,
|
||||
inqbuf->version & SID_ANSII, type, dtype,
|
||||
removable ? "removable" : "fixed", qtype);
|
||||
|
@ -643,7 +643,7 @@ scsi_probedev(scsi, target, lun)
|
|||
config_attach((struct device *)scsi, cf, &sa, scsibusprint);
|
||||
} else {
|
||||
scsibusprint(&sa, scsi->sc_dev.dv_xname);
|
||||
printf(" not configured\n");
|
||||
kprintf(" not configured\n");
|
||||
goto bad;
|
||||
}
|
||||
|
||||
|
@ -696,7 +696,7 @@ scsi_inqmatch(inqbuf, base, nmatches, matchsize, bestpriority)
|
|||
priority += len;
|
||||
|
||||
#if SCSIDEBUG
|
||||
printf("scsi_inqmatch: %d/%d/%d <%s, %s, %s>\n",
|
||||
kprintf("scsi_inqmatch: %d/%d/%d <%s, %s, %s>\n",
|
||||
priority, match->type, match->removable,
|
||||
match->vendor, match->product, match->revision);
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sd.c,v 1.102 1996/07/05 16:19:16 christos Exp $ */
|
||||
/* $NetBSD: sd.c,v 1.103 1996/10/10 23:34:22 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
|
@ -205,14 +205,14 @@ sdattach(parent, self, aux)
|
|||
* the drive. We cannot use interrupts yet, so the
|
||||
* request must specify this.
|
||||
*/
|
||||
printf("\n");
|
||||
printf("%s: ", sd->sc_dev.dv_xname);
|
||||
kprintf("\n");
|
||||
kprintf("%s: ", sd->sc_dev.dv_xname);
|
||||
if (scsi_start(sd->sc_link, SSS_START,
|
||||
SCSI_AUTOCONF | SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE | SCSI_SILENT) ||
|
||||
sd_get_parms(sd, SCSI_AUTOCONF) != 0)
|
||||
printf("drive offline\n");
|
||||
kprintf("drive offline\n");
|
||||
else
|
||||
printf("%ldMB, %d cyl, %d head, %d sec, %d bytes/sec\n",
|
||||
kprintf("%ldMB, %d cyl, %d head, %d sec, %d bytes/sec\n",
|
||||
dp->disksize / (1048576 / dp->blksize), dp->cyls,
|
||||
dp->heads, dp->sectors, dp->blksize);
|
||||
}
|
||||
|
@ -603,7 +603,7 @@ sdstart(v)
|
|||
SDRETRIES, 10000, bp, SCSI_NOSLEEP |
|
||||
((bp->b_flags & B_READ) ? SCSI_DATA_IN : SCSI_DATA_OUT));
|
||||
if (error)
|
||||
printf("%s: not queued, error %d\n",
|
||||
kprintf("%s: not queued, error %d\n",
|
||||
sd->sc_dev.dv_xname, error);
|
||||
}
|
||||
}
|
||||
|
@ -801,7 +801,7 @@ sdgetdisklabel(sd)
|
|||
errstring = readdisklabel(MAKESDDEV(0, sd->sc_dev.dv_unit, RAW_PART),
|
||||
sdstrategy, lp, sd->sc_dk.dk_cpulabel);
|
||||
if (errstring) {
|
||||
printf("%s: %s\n", sd->sc_dev.dv_xname, errstring);
|
||||
kprintf("%s: %s\n", sd->sc_dev.dv_xname, errstring);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -918,12 +918,12 @@ sd_get_parms(sd, flags)
|
|||
fake_it:
|
||||
if ((sd->sc_link->quirks & SDEV_NOMODESENSE) == 0) {
|
||||
if (error == 0)
|
||||
printf("%s: mode sense (%d) returned nonsense",
|
||||
kprintf("%s: mode sense (%d) returned nonsense",
|
||||
sd->sc_dev.dv_xname, page);
|
||||
else
|
||||
printf("%s: could not mode sense (4/5)",
|
||||
kprintf("%s: could not mode sense (4/5)",
|
||||
sd->sc_dev.dv_xname);
|
||||
printf("; using fictitious geometry\n");
|
||||
kprintf("; using fictitious geometry\n");
|
||||
}
|
||||
/*
|
||||
* use adaptec standard fictitious geometry
|
||||
|
@ -1070,7 +1070,7 @@ sddump(dev, blkno, va, size)
|
|||
return ENXIO;
|
||||
#else /* SD_DUMP_NOT_TRUSTED */
|
||||
/* Let's just talk about this first... */
|
||||
printf("sd%d: dump addr 0x%x, blk %d\n", unit, va, blkno);
|
||||
kprintf("sd%d: dump addr 0x%x, blk %d\n", unit, va, blkno);
|
||||
delay(500 * 1000); /* half a second */
|
||||
#endif /* SD_DUMP_NOT_TRUSTED */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ss.c,v 1.11 1996/07/12 16:49:50 is Exp $ */
|
||||
/* $NetBSD: ss.c,v 1.12 1996/10/10 23:34:23 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Kenneth Stailey. All rights reserved.
|
||||
|
@ -186,7 +186,7 @@ ssopen(dev, flag, mode, p)
|
|||
unit, ss_cd.cd_ndevs));
|
||||
|
||||
if (sc_link->flags & SDEV_OPEN) {
|
||||
printf("%s: already open\n", ss->sc_dev.dv_xname);
|
||||
kprintf("%s: already open\n", ss->sc_dev.dv_xname);
|
||||
return (EBUSY);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ss_mustek.c,v 1.4 1996/05/05 19:52:57 christos Exp $ */
|
||||
/* $NetBSD: ss_mustek.c,v 1.5 1996/10/10 23:34:24 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Joachim Koenig-Baltes. All rights reserved.
|
||||
|
@ -108,16 +108,16 @@ mustek_attach(ss, sa)
|
|||
SC_DEBUG(sc_link, SDEV_DB1, ("mustek_attach: start\n"));
|
||||
ss->sio.scan_scanner_type = 0;
|
||||
|
||||
printf("\n%s: ", ss->sc_dev.dv_xname);
|
||||
kprintf("\n%s: ", ss->sc_dev.dv_xname);
|
||||
|
||||
/* first, check the model which determines resolutions */
|
||||
if (!bcmp(sa->sa_inqbuf->product, "MFS-06000CX", 11)) {
|
||||
ss->sio.scan_scanner_type = MUSTEK_06000CX;
|
||||
printf("Mustek 6000CX Flatbed 3-pass color scanner, 3 - 600 dpi\n");
|
||||
kprintf("Mustek 6000CX Flatbed 3-pass color scanner, 3 - 600 dpi\n");
|
||||
}
|
||||
if (!bcmp(sa->sa_inqbuf->product, "MFS-12000CX", 11)) {
|
||||
ss->sio.scan_scanner_type = MUSTEK_12000CX;
|
||||
printf("Mustek 12000CX Flatbed 3-pass color scanner, 6 - 1200 dpi\n");
|
||||
kprintf("Mustek 12000CX Flatbed 3-pass color scanner, 6 - 1200 dpi\n");
|
||||
}
|
||||
|
||||
SC_DEBUG(sc_link, SDEV_DB1, ("mustek_attach: scanner_type = %d\n",
|
||||
|
@ -485,7 +485,7 @@ mustek_read(ss, bp)
|
|||
if (scsi_scsi_cmd(sc_link, (struct scsi_generic *) &cmd, sizeof(cmd),
|
||||
(u_char *) bp->b_data, bp->b_bcount, MUSTEK_RETRIES, 10000, bp,
|
||||
SCSI_NOSLEEP | SCSI_DATA_IN) != SUCCESSFULLY_QUEUED)
|
||||
printf("%s: not queued\n", ss->sc_dev.dv_xname);
|
||||
kprintf("%s: not queued\n", ss->sc_dev.dv_xname);
|
||||
else {
|
||||
ss->sio.scan_lines -= lines_to_read;
|
||||
ss->sio.scan_window_size -= bp->b_bcount;
|
||||
|
@ -533,12 +533,12 @@ mustek_get_status(ss, timeout, update)
|
|||
bytes_per_line = _2ltol(data.bytes_per_line);
|
||||
lines = _3ltol(data.lines);
|
||||
if (lines != ss->sio.scan_lines) {
|
||||
printf("mustek: lines actual(%d) != computed(%ld)\n",
|
||||
kprintf("mustek: lines actual(%d) != computed(%ld)\n",
|
||||
lines, ss->sio.scan_lines);
|
||||
return (EIO);
|
||||
}
|
||||
if (bytes_per_line * lines != ss->sio.scan_window_size) {
|
||||
printf("mustek: win-size actual(%d) != computed(%ld)\n",
|
||||
kprintf("mustek: win-size actual(%d) != computed(%ld)\n",
|
||||
bytes_per_line * lines, ss->sio.scan_window_size);
|
||||
return (EIO);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: st.c,v 1.67 1996/05/24 02:04:29 thorpej Exp $ */
|
||||
/* $NetBSD: st.c,v 1.68 1996/10/10 23:34:25 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Charles Hannum. All rights reserved.
|
||||
|
@ -375,20 +375,20 @@ stattach(parent, self, aux)
|
|||
* the drive. We cannot use interrupts yet, so the
|
||||
* request must specify this.
|
||||
*/
|
||||
printf("\n");
|
||||
printf("%s: %s", st->sc_dev.dv_xname, st->quirkdata ? "rogue, " : "");
|
||||
kprintf("\n");
|
||||
kprintf("%s: %s", st->sc_dev.dv_xname, st->quirkdata ? "rogue, " : "");
|
||||
if (scsi_test_unit_ready(sc_link,
|
||||
SCSI_AUTOCONF | SCSI_SILENT | SCSI_IGNORE_MEDIA_CHANGE) ||
|
||||
st_mode_sense(st,
|
||||
SCSI_AUTOCONF | SCSI_SILENT | SCSI_IGNORE_MEDIA_CHANGE))
|
||||
printf("drive empty\n");
|
||||
kprintf("drive empty\n");
|
||||
else {
|
||||
printf("density code 0x%x, ", st->media_density);
|
||||
kprintf("density code 0x%x, ", st->media_density);
|
||||
if (st->media_blksize > 0)
|
||||
printf("%d-byte", st->media_blksize);
|
||||
kprintf("%d-byte", st->media_blksize);
|
||||
else
|
||||
printf("variable");
|
||||
printf(" blocks, write-%s\n",
|
||||
kprintf("variable");
|
||||
kprintf(" blocks, write-%s\n",
|
||||
(st->flags & ST_READONLY) ? "protected" : "enabled");
|
||||
}
|
||||
|
||||
|
@ -492,7 +492,7 @@ stopen(dev, flags, mode, p)
|
|||
* Only allow one at a time
|
||||
*/
|
||||
if (sc_link->flags & SDEV_OPEN) {
|
||||
printf("%s: already open\n", st->sc_dev.dv_xname);
|
||||
kprintf("%s: already open\n", st->sc_dev.dv_xname);
|
||||
return EBUSY;
|
||||
}
|
||||
|
||||
|
@ -672,7 +672,7 @@ st_mount_tape(dev, flags)
|
|||
return error;
|
||||
}
|
||||
if ((error = st_mode_select(st, 0)) != 0) {
|
||||
printf("%s: cannot set selected mode\n", st->sc_dev.dv_xname);
|
||||
kprintf("%s: cannot set selected mode\n", st->sc_dev.dv_xname);
|
||||
return error;
|
||||
}
|
||||
scsi_prevent(sc_link, PR_PREVENT,
|
||||
|
@ -843,7 +843,7 @@ ststrategy(bp)
|
|||
*/
|
||||
if (st->flags & ST_FIXEDBLOCKS) {
|
||||
if (bp->b_bcount % st->blksize) {
|
||||
printf("%s: bad request, must be multiple of %d\n",
|
||||
kprintf("%s: bad request, must be multiple of %d\n",
|
||||
st->sc_dev.dv_xname, st->blksize);
|
||||
bp->b_error = EIO;
|
||||
goto bad;
|
||||
|
@ -854,7 +854,7 @@ ststrategy(bp)
|
|||
*/
|
||||
else if (bp->b_bcount < st->blkmin ||
|
||||
(st->blkmax && bp->b_bcount > st->blkmax)) {
|
||||
printf("%s: bad request, must be between %d and %d\n",
|
||||
kprintf("%s: bad request, must be between %d and %d\n",
|
||||
st->sc_dev.dv_xname, st->blkmin, st->blkmax);
|
||||
bp->b_error = EIO;
|
||||
goto bad;
|
||||
|
@ -1026,7 +1026,7 @@ ststart(v)
|
|||
if (scsi_scsi_cmd(sc_link, (struct scsi_generic *) &cmd,
|
||||
sizeof(cmd), (u_char *) bp->b_data, bp->b_bcount, 0,
|
||||
100000, bp, flags | SCSI_NOSLEEP))
|
||||
printf("%s: not queued\n", st->sc_dev.dv_xname);
|
||||
kprintf("%s: not queued\n", st->sc_dev.dv_xname);
|
||||
} /* go back and see if we can cram more work in.. */
|
||||
}
|
||||
|
||||
|
@ -1212,7 +1212,7 @@ try_new_value:
|
|||
* drive. If not, put it back the way it was.
|
||||
*/
|
||||
if ((error = st_mode_select(st, 0)) != 0) {/* put it back as it was */
|
||||
printf("%s: cannot set selected mode\n", st->sc_dev.dv_xname);
|
||||
kprintf("%s: cannot set selected mode\n", st->sc_dev.dv_xname);
|
||||
st->density = hold_density;
|
||||
st->blksize = hold_blksize;
|
||||
if (st->blksize)
|
||||
|
@ -1727,7 +1727,7 @@ st_interpret_sense(xs)
|
|||
bp->b_resid = xs->resid;
|
||||
if (sense->error_code & SSD_ERRCODE_VALID &&
|
||||
(xs->flags & SCSI_SILENT) == 0)
|
||||
printf("%s: block wrong size, %d blocks residual\n",
|
||||
kprintf("%s: block wrong size, %d blocks residual\n",
|
||||
st->sc_dev.dv_xname, info);
|
||||
|
||||
/*
|
||||
|
@ -1768,7 +1768,7 @@ st_interpret_sense(xs)
|
|||
* the record was bigger than the read
|
||||
*/
|
||||
if ((xs->flags & SCSI_SILENT) == 0)
|
||||
printf("%s: %d-byte record too big\n",
|
||||
kprintf("%s: %d-byte record too big\n",
|
||||
st->sc_dev.dv_xname,
|
||||
xs->datalen - info);
|
||||
return EIO;
|
||||
|
|
|
@ -39,7 +39,7 @@ static char copyright[] =
|
|||
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)copy.c 8.1 (Berkeley) 6/11/93";*/
|
||||
static char rcsid[] = "$NetBSD: copy.c,v 1.5 1994/06/29 06:43:28 cgd Exp $";
|
||||
static char rcsid[] = "$NetBSD: copy.c,v 1.6 1996/10/10 23:32:59 christos Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#define BSIZE 10240
|
||||
|
@ -59,17 +59,17 @@ main()
|
|||
if (!(rcc = read(from, buf, bsize)))
|
||||
break;
|
||||
if (rcc < 0) {
|
||||
printf("Record %d: read error, errno=%d\n",
|
||||
kprintf("Record %d: read error, errno=%d\n",
|
||||
record, errno);
|
||||
break;
|
||||
}
|
||||
if (rcc != bsize) {
|
||||
if (record == 0) {
|
||||
bsize = rcc;
|
||||
printf("Block size set from input; %d bytes\n",
|
||||
kprintf("Block size set from input; %d bytes\n",
|
||||
bsize);
|
||||
} else
|
||||
printf("Record %d: read short; expected %d, got %d\n",
|
||||
kprintf("Record %d: read short; expected %d, got %d\n",
|
||||
record, bsize, rcc);
|
||||
}
|
||||
#ifdef vax
|
||||
|
@ -78,15 +78,15 @@ main()
|
|||
rcc = bsize;
|
||||
#endif
|
||||
if ((wcc = write(to, buf, rcc)) < 0) {
|
||||
printf("Record %d: write error: errno=%d\n",
|
||||
kprintf("Record %d: write error: errno=%d\n",
|
||||
record, errno);
|
||||
break;
|
||||
}
|
||||
if (wcc < rcc) {
|
||||
printf("Record %d: write short; expected %d, got %d\n",
|
||||
kprintf("Record %d: write short; expected %d, got %d\n",
|
||||
record, rcc, wcc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
printf("copy completed: %d records copied\n", record);
|
||||
kprintf("copy completed: %d records copied\n", record);
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ static char copyright[] =
|
|||
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)ls.c 8.1 (Berkeley) 6/11/93";*/
|
||||
static char rcsid[] = "$NetBSD: ls.c,v 1.5 1994/06/29 06:43:30 cgd Exp $";
|
||||
static char rcsid[] = "$NetBSD: ls.c,v 1.6 1996/10/10 23:32:59 christos Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -57,11 +57,11 @@ main()
|
|||
exit();
|
||||
ip = &iob[fd - 3].i_ino;
|
||||
if ((ip->di_mode & IFMT) != IFDIR) {
|
||||
printf("ls: not a directory\n");
|
||||
kprintf("ls: not a directory\n");
|
||||
continue;
|
||||
}
|
||||
if (ip->di_size == 0) {
|
||||
printf("ls: zero length directory\n");
|
||||
kprintf("ls: zero length directory\n");
|
||||
continue;
|
||||
}
|
||||
ls(fd);
|
||||
|
@ -78,7 +78,7 @@ getfile(prompt, mode)
|
|||
char buf[100];
|
||||
|
||||
do {
|
||||
printf("%s: ", prompt);
|
||||
kprintf("%s: ", prompt);
|
||||
gets(buf);
|
||||
if (buf[0] == CTRL('d') && buf[1] == 0)
|
||||
return (-1);
|
||||
|
@ -95,7 +95,7 @@ ls(fd)
|
|||
register char *dp;
|
||||
char dirbuf[DIRBLKSIZ];
|
||||
|
||||
printf("\ninode\tname\n");
|
||||
kprintf("\ninode\tname\n");
|
||||
while ((size = read(fd, dirbuf, DIRBLKSIZ)) == DIRBLKSIZ)
|
||||
for (dp = dirbuf; (dp < (dirbuf + size)) &&
|
||||
(dp + ((DP *)dp)->d_reclen) < (dirbuf + size);
|
||||
|
@ -103,10 +103,10 @@ ls(fd)
|
|||
if (((DP *)dp)->d_ino == 0)
|
||||
continue;
|
||||
if (((DP *)dp)->d_namlen > MAXNAMLEN+1) {
|
||||
printf("Corrupt file name length! Run fsck soon!\n");
|
||||
kprintf("Corrupt file name length! Run fsck soon!\n");
|
||||
return;
|
||||
}
|
||||
printf("%d\t%s\n", ((DP *)dp)->d_ino,
|
||||
kprintf("%d\t%s\n", ((DP *)dp)->d_ino,
|
||||
((DP *)dp)->d_name);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue