From 5059a3264c8cec37256a19faf558f2cbfb1dbd7c Mon Sep 17 00:00:00 2001 From: augustss Date: Mon, 8 Jul 2002 17:46:23 +0000 Subject: [PATCH] s/__FUNCTION__/__func__/ --- sys/dev/usb/if_aue.c | 62 ++++++++++++------------ sys/dev/usb/if_cue.c | 30 ++++++------ sys/dev/usb/if_kue.c | 50 +++++++++---------- sys/dev/usb/if_upl.c | 40 ++++++++-------- sys/dev/usb/if_url.c | 98 +++++++++++++++++++------------------- sys/dev/usb/uirda.c | 38 +++++++-------- sys/dev/usb/umass_isdata.c | 42 ++++++++-------- sys/dev/usb/ustir.c | 84 ++++++++++++++++---------------- 8 files changed, 222 insertions(+), 222 deletions(-) diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index d2b83237f651..5c858174b19f 100644 --- a/sys/dev/usb/if_aue.c +++ b/sys/dev/usb/if_aue.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_aue.c,v 1.77 2002/07/08 09:00:56 rh Exp $ */ +/* $NetBSD: if_aue.c,v 1.78 2002/07/08 17:46:23 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul . All rights reserved. @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.77 2002/07/08 09:00:56 rh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.78 2002/07/08 17:46:23 augustss Exp $"); #if defined(__NetBSD__) #include "opt_inet.h" @@ -413,7 +413,7 @@ aue_read_mac(struct aue_softc *sc, u_char *dest) int off = 0; int word; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __func__)); for (i = 0; i < 3; i++) { word = aue_eeprom_getword(sc, off + i); @@ -486,7 +486,7 @@ aue_miibus_readreg(device_ptr_t dev, int phy, int reg) val = aue_csr_read_2(sc, AUE_PHY_DATA); DPRINTFN(11,("%s: %s: phy=%d reg=%d => 0x%04x\n", - USBDEVNAME(sc->aue_dev), __FUNCTION__, phy, reg, val)); + USBDEVNAME(sc->aue_dev), __func__, phy, reg, val)); aue_unlock_mii(sc); return (val); @@ -507,7 +507,7 @@ aue_miibus_writereg(device_ptr_t dev, int phy, int reg, int data) #endif DPRINTFN(11,("%s: %s: phy=%d reg=%d data=0x%04x\n", - USBDEVNAME(sc->aue_dev), __FUNCTION__, phy, reg, data)); + USBDEVNAME(sc->aue_dev), __func__, phy, reg, data)); aue_lock_mii(sc); aue_csr_write_2(sc, AUE_PHY_DATA, data); @@ -532,7 +532,7 @@ aue_miibus_statchg(device_ptr_t dev) struct aue_softc *sc = USBGETSOFTC(dev); struct mii_data *mii = GET_MII(sc); - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __func__)); aue_lock_mii(sc); AUE_CLRBIT(sc, AUE_CTL0, AUE_CTL0_RX_ENB | AUE_CTL0_TX_ENB); @@ -561,7 +561,7 @@ aue_miibus_statchg(device_ptr_t dev) auxmode = aue_miibus_readreg(dev, 0, 0x1b); aue_miibus_writereg(dev, 0, 0x1b, auxmode | 0x04); } - DPRINTFN(5,("%s: %s: exit\n", USBDEVNAME(sc->aue_dev), __FUNCTION__)); + DPRINTFN(5,("%s: %s: exit\n", USBDEVNAME(sc->aue_dev), __func__)); } #define AUE_POLY 0xEDB88320 @@ -591,7 +591,7 @@ aue_setmulti(struct aue_softc *sc) struct ether_multistep step; u_int32_t h = 0, i; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __func__)); ifp = GET_IFP(sc); @@ -646,7 +646,7 @@ aue_reset(struct aue_softc *sc) { int i; - DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __FUNCTION__)); + DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __func__)); AUE_SETBIT(sc, AUE_CTL1, AUE_CTL1_RESETMAC); @@ -857,7 +857,7 @@ USB_DETACH(aue) struct ifnet *ifp = GET_IFP(sc); int s; - DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __FUNCTION__)); + DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __func__)); if (!sc->aue_attached) { /* Detached before attached finished, so just bail out. */ @@ -915,7 +915,7 @@ aue_activate(device_ptr_t self, enum devact act) { struct aue_softc *sc = (struct aue_softc *)self; - DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __FUNCTION__)); + DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __func__)); switch (act) { case DVACT_ACTIVATE: @@ -938,7 +938,7 @@ aue_newbuf(struct aue_softc *sc, struct aue_chain *c, struct mbuf *m) { struct mbuf *m_new = NULL; - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev),__FUNCTION__)); + DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev),__func__)); if (m == NULL) { MGETHDR(m_new, M_DONTWAIT, MT_DATA); @@ -975,7 +975,7 @@ aue_rx_list_init(struct aue_softc *sc) struct aue_chain *c; int i; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __func__)); cd = &sc->aue_cdata; for (i = 0; i < AUE_RX_LIST_CNT; i++) { @@ -1004,7 +1004,7 @@ aue_tx_list_init(struct aue_softc *sc) struct aue_chain *c; int i; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __func__)); cd = &sc->aue_cdata; for (i = 0; i < AUE_TX_LIST_CNT; i++) { @@ -1032,7 +1032,7 @@ aue_intr(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) struct ifnet *ifp = GET_IFP(sc); struct aue_intrpkt *p = &sc->aue_cdata.aue_ibuf; - DPRINTFN(15,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev),__FUNCTION__)); + DPRINTFN(15,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev),__func__)); if (sc->aue_dying) return; @@ -1078,7 +1078,7 @@ aue_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) struct aue_rxpkt r; int s; - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev),__FUNCTION__)); + DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev),__func__)); if (sc->aue_dying) return; @@ -1147,7 +1147,7 @@ aue_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) #endif DPRINTFN(10,("%s: %s: deliver %d\n", USBDEVNAME(sc->aue_dev), - __FUNCTION__, m->m_len)); + __func__, m->m_len)); IF_INPUT(ifp, m); done1: splx(s); @@ -1162,7 +1162,7 @@ aue_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) usbd_transfer(xfer); DPRINTFN(10,("%s: %s: start rx\n", USBDEVNAME(sc->aue_dev), - __FUNCTION__)); + __func__)); } /* @@ -1184,7 +1184,7 @@ aue_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) s = splnet(); DPRINTFN(10,("%s: %s: enter status=%d\n", USBDEVNAME(sc->aue_dev), - __FUNCTION__, status)); + __func__, status)); ifp->if_timer = 0; ifp->if_flags &= ~IFF_OACTIVE; @@ -1219,7 +1219,7 @@ aue_tick(void *xsc) { struct aue_softc *sc = xsc; - DPRINTFN(15,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev),__FUNCTION__)); + DPRINTFN(15,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev),__func__)); if (sc == NULL) return; @@ -1239,7 +1239,7 @@ aue_tick_task(void *xsc) struct mii_data *mii; int s; - DPRINTFN(15,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev),__FUNCTION__)); + DPRINTFN(15,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev),__func__)); if (sc->aue_dying) return; @@ -1257,7 +1257,7 @@ aue_tick_task(void *xsc) if (mii->mii_media_status & IFM_ACTIVE && IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) { DPRINTFN(2,("%s: %s: got link\n", - USBDEVNAME(sc->aue_dev),__FUNCTION__)); + USBDEVNAME(sc->aue_dev),__func__)); sc->aue_link++; if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) aue_start(ifp); @@ -1276,7 +1276,7 @@ aue_send(struct aue_softc *sc, struct mbuf *m, int idx) struct aue_chain *c; usbd_status err; - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev),__FUNCTION__)); + DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev),__func__)); c = &sc->aue_cdata.aue_tx_chain[idx]; @@ -1311,7 +1311,7 @@ aue_send(struct aue_softc *sc, struct mbuf *m, int idx) return (EIO); } DPRINTFN(5,("%s: %s: send %d bytes\n", USBDEVNAME(sc->aue_dev), - __FUNCTION__, total_len)); + __func__, total_len)); sc->aue_cdata.aue_tx_cnt++; @@ -1325,7 +1325,7 @@ aue_start(struct ifnet *ifp) struct mbuf *m_head = NULL; DPRINTFN(5,("%s: %s: enter, link=%d\n", USBDEVNAME(sc->aue_dev), - __FUNCTION__, sc->aue_link)); + __func__, sc->aue_link)); if (sc->aue_dying) return; @@ -1373,7 +1373,7 @@ aue_init(void *xsc) int i, s; u_char *eaddr; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __func__)); if (sc->aue_dying) return; @@ -1482,7 +1482,7 @@ aue_openpipes(struct aue_softc *sc) aue_rxeof); (void)usbd_transfer(c->aue_xfer); /* XXX */ DPRINTFN(5,("%s: %s: start read\n", USBDEVNAME(sc->aue_dev), - __FUNCTION__)); + __func__)); } return (0); @@ -1497,7 +1497,7 @@ aue_ifmedia_upd(struct ifnet *ifp) struct aue_softc *sc = ifp->if_softc; struct mii_data *mii = GET_MII(sc); - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __func__)); if (sc->aue_dying) return (0); @@ -1523,7 +1523,7 @@ aue_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) struct aue_softc *sc = ifp->if_softc; struct mii_data *mii = GET_MII(sc); - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __func__)); mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; @@ -1637,7 +1637,7 @@ aue_watchdog(struct ifnet *ifp) usbd_status stat; int s; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __func__)); ifp->if_oerrors++; printf("%s: watchdog timeout\n", USBDEVNAME(sc->aue_dev)); @@ -1663,7 +1663,7 @@ aue_stop(struct aue_softc *sc) struct ifnet *ifp; int i; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->aue_dev), __func__)); ifp = GET_IFP(sc); ifp->if_timer = 0; diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index 9afd1061e3a7..1f94f40fe00f 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_cue.c,v 1.38 2001/12/12 15:36:08 augustss Exp $ */ +/* $NetBSD: if_cue.c,v 1.39 2002/07/08 17:46:24 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul . All rights reserved. @@ -56,7 +56,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.38 2001/12/12 15:36:08 augustss Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.39 2002/07/08 17:46:24 augustss Exp $"); #if defined(__NetBSD__) #include "opt_inet.h" @@ -602,7 +602,7 @@ USB_DETACH(cue) struct ifnet *ifp = GET_IFP(sc); int s; - DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->cue_dev), __FUNCTION__)); + DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->cue_dev), __func__)); usb_uncallout(sc->cue_stat_ch, cue_tick, sc); /* @@ -653,7 +653,7 @@ cue_activate(device_ptr_t self, enum devact act) { struct cue_softc *sc = (struct cue_softc *)self; - DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->cue_dev), __FUNCTION__)); + DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->cue_dev), __func__)); switch (act) { case DVACT_ACTIVATE: @@ -778,7 +778,7 @@ cue_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) int s; DPRINTFN(10,("%s: %s: enter status=%d\n", USBDEVNAME(sc->cue_dev), - __FUNCTION__, status)); + __func__, status)); if (sc->cue_dying) return; @@ -842,7 +842,7 @@ cue_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) #endif DPRINTFN(10,("%s: %s: deliver %d\n", USBDEVNAME(sc->cue_dev), - __FUNCTION__, m->m_len)); + __func__, m->m_len)); IF_INPUT(ifp, m); done1: splx(s); @@ -855,7 +855,7 @@ done: usbd_transfer(c->cue_xfer); DPRINTFN(10,("%s: %s: start rx\n", USBDEVNAME(sc->cue_dev), - __FUNCTION__)); + __func__)); } /* @@ -876,7 +876,7 @@ cue_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) s = splnet(); DPRINTFN(10,("%s: %s: enter status=%d\n", USBDEVNAME(sc->cue_dev), - __FUNCTION__, status)); + __func__, status)); ifp->if_timer = 0; ifp->if_flags &= ~IFF_OACTIVE; @@ -917,7 +917,7 @@ cue_tick(void *xsc) if (sc->cue_dying) return; - DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->cue_dev), __FUNCTION__)); + DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->cue_dev), __func__)); /* Perform statistics update in process context. */ usb_add_task(sc->cue_udev, &sc->cue_tick_task); @@ -932,7 +932,7 @@ cue_tick_task(void *xsc) if (sc->cue_dying) return; - DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->cue_dev), __FUNCTION__)); + DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->cue_dev), __func__)); ifp = GET_IFP(sc); @@ -963,7 +963,7 @@ cue_send(struct cue_softc *sc, struct mbuf *m, int idx) total_len = m->m_pkthdr.len + 2; DPRINTFN(10,("%s: %s: total_len=%d\n", - USBDEVNAME(sc->cue_dev), __FUNCTION__, total_len)); + USBDEVNAME(sc->cue_dev), __func__, total_len)); /* The first two bytes are the frame length */ c->cue_buf[0] = (u_int8_t)m->m_pkthdr.len; @@ -997,7 +997,7 @@ cue_start(struct ifnet *ifp) if (sc->cue_dying) return; - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->cue_dev),__FUNCTION__)); + DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->cue_dev),__func__)); if (ifp->if_flags & IFF_OACTIVE) return; @@ -1041,7 +1041,7 @@ cue_init(void *xsc) if (sc->cue_dying) return; - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->cue_dev),__FUNCTION__)); + DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->cue_dev),__func__)); if (ifp->if_flags & IFF_RUNNING) return; @@ -1253,7 +1253,7 @@ cue_watchdog(struct ifnet *ifp) usbd_status stat; int s; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->cue_dev),__FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->cue_dev),__func__)); if (sc->cue_dying) return; @@ -1282,7 +1282,7 @@ cue_stop(struct cue_softc *sc) struct ifnet *ifp; int i; - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->cue_dev),__FUNCTION__)); + DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->cue_dev),__func__)); ifp = GET_IFP(sc); ifp->if_timer = 0; diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c index 528bbeb2dc9b..9dc1663fd4d7 100644 --- a/sys/dev/usb/if_kue.c +++ b/sys/dev/usb/if_kue.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_kue.c,v 1.47 2002/03/17 18:02:52 augustss Exp $ */ +/* $NetBSD: if_kue.c,v 1.48 2002/07/08 17:46:24 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul . All rights reserved. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.47 2002/03/17 18:02:52 augustss Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.48 2002/07/08 17:46:24 augustss Exp $"); #if defined(__NetBSD__) #include "opt_inet.h" @@ -211,7 +211,7 @@ kue_setword(struct kue_softc *sc, u_int8_t breq, u_int16_t word) { usb_device_request_t req; - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev),__FUNCTION__)); + DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev),__func__)); req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = breq; @@ -229,7 +229,7 @@ kue_ctl(struct kue_softc *sc, int rw, u_int8_t breq, u_int16_t val, usb_device_request_t req; DPRINTFN(10,("%s: %s: enter, len=%d\n", USBDEVNAME(sc->kue_dev), - __FUNCTION__, len)); + __func__, len)); if (rw == KUE_CTL_WRITE) req.bmRequestType = UT_WRITE_VENDOR_DEVICE; @@ -250,7 +250,7 @@ kue_load_fw(struct kue_softc *sc) usb_device_descriptor_t dd; usbd_status err; - DPRINTFN(1,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev), __FUNCTION__)); + DPRINTFN(1,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev), __func__)); /* * First, check if we even need to load the firmware. @@ -322,7 +322,7 @@ kue_load_fw(struct kue_softc *sc) */ (void)usbd_reload_device_desc(sc->kue_udev); - DPRINTFN(1,("%s: %s: done\n", USBDEVNAME(sc->kue_dev), __FUNCTION__)); + DPRINTFN(1,("%s: %s: done\n", USBDEVNAME(sc->kue_dev), __func__)); /* Reset the adapter. */ kue_reset(sc); @@ -338,7 +338,7 @@ kue_setmulti(struct kue_softc *sc) struct ether_multistep step; int i; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev), __FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev), __func__)); if (ifp->if_flags & IFF_PROMISC) { allmulti: @@ -387,7 +387,7 @@ kue_reset(struct kue_softc *sc) { usbd_status err; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev), __FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev), __func__)); err = usbd_set_config_no(sc->kue_udev, KUE_CONFIG_NO, 1); if (err) @@ -596,7 +596,7 @@ kue_activate(device_ptr_t self, enum devact act) { struct kue_softc *sc = (struct kue_softc *)self; - DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev), __FUNCTION__)); + DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev), __func__)); switch (act) { case DVACT_ACTIVATE: @@ -622,7 +622,7 @@ kue_newbuf(struct kue_softc *sc, struct kue_chain *c, struct mbuf *m) { struct mbuf *m_new = NULL; - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev),__FUNCTION__)); + DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev),__func__)); if (m == NULL) { MGETHDR(m_new, M_DONTWAIT, MT_DATA); @@ -658,7 +658,7 @@ kue_rx_list_init(struct kue_softc *sc) struct kue_chain *c; int i; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev), __FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev), __func__)); cd = &sc->kue_cdata; for (i = 0; i < KUE_RX_LIST_CNT; i++) { @@ -687,7 +687,7 @@ kue_tx_list_init(struct kue_softc *sc) struct kue_chain *c; int i; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev), __FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev), __func__)); cd = &sc->kue_cdata; for (i = 0; i < KUE_TX_LIST_CNT; i++) { @@ -723,7 +723,7 @@ kue_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) int s; DPRINTFN(10,("%s: %s: enter status=%d\n", USBDEVNAME(sc->kue_dev), - __FUNCTION__, status)); + __func__, status)); if (sc->kue_dying) return; @@ -749,7 +749,7 @@ kue_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) usbd_get_xfer_status(xfer, NULL, NULL, &total_len, NULL); DPRINTFN(10,("%s: %s: total_len=%d len=%d\n", USBDEVNAME(sc->kue_dev), - __FUNCTION__, total_len, + __func__, total_len, UGETW(mtod(c->kue_mbuf, u_int8_t *)))); if (total_len <= 1) @@ -793,7 +793,7 @@ kue_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) #endif DPRINTFN(10,("%s: %s: deliver %d\n", USBDEVNAME(sc->kue_dev), - __FUNCTION__, m->m_len)); + __func__, m->m_len)); IF_INPUT(ifp, m); done1: splx(s); @@ -807,7 +807,7 @@ kue_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) usbd_transfer(c->kue_xfer); DPRINTFN(10,("%s: %s: start rx\n", USBDEVNAME(sc->kue_dev), - __FUNCTION__)); + __func__)); } /* @@ -829,7 +829,7 @@ kue_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) s = splnet(); DPRINTFN(10,("%s: %s: enter status=%d\n", USBDEVNAME(sc->kue_dev), - __FUNCTION__, status)); + __func__, status)); ifp->if_timer = 0; ifp->if_flags &= ~IFF_OACTIVE; @@ -866,7 +866,7 @@ kue_send(struct kue_softc *sc, struct mbuf *m, int idx) struct kue_chain *c; usbd_status err; - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev),__FUNCTION__)); + DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev),__func__)); c = &sc->kue_cdata.kue_tx_chain[idx]; @@ -909,7 +909,7 @@ kue_start(struct ifnet *ifp) struct kue_softc *sc = ifp->if_softc; struct mbuf *m_head = NULL; - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev),__FUNCTION__)); + DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev),__func__)); if (sc->kue_dying) return; @@ -953,7 +953,7 @@ kue_init(void *xsc) int s; u_char *eaddr; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev),__FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev),__func__)); if (ifp->if_flags & IFF_RUNNING) return; @@ -1023,7 +1023,7 @@ kue_open_pipes(struct kue_softc *sc) struct kue_chain *c; int i; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev),__FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev),__func__)); /* Open RX and TX pipes. */ err = usbd_open_pipe(sc->kue_iface, sc->kue_ed[KUE_ENDPT_RX], @@ -1050,7 +1050,7 @@ kue_open_pipes(struct kue_softc *sc) USBD_SHORT_XFER_OK | USBD_NO_COPY, USBD_NO_TIMEOUT, kue_rxeof); DPRINTFN(5,("%s: %s: start read\n", USBDEVNAME(sc->kue_dev), - __FUNCTION__)); + __func__)); usbd_transfer(c->kue_xfer); } @@ -1065,7 +1065,7 @@ kue_ioctl(struct ifnet *ifp, u_long command, caddr_t data) struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev),__FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev),__func__)); if (sc->kue_dying) return (EIO); @@ -1165,7 +1165,7 @@ kue_watchdog(struct ifnet *ifp) usbd_status stat; int s; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev),__FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev),__func__)); if (sc->kue_dying) return; @@ -1194,7 +1194,7 @@ kue_stop(struct kue_softc *sc) struct ifnet *ifp; int i; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev),__FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->kue_dev),__func__)); ifp = GET_IFP(sc); ifp->if_timer = 0; diff --git a/sys/dev/usb/if_upl.c b/sys/dev/usb/if_upl.c index fb8409f7efdd..0493aa7c856c 100644 --- a/sys/dev/usb/if_upl.c +++ b/sys/dev/usb/if_upl.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_upl.c,v 1.17 2002/03/05 04:12:59 itojun Exp $ */ +/* $NetBSD: if_upl.c,v 1.18 2002/07/08 17:46:24 augustss Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. * All rights reserved. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.17 2002/03/05 04:12:59 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.18 2002/07/08 17:46:24 augustss Exp $"); #include "opt_inet.h" #include "opt_ns.h" @@ -346,7 +346,7 @@ USB_DETACH(upl) struct ifnet *ifp = &sc->sc_if; int s; - DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); s = splusb(); @@ -390,7 +390,7 @@ upl_activate(device_ptr_t self, enum devact act) { struct upl_softc *sc = (struct upl_softc *)self; - DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + DPRINTFN(2,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); switch (act) { case DVACT_ACTIVATE: @@ -414,7 +414,7 @@ upl_newbuf(struct upl_softc *sc, struct upl_chain *c, struct mbuf *m) { struct mbuf *m_new = NULL; - DPRINTFN(8,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + DPRINTFN(8,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); if (m == NULL) { MGETHDR(m_new, M_DONTWAIT, MT_DATA); @@ -450,7 +450,7 @@ upl_rx_list_init(struct upl_softc *sc) struct upl_chain *c; int i; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); cd = &sc->sc_cdata; for (i = 0; i < UPL_RX_LIST_CNT; i++) { @@ -481,7 +481,7 @@ upl_tx_list_init(struct upl_softc *sc) struct upl_chain *c; int i; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); cd = &sc->sc_cdata; for (i = 0; i < UPL_TX_LIST_CNT; i++) { @@ -542,7 +542,7 @@ upl_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) usbd_get_xfer_status(xfer, NULL, NULL, &total_len, NULL); DPRINTFN(9,("%s: %s: enter status=%d length=%d\n", - USBDEVNAME(sc->sc_dev), __FUNCTION__, status, total_len)); + USBDEVNAME(sc->sc_dev), __func__, status, total_len)); m = c->upl_mbuf; memcpy(mtod(c->upl_mbuf, char *), c->upl_buf, total_len); @@ -573,7 +573,7 @@ upl_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) #endif DPRINTFN(10,("%s: %s: deliver %d\n", USBDEVNAME(sc->sc_dev), - __FUNCTION__, m->m_len)); + __func__, m->m_len)); IF_INPUT(ifp, m); @@ -589,7 +589,7 @@ upl_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) usbd_transfer(c->upl_xfer); DPRINTFN(10,("%s: %s: start rx\n", USBDEVNAME(sc->sc_dev), - __FUNCTION__)); + __func__)); #endif } @@ -611,7 +611,7 @@ upl_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) s = splnet(); DPRINTFN(10,("%s: %s: enter status=%d\n", USBDEVNAME(sc->sc_dev), - __FUNCTION__, status)); + __func__, status)); ifp->if_timer = 0; ifp->if_flags &= ~IFF_OACTIVE; @@ -660,7 +660,7 @@ upl_send(struct upl_softc *sc, struct mbuf *m, int idx) total_len = m->m_pkthdr.len; DPRINTFN(10,("%s: %s: total_len=%d\n", - USBDEVNAME(sc->sc_dev), __FUNCTION__, total_len)); + USBDEVNAME(sc->sc_dev), __func__, total_len)); usbd_setup_xfer(c->upl_xfer, sc->sc_ep[UPL_ENDPT_TX], c, c->upl_buf, total_len, USBD_NO_COPY, USBD_DEFAULT_TIMEOUT, @@ -689,7 +689,7 @@ upl_start(struct ifnet *ifp) if (sc->sc_dying) return; - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev),__FUNCTION__)); + DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev),__func__)); if (ifp->if_flags & IFF_OACTIVE) return; @@ -732,7 +732,7 @@ upl_init(void *xsc) if (sc->sc_dying) return; - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev),__FUNCTION__)); + DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev),__func__)); if (ifp->if_flags & IFF_RUNNING) return; @@ -821,7 +821,7 @@ upl_intr(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) struct ifnet *ifp = &sc->sc_if; uByte stat; - DPRINTFN(15,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev),__FUNCTION__)); + DPRINTFN(15,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev),__func__)); if (sc->sc_dying) return; @@ -851,7 +851,7 @@ upl_intr(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) return; DPRINTFN(10,("%s: %s: stat=0x%02x\n", USBDEVNAME(sc->sc_dev), - __FUNCTION__, stat)); + __func__, stat)); } @@ -867,7 +867,7 @@ upl_ioctl(struct ifnet *ifp, u_long command, caddr_t data) return (EIO); DPRINTFN(5,("%s: %s: cmd=0x%08lx\n", - USBDEVNAME(sc->sc_dev), __FUNCTION__, command)); + USBDEVNAME(sc->sc_dev), __func__, command)); s = splnet(); @@ -931,7 +931,7 @@ upl_watchdog(struct ifnet *ifp) { struct upl_softc *sc = ifp->if_softc; - DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev),__FUNCTION__)); + DPRINTFN(5,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev),__func__)); if (sc->sc_dying) return; @@ -957,7 +957,7 @@ upl_stop(struct upl_softc *sc) struct ifnet *ifp; int i; - DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev),__FUNCTION__)); + DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(sc->sc_dev),__func__)); ifp = &sc->sc_if; ifp->if_timer = 0; @@ -1041,7 +1041,7 @@ upl_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, DPRINTFN(10,("%s: %s: enter\n", USBDEVNAME(((struct upl_softc *)ifp->if_softc)->sc_dev), - __FUNCTION__)); + __func__)); /* * if the queueing discipline needs packet classification, diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c index a4721e3f33fd..970c47683e58 100644 --- a/sys/dev/usb/if_url.c +++ b/sys/dev/usb/if_url.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_url.c,v 1.3 2002/05/13 12:10:04 augustss Exp $ */ +/* $NetBSD: if_url.c,v 1.4 2002/07/08 17:46:24 augustss Exp $ */ /* * Copyright (c) 2001, 2002 * Shingo WATANABE . All rights reserved. @@ -46,7 +46,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.3 2002/05/13 12:10:04 augustss Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.4 2002/07/08 17:46:24 augustss Exp $"); #include "opt_inet.h" #include "opt_ns.h" @@ -332,7 +332,7 @@ USB_DETACH(url) struct ifnet *ifp = GET_IFP(sc); int s; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); /* Detached before attached finished */ if (!sc->sc_attached) @@ -395,7 +395,7 @@ url_mem(struct url_softc *sc, int cmd, int offset, void *buf, int len) return (0); DPRINTFN(0x200, - ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); if (sc->sc_dying) return (0); @@ -430,7 +430,7 @@ url_csr_read_1(struct url_softc *sc, int reg) u_int8_t val = 0; DPRINTFN(0x100, - ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); if (sc->sc_dying) return (0); @@ -445,7 +445,7 @@ url_csr_read_2(struct url_softc *sc, int reg) uWord val; DPRINTFN(0x100, - ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); if (sc->sc_dying) return (0); @@ -461,7 +461,7 @@ url_csr_write_1(struct url_softc *sc, int reg, int aval) u_int8_t val = aval; DPRINTFN(0x100, - ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); if (sc->sc_dying) return (0); @@ -476,7 +476,7 @@ url_csr_write_2(struct url_softc *sc, int reg, int aval) uWord val; DPRINTFN(0x100, - ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); USETW(val, aval); @@ -493,7 +493,7 @@ url_csr_write_4(struct url_softc *sc, int reg, int aval) uDWord val; DPRINTFN(0x100, - ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); USETDW(val, aval); @@ -511,7 +511,7 @@ url_init(struct ifnet *ifp) u_char *eaddr; int i, s; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); if (sc->sc_dying) return (EIO); @@ -589,7 +589,7 @@ url_reset(struct url_softc *sc) { int i; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); if (sc->sc_dying) return; @@ -611,7 +611,7 @@ url_activate(device_ptr_t self, enum devact act) struct url_softc *sc = (struct url_softc *)self; DPRINTF(("%s: %s: enter, act=%d\n", USBDEVNAME(sc->sc_dev), - __FUNCTION__, act)); + __func__, act)); switch (act) { case DVACT_ACTIVATE: @@ -640,7 +640,7 @@ url_setmulti(struct url_softc *sc) int h = 0; int mcnt = 0; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); if (sc->sc_dying) return; @@ -749,7 +749,7 @@ url_openpipes(struct url_softc *sc) USBD_NO_TIMEOUT, url_rxeof); (void)usbd_transfer(c->url_xfer); DPRINTF(("%s: %s: start read\n", USBDEVNAME(sc->sc_dev), - __FUNCTION__)); + __func__)); } done: @@ -764,7 +764,7 @@ url_newbuf(struct url_softc *sc, struct url_chain *c, struct mbuf *m) { struct mbuf *m_new = NULL; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); if (m == NULL) { MGETHDR(m_new, M_DONTWAIT, MT_DATA); @@ -801,7 +801,7 @@ url_rx_list_init(struct url_softc *sc) struct url_chain *c; int i; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); cd = &sc->sc_cdata; for (i = 0; i < URL_RX_LIST_CNT; i++) { @@ -832,7 +832,7 @@ url_tx_list_init(struct url_softc *sc) struct url_chain *c; int i; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); cd = &sc->sc_cdata; for (i = 0; i < URL_TX_LIST_CNT; i++) { @@ -862,7 +862,7 @@ url_start(struct ifnet *ifp) struct mbuf *m_head = NULL; DPRINTF(("%s: %s: enter, link=%d\n", USBDEVNAME(sc->sc_dev), - __FUNCTION__, sc->sc_link)); + __func__, sc->sc_link)); if (sc->sc_dying) return; @@ -902,7 +902,7 @@ url_send(struct url_softc *sc, struct mbuf *m, int idx) struct url_chain *c; usbd_status err; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev),__FUNCTION__)); + DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev),__func__)); c = &sc->sc_cdata.url_tx_chain[idx]; @@ -931,7 +931,7 @@ url_send(struct url_softc *sc, struct mbuf *m, int idx) } DPRINTF(("%s: %s: send %d bytes\n", USBDEVNAME(sc->sc_dev), - __FUNCTION__, total_len)); + __func__, total_len)); sc->sc_cdata.url_tx_cnt++; @@ -951,7 +951,7 @@ url_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) s = splnet(); - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); ifp->if_timer = 0; ifp->if_flags &= ~IFF_OACTIVE; @@ -996,7 +996,7 @@ url_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) url_rxhdr_t rxhdr; int s; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev),__FUNCTION__)); + DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev),__func__)); if (sc->sc_dying) return; @@ -1064,7 +1064,7 @@ url_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) #endif DPRINTF(("%s: %s: deliver %d\n", USBDEVNAME(sc->sc_dev), - __FUNCTION__, m->m_len)); + __func__, m->m_len)); IF_INPUT(ifp, m); done1: @@ -1080,7 +1080,7 @@ url_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) if (--sc->sc_refcnt < 0) usb_detach_wakeup(USBDEV(sc->sc_dev)); - DPRINTF(("%s: %s: start rx\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + DPRINTF(("%s: %s: start rx\n", USBDEVNAME(sc->sc_dev), __func__)); } #if 0 @@ -1097,7 +1097,7 @@ url_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), __FUNCTION__)); + DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); if (sc->sc_dying) return (EIO); @@ -1133,7 +1133,7 @@ url_watchdog(struct ifnet *ifp) usbd_status stat; int s; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); ifp->if_oerrors++; printf("%s: watchdog timeout\n", USBDEVNAME(sc->sc_dev)); @@ -1162,7 +1162,7 @@ url_stop(struct ifnet *ifp, int disable) usbd_status err; int i; - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); ifp->if_timer = 0; @@ -1248,7 +1248,7 @@ url_ifmedia_change(struct ifnet *ifp) struct url_softc *sc = ifp->if_softc; struct mii_data *mii = GET_MII(sc); - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); if (sc->sc_dying) return (0); @@ -1271,7 +1271,7 @@ url_ifmedia_status(struct ifnet *ifp, struct ifmediareq *ifmr) struct url_softc *sc = ifp->if_softc; struct mii_data *mii = GET_MII(sc); - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); if (sc->sc_dying) return; @@ -1296,7 +1296,7 @@ url_tick(void *xsc) return; DPRINTFN(0xff, ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), - __FUNCTION__)); + __func__)); if (sc->sc_dying) return; @@ -1317,7 +1317,7 @@ url_tick_task(void *xsc) return; DPRINTFN(0xff, ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), - __FUNCTION__)); + __func__)); if (sc->sc_dying) return; @@ -1336,7 +1336,7 @@ url_tick_task(void *xsc) if (mii->mii_media_status & IFM_ACTIVE && IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) { DPRINTF(("%s: %s: got link\n", - USBDEVNAME(sc->sc_dev), __FUNCTION__)); + USBDEVNAME(sc->sc_dev), __func__)); sc->sc_link++; if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) url_start(ifp); @@ -1353,7 +1353,7 @@ Static void url_lock_mii(struct url_softc *sc) { DPRINTFN(0xff, ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), - __FUNCTION__)); + __func__)); sc->sc_refcnt++; lockmgr(&sc->sc_mii_lock, LK_EXCLUSIVE, NULL); @@ -1363,7 +1363,7 @@ Static void url_unlock_mii(struct url_softc *sc) { DPRINTFN(0xff, ("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), - __FUNCTION__)); + __func__)); lockmgr(&sc->sc_mii_lock, LK_RELEASE, NULL); if (--sc->sc_refcnt < 0) @@ -1382,12 +1382,12 @@ url_int_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), __FUNCTION__, phy, reg)); + USBDEVNAME(sc->sc_dev), __func__, phy, reg)); if (sc->sc_dying) { #ifdef DIAGNOSTIC printf("%s: %s: dying\n", USBDEVNAME(sc->sc_dev), - __FUNCTION__); + __func__); #endif return (0); } @@ -1395,7 +1395,7 @@ url_int_miibus_readreg(device_ptr_t dev, int phy, int reg) /* XXX: one PHY only for the RTL8150 internal PHY */ if (phy != 0) { DPRINTFN(0xff, ("%s: %s: phy=%d is not supported\n", - USBDEVNAME(sc->sc_dev), __FUNCTION__, phy)); + USBDEVNAME(sc->sc_dev), __func__, phy)); return (0); } @@ -1424,7 +1424,7 @@ url_int_miibus_readreg(device_ptr_t dev, int phy, int reg) break; default: printf("%s: %s: bad register %04x\n", - USBDEVNAME(sc->sc_dev), __FUNCTION__, reg); + USBDEVNAME(sc->sc_dev), __func__, reg); val = 0; goto R_DONE; break; @@ -1437,7 +1437,7 @@ url_int_miibus_readreg(device_ptr_t dev, int phy, int reg) R_DONE: DPRINTFN(0xff, ("%s: %s: phy=%d reg=0x%04x => 0x%04x\n", - USBDEVNAME(sc->sc_dev), __FUNCTION__, phy, reg, val)); + USBDEVNAME(sc->sc_dev), __func__, phy, reg, val)); url_unlock_mii(sc); return (val); @@ -1454,12 +1454,12 @@ url_int_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), __FUNCTION__, phy, reg, data)); + USBDEVNAME(sc->sc_dev), __func__, phy, reg, data)); if (sc->sc_dying) { #ifdef DIAGNOSTIC printf("%s: %s: dying\n", USBDEVNAME(sc->sc_dev), - __FUNCTION__); + __func__); #endif return; } @@ -1467,7 +1467,7 @@ url_int_miibus_writereg(device_ptr_t dev, int phy, int reg, int data) /* XXX: one PHY only for the RTL8150 internal PHY */ if (phy != 0) { DPRINTFN(0xff, ("%s: %s: phy=%d is not supported\n", - USBDEVNAME(sc->sc_dev), __FUNCTION__, phy)); + USBDEVNAME(sc->sc_dev), __func__, phy)); return; } @@ -1495,7 +1495,7 @@ url_int_miibus_writereg(device_ptr_t dev, int phy, int reg, int data) break; default: printf("%s: %s: bad register %04x\n", - USBDEVNAME(sc->sc_dev), __FUNCTION__, reg); + USBDEVNAME(sc->sc_dev), __func__, reg); goto W_DONE; break; } @@ -1520,7 +1520,7 @@ url_miibus_statchg(device_ptr_t dev) return; sc = USBGETSOFTC(dev); - DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __FUNCTION__)); + DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); #endif /* Nothing to do */ } @@ -1536,12 +1536,12 @@ url_ext_miibus_redreg(device_ptr_t dev, int phy, int reg) u_int16_t val; DPRINTF(("%s: %s: enter, phy=%d reg=0x%04x\n", - USBDEVNAME(sc->sc_dev), __FUNCTION__, phy, reg)); + USBDEVNAME(sc->sc_dev), __func__, phy, reg)); if (sc->sc_dying) { #ifdef DIAGNOSTIC printf("%s: %s: dying\n", USBDEVNAME(sc->sc_dev), - __FUNCTION__); + __func__); #endif return (0); } @@ -1567,7 +1567,7 @@ url_ext_miibus_redreg(device_ptr_t dev, int phy, int reg) val = url_csr_read_2(sc, URL_PHYDAT); DPRINTF(("%s: %s: phy=%d reg=0x%04x => 0x%04x\n", - USBDEVNAME(sc->sc_dev), __FUNCTION__, phy, reg, val)); + USBDEVNAME(sc->sc_dev), __func__, phy, reg, val)); url_unlock_mii(sc); return (val); @@ -1579,12 +1579,12 @@ url_ext_miibus_writereg(device_ptr_t dev, int phy, int reg, int data) struct url_softc *sc = USBGETSOFTC(dev); DPRINTF(("%s: %s: enter, phy=%d reg=0x%04x data=0x%04x\n", - USBDEVNAME(sc->sc_dev), __FUNCTION__, phy, reg, data)); + USBDEVNAME(sc->sc_dev), __func__, phy, reg, data)); if (sc->sc_dying) { #ifdef DIAGNOSTIC printf("%s: %s: dying\n", USBDEVNAME(sc->sc_dev), - __FUNCTION__); + __func__); #endif return; } diff --git a/sys/dev/usb/uirda.c b/sys/dev/usb/uirda.c index a2ead3fb6ff7..e1c74469ea07 100644 --- a/sys/dev/usb/uirda.c +++ b/sys/dev/usb/uirda.c @@ -1,4 +1,4 @@ -/* $NetBSD: uirda.c,v 1.9 2001/12/31 12:15:21 augustss Exp $ */ +/* $NetBSD: uirda.c,v 1.10 2002/07/08 17:46:25 augustss Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uirda.c,v 1.9 2001/12/31 12:15:21 augustss Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uirda.c,v 1.10 2002/07/08 17:46:25 augustss Exp $"); #include #include @@ -444,7 +444,7 @@ uirda_open(void *h, int flag, int mode, usb_proc_ptr p) int error; usbd_status err; - DPRINTF(("%s: sc=%p\n", __FUNCTION__, sc)); + DPRINTF(("%s: sc=%p\n", __func__, sc)); err = usbd_open_pipe(sc->sc_iface, sc->sc_rd_addr, 0, &sc->sc_rd_pipe); if (err) { @@ -511,7 +511,7 @@ uirda_close(void *h, int flag, int mode, usb_proc_ptr p) { struct uirda_softc *sc = h; - DPRINTF(("%s: sc=%p\n", __FUNCTION__, sc)); + DPRINTF(("%s: sc=%p\n", __func__, sc)); if (sc->sc_rd_pipe != NULL) { usbd_abort_pipe(sc->sc_rd_pipe); @@ -546,7 +546,7 @@ uirda_read(void *h, struct uio *uio, int flag) int error; u_int n; - DPRINTFN(1,("%s: sc=%p\n", __FUNCTION__, sc)); + DPRINTFN(1,("%s: sc=%p\n", __func__, sc)); if (sc->sc_dying) return (EIO); @@ -576,7 +576,7 @@ uirda_read(void *h, struct uio *uio, int flag) lockmgr(&sc->sc_rd_buf_lk, LK_EXCLUSIVE, NULL); n = sc->sc_rd_count - UIRDA_INPUT_HEADER_SIZE; - DPRINTFN(1,("%s: sc=%p n=%u, hdr=0x%02x\n", __FUNCTION__, + DPRINTFN(1,("%s: sc=%p n=%u, hdr=0x%02x\n", __func__, sc, n, sc->sc_rd_buf[0])); if (n > uio->uio_resid) error = EINVAL; @@ -607,7 +607,7 @@ uirda_write(void *h, struct uio *uio, int flag) u_int32_t n; int error = 0; - DPRINTFN(1,("%s: sc=%p\n", __FUNCTION__, sc)); + DPRINTFN(1,("%s: sc=%p\n", __func__, sc)); if (sc->sc_dying) return (EIO); @@ -649,7 +649,7 @@ uirda_write(void *h, struct uio *uio, int flag) if (--sc->sc_refcnt < 0) usb_detach_wakeup(USBDEV(sc->sc_dev)); - DPRINTFN(1,("%s: sc=%p done\n", __FUNCTION__, sc)); + DPRINTFN(1,("%s: sc=%p done\n", __func__, sc)); return (error); } @@ -660,17 +660,17 @@ uirda_poll(void *h, int events, usb_proc_ptr p) int revents = 0; int s; - DPRINTFN(1,("%s: sc=%p\n", __FUNCTION__, sc)); + DPRINTFN(1,("%s: sc=%p\n", __func__, sc)); s = splusb(); if (events & (POLLOUT | POLLWRNORM)) revents |= events & (POLLOUT | POLLWRNORM); if (events & (POLLIN | POLLRDNORM)) { if (sc->sc_rd_count != 0) { - DPRINTFN(2,("%s: have data\n", __FUNCTION__)); + DPRINTFN(2,("%s: have data\n", __func__)); revents |= events & (POLLIN | POLLRDNORM); } else { - DPRINTFN(2,("%s: recording select\n", __FUNCTION__)); + DPRINTFN(2,("%s: recording select\n", __func__)); selrecord(p, &sc->sc_rd_sel); } } @@ -689,7 +689,7 @@ uirda_set_params(void *h, struct irda_params *p) u_int32_t n; u_int mask; - DPRINTF(("%s: sc=%p, speed=%d ebofs=%d maxsize=%d\n", __FUNCTION__, + DPRINTF(("%s: sc=%p, speed=%d ebofs=%d maxsize=%d\n", __func__, sc, p->speed, p->ebofs, p->maxsize)); if (sc->sc_dying) @@ -734,7 +734,7 @@ uirda_set_params(void *h, struct irda_params *p) return (EINVAL); sc->sc_params.maxsize = p->maxsize; #if 0 - DPRINTF(("%s: new buffers, old size=%d\n", __FUNCTION__, + DPRINTF(("%s: new buffers, old size=%d\n", __func__, sc->sc_params.maxsize)); if (p->maxsize > 10000 || p < 0) /* XXX */ return (EINVAL); @@ -771,7 +771,7 @@ uirda_set_params(void *h, struct irda_params *p) * device. */ DPRINTF(("%s: sc=%p setting header 0x%02x\n", - __FUNCTION__, sc, hdr)); + __func__, sc, hdr)); sc->sc_wr_hdr = hdr; lockmgr(&sc->sc_wr_buf_lk, LK_EXCLUSIVE, NULL); sc->sc_wr_buf[0] = hdr; @@ -799,7 +799,7 @@ uirda_get_speeds(void *h, int *speeds) u_int isp; u_int usp; - DPRINTF(("%s: sc=%p\n", __FUNCTION__, sc)); + DPRINTF(("%s: sc=%p\n", __func__, sc)); if (sc->sc_dying) return (EIO); @@ -826,7 +826,7 @@ uirda_get_turnarounds(void *h, int *turnarounds) u_int ita; u_int uta; - DPRINTF(("%s: sc=%p\n", __FUNCTION__, sc)); + DPRINTF(("%s: sc=%p\n", __func__, sc)); if (sc->sc_dying) return (EIO); @@ -852,7 +852,7 @@ uirda_rd_cb(usbd_xfer_handle xfer, usbd_private_handle priv, struct uirda_softc *sc = priv; u_int32_t size; - DPRINTFN(1,("%s: sc=%p\n", __FUNCTION__, sc)); + DPRINTFN(1,("%s: sc=%p\n", __func__, sc)); if (status == USBD_CANCELLED) /* this is normal */ return; @@ -862,7 +862,7 @@ uirda_rd_cb(usbd_xfer_handle xfer, usbd_private_handle priv, } else { usbd_get_xfer_status(xfer, NULL, NULL, &size, NULL); } - DPRINTFN(1,("%s: sc=%p size=%u, err=%d\n", __FUNCTION__, sc, size, + DPRINTFN(1,("%s: sc=%p size=%u, err=%d\n", __func__, sc, size, sc->sc_rd_err)); sc->sc_rd_count = size; wakeup(&sc->sc_rd_count); /* XXX should use flag */ @@ -874,7 +874,7 @@ uirda_start_read(struct uirda_softc *sc) { usbd_status err; - DPRINTFN(1,("%s: sc=%p, size=%d\n", __FUNCTION__, sc, + DPRINTFN(1,("%s: sc=%p, size=%d\n", __func__, sc, sc->sc_params.maxsize + UIRDA_INPUT_HEADER_SIZE)); if (sc->sc_dying) diff --git a/sys/dev/usb/umass_isdata.c b/sys/dev/usb/umass_isdata.c index bd5a73562dd8..7f9a331f83d1 100644 --- a/sys/dev/usb/umass_isdata.c +++ b/sys/dev/usb/umass_isdata.c @@ -1,4 +1,4 @@ -/* $NetBSD: umass_isdata.c,v 1.1 2001/12/24 13:43:25 augustss Exp $ */ +/* $NetBSD: umass_isdata.c,v 1.2 2002/07/08 17:46:25 augustss Exp $ */ /* * TODO: @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: umass_isdata.c,v 1.1 2001/12/24 13:43:25 augustss Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umass_isdata.c,v 1.2 2002/07/08 17:46:25 augustss Exp $"); #include #include @@ -233,7 +233,7 @@ uisdata_bio_cb(struct umass_softc *sc, void *priv, int residue, int status) struct ata_bio *ata_bio = priv; int s; - DPRINTF(("%s: residue=%d status=%d\n", __FUNCTION__, residue, status)); + DPRINTF(("%s: residue=%d status=%d\n", __func__, residue, status)); s = splbio(); scbus->sc_ata_bio = NULL; @@ -250,14 +250,14 @@ uisdata_bio_cb(struct umass_softc *sc, void *priv, int residue, int status) if (residue != 0) { ata_bio->bcount += residue; } else if (ata_bio->bcount > 0) { - DPRINTF(("%s: continue\n", __FUNCTION__)); + DPRINTF(("%s: continue\n", __func__)); (void)uisdata_bio1(&scbus->sc_drv_data, ata_bio); /*XXX save drv*/ splx(s); return; } if (ata_bio->flags & ATA_POLL) { - DPRINTF(("%s: wakeup %p\n", __FUNCTION__, ata_bio)); + DPRINTF(("%s: wakeup %p\n", __func__, ata_bio)); wakeup(ata_bio); } else { wddone(scbus->sc_drv_data.drv_softc); @@ -288,18 +288,18 @@ uisdata_bio1(struct ata_drive_datas *drv, struct ata_bio *ata_bio) long nbytes; u_int nblks; - DPRINTF(("%s\n", __FUNCTION__)); + DPRINTF(("%s\n", __func__)); /* XXX */ if (ata_bio->flags & ATA_NOSLEEP) { - printf("%s: ATA_NOSLEEP not supported\n", __FUNCTION__); + printf("%s: ATA_NOSLEEP not supported\n", __func__); ata_bio->error = TIMEOUT; ata_bio->flags |= ATA_ITSDONE; return (WDC_COMPLETE); } if (scbus->sc_ata_bio != NULL) { - printf("%s: multiple uisdata_bio\n", __FUNCTION__); + printf("%s: multiple uisdata_bio\n", __func__); return (WDC_TRY_AGAIN); } else scbus->sc_ata_bio = ata_bio; @@ -356,7 +356,7 @@ uisdata_bio1(struct ata_drive_datas *drv, struct ata_bio *ata_bio) ata.ac_command = WDCC_WRITE; } DPRINTF(("%s: bno=%d LBA=%d cyl=%d head=%d sect=%d count=%d multi=%d\n", - __FUNCTION__, ata_bio->blkno, + __func__, ata_bio->blkno, (ata_bio->flags & ATA_LBA) != 0, cyl, head, sect, ata.ac_sector_count, ata_bio->multi)); DPRINTF((" data=%p bcount=%ld, drive=%d\n", ata_bio->databuf, @@ -366,7 +366,7 @@ uisdata_bio1(struct ata_drive_datas *drv, struct ata_bio *ata_bio) dir, ATA_DELAY, uisdata_bio_cb, ata_bio); while (ata_bio->flags & ATA_POLL) { - DPRINTF(("%s: tsleep %p\n", __FUNCTION__, ata_bio)); + DPRINTF(("%s: tsleep %p\n", __func__, ata_bio)); if (tsleep(ata_bio, PZERO, "uisdatabl", 0)) { ata_bio->error = TIMEOUT; ata_bio->flags |= ATA_ITSDONE; @@ -380,7 +380,7 @@ uisdata_bio1(struct ata_drive_datas *drv, struct ata_bio *ata_bio) void uisdata_reset_channel(struct ata_drive_datas *drv) { - DPRINTFN(-1,("%s\n", __FUNCTION__)); + DPRINTFN(-1,("%s\n", __func__)); /* XXX what? */ } @@ -389,12 +389,12 @@ uisdata_exec_cb(struct umass_softc *sc, void *priv, int residue, int status) { struct wdc_command *cmd = priv; - DPRINTF(("%s: status=%d\n", __FUNCTION__, status)); + DPRINTF(("%s: status=%d\n", __func__, status)); if (status != STATUS_CMD_OK) cmd->flags |= AT_DF; /* XXX */ cmd->flags |= AT_DONE; if (cmd->flags & (AT_POLL | AT_WAIT)) { - DPRINTF(("%s: wakeup %p\n", __FUNCTION__, cmd)); + DPRINTF(("%s: wakeup %p\n", __func__, cmd)); wakeup(cmd); } } @@ -408,7 +408,7 @@ uisdata_exec_command(struct ata_drive_datas *drv, struct wdc_command *cmd) int dir; struct ata_cmd ata; - DPRINTF(("%s\n", __FUNCTION__)); + DPRINTF(("%s\n", __func__)); DPRINTF((" r_command=0x%02x timeout=%d flags=0x%x bcount=%d\n", cmd->r_command, cmd->timeout, cmd->flags, cmd->bcount)); @@ -443,7 +443,7 @@ uisdata_exec_command(struct ata_drive_datas *drv, struct wdc_command *cmd) goto done; } - DPRINTF(("%s: execute ATA command 0x%02x, drive=%d\n", __FUNCTION__, + DPRINTF(("%s: execute ATA command 0x%02x, drive=%d\n", __func__, ata.ac_command, drv->drive)); sc->sc_methods->wire_xfer(sc, drv->drive, &ata, sizeof ata, cmd->data, cmd->bcount, dir, @@ -451,9 +451,9 @@ uisdata_exec_command(struct ata_drive_datas *drv, struct wdc_command *cmd) if (cmd->flags & (AT_POLL | AT_WAIT)) { #if 0 if (cmd->flags & AT_POLL) - printf("%s: AT_POLL not supported\n", __FUNCTION__); + printf("%s: AT_POLL not supported\n", __func__); #endif - DPRINTF(("%s: tsleep %p\n", __FUNCTION__, cmd)); + DPRINTF(("%s: tsleep %p\n", __func__, cmd)); if (tsleep(cmd, PZERO, "uisdataex", 0)) { cmd->flags |= AT_ERROR; goto done; @@ -467,7 +467,7 @@ done: int uisdata_addref(struct ata_drive_datas *drv) { - DPRINTF(("%s\n", __FUNCTION__)); + DPRINTF(("%s\n", __func__)); /* Nothing to do */ return (0); } @@ -475,7 +475,7 @@ uisdata_addref(struct ata_drive_datas *drv) void uisdata_delref(struct ata_drive_datas *drv) { - DPRINTF(("%s\n", __FUNCTION__)); + DPRINTF(("%s\n", __func__)); /* Nothing to do */ } @@ -486,7 +486,7 @@ uisdata_kill_pending(struct ata_drive_datas *drv) struct uisdata_softc *scbus = (struct uisdata_softc *)sc->bus; struct ata_bio *ata_bio = scbus->sc_ata_bio; - DPRINTFN(-1,("%s\n", __FUNCTION__)); + DPRINTFN(-1,("%s\n", __func__)); if (ata_bio == NULL) return; @@ -509,7 +509,7 @@ uisdata_get_params(struct ata_drive_datas *drvp, u_int8_t flags, u_int16_t *p; #endif - DPRINTF(("%s\n", __FUNCTION__)); + DPRINTF(("%s\n", __func__)); memset(tb, 0, DEV_BSIZE); memset(prms, 0, sizeof(struct ataparams)); diff --git a/sys/dev/usb/ustir.c b/sys/dev/usb/ustir.c index fdf0b6d68ecb..44908039c065 100644 --- a/sys/dev/usb/ustir.c +++ b/sys/dev/usb/ustir.c @@ -1,4 +1,4 @@ -/* $NetBSD: ustir.c,v 1.2 2002/03/17 18:02:53 augustss Exp $ */ +/* $NetBSD: ustir.c,v 1.3 2002/07/08 17:46:25 augustss Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ustir.c,v 1.2 2002/03/17 18:02:53 augustss Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ustir.c,v 1.3 2002/07/08 17:46:25 augustss Exp $"); #include #include @@ -547,7 +547,7 @@ deframe_rd_ur(struct ustir_softc *sc) sc->sc_rd_index = sc->sc_rd_count - buflen; - DPRINTFN(1,("%s: result=%d\n", __FUNCTION__, (int)fresult)); + DPRINTFN(1,("%s: result=%d\n", __func__, (int)fresult)); switch (fresult) { case FR_IDLE: @@ -593,7 +593,7 @@ Static void ustir_periodic(struct ustir_softc *sc) { DPRINTFN(60, ("%s: direction = %d\n", - __FUNCTION__, sc->sc_direction)); + __func__, sc->sc_direction)); if (sc->sc_direction == udir_output || sc->sc_direction == udir_stalled) { @@ -601,7 +601,7 @@ ustir_periodic(struct ustir_softc *sc) u_int8_t regval; DPRINTFN(60, ("%s: reading status register\n", - __FUNCTION__)); + __func__)); err = ustir_read_reg(sc, STIR_REG_STATUS, ®val); @@ -611,7 +611,7 @@ ustir_periodic(struct ustir_softc *sc) usbd_errstr(err)); } else { DPRINTFN(10, ("%s: status register = 0x%x\n", - __FUNCTION__, + __func__, (unsigned int)regval)); if (sc->sc_direction == udir_output && !(regval & STIR_RSTATUS_FFDIR)) @@ -626,7 +626,7 @@ ustir_periodic(struct ustir_softc *sc) sc->sc_direction = udir_stalled; DPRINTFN(10, ("%s: clearing FIFO error\n", - __FUNCTION__)); + __func__)); err = ustir_write_reg(sc, STIR_REG_STATUS, STIR_RSTATUS_FFCLR); @@ -660,7 +660,7 @@ ustir_thread(void *arg) { struct ustir_softc *sc = arg; - DPRINTFN(20, ("%s: starting polling thread\n", __FUNCTION__)); + DPRINTFN(20, ("%s: starting polling thread\n", __func__)); while (!sc->sc_closing) { if (!sc->sc_rd_readinprogress && !USTIR_BLOCK_RX_DATA(sc)) @@ -682,7 +682,7 @@ ustir_thread(void *arg) } } - DPRINTFN(20, ("%s: exiting polling thread\n", __FUNCTION__)); + DPRINTFN(20, ("%s: exiting polling thread\n", __func__)); sc->sc_thread = NULL; @@ -701,7 +701,7 @@ ustir_rd_cb(usbd_xfer_handle xfer, usbd_private_handle priv, struct ustir_softc *sc = priv; u_int32_t size; - DPRINTFN(60, ("%s: sc=%p\n", __FUNCTION__, sc)); + DPRINTFN(60, ("%s: sc=%p\n", __func__, sc)); /* Read is no longer in progress */ sc->sc_rd_readinprogress = 0; @@ -728,12 +728,12 @@ ustir_rd_cb(usbd_xfer_handle xfer, usbd_private_handle priv, sc->sc_rd_count = size; DPRINTFN(((size > 0 || sc->sc_rd_err != 0) ? 20 : 60), - ("%s: sc=%p size=%u, err=%d\n", __FUNCTION__, + ("%s: sc=%p size=%u, err=%d\n", __func__, sc, size, sc->sc_rd_err)); #ifdef USTIR_DEBUG if (ustirdebug >= 20 && size > 0) - ustir_dumpdata(sc->sc_rd_buf, size, __FUNCTION__); + ustir_dumpdata(sc->sc_rd_buf, size, __func__); #endif if (!deframe_rd_ur(sc)) { @@ -744,7 +744,7 @@ ustir_rd_cb(usbd_xfer_handle xfer, usbd_private_handle priv, * within expected time... */ DPRINTFN(5,("%s: incoming packet timeout\n", - __FUNCTION__)); + __func__)); deframe_clear(&sc->sc_framestate); } else if (size > 0) { /* @@ -778,7 +778,7 @@ ustir_start_read(struct ustir_softc *sc) { usbd_status err; - DPRINTFN(60,("%s: sc=%p, size=%d\n", __FUNCTION__, sc, + DPRINTFN(60,("%s: sc=%p, size=%d\n", __func__, sc, sc->sc_params.maxsize)); if (sc->sc_dying) @@ -800,7 +800,7 @@ ustir_start_read(struct ustir_softc *sc) if (sc->sc_rd_err) { sc->sc_rd_err = 0; - DPRINTFN(0, ("%s: clear stall\n", __FUNCTION__)); + DPRINTFN(0, ("%s: clear stall\n", __func__)); usbd_clear_endpoint_stall(sc->sc_rd_pipe); } @@ -810,7 +810,7 @@ ustir_start_read(struct ustir_softc *sc) USBD_NO_TIMEOUT, ustir_rd_cb); err = usbd_transfer(sc->sc_rd_xfer); if (err != USBD_IN_PROGRESS) { - DPRINTFN(0, ("%s: err=%d\n", __FUNCTION__, err)); + DPRINTFN(0, ("%s: err=%d\n", __func__, err)); return err; } return USBD_NORMAL_COMPLETION; @@ -842,7 +842,7 @@ ustir_open(void *h, int flag, int mode, usb_proc_ptr p) int error; usbd_status err; - DPRINTFN(0, ("%s: sc=%p\n", __FUNCTION__, sc)); + DPRINTFN(0, ("%s: sc=%p\n", __func__, sc)); err = usbd_open_pipe(sc->sc_iface, sc->sc_rd_addr, 0, &sc->sc_rd_pipe); if (err) { @@ -927,7 +927,7 @@ ustir_close(void *h, int flag, int mode, usb_proc_ptr p) { struct ustir_softc *sc = h; - DPRINTFN(0, ("%s: sc=%p\n", __FUNCTION__, sc)); + DPRINTFN(0, ("%s: sc=%p\n", __func__, sc)); sc->sc_refcnt++; @@ -978,7 +978,7 @@ ustir_read(void *h, struct uio *uio, int flag) int error; u_int uframelen; - DPRINTFN(1,("%s: sc=%p\n", __FUNCTION__, sc)); + DPRINTFN(1,("%s: sc=%p\n", __func__, sc)); if (sc->sc_dying) return EIO; @@ -997,7 +997,7 @@ ustir_read(void *h, struct uio *uio, int flag) do { s = splusb(); while (sc->sc_ur_framelen == 0) { - DPRINTFN(5,("%s: calling tsleep()\n", __FUNCTION__)); + DPRINTFN(5,("%s: calling tsleep()\n", __func__)); error = tsleep(&sc->sc_ur_framelen, PZERO | PCATCH, "usirrd", 0); if (sc->sc_dying) @@ -1005,7 +1005,7 @@ ustir_read(void *h, struct uio *uio, int flag) if (error) { splx(s); DPRINTFN(0, ("%s: tsleep() = %d\n", - __FUNCTION__, error)); + __func__, error)); goto ret; } } @@ -1013,7 +1013,7 @@ ustir_read(void *h, struct uio *uio, int flag) uframelen = sc->sc_ur_framelen; DPRINTFN(1,("%s: sc=%p framelen=%u, hdr=0x%02x\n", - __FUNCTION__, sc, uframelen, sc->sc_ur_buf[0])); + __func__, sc, uframelen, sc->sc_ur_buf[0])); if (uframelen > uio->uio_resid) error = EINVAL; else @@ -1031,7 +1031,7 @@ ustir_read(void *h, struct uio *uio, int flag) } } while (uframelen == 0); - DPRINTFN(1,("%s: return %d\n", __FUNCTION__, error)); + DPRINTFN(1,("%s: return %d\n", __func__, error)); ret: if (--sc->sc_refcnt < 0) @@ -1049,7 +1049,7 @@ ustir_write(void *h, struct uio *uio, int flag) u_int8_t *wrbuf; int s; - DPRINTFN(1,("%s: sc=%p\n", __FUNCTION__, sc)); + DPRINTFN(1,("%s: sc=%p\n", __func__, sc)); if (sc->sc_dying) return EIO; @@ -1073,14 +1073,14 @@ ustir_write(void *h, struct uio *uio, int flag) s = splusb(); while (sc->sc_direction != udir_output && sc->sc_direction != udir_idle) { - DPRINTFN(5, ("%s: calling tsleep()\n", __FUNCTION__)); + DPRINTFN(5, ("%s: calling tsleep()\n", __func__)); error = tsleep(&sc->sc_wr_buf, PZERO | PCATCH, "usirwr", 0); if (sc->sc_dying) error = EIO; if (error) { splx(s); - DPRINTFN(0, ("%s: tsleep() = %d\n", __FUNCTION__, + DPRINTFN(0, ("%s: tsleep() = %d\n", __func__, error)); goto ret; } @@ -1102,7 +1102,7 @@ ustir_write(void *h, struct uio *uio, int flag) } else { u_int32_t btlen; - DPRINTFN(1, ("%s: transfer %u bytes\n", __FUNCTION__, + DPRINTFN(1, ("%s: transfer %u bytes\n", __func__, (unsigned int)wrlen)); wrbuf[2] = sirlength & 0xff; @@ -1114,14 +1114,14 @@ ustir_write(void *h, struct uio *uio, int flag) #ifdef USTIR_DEBUG if (ustirdebug >= 20) - ustir_dumpdata(wrbuf, btlen, __FUNCTION__); + ustir_dumpdata(wrbuf, btlen, __func__); #endif err = usbd_bulk_transfer(sc->sc_wr_xfer, sc->sc_wr_pipe, USBD_FORCE_SHORT_XFER | USBD_NO_COPY, USTIR_WR_TIMEOUT, wrbuf, &btlen, "ustiwr"); - DPRINTFN(2, ("%s: err=%d\n", __FUNCTION__, err)); + DPRINTFN(2, ("%s: err=%d\n", __func__, err)); if (err) { if (err == USBD_INTERRUPTED) error = EINTR; @@ -1138,7 +1138,7 @@ ustir_write(void *h, struct uio *uio, int flag) if (--sc->sc_refcnt < 0) usb_detach_wakeup(USBDEV(sc->sc_dev)); - DPRINTFN(1,("%s: sc=%p done\n", __FUNCTION__, sc)); + DPRINTFN(1,("%s: sc=%p done\n", __func__, sc)); return error; } @@ -1148,25 +1148,25 @@ ustir_poll(void *h, int events, usb_proc_ptr p) struct ustir_softc *sc = h; int revents = 0; - DPRINTFN(1,("%s: sc=%p\n", __FUNCTION__, sc)); + DPRINTFN(1,("%s: sc=%p\n", __func__, sc)); if (events & (POLLOUT | POLLWRNORM)) { if (sc->sc_direction != udir_input) { revents |= events & (POLLOUT | POLLWRNORM); } else { DPRINTFN(2,("%s: recording write select\n", - __FUNCTION__)); + __func__)); selrecord(p, &sc->sc_wr_sel); } } if (events & (POLLIN | POLLRDNORM)) { if (sc->sc_ur_framelen != 0) { - DPRINTFN(2,("%s: have data\n", __FUNCTION__)); + DPRINTFN(2,("%s: have data\n", __func__)); revents |= events & (POLLIN | POLLRDNORM); } else { DPRINTFN(2,("%s: recording read select\n", - __FUNCTION__)); + __func__)); selrecord(p, &sc->sc_rd_sel); } } @@ -1200,7 +1200,7 @@ Static int ustir_ioctl(void *h, u_long cmd, caddr_t addr, int flag, usb_proc_ptr err = ustir_read_reg(sc, regnum, ®data); - DPRINTFN(10, ("%s: regget(%u) = 0x%x\n", __FUNCTION__, + DPRINTFN(10, ("%s: regget(%u) = 0x%x\n", __func__, regnum, (unsigned int)regdata)); *(unsigned int *)addr = regdata; @@ -1222,7 +1222,7 @@ Static int ustir_ioctl(void *h, u_long cmd, caddr_t addr, int flag, usb_proc_ptr break; } - DPRINTFN(10, ("%s: regset(%u, 0x%x)\n", __FUNCTION__, + DPRINTFN(10, ("%s: regset(%u, 0x%x)\n", __func__, regnum, (unsigned int)regdata)); err = ustir_write_reg(sc, regnum, regdata); @@ -1262,7 +1262,7 @@ ustir_set_params(void *h, struct irda_params *p) struct ustir_speedrec const *speedblk; int i; - DPRINTFN(0, ("%s: sc=%p, speed=%d ebofs=%d maxsize=%d\n", __FUNCTION__, + DPRINTFN(0, ("%s: sc=%p, speed=%d ebofs=%d maxsize=%d\n", __func__, sc, p->speed, p->ebofs, p->maxsize)); if (sc->sc_dying) @@ -1306,17 +1306,17 @@ ustir_set_params(void *h, struct irda_params *p) */ regmode |= STIR_RMODE_FFSPRST; - DPRINTFN(10, ("%s: setting BRATE = %x\n", __FUNCTION__, + DPRINTFN(10, ("%s: setting BRATE = %x\n", __func__, (unsigned int)regbrate)); err = ustir_write_reg(sc, STIR_REG_BRATE, regbrate); if (!err) { - DPRINTFN(10, ("%s: setting MODE = %x\n", __FUNCTION__, + DPRINTFN(10, ("%s: setting MODE = %x\n", __func__, (unsigned int)regmode)); err = ustir_write_reg(sc, STIR_REG_MODE, regmode); } if (err) { DPRINTFN(10, ("%s: error setting register: %s\n", - __FUNCTION__, usbd_errstr(err))); + __func__, usbd_errstr(err))); return EIO; } } @@ -1329,7 +1329,7 @@ ustir_get_speeds(void *h, int *speeds) { struct ustir_softc *sc = h; - DPRINTFN(0, ("%s: sc=%p\n", __FUNCTION__, sc)); + DPRINTFN(0, ("%s: sc=%p\n", __func__, sc)); if (sc->sc_dying) return EIO; @@ -1353,7 +1353,7 @@ ustir_get_turnarounds(void *h, int *turnarounds) { struct ustir_softc *sc = h; - DPRINTFN(0, ("%s: sc=%p\n", __FUNCTION__, sc)); + DPRINTFN(0, ("%s: sc=%p\n", __func__, sc)); if (sc->sc_dying) return EIO;