summaryrefslogtreecommitdiffstats
path: root/sys/dev/en/if_en_pci.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2006-09-15 15:16:12 +0000
committerglebius <glebius@FreeBSD.org>2006-09-15 15:16:12 +0000
commitc9a02b4657ff2eeb566e1489ac274bcdacf12668 (patch)
tree69edc872873edac42ece52bd5922cb495478b655 /sys/dev/en/if_en_pci.c
parent22cf0fa876e1bd0643da9ca4b3a6166f8ddd4e42 (diff)
downloadFreeBSD-src-c9a02b4657ff2eeb566e1489ac274bcdacf12668.zip
FreeBSD-src-c9a02b4657ff2eeb566e1489ac274bcdacf12668.tar.gz
- Consistently use if_printf() only in interface methods: if_start(),
if_watchdog, etc., or in functions used only in these methods. In all other functions in the driver use device_printf(). - Use __func__ instead of typing function name. Submitted by: Alex Lyashkov <umka sevcity.net>
Diffstat (limited to 'sys/dev/en/if_en_pci.c')
-rw-r--r--sys/dev/en/if_en_pci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/en/if_en_pci.c b/sys/dev/en/if_en_pci.c
index 15eb70d..61d77e7 100644
--- a/sys/dev/en/if_en_pci.c
+++ b/sys/dev/en/if_en_pci.c
@@ -150,8 +150,8 @@ adp_busreset(void *v)
dummy = bus_space_read_4(sc->en_memt, sc->en_base, ADP_PCIREG);
if ((dummy & (ADP_PCIREG_SWAP_WORD | ADP_PCIREG_SWAP_DMA)) !=
ADP_PCIREG_SWAP_DMA)
- if_printf(sc->ifp, "adp_busreset: Adaptec ATM did "
- "NOT reset!\n");
+ device_printf(sc->dev, "%s: Adaptec ATM did NOT reset!\n",
+ __func__);
}
/***********************************************************************/
@@ -197,6 +197,7 @@ en_pci_attach(device_t dev)
sc = device_get_softc(dev);
scp = (struct en_pci_softc *)sc;
+ sc->dev = dev;
sc->ifp = if_alloc(IFT_ATM);
if (sc->ifp == NULL) {
device_printf(dev, "can not if_alloc()\n");
@@ -225,7 +226,6 @@ en_pci_attach(device_t dev)
goto fail;
}
- sc->dev = dev;
sc->en_memt = rman_get_bustag(scp->res);
sc->en_base = rman_get_bushandle(scp->res);
@@ -308,7 +308,7 @@ en_pci_detach(device_t dev)
* Stop DMA and drop transmit queue.
*/
if ((sc->ifp->if_drv_flags & IFF_DRV_RUNNING)) {
- if_printf(sc->ifp, "still running\n");
+ device_printf(sc->dev, "still running\n");
sc->ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
}
OpenPOWER on IntegriCloud