diff options
| author | Gleb Smirnoff <glebius@FreeBSD.org> | 2006-09-15 10:40:54 +0000 |
|---|---|---|
| committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2006-09-15 10:40:54 +0000 |
| commit | cc4c1b69711f16604094594e6b86ad171d019317 (patch) | |
| tree | ae382d23f768d8bc206d445054d2cee99c94d544 /sys/dev/sf | |
| parent | 979df1f5ddebb4ff9869d9ae20caa9e0eb1848ad (diff) | |
Notes
Diffstat (limited to 'sys/dev/sf')
| -rw-r--r-- | sys/dev/sf/if_sf.c | 7 | ||||
| -rw-r--r-- | sys/dev/sf/if_sfreg.h | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/sf/if_sf.c b/sys/dev/sf/if_sf.c index 498aba305d93..a308e40dc68e 100644 --- a/sys/dev/sf/if_sf.c +++ b/sys/dev/sf/if_sf.c @@ -616,7 +616,7 @@ sf_reset(sc) } if (i == SF_TIMEOUT) - if_printf(sc->sf_ifp, "reset never completed!\n"); + device_printf(sc->sf_dev, "reset never completed!\n"); /* Wait a little while for the chip to get its brains in order. */ DELAY(1000); @@ -690,6 +690,7 @@ sf_attach(dev) u_char eaddr[6]; sc = device_get_softc(dev); + sc->sf_dev = dev; mtx_init(&sc->sf_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); @@ -1081,7 +1082,7 @@ sf_txthresh_adjust(sc) txfctl &= ~SF_TXFRMCTL_TXTHRESH; txfctl |= txthresh; #ifdef DIAGNOSTIC - if_printf(sc->sf_ifp, "tx underrun, increasing " + device_printf(sc->sf_dev, "tx underrun, increasing " "tx threshold to %d bytes\n", txthresh * 4); #endif @@ -1243,7 +1244,7 @@ sf_init_locked(sc) sf_setperf(sc, 0, IF_LLADDR(sc->sf_ifp)); if (sf_init_rx_ring(sc) == ENOBUFS) { - if_printf(sc->sf_ifp, + device_printf(sc->sf_dev, "initialization failed: no memory for rx buffers\n"); return; } diff --git a/sys/dev/sf/if_sfreg.h b/sys/dev/sf/if_sfreg.h index 9b3826dbfbda..1f6618d9f2ad 100644 --- a/sys/dev/sf/if_sfreg.h +++ b/sys/dev/sf/if_sfreg.h @@ -1032,6 +1032,7 @@ struct sf_list_data { struct sf_softc { struct ifnet *sf_ifp; /* interface info */ + device_t sf_dev; /* device info */ bus_space_handle_t sf_bhandle; /* bus space handle */ bus_space_tag_t sf_btag; /* bus space tag */ void *sf_intrhand; /* interrupt handler cookie */ |
