summaryrefslogtreecommitdiffstats
path: root/sys/dev/ep
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-07-01 05:31:23 +0000
committerimp <imp@FreeBSD.org>2005-07-01 05:31:23 +0000
commit12adb900dc9c87084c520df00e514c20714ffe08 (patch)
treeb21561ed14a86526b20ae64da866181529c9694f /sys/dev/ep
parent602e2a21cfd7225018be3dcd7aef5edaa771be12 (diff)
downloadFreeBSD-src-12adb900dc9c87084c520df00e514c20714ffe08.zip
FreeBSD-src-12adb900dc9c87084c520df00e514c20714ffe08.tar.gz
Make a pass and cleanup the printfs from this driver.
Approved by: re (scottl) blanket ep
Diffstat (limited to 'sys/dev/ep')
-rw-r--r--sys/dev/ep/if_ep.c6
-rw-r--r--sys/dev/ep/if_ep_isa.c18
-rw-r--r--sys/dev/ep/if_ep_mca.c8
3 files changed, 11 insertions, 21 deletions
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c
index 39141b4..cee3aa6 100644
--- a/sys/dev/ep/if_ep.c
+++ b/sys/dev/ep/if_ep.c
@@ -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);
diff --git a/sys/dev/ep/if_ep_isa.c b/sys/dev/ep/if_ep_isa.c
index 03e051a..a1c6b5a 100644
--- a/sys/dev/ep/if_ep_isa.c
+++ b/sys/dev/ep/if_ep_isa.c
@@ -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");
diff --git a/sys/dev/ep/if_ep_mca.c b/sys/dev/ep/if_ep_mca.c
index 5cb74d4..e9900f9 100644
--- a/sys/dev/ep/if_ep_mca.c
+++ b/sys/dev/ep/if_ep_mca.c
@@ -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);
OpenPOWER on IntegriCloud