Date: Sun, 3 Aug 2008 09:19:40 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 146504 for review Message-ID: <200808030919.m739JeVj095382@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=146504 Change 146504 by hselasky@hselasky_laptop001 on 2008/08/03 09:18:57 Style patch from Andrew Thompson. Make the debugging macros more inline with existing systems. Affected files ... .. //depot/projects/usb/src/sys/dev/usb2/bluetooth/ng_ubt2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/bluetooth/ubtbcmfw2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/controller/at91dci.c#6 edit .. //depot/projects/usb/src/sys/dev/usb2/controller/ehci2.c#8 edit .. //depot/projects/usb/src/sys/dev/usb2/controller/ohci2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/controller/uhci2.c#6 edit .. //depot/projects/usb/src/sys/dev/usb2/controller/usb2_controller.c#7 edit .. //depot/projects/usb/src/sys/dev/usb2/controller/uss820dci.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_config_td.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_debug.h#3 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_dev.c#18 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_device.c#15 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_generic.c#16 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_handle_request.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_hid.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_hub.c#12 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_msctest.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_process.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_request.c#10 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_sw_transfer.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_transfer.c#14 edit .. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_aue2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_axe2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_cdce2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_cue2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_kue2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_rue2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_udav2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/image/uscanner2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/input/uhid2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/input/ukbd2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/input/ums2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/misc/udbp2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/quirk/usb2_quirk.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/uark2.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/ubsa2.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/ubser2.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/uchcom2.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/ucycom2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/ufoma2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/uftdi2.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/ugensa2.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/uipaq2.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/ulpt2.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/umct2.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/umodem2.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/umoscom2.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/uplcom2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/usb2_serial.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/uvisor2.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/uvscom2.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/sound/uaudio2.c#9 edit .. //depot/projects/usb/src/sys/dev/usb2/storage/urio2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/storage/ustorage2_fs.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/template/usb2_template.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/wlan/if_rum2.c#6 edit .. //depot/projects/usb/src/sys/dev/usb2/wlan/if_ural2.c#7 edit .. //depot/projects/usb/src/sys/dev/usb2/wlan/if_zyd2.c#7 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb2/bluetooth/ng_ubt2.c#5 (text+ko) ==== @@ -812,7 +812,7 @@ struct usb2_xfer *xfer_other = sc->sc_xfer_if_0[2]; if (usb2_clear_stall_callback(xfer, xfer_other)) { - DPRINTF(0, "stall cleared\n"); + DPRINTF("stall cleared\n"); sc->sc_flags &= ~UBT_FLAG_INTR_STALL; usb2_transfer_start(xfer_other); } @@ -966,7 +966,7 @@ struct usb2_xfer *xfer_other = sc->sc_xfer_if_0[1]; if (usb2_clear_stall_callback(xfer, xfer_other)) { - DPRINTF(0, "stall cleared\n"); + DPRINTF("stall cleared\n"); sc->sc_flags &= ~UBT_FLAG_READ_STALL; usb2_transfer_start(xfer_other); } @@ -1115,7 +1115,7 @@ struct usb2_xfer *xfer_other = sc->sc_xfer_if_0[0]; if (usb2_clear_stall_callback(xfer, xfer_other)) { - DPRINTF(0, "stall cleared\n"); + DPRINTF("stall cleared\n"); sc->sc_flags &= ~UBT_FLAG_WRITE_STALL; usb2_transfer_start(xfer_other); } ==== //depot/projects/usb/src/sys/dev/usb2/bluetooth/ubtbcmfw2.c#4 (text+ko) ==== @@ -301,7 +301,7 @@ struct usb2_xfer *xfer_other = sc->sc_xfer[0]; if (usb2_clear_stall_callback(xfer, xfer_other)) { - DPRINTF(0, "stall cleared\n"); + DPRINTF("stall cleared\n"); sc->sc_flags &= ~UBTBCMFW_FLAG_WRITE_STALL; usb2_transfer_start(xfer_other); } @@ -347,7 +347,7 @@ struct usb2_xfer *xfer_other = sc->sc_xfer[1]; if (usb2_clear_stall_callback(xfer, xfer_other)) { - DPRINTF(0, "stall cleared\n"); + DPRINTF("stall cleared\n"); sc->sc_flags &= ~UBTBCMFW_FLAG_READ_STALL; usb2_transfer_start(xfer_other); } ==== //depot/projects/usb/src/sys/dev/usb2/controller/at91dci.c#6 (text+ko) ==== @@ -203,7 +203,7 @@ if (sc->sc_flags.clocks_off && sc->sc_flags.port_powered) { - DPRINTF(4, "\n"); + DPRINTFN(5, "\n"); if (sc->sc_clocks_on) { (sc->sc_clocks_on) (sc->sc_clocks_arg); @@ -221,7 +221,7 @@ { if (!sc->sc_flags.clocks_off) { - DPRINTF(4, "\n"); + DPRINTFN(5, "\n"); /* disable Transceiver */ AT91_UDP_WRITE_4(sc, AT91_UDP_TXVC, AT91_UDP_TXVC_DIS); @@ -283,7 +283,7 @@ struct at91dci_softc *sc; uint32_t temp; - DPRINTF(4, "is_on=%u\n", is_on); + DPRINTFN(5, "is_on=%u\n", is_on); mtx_assert(&(udev->bus->mtx), MA_OWNED); @@ -305,7 +305,7 @@ static void at91dci_set_address(struct at91dci_softc *sc, uint8_t addr) { - DPRINTF(4, "addr=%d\n", addr); + DPRINTFN(5, "addr=%d\n", addr); AT91_UDP_WRITE_4(sc, AT91_UDP_FADDR, addr | AT91_UDP_FADDR_EN); @@ -326,7 +326,7 @@ csr = bus_space_read_4(td->io_tag, td->io_hdl, td->status_reg); - DPRINTF(4, "csr=0x%08x rem=%u\n", csr, td->remainder); + DPRINTFN(5, "csr=0x%08x rem=%u\n", csr, td->remainder); temp = csr; temp &= (AT91_UDP_CSR_RX_DATA_BK0 | @@ -338,7 +338,7 @@ if (!(csr & AT91_UDP_CSR_RXSETUP)) { /* abort any ongoing transfer */ if (!td->did_stall) { - DPRINTF(4, "stalling\n"); + DPRINTFN(5, "stalling\n"); temp |= AT91_UDP_CSR_FORCESTALL; td->did_stall = 1; } @@ -349,12 +349,12 @@ /* verify data length */ if (count != td->remainder) { - DPRINTF(-1, "Invalid SETUP packet " + DPRINTFN(0, "Invalid SETUP packet " "length, %d bytes\n", count); goto not_complete; } if (count != sizeof(req)) { - DPRINTF(-1, "Unsupported SETUP packet " + DPRINTFN(0, "Unsupported SETUP packet " "length, %d bytes\n", count); goto not_complete; } @@ -395,7 +395,7 @@ not_complete: /* clear interrupts, if any */ if (temp) { - DPRINTF(4, "clearing 0x%08x\n", temp); + DPRINTFN(5, "clearing 0x%08x\n", temp); AT91_CSR_ACK(csr, temp); bus_space_write_4(td->io_tag, td->io_hdl, td->status_reg, csr); @@ -423,7 +423,7 @@ csr = bus_space_read_4(td->io_tag, td->io_hdl, td->status_reg); - DPRINTF(4, "csr=0x%08x rem=%u\n", csr, td->remainder); + DPRINTFN(5, "csr=0x%08x rem=%u\n", csr, td->remainder); if (csr & AT91_UDP_CSR_RXSETUP) { if (td->remainder == 0) { @@ -431,7 +431,7 @@ * We are actually complete and have * received the next SETUP */ - DPRINTF(4, "faking complete\n"); + DPRINTFN(5, "faking complete\n"); return (0); /* complete */ } /* @@ -548,7 +548,7 @@ csr = bus_space_read_4(td->io_tag, td->io_hdl, td->status_reg); - DPRINTF(4, "csr=0x%08x rem=%u\n", csr, td->remainder); + DPRINTFN(5, "csr=0x%08x rem=%u\n", csr, td->remainder); if (csr & AT91_UDP_CSR_RXSETUP) { /* @@ -633,10 +633,10 @@ csr = bus_space_read_4(td->io_tag, td->io_hdl, td->status_reg); - DPRINTF(4, "csr=0x%08x\n", csr); + DPRINTFN(5, "csr=0x%08x\n", csr); if (csr & AT91_UDP_CSR_RXSETUP) { - DPRINTF(4, "faking complete\n"); + DPRINTFN(5, "faking complete\n"); /* Race condition */ return (0); /* complete */ } @@ -684,7 +684,7 @@ struct at91dci_td *td; uint8_t temp; - DPRINTF(8, "\n"); + DPRINTFN(9, "\n"); td = xfer->td_transfer_cache; while (1) { @@ -758,7 +758,7 @@ { struct at91dci_softc *sc = AT9100_DCI_BUS2SC(bus); - DPRINTF(4, "vbus = %u\n", is_on); + DPRINTFN(5, "vbus = %u\n", is_on); mtx_lock(&(sc->sc_bus.mtx)); if (is_on) { @@ -812,7 +812,7 @@ if (status & AT91_UDP_INT_BUS) { - DPRINTF(4, "real bus interrupt 0x%08x\n", status); + DPRINTFN(5, "real bus interrupt 0x%08x\n", status); if (status & AT91_UDP_INT_END_BR) { @@ -869,7 +869,7 @@ if (status & AT91_UDP_INT_EPS) { - DPRINTF(4, "real endpoint interrupt 0x%08x\n", status); + DPRINTFN(5, "real endpoint interrupt 0x%08x\n", status); at91dci_interrupt_poll(sc); } @@ -912,7 +912,7 @@ uint32_t x; uint8_t ep_no; - DPRINTF(8, "addr=%d endpt=%d sumlen=%d speed=%d\n", + DPRINTFN(9, "addr=%d endpt=%d sumlen=%d speed=%d\n", xfer->address, UE_GET_ADDR(xfer->endpoint), xfer->sumlen, usb2_get_speed(xfer->udev)); @@ -1044,7 +1044,7 @@ struct usb2_xfer *xfer = arg; struct at91dci_softc *sc = xfer->usb2_sc; - DPRINTF(0, "xfer=%p\n", xfer); + DPRINTF("xfer=%p\n", xfer); mtx_assert(&sc->sc_bus.mtx, MA_OWNED); @@ -1059,7 +1059,7 @@ static void at91dci_start_standard_chain(struct usb2_xfer *xfer) { - DPRINTF(8, "\n"); + DPRINTFN(9, "\n"); /* poll one time */ if (at91dci_xfer_do_fifo(xfer)) { @@ -1074,7 +1074,7 @@ */ AT91_UDP_WRITE_4(sc, AT91_UDP_IER, AT91_UDP_INT_EP(ep_no)); - DPRINTF(14, "enable interrupts on endpoint %d\n", ep_no); + DPRINTFN(15, "enable interrupts on endpoint %d\n", ep_no); /* put transfer on interrupt queue */ usb2_transfer_enqueue(&(xfer->udev->bus->intr_q), xfer); @@ -1094,7 +1094,7 @@ { struct at91dci_softc *sc = xfer->usb2_sc; - DPRINTF(8, "\n"); + DPRINTFN(9, "\n"); mtx_assert(&sc->sc_bus.mtx, MA_OWNED); @@ -1123,7 +1123,7 @@ uint32_t len; uint8_t error; - DPRINTF(8, "\n"); + DPRINTFN(9, "\n"); td = xfer->td_transfer_cache; @@ -1185,7 +1185,7 @@ { usb2_error_t err = 0; - DPRINTF(12, "xfer=%p pipe=%p transfer done\n", + DPRINTFN(13, "xfer=%p pipe=%p transfer done\n", xfer, xfer->pipe); /* reset scanner */ @@ -1238,7 +1238,7 @@ mtx_assert(&sc->sc_bus.mtx, MA_OWNED); - DPRINTF(1, "xfer=%p, pipe=%p, error=%d\n", + DPRINTFN(2, "xfer=%p, pipe=%p, error=%d\n", xfer, xfer->pipe, error); if (xfer->flags_int.usb2_mode == USB_MODE_DEVICE) { @@ -1247,7 +1247,7 @@ /* disable endpoint interrupt */ AT91_UDP_WRITE_4(sc, AT91_UDP_IDR, AT91_UDP_INT_EP(ep_no)); - DPRINTF(14, "disable interrupts on endpoint %d\n", ep_no); + DPRINTFN(15, "disable interrupts on endpoint %d\n", ep_no); } /* dequeue transfer and start next transfer */ usb2_transfer_done(xfer, error); @@ -1264,7 +1264,7 @@ mtx_assert(&(udev->bus->mtx), MA_OWNED); - DPRINTF(4, "pipe=%p\n", pipe); + DPRINTFN(5, "pipe=%p\n", pipe); if (xfer) { /* cancel any ongoing transfers */ @@ -1384,7 +1384,7 @@ struct at91dci_softc *sc; struct usb2_endpoint_descriptor *ed; - DPRINTF(4, "pipe=%p\n", pipe); + DPRINTFN(5, "pipe=%p\n", pipe); mtx_assert(&(udev->bus->mtx), MA_OWNED); @@ -1413,7 +1413,7 @@ uint32_t csr_val; uint8_t n; - DPRINTF(0, "start\n"); + DPRINTF("start\n"); /* set up the bus structure */ sc->sc_bus.usbrev = USB_REV_1_1; @@ -1666,7 +1666,7 @@ uint32_t temp; uint32_t nframes; - DPRINTF(5, "xfer=%p next=%d nframes=%d\n", + DPRINTFN(6, "xfer=%p next=%d nframes=%d\n", xfer, xfer->pipe->isoc_next, xfer->nframes); /* get the current frame index */ @@ -1689,7 +1689,7 @@ */ xfer->pipe->isoc_next = (nframes + 3) & AT91_UDP_FRM_MASK; xfer->pipe->is_synced = 1; - DPRINTF(2, "start next=%d\n", xfer->pipe->isoc_next); + DPRINTFN(3, "start next=%d\n", xfer->pipe->isoc_next); } /* * compute how many milliseconds the insertion is ahead of the @@ -2143,7 +2143,7 @@ if (index != 1) { goto tr_stalled; } - DPRINTF(8, "UR_CLEAR_PORT_FEATURE on port %d\n", index); + DPRINTFN(9, "UR_CLEAR_PORT_FEATURE on port %d\n", index); switch (value) { case UHF_PORT_SUSPEND: @@ -2182,7 +2182,7 @@ if (index != 1) { goto tr_stalled; } - DPRINTF(8, "UR_SET_PORT_FEATURE\n"); + DPRINTFN(9, "UR_SET_PORT_FEATURE\n"); switch (value) { case UHF_PORT_ENABLE: @@ -2205,7 +2205,7 @@ tr_handle_get_port_status: - DPRINTF(8, "UR_GET_PORT_STATUS\n"); + DPRINTFN(9, "UR_GET_PORT_STATUS\n"); if (index != 1) { goto tr_stalled; @@ -2460,7 +2460,7 @@ { struct at91dci_softc *sc = AT9100_DCI_BUS2SC(udev->bus); - DPRINTF(1, "pipe=%p, addr=%d, endpt=%d, mode=%d (%d)\n", + DPRINTFN(2, "pipe=%p, addr=%d, endpt=%d, mode=%d (%d)\n", pipe, udev->address, edesc->bEndpointAddress, udev->flags.usb2_mode, sc->sc_rt_addr); ==== //depot/projects/usb/src/sys/dev/usb2/controller/ehci2.c#8 (text+ko) ==== @@ -207,7 +207,7 @@ mtx_lock(&sc->sc_bus.mtx); - DPRINTF(0, "start\n"); + DPRINTF("start\n"); usb2_callout_init_mtx(&sc->sc_tmo_pcd, &sc->sc_bus.mtx, CALLOUT_RETURNUNLOCKED); @@ -225,14 +225,14 @@ version >> 8, version & 0xff); sparams = EREAD4(sc, EHCI_HCSPARAMS); - DPRINTF(0, "sparams=0x%x\n", sparams); + DPRINTF("sparams=0x%x\n", sparams); sc->sc_noport = EHCI_HCS_N_PORTS(sparams); cparams = EREAD4(sc, EHCI_HCCPARAMS); - DPRINTF(0, "cparams=0x%x\n", cparams); + DPRINTF("cparams=0x%x\n", cparams); if (EHCI_HCC_64BIT(cparams)) { - DPRINTF(0, "HCC uses 64-bit structures\n"); + DPRINTF("HCC uses 64-bit structures\n"); /* MUST clear segment register if 64 bit capable */ EWRITE4(sc, EHCI_CTRLDSSEGMENT, 0); @@ -240,7 +240,7 @@ sc->sc_bus.usbrev = USB_REV_2_0; /* Reset the controller */ - DPRINTF(0, "%s: resetting\n", device_get_nameunit(sc->sc_bus.bdev)); + DPRINTF("%s: resetting\n", device_get_nameunit(sc->sc_bus.bdev)); err = ehci_hc_reset(sc); if (err) { @@ -496,7 +496,7 @@ EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs); if (ehci_hc_reset(sc)) { - DPRINTF(0, "reset failed!\n"); + DPRINTF("reset failed!\n"); } mtx_unlock(&sc->sc_bus.mtx); @@ -631,12 +631,12 @@ void ehci_shutdown(ehci_softc_t *sc) { - DPRINTF(0, "stopping the HC\n"); + DPRINTF("stopping the HC\n"); mtx_lock(&sc->sc_bus.mtx); if (ehci_hc_reset(sc)) { - DPRINTF(0, "reset failed!\n"); + DPRINTF("reset failed!\n"); } mtx_unlock(&sc->sc_bus.mtx); } @@ -976,7 +976,7 @@ static ehci_sitd_t * _ehci_append_fs_td(ehci_sitd_t *std, ehci_sitd_t *last) { - DPRINTF(10, "%p to %p\n", std, last); + DPRINTFN(11, "%p to %p\n", std, last); /* (sc->sc_bus.mtx) must be locked */ @@ -1002,7 +1002,7 @@ static ehci_itd_t * _ehci_append_hs_td(ehci_itd_t *std, ehci_itd_t *last) { - DPRINTF(10, "%p to %p\n", std, last); + DPRINTFN(11, "%p to %p\n", std, last); /* (sc->sc_bus.mtx) must be locked */ @@ -1028,7 +1028,7 @@ static ehci_qh_t * _ehci_append_qh(ehci_qh_t *sqh, ehci_qh_t *last) { - DPRINTF(10, "%p to %p\n", sqh, last); + DPRINTFN(11, "%p to %p\n", sqh, last); /* (sc->sc_bus.mtx) must be locked */ @@ -1061,7 +1061,7 @@ static ehci_sitd_t * _ehci_remove_fs_td(ehci_sitd_t *std, ehci_sitd_t *last) { - DPRINTF(10, "%p from %p\n", std, last); + DPRINTFN(11, "%p from %p\n", std, last); /* (sc->sc_bus.mtx) must be locked */ @@ -1081,7 +1081,7 @@ static ehci_itd_t * _ehci_remove_hs_td(ehci_itd_t *std, ehci_itd_t *last) { - DPRINTF(10, "%p from %p\n", std, last); + DPRINTFN(11, "%p from %p\n", std, last); /* (sc->sc_bus.mtx) must be locked */ @@ -1101,7 +1101,7 @@ static ehci_qh_t * _ehci_remove_qh(ehci_qh_t *sqh, ehci_qh_t *last) { - DPRINTF(10, "%p from %p\n", sqh, last); + DPRINTFN(11, "%p from %p\n", sqh, last); /* (sc->sc_bus.mtx) must be locked */ @@ -1158,7 +1158,7 @@ */ if (len > td->len) { /* should not happen */ - DPRINTF(0, "Invalid status length, " + DPRINTF("Invalid status length, " "0x%04x/0x%04x bytes\n", len, td->len); status |= EHCI_QTD_HALTED; } else if (xfer->aframes != xfer->nframes) { @@ -1212,7 +1212,7 @@ #ifdef USB_DEBUG if (status & EHCI_QTD_STATERRS) { - DPRINTF(10, "error, addr=%d, endpt=0x%02x, frame=0x%02x" + DPRINTFN(11, "error, addr=%d, endpt=0x%02x, frame=0x%02x" "status=%s%s%s%s%s%s%s%s\n", xfer->address, xfer->endpoint, xfer->aframes, (status & EHCI_QTD_ACTIVE) ? "[ACTIVE]" : "[NOT_ACTIVE]", @@ -1235,7 +1235,7 @@ { usb2_error_t err = 0; - DPRINTF(12, "xfer=%p pipe=%p transfer done\n", + DPRINTFN(13, "xfer=%p pipe=%p transfer done\n", xfer, xfer->pipe); #ifdef USB_DEBUG @@ -1294,7 +1294,7 @@ uint32_t status; - DPRINTF(12, "xfer=%p checking transfer\n", xfer); + DPRINTFN(13, "xfer=%p checking transfer\n", xfer); if (methods == &ehci_device_isoc_fs_methods) { ehci_sitd_t *td; @@ -1399,7 +1399,7 @@ } done: - DPRINTF(12, "xfer=%p is still active\n", xfer); + DPRINTFN(13, "xfer=%p is still active\n", xfer); return (0); transferred: @@ -1456,7 +1456,7 @@ mtx_lock(&sc->sc_bus.mtx); - DPRINTF(15, "real interrupt\n"); + DPRINTFN(16, "real interrupt\n"); #ifdef USB_DEBUG if (ehcidebug > 15) { @@ -1524,7 +1524,7 @@ struct usb2_xfer *xfer = arg; ehci_softc_t *sc = xfer->usb2_sc; - DPRINTF(0, "xfer=%p\n", xfer); + DPRINTF("xfer=%p\n", xfer); mtx_assert(&sc->sc_bus.mtx, MA_OWNED); @@ -1733,7 +1733,7 @@ uint32_t qh_endphub; uint32_t x; - DPRINTF(8, "addr=%d endpt=%d sumlen=%d speed=%d\n", + DPRINTFN(9, "addr=%d endpt=%d sumlen=%d speed=%d\n", xfer->address, UE_GET_ADDR(xfer->endpoint), xfer->sumlen, usb2_get_speed(xfer->udev)); @@ -1875,7 +1875,7 @@ #ifdef USB_DEBUG if (ehcidebug > 8) { - DPRINTF(0, "nexttog=%d; data before transfer:\n", + DPRINTF("nexttog=%d; data before transfer:\n", xfer->pipe->toggle_next); ehci_dump_sqtds(xfer->td_transfer_first); } @@ -1984,7 +1984,7 @@ /* pick out CHANGE bits from the status register */ if (EOREAD4(sc, EHCI_PORTSC(i)) & EHCI_PS_CLEAR) { sc->sc_hub_idata[i / 8] |= 1 << (i % 8); - DPRINTF(0, "port %d changed\n", i); + DPRINTF("port %d changed\n", i); } } done: @@ -2001,7 +2001,7 @@ ehci_sitd_t *td = xfer->td_transfer_first; ehci_sitd_t **pp_last = &sc->sc_isoc_fs_p_last[xfer->qh_pos]; - DPRINTF(12, "xfer=%p pipe=%p transfer done\n", + DPRINTFN(13, "xfer=%p pipe=%p transfer done\n", xfer, xfer->pipe); while (nframes--) { @@ -2014,7 +2014,7 @@ } #ifdef USB_DEBUG if (ehcidebug > 15) { - DPRINTF(15, "isoc FS-TD\n"); + DPRINTF("isoc FS-TD\n"); ehci_dump_sitd(td); } #endif @@ -2055,7 +2055,7 @@ ehci_itd_t *td = xfer->td_transfer_first; ehci_itd_t **pp_last = &sc->sc_isoc_hs_p_last[xfer->qh_pos]; - DPRINTF(12, "xfer=%p pipe=%p transfer done\n", + DPRINTFN(13, "xfer=%p pipe=%p transfer done\n", xfer, xfer->pipe); while (nframes--) { @@ -2068,7 +2068,7 @@ } #ifdef USB_DEBUG if (ehcidebug > 15) { - DPRINTF(15, "isoc HS-TD\n"); + DPRINTF("isoc HS-TD\n"); ehci_dump_itd(td); } #endif @@ -2120,14 +2120,14 @@ mtx_assert(&sc->sc_bus.mtx, MA_OWNED); - DPRINTF(1, "xfer=%p, pipe=%p, error=%d\n", + DPRINTFN(2, "xfer=%p, pipe=%p, error=%d\n", xfer, xfer->pipe, error); if ((methods == &ehci_device_bulk_methods) || (methods == &ehci_device_ctrl_methods)) { #ifdef USB_DEBUG if (ehcidebug > 8) { - DPRINTF(0, "nexttog=%d; data after transfer:\n", + DPRINTF("nexttog=%d; data after transfer:\n", xfer->pipe->toggle_next); ehci_dump_sqtds(xfer->td_transfer_first); } @@ -2302,7 +2302,7 @@ sc->sc_intr_stat[best]++; xfer->qh_pos = best; - DPRINTF(2, "best=%d interval=%d\n", + DPRINTFN(3, "best=%d interval=%d\n", best, xfer->interval); return; } @@ -2428,7 +2428,7 @@ ehci_sitd_t *td_last = NULL; ehci_sitd_t **pp_last; - DPRINTF(5, "xfer=%p next=%d nframes=%d\n", + DPRINTFN(6, "xfer=%p next=%d nframes=%d\n", xfer, xfer->pipe->isoc_next, xfer->nframes); /* get the current frame index */ @@ -2453,7 +2453,7 @@ xfer->pipe->isoc_next = (nframes + 3) & (EHCI_VIRTUAL_FRAMELIST_COUNT - 1); xfer->pipe->is_synced = 1; - DPRINTF(2, "start next=%d\n", xfer->pipe->isoc_next); + DPRINTFN(3, "start next=%d\n", xfer->pipe->isoc_next); } /* * compute how many milliseconds the insertion is ahead of the @@ -2601,7 +2601,7 @@ #ifdef USB_DEBUG if (ehcidebug > 15) { - DPRINTF(15, "FS-TD %d\n", nframes); + DPRINTF("FS-TD %d\n", nframes); ehci_dump_sitd(td); } #endif @@ -2722,7 +2722,7 @@ ehci_itd_t *td_last = NULL; ehci_itd_t **pp_last; - DPRINTF(5, "xfer=%p next=%d nframes=%d\n", + DPRINTFN(6, "xfer=%p next=%d nframes=%d\n", xfer, xfer->pipe->isoc_next, xfer->nframes); /* get the current frame index */ @@ -2747,7 +2747,7 @@ xfer->pipe->isoc_next = (nframes + 3) & (EHCI_VIRTUAL_FRAMELIST_COUNT - 1); xfer->pipe->is_synced = 1; - DPRINTF(2, "start next=%d\n", xfer->pipe->isoc_next); + DPRINTFN(3, "start next=%d\n", xfer->pipe->isoc_next); } /* * compute how many milliseconds the insertion is ahead of the @@ -2873,7 +2873,7 @@ usb2_pc_cpu_flush(td->page_cache); #ifdef USB_DEBUG if (ehcidebug > 15) { - DPRINTF(15, "HS-TD %d\n", nframes); + DPRINTF("HS-TD %d\n", nframes); ehci_dump_itd(td); } #endif @@ -3022,7 +3022,7 @@ uint32_t port; uint32_t v; - DPRINTF(0, "index=%d lowspeed=%d\n", index, lowspeed); + DPRINTF("index=%d lowspeed=%d\n", index, lowspeed); port = EHCI_PORTSC(index); v = EOREAD4(sc, port) & ~EHCI_PS_CLEAR; @@ -3040,7 +3040,7 @@ { ehci_softc_t *sc = xfer->usb2_sc; - DPRINTF(0, "\n"); + DPRINTF("\n"); sc->sc_root_ctrl.xfer = xfer; @@ -3090,7 +3090,7 @@ use_polling = mtx_owned(xfer->priv_mtx) ? 1 : 0; - DPRINTF(2, "type=0x%02x request=0x%02x wLen=0x%04x " + DPRINTFN(3, "type=0x%02x request=0x%02x wLen=0x%04x " "wValue=0x%04x wIndex=0x%04x\n", std->req.bmRequestType, std->req.bRequest, UGETW(std->req.wLength), value, index); @@ -3213,7 +3213,7 @@ case C(UR_CLEAR_FEATURE, UT_WRITE_CLASS_DEVICE): break; case C(UR_CLEAR_FEATURE, UT_WRITE_CLASS_OTHER): - DPRINTF(8, "UR_CLEAR_PORT_FEATURE\n"); + DPRINTFN(9, "UR_CLEAR_PORT_FEATURE\n"); if ((index < 1) || (index > sc->sc_noport)) { @@ -3233,11 +3233,11 @@ EOWRITE4(sc, port, v & ~EHCI_PS_PP); break; case UHF_PORT_TEST: - DPRINTF(2, "clear port test " + DPRINTFN(3, "clear port test " "%d\n", index); break; case UHF_PORT_INDICATOR: - DPRINTF(2, "clear port ind " + DPRINTFN(3, "clear port ind " "%d\n", index); EOWRITE4(sc, port, v & ~EHCI_PS_PIC); break; @@ -3288,7 +3288,7 @@ bzero(sc->sc_hub_desc.temp, 16); break; case C(UR_GET_STATUS, UT_READ_CLASS_OTHER): - DPRINTF(8, "get port status i=%d\n", + DPRINTFN(9, "get port status i=%d\n", index); if ((index < 1) || (index > sc->sc_noport)) { @@ -3296,7 +3296,7 @@ goto done; } v = EOREAD4(sc, EHCI_PORTSC(index)); - DPRINTF(8, "port status=0x%04x\n", v); + DPRINTFN(9, "port status=0x%04x\n", v); i = UPS_HIGH_SPEED; if (v & EHCI_PS_CS) i |= UPS_CURRENT_CONNECT_STATUS; @@ -3344,7 +3344,7 @@ EOWRITE4(sc, port, v | EHCI_PS_SUSP); break; case UHF_PORT_RESET: - DPRINTF(5, "reset port %d\n", index); + DPRINTFN(6, "reset port %d\n", index); if (EHCI_PS_IS_LOWSPEED(v)) { /* Low speed device, give up ownership. */ ehci_disown(sc, index, 1); @@ -3378,7 +3378,7 @@ } v = EOREAD4(sc, port); - DPRINTF(0, "ehci after reset, status=0x%08x\n", v); + DPRINTF("ehci after reset, status=0x%08x\n", v); if (v & EHCI_PS_PR) { device_printf(sc->sc_bus.bdev, "port reset timeout\n"); @@ -3394,21 +3394,21 @@ break; } sc->sc_isreset = 1; - DPRINTF(0, "ehci port %d reset, status = 0x%08x\n", + DPRINTF("ehci port %d reset, status = 0x%08x\n", index, v); break; case UHF_PORT_POWER: - DPRINTF(2, "set port power %d\n", index); + DPRINTFN(3, "set port power %d\n", index); EOWRITE4(sc, port, v | EHCI_PS_PP); break; case UHF_PORT_TEST: - DPRINTF(2, "set port test %d\n", index); + DPRINTFN(3, "set port test %d\n", index); break; case UHF_PORT_INDICATOR: - DPRINTF(2, "set port ind %d\n", index); + DPRINTFN(3, "set port ind %d\n", index); EOWRITE4(sc, port, v | EHCI_PS_PIC); break; @@ -3767,7 +3767,7 @@ { ehci_softc_t *sc = EHCI_BUS2SC(udev->bus); - DPRINTF(1, "pipe=%p, addr=%d, endpt=%d, mode=%d (%d)\n", + DPRINTFN(2, "pipe=%p, addr=%d, endpt=%d, mode=%d (%d)\n", pipe, udev->address, edesc->bEndpointAddress, udev->flags.usb2_mode, sc->sc_addr); ==== //depot/projects/usb/src/sys/dev/usb2/controller/ohci2.c#5 (text+ko) ==== @@ -171,7 +171,7 @@ ctl = OREAD4(sc, OHCI_CONTROL); if (ctl & OHCI_IR) { /* SMM active, request change */ - DPRINTF(0, "SMM active, request owner change\n"); + DPRINTF("SMM active, request owner change\n"); s = OREAD4(sc, OHCI_COMMAND_STATUS); OWRITE4(sc, OHCI_COMMAND_STATUS, s | OHCI_OCR); for (i = 0; (i < 100) && (ctl & OHCI_IR); i++) { @@ -187,14 +187,14 @@ /* Don't bother trying to reuse the BIOS init, we'll reset it anyway. */ } else if ((ctl & OHCI_HCFS_MASK) != OHCI_HCFS_RESET) { /* BIOS started controller. */ - DPRINTF(0, "BIOS active\n"); + DPRINTF("BIOS active\n"); if ((ctl & OHCI_HCFS_MASK) != OHCI_HCFS_OPERATIONAL) { OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_OPERATIONAL); DELAY(1000 * USB_RESUME_DELAY); } #endif } else { - DPRINTF(0, "cold started\n"); + DPRINTF("cold started\n"); reset: /* controller was cold started */ DELAY(1000 * USB_BUS_RESET_DELAY); @@ -204,7 +204,7 @@ * This reset should not be necessary according to the OHCI spec, but * without it some controllers do not start. */ - DPRINTF(0, "%s: resetting\n", device_get_nameunit(sc->sc_bus.bdev)); + DPRINTF("%s: resetting\n", device_get_nameunit(sc->sc_bus.bdev)); OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_RESET); DELAY(1000 * USB_BUS_RESET_DELAY); @@ -317,7 +317,7 @@ mtx_lock(&sc->sc_bus.mtx); - DPRINTF(0, "start\n"); + DPRINTF("start\n"); sc->sc_eintrs = OHCI_NORMAL_INTRS; @@ -457,7 +457,7 @@ mtx_lock(&sc->sc_bus.mtx); #ifdef USB_DEBUG - DPRINTF(0, "\n"); + DPRINTF("\n"); if (ohcidebug > 2) { ohci_dumpregs(sc); } @@ -488,7 +488,7 @@ mtx_lock(&sc->sc_bus.mtx); #ifdef USB_DEBUG - DPRINTF(0, "\n"); + DPRINTF("\n"); if (ohcidebug > 2) { ohci_dumpregs(sc); } @@ -526,41 +526,41 @@ { struct ohci_hcca *hcca; - DPRINTF(0, "ohci_dumpregs: rev=0x%08x control=0x%08x command=0x%08x\n", + DPRINTF("ohci_dumpregs: rev=0x%08x control=0x%08x command=0x%08x\n", OREAD4(sc, OHCI_REVISION), OREAD4(sc, OHCI_CONTROL), OREAD4(sc, OHCI_COMMAND_STATUS)); - DPRINTF(0, " intrstat=0x%08x intre=0x%08x intrd=0x%08x\n", + DPRINTF(" intrstat=0x%08x intre=0x%08x intrd=0x%08x\n", OREAD4(sc, OHCI_INTERRUPT_STATUS), OREAD4(sc, OHCI_INTERRUPT_ENABLE), OREAD4(sc, OHCI_INTERRUPT_DISABLE)); - DPRINTF(0, " hcca=0x%08x percur=0x%08x ctrlhd=0x%08x\n", + DPRINTF(" hcca=0x%08x percur=0x%08x ctrlhd=0x%08x\n", OREAD4(sc, OHCI_HCCA), OREAD4(sc, OHCI_PERIOD_CURRENT_ED), OREAD4(sc, OHCI_CONTROL_HEAD_ED)); - DPRINTF(0, " ctrlcur=0x%08x bulkhd=0x%08x bulkcur=0x%08x\n", + DPRINTF(" ctrlcur=0x%08x bulkhd=0x%08x bulkcur=0x%08x\n", OREAD4(sc, OHCI_CONTROL_CURRENT_ED), OREAD4(sc, OHCI_BULK_HEAD_ED), OREAD4(sc, OHCI_BULK_CURRENT_ED)); - DPRINTF(0, " done=0x%08x fmival=0x%08x fmrem=0x%08x\n", + DPRINTF(" done=0x%08x fmival=0x%08x fmrem=0x%08x\n", OREAD4(sc, OHCI_DONE_HEAD), OREAD4(sc, OHCI_FM_INTERVAL), OREAD4(sc, OHCI_FM_REMAINING)); - DPRINTF(0, " fmnum=0x%08x perst=0x%08x lsthrs=0x%08x\n", + DPRINTF(" fmnum=0x%08x perst=0x%08x lsthrs=0x%08x\n", OREAD4(sc, OHCI_FM_NUMBER), OREAD4(sc, OHCI_PERIODIC_START), OREAD4(sc, OHCI_LS_THRESHOLD)); - DPRINTF(0, " desca=0x%08x descb=0x%08x stat=0x%08x\n", + DPRINTF(" desca=0x%08x descb=0x%08x stat=0x%08x\n", OREAD4(sc, OHCI_RH_DESCRIPTOR_A), OREAD4(sc, OHCI_RH_DESCRIPTOR_B), OREAD4(sc, OHCI_RH_STATUS)); - DPRINTF(0, " port1=0x%08x port2=0x%08x\n", + DPRINTF(" port1=0x%08x port2=0x%08x\n", OREAD4(sc, OHCI_RH_PORT_STATUS(1)), OREAD4(sc, OHCI_RH_PORT_STATUS(2))); hcca = ohci_get_hcca(sc); - DPRINTF(0, " HCCA: frame_number=0x%04x done_head=0x%08x\n", + DPRINTF(" HCCA: frame_number=0x%04x done_head=0x%08x\n", le32toh(hcca->hcca_frame_number), le32toh(hcca->hcca_done_head)); return; @@ -700,7 +700,7 @@ static ohci_ed_t * >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808030919.m739JeVj095382>