Use if_printf() instead of printf() to print diagnositic messages in the
form "rdp#: blah".
This commit is contained in:
parent
36cee51404
commit
db394c7a54
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105632
@ -619,13 +619,11 @@ rdp_attach(struct isa_device *isa_dev)
|
|||||||
/*
|
/*
|
||||||
* Print additional info when attached
|
* Print additional info when attached
|
||||||
*/
|
*/
|
||||||
printf("%s%d: RealTek RTL%s pocket ethernet, EEPROM %s, %s mode\n",
|
if_printf(ifp, "RealTek RTL%s pocket ethernet, EEPROM %s, %s mode\n",
|
||||||
ifp->if_name, ifp->if_unit,
|
|
||||||
"8002", /* hook for 8012 */
|
"8002", /* hook for 8012 */
|
||||||
sc->eeprom == EEPROM_93C46? "93C46": "74S288",
|
sc->eeprom == EEPROM_93C46? "93C46": "74S288",
|
||||||
sc->slow? "slow": "fast");
|
sc->slow? "slow": "fast");
|
||||||
printf("%s%d: address %6D\n", ifp->if_name, ifp->if_unit,
|
if_printf(ifp, "address %6D\n", sc->arpcom.ac_enaddr, ":");
|
||||||
sc->arpcom.ac_enaddr, ":");
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -1060,9 +1058,9 @@ rdp_rint(struct rdp_softc *sc)
|
|||||||
len < (ETHER_MIN_LEN - ETHER_CRC_LEN) ||
|
len < (ETHER_MIN_LEN - ETHER_CRC_LEN) ||
|
||||||
len > MCLBYTES) {
|
len > MCLBYTES) {
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
printf("rdp%d: bad packet in buffer, "
|
if_printf(ifp, "bad packet in buffer, "
|
||||||
"len %d, status %#x\n",
|
"len %d, status %#x\n",
|
||||||
ifp->if_unit, (int)len, (int)status);
|
(int)len, (int)status);
|
||||||
#endif
|
#endif
|
||||||
ifp->if_ierrors++;
|
ifp->if_ierrors++;
|
||||||
/* rx jump packet */
|
/* rx jump packet */
|
||||||
@ -1074,9 +1072,8 @@ rdp_rint(struct rdp_softc *sc)
|
|||||||
* over and over again
|
* over and over again
|
||||||
*/
|
*/
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
printf("rdp%d: resetting due to an "
|
if_printf(ifp, "resetting due to an "
|
||||||
"excessive number of bad packets\n",
|
"excessive number of bad packets\n");
|
||||||
ifp->if_unit);
|
|
||||||
#endif
|
#endif
|
||||||
rdp_reset(ifp);
|
rdp_reset(ifp);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user