diff options
Diffstat (limited to 'sys/dev/usb/if_udav.c')
-rw-r--r-- | sys/dev/usb/if_udav.c | 138 |
1 files changed, 69 insertions, 69 deletions
diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c index d1d3c382af6..1d9e91ab40d 100644 --- a/sys/dev/usb/if_udav.c +++ b/sys/dev/usb/if_udav.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_udav.c,v 1.29 2007/06/10 10:53:48 mbalmer Exp $ */ +/* $OpenBSD: if_udav.c,v 1.30 2007/06/10 14:49:00 mbalmer Exp $ */ /* $NetBSD: if_udav.c,v 1.3 2004/04/23 17:25:25 itojun Exp $ */ /* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */ /* @@ -180,7 +180,7 @@ udav_attach(struct device *parent, struct device *self, void *aux) usb_interface_descriptor_t *id; usb_endpoint_descriptor_t *ed; char *devinfop; - char *devname = USBDEVNAME(sc->sc_dev); + char *devname = sc->sc_dev.dv_xname; struct ifnet *ifp; struct mii_data *mii; u_char eaddr[ETHER_ADDR_LEN]; @@ -311,7 +311,7 @@ udav_detach(struct device *self, int flags) struct ifnet *ifp = GET_IFP(sc); int s; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); /* Detached before attached finished */ if (!sc->sc_attached) @@ -340,13 +340,13 @@ udav_detach(struct device *self, int flags) #ifdef DIAGNOSTIC if (sc->sc_pipe_tx != NULL) printf("%s: detach has active tx endpoint.\n", - USBDEVNAME(sc->sc_dev)); + sc->sc_dev.dv_xname); if (sc->sc_pipe_rx != NULL) printf("%s: detach has active rx endpoint.\n", - USBDEVNAME(sc->sc_dev)); + sc->sc_dev.dv_xname); if (sc->sc_pipe_intr != NULL) printf("%s: detach has active intr endpoint.\n", - USBDEVNAME(sc->sc_dev)); + sc->sc_dev.dv_xname); #endif sc->sc_attached = 0; @@ -370,7 +370,7 @@ udav_mem_read(struct udav_softc *sc, int offset, void *buf, int len) return (0); DPRINTFN(0x200, - ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + ("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); if (sc->sc_dying) return (0); @@ -390,7 +390,7 @@ udav_mem_read(struct udav_softc *sc, int offset, void *buf, int len) usb_detach_wakeup(&sc->sc_dev); if (err) { DPRINTF(("%s: %s: read failed. off=%04x, err=%d\n", - USBDEVNAME(sc->sc_dev), __func__, offset, err)); + sc->sc_dev.dv_xname, __func__, offset, err)); } return (err); @@ -407,7 +407,7 @@ udav_mem_write(struct udav_softc *sc, int offset, void *buf, int len) return (0); DPRINTFN(0x200, - ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + ("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); if (sc->sc_dying) return (0); @@ -427,7 +427,7 @@ udav_mem_write(struct udav_softc *sc, int offset, void *buf, int len) usb_detach_wakeup(&sc->sc_dev); if (err) { DPRINTF(("%s: %s: write failed. off=%04x, err=%d\n", - USBDEVNAME(sc->sc_dev), __func__, offset, err)); + sc->sc_dev.dv_xname, __func__, offset, err)); } return (err); @@ -444,7 +444,7 @@ udav_mem_write1(struct udav_softc *sc, int offset, unsigned char ch) return (0); DPRINTFN(0x200, - ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + ("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); if (sc->sc_dying) return (0); @@ -463,7 +463,7 @@ udav_mem_write1(struct udav_softc *sc, int offset, unsigned char ch) usb_detach_wakeup(&sc->sc_dev); if (err) { DPRINTF(("%s: %s: write failed. off=%04x, err=%d\n", - USBDEVNAME(sc->sc_dev), __func__, offset, err)); + sc->sc_dev.dv_xname, __func__, offset, err)); } return (err); @@ -481,7 +481,7 @@ udav_csr_read(struct udav_softc *sc, int offset, void *buf, int len) return (0); DPRINTFN(0x200, - ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + ("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); if (sc->sc_dying) return (0); @@ -501,7 +501,7 @@ udav_csr_read(struct udav_softc *sc, int offset, void *buf, int len) usb_detach_wakeup(&sc->sc_dev); if (err) { DPRINTF(("%s: %s: read failed. off=%04x, err=%d\n", - USBDEVNAME(sc->sc_dev), __func__, offset, err)); + sc->sc_dev.dv_xname, __func__, offset, err)); } return (err); @@ -518,7 +518,7 @@ udav_csr_write(struct udav_softc *sc, int offset, void *buf, int len) return (0); DPRINTFN(0x200, - ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + ("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); if (sc->sc_dying) return (0); @@ -538,7 +538,7 @@ udav_csr_write(struct udav_softc *sc, int offset, void *buf, int len) usb_detach_wakeup(&sc->sc_dev); if (err) { DPRINTF(("%s: %s: write failed. off=%04x, err=%d\n", - USBDEVNAME(sc->sc_dev), __func__, offset, err)); + sc->sc_dev.dv_xname, __func__, offset, err)); } return (err); @@ -553,7 +553,7 @@ udav_csr_read1(struct udav_softc *sc, int offset) return (0); DPRINTFN(0x200, - ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + ("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); if (sc->sc_dying) return (0); @@ -572,7 +572,7 @@ udav_csr_write1(struct udav_softc *sc, int offset, unsigned char ch) return (0); DPRINTFN(0x200, - ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + ("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); if (sc->sc_dying) return (0); @@ -591,7 +591,7 @@ udav_csr_write1(struct udav_softc *sc, int offset, unsigned char ch) usb_detach_wakeup(&sc->sc_dev); if (err) { DPRINTF(("%s: %s: write failed. off=%04x, err=%d\n", - USBDEVNAME(sc->sc_dev), __func__, offset, err)); + sc->sc_dev.dv_xname, __func__, offset, err)); } return (err); @@ -605,7 +605,7 @@ udav_init(struct ifnet *ifp) u_char *eaddr; int s; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); if (sc->sc_dying) return (EIO); @@ -633,14 +633,14 @@ udav_init(struct ifnet *ifp) /* Initialize transmit ring */ if (udav_tx_list_init(sc) == ENOBUFS) { - printf("%s: tx list init failed\n", USBDEVNAME(sc->sc_dev)); + printf("%s: tx list init failed\n", sc->sc_dev.dv_xname); splx(s); return (EIO); } /* Initialize receive ring */ if (udav_rx_list_init(sc) == ENOBUFS) { - printf("%s: rx list init failed\n", USBDEVNAME(sc->sc_dev)); + printf("%s: rx list init failed\n", sc->sc_dev.dv_xname); splx(s); return (EIO); } @@ -681,7 +681,7 @@ udav_reset(struct udav_softc *sc) { int i; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); if (sc->sc_dying) return; @@ -716,7 +716,7 @@ udav_activate(device_ptr_t self, enum devact act) { struct udav_softc *sc = (struct udav_softc *)self; - DPRINTF(("%s: %s: enter, act=%d\n", USBDEVNAME(sc->sc_dev), + DPRINTF(("%s: %s: enter, act=%d\n", sc->sc_dev.dv_xname, __func__, act)); switch (act) { case DVACT_ACTIVATE: @@ -743,7 +743,7 @@ udav_setmulti(struct udav_softc *sc) u_int8_t hashes[8]; int h = 0; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); if (sc->sc_dying) return; @@ -804,7 +804,7 @@ udav_openpipes(struct udav_softc *sc) USBD_EXCLUSIVE_USE, &sc->sc_pipe_rx); if (err) { printf("%s: open rx pipe failed: %s\n", - USBDEVNAME(sc->sc_dev), usbd_errstr(err)); + sc->sc_dev.dv_xname, usbd_errstr(err)); error = EIO; goto done; } @@ -814,7 +814,7 @@ udav_openpipes(struct udav_softc *sc) USBD_EXCLUSIVE_USE, &sc->sc_pipe_tx); if (err) { printf("%s: open tx pipe failed: %s\n", - USBDEVNAME(sc->sc_dev), usbd_errstr(err)); + sc->sc_dev.dv_xname, usbd_errstr(err)); error = EIO; goto done; } @@ -828,7 +828,7 @@ udav_openpipes(struct udav_softc *sc) udav_intr, UDAV_INTR_INTERVAL); if (err) { printf("%s: open intr pipe failed: %s\n", - USBDEVNAME(sc->sc_dev), usbd_errstr(err)); + sc->sc_dev.dv_xname, usbd_errstr(err)); error = EIO; goto done; } @@ -843,7 +843,7 @@ udav_openpipes(struct udav_softc *sc) USBD_SHORT_XFER_OK | USBD_NO_COPY, USBD_NO_TIMEOUT, udav_rxeof); (void)usbd_transfer(c->udav_xfer); - DPRINTF(("%s: %s: start read\n", USBDEVNAME(sc->sc_dev), + DPRINTF(("%s: %s: start read\n", sc->sc_dev.dv_xname, __func__)); } @@ -859,19 +859,19 @@ udav_newbuf(struct udav_softc *sc, struct udav_chain *c, struct mbuf *m) { struct mbuf *m_new = NULL; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); if (m == NULL) { MGETHDR(m_new, M_DONTWAIT, MT_DATA); if (m_new == NULL) { printf("%s: no memory for rx list " - "-- packet dropped!\n", USBDEVNAME(sc->sc_dev)); + "-- packet dropped!\n", sc->sc_dev.dv_xname); return (ENOBUFS); } MCLGET(m_new, M_DONTWAIT); if (!(m_new->m_flags & M_EXT)) { printf("%s: no memory for rx list " - "-- packet dropped!\n", USBDEVNAME(sc->sc_dev)); + "-- packet dropped!\n", sc->sc_dev.dv_xname); m_freem(m_new); return (ENOBUFS); } @@ -896,7 +896,7 @@ udav_rx_list_init(struct udav_softc *sc) struct udav_chain *c; int i; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); cd = &sc->sc_cdata; for (i = 0; i < UDAV_RX_LIST_CNT; i++) { @@ -927,7 +927,7 @@ udav_tx_list_init(struct udav_softc *sc) struct udav_chain *c; int i; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); cd = &sc->sc_cdata; for (i = 0; i < UDAV_TX_LIST_CNT; i++) { @@ -956,7 +956,7 @@ udav_start(struct ifnet *ifp) struct udav_softc *sc = ifp->if_softc; struct mbuf *m_head = NULL; - DPRINTF(("%s: %s: enter, link=%d\n", USBDEVNAME(sc->sc_dev), + DPRINTF(("%s: %s: enter, link=%d\n", sc->sc_dev.dv_xname, __func__, sc->sc_link)); if (sc->sc_dying) @@ -997,7 +997,7 @@ udav_send(struct udav_softc *sc, struct mbuf *m, int idx) struct udav_chain *c; usbd_status err; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev),__func__)); + DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname,__func__)); c = &sc->sc_cdata.udav_tx_chain[idx]; @@ -1027,14 +1027,14 @@ udav_send(struct udav_softc *sc, struct mbuf *m, int idx) if (--sc->sc_refcnt < 0) usb_detach_wakeup(&sc->sc_dev); if (err != USBD_IN_PROGRESS) { - printf("%s: udav_send error=%s\n", USBDEVNAME(sc->sc_dev), + printf("%s: udav_send error=%s\n", sc->sc_dev.dv_xname, usbd_errstr(err)); /* Stop the interface */ usb_add_task(sc->sc_udev, &sc->sc_stop_task); return (EIO); } - DPRINTF(("%s: %s: send %d bytes\n", USBDEVNAME(sc->sc_dev), + DPRINTF(("%s: %s: send %d bytes\n", sc->sc_dev.dv_xname, __func__, total_len)); sc->sc_cdata.udav_tx_cnt++; @@ -1055,7 +1055,7 @@ udav_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) s = splnet(); - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); ifp->if_timer = 0; ifp->if_flags &= ~IFF_OACTIVE; @@ -1066,7 +1066,7 @@ udav_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) return; } ifp->if_oerrors++; - printf("%s: usb error on tx: %s\n", USBDEVNAME(sc->sc_dev), + printf("%s: usb error on tx: %s\n", sc->sc_dev.dv_xname, usbd_errstr(status)); if (status == USBD_STALLED) { sc->sc_refcnt++; @@ -1100,7 +1100,7 @@ udav_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) u_int32_t total_len; int s; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev),__func__)); + DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname,__func__)); if (sc->sc_dying) return; @@ -1111,7 +1111,7 @@ udav_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) sc->sc_rx_errs++; if (usbd_ratecheck(&sc->sc_rx_notice)) { printf("%s: %u usb errors on rx: %s\n", - USBDEVNAME(sc->sc_dev), sc->sc_rx_errs, + sc->sc_dev.dv_xname, sc->sc_rx_errs, usbd_errstr(status)); sc->sc_rx_errs = 0; } @@ -1163,7 +1163,7 @@ udav_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN); #endif - DPRINTF(("%s: %s: deliver %d\n", USBDEVNAME(sc->sc_dev), + DPRINTF(("%s: %s: deliver %d\n", sc->sc_dev.dv_xname, __func__, m->m_len)); IF_INPUT(ifp, m); @@ -1180,7 +1180,7 @@ udav_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) if (--sc->sc_refcnt < 0) usb_detach_wakeup(&sc->sc_dev); - DPRINTF(("%s: %s: start rx\n", USBDEVNAME(sc->sc_dev), __func__)); + DPRINTF(("%s: %s: start rx\n", sc->sc_dev.dv_xname, __func__)); } #if 0 @@ -1198,7 +1198,7 @@ udav_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) struct mii_data *mii; int s, error = 0; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); if (sc->sc_dying) return (EIO); @@ -1278,10 +1278,10 @@ udav_watchdog(struct ifnet *ifp) usbd_status stat; int s; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); ifp->if_oerrors++; - printf("%s: watchdog timeout\n", USBDEVNAME(sc->sc_dev)); + printf("%s: watchdog timeout\n", sc->sc_dev.dv_xname); s = splusb(); c = &sc->sc_cdata.udav_tx_chain[0]; @@ -1307,7 +1307,7 @@ udav_stop(struct ifnet *ifp, int disable) usbd_status err; int i; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); ifp->if_timer = 0; ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); @@ -1322,11 +1322,11 @@ udav_stop(struct ifnet *ifp, int disable) err = usbd_abort_pipe(sc->sc_pipe_rx); if (err) printf("%s: abort rx pipe failed: %s\n", - USBDEVNAME(sc->sc_dev), usbd_errstr(err)); + sc->sc_dev.dv_xname, usbd_errstr(err)); err = usbd_close_pipe(sc->sc_pipe_rx); if (err) printf("%s: close rx pipe failed: %s\n", - USBDEVNAME(sc->sc_dev), usbd_errstr(err)); + sc->sc_dev.dv_xname, usbd_errstr(err)); sc->sc_pipe_rx = NULL; } @@ -1335,11 +1335,11 @@ udav_stop(struct ifnet *ifp, int disable) err = usbd_abort_pipe(sc->sc_pipe_tx); if (err) printf("%s: abort tx pipe failed: %s\n", - USBDEVNAME(sc->sc_dev), usbd_errstr(err)); + sc->sc_dev.dv_xname, usbd_errstr(err)); err = usbd_close_pipe(sc->sc_pipe_tx); if (err) printf("%s: close tx pipe failed: %s\n", - USBDEVNAME(sc->sc_dev), usbd_errstr(err)); + sc->sc_dev.dv_xname, usbd_errstr(err)); sc->sc_pipe_tx = NULL; } @@ -1350,11 +1350,11 @@ udav_stop(struct ifnet *ifp, int disable) err = usbd_abort_pipe(sc->sc_pipe_intr); if (err) printf("%s: abort intr pipe failed: %s\n", - USBDEVNAME(sc->sc_dev), usbd_errstr(err)); + sc->sc_dev.dv_xname, usbd_errstr(err)); err = usbd_close_pipe(sc->sc_pipe_intr); if (err) printf("%s: close intr pipe failed: %s\n", - USBDEVNAME(sc->sc_dev), usbd_errstr(err)); + sc->sc_dev.dv_xname, usbd_errstr(err)); sc->sc_pipe_intr = NULL; } #endif @@ -1393,7 +1393,7 @@ udav_ifmedia_change(struct ifnet *ifp) struct udav_softc *sc = ifp->if_softc; struct mii_data *mii = GET_MII(sc); - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); if (sc->sc_dying) return (0); @@ -1416,7 +1416,7 @@ udav_ifmedia_status(struct ifnet *ifp, struct ifmediareq *ifmr) struct udav_softc *sc = ifp->if_softc; struct mii_data *mii = GET_MII(sc); - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); if (sc->sc_dying) return; @@ -1440,7 +1440,7 @@ udav_tick(void *xsc) if (sc == NULL) return; - DPRINTFN(0xff, ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), + DPRINTFN(0xff, ("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); if (sc->sc_dying) @@ -1461,7 +1461,7 @@ udav_tick_task(void *xsc) if (sc == NULL) return; - DPRINTFN(0xff, ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), + DPRINTFN(0xff, ("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); if (sc->sc_dying) @@ -1479,7 +1479,7 @@ udav_tick_task(void *xsc) if (!sc->sc_link && mii->mii_media_status & IFM_ACTIVE && IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) { DPRINTF(("%s: %s: got link\n", - USBDEVNAME(sc->sc_dev), __func__)); + sc->sc_dev.dv_xname, __func__)); sc->sc_link++; if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) udav_start(ifp); @@ -1496,7 +1496,7 @@ udav_tick_task(void *xsc) void udav_lock_mii(struct udav_softc *sc) { - DPRINTFN(0xff, ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), + DPRINTFN(0xff, ("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); sc->sc_refcnt++; @@ -1506,7 +1506,7 @@ udav_lock_mii(struct udav_softc *sc) void udav_unlock_mii(struct udav_softc *sc) { - DPRINTFN(0xff, ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), + DPRINTFN(0xff, ("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); rw_exit_write(&sc->sc_mii_lock); @@ -1527,11 +1527,11 @@ udav_miibus_readreg(device_ptr_t dev, int phy, int reg) sc = USBGETSOFTC(dev); DPRINTFN(0xff, ("%s: %s: enter, phy=%d reg=0x%04x\n", - USBDEVNAME(sc->sc_dev), __func__, phy, reg)); + sc->sc_dev.dv_xname, __func__, phy, reg)); if (sc->sc_dying) { #ifdef DIAGNOSTIC - printf("%s: %s: dying\n", USBDEVNAME(sc->sc_dev), + printf("%s: %s: dying\n", sc->sc_dev.dv_xname, __func__); #endif return (0); @@ -1540,7 +1540,7 @@ udav_miibus_readreg(device_ptr_t dev, int phy, int reg) /* XXX: one PHY only for the internal PHY */ if (phy != 0) { DPRINTFN(0xff, ("%s: %s: phy=%d is not supported\n", - USBDEVNAME(sc->sc_dev), __func__, phy)); + sc->sc_dev.dv_xname, __func__, phy)); return (0); } @@ -1566,7 +1566,7 @@ udav_miibus_readreg(device_ptr_t dev, int phy, int reg) data16 = val[0] | (val[1] << 8); DPRINTFN(0xff, ("%s: %s: phy=%d reg=0x%04x => 0x%04x\n", - USBDEVNAME(sc->sc_dev), __func__, phy, reg, data16)); + sc->sc_dev.dv_xname, __func__, phy, reg, data16)); return (data16); } @@ -1583,11 +1583,11 @@ udav_miibus_writereg(device_ptr_t dev, int phy, int reg, int data) sc = USBGETSOFTC(dev); DPRINTFN(0xff, ("%s: %s: enter, phy=%d reg=0x%04x data=0x%04x\n", - USBDEVNAME(sc->sc_dev), __func__, phy, reg, data)); + sc->sc_dev.dv_xname, __func__, phy, reg, data)); if (sc->sc_dying) { #ifdef DIAGNOSTIC - printf("%s: %s: dying\n", USBDEVNAME(sc->sc_dev), + printf("%s: %s: dying\n", sc->sc_dev.dv_xname, __func__); #endif return; @@ -1596,7 +1596,7 @@ udav_miibus_writereg(device_ptr_t dev, int phy, int reg, int data) /* XXX: one PHY only for the internal PHY */ if (phy != 0) { DPRINTFN(0xff, ("%s: %s: phy=%d is not supported\n", - USBDEVNAME(sc->sc_dev), __func__, phy)); + sc->sc_dev.dv_xname, __func__, phy)); return; } @@ -1634,7 +1634,7 @@ udav_miibus_statchg(device_ptr_t dev) return; sc = USBGETSOFTC(dev); - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); + DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__)); #endif /* Nothing to do */ } |