Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Dec 2007 19:27:21 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 130111 for review
Message-ID:  <200712031927.lB3JRLQf092443@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=130111

Change 130111 by hselasky@hselasky_laptop001 on 2007/12/03 19:27:06

	
	Style code correctly.

Affected files ...

.. //depot/projects/usb/src/sys/arm/at91/ohci_atmelarm.c#14 edit
.. //depot/projects/usb/src/sys/dev/usb/ohci.c#47 edit

Differences ...

==== //depot/projects/usb/src/sys/arm/at91/ohci_atmelarm.c#14 (text) ====

@@ -113,13 +113,12 @@
 
 	strlcpy(sc->sc_ohci.sc_vendor, "Atmel", sizeof(sc->sc_ohci.sc_vendor));
 
-	err = usbd_config_td_setup(&(sc->sc_ohci.sc_config_td), sc, 
+	err = usbd_config_td_setup(&(sc->sc_ohci.sc_config_td), sc,
 	    &(sc->sc_ohci.sc_bus.mtx), NULL, 0, 4);
 	if (err) {
 		device_printf(dev, "could not setup config thread!\n");
 		goto error;
 	}
-
 #if (__FreeBSD_version >= 700031)
 	err = bus_setup_intr(dev, sc->sc_ohci.sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
 	    NULL, (void *)(void *)ohci_interrupt, sc, &(sc->sc_ohci.sc_intr_hdl));

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

@@ -1132,7 +1132,7 @@
 ohci_interrupt_td(ohci_softc_t *sc, struct thread *ctd)
 {
 	enum {
-	  FINISH_LIST_MAX = 16,
+		FINISH_LIST_MAX = 16,
 	};
 
 	struct usbd_xfer *xlist[FINISH_LIST_MAX + 1];
@@ -1204,7 +1204,7 @@
 	}
 
 	status &= ~OHCI_MIE;
-	if (status == 0) {	       
+	if (status == 0) {
 		/*
 		 * nothing to be done (PCI shared
 		 * interrupt)
@@ -1217,39 +1217,38 @@
 	if (status == 0) {
 		goto done;
 	}
-
-	if (status & (OHCI_SO|OHCI_RD|OHCI_UE|OHCI_RHSC)) {
+	if (status & (OHCI_SO | OHCI_RD | OHCI_UE | OHCI_RHSC)) {
 #if 0
-	if (status & OHCI_SO) {
-		/* XXX do what */
-	}
+		if (status & OHCI_SO) {
+			/* XXX do what */
+		}
 #endif
-	if (status & OHCI_RD) {
-		device_printf(sc->sc_bus.bdev, "resume detect\n");
-		/* XXX process resume detect */
-	}
-	if (status & OHCI_UE) {
-		device_printf(sc->sc_bus.bdev, "unrecoverable error, "
-		    "controller halted\n");
-		OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_RESET);
-		/* XXX what else */
-	}
-	if (status & OHCI_RHSC) {
-		/*
-		 * Disable RHSC interrupt for now, because it will be
-		 * on until the port has been reset.
-		 */
-		sc->sc_eintrs &= ~OHCI_RHSC;
-		OWRITE4(sc, OHCI_INTERRUPT_DISABLE, OHCI_RHSC);
+		if (status & OHCI_RD) {
+			device_printf(sc->sc_bus.bdev, "resume detect\n");
+			/* XXX process resume detect */
+		}
+		if (status & OHCI_UE) {
+			device_printf(sc->sc_bus.bdev, "unrecoverable error, "
+			    "controller halted\n");
+			OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_RESET);
+			/* XXX what else */
+		}
+		if (status & OHCI_RHSC) {
+			/*
+			 * Disable RHSC interrupt for now, because it will be
+			 * on until the port has been reset.
+			 */
+			sc->sc_eintrs &= ~OHCI_RHSC;
+			OWRITE4(sc, OHCI_INTERRUPT_DISABLE, OHCI_RHSC);
 
-		if (!usbd_std_root_transfer(&(sc->sc_root_intr), ctd,
-		    &ohci_root_intr_done)) {
-			mtx_lock(&(sc->sc_bus.mtx));
+			if (!usbd_std_root_transfer(&(sc->sc_root_intr), ctd,
+			    &ohci_root_intr_done)) {
+				mtx_lock(&(sc->sc_bus.mtx));
+			}
+			/* do not allow RHSC interrupts > 1 per second */
+			usb_callout_reset(&sc->sc_tmo_rhsc, hz,
+			    (void *)(void *)ohci_rhsc_enable, sc);
 		}
-		/* do not allow RHSC interrupts > 1 per second */
-		usb_callout_reset(&sc->sc_tmo_rhsc, hz,
-		    (void *)(void *)ohci_rhsc_enable, sc);
-	}
 	}
 	status &= ~(OHCI_RHSC | OHCI_WDH | OHCI_SO);
 	if (status != 0) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712031927.lB3JRLQf092443>