Make a pass and cleanup the printfs from this driver.
Approved by: re (scottl) blanket ep
This commit is contained in:
parent
cea740ed1a
commit
96d951d396
@ -288,7 +288,7 @@ ep_attach(struct ep_softc *sc)
|
||||
ep_setup_station(sc, sc->eaddr);
|
||||
ifp = sc->ifp = if_alloc(IFT_ETHER);
|
||||
if (ifp == NULL) {
|
||||
device_printf(sc->dev, "can not if_alloc()\n");
|
||||
device_printf(sc->dev, "if_alloc() failed\n");
|
||||
EP_LOCK_DESTORY(sc);
|
||||
return (ENOSPC);
|
||||
}
|
||||
@ -350,10 +350,8 @@ ep_detach(device_t dev)
|
||||
EP_ASSERT_UNLOCKED(sc);
|
||||
ifp = sc->ifp;
|
||||
|
||||
if (sc->gone) {
|
||||
device_printf(dev, "already unloaded\n");
|
||||
if (sc->gone)
|
||||
return (0);
|
||||
}
|
||||
if (bus_child_present(dev))
|
||||
epstop(sc);
|
||||
|
||||
|
@ -215,7 +215,7 @@ ep_isa_identify(driver_t * driver, device_t parent)
|
||||
if (!desc) {
|
||||
if (bootverbose)
|
||||
device_printf(parent,
|
||||
"if_ep: unknown ID 0x%08x\n", isa_id);
|
||||
"unknown ID 0x%08x\n", isa_id);
|
||||
continue;
|
||||
}
|
||||
/* Retreive IRQ */
|
||||
@ -232,7 +232,7 @@ ep_isa_identify(driver_t * driver, device_t parent)
|
||||
|
||||
if ((data & ADDR_CFG_MASK) == ADDR_CFG_EISA) {
|
||||
device_printf(parent,
|
||||
"if_ep: <%s> at port 0x%03x in EISA mode!\n",
|
||||
"<%s> at port 0x%03x in EISA mode!\n",
|
||||
desc, ioport);
|
||||
/*
|
||||
* Set the adaptor tag so that the next card can be
|
||||
@ -249,7 +249,7 @@ ep_isa_identify(driver_t * driver, device_t parent)
|
||||
if (data & ICW1_IAS_PNP) {
|
||||
if (bootverbose)
|
||||
device_printf(parent,
|
||||
"if_ep: <%s> at 0x%03x "
|
||||
"<%s> at 0x%03x "
|
||||
"in PnP mode!\n",
|
||||
desc, ioport);
|
||||
/*
|
||||
@ -271,7 +271,7 @@ ep_isa_identify(driver_t * driver, device_t parent)
|
||||
data = inw(ioport + EP_W0_EEPROM_COMMAND);
|
||||
if (data & EEPROM_TST_MODE) {
|
||||
device_printf(parent,
|
||||
"if_ep: <%s> at port 0x%03x in TEST mode!"
|
||||
"<%s> at port 0x%03x in TEST mode!"
|
||||
" Erase pencil mark.\n",
|
||||
desc, ioport);
|
||||
continue;
|
||||
@ -284,7 +284,7 @@ ep_isa_identify(driver_t * driver, device_t parent)
|
||||
|
||||
if (bootverbose)
|
||||
device_printf(parent,
|
||||
"if_ep: <%s>"
|
||||
"<%s>"
|
||||
" at port 0x%03x-0x%03x irq %d\n",
|
||||
desc, ioport, ioport + EP_IOSIZE, irq);
|
||||
found++;
|
||||
@ -322,19 +322,15 @@ ep_isa_attach(device_t dev)
|
||||
struct ep_softc *sc = device_get_softc(dev);
|
||||
int error = 0;
|
||||
|
||||
if ((error = ep_alloc(dev))) {
|
||||
device_printf(dev, "ep_alloc() failed! (%d)\n", error);
|
||||
if ((error = ep_alloc(dev)))
|
||||
goto bad;
|
||||
}
|
||||
ep_get_media(sc);
|
||||
|
||||
GO_WINDOW(sc, 0);
|
||||
SET_IRQ(sc, rman_get_start(sc->irq));
|
||||
|
||||
if ((error = ep_attach(sc))) {
|
||||
device_printf(dev, "ep_attach() failed! (%d)\n", error);
|
||||
if ((error = ep_attach(sc)))
|
||||
goto bad;
|
||||
}
|
||||
error = ep_eeprom_cksum(sc);
|
||||
if (error) {
|
||||
device_printf(sc->dev, "Invalid EEPROM checksum!\n");
|
||||
|
@ -117,10 +117,8 @@ ep_mca_attach(device_t dev)
|
||||
struct ep_softc *sc = device_get_softc(dev);
|
||||
int error = 0;
|
||||
|
||||
if ((error = ep_alloc(dev))) {
|
||||
device_printf(dev, "ep_alloc() failed! (%d)\n", error);
|
||||
if ((error = ep_alloc(dev)))
|
||||
goto bad;
|
||||
}
|
||||
sc->stat = F_ACCESS_32_BITS;
|
||||
|
||||
ep_get_media(sc);
|
||||
@ -128,10 +126,8 @@ ep_mca_attach(device_t dev)
|
||||
GO_WINDOW(sc, 0);
|
||||
SET_IRQ(sc, rman_get_start(sc->irq));
|
||||
|
||||
if ((error = ep_attach(sc))) {
|
||||
device_printf(dev, "ep_attach() failed! (%d)\n", error);
|
||||
if ((error = ep_attach(sc)))
|
||||
goto bad;
|
||||
}
|
||||
if ((error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET | INTR_MPSAFE, ep_intr,
|
||||
sc, &sc->ep_intrhand))) {
|
||||
device_printf(dev, "bus_setup_intr() failed! (%d)\n", error);
|
||||
|
Loading…
Reference in New Issue
Block a user