Author: mjg
Date: Tue Sep  1 21:26:44 2020
New Revision: 365084
URL: https://svnweb.freebsd.org/changeset/base/365084

Log:
  usb: clean up empty lines in .c and .h files

Modified:
  head/sys/dev/usb/controller/atmegadci.c
  head/sys/dev/usb/controller/avr32dci.c
  head/sys/dev/usb/controller/dwc_otg.c
  head/sys/dev/usb/controller/dwc_otg_fdt.c
  head/sys/dev/usb/controller/ehci.c
  head/sys/dev/usb/controller/ehci.h
  head/sys/dev/usb/controller/ehci_fsl.c
  head/sys/dev/usb/controller/ehci_msm.c
  head/sys/dev/usb/controller/generic_ehci_fdt.c
  head/sys/dev/usb/controller/generic_xhci_fdt.c
  head/sys/dev/usb/controller/musb_otg.c
  head/sys/dev/usb/controller/ohci.c
  head/sys/dev/usb/controller/saf1761_otg.c
  head/sys/dev/usb/controller/uhci.c
  head/sys/dev/usb/controller/usb_controller.c
  head/sys/dev/usb/controller/uss820dci.c
  head/sys/dev/usb/controller/xhci.c
  head/sys/dev/usb/gadget/g_audio.c
  head/sys/dev/usb/gadget/g_keyboard.c
  head/sys/dev/usb/gadget/g_modem.c
  head/sys/dev/usb/gadget/g_mouse.c
  head/sys/dev/usb/input/atp.c
  head/sys/dev/usb/input/uep.c
  head/sys/dev/usb/input/uhid.c
  head/sys/dev/usb/input/uhid_snes.c
  head/sys/dev/usb/input/ukbd.c
  head/sys/dev/usb/input/ums.c
  head/sys/dev/usb/input/wmt.c
  head/sys/dev/usb/input/wsp.c
  head/sys/dev/usb/misc/cp2112.c
  head/sys/dev/usb/misc/udbp.c
  head/sys/dev/usb/misc/udbp.h
  head/sys/dev/usb/misc/ugold.c
  head/sys/dev/usb/net/if_aue.c
  head/sys/dev/usb/net/if_axe.c
  head/sys/dev/usb/net/if_axge.c
  head/sys/dev/usb/net/if_cdce.c
  head/sys/dev/usb/net/if_cdceem.c
  head/sys/dev/usb/net/if_cue.c
  head/sys/dev/usb/net/if_ipheth.c
  head/sys/dev/usb/net/if_kue.c
  head/sys/dev/usb/net/if_mos.c
  head/sys/dev/usb/net/if_muge.c
  head/sys/dev/usb/net/if_rue.c
  head/sys/dev/usb/net/if_smsc.c
  head/sys/dev/usb/net/if_udav.c
  head/sys/dev/usb/net/if_urndisreg.h
  head/sys/dev/usb/net/if_usie.c
  head/sys/dev/usb/net/uhso.c
  head/sys/dev/usb/net/usb_ethernet.c
  head/sys/dev/usb/quirk/usb_quirk.c
  head/sys/dev/usb/serial/u3g.c
  head/sys/dev/usb/serial/uark.c
  head/sys/dev/usb/serial/ubsa.c
  head/sys/dev/usb/serial/ubser.c
  head/sys/dev/usb/serial/uchcom.c
  head/sys/dev/usb/serial/ucycom.c
  head/sys/dev/usb/serial/ufoma.c
  head/sys/dev/usb/serial/uftdi.c
  head/sys/dev/usb/serial/ugensa.c
  head/sys/dev/usb/serial/uipaq.c
  head/sys/dev/usb/serial/ulpt.c
  head/sys/dev/usb/serial/umcs.c
  head/sys/dev/usb/serial/umct.c
  head/sys/dev/usb/serial/umodem.c
  head/sys/dev/usb/serial/umoscom.c
  head/sys/dev/usb/serial/uplcom.c
  head/sys/dev/usb/serial/usb_serial.c
  head/sys/dev/usb/serial/uslcom.c
  head/sys/dev/usb/serial/uvisor.c
  head/sys/dev/usb/serial/uvscom.c
  head/sys/dev/usb/storage/cfumass.c
  head/sys/dev/usb/storage/umass.c
  head/sys/dev/usb/storage/urio.c
  head/sys/dev/usb/storage/ustorage_fs.c
  head/sys/dev/usb/template/usb_template.c
  head/sys/dev/usb/template/usb_template_kbd.c
  head/sys/dev/usb/template/usb_template_mouse.c
  head/sys/dev/usb/template/usb_template_phone.c
  head/sys/dev/usb/usb_busdma.c
  head/sys/dev/usb/usb_busdma.h
  head/sys/dev/usb/usb_controller.h
  head/sys/dev/usb/usb_core.h
  head/sys/dev/usb/usb_dev.c
  head/sys/dev/usb/usb_device.c
  head/sys/dev/usb/usb_generic.c
  head/sys/dev/usb/usb_handle_request.c
  head/sys/dev/usb/usb_hid.c
  head/sys/dev/usb/usb_hub.c
  head/sys/dev/usb/usb_hub_acpi.c
  head/sys/dev/usb/usb_hub_private.h
  head/sys/dev/usb/usb_lookup.c
  head/sys/dev/usb/usb_mbuf.c
  head/sys/dev/usb/usb_msctest.c
  head/sys/dev/usb/usb_pf.c
  head/sys/dev/usb/usb_process.c
  head/sys/dev/usb/usb_request.c
  head/sys/dev/usb/usb_transfer.c
  head/sys/dev/usb/usbdi.h
  head/sys/dev/usb/video/udl.c
  head/sys/dev/usb/wlan/if_rsu.c
  head/sys/dev/usb/wlan/if_rumreg.h
  head/sys/dev/usb/wlan/if_run.c
  head/sys/dev/usb/wlan/if_runreg.h
  head/sys/dev/usb/wlan/if_upgt.c
  head/sys/dev/usb/wlan/if_ural.c
  head/sys/dev/usb/wlan/if_uralreg.h
  head/sys/dev/usb/wlan/if_uralvar.h
  head/sys/dev/usb/wlan/if_urtw.c
  head/sys/dev/usb/wlan/if_zyd.c
  head/sys/dev/usb/wlan/if_zydreg.h

Modified: head/sys/dev/usb/controller/atmegadci.c
==============================================================================
--- head/sys/dev/usb/controller/atmegadci.c     Tue Sep  1 21:26:00 2020        
(r365083)
+++ head/sys/dev/usb/controller/atmegadci.c     Tue Sep  1 21:26:44 2020        
(r365084)
@@ -116,7 +116,6 @@ static void atmegadci_root_intr(struct atmegadci_softc
  */
 static const struct usb_hw_ep_profile
        atmegadci_ep_profile[2] = {
-
        [0] = {
                .max_in_frame_size = 64,
                .max_out_frame_size = 64,
@@ -152,7 +151,6 @@ atmegadci_clocks_on(struct atmegadci_softc *sc)
 {
        if (sc->sc_flags.clocks_off &&
            sc->sc_flags.port_powered) {
-
                DPRINTFN(5, "\n");
 
                /* turn on clocks */
@@ -173,7 +171,6 @@ static void
 atmegadci_clocks_off(struct atmegadci_softc *sc)
 {
        if (!sc->sc_flags.clocks_off) {
-
                DPRINTFN(5, "\n");
 
                /* disable Transceiver ? */
@@ -488,7 +485,6 @@ repeat:
                count = td->remainder;
        }
        while (count > 0) {
-
                usbd_get_page(td->pc, td->offset, &buf_res);
 
                /* get correct length */
@@ -674,7 +670,6 @@ atmegadci_interrupt(struct atmegadci_softc *sc)
 
        /* check for any bus state change interrupts */
        if (status & ATMEGA_UDINT_EORSTI) {
-
                DPRINTFN(5, "end of reset\n");
 
                /* set correct state */
@@ -697,7 +692,6 @@ atmegadci_interrupt(struct atmegadci_softc *sc)
         * milliseconds of inactivity on the USB BUS.
         */
        if (status & ATMEGA_UDINT_WAKEUPI) {
-
                DPRINTFN(5, "resume interrupt\n");
 
                if (sc->sc_flags.status_suspend) {
@@ -714,7 +708,6 @@ atmegadci_interrupt(struct atmegadci_softc *sc)
                        atmegadci_root_intr(sc);
                }
        } else if (status & ATMEGA_UDINT_SUSPI) {
-
                DPRINTFN(5, "suspend interrupt\n");
 
                if (!sc->sc_flags.status_suspend) {
@@ -749,7 +742,6 @@ atmegadci_interrupt(struct atmegadci_softc *sc)
        status = ATMEGA_READ_1(sc, ATMEGA_UEINT);
        /* the hardware will clear the UEINT bits automatically */
        if (status) {
-
                DPRINTFN(5, "real endpoint interrupt UEINT=0x%02x\n", status);
 
                atmegadci_interrupt_poll(sc);
@@ -817,7 +809,6 @@ atmegadci_setup_standard_chain(struct usb_xfer *xfer)
 
        if (xfer->flags_int.control_xfr) {
                if (xfer->flags_int.control_hdr) {
-
                        temp.func = &atmegadci_setup_rx;
                        temp.len = xfer->frlengths[0];
                        temp.pc = xfer->frbuffers + 0;
@@ -851,7 +842,6 @@ atmegadci_setup_standard_chain(struct usb_xfer *xfer)
                need_sync = 0;
        }
        while (x != xfer->nframes) {
-
                /* DATA0 / DATA1 message */
 
                temp.len = xfer->frlengths[x];
@@ -868,13 +858,11 @@ atmegadci_setup_standard_chain(struct usb_xfer *xfer)
                        }
                }
                if (temp.len == 0) {
-
                        /* make sure that we send an USB packet */
 
                        temp.short_pkt = 0;
 
                } else {
-
                        /* regular data transfer */
 
                        temp.short_pkt = (xfer->flags.force_short_xfer) ? 0 : 1;
@@ -891,7 +879,6 @@ atmegadci_setup_standard_chain(struct usb_xfer *xfer)
        }
 
        if (xfer->flags_int.control_xfr) {
-
                /* always setup a valid "pc" pointer for status and sync */
                temp.pc = xfer->frbuffers + 0;
                temp.len = 0;
@@ -907,7 +894,6 @@ atmegadci_setup_standard_chain(struct usb_xfer *xfer)
 
                /* check if we should append a status stage */
                if (!xfer->flags_int.control_act) {
-
                        /*
                         * Send a DATA1 message and invert the current
                         * endpoint direction.
@@ -953,7 +939,6 @@ atmegadci_start_standard_chain(struct usb_xfer *xfer)
 
        /* poll one time - will turn on interrupts */
        if (atmegadci_xfer_do_fifo(xfer)) {
-
                /* put transfer on interrupt queue */
                usbd_transfer_enqueue(&xfer->xroot->bus->intr_q, xfer);
 
@@ -1057,9 +1042,7 @@ atmegadci_standard_done(struct usb_xfer *xfer)
        xfer->td_transfer_cache = xfer->td_transfer_first;
 
        if (xfer->flags_int.control_xfr) {
-
                if (xfer->flags_int.control_hdr) {
-
                        err = atmegadci_standard_done_sub(xfer);
                }
                xfer->aframes = 1;
@@ -1069,7 +1052,6 @@ atmegadci_standard_done(struct usb_xfer *xfer)
                }
        }
        while (xfer->aframes != xfer->nframes) {
-
                err = atmegadci_standard_done_sub(xfer);
                xfer->aframes++;
 
@@ -1080,7 +1062,6 @@ atmegadci_standard_done(struct usb_xfer *xfer)
 
        if (xfer->flags_int.control_xfr &&
            !xfer->flags_int.control_act) {
-
                err = atmegadci_standard_done_sub(xfer);
        }
 done:
@@ -1298,7 +1279,6 @@ atmegadci_init(struct atmegadci_softc *sc)
 
        /* disable all endpoints */
        for (n = 0; n != ATMEGA_EP_MAX; n++) {
-
                /* select endpoint */
                ATMEGA_WRITE_1(sc, ATMEGA_UENUM, n);
 
@@ -1556,7 +1536,6 @@ static const struct atmegadci_config_desc atmegadci_co
                .bInterval = 255,
        },
 };
-
 #define        HSETW(ptr, val) ptr = { (uint8_t)(val), (uint8_t)((val) >> 8) }
 
 static const struct usb_hub_descriptor_min atmegadci_hubd = {
@@ -2036,11 +2015,9 @@ atmegadci_xfer_setup(struct usb_setup_params *parm)
         * compute maximum number of TDs
         */
        if ((xfer->endpoint->edesc->bmAttributes & UE_XFERTYPE) == UE_CONTROL) {
-
                ntd = xfer->nframes + 1 /* STATUS */ + 1 /* SYNC 1 */
                    + 1 /* SYNC 2 */ ;
        } else {
-
                ntd = xfer->nframes + 1 /* SYNC */ ;
        }
 
@@ -2071,11 +2048,9 @@ atmegadci_xfer_setup(struct usb_setup_params *parm)
        parm->size[0] += ((-parm->size[0]) & (USB_HOST_ALIGN - 1));
 
        for (n = 0; n != ntd; n++) {
-
                struct atmegadci_td *td;
 
                if (parm->buf) {
-
                        td = USB_ADD_BYTES(parm->buf, parm->size[0]);
 
                        /* init TD */
@@ -2112,7 +2087,6 @@ atmegadci_ep_init(struct usb_device *udev, struct usb_
            sc->sc_rt_addr, udev->device_index);
 
        if (udev->device_index != sc->sc_rt_addr) {
-
                if (udev->speed != USB_SPEED_FULL) {
                        /* not supported */
                        return;

Modified: head/sys/dev/usb/controller/avr32dci.c
==============================================================================
--- head/sys/dev/usb/controller/avr32dci.c      Tue Sep  1 21:26:00 2020        
(r365083)
+++ head/sys/dev/usb/controller/avr32dci.c      Tue Sep  1 21:26:44 2020        
(r365084)
@@ -116,7 +116,6 @@ static void avr32dci_root_intr(struct avr32dci_softc *
  */
 static const struct usb_hw_ep_profile
        avr32dci_ep_profile[4] = {
-
        [0] = {
                .max_in_frame_size = 64,
                .max_out_frame_size = 64,
@@ -200,7 +199,6 @@ avr32dci_clocks_on(struct avr32dci_softc *sc)
 {
        if (sc->sc_flags.clocks_off &&
            sc->sc_flags.port_powered) {
-
                DPRINTFN(5, "\n");
 
                /* turn on clocks */
@@ -216,7 +214,6 @@ static void
 avr32dci_clocks_off(struct avr32dci_softc *sc)
 {
        if (!sc->sc_flags.clocks_off) {
-
                DPRINTFN(5, "\n");
 
                avr32dci_mod_ctrl(sc, 0, AVR32_CTRL_DEV_EN_USBA);
@@ -488,7 +485,6 @@ repeat:
                count = td->remainder;
        }
        while (count > 0) {
-
                usbd_get_page(td->pc, td->offset, &buf_res);
 
                /* get correct length */
@@ -662,7 +658,6 @@ avr32dci_interrupt(struct avr32dci_softc *sc)
 
        /* check for any bus state change interrupts */
        if (status & AVR32_INT_ENDRESET) {
-
                DPRINTFN(5, "end of reset\n");
 
                /* set correct state */
@@ -684,7 +679,6 @@ avr32dci_interrupt(struct avr32dci_softc *sc)
         * milliseconds of inactivity on the USB BUS.
         */
        if (status & AVR32_INT_WAKE_UP) {
-
                DPRINTFN(5, "resume interrupt\n");
 
                if (sc->sc_flags.status_suspend) {
@@ -700,7 +694,6 @@ avr32dci_interrupt(struct avr32dci_softc *sc)
                        avr32dci_root_intr(sc);
                }
        } else if (status & AVR32_INT_DET_SUSPD) {
-
                DPRINTFN(5, "suspend interrupt\n");
 
                if (!sc->sc_flags.status_suspend) {
@@ -718,7 +711,6 @@ avr32dci_interrupt(struct avr32dci_softc *sc)
        }
        /* check for any endpoint interrupts */
        if (status & -AVR32_INT_EPT_INT(0)) {
-
                DPRINTFN(5, "real endpoint interrupt\n");
 
                avr32dci_interrupt_poll(sc);
@@ -786,7 +778,6 @@ avr32dci_setup_standard_chain(struct usb_xfer *xfer)
 
        if (xfer->flags_int.control_xfr) {
                if (xfer->flags_int.control_hdr) {
-
                        temp.func = &avr32dci_setup_rx;
                        temp.len = xfer->frlengths[0];
                        temp.pc = xfer->frbuffers + 0;
@@ -819,7 +810,6 @@ avr32dci_setup_standard_chain(struct usb_xfer *xfer)
                need_sync = 0;
        }
        while (x != xfer->nframes) {
-
                /* DATA0 / DATA1 message */
 
                temp.len = xfer->frlengths[x];
@@ -836,13 +826,11 @@ avr32dci_setup_standard_chain(struct usb_xfer *xfer)
                        }
                }
                if (temp.len == 0) {
-
                        /* make sure that we send an USB packet */
 
                        temp.short_pkt = 0;
 
                } else {
-
                        /* regular data transfer */
 
                        temp.short_pkt = (xfer->flags.force_short_xfer) ? 0 : 1;
@@ -859,7 +847,6 @@ avr32dci_setup_standard_chain(struct usb_xfer *xfer)
        }
 
        if (xfer->flags_int.control_xfr) {
-
                /* always setup a valid "pc" pointer for status and sync */
                temp.pc = xfer->frbuffers + 0;
                temp.len = 0;
@@ -874,7 +861,6 @@ avr32dci_setup_standard_chain(struct usb_xfer *xfer)
                }
                /* check if we should append a status stage */
                if (!xfer->flags_int.control_act) {
-
                        /*
                         * Send a DATA1 message and invert the current
                         * endpoint direction.
@@ -1028,9 +1014,7 @@ avr32dci_standard_done(struct usb_xfer *xfer)
        xfer->td_transfer_cache = xfer->td_transfer_first;
 
        if (xfer->flags_int.control_xfr) {
-
                if (xfer->flags_int.control_hdr) {
-
                        err = avr32dci_standard_done_sub(xfer);
                }
                xfer->aframes = 1;
@@ -1040,7 +1024,6 @@ avr32dci_standard_done(struct usb_xfer *xfer)
                }
        }
        while (xfer->aframes != xfer->nframes) {
-
                err = avr32dci_standard_done_sub(xfer);
                xfer->aframes++;
 
@@ -1051,7 +1034,6 @@ avr32dci_standard_done(struct usb_xfer *xfer)
 
        if (xfer->flags_int.control_xfr &&
            !xfer->flags_int.control_act) {
-
                err = avr32dci_standard_done_sub(xfer);
        }
 done:
@@ -1498,7 +1480,6 @@ static const struct avr32dci_config_desc avr32dci_conf
                .bInterval = 255,
        },
 };
-
 #define        HSETW(ptr, val) ptr = { (uint8_t)(val), (uint8_t)((val) >> 8) }
 
 static const struct usb_hub_descriptor_min avr32dci_hubd = {
@@ -1977,11 +1958,9 @@ avr32dci_xfer_setup(struct usb_setup_params *parm)
         * compute maximum number of TDs
         */
        if ((xfer->endpoint->edesc->bmAttributes & UE_XFERTYPE) == UE_CONTROL) {
-
                ntd = xfer->nframes + 1 /* STATUS */ + 1        /* SYNC 1 */
                    + 1 /* SYNC 2 */ ;
        } else {
-
                ntd = xfer->nframes + 1 /* SYNC */ ;
        }
 
@@ -2011,7 +1990,6 @@ avr32dci_xfer_setup(struct usb_setup_params *parm)
        parm->size[0] += ((-parm->size[0]) & (USB_HOST_ALIGN - 1));
 
        for (n = 0; n != ntd; n++) {
-
                struct avr32dci_td *td;
 
                if (parm->buf) {
@@ -2057,7 +2035,6 @@ avr32dci_ep_init(struct usb_device *udev, struct usb_e
            sc->sc_rt_addr, udev->device_index);
 
        if (udev->device_index != sc->sc_rt_addr) {
-
                if ((udev->speed != USB_SPEED_FULL) &&
                    (udev->speed != USB_SPEED_HIGH)) {
                        /* not supported */

Modified: head/sys/dev/usb/controller/dwc_otg.c
==============================================================================
--- head/sys/dev/usb/controller/dwc_otg.c       Tue Sep  1 21:26:00 2020        
(r365083)
+++ head/sys/dev/usb/controller/dwc_otg.c       Tue Sep  1 21:26:44 2020        
(r365084)
@@ -146,7 +146,6 @@ static void dwc_otg_interrupt_poll_locked(struct dwc_o
  * Here is a configuration that the chip supports.
  */
 static const struct usb_hw_ep_profile dwc_otg_ep_profile[1] = {
-
        [0] = {
                .max_in_frame_size = 64,/* fixed */
                .max_out_frame_size = 64,       /* fixed */
@@ -331,7 +330,6 @@ dwc_otg_init_fifo(struct dwc_otg_softc *sc, uint8_t mo
        }
 
        if (mode == DWC_MODE_HOST) {
-
                /* reset active endpoints */
                sc->sc_active_rx_ep = 0;
 
@@ -373,7 +371,6 @@ dwc_otg_init_fifo(struct dwc_otg_softc *sc, uint8_t mo
        }
 
        if (mode == DWC_MODE_DEVICE) {
-
            DWC_OTG_WRITE_4(sc, DOTG_GNPTXFSIZ,
                (0x10 << 16) | (tx_start / 4));
            fifo_size -= 0x40;
@@ -386,7 +383,6 @@ dwc_otg_init_fifo(struct dwc_otg_softc *sc, uint8_t mo
            sc->sc_active_rx_ep = 1;
 
            for (x = 1; x != sc->sc_dev_ep_max; x++) {
-
                pf = sc->sc_hw_ep_profile + x;
 
                pf->usb.max_out_frame_size = 1024 * 3;
@@ -509,7 +505,6 @@ dwc_otg_clocks_on(struct dwc_otg_softc *sc)
 {
        if (sc->sc_flags.clocks_off &&
            sc->sc_flags.port_powered) {
-
                DPRINTFN(5, "\n");
 
                /* TODO - platform specific */
@@ -522,7 +517,6 @@ static void
 dwc_otg_clocks_off(struct dwc_otg_softc *sc)
 {
        if (!sc->sc_flags.clocks_off) {
-
                DPRINTFN(5, "\n");
 
                /* TODO - platform specific */
@@ -1835,7 +1829,6 @@ dwc_otg_host_data_tx(struct dwc_otg_softc *sc, struct 
 
                if (hcint & (HCINT_ERRORS | HCINT_RETRY |
                    HCINT_ACK | HCINT_NYET)) {
-
                        if (!(hcint & HCINT_ERRORS))
                                td->errcnt = 0;
                }
@@ -1989,7 +1982,7 @@ send_pkt:
        }
 
        td->tx_bytes = 0;
-       
+
        for (x = 0; x != td->max_packet_count; x++) {
                uint32_t rem_bytes;
 
@@ -2153,12 +2146,10 @@ repeat:
 
        if ((td->ep_no == 0) && (temp != 0) &&
            (GRXSTSRD_CHNUM_GET(temp) == 0)) {
-
                if ((temp & GRXSTSRD_PKTSTS_MASK) !=
                    GRXSTSRD_STP_DATA &&
                    (temp & GRXSTSRD_PKTSTS_MASK) !=
                    GRXSTSRD_STP_COMPLETE) {
-
                        /* dump data - wrong direction */
                        dwc_otg_common_rx_ack(sc);
                } else {
@@ -2173,7 +2164,6 @@ repeat:
 
        /* fill in more TX data, if possible */
        if (td->tx_bytes != 0) {
-
                uint16_t cpkt;
 
                /* check if packets have been transferred */
@@ -2229,7 +2219,6 @@ repeat:
        temp = DWC_OTG_READ_4(sc, DOTG_DIEPTSIZ(td->ep_no));
 
        if (DXEPTSIZ_GET_NPKT(temp) != 0) {
-
                DPRINTFN(5, "busy ep=%d npkt=%d DIEPTSIZ=0x%08x "
                    "DIEPCTL=0x%08x\n", td->ep_no,
                    DXEPTSIZ_GET_NPKT(temp),
@@ -2242,7 +2231,6 @@ repeat:
 
        /* try to optimise by sending more data */
        if ((max_buffer != 0) && ((td->max_packet_size & 3) == 0)) {
-
                /* send multiple packets at the same time */
                mpkt = max_buffer / td->max_packet_size;
 
@@ -2351,7 +2339,6 @@ not_complete:
 
        if ((td->ep_no == 0) && (temp != 0) &&
            (GRXSTSRD_CHNUM_GET(temp) == 0)) {
-
                if ((temp & GRXSTSRD_PKTSTS_MASK) ==
                    GRXSTSRD_STP_DATA ||
                    (temp & GRXSTSRD_PKTSTS_MASK) ==
@@ -2519,7 +2506,6 @@ dwc_otg_update_host_transfer_schedule_locked(struct dw
        TAILQ_INIT(&head);
 
        if ((temp & 7) == 0) {
-
                /* reset the schedule */
                memset(sc->sc_tt_info, 0, sizeof(sc->sc_tt_info));
 
@@ -2667,7 +2653,6 @@ dwc_otg_update_host_transfer_schedule_locked(struct dw
        TAILQ_CONCAT(&sc->sc_bus.intr_q.head, &head, wait_entry);
 
        if ((temp & 7) == 0) {
-
                DPRINTFN(12, "SOF interrupt #%d, needsof=%d\n",
                    (int)temp, (int)sc->sc_needsof);
 
@@ -2729,7 +2714,6 @@ repeat:
        }
 
        if (sc->sc_last_rx_status == 0) {
-
                temp = DWC_OTG_READ_4(sc, DOTG_GINTSTS);
                if (temp & GINTSTS_RXFLVL) {
                        /* pop current status */
@@ -2738,7 +2722,6 @@ repeat:
                }
 
                if (sc->sc_last_rx_status != 0) {
-
                        uint8_t ep_no;
 
                        temp = sc->sc_last_rx_status &
@@ -2842,7 +2825,6 @@ dwc_otg_vbus_interrupt(struct dwc_otg_softc *sc, uint8
         * present else rely on the input to this function:
         */
        if ((is_on != 0) || (sc->sc_mode == DWC_MODE_HOST)) {
-
                if (!sc->sc_flags.status_vbus) {
                        sc->sc_flags.status_vbus = 1;
 
@@ -2938,7 +2920,6 @@ dwc_otg_interrupt(void *arg)
            DWC_OTG_READ_4(sc, DOTG_HFNUM));
 
        if (status & GINTSTS_USBRST) {
-
                /* set correct state */
                sc->sc_flags.status_device_mode = 1;
                sc->sc_flags.status_bus_reset = 0;
@@ -2956,7 +2937,6 @@ dwc_otg_interrupt(void *arg)
 
        /* check for any bus state change interrupts */
        if (status & GINTSTS_ENUMDONE) {
-
                uint32_t temp;
 
                DPRINTFN(5, "end of reset\n");
@@ -3070,13 +3050,11 @@ dwc_otg_interrupt(void *arg)
         * milliseconds of inactivity on the USB BUS.
         */
        if (status & GINTSTS_WKUPINT) {
-
                DPRINTFN(5, "resume interrupt\n");
 
                dwc_otg_resume_irq(sc);
 
        } else if (status & GINTSTS_USBSUSP) {
-
                DPRINTFN(5, "suspend interrupt\n");
 
                dwc_otg_suspend_irq(sc);
@@ -3177,7 +3155,6 @@ dwc_otg_setup_standard_chain(struct usb_xfer *xfer)
 
        if (xfer->flags_int.control_xfr) {
                if (xfer->flags_int.control_hdr) {
-
                        if (is_host)
                                temp.func = &dwc_otg_host_setup_tx;
                        else
@@ -3226,7 +3203,6 @@ dwc_otg_setup_standard_chain(struct usb_xfer *xfer)
                need_sync = 0;
        }
        while (x != xfer->nframes) {
-
                /* DATA0 / DATA1 message */
 
                temp.len = xfer->frlengths[x];
@@ -3243,13 +3219,11 @@ dwc_otg_setup_standard_chain(struct usb_xfer *xfer)
                        }
                }
                if (temp.len == 0) {
-
                        /* make sure that we send an USB packet */
 
                        temp.short_pkt = 0;
 
                } else {
-
                        /* regular data transfer */
 
                        temp.short_pkt = (xfer->flags.force_short_xfer ? 0 : 1);
@@ -3266,7 +3240,6 @@ dwc_otg_setup_standard_chain(struct usb_xfer *xfer)
        }
 
        if (xfer->flags_int.control_xfr) {
-
                /* always setup a valid "pc" pointer for status and sync */
                temp.pc = xfer->frbuffers + 0;
                temp.len = 0;
@@ -3282,7 +3255,6 @@ dwc_otg_setup_standard_chain(struct usb_xfer *xfer)
 
                /* check if we should append a status stage */
                if (!xfer->flags_int.control_act) {
-
                        /*
                         * Send a DATA1 message and invert the current
                         * endpoint direction.
@@ -3320,7 +3292,6 @@ dwc_otg_setup_standard_chain(struct usb_xfer *xfer)
        } else {
                /* check if we need to sync */
                if (need_sync) {
-
                        temp.pc = xfer->frbuffers + 0;
                        temp.len = 0;
                        temp.short_pkt = 0;
@@ -3337,7 +3308,6 @@ dwc_otg_setup_standard_chain(struct usb_xfer *xfer)
        xfer->td_transfer_last = td;
 
        if (is_host) {
-
                struct dwc_otg_softc *sc;
                uint32_t hcchar;
                uint32_t hcsplt;
@@ -3614,9 +3584,7 @@ dwc_otg_standard_done(struct usb_xfer *xfer)
        xfer->td_transfer_cache = xfer->td_transfer_first;
 
        if (xfer->flags_int.control_xfr) {
-
                if (xfer->flags_int.control_hdr) {
-
                        err = dwc_otg_standard_done_sub(xfer);
                }
                xfer->aframes = 1;
@@ -3626,7 +3594,6 @@ dwc_otg_standard_done(struct usb_xfer *xfer)
                }
        }
        while (xfer->aframes != xfer->nframes) {
-
                err = dwc_otg_standard_done_sub(xfer);
                xfer->aframes++;
 
@@ -3637,7 +3604,6 @@ dwc_otg_standard_done(struct usb_xfer *xfer)
 
        if (xfer->flags_int.control_xfr &&
            !xfer->flags_int.control_act) {
-
                err = dwc_otg_standard_done_sub(xfer);
        }
 done:
@@ -3721,7 +3687,6 @@ dwc_otg_set_stall(struct usb_device *udev,
 
        /* clear active OUT ep */
        if (!(ep_no & UE_DIR_IN)) {
-
                sc->sc_active_rx_ep &= ~(1U << (ep_no & UE_ADDR));
 
                if (sc->sc_last_rx_status != 0 &&
@@ -3851,11 +3816,9 @@ dwc_otg_device_state_change(struct usb_device *udev)
        /* deactivate all other endpoint but the control endpoint */
        if (udev->state == USB_STATE_CONFIGURED ||
            udev->state == USB_STATE_ADDRESSED) {
-
                USB_BUS_LOCK(&sc->sc_bus);
 
                for (x = 1; x != sc->sc_dev_ep_max; x++) {
-
                        if (x < sc->sc_dev_in_ep_max) {
                                DWC_OTG_WRITE_4(sc, DOTG_DIEPCTL(x),
                                    DIEPCTL_EPDIS);
@@ -4057,7 +4020,6 @@ dwc_otg_init(struct dwc_otg_softc *sc)
        DWC_OTG_WRITE_4(sc, DOTG_GINTMSK, sc->sc_irq_mask);
 
        if (sc->sc_mode == DWC_MODE_OTG || sc->sc_mode == DWC_MODE_DEVICE) {
-
                /* enable all endpoint interrupts */
                temp = DWC_OTG_READ_4(sc, DOTG_GHWCFG2);
                if (temp & GHWCFG2_MPI) {
@@ -4358,7 +4320,6 @@ static const struct dwc_otg_config_desc dwc_otg_confd 
                .bInterval = 255,
        },
 };
-
 #define        HSETW(ptr, val) ptr = { (uint8_t)(val), (uint8_t)((val) >> 8) }
 
 static const struct usb_hub_descriptor_min dwc_otg_hubd = {
@@ -4728,7 +4689,6 @@ tr_handle_set_port_feature:
 
        case UHF_PORT_RESET:
                if (sc->sc_flags.status_device_mode == 0) {
-
                        DPRINTF("PORT RESET\n");
 
                        /* enable PORT reset */
@@ -4880,11 +4840,9 @@ dwc_otg_xfer_setup(struct usb_setup_params *parm)
        ep_type = (xfer->endpoint->edesc->bmAttributes & UE_XFERTYPE);
 
        if (ep_type == UE_CONTROL) {
-
                ntd = xfer->nframes + 1 /* STATUS */ + 1 /* SYNC 1 */
                    + 1 /* SYNC 2 */ + 1 /* SYNC 3 */;
        } else {
-
                ntd = xfer->nframes + 1 /* SYNC */ ;
        }
 
@@ -4920,11 +4878,9 @@ dwc_otg_xfer_setup(struct usb_setup_params *parm)
        parm->size[0] += ((-parm->size[0]) & (USB_HOST_ALIGN - 1));
 
        for (n = 0; n != ntd; n++) {
-
                struct dwc_otg_td *td;
 
                if (parm->buf) {
-
                        td = USB_ADD_BYTES(parm->buf, parm->size[0]);
 
                        /* compute shared bandwidth resource index for TT */
@@ -4973,7 +4929,6 @@ dwc_otg_ep_init(struct usb_device *udev, struct usb_en
            sc->sc_rt_addr, udev->device_index);
 
        if (udev->device_index != sc->sc_rt_addr) {
-
                if (udev->flags.usb_mode == USB_MODE_DEVICE) {
                        if (udev->speed != USB_SPEED_FULL &&
                            udev->speed != USB_SPEED_HIGH) {

Modified: head/sys/dev/usb/controller/dwc_otg_fdt.c
==============================================================================
--- head/sys/dev/usb/controller/dwc_otg_fdt.c   Tue Sep  1 21:26:00 2020        
(r365083)
+++ head/sys/dev/usb/controller/dwc_otg_fdt.c   Tue Sep  1 21:26:44 2020        
(r365084)
@@ -107,7 +107,6 @@ dwc_otg_attach(device_t dev)
        /* get USB mode, if any */
        if (OF_getprop(ofw_bus_get_node(dev), "dr_mode",
            &usb_mode, sizeof(usb_mode)) > 0) {
-
                /* ensure proper zero termination */
                usb_mode[sizeof(usb_mode) - 1] = 0;
 

Modified: head/sys/dev/usb/controller/ehci.c
==============================================================================
--- head/sys/dev/usb/controller/ehci.c  Tue Sep  1 21:26:00 2020        
(r365083)
+++ head/sys/dev/usb/controller/ehci.c  Tue Sep  1 21:26:44 2020        
(r365084)
@@ -455,7 +455,6 @@ ehci_init(ehci_softc_t *sc)
                sitd->sitd_next =
                    sc->sc_intr_p_last[i | (EHCI_VIRTUAL_FRAMELIST_COUNT / 
2)]->qh_self;
 
-
                usbd_get_page(sc->sc_hw.isoc_hs_start_pc + i, 0, &buf_res);
 
                itd = buf_res.buffer;
@@ -498,7 +497,6 @@ ehci_init(ehci_softc_t *sc)
        usbd_get_page(&sc->sc_hw.async_start_pc, 0, &buf_res);
 
        if (1) {
-
                ehci_qh_t *qh;
 
                qh = buf_res.buffer;
@@ -1053,7 +1051,6 @@ _ehci_remove_qh(ehci_qh_t *sqh, ehci_qh_t *last)
 
        /* only remove if not removed from a queue */
        if (sqh->prev) {
-
                sqh->prev->next = sqh->next;
                sqh->prev->qh_link = sqh->qh_link;
 
@@ -1110,7 +1107,6 @@ ehci_non_isoc_done_sub(struct usb_xfer *xfer)
                usbd_xfer_set_frame_len(xfer, xfer->aframes, 0);
        }
        while (1) {
-
                usb_pc_cpu_invalidate(td->page_cache);
                status = hc32toh(sc, td->qtd_status);
 
@@ -1220,9 +1216,7 @@ ehci_non_isoc_done(struct usb_xfer *xfer)
        xfer->td_transfer_cache = xfer->td_transfer_first;
 
        if (xfer->flags_int.control_xfr) {
-
                if (xfer->flags_int.control_hdr) {
-
                        err = ehci_non_isoc_done_sub(xfer);
                }
                xfer->aframes = 1;
@@ -1232,7 +1226,6 @@ ehci_non_isoc_done(struct usb_xfer *xfer)
                }
        }
        while (xfer->aframes != xfer->nframes) {
-
                err = ehci_non_isoc_done_sub(xfer);
                xfer->aframes++;
 
@@ -1243,7 +1236,6 @@ ehci_non_isoc_done(struct usb_xfer *xfer)
 
        if (xfer->flags_int.control_xfr &&
            !xfer->flags_int.control_act) {
-
                err = ehci_non_isoc_done_sub(xfer);
        }
 done:
@@ -1580,9 +1572,7 @@ restart:
        td_next = temp->td_next;
 
        while (1) {
-
                if (temp->len == 0) {
-
                        if (temp->shortpkt) {
                                break;
                        }
@@ -1592,7 +1582,6 @@ restart:
                        average = 0;
 
                } else {
-
                        average = temp->average;
 
                        if (temp->len < average) {
@@ -1614,7 +1603,6 @@ restart:
                /* check if we are pre-computing */
 
                if (precompute) {
-
                        /* update remaining length */
 
                        temp->len -= average;
@@ -1629,9 +1617,7 @@ restart:
                        EHCI_QTD_SET_BYTES(average));
 
                if (average == 0) {
-
                        if (temp->auto_data_toggle == 0) {
-
                                /* update data toggle, ZLP case */
 
                                temp->qtd_status ^=
@@ -1651,11 +1637,9 @@ restart:
                        td->qtd_buffer_hi[3] = 0;
                        td->qtd_buffer_hi[4] = 0;
                } else {
-
                        uint8_t x;
 
                        if (temp->auto_data_toggle == 0) {
-
                                /* update data toggle */
 
                                if (howmany(average, temp->max_frame_size) & 1) 
{
@@ -1802,7 +1786,6 @@ ehci_setup_standard_chain(struct usb_xfer *xfer, ehci_
 
        if (xfer->flags_int.control_xfr) {
                if (xfer->flags_int.control_hdr) {
-
                        xfer->endpoint->toggle_next = 0;
 
                        temp.qtd_status &=
@@ -1831,7 +1814,6 @@ ehci_setup_standard_chain(struct usb_xfer *xfer, ehci_
        }
 
        while (x != xfer->nframes) {
-
                /* DATA0 / DATA1 message */
 
                temp.len = xfer->frlengths[x];
@@ -1858,13 +1840,11 @@ ehci_setup_standard_chain(struct usb_xfer *xfer, ehci_
                    EHCI_QTD_SET_TOGGLE(1));
 
                if (temp.len == 0) {
-
                        /* make sure that we send an USB packet */
 
                        temp.shortpkt = 0;
 
                } else {
-
                        /* regular data transfer */
 
                        temp.shortpkt = (xfer->flags.force_short_xfer) ? 0 : 1;
@@ -1886,7 +1866,6 @@ ehci_setup_standard_chain(struct usb_xfer *xfer, ehci_
 
        if (xfer->flags_int.control_xfr &&
            !xfer->flags_int.control_act) {
-
                /*
                 * Send a DATA1 message and invert the current endpoint
                 * direction.
@@ -1948,7 +1927,6 @@ ehci_setup_standard_chain(struct usb_xfer *xfer, ehci_
                if (methods != &ehci_device_intr_methods)
                        qh_endp |= EHCI_QH_SET_NRL(8);
        } else {
-
                if (usbd_get_speed(xfer->xroot->udev) == USB_SPEED_FULL) {
                        qh_endp |= EHCI_QH_SET_EPS(EHCI_QH_SPEED_FULL);
                } else {
@@ -2132,7 +2110,6 @@ ehci_isoc_hs_done(ehci_softc_t *sc, struct usb_xfer *x
                DPRINTFN(2, "status=0x%08x, len=%u\n", status, len);
 
                if (xfer->endpoint->usb_smask & (1 << td_no)) {
-
                        if (*plen >= len) {
                                /*
                                 * The length is valid. NOTE: The
@@ -2430,9 +2407,7 @@ ehci_device_isoc_fs_open(struct usb_xfer *xfer)
        /* initialize all TD's */
 
        for (ds = 0; ds != 2; ds++) {
-
                for (td = xfer->td_start[ds]; td; td = td->obj_next) {
-
                        td->sitd_portaddr = sitd_portaddr;
 
                        /*
@@ -2713,9 +2688,7 @@ ehci_device_isoc_hs_open(struct usb_xfer *xfer)
        /* initialize all TD's */
 
        for (ds = 0; ds != 2; ds++) {
-
                for (td = xfer->td_start[ds]; td; td = td->obj_next) {
-
                        /* set TD inactive */
                        td->itd_status[0] = 0;
                        td->itd_status[1] = 0;
@@ -2883,7 +2856,6 @@ ehci_device_isoc_hs_enter(struct usb_xfer *xfer)
                td_no++;
 
                if ((td_no == 8) || (nframes == 0)) {
-
                        /* the rest of the transfers are not active, if any */
                        for (x = td_no; x != 8; x++) {
                                td->itd_status[x] = 0;  /* not active */
@@ -3254,7 +3226,6 @@ ehci_roothub_exec(struct usb_device *udev,
                        break;
                case UHF_PORT_SUSPEND:
                        if ((v & EHCI_PS_SUSP) && (!(v & EHCI_PS_FPR))) {
-
                                /*
                                 * waking up a High Speed device is rather
                                 * complicated if
@@ -3514,7 +3485,6 @@ ehci_xfer_setup(struct usb_setup_params *parm)
         * compute maximum number of some structures
         */
        if (parm->methods == &ehci_device_ctrl_methods) {
-
                /*
                 * The proof for the "nqtd" formula is illustrated like
                 * this:
@@ -3556,7 +3526,6 @@ ehci_xfer_setup(struct usb_setup_params *parm)
                    + (xfer->max_data_length / xfer->max_hc_frame_size));
 
        } else if (parm->methods == &ehci_device_bulk_methods) {
-
                parm->hc_max_packet_size = 0x400;
                parm->hc_max_packet_count = 1;
                parm->hc_max_frame_size = EHCI_QTD_PAYLOAD_MAX;
@@ -3569,7 +3538,6 @@ ehci_xfer_setup(struct usb_setup_params *parm)
                    + (xfer->max_data_length / xfer->max_hc_frame_size));
 
        } else if (parm->methods == &ehci_device_intr_methods) {
-
                if (parm->speed == USB_SPEED_HIGH) {
                        parm->hc_max_packet_size = 0x400;
                        parm->hc_max_packet_count = 3;
@@ -3591,7 +3559,6 @@ ehci_xfer_setup(struct usb_setup_params *parm)
                    + (xfer->max_data_length / xfer->max_hc_frame_size));
 
        } else if (parm->methods == &ehci_device_isoc_fs_methods) {
-
                parm->hc_max_packet_size = 0x3FF;
                parm->hc_max_packet_count = 1;
                parm->hc_max_frame_size = 0x3FF;
@@ -3602,7 +3569,6 @@ ehci_xfer_setup(struct usb_setup_params *parm)
                nsitd = xfer->nframes;
 
        } else if (parm->methods == &ehci_device_isoc_hs_methods) {
-
                parm->hc_max_packet_size = 0x400;
                parm->hc_max_packet_count = 3;
                parm->hc_max_frame_size = 0xC00;
@@ -3614,7 +3580,6 @@ ehci_xfer_setup(struct usb_setup_params *parm)
                    usbd_xfer_get_fps_shift(xfer);
 
        } else {
-
                parm->hc_max_packet_size = 0x400;
                parm->hc_max_packet_count = 1;
                parm->hc_max_frame_size = 0x400;
@@ -3758,7 +3723,6 @@ ehci_ep_init(struct usb_device *udev, struct usb_endpo
            sc->sc_addr);
 
        if (udev->device_index != sc->sc_addr) {
-
                if ((udev->speed != USB_SPEED_HIGH) &&
                    ((udev->hs_hub_addr == 0) ||
                    (udev->hs_port_no == 0) ||
@@ -3815,9 +3779,7 @@ ehci_device_resume(struct usb_device *udev)
        USB_BUS_LOCK(udev->bus);
 
        TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) {
-
                if (xfer->xroot->udev == udev) {
-
                        methods = xfer->endpoint->methods;
 
                        if ((methods == &ehci_device_bulk_methods) ||
@@ -3849,9 +3811,7 @@ ehci_device_suspend(struct usb_device *udev)
        USB_BUS_LOCK(udev->bus);
 
        TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) {
-
                if (xfer->xroot->udev == udev) {
-
                        methods = xfer->endpoint->methods;
 
                        if ((methods == &ehci_device_bulk_methods) ||

Modified: head/sys/dev/usb/controller/ehci.h
==============================================================================
--- head/sys/dev/usb/controller/ehci.h  Tue Sep  1 21:26:00 2020        
(r365083)
+++ head/sys/dev/usb/controller/ehci.h  Tue Sep  1 21:26:44 2020        
(r365084)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to