diff options
author | Marc Balmer <mbalmer@cvs.openbsd.org> | 2007-06-10 14:49:02 +0000 |
---|---|---|
committer | Marc Balmer <mbalmer@cvs.openbsd.org> | 2007-06-10 14:49:02 +0000 |
commit | b36c9f662da72870bf22394171cf74a54a7f8e39 (patch) | |
tree | 2641ee87f027aa978ea64bc95fe33bcf03d1d500 /sys/dev/usb/if_wi_usb.c | |
parent | 2bca40ff67d19c516b42ca70c28870f34f7388dc (diff) |
Remove the definition and use of the USBDEVNAME macro.
(This might look easy, but it was a big diff. Thanks to dlg and especially jsg
for looking over it; we found at least four mistakes in the initial diff.)
ok jsg.
Diffstat (limited to 'sys/dev/usb/if_wi_usb.c')
-rw-r--r-- | sys/dev/usb/if_wi_usb.c | 164 |
1 files changed, 82 insertions, 82 deletions
diff --git a/sys/dev/usb/if_wi_usb.c b/sys/dev/usb/if_wi_usb.c index 04dcdaef226..3c1ebc94b72 100644 --- a/sys/dev/usb/if_wi_usb.c +++ b/sys/dev/usb/if_wi_usb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi_usb.c,v 1.39 2007/06/10 10:53:48 mbalmer Exp $ */ +/* $OpenBSD: if_wi_usb.c,v 1.40 2007/06/10 14:49:00 mbalmer Exp $ */ /* * Copyright (c) 2003 Dale Rahn. All rights reserved. @@ -300,12 +300,12 @@ wi_usb_attach(struct device *parent, struct device *self, void *aux) err = usbd_set_config_no(dev, WI_USB_CONFIG_NO, 1); if (err) { printf("%s: setting config no failed\n", - USBDEVNAME(sc->wi_usb_dev)); + sc->wi_usb_dev.dv_xname); return; } devinfop = usbd_devinfo_alloc(dev, 0); - printf("\n%s: %s\n", USBDEVNAME(sc->wi_usb_dev), devinfop); + printf("\n%s: %s\n", sc->wi_usb_dev.dv_xname, devinfop); usbd_devinfo_free(devinfop); /* XXX - any tasks? */ @@ -313,7 +313,7 @@ wi_usb_attach(struct device *parent, struct device *self, void *aux) err = usbd_device2interface_handle(dev, WI_USB_IFACE_IDX, &iface); if (err) { printf("%s: getting interface handle failed\n", - USBDEVNAME(sc->wi_usb_dev)); + sc->wi_usb_dev.dv_xname); return; } @@ -338,7 +338,7 @@ wi_usb_attach(struct device *parent, struct device *self, void *aux) ed = usbd_interface2endpoint_descriptor(iface, i); if (ed == NULL) { printf("%s: couldn't get endpoint descriptor %d\n", - USBDEVNAME(sc->wi_usb_dev), i); + sc->wi_usb_dev.dv_xname, i); return; } if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && @@ -359,18 +359,18 @@ wi_usb_attach(struct device *parent, struct device *self, void *aux) if (wi_usb_rx_list_init(sc)) { printf("%s: rx list init failed\n", - USBDEVNAME(sc->wi_usb_dev)); + sc->wi_usb_dev.dv_xname); return; } if (wi_usb_tx_list_init(sc)) { printf("%s: tx list init failed\n", - USBDEVNAME(sc->wi_usb_dev)); + sc->wi_usb_dev.dv_xname); return; } if (wi_usb_open_pipes(sc)){ printf("%s: open pipes failed\n", - USBDEVNAME(sc->wi_usb_dev)); + sc->wi_usb_dev.dv_xname); return; } @@ -410,7 +410,7 @@ wi_usb_detach(struct device *self, int flags) /* detatch wi */ if (!(wsc->wi_flags & WI_FLAGS_ATTACHED)) { - printf("%s: already detached\n", USBDEVNAME(sc->wi_usb_dev)); + printf("%s: already detached\n", sc->wi_usb_dev.dv_xname); splx(s); return (0); } @@ -440,12 +440,12 @@ wi_usb_detach(struct device *self, int flags) err = usbd_abort_pipe(sc->wi_usb_ep[WI_USB_ENDPT_INTR]); if (err) { printf("%s: abort intr pipe failed: %s\n", - USBDEVNAME(sc->wi_usb_dev), usbd_errstr(err)); + sc->wi_usb_dev.dv_xname, usbd_errstr(err)); } err = usbd_close_pipe(sc->wi_usb_ep[WI_USB_ENDPT_INTR]); if (err) { printf("%s: close intr pipe failed: %s\n", - USBDEVNAME(sc->wi_usb_dev), usbd_errstr(err)); + sc->wi_usb_dev.dv_xname, usbd_errstr(err)); } sc->wi_usb_ep[WI_USB_ENDPT_INTR] = NULL; } @@ -453,12 +453,12 @@ wi_usb_detach(struct device *self, int flags) usbd_abort_pipe(sc->wi_usb_ep[WI_USB_ENDPT_TX]); if (err) { printf("%s: abort tx pipe failed: %s\n", - USBDEVNAME(sc->wi_usb_dev), usbd_errstr(err)); + sc->wi_usb_dev.dv_xname, usbd_errstr(err)); } err = usbd_close_pipe(sc->wi_usb_ep[WI_USB_ENDPT_TX]); if (err) { printf("%s: close tx pipe failed: %s\n", - USBDEVNAME(sc->wi_usb_dev), usbd_errstr(err)); + sc->wi_usb_dev.dv_xname, usbd_errstr(err)); } sc->wi_usb_ep[WI_USB_ENDPT_TX] = NULL; } @@ -466,12 +466,12 @@ wi_usb_detach(struct device *self, int flags) usbd_abort_pipe(sc->wi_usb_ep[WI_USB_ENDPT_RX]); if (err) { printf("%s: abort rx pipe failed: %s\n", - USBDEVNAME(sc->wi_usb_dev), usbd_errstr(err)); + sc->wi_usb_dev.dv_xname, usbd_errstr(err)); } err = usbd_close_pipe(sc->wi_usb_ep[WI_USB_ENDPT_RX]); if (err) { printf("%s: close rx pipe failed: %s\n", - USBDEVNAME(sc->wi_usb_dev), usbd_errstr(err)); + sc->wi_usb_dev.dv_xname, usbd_errstr(err)); } sc->wi_usb_ep[WI_USB_ENDPT_RX] = NULL; } @@ -494,7 +494,7 @@ wi_send_packet(struct wi_usb_softc *sc, int id) c = &sc->wi_usb_tx_chain[0]; DPRINTFN(10,("%s: %s: id=%x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, id)); + sc->wi_usb_dev.dv_xname, __func__, id)); /* assemble packet from write_data buffer */ if (id == 0 || id == 1) { @@ -528,7 +528,7 @@ wi_send_packet(struct wi_usb_softc *sc, int id) total_len = rnd_len; DPRINTFN(5,("%s: %s: id=%x len=%x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, id, total_len)); + sc->wi_usb_dev.dv_xname, __func__, id, total_len)); usbd_setup_xfer(c->wi_usb_xfer, sc->wi_usb_ep[WI_USB_ENDPT_TX], c, c->wi_usb_buf, rnd_len, @@ -538,7 +538,7 @@ wi_send_packet(struct wi_usb_softc *sc, int id) err = usbd_transfer(c->wi_usb_xfer); if (err != USBD_IN_PROGRESS && err != USBD_NORMAL_COMPLETION) { printf("%s: %s: error=%s\n", - USBDEVNAME(sc->wi_usb_dev), __func__, + sc->wi_usb_dev.dv_xname, __func__, usbd_errstr(err)); /* Stop the interface from process context. */ wi_usb_stop(sc); @@ -548,12 +548,12 @@ wi_send_packet(struct wi_usb_softc *sc, int id) } DPRINTFN(5,("%s: %s: exit err=%x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, err)); + sc->wi_usb_dev.dv_xname, __func__, err)); err_ret: return err; } printf("%s:%s: invalid packet id sent %x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, id); + sc->wi_usb_dev.dv_xname, __func__, id); return 0; } @@ -567,7 +567,7 @@ wi_cmd_usb(struct wi_softc *wsc, int cmd, int val0, int val1, int val2) int err; DPRINTFN(5,("%s: %s: enter cmd=%x %x %x %x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, cmd, val0, val1, val2)); + sc->wi_usb_dev.dv_xname, __func__, cmd, val0, val1, val2)); if ((cmd & WI_CMD_CODE_MASK) == WI_CMD_TX) { return wi_send_packet(sc, val0); @@ -638,7 +638,7 @@ err_ret: wi_usb_ctl_unlock(sc); DPRINTFN(5,("%s: %s: exit err=%x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, err)); + sc->wi_usb_dev.dv_xname, __func__, err)); return err; } @@ -654,7 +654,7 @@ wi_read_record_usb(struct wi_softc *wsc, struct wi_ltv_gen *ltv) struct wi_ltv_gen *oltv, p2ltv; DPRINTFN(5,("%s: %s: enter rid=%x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, ltv->wi_type)); + sc->wi_usb_dev.dv_xname, __func__, ltv->wi_type)); /* Do we need to deal with these here, as in _io version? * WI_RID_ENCRYPTION -> WI_RID_P2_ENCRYPTION @@ -707,7 +707,7 @@ wi_read_record_usb(struct wi_softc *wsc, struct wi_ltv_gen *ltv) WI_USB_TX_TIMEOUT, wi_usb_txeof); DPRINTFN(10,("%s: %s: total_len=%x, wilen %d\n", - USBDEVNAME(sc->wi_usb_dev), __func__, total_len, ltv->wi_len)); + sc->wi_usb_dev.dv_xname, __func__, total_len, ltv->wi_len)); err = wi_usb_do_transmit_sync(sc, c, &sc->ridresperr); @@ -768,7 +768,7 @@ wi_read_record_usb(struct wi_softc *wsc, struct wi_ltv_gen *ltv) wi_usb_tx_unlock(sc); DPRINTFN(5,("%s: %s: exit err=%x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, err)); + sc->wi_usb_dev.dv_xname, __func__, err)); return err; } @@ -785,7 +785,7 @@ wi_write_record_usb(struct wi_softc *wsc, struct wi_ltv_gen *ltv) int i; DPRINTFN(5,("%s: %s: enter rid=%x wi_len %d copying %x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, ltv->wi_type, ltv->wi_len, + sc->wi_usb_dev.dv_xname, __func__, ltv->wi_type, ltv->wi_len, (ltv->wi_len-1)*2 )); /* Do we need to deal with these here, as in _io version? @@ -930,7 +930,7 @@ wi_write_record_usb(struct wi_softc *wsc, struct wi_ltv_gen *ltv) wi_usb_tx_unlock(sc); DPRINTFN(5,("%s: %s: exit err=%x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, err)); + sc->wi_usb_dev.dv_xname, __func__, err)); return err; } @@ -948,7 +948,7 @@ wi_alloc_nicmem_usb(struct wi_softc *wsc, int len, int *id) struct wi_usb_softc *sc = wsc->wi_usb_cdata; DPRINTFN(10,("%s: %s: enter len=%x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, len)); + sc->wi_usb_dev.dv_xname, __func__, len)); /* * NOTE THIS IS A USB DEVICE WHICH WILL LIKELY HAVE MANY @@ -985,7 +985,7 @@ wi_write_data_usb(struct wi_softc *wsc, int id, int off, caddr_t buf, int len) struct wi_usb_softc *sc = wsc->wi_usb_cdata; DPRINTFN(10,("%s: %s: id %x off %x len %d\n", - USBDEVNAME(sc->wi_usb_dev), __func__, id, off, len)); + sc->wi_usb_dev.dv_xname, __func__, id, off, len)); if (id < 0 && id >= sc->wi_usb_nummem) return EIO; @@ -995,7 +995,7 @@ wi_write_data_usb(struct wi_softc *wsc, int id, int off, caddr_t buf, int len) if (len + off > sc->wi_usb_txmemsize[id]) return EIO; DPRINTFN(10,("%s: %s: completed \n", - USBDEVNAME(sc->wi_usb_dev), __func__)); + sc->wi_usb_dev.dv_xname, __func__)); bcopy(buf, ptr, len); return 0; @@ -1012,7 +1012,7 @@ wi_read_data_usb(struct wi_softc *wsc, int id, int off, caddr_t buf, int len) struct wi_usb_softc *sc = wsc->wi_usb_cdata; DPRINTFN(10,("%s: %s: id %x off %x len %d\n", - USBDEVNAME(sc->wi_usb_dev), __func__, id, off, len)); + sc->wi_usb_dev.dv_xname, __func__, id, off, len)); if (id == 0x1001 && sc->wi_info != NULL) ptr = (u_int8_t *)sc->wi_info + off; @@ -1043,7 +1043,7 @@ wi_read_data_usb(struct wi_softc *wsc, int id, int off, caddr_t buf, int len) void wi_usb_stop(struct wi_usb_softc *sc) { - DPRINTFN(1,("%s: %s: enter\n", USBDEVNAME(sc->wi_usb_dev),__func__)); + DPRINTFN(1,("%s: %s: enter\n", sc->wi_usb_dev.dv_xname,__func__)); /* XXX */ /* Stop transfers */ @@ -1056,13 +1056,13 @@ wi_usb_do_transmit_sync(struct wi_usb_softc *sc, struct wi_usb_chain *c, usbd_status err; DPRINTFN(10,("%s: %s:\n", - USBDEVNAME(sc->wi_usb_dev), __func__)); + sc->wi_usb_dev.dv_xname, __func__)); sc->wi_usb_refcnt++; err = usbd_transfer(c->wi_usb_xfer); if (err != USBD_IN_PROGRESS && err != USBD_NORMAL_COMPLETION) { printf("%s: %s error=%s\n", - USBDEVNAME(sc->wi_usb_dev), __func__, + sc->wi_usb_dev.dv_xname, __func__, usbd_errstr(err)); /* Stop the interface from process context. */ wi_usb_stop(sc); @@ -1072,7 +1072,7 @@ wi_usb_do_transmit_sync(struct wi_usb_softc *sc, struct wi_usb_chain *c, err = tsleep(ident, PRIBIO, "wiTXsync", hz*1); if (err) { DPRINTFN(1,("%s: %s: err %x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, err)); + sc->wi_usb_dev.dv_xname, __func__, err)); err = ETIMEDOUT; } done: @@ -1101,7 +1101,7 @@ wi_usb_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, s = splnet(); - DPRINTFN(10,("%s: %s: enter status=%d\n", USBDEVNAME(sc->wi_usb_dev), + DPRINTFN(10,("%s: %s: enter status=%d\n", sc->wi_usb_dev.dv_xname, __func__, status)); if (status != USBD_NORMAL_COMPLETION) { @@ -1109,7 +1109,7 @@ wi_usb_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, splx(s); return; } - printf("%s: usb error on tx: %s\n", USBDEVNAME(sc->wi_usb_dev), + printf("%s: usb error on tx: %s\n", sc->wi_usb_dev.dv_xname, usbd_errstr(status)); if (status == USBD_STALLED) { sc->wi_usb_refcnt++; @@ -1147,7 +1147,7 @@ wi_usb_txeof_frm(usbd_xfer_handle xfer, usbd_private_handle priv, s = splnet(); - DPRINTFN(10,("%s: %s: enter status=%d\n", USBDEVNAME(sc->wi_usb_dev), + DPRINTFN(10,("%s: %s: enter status=%d\n", sc->wi_usb_dev.dv_xname, __func__, status)); if (status != USBD_NORMAL_COMPLETION) { @@ -1155,7 +1155,7 @@ wi_usb_txeof_frm(usbd_xfer_handle xfer, usbd_private_handle priv, splx(s); return; } - printf("%s: usb error on tx: %s\n", USBDEVNAME(sc->wi_usb_dev), + printf("%s: usb error on tx: %s\n", sc->wi_usb_dev.dv_xname, usbd_errstr(status)); if (status == USBD_STALLED) { sc->wi_usb_refcnt++; @@ -1187,7 +1187,7 @@ wi_usb_rx_list_init(struct wi_usb_softc *sc) struct wi_usb_chain *c; int i; - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->wi_usb_dev), __func__)); + DPRINTFN(10,("%s: %s: enter\n", sc->wi_usb_dev.dv_xname, __func__)); for (i = 0; i < WI_USB_RX_LIST_CNT; i++) { c = &sc->wi_usb_rx_chain[i]; @@ -1216,7 +1216,7 @@ wi_usb_tx_list_init(struct wi_usb_softc *sc) struct wi_usb_chain *c; int i; - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->wi_usb_dev), __func__)); + DPRINTFN(10,("%s: %s: enter\n", sc->wi_usb_dev.dv_xname, __func__)); for (i = 0; i < WI_USB_TX_LIST_CNT; i++) { c = &sc->wi_usb_tx_chain[i]; @@ -1248,7 +1248,7 @@ wi_usb_open_pipes(struct wi_usb_softc *sc) struct wi_usb_chain *c; int i; - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->wi_usb_dev),__func__)); + DPRINTFN(10,("%s: %s: enter\n", sc->wi_usb_dev.dv_xname,__func__)); sc->wi_usb_refcnt++; @@ -1257,7 +1257,7 @@ wi_usb_open_pipes(struct wi_usb_softc *sc) USBD_EXCLUSIVE_USE, &sc->wi_usb_ep[WI_USB_ENDPT_RX]); if (err) { printf("%s: open rx pipe failed: %s\n", - USBDEVNAME(sc->wi_usb_dev), usbd_errstr(err)); + sc->wi_usb_dev.dv_xname, usbd_errstr(err)); error = EIO; goto done; } @@ -1266,7 +1266,7 @@ wi_usb_open_pipes(struct wi_usb_softc *sc) USBD_EXCLUSIVE_USE, &sc->wi_usb_ep[WI_USB_ENDPT_TX]); if (err) { printf("%s: open tx pipe failed: %s\n", - USBDEVNAME(sc->wi_usb_dev), usbd_errstr(err)); + sc->wi_usb_dev.dv_xname, usbd_errstr(err)); error = EIO; goto done; } @@ -1278,7 +1278,7 @@ wi_usb_open_pipes(struct wi_usb_softc *sc) WI_USB_INTR_PKTLEN, wi_usb_intr, WI_USB_INTR_INTERVAL); if (err) { printf("%s: open intr pipe failed: %s\n", - USBDEVNAME(sc->wi_usb_dev), usbd_errstr(err)); + sc->wi_usb_dev.dv_xname, usbd_errstr(err)); error = EIO; goto done; } @@ -1290,7 +1290,7 @@ wi_usb_open_pipes(struct wi_usb_softc *sc) c, c->wi_usb_buf, WI_USB_BUFSZ, USBD_SHORT_XFER_OK | USBD_NO_COPY, USBD_NO_TIMEOUT, wi_usb_rxeof); - DPRINTFN(10,("%s: %s: start read\n", USBDEVNAME(sc->wi_usb_dev), + DPRINTFN(10,("%s: %s: start read\n", sc->wi_usb_dev.dv_xname, __func__)); usbd_transfer(c->wi_usb_xfer); } @@ -1334,7 +1334,7 @@ wi_usb_activate(device_ptr_t self, enum devact act) { struct wi_usb_softc *sc = (struct wi_usb_softc *)self; - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->wi_usb_dev), __func__)); + DPRINTFN(10,("%s: %s: enter\n", sc->wi_usb_dev.dv_xname, __func__)); switch (act) { case DVACT_ACTIVATE: @@ -1380,7 +1380,7 @@ wi_usb_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status if (sc->wi_usb_dying) return; - DPRINTFN(10,("%s: %s: enter status=%d\n", USBDEVNAME(sc->wi_usb_dev), + DPRINTFN(10,("%s: %s: enter status=%d\n", sc->wi_usb_dev.dv_xname, __func__, status)); @@ -1388,7 +1388,7 @@ wi_usb_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status if (status == USBD_NOT_STARTED || status == USBD_IOERROR || status == USBD_CANCELLED) { printf("%s: %u usb errors on rx: %s\n", - USBDEVNAME(sc->wi_usb_dev), 1, + sc->wi_usb_dev.dv_xname, 1, /* sc->wi_usb_rx_errs, */ usbd_errstr(status)); return; @@ -1397,7 +1397,7 @@ wi_usb_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status sc->wi_usb_rx_errs++; if (usbd_ratecheck(&sc->wi_usb_rx_notice)) { printf("%s: %u usb errors on rx: %s\n", - USBDEVNAME(sc->wi_usb_dev), sc->wi_usb_rx_errs, + sc->wi_usb_dev.dv_xname, sc->wi_usb_rx_errs, usbd_errstr(status)); sc->wi_usb_rx_errs = 0; } @@ -1432,7 +1432,7 @@ wi_usb_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status } if (WI_USB_ISTXFRM(rtype)) { DPRINTFN(2,("%s: %s: txfrm type %x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, rtype)); + sc->wi_usb_dev.dv_xname, __func__, rtype)); wi_usb_txfrm(sc, uin, total_len); goto done; } @@ -1441,7 +1441,7 @@ wi_usb_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status case WI_USB_INFOFRM: /* info packet, INFO_FID hmm */ DPRINTFN(10,("%s: %s: infofrm type %x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, rtype)); + sc->wi_usb_dev.dv_xname, __func__, rtype)); wi_usb_infofrm(c, total_len); break; case WI_USB_CMDRESP: @@ -1456,12 +1456,12 @@ wi_usb_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status case WI_USB_WMEMRESP: /* Not currently used */ DPRINTFN(2,("%s: %s: wmemresp type %x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, rtype)); + sc->wi_usb_dev.dv_xname, __func__, rtype)); break; case WI_USB_RMEMRESP: /* Not currently used */ DPRINTFN(2,("%s: %s: rmemresp type %x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, rtype)); + sc->wi_usb_dev.dv_xname, __func__, rtype)); break; case WI_USB_BUFAVAIL: printf("wi_usb: received USB_BUFAVAIL packet\n"); /* XXX */ @@ -1487,7 +1487,7 @@ wi_usb_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status if (--sc->wi_usb_refcnt < 0) usb_detach_wakeup(&sc->wi_usb_dev); - DPRINTFN(10,("%s: %s: start rx\n", USBDEVNAME(sc->wi_usb_dev), + DPRINTFN(10,("%s: %s: start rx\n", sc->wi_usb_dev.dv_xname, __func__)); } @@ -1496,7 +1496,7 @@ wi_usb_intr(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) { struct wi_usb_softc *sc = priv; - DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->wi_usb_dev), __func__)); + DPRINTFN(2,("%s: %s: enter\n", sc->wi_usb_dev.dv_xname, __func__)); if (sc->wi_usb_dying) return; @@ -1529,14 +1529,14 @@ wi_usb_cmdresp(struct wi_usb_chain *c) cmdresperr = letoh16(presp->resp0); DPRINTFN(10,("%s: %s: enter type=%x, status=%x, cmdresp=%x, " "resp=%x,%x,%x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, type, status, sc->cmdresp, + sc->wi_usb_dev.dv_xname, __func__, type, status, sc->cmdresp, cmdresperr, letoh16(presp->resp1), letoh16(presp->resp2))); /* XXX */ if (sc->cmdresp != (status & WI_STAT_CMD_CODE)) { DPRINTFN(1,("%s: cmd ty %x st %x cmd %x failed %x\n", - USBDEVNAME(sc->wi_usb_dev), + sc->wi_usb_dev.dv_xname, type, status, sc->cmdresp, cmdresperr)); return; } @@ -1561,13 +1561,13 @@ wi_usb_rridresp(struct wi_usb_chain *c) if (ltv == 0) { DPRINTFN(5,("%s: %s: enter ltv = 0 rid=%x len %d\n", - USBDEVNAME(sc->wi_usb_dev), __func__, rid, + sc->wi_usb_dev.dv_xname, __func__, rid, frmlen)); return; } DPRINTFN(5,("%s: %s: enter rid=%x expecting %x len %d exptlen %d\n", - USBDEVNAME(sc->wi_usb_dev), __func__, rid, ltv->wi_type, + sc->wi_usb_dev.dv_xname, __func__, rid, ltv->wi_type, frmlen, ltv->wi_len)); rid = letoh16(presp->rid); @@ -1587,7 +1587,7 @@ wi_usb_rridresp(struct wi_usb_chain *c) ltv->wi_len = frmlen; DPRINTFN(10,("%s: %s: copying %d frmlen %d\n", - USBDEVNAME(sc->wi_usb_dev), __func__, (ltv->wi_len-1)*2, + sc->wi_usb_dev.dv_xname, __func__, (ltv->wi_len-1)*2, frmlen)); if (ltv->wi_len > 1) @@ -1610,7 +1610,7 @@ wi_usb_wridresp(struct wi_usb_chain *c) status = letoh16(presp->status); DPRINTFN(10,("%s: %s: enter status=%x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, status)); + sc->wi_usb_dev.dv_xname, __func__, status)); sc->ridresperr = (status & WI_STAT_CMD_RESULT) >> 8; sc->ridltv = 0; @@ -1623,7 +1623,7 @@ wi_usb_infofrm(struct wi_usb_chain *c, int len) struct wi_usb_softc *sc = c->wi_usb_sc; DPRINTFN(10,("%s: %s: enter\n", - USBDEVNAME(sc->wi_usb_dev), __func__)); + sc->wi_usb_dev.dv_xname, __func__)); sc->wi_info = ((char *)c->wi_usb_buf) + 2; wi_update_stats(&sc->sc_wi); @@ -1643,7 +1643,7 @@ wi_usb_txfrm(struct wi_usb_softc *sc, wi_usb_usbin *uin, int total_len) DPRINTFN(2,("%s: %s: enter status=%d\n", - USBDEVNAME(sc->wi_usb_dev), __func__, status)); + sc->wi_usb_dev.dv_xname, __func__, status)); if (sc->txresp == WI_CMD_TX) { sc->txresperr=status; @@ -1653,7 +1653,7 @@ wi_usb_txfrm(struct wi_usb_softc *sc, wi_usb_usbin *uin, int total_len) if (status != 0) /* XXX */ wi_watchdog_usb(ifp); DPRINTFN(1,("%s: %s: txresp not expected status=%d \n", - USBDEVNAME(sc->wi_usb_dev), __func__, status)); + sc->wi_usb_dev.dv_xname, __func__, status)); } splx(s); @@ -1664,7 +1664,7 @@ wi_usb_rxfrm(struct wi_usb_softc *sc, wi_usb_usbin *uin, int total_len) int s; DPRINTFN(5,("%s: %s: enter len=%d\n", - USBDEVNAME(sc->wi_usb_dev), __func__, total_len)); + sc->wi_usb_dev.dv_xname, __func__, total_len)); s = splnet(); @@ -1683,7 +1683,7 @@ void wi_usb_start_thread(void *arg) { struct wi_usb_softc *sc = arg; - kthread_create (wi_usb_thread, arg, NULL, USBDEVNAME(sc->wi_usb_dev)); + kthread_create (wi_usb_thread, arg, NULL, sc->wi_usb_dev.dv_xname); } void @@ -1699,7 +1699,7 @@ wi_start_usb(struct ifnet *ifp) s = splnet(); DPRINTFN(5,("%s: %s:\n", - USBDEVNAME(sc->wi_usb_dev), __func__)); + sc->wi_usb_dev.dv_xname, __func__)); if (wi_usb_tx_lock_try(sc)) { /* lock acquired do start now */ @@ -1745,7 +1745,7 @@ wi_inquire_usb(void *xsc) s = splnet(); DPRINTFN(2,("%s: %s:\n", - USBDEVNAME(sc->wi_usb_dev), __func__)); + sc->wi_usb_dev.dv_xname, __func__)); sc->wi_thread_info->status |= WI_INQUIRE; @@ -1772,7 +1772,7 @@ wi_watchdog_usb(struct ifnet *ifp) s = splnet(); DPRINTFN(5,("%s: %s: ifp %x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, ifp)); + sc->wi_usb_dev.dv_xname, __func__, ifp)); sc->wi_thread_info->status |= WI_WATCHDOG; @@ -1834,13 +1834,13 @@ wi_usb_thread(void *arg) } DPRINTFN(5,("%s: %s: dying %x status %x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, + sc->wi_usb_dev.dv_xname, __func__, wi_thread_info->dying, wi_thread_info->status)); wi_usb_ctl_lock(sc); DPRINTFN(5,("%s: %s: starting %x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, + sc->wi_usb_dev.dv_xname, __func__, wi_thread_info->status)); s = splusb(); @@ -1862,7 +1862,7 @@ wi_usb_thread(void *arg) splx(s); DPRINTFN(5,("%s: %s: ending %x\n", - USBDEVNAME(sc->wi_usb_dev), __func__, + sc->wi_usb_dev.dv_xname, __func__, wi_thread_info->status)); wi_usb_ctl_unlock(sc); @@ -1883,7 +1883,7 @@ wi_usb_tx_lock_try(struct wi_usb_softc *sc) s = splnet(); - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->wi_usb_dev), __func__)); + DPRINTFN(10,("%s: %s: enter\n", sc->wi_usb_dev.dv_xname, __func__)); if (sc->wi_lock != 0) { return 0; /* failed to aquire lock */ @@ -1903,11 +1903,11 @@ wi_usb_tx_lock(struct wi_usb_softc *sc) s = splnet(); again: - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->wi_usb_dev), __func__)); + DPRINTFN(10,("%s: %s: enter\n", sc->wi_usb_dev.dv_xname, __func__)); if (sc->wi_lock != 0) { sc->wi_lockwait++; - DPRINTFN(10,("%s: %s: busy %d\n", USBDEVNAME(sc->wi_usb_dev), + DPRINTFN(10,("%s: %s: busy %d\n", sc->wi_usb_dev.dv_xname, __func__, sc->wi_lockwait )); tsleep(&sc->wi_lock, PRIBIO, "witxl", 0); } @@ -1930,11 +1930,11 @@ wi_usb_tx_unlock(struct wi_usb_softc *sc) sc->wi_lock = 0; - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->wi_usb_dev), __func__)); + DPRINTFN(10,("%s: %s: enter\n", sc->wi_usb_dev.dv_xname, __func__)); if (sc->wi_lockwait) { DPRINTFN(10,("%s: %s: waking\n", - USBDEVNAME(sc->wi_usb_dev), __func__)); + sc->wi_usb_dev.dv_xname, __func__)); sc->wi_lockwait = 0; wakeup(&sc->wi_lock); } @@ -1950,7 +1950,7 @@ wi_usb_ctl_lock(struct wi_usb_softc *sc) s = splnet(); again: - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->wi_usb_dev), + DPRINTFN(10,("%s: %s: enter\n", sc->wi_usb_dev.dv_xname, __func__)); if (sc->wi_ctllock != 0) { @@ -1961,7 +1961,7 @@ wi_usb_ctl_lock(struct wi_usb_softc *sc) return; } sc->wi_ctllockwait++; - DPRINTFN(10,("%s: %s: busy %d\n", USBDEVNAME(sc->wi_usb_dev), + DPRINTFN(10,("%s: %s: busy %d\n", sc->wi_usb_dev.dv_xname, __func__, sc->wi_ctllockwait )); tsleep(&sc->wi_ctllock, PRIBIO, "wiusbthr", 0); } @@ -1986,11 +1986,11 @@ wi_usb_ctl_unlock(struct wi_usb_softc *sc) sc->wi_ctllock--; - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->wi_usb_dev), __func__)); + DPRINTFN(10,("%s: %s: enter\n", sc->wi_usb_dev.dv_xname, __func__)); if (sc->wi_ctllock == 0 && sc->wi_ctllockwait) { DPRINTFN(10,("%s: %s: waking\n", - USBDEVNAME(sc->wi_usb_dev), __func__)); + sc->wi_usb_dev.dv_xname, __func__)); sc->wi_ctllockwait = 0; sc->wi_curproc = 0; wakeup(&sc->wi_ctllock); |