Fixed attach printfs for new format (thanks Chris)

This commit is contained in:
Paul Richards 1993-07-21 06:07:58 +00:00
parent d55523f96b
commit 31e73a990a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=175

View File

@ -206,10 +206,6 @@ int is_attach(isa_dev)
if_attach(ifp);
#if NBPFILTER > 0
bpfattach(&is->bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
/*
* Search down the ifa address list looking for the AF_LINK type
entry
@ -234,7 +230,12 @@ entry
bcopy(is->arpcom.ac_enaddr, LLADDR(sdl), ETHER_ADDR_LEN);
}
printf (" ethernet address %s", ether_sprintf(is->arpcom.ac_enaddr)) ;
printf ("is%d: address %s\n", unit,
ether_sprintf(is->arpcom.ac_enaddr)) ;
#if NBPFILTER > 0
bpfattach(&is->bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
}
int
@ -366,7 +367,7 @@ is_init(unit)
is_start(ifp);
}
else
printf("Isolink card failed to initialise\n");
printf("is%d: card failed to initialise\n", unit);
(void) splx(s);
}
@ -534,13 +535,13 @@ isintr(unit)
iswrcsr(unit,0,BABL|CERR|MISS|MERR|INEA);
}
if (!(isr&RXON)) {
printf("!(isr&RXON)\n");
printf("is%d: !(isr&RXON)\n", unit);
is->arpcom.ac_if.if_ierrors++;
is_reset(unit);
return(1);
}
if (!(isr&TXON)) {
printf("!(isr&TXON)\n");
printf("is%d: !(isr&TXON)\n", unit);
is->arpcom.ac_if.if_oerrors++;
is_reset(unit);
return(1);
@ -601,7 +602,7 @@ static inline void is_rint(int unit)
/* Out of sync with hardware, should never happen */
if (cdm->flags & OWN) {
printf("is%d error: out of sync\n",unit);
printf("is%d: error: out of sync\n",unit);
iswrcsr(unit,0,RINT|INEA);
return;
}
@ -692,6 +693,7 @@ isread(struct is_softc *is, unsigned char *buf, int len)
* information to be at the front, but we still have to drop
* the type and length which are at the front of any trailer data.
*/
is->arpcom.ac_if.if_ipackets++;
m = isget(buf, len, off, &is->arpcom.ac_if);
if (m == 0) return;
#if NBPFILTER > 0
@ -926,14 +928,20 @@ recv_print(unit,no)
{
register struct is_softc *is=&is_softc[unit];
struct mds *rmd;
int len,i;
int len,i,printed=0;
rmd = (is->rd+no);
len = rmd->mcnt;
printf("is%d: Receive buffer %d, len = %d\n",unit,no,len);
printf("is%d: Status %x\n",unit,isrdcsr(unit,0));
for (i=0; i<len; i++)
for (i=0; i<len; i++) {
if (!printed) {
printed=1;
printf("is%d: data: ", unit);
}
printf("%x ",*(is->rbuf+(BUFSIZE*no)+i));
}
if (printed)
printf("\n");
}
@ -942,17 +950,23 @@ xmit_print(unit,no)
{
register struct is_softc *is=&is_softc[unit];
struct mds *rmd;
int i;
int i, printed=0;
u_short len;
rmd = (is->td+no);
len = -(rmd->bcnt);
printf("is%d: Transmit buffer %d, len = %d\n",unit,no,len);
printf("is%d: Status %x\n",unit,isrdcsr(unit,0));
printf("addr %x, flags %x, bcnt %x, mcnt %x\n",
rmd->addr,rmd->flags,rmd->bcnt,rmd->mcnt);
for (i=0; i<len; i++)
printf("is%d: addr %x, flags %x, bcnt %x, mcnt %x\n",
unit,rmd->addr,rmd->flags,rmd->bcnt,rmd->mcnt);
for (i=0; i<len; i++) {
if (!printed) {
printed = 1;
printf("is%d: data: ", unit);
}
printf("%x ",*(is->tbuf+(BUFSIZE*no)+i));
}
if (printed)
printf("\n");
}