From owner-p4-projects@FreeBSD.ORG Tue Aug 12 17:13:55 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D893A1065673; Tue, 12 Aug 2008 17:13:54 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82890106566C for ; Tue, 12 Aug 2008 17:13:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7C02D8FC08 for ; Tue, 12 Aug 2008 17:13:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m7CHDsAY056448 for ; Tue, 12 Aug 2008 17:13:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7CHDsPG056446 for perforce@freebsd.org; Tue, 12 Aug 2008 17:13:54 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 12 Aug 2008 17:13:54 GMT Message-Id: <200808121713.m7CHDsPG056446@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 147248 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2008 17:13:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=147248 Change 147248 by hselasky@hselasky_laptop001 on 2008/08/12 17:13:19 Style change: Remove superfluous parenthesis after "&". Script used: sed -i.bak -E 's/&\(([^, \)]*)\)/\&\1/' */*.c Affected files ... .. //depot/projects/usb/src/sys/dev/usb2/bluetooth/ng_ubt2.c#6 edit .. //depot/projects/usb/src/sys/dev/usb2/bluetooth/ubtbcmfw2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/controller/at91dci.c#7 edit .. //depot/projects/usb/src/sys/dev/usb2/controller/at91dci_atmelarm.c#6 edit .. //depot/projects/usb/src/sys/dev/usb2/controller/ehci2.c#10 edit .. //depot/projects/usb/src/sys/dev/usb2/controller/ehci2_pci.c#7 edit .. //depot/projects/usb/src/sys/dev/usb2/controller/musb2_otg.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/controller/ohci2.c#9 edit .. //depot/projects/usb/src/sys/dev/usb2/controller/ohci2_atmelarm.c#6 edit .. //depot/projects/usb/src/sys/dev/usb2/controller/ohci2_pci.c#6 edit .. //depot/projects/usb/src/sys/dev/usb2/controller/uhci2.c#7 edit .. //depot/projects/usb/src/sys/dev/usb2/controller/uhci2_pci.c#6 edit .. //depot/projects/usb/src/sys/dev/usb2/controller/usb2_controller.c#8 edit .. //depot/projects/usb/src/sys/dev/usb2/controller/uss820dci.c#6 edit .. //depot/projects/usb/src/sys/dev/usb2/controller/uss820dci_pccard.c#6 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_busdma.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_compat_linux.c#9 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_config_td.c#6 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_debug.c#2 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_dev.c#25 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_device.c#21 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_generic.c#19 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_handle_request.c#6 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_hub.c#14 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_lookup.c#6 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_msctest.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_process.c#6 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_request.c#12 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_sw_transfer.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_transfer.c#20 edit .. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_aue2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_axe2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_cdce2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_cue2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_kue2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_rue2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/ethernet/if_udav2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/image/uscanner2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/input/uhid2.c#6 edit .. //depot/projects/usb/src/sys/dev/usb2/input/ukbd2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/input/ums2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/misc/udbp2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/misc/ufm2.c#3 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/uark2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/ubsa2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/ubser2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/uchcom2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/ucycom2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/ufoma2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/uftdi2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/ugensa2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/uipaq2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/ulpt2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/umct2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/umodem2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/umoscom2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/uplcom2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/usb2_serial.c#6 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/uvisor2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/serial/uvscom2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/sound/uaudio2.c#10 edit .. //depot/projects/usb/src/sys/dev/usb2/storage/ata-usb2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/storage/umass2.c#4 edit .. //depot/projects/usb/src/sys/dev/usb2/storage/urio2.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/storage/ustorage2_fs.c#6 edit .. //depot/projects/usb/src/sys/dev/usb2/template/usb2_template.c#5 edit .. //depot/projects/usb/src/sys/dev/usb2/wlan/if_rum2.c#7 edit .. //depot/projects/usb/src/sys/dev/usb2/wlan/if_ural2.c#8 edit .. //depot/projects/usb/src/sys/dev/usb2/wlan/if_zyd2.c#8 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb2/bluetooth/ng_ubt2.c#6 (text+ko) ==== @@ -525,12 +525,12 @@ * Interface 0 */ - mtx_init(&(sc->sc_mtx), "ubt lock", NULL, MTX_DEF | MTX_RECURSE); + mtx_init(&sc->sc_mtx, "ubt lock", NULL, MTX_DEF | MTX_RECURSE); iface_index = 0; if (usb2_transfer_setup (uaa->device, &iface_index, sc->sc_xfer_if_0, ubt_config_if_0, - UBT_IF_0_N_TRANSFER, sc, &(sc->sc_mtx))) { + UBT_IF_0_N_TRANSFER, sc, &sc->sc_mtx)) { device_printf(dev, "Could not allocate transfers " "for interface 0!\n"); goto detach; @@ -585,7 +585,7 @@ iface_index = 1; if (usb2_transfer_setup (uaa->device, &iface_index, sc->sc_xfer_if_1, - isoc_setup, UBT_IF_1_N_TRANSFER, sc, &(sc->sc_mtx))) { + isoc_setup, UBT_IF_1_N_TRANSFER, sc, &sc->sc_mtx)) { device_printf(dev, "Could not allocate transfers " "for interface 1!\n"); goto detach; @@ -650,14 +650,14 @@ usb2_transfer_unsetup(sc->sc_xfer_if_1, UBT_IF_1_N_TRANSFER); - mtx_destroy(&(sc->sc_mtx)); + mtx_destroy(&sc->sc_mtx); /* destroy queues */ - NG_BT_MBUFQ_DESTROY(&(sc->sc_cmdq)); - NG_BT_MBUFQ_DESTROY(&(sc->sc_aclq)); - NG_BT_MBUFQ_DESTROY(&(sc->sc_scoq)); - NG_BT_MBUFQ_DESTROY(&(sc->sc_sciq)); + NG_BT_MBUFQ_DESTROY(&sc->sc_cmdq); + NG_BT_MBUFQ_DESTROY(&sc->sc_aclq); + NG_BT_MBUFQ_DESTROY(&sc->sc_scoq); + NG_BT_MBUFQ_DESTROY(&sc->sc_sciq); return (0); } @@ -684,7 +684,7 @@ /* get next mbuf, if any */ - NG_BT_MBUFQ_DEQUEUE(&(sc->sc_cmdq), m); + NG_BT_MBUFQ_DEQUEUE(&sc->sc_cmdq, m); if (m == NULL) { NG_UBT_INFO(sc, "HCI command queue is empty\n"); @@ -830,7 +830,7 @@ if (sc == NULL) { return; } - mtx_lock(&(sc->sc_mtx)); + mtx_lock(&sc->sc_mtx); m = sc->sc_intr_buffer; @@ -880,7 +880,7 @@ usb2_transfer_start(sc->sc_xfer_if_0[2]); - mtx_unlock(&(sc->sc_mtx)); + mtx_unlock(&sc->sc_mtx); return; } @@ -985,7 +985,7 @@ if (sc == NULL) { return; } - mtx_lock(&(sc->sc_mtx)); + mtx_lock(&sc->sc_mtx); m = sc->sc_bulk_in_buffer; @@ -1037,7 +1037,7 @@ usb2_transfer_start(sc->sc_xfer_if_0[1]); - mtx_unlock(&(sc->sc_mtx)); + mtx_unlock(&sc->sc_mtx); return; } @@ -1150,7 +1150,7 @@ NG_UBT_INFO(sc, "got complete SCO data " "frame, length=%d\n", hdr.length); - if (!NG_BT_MBUFQ_FULL(&(sc->sc_sciq))) { + if (!NG_BT_MBUFQ_FULL(&sc->sc_sciq)) { /* allocate a new mbuf */ @@ -1191,7 +1191,7 @@ m->m_pkthdr.len += xfer->frlengths[n]; m->m_len += xfer->frlengths[n]; - NG_BT_MBUFQ_ENQUEUE(&(sc->sc_sciq), m); + NG_BT_MBUFQ_ENQUEUE(&sc->sc_sciq, m); } } } @@ -1201,7 +1201,7 @@ case USB_ST_SETUP: tr_setup: - if (NG_BT_MBUFQ_LEN(&(sc->sc_sciq)) > 0) { + if (NG_BT_MBUFQ_LEN(&sc->sc_sciq) > 0) { ng_send_fn(sc->sc_node, NULL, ubt_isoc_read_complete, NULL, 0); } for (n = 0; n < xfer->nframes; n++) { @@ -1230,11 +1230,11 @@ if (sc == NULL) { return; } - mtx_lock(&(sc->sc_mtx)); + mtx_lock(&sc->sc_mtx); while (1) { - NG_BT_MBUFQ_DEQUEUE(&(sc->sc_sciq), m); + NG_BT_MBUFQ_DEQUEUE(&sc->sc_sciq, m); if (m == NULL) { break; @@ -1262,7 +1262,7 @@ } } - mtx_unlock(&(sc->sc_mtx)); + mtx_unlock(&sc->sc_mtx); return; } @@ -1353,7 +1353,7 @@ if (sc == NULL) { goto done; } - mtx_lock(&(sc->sc_mtx)); + mtx_lock(&sc->sc_mtx); /* Create Netgraph node */ if (ng_make_node_common(&typestruct, &sc->sc_node) != 0) { @@ -1375,7 +1375,7 @@ done: if (sc) { - mtx_unlock(&(sc->sc_mtx)); + mtx_unlock(&sc->sc_mtx); } return (0); } @@ -1394,7 +1394,7 @@ if (strcmp(name, NG_UBT_HOOK) != 0) { return (EINVAL); } - mtx_lock(&(sc->sc_mtx)); + mtx_lock(&sc->sc_mtx); if (sc->sc_hook != NULL) { error = EISCONN; @@ -1402,7 +1402,7 @@ sc->sc_hook = hook; } - mtx_unlock(&(sc->sc_mtx)); + mtx_unlock(&sc->sc_mtx); return (error); } @@ -1419,7 +1419,7 @@ NG_HOOK_FORCE_QUEUE(NG_HOOK_PEER(hook)); - mtx_lock(&(sc->sc_mtx)); + mtx_lock(&sc->sc_mtx); sc->sc_flags |= (UBT_FLAG_READ_STALL | UBT_FLAG_WRITE_STALL | @@ -1449,7 +1449,7 @@ usb2_transfer_start(sc->sc_xfer_if_1[3]); #endif - mtx_unlock(&(sc->sc_mtx)); + mtx_unlock(&sc->sc_mtx); return (0); } @@ -1466,7 +1466,7 @@ if (sc != NULL) { - mtx_lock(&(sc->sc_mtx)); + mtx_lock(&sc->sc_mtx); if (hook != sc->sc_hook) { error = EINVAL; @@ -1504,7 +1504,7 @@ sc->sc_hook = NULL; } - mtx_unlock(&(sc->sc_mtx)); + mtx_unlock(&sc->sc_mtx); } return (error); } @@ -1525,7 +1525,7 @@ NG_FREE_ITEM(item); return (EHOSTDOWN); } - mtx_lock(&(sc->sc_mtx)); + mtx_lock(&sc->sc_mtx); NGI_GET_MSG(item, msg); @@ -1688,7 +1688,7 @@ NG_RESPOND_MSG(error, node, item, rsp); NG_FREE_MSG(msg); - mtx_unlock(&(sc->sc_mtx)); + mtx_unlock(&sc->sc_mtx); return (error); } @@ -1710,7 +1710,7 @@ error = EHOSTDOWN; goto done; } - mtx_lock(&(sc->sc_mtx)); + mtx_lock(&sc->sc_mtx); if (hook != sc->sc_hook) { error = EINVAL; @@ -1767,7 +1767,7 @@ NG_FREE_ITEM(item); if (sc) { - mtx_unlock(&(sc->sc_mtx)); + mtx_unlock(&sc->sc_mtx); } return (error); } ==== //depot/projects/usb/src/sys/dev/usb2/bluetooth/ubtbcmfw2.c#5 (text+ko) ==== @@ -216,12 +216,12 @@ device_set_usb2_desc(dev); - mtx_init(&(sc->sc_mtx), "ubtbcmfw lock", NULL, MTX_DEF | MTX_RECURSE); + mtx_init(&sc->sc_mtx, "ubtbcmfw lock", NULL, MTX_DEF | MTX_RECURSE); iface_index = UBTBCMFW_IFACE_IDX; err = usb2_transfer_setup(uaa->device, &iface_index, sc->sc_xfer, ubtbcmfw_config, - UBTBCMFW_T_MAX, sc, &(sc->sc_mtx)); + UBTBCMFW_T_MAX, sc, &sc->sc_mtx); if (err) { device_printf(dev, "allocating USB transfers " "failed, err=%s\n", usb2_errstr(err)); @@ -231,8 +231,8 @@ usb2_set_iface_perm(uaa->device, uaa->info.bIfaceIndex, UID_ROOT, GID_OPERATOR, 0644); - err = usb2_fifo_attach(uaa->device, sc, &(sc->sc_mtx), - &ubtbcmfw_fifo_methods, &(sc->sc_fifo), + err = usb2_fifo_attach(uaa->device, sc, &sc->sc_mtx, + &ubtbcmfw_fifo_methods, &sc->sc_fifo, device_get_unit(dev), 0 - 1, uaa->info.bIfaceIndex); if (err) { goto detach; @@ -253,11 +253,11 @@ { struct ubtbcmfw_softc *sc = device_get_softc(dev); - usb2_fifo_detach(&(sc->sc_fifo)); + usb2_fifo_detach(&sc->sc_fifo); usb2_transfer_unsetup(sc->sc_xfer, UBTBCMFW_T_MAX); - mtx_destroy(&(sc->sc_mtx)); + mtx_destroy(&sc->sc_mtx); return (0); } @@ -406,9 +406,9 @@ } if (fflags & FWRITE) { /* clear stall first */ - mtx_lock(&(sc->sc_mtx)); + mtx_lock(&sc->sc_mtx); sc->sc_flags |= UBTBCMFW_FLAG_WRITE_STALL; - mtx_unlock(&(sc->sc_mtx)); + mtx_unlock(&sc->sc_mtx); if (usb2_fifo_alloc_buffer(fifo, sc->sc_xfer[0]->max_data_length, UBTBCMFW_IFQ_MAXLEN)) { ==== //depot/projects/usb/src/sys/dev/usb2/controller/at91dci.c#7 (text+ko) ==== @@ -285,7 +285,7 @@ DPRINTFN(5, "is_on=%u\n", is_on); - mtx_assert(&(udev->bus->mtx), MA_OWNED); + mtx_assert(&udev->bus->mtx, MA_OWNED); sc = AT9100_DCI_BUS2SC(udev->bus); @@ -744,7 +744,7 @@ struct usb2_xfer *xfer; repeat: - TAILQ_FOREACH(xfer, &(sc->sc_bus.intr_q.head), wait_entry) { + TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) { if (!at91dci_xfer_do_fifo(xfer)) { /* queue has been modified */ goto repeat; @@ -760,14 +760,14 @@ DPRINTFN(5, "vbus = %u\n", is_on); - mtx_lock(&(sc->sc_bus.mtx)); + mtx_lock(&sc->sc_bus.mtx); if (is_on) { if (!sc->sc_flags.status_vbus) { sc->sc_flags.status_vbus = 1; /* complete root HUB interrupt endpoint */ - usb2_sw_transfer(&(sc->sc_root_intr), + usb2_sw_transfer(&sc->sc_root_intr, &at91dci_root_intr_done); } } else { @@ -780,12 +780,12 @@ /* complete root HUB interrupt endpoint */ - usb2_sw_transfer(&(sc->sc_root_intr), + usb2_sw_transfer(&sc->sc_root_intr, &at91dci_root_intr_done); } } - mtx_unlock(&(sc->sc_bus.mtx)); + mtx_unlock(&sc->sc_bus.mtx); return; } @@ -795,13 +795,13 @@ { uint32_t status; - mtx_lock(&(sc->sc_bus.mtx)); + mtx_lock(&sc->sc_bus.mtx); status = AT91_UDP_READ_4(sc, AT91_UDP_ISR); status &= AT91_UDP_INT_DEFAULT; if (!status) { - mtx_unlock(&(sc->sc_bus.mtx)); + mtx_unlock(&sc->sc_bus.mtx); return; } /* acknowledge interrupts */ @@ -862,7 +862,7 @@ } /* complete root HUB interrupt endpoint */ - usb2_sw_transfer(&(sc->sc_root_intr), + usb2_sw_transfer(&sc->sc_root_intr, &at91dci_root_intr_done); } /* check for any endpoint interrupts */ @@ -873,7 +873,7 @@ at91dci_interrupt_poll(sc); } - mtx_unlock(&(sc->sc_bus.mtx)); + mtx_unlock(&sc->sc_bus.mtx); return; } @@ -1077,7 +1077,7 @@ DPRINTFN(15, "enable interrupts on endpoint %d\n", ep_no); /* put transfer on interrupt queue */ - usb2_transfer_enqueue(&(xfer->udev->bus->intr_q), xfer); + usb2_transfer_enqueue(&xfer->udev->bus->intr_q, xfer); /* start timeout, if any */ if (xfer->timeout != 0) { @@ -1262,7 +1262,7 @@ uint32_t csr_val; uint8_t csr_reg; - mtx_assert(&(udev->bus->mtx), MA_OWNED); + mtx_assert(&udev->bus->mtx, MA_OWNED); DPRINTFN(5, "pipe=%p\n", pipe); @@ -1386,7 +1386,7 @@ DPRINTFN(5, "pipe=%p\n", pipe); - mtx_assert(&(udev->bus->mtx), MA_OWNED); + mtx_assert(&udev->bus->mtx, MA_OWNED); /* check mode */ if (udev->flags.usb2_mode != USB_MODE_DEVICE) { @@ -1419,7 +1419,7 @@ sc->sc_bus.usbrev = USB_REV_1_1; sc->sc_bus.methods = &at91dci_bus_methods; - mtx_lock(&(sc->sc_bus.mtx)); + mtx_lock(&sc->sc_bus.mtx); /* turn on clocks */ @@ -1464,11 +1464,11 @@ at91dci_clocks_off(sc); - mtx_unlock(&(sc->sc_bus.mtx)); + mtx_unlock(&sc->sc_bus.mtx); /* catch any lost interrupts */ - at91dci_do_poll(&(sc->sc_bus)); + at91dci_do_poll(&sc->sc_bus); return (0); /* success */ } @@ -1476,7 +1476,7 @@ void at91dci_uninit(struct at91dci_softc *sc) { - mtx_lock(&(sc->sc_bus.mtx)); + mtx_lock(&sc->sc_bus.mtx); /* disable and clear all interrupts */ AT91_UDP_WRITE_4(sc, AT91_UDP_IDR, 0xFFFFFFFF); @@ -1491,7 +1491,7 @@ at91dci_pull_down(sc); at91dci_clocks_off(sc); - mtx_unlock(&(sc->sc_bus.mtx)); + mtx_unlock(&sc->sc_bus.mtx); return; } @@ -1513,10 +1513,10 @@ { struct at91dci_softc *sc = AT9100_DCI_BUS2SC(bus); - mtx_lock(&(sc->sc_bus.mtx)); + mtx_lock(&sc->sc_bus.mtx); at91dci_interrupt_poll(sc); at91dci_root_ctrl_poll(sc); - mtx_unlock(&(sc->sc_bus.mtx)); + mtx_unlock(&sc->sc_bus.mtx); return; } @@ -1701,7 +1701,7 @@ * pre-compute when the isochronous transfer will be finished: */ xfer->isoc_time_complete = - usb2_isoc_time_expand(&(sc->sc_bus), nframes) + temp + + usb2_isoc_time_expand(&sc->sc_bus, nframes) + temp + xfer->nframes; /* compute frame number for next insertion */ @@ -1856,7 +1856,7 @@ sc->sc_root_ctrl.xfer = xfer; usb2_config_td_queue_command( - &(sc->sc_config_td), NULL, &at91dci_root_ctrl_task, 0, 0); + &sc->sc_config_td, NULL, &at91dci_root_ctrl_task, 0, 0); return; } @@ -1888,7 +1888,7 @@ goto done; } /* buffer reset */ - std->ptr = USB_ADD_BYTES(&(sc->sc_hub_temp), 0); + std->ptr = USB_ADD_BYTES(&sc->sc_hub_temp, 0); std->len = 0; value = UGETW(std->req.wValue); @@ -2273,7 +2273,7 @@ static void at91dci_root_ctrl_poll(struct at91dci_softc *sc) { - usb2_sw_transfer(&(sc->sc_root_ctrl), + usb2_sw_transfer(&sc->sc_root_ctrl, &at91dci_root_ctrl_done); return; } ==== //depot/projects/usb/src/sys/dev/usb2/controller/at91dci_atmelarm.c#6 (text+ko) ==== @@ -152,7 +152,7 @@ /* get all DMA memory */ - if (usb2_bus_mem_alloc_all(&(sc->sc_dci.sc_bus), + if (usb2_bus_mem_alloc_all(&sc->sc_dci.sc_bus, USB_GET_DMA_TAG(dev), NULL)) { return (ENOMEM); } @@ -208,20 +208,20 @@ if (!(sc->sc_dci.sc_bus.bdev)) { goto error; } - device_set_ivars(sc->sc_dci.sc_bus.bdev, &(sc->sc_dci.sc_bus)); + device_set_ivars(sc->sc_dci.sc_bus.bdev, &sc->sc_dci.sc_bus); - err = usb2_config_td_setup(&(sc->sc_dci.sc_config_td), sc, - &(sc->sc_dci.sc_bus.mtx), NULL, 0, 4); + err = usb2_config_td_setup(&sc->sc_dci.sc_config_td, sc, + &sc->sc_dci.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_dci.sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - NULL, (void *)at91dci_interrupt, sc, &(sc->sc_dci.sc_intr_hdl)); + NULL, (void *)at91dci_interrupt, sc, &sc->sc_dci.sc_intr_hdl); #else err = bus_setup_intr(dev, sc->sc_dci.sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - (void *)at91dci_interrupt, sc, &(sc->sc_dci.sc_intr_hdl)); + (void *)at91dci_interrupt, sc, &sc->sc_dci.sc_intr_hdl); #endif if (err) { sc->sc_dci.sc_intr_hdl = NULL; @@ -229,16 +229,16 @@ } #if (__FreeBSD_version >= 700031) err = bus_setup_intr(dev, sc->sc_vbus_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - NULL, (void *)at91_vbus_interrupt, sc, &(sc->sc_vbus_intr_hdl)); + NULL, (void *)at91_vbus_interrupt, sc, &sc->sc_vbus_intr_hdl); #else err = bus_setup_intr(dev, sc->sc_vbus_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - (void *)at91_vbus_interrupt, sc, &(sc->sc_vbus_intr_hdl)); + (void *)at91_vbus_interrupt, sc, &sc->sc_vbus_intr_hdl); #endif if (err) { sc->sc_vbus_intr_hdl = NULL; goto error; } - err = at91dci_init(&(sc->sc_dci)); + err = at91dci_init(&sc->sc_dci); if (!err) { err = device_probe_and_attach(sc->sc_dci.sc_bus.bdev); } @@ -271,11 +271,11 @@ device_delete_all_children(dev); /* disable Transceiver */ - AT91_UDP_WRITE_4(&(sc->sc_dci), AT91_UDP_TXVC, AT91_UDP_TXVC_DIS); + AT91_UDP_WRITE_4(&sc->sc_dci, AT91_UDP_TXVC, AT91_UDP_TXVC_DIS); /* disable and clear all interrupts */ - AT91_UDP_WRITE_4(&(sc->sc_dci), AT91_UDP_IDR, 0xFFFFFFFF); - AT91_UDP_WRITE_4(&(sc->sc_dci), AT91_UDP_ICR, 0xFFFFFFFF); + AT91_UDP_WRITE_4(&sc->sc_dci, AT91_UDP_IDR, 0xFFFFFFFF); + AT91_UDP_WRITE_4(&sc->sc_dci, AT91_UDP_ICR, 0xFFFFFFFF); /* disable VBUS interrupt */ at91_pio_gpio_set_interrupt(VBUS_BASE, VBUS_MASK, 0); @@ -294,7 +294,7 @@ /* * only call at91_udp_uninit() after at91_udp_init() */ - at91dci_uninit(&(sc->sc_dci)); + at91dci_uninit(&sc->sc_dci); err = bus_teardown_intr(dev, sc->sc_dci.sc_irq_res, sc->sc_dci.sc_intr_hdl); @@ -310,9 +310,9 @@ sc->sc_dci.sc_io_res); sc->sc_dci.sc_io_res = NULL; } - usb2_config_td_unsetup(&(sc->sc_dci.sc_config_td)); + usb2_config_td_unsetup(&sc->sc_dci.sc_config_td); - usb2_bus_mem_free_all(&(sc->sc_dci.sc_bus), NULL); + usb2_bus_mem_free_all(&sc->sc_dci.sc_bus, NULL); /* disable clocks */ at91_pmc_clock_disable(sc->sc_iclk); @@ -333,7 +333,7 @@ if (err) return (err); - at91dci_uninit(&(sc->sc_dci)); + at91dci_uninit(&sc->sc_dci); return (0); } ==== //depot/projects/usb/src/sys/dev/usb2/controller/ehci2.c#10 (text+ko) ==== @@ -126,10 +126,10 @@ struct ehci_softc *sc = EHCI_BUS2SC(bus); uint32_t i; - cb(bus, &(sc->sc_hw.pframes_pc), &(sc->sc_hw.pframes_pg), + cb(bus, &sc->sc_hw.pframes_pc, &(sc->sc_hw.pframes_pg), sizeof(uint32_t) * EHCI_FRAMELIST_COUNT, EHCI_FRAMELIST_ALIGN); - cb(bus, &(sc->sc_hw.async_start_pc), &(sc->sc_hw.async_start_pg), + cb(bus, &sc->sc_hw.async_start_pc, &(sc->sc_hw.async_start_pg), sizeof(ehci_qh_t), EHCI_QH_ALIGN); for (i = 0; i != EHCI_VIRTUAL_FRAMELIST_COUNT; i++) { @@ -379,7 +379,7 @@ sitd->sitd_self; } - usb2_get_page(&(sc->sc_hw.pframes_pc), 0, &buf_res); + usb2_get_page(&sc->sc_hw.pframes_pc, 0, &buf_res); if (1) { uint32_t *pframes; @@ -399,7 +399,7 @@ /* setup sync list pointer */ EOWRITE4(sc, EHCI_PERIODICLISTBASE, buf_res.physaddr); - usb2_get_page(&(sc->sc_hw.async_start_pc), 0, &buf_res); + usb2_get_page(&sc->sc_hw.async_start_pc, 0, &buf_res); if (1) { @@ -409,7 +409,7 @@ /* initialize page cache pointer */ - qh->page_cache = &(sc->sc_hw.async_start_pc); + qh->page_cache = &sc->sc_hw.async_start_pc; /* store a pointer to the queue head */ @@ -435,7 +435,7 @@ } /* flush all cache into memory */ - usb2_bus_mem_flush_all(&(sc->sc_bus), &ehci_iterate_hw_softc); + usb2_bus_mem_flush_all(&sc->sc_bus, &ehci_iterate_hw_softc); #ifdef USB_DEBUG if (ehcidebug) { @@ -478,7 +478,7 @@ if (!err) { /* catch any lost interrupts */ - ehci_do_poll(&(sc->sc_bus)); + ehci_do_poll(&sc->sc_bus); } return (err); } @@ -502,7 +502,7 @@ DELAY(1000 * 300); /* XXX let stray task complete */ - usb2_callout_drain(&(sc->sc_tmo_pcd)); + usb2_callout_drain(&sc->sc_tmo_pcd); return; } @@ -575,10 +575,10 @@ /* restore things in case the bios doesn't */ EOWRITE4(sc, EHCI_CTRLDSSEGMENT, 0); - usb2_get_page(&(sc->sc_hw.pframes_pc), 0, &buf_res); + usb2_get_page(&sc->sc_hw.pframes_pc, 0, &buf_res); EOWRITE4(sc, EHCI_PERIODICLISTBASE, buf_res.physaddr); - usb2_get_page(&(sc->sc_hw.async_start_pc), 0, &buf_res); + usb2_get_page(&sc->sc_hw.async_start_pc, 0, &buf_res); EOWRITE4(sc, EHCI_ASYNCLISTADDR, buf_res.physaddr | EHCI_LINK_QH); EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs); @@ -623,7 +623,7 @@ DELAY(1000 * USB_RESUME_WAIT); /* catch any lost interrupts */ - ehci_do_poll(&(sc->sc_bus)); + ehci_do_poll(&sc->sc_bus); return; } @@ -963,7 +963,7 @@ return; } /* put transfer on interrupt queue */ - usb2_transfer_enqueue(&(xfer->udev->bus->intr_q), xfer); + usb2_transfer_enqueue(&xfer->udev->bus->intr_q, xfer); /* start timeout, if any */ if (xfer->timeout != 0) { @@ -1417,10 +1417,10 @@ /* acknowledge any PCD interrupt */ EOWRITE4(sc, EHCI_USBSTS, EHCI_STS_PCD); - usb2_sw_transfer(&(sc->sc_root_intr), + usb2_sw_transfer(&sc->sc_root_intr, &ehci_root_intr_done); - mtx_unlock(&(sc->sc_bus.mtx)); + mtx_unlock(&sc->sc_bus.mtx); return; } @@ -1430,7 +1430,7 @@ struct usb2_xfer *xfer; repeat: - TAILQ_FOREACH(xfer, &(sc->sc_bus.intr_q.head), wait_entry) { + TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) { /* * check if transfer is transferred */ @@ -1492,7 +1492,7 @@ sc->sc_eintrs &= ~EHCI_STS_PCD; EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs); - usb2_sw_transfer(&(sc->sc_root_intr), + usb2_sw_transfer(&sc->sc_root_intr, &ehci_root_intr_done); /* do not allow RHSC interrupts > 1 per second */ @@ -1541,10 +1541,10 @@ { struct ehci_softc *sc = EHCI_BUS2SC(bus); - mtx_lock(&(sc->sc_bus.mtx)); + mtx_lock(&sc->sc_bus.mtx); ehci_interrupt_poll(sc); ehci_root_ctrl_poll(sc); - mtx_unlock(&(sc->sc_bus.mtx)); + mtx_unlock(&sc->sc_bus.mtx); return; } @@ -2758,7 +2758,7 @@ * pre-compute when the isochronous transfer will be finished: */ xfer->isoc_time_complete = - usb2_isoc_time_expand(&(sc->sc_bus), nframes) + buf_offset + + usb2_isoc_time_expand(&sc->sc_bus, nframes) + buf_offset + ((xfer->nframes + 7) / 8); /* get the real number of frames */ @@ -3043,7 +3043,7 @@ sc->sc_root_ctrl.xfer = xfer; usb2_config_td_queue_command - (&(sc->sc_config_td), NULL, &ehci_root_ctrl_task, 0, 0); + (&sc->sc_config_td, NULL, &ehci_root_ctrl_task, 0, 0); return; } @@ -3358,7 +3358,7 @@ } else { /* Wait for reset to complete. */ l = usb2_config_td_sleep - (&(sc->sc_config_td), + (&sc->sc_config_td, (hz * USB_PORT_ROOT_RESET_DELAY) / 1000); } @@ -3371,7 +3371,7 @@ } else { /* Wait for HC to complete reset. */ l = usb2_config_td_sleep - (&(sc->sc_config_td), + (&sc->sc_config_td, (hz * EHCI_PORT_RESET_COMPLETE) / 1000); } @@ -3431,7 +3431,7 @@ static void ehci_root_ctrl_poll(struct ehci_softc *sc) { - usb2_sw_transfer(&(sc->sc_root_ctrl), + usb2_sw_transfer(&sc->sc_root_ctrl, &ehci_root_ctrl_done); return; } ==== //depot/projects/usb/src/sys/dev/usb2/controller/ehci2_pci.c#7 (text+ko) ==== @@ -234,7 +234,7 @@ } /* get all DMA memory */ - if (usb2_bus_mem_alloc_all(&(sc->sc_bus), + if (usb2_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self), &ehci_iterate_hw_softc)) { return ENOMEM; } @@ -337,7 +337,7 @@ sprintf(sc->sc_vendor, "(0x%04x)", pci_get_vendor(self)); } - err = usb2_config_td_setup(&(sc->sc_config_td), sc, &(sc->sc_bus.mtx), + err = usb2_config_td_setup(&sc->sc_config_td, sc, &(sc->sc_bus.mtx), NULL, 0, 4); if (err) { device_printf(self, "could not setup config thread!\n"); @@ -377,7 +377,7 @@ ehci_softc_t *sc = device_get_softc(self); device_t bdev; - usb2_config_td_stop(&(sc->sc_config_td)); + usb2_config_td_stop(&sc->sc_config_td); if (sc->sc_bus.bdev) { bdev = sc->sc_bus.bdev; @@ -418,9 +418,9 @@ sc->sc_io_res); sc->sc_io_res = NULL; } - usb2_config_td_unsetup(&(sc->sc_config_td)); + usb2_config_td_unsetup(&sc->sc_config_td); - usb2_bus_mem_free_all(&(sc->sc_bus), &ehci_iterate_hw_softc); + usb2_bus_mem_free_all(&sc->sc_bus, &ehci_iterate_hw_softc); return (0); } ==== //depot/projects/usb/src/sys/dev/usb2/controller/musb2_otg.c#3 (text+ko) ==== @@ -239,7 +239,7 @@ } else { /* Wait for reset to complete. */ if (usb2_config_td_sleep - (&(sc->sc_config_td), + (&sc->sc_config_td, (hz / 100))) { /* ignore */ } @@ -793,7 +793,7 @@ struct usb2_xfer *xfer; repeat: - TAILQ_FOREACH(xfer, &(sc->sc_bus.intr_q.head), wait_entry) { + TAILQ_FOREACH(xfer, &sc->sc_bus.intr_q.head, wait_entry) { if (!musbotg_xfer_do_fifo(xfer)) { /* queue has been modified */ goto repeat; @@ -809,14 +809,14 @@ DPRINTFN(4, "vbus = %u\n", is_on); - mtx_lock(&(sc->sc_bus.mtx)); + mtx_lock(&sc->sc_bus.mtx); if (is_on) { if (!sc->sc_flags.status_vbus) { sc->sc_flags.status_vbus = 1; /* complete root HUB interrupt endpoint */ - usb2_sw_transfer(&(sc->sc_root_intr), + usb2_sw_transfer(&sc->sc_root_intr, &musbotg_root_intr_done); } } else { @@ -829,12 +829,12 @@ /* complete root HUB interrupt endpoint */ - usb2_sw_transfer(&(sc->sc_root_intr), + usb2_sw_transfer(&sc->sc_root_intr, &musbotg_root_intr_done); } } - mtx_unlock(&(sc->sc_bus.mtx)); + mtx_unlock(&sc->sc_bus.mtx); return; } @@ -847,7 +847,7 @@ uint8_t tx_status; uint8_t temp; - mtx_lock(&(sc->sc_bus.mtx)); + mtx_lock(&sc->sc_bus.mtx); /* read all interrupt registers */ usb_status = MUSB2_READ_1(sc, MUSB2_REG_INTUSB); @@ -917,7 +917,7 @@ } /* complete root HUB interrupt endpoint */ - usb2_sw_transfer(&(sc->sc_root_intr), + usb2_sw_transfer(&sc->sc_root_intr, &musbotg_root_intr_done); } /* check for any endpoint interrupts */ @@ -929,7 +929,7 @@ musbotg_interrupt_poll(sc); } - mtx_unlock(&(sc->sc_bus.mtx)); + mtx_unlock(&sc->sc_bus.mtx); >>> TRUNCATED FOR MAIL (1000 lines) <<<