PERFORCE change 176614 for review

Hans Petter Selasky hselasky at FreeBSD.org
Wed Apr 7 14:14:39 UTC 2010


http://p4web.freebsd.org/@@176614?ac=10

Change 176614 by hselasky at hselasky_laptop001 on 2010/04/07 14:14:10

	USB debug:
		- fix compilation without USB debug support.
	
	PR:		usb/145455

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/controller/at91dci.c#31 edit
.. //depot/projects/usb/src/sys/dev/usb/controller/atmegadci.c#43 edit
.. //depot/projects/usb/src/sys/dev/usb/controller/avr32dci.c#16 edit
.. //depot/projects/usb/src/sys/dev/usb/controller/musb_otg.c#32 edit
.. //depot/projects/usb/src/sys/dev/usb/controller/ohci.c#33 edit
.. //depot/projects/usb/src/sys/dev/usb/controller/uhci_pci.c#19 edit
.. //depot/projects/usb/src/sys/dev/usb/controller/usb_controller.c#38 edit
.. //depot/projects/usb/src/sys/dev/usb/net/uhso.c#2 edit
.. //depot/projects/usb/src/sys/dev/usb/storage/umass.c#49 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_busdma.c#19 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_debug.h#11 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_dev.c#41 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_generic.c#26 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_hub.c#39 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_process.c#16 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/controller/at91dci.c#31 (text+ko) ====

@@ -89,7 +89,7 @@
 #define	AT9100_DCI_PC2SC(pc) \
    AT9100_DCI_BUS2SC(USB_DMATAG_TO_XROOT((pc)->tag_parent)->bus)
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 static int at91dcidebug = 0;
 
 SYSCTL_NODE(_hw_usb, OID_AUTO, at91dci, CTLFLAG_RW, 0, "USB at91dci");

==== //depot/projects/usb/src/sys/dev/usb/controller/atmegadci.c#43 (text+ko) ====

@@ -81,7 +81,7 @@
 #define	ATMEGA_PC2SC(pc) \
    ATMEGA_BUS2SC(USB_DMATAG_TO_XROOT((pc)->tag_parent)->bus)
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 static int atmegadci_debug = 0;
 
 SYSCTL_NODE(_hw_usb, OID_AUTO, atmegadci, CTLFLAG_RW, 0, "USB ATMEGA DCI");

==== //depot/projects/usb/src/sys/dev/usb/controller/avr32dci.c#16 (text+ko) ====

@@ -81,7 +81,7 @@
 #define	AVR32_PC2SC(pc) \
    AVR32_BUS2SC(USB_DMATAG_TO_XROOT((pc)->tag_parent)->bus)
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 static int avr32dci_debug = 0;
 
 SYSCTL_NODE(_hw_usb, OID_AUTO, avr32dci, CTLFLAG_RW, 0, "USB AVR32 DCI");

==== //depot/projects/usb/src/sys/dev/usb/controller/musb_otg.c#32 (text+ko) ====

@@ -83,7 +83,7 @@
 #define	MUSBOTG_PC2SC(pc) \
    MUSBOTG_BUS2SC(USB_DMATAG_TO_XROOT((pc)->tag_parent)->bus)
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 static int musbotgdebug = 0;
 
 SYSCTL_NODE(_hw_usb, OID_AUTO, musbotg, CTLFLAG_RW, 0, "USB musbotg");

==== //depot/projects/usb/src/sys/dev/usb/controller/ohci.c#33 (text+ko) ====

@@ -78,7 +78,7 @@
    ((ohci_softc_t *)(((uint8_t *)(bus)) - \
     ((uint8_t *)&(((ohci_softc_t *)0)->sc_bus))))
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 static int ohcidebug = 0;
 
 SYSCTL_NODE(_hw_usb, OID_AUTO, ohci, CTLFLAG_RW, 0, "USB ohci");
@@ -228,7 +228,7 @@
 		device_printf(sc->sc_bus.bdev, "reset timeout\n");
 		return (USB_ERR_IOERROR);
 	}
-#ifdef USB_DEBUG
+#if USB_DEBUG
 	if (ohcidebug > 15) {
 		ohci_dumpregs(sc);
 	}
@@ -287,7 +287,7 @@
 		sc->sc_noport = OHCI_GET_NDP(OREAD4(sc, OHCI_RH_DESCRIPTOR_A));
 	}
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 	if (ohcidebug > 5) {
 		ohci_dumpregs(sc);
 	}
@@ -403,7 +403,7 @@
 
 	usb_callout_init_mtx(&sc->sc_tmo_rhsc, &sc->sc_bus.bus_mtx, 0);
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 	if (ohcidebug > 15) {
 		for (i = 0; i != OHCI_NO_EDS; i++) {
 			printf("ed#%d ", i);
@@ -456,7 +456,7 @@
 
 	USB_BUS_LOCK(&sc->sc_bus);
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 	DPRINTF("\n");
 	if (ohcidebug > 2) {
 		ohci_dumpregs(sc);
@@ -486,7 +486,7 @@
 {
 	uint32_t ctl;
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 	DPRINTF("\n");
 	if (ohcidebug > 2) {
 		ohci_dumpregs(sc);
@@ -520,7 +520,7 @@
 	ohci_do_poll(&sc->sc_bus);
 }
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 static void
 ohci_dumpregs(ohci_softc_t *sc)
 {
@@ -767,7 +767,7 @@
 			panic("%s:%d: out of TD's\n",
 			    __FUNCTION__, __LINE__);
 		}
-#ifdef USB_DEBUG
+#if USB_DEBUG
 		if (ohcidebug > 5) {
 			DPRINTF("isoc TD\n");
 			ohci_dump_itd(td);
@@ -808,7 +808,7 @@
 	ohci_device_done(xfer, USB_ERR_NORMAL_COMPLETION);
 }
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 static const char *const
 	ohci_cc_strs[] =
 {
@@ -936,7 +936,7 @@
 	DPRINTFN(13, "xfer=%p endpoint=%p transfer done\n",
 	    xfer, xfer->endpoint);
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 	if (ohcidebug > 10) {
 		ohci_dump_tds(xfer->td_transfer_first);
 	}
@@ -1161,7 +1161,7 @@
 
 	DPRINTFN(16, "real interrupt\n");
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 	if (ohcidebug > 15) {
 		ohci_dumpregs(sc);
 	}
@@ -1587,7 +1587,7 @@
 
 	xfer->td_transfer_last = td;
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 	if (ohcidebug > 8) {
 		DPRINTF("nexttog=%d; data before transfer:\n",
 		    xfer->endpoint->toggle_next);
@@ -2018,7 +2018,7 @@
 
 	xfer->td_transfer_last = td_last;
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 	if (ohcidebug > 8) {
 		DPRINTF("data before transfer:\n");
 		ohci_dump_itds(xfer->td_transfer_first);

==== //depot/projects/usb/src/sys/dev/usb/controller/uhci_pci.c#19 (text+ko) ====

@@ -372,7 +372,7 @@
 	 * that the BIOS won't touch the keyboard anymore if it is connected
 	 * to the ports of the root hub?
 	 */
-#ifdef USB_DEBUG
+#if USB_DEBUG
 	if (pci_read_config(self, PCI_LEGSUP, 2) != PCI_LEGSUP_USBPIRQDEN) {
 		device_printf(self, "LegSup = 0x%04x\n",
 		    pci_read_config(self, PCI_LEGSUP, 2));

==== //depot/projects/usb/src/sys/dev/usb/controller/usb_controller.c#38 (text+ko) ====

@@ -70,7 +70,7 @@
 
 /* static variables */
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 static int usb_ctrl_debug = 0;
 
 SYSCTL_NODE(_hw_usb, OID_AUTO, ctrl, CTLFLAG_RW, 0, "USB controller");

==== //depot/projects/usb/src/sys/dev/usb/net/uhso.c#2 (text+ko) ====

@@ -280,7 +280,7 @@
 SYSCTL_INT(_hw_usb_uhso, OID_AUTO, auto_switch, CTLFLAG_RW,
     &uhso_autoswitch, 0, "Automatically switch to modem mode");
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 #ifdef UHSO_DEBUG
 static int uhso_debug = UHSO_DEBUG;
 #else

==== //depot/projects/usb/src/sys/dev/usb/storage/umass.c#49 (text+ko) ====

@@ -2147,7 +2147,7 @@
 static void
 umass_cam_attach(struct umass_softc *sc)
 {
-#ifndef USB_DEBUG
+#if (USB_DEBUG == 0)
 	if (bootverbose)
 #endif
 		printf("%s:%d:%d:%d: Attached to scbus%d\n",

==== //depot/projects/usb/src/sys/dev/usb/usb_busdma.c#19 (text+ko) ====

@@ -440,7 +440,7 @@
 	pc->page_offset_buf = rem;
 	pc->page_offset_end += rem;
 	nseg--;
-#ifdef USB_DEBUG
+#if USB_DEBUG
 	if (rem != (USB_P2U(pc->buffer) & (USB_PAGE_SIZE - 1))) {
 		/*
 		 * This check verifies that the physical address is correct:

==== //depot/projects/usb/src/sys/dev/usb/usb_debug.h#11 (text+ko) ====

@@ -34,7 +34,7 @@
 
 /* Check if USB debugging is enabled. */
 #ifdef USB_DEBUG_VAR
-#if (USB_DEBUG != 0)
+#if USB_DEBUG
 #define	DPRINTFN(n,fmt,...) do {		\
   if ((USB_DEBUG_VAR) >= (n)) {			\
     printf("%s: " fmt,				\

==== //depot/projects/usb/src/sys/dev/usb/usb_dev.c#41 (text+ko) ====

@@ -79,7 +79,7 @@
 
 #if USB_HAVE_UGEN
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 static int usb_fifo_debug = 0;
 
 SYSCTL_NODE(_hw_usb, OID_AUTO, dev, CTLFLAG_RW, 0, "USB device");

==== //depot/projects/usb/src/sys/dev/usb/usb_generic.c#26 (text+ko) ====

@@ -124,7 +124,7 @@
 	.f_stop_write = &ugen_stop_io,
 };
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 static int ugen_debug = 0;
 
 SYSCTL_NODE(_hw_usb, OID_AUTO, ugen, CTLFLAG_RW, 0, "USB generic");

==== //depot/projects/usb/src/sys/dev/usb/usb_hub.c#39 (text+ko) ====

@@ -73,7 +73,7 @@
 #define	UHUB_INTR_INTERVAL 250		/* ms */
 #define	UHUB_N_TRANSFER 1
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 static int uhub_debug = 0;
 
 SYSCTL_NODE(_hw_usb, OID_AUTO, uhub, CTLFLAG_RW, 0, "USB HUB");

==== //depot/projects/usb/src/sys/dev/usb/usb_process.c#16 (text+ko) ====

@@ -77,7 +77,7 @@
 #define	USB_THREAD_EXIT(err)	kthread_exit(err)
 #endif
 
-#ifdef USB_DEBUG
+#if USB_DEBUG
 static int usb_proc_debug;
 
 SYSCTL_NODE(_hw_usb, OID_AUTO, proc, CTLFLAG_RW, 0, "USB process");


More information about the p4-projects mailing list