Date: Sun, 31 May 2009 18:43:05 GMT From: Andrew Thompson <thompsa@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 163190 for review Message-ID: <200905311843.n4VIh5ne020829@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=163190 Change 163190 by thompsa@thompsa_burger on 2009/05/31 18:42:57 Rename usb pipes to endpoints as it better represents what they are. Affected files ... .. //depot/projects/usb_buf/src/sys/dev/usb/controller/at91dci.c#6 edit .. //depot/projects/usb_buf/src/sys/dev/usb/controller/atmegadci.c#6 edit .. //depot/projects/usb_buf/src/sys/dev/usb/controller/avr32dci.c#5 edit .. //depot/projects/usb_buf/src/sys/dev/usb/controller/ehci.c#6 edit .. //depot/projects/usb_buf/src/sys/dev/usb/controller/musb_otg.c#6 edit .. //depot/projects/usb_buf/src/sys/dev/usb/controller/ohci.c#6 edit .. //depot/projects/usb_buf/src/sys/dev/usb/controller/uhci.c#6 edit .. //depot/projects/usb_buf/src/sys/dev/usb/controller/uss820dci.c#6 edit .. //depot/projects/usb_buf/src/sys/dev/usb/serial/ugensa.c#6 edit .. //depot/projects/usb_buf/src/sys/dev/usb/serial/umct.c#6 edit .. //depot/projects/usb_buf/src/sys/dev/usb/storage/ustorage_fs.c#6 edit .. //depot/projects/usb_buf/src/sys/dev/usb/usb.h#3 edit .. //depot/projects/usb_buf/src/sys/dev/usb/usb_compat_linux.c#6 edit .. //depot/projects/usb_buf/src/sys/dev/usb/usb_compat_linux.h#5 edit .. //depot/projects/usb_buf/src/sys/dev/usb/usb_controller.h#5 edit .. //depot/projects/usb_buf/src/sys/dev/usb/usb_core.h#6 edit .. //depot/projects/usb_buf/src/sys/dev/usb/usb_debug.c#5 edit .. //depot/projects/usb_buf/src/sys/dev/usb/usb_debug.h#4 edit .. //depot/projects/usb_buf/src/sys/dev/usb/usb_dev.c#6 edit .. //depot/projects/usb_buf/src/sys/dev/usb/usb_device.c#6 edit .. //depot/projects/usb_buf/src/sys/dev/usb/usb_device.h#6 edit .. //depot/projects/usb_buf/src/sys/dev/usb/usb_generic.c#6 edit .. //depot/projects/usb_buf/src/sys/dev/usb/usb_handle_request.c#4 edit .. //depot/projects/usb_buf/src/sys/dev/usb/usb_hub.c#6 edit .. //depot/projects/usb_buf/src/sys/dev/usb/usb_request.c#6 edit .. //depot/projects/usb_buf/src/sys/dev/usb/usb_transfer.c#6 edit .. //depot/projects/usb_buf/src/sys/dev/usb/usb_transfer.h#5 edit Differences ... ==== //depot/projects/usb_buf/src/sys/dev/usb/controller/at91dci.c#6 (text+ko) ==== @@ -687,7 +687,7 @@ done: sc = AT9100_DCI_BUS2SC(xfer->xroot->bus); - temp = (xfer->endpoint & UE_ADDR); + temp = (xfer->endpointno & UE_ADDR); /* update FIFO bank flag and multi buffer */ if (td->fifo_bank) { @@ -864,7 +864,7 @@ uint8_t need_sync; DPRINTFN(9, "addr=%d endpt=%d sumlen=%d speed=%d\n", - xfer->address, UE_GET_ADDR(xfer->endpoint), + xfer->address, UE_GET_ADDR(xfer->endpointno), xfer->sumlen, usb2_get_speed(xfer->xroot->udev)); temp.max_frame_size = xfer->max_frame_size; @@ -882,7 +882,7 @@ temp.did_stall = !xfer->flags_int.control_stall; sc = AT9100_DCI_BUS2SC(xfer->xroot->bus); - ep_no = (xfer->endpoint & UE_ADDR); + ep_no = (xfer->endpointno & UE_ADDR); /* check if we should prepend a setup message */ @@ -908,7 +908,7 @@ } if (x != xfer->nframes) { - if (xfer->endpoint & UE_DIR_IN) { + if (xfer->endpointno & UE_DIR_IN) { temp.func = &at91dci_data_tx; need_sync = 1; } else { @@ -984,7 +984,7 @@ * Send a DATA1 message and invert the current * endpoint direction. */ - if (xfer->endpoint & UE_DIR_IN) { + if (xfer->endpointno & UE_DIR_IN) { temp.func = &at91dci_data_rx; need_sync = 0; } else { @@ -1034,7 +1034,7 @@ if (at91dci_xfer_do_fifo(xfer)) { struct at91dci_softc *sc = AT9100_DCI_BUS2SC(xfer->xroot->bus); - uint8_t ep_no = xfer->endpoint & UE_ADDR; + uint8_t ep_no = xfer->endpointno & UE_ADDR; /* * Only enable the endpoint interrupt when we are actually @@ -1139,8 +1139,8 @@ { usb_error_t err = 0; - DPRINTFN(13, "xfer=%p pipe=%p transfer done\n", - xfer, xfer->pipe); + DPRINTFN(13, "xfer=%p endpoint=%p transfer done\n", + xfer, xfer->endpoint); /* reset scanner */ @@ -1191,11 +1191,11 @@ USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); - DPRINTFN(2, "xfer=%p, pipe=%p, error=%d\n", - xfer, xfer->pipe, error); + DPRINTFN(2, "xfer=%p, endpoint=%p, error=%d\n", + xfer, xfer->endpoint, error); if (xfer->flags_int.usb_mode == USB_MODE_DEVICE) { - ep_no = (xfer->endpoint & UE_ADDR); + ep_no = (xfer->endpointno & UE_ADDR); /* disable endpoint interrupt */ AT91_UDP_WRITE_4(sc, AT91_UDP_IDR, AT91_UDP_INT_EP(ep_no)); @@ -1208,7 +1208,7 @@ static void at91dci_set_stall(struct usb_device *udev, struct usb_xfer *xfer, - struct usb_pipe *pipe) + struct usb_endpoint *ep) { struct at91dci_softc *sc; uint32_t csr_val; @@ -1216,7 +1216,7 @@ USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED); - DPRINTFN(5, "pipe=%p\n", pipe); + DPRINTFN(5, "endpoint=%p\n", ep); if (xfer) { /* cancel any ongoing transfers */ @@ -1224,7 +1224,7 @@ } /* set FORCESTALL */ sc = AT9100_DCI_BUS2SC(udev->bus); - csr_reg = (pipe->edesc->bEndpointAddress & UE_ADDR); + csr_reg = (ep->edesc->bEndpointAddress & UE_ADDR); csr_reg = AT91_UDP_CSR(csr_reg); csr_val = AT91_UDP_READ_4(sc, csr_reg); AT91_CSR_ACK(csr_val, AT91_UDP_CSR_FORCESTALL); @@ -1328,12 +1328,12 @@ } static void -at91dci_clear_stall(struct usb_device *udev, struct usb_pipe *pipe) +at91dci_clear_stall(struct usb_device *udev, struct usb_endpoint *ep) { struct at91dci_softc *sc; struct usb_endpoint_descriptor *ed; - DPRINTFN(5, "pipe=%p\n", pipe); + DPRINTFN(5, "endpoint=%p\n", ep); USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED); @@ -1346,7 +1346,7 @@ sc = AT9100_DCI_BUS2SC(udev->bus); /* get endpoint descriptor */ - ed = pipe->edesc; + ed = ep->edesc; /* reset endpoint */ at91dci_clear_stall_sub(sc, @@ -1598,7 +1598,7 @@ uint32_t nframes; DPRINTFN(6, "xfer=%p next=%d nframes=%d\n", - xfer, xfer->pipe->isoc_next, xfer->nframes); + xfer, xfer->endpoint->isoc_next, xfer->nframes); /* get the current frame index */ @@ -1608,25 +1608,25 @@ * check if the frame index is within the window where the frames * will be inserted */ - temp = (nframes - xfer->pipe->isoc_next) & AT91_UDP_FRM_MASK; + temp = (nframes - xfer->endpoint->isoc_next) & AT91_UDP_FRM_MASK; - if ((xfer->pipe->is_synced == 0) || + if ((xfer->endpoint->is_synced == 0) || (temp < xfer->nframes)) { /* - * If there is data underflow or the pipe queue is + * If there is data underflow or the endpoint queue is * empty we schedule the transfer a few frames ahead * of the current frame position. Else two isochronous * transfers might overlap. */ - xfer->pipe->isoc_next = (nframes + 3) & AT91_UDP_FRM_MASK; - xfer->pipe->is_synced = 1; - DPRINTFN(3, "start next=%d\n", xfer->pipe->isoc_next); + xfer->endpoint->isoc_next = (nframes + 3) & AT91_UDP_FRM_MASK; + xfer->endpoint->is_synced = 1; + DPRINTFN(3, "start next=%d\n", xfer->endpoint->isoc_next); } /* * compute how many milliseconds the insertion is ahead of the * current frame position: */ - temp = (xfer->pipe->isoc_next - nframes) & AT91_UDP_FRM_MASK; + temp = (xfer->endpoint->isoc_next - nframes) & AT91_UDP_FRM_MASK; /* * pre-compute when the isochronous transfer will be finished: @@ -1636,7 +1636,7 @@ xfer->nframes; /* compute frame number for next insertion */ - xfer->pipe->isoc_next += xfer->nframes; + xfer->endpoint->isoc_next += xfer->nframes; /* setup TDs */ at91dci_setup_standard_chain(xfer); @@ -2208,7 +2208,7 @@ */ if (ntd) { - ep_no = xfer->endpoint & UE_ADDR; + ep_no = xfer->endpointno & UE_ADDR; at91dci_get_hw_ep_profile(parm->udev, &pf, ep_no); if (pf == NULL) { @@ -2259,12 +2259,12 @@ static void at91dci_pipe_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc, - struct usb_pipe *pipe) + struct usb_endpoint *ep) { struct at91dci_softc *sc = AT9100_DCI_BUS2SC(udev->bus); - DPRINTFN(2, "pipe=%p, addr=%d, endpt=%d, mode=%d (%d)\n", - pipe, udev->address, + DPRINTFN(2, "endpoint=%p, addr=%d, endpt=%d, mode=%d (%d)\n", + ep, udev->address, edesc->bEndpointAddress, udev->flags.usb_mode, sc->sc_rt_addr); @@ -2280,16 +2280,16 @@ } switch (edesc->bmAttributes & UE_XFERTYPE) { case UE_CONTROL: - pipe->methods = &at91dci_device_ctrl_methods; + ep->methods = &at91dci_device_ctrl_methods; break; case UE_INTERRUPT: - pipe->methods = &at91dci_device_intr_methods; + ep->methods = &at91dci_device_intr_methods; break; case UE_ISOCHRONOUS: - pipe->methods = &at91dci_device_isoc_fs_methods; + ep->methods = &at91dci_device_isoc_fs_methods; break; case UE_BULK: - pipe->methods = &at91dci_device_bulk_methods; + ep->methods = &at91dci_device_bulk_methods; break; default: /* do nothing */ ==== //depot/projects/usb_buf/src/sys/dev/usb/controller/atmegadci.c#6 (text+ko) ==== @@ -767,7 +767,7 @@ uint8_t need_sync; DPRINTFN(9, "addr=%d endpt=%d sumlen=%d speed=%d\n", - xfer->address, UE_GET_ADDR(xfer->endpoint), + xfer->address, UE_GET_ADDR(xfer->endpointno), xfer->sumlen, usb2_get_speed(xfer->xroot->udev)); temp.max_frame_size = xfer->max_frame_size; @@ -785,7 +785,7 @@ temp.did_stall = !xfer->flags_int.control_stall; sc = ATMEGA_BUS2SC(xfer->xroot->bus); - ep_no = (xfer->endpoint & UE_ADDR); + ep_no = (xfer->endpointno & UE_ADDR); /* check if we should prepend a setup message */ @@ -811,7 +811,7 @@ } if (x != xfer->nframes) { - if (xfer->endpoint & UE_DIR_IN) { + if (xfer->endpointno & UE_DIR_IN) { temp.func = &atmegadci_data_tx; need_sync = 1; } else { @@ -886,7 +886,7 @@ * Send a DATA1 message and invert the current * endpoint direction. */ - if (xfer->endpoint & UE_DIR_IN) { + if (xfer->endpointno & UE_DIR_IN) { temp.func = &atmegadci_data_rx; need_sync = 0; } else { @@ -1022,8 +1022,8 @@ { usb_error_t err = 0; - DPRINTFN(13, "xfer=%p pipe=%p transfer done\n", - xfer, xfer->pipe); + DPRINTFN(13, "xfer=%p endpoint=%p transfer done\n", + xfer, xfer->endpoint); /* reset scanner */ @@ -1074,11 +1074,11 @@ USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); - DPRINTFN(9, "xfer=%p, pipe=%p, error=%d\n", - xfer, xfer->pipe, error); + DPRINTFN(9, "xfer=%p, endpoint=%p, error=%d\n", + xfer, xfer->endpoint, error); if (xfer->flags_int.usb_mode == USB_MODE_DEVICE) { - ep_no = (xfer->endpoint & UE_ADDR); + ep_no = (xfer->endpointno & UE_ADDR); /* select endpoint number */ ATMEGA_WRITE_1(sc, ATMEGA_UENUM, ep_no); @@ -1094,14 +1094,14 @@ static void atmegadci_set_stall(struct usb_device *udev, struct usb_xfer *xfer, - struct usb_pipe *pipe) + struct usb_endpoint *ep) { struct atmegadci_softc *sc; uint8_t ep_no; USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED); - DPRINTFN(5, "pipe=%p\n", pipe); + DPRINTFN(5, "endpoint=%p\n", ep); if (xfer) { /* cancel any ongoing transfers */ @@ -1109,7 +1109,7 @@ } sc = ATMEGA_BUS2SC(udev->bus); /* get endpoint number */ - ep_no = (pipe->edesc->bEndpointAddress & UE_ADDR); + ep_no = (ep->edesc->bEndpointAddress & UE_ADDR); /* select endpoint number */ ATMEGA_WRITE_1(sc, ATMEGA_UENUM, ep_no); /* set stall */ @@ -1178,12 +1178,12 @@ } static void -atmegadci_clear_stall(struct usb_device *udev, struct usb_pipe *pipe) +atmegadci_clear_stall(struct usb_device *udev, struct usb_endpoint *ep) { struct atmegadci_softc *sc; struct usb_endpoint_descriptor *ed; - DPRINTFN(5, "pipe=%p\n", pipe); + DPRINTFN(5, "endpoint=%p\n", ep); USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED); @@ -1196,7 +1196,7 @@ sc = ATMEGA_BUS2SC(udev->bus); /* get endpoint descriptor */ - ed = pipe->edesc; + ed = ep->edesc; /* reset endpoint */ atmegadci_clear_stall_sub(sc, @@ -1415,7 +1415,7 @@ uint32_t nframes; DPRINTFN(6, "xfer=%p next=%d nframes=%d\n", - xfer, xfer->pipe->isoc_next, xfer->nframes); + xfer, xfer->endpoint->isoc_next, xfer->nframes); /* get the current frame index */ @@ -1429,9 +1429,9 @@ * check if the frame index is within the window where the frames * will be inserted */ - temp = (nframes - xfer->pipe->isoc_next) & ATMEGA_FRAME_MASK; + temp = (nframes - xfer->endpoint->isoc_next) & ATMEGA_FRAME_MASK; - if ((xfer->pipe->is_synced == 0) || + if ((xfer->endpoint->is_synced == 0) || (temp < xfer->nframes)) { /* * If there is data underflow or the pipe queue is @@ -1439,15 +1439,15 @@ * of the current frame position. Else two isochronous * transfers might overlap. */ - xfer->pipe->isoc_next = (nframes + 3) & ATMEGA_FRAME_MASK; - xfer->pipe->is_synced = 1; - DPRINTFN(3, "start next=%d\n", xfer->pipe->isoc_next); + xfer->endpoint->isoc_next = (nframes + 3) & ATMEGA_FRAME_MASK; + xfer->endpoint->is_synced = 1; + DPRINTFN(3, "start next=%d\n", xfer->endpoint->isoc_next); } /* * compute how many milliseconds the insertion is ahead of the * current frame position: */ - temp = (xfer->pipe->isoc_next - nframes) & ATMEGA_FRAME_MASK; + temp = (xfer->endpoint->isoc_next - nframes) & ATMEGA_FRAME_MASK; /* * pre-compute when the isochronous transfer will be finished: @@ -1457,7 +1457,7 @@ xfer->nframes; /* compute frame number for next insertion */ - xfer->pipe->isoc_next += xfer->nframes; + xfer->endpoint->isoc_next += xfer->nframes; /* setup TDs */ atmegadci_setup_standard_chain(xfer); @@ -2022,7 +2022,7 @@ /* * compute maximum number of TDs */ - if ((xfer->pipe->edesc->bmAttributes & UE_XFERTYPE) == UE_CONTROL) { + if ((xfer->endpoint->edesc->bmAttributes & UE_XFERTYPE) == UE_CONTROL) { ntd = xfer->nframes + 1 /* STATUS */ + 1 /* SYNC 1 */ + 1 /* SYNC 2 */ ; @@ -2045,7 +2045,7 @@ /* * get profile stuff */ - ep_no = xfer->endpoint & UE_ADDR; + ep_no = xfer->endpointno & UE_ADDR; atmegadci_get_hw_ep_profile(parm->udev, &pf, ep_no); if (pf == NULL) { @@ -2089,12 +2089,12 @@ static void atmegadci_pipe_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc, - struct usb_pipe *pipe) + struct usb_endpoint *ep) { struct atmegadci_softc *sc = ATMEGA_BUS2SC(udev->bus); - DPRINTFN(2, "pipe=%p, addr=%d, endpt=%d, mode=%d (%d,%d)\n", - pipe, udev->address, + DPRINTFN(2, "endpoint=%p, addr=%d, endpt=%d, mode=%d (%d,%d)\n", + ep, udev->address, edesc->bEndpointAddress, udev->flags.usb_mode, sc->sc_rt_addr, udev->device_index); @@ -2109,9 +2109,9 @@ return; } if ((edesc->bmAttributes & UE_XFERTYPE) == UE_ISOCHRONOUS) - pipe->methods = &atmegadci_device_isoc_fs_methods; + ep->methods = &atmegadci_device_isoc_fs_methods; else - pipe->methods = &atmegadci_device_non_isoc_methods; + ep->methods = &atmegadci_device_non_isoc_methods; } } ==== //depot/projects/usb_buf/src/sys/dev/usb/controller/avr32dci.c#5 (text+ko) ==== @@ -1062,7 +1062,7 @@ static void avr32dci_set_stall(struct usb_device *udev, struct usb_xfer *xfer, - struct usb_pipe *pipe) + struct usb_endpoint *ep) { struct avr32dci_softc *sc; uint8_t ep_no; @@ -1148,7 +1148,7 @@ } static void -avr32dci_clear_stall(struct usb_device *udev, struct usb_pipe *pipe) +avr32dci_clear_stall(struct usb_device *udev, struct usb_endpoint *ep) { struct avr32dci_softc *sc; struct usb_endpoint_descriptor *ed; @@ -2026,7 +2026,7 @@ static void avr32dci_pipe_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc, - struct usb_pipe *pipe) + struct usb_endpoint *ep) { struct avr32dci_softc *sc = AVR32_BUS2SC(udev->bus); ==== //depot/projects/usb_buf/src/sys/dev/usb/controller/ehci.c#6 (text+ko) ==== @@ -1190,14 +1190,14 @@ /* update data toggle */ - xfer->pipe->toggle_next = + xfer->endpoint->toggle_next = (status & EHCI_QTD_TOGGLE_MASK) ? 1 : 0; #if USB_DEBUG if (status & EHCI_QTD_STATERRS) { 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, + xfer->address, xfer->endpointno, xfer->aframes, (status & EHCI_QTD_ACTIVE) ? "[ACTIVE]" : "[NOT_ACTIVE]", (status & EHCI_QTD_HALTED) ? "[HALTED]" : "", (status & EHCI_QTD_BUFERR) ? "[BUFERR]" : "", @@ -1218,8 +1218,8 @@ { usb_error_t err = 0; - DPRINTFN(13, "xfer=%p pipe=%p transfer done\n", - xfer, xfer->pipe); + DPRINTFN(13, "xfer=%p endpoint=%p transfer done\n", + xfer, xfer->endpoint); #if USB_DEBUG if (ehcidebug > 10) { @@ -1274,7 +1274,7 @@ static uint8_t ehci_check_transfer(struct usb_xfer *xfer) { - struct usb_pipe_methods *methods = xfer->pipe->methods; + struct usb_pipe_methods *methods = xfer->endpoint->methods; ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); uint32_t status; @@ -1716,7 +1716,7 @@ uint32_t x; DPRINTFN(9, "addr=%d endpt=%d sumlen=%d speed=%d\n", - xfer->address, UE_GET_ADDR(xfer->endpoint), + xfer->address, UE_GET_ADDR(xfer->endpointno), xfer->sumlen, usb2_get_speed(xfer->xroot->udev)); temp.average = xfer->max_hc_frame_size; @@ -1739,7 +1739,7 @@ temp.setup_alt_next = xfer->flags_int.short_frames_ok; if (xfer->flags_int.control_xfr) { - if (xfer->pipe->toggle_next) { + if (xfer->endpoint->toggle_next) { /* DATA1 is next */ temp.qtd_status |= htohc32(temp.sc, EHCI_QTD_SET_TOGGLE(1)); @@ -1827,7 +1827,7 @@ /* set endpoint direction */ temp.qtd_status |= - (UE_GET_DIR(xfer->endpoint) == UE_DIR_IN) ? + (UE_GET_DIR(xfer->endpointno) == UE_DIR_IN) ? htohc32(temp.sc, EHCI_QTD_ACTIVE | EHCI_QTD_SET_PID(EHCI_QTD_PID_IN)) : htohc32(temp.sc, EHCI_QTD_ACTIVE | @@ -1849,7 +1849,7 @@ temp.qtd_status &= htohc32(temp.sc, EHCI_QTD_SET_CERR(3) | EHCI_QTD_SET_TOGGLE(1)); temp.qtd_status |= - (UE_GET_DIR(xfer->endpoint) == UE_DIR_OUT) ? + (UE_GET_DIR(xfer->endpointno) == UE_DIR_OUT) ? htohc32(temp.sc, EHCI_QTD_ACTIVE | EHCI_QTD_SET_PID(EHCI_QTD_PID_IN) | EHCI_QTD_SET_TOGGLE(1)) : @@ -1881,13 +1881,13 @@ #if USB_DEBUG if (ehcidebug > 8) { DPRINTF("nexttog=%d; data before transfer:\n", - xfer->pipe->toggle_next); + xfer->endpoint->toggle_next); ehci_dump_sqtds(temp.sc, xfer->td_transfer_first); } #endif - methods = xfer->pipe->methods; + methods = xfer->endpoint->methods; qh = xfer->qh_start[xfer->flags_int.curr_dma_set]; @@ -1895,7 +1895,7 @@ qh_endp = (EHCI_QH_SET_ADDR(xfer->address) | - EHCI_QH_SET_ENDPT(UE_GET_ADDR(xfer->endpoint)) | + EHCI_QH_SET_ENDPT(UE_GET_ADDR(xfer->endpointno)) | EHCI_QH_SET_MPL(xfer->max_packet_size)); if (usb2_get_speed(xfer->xroot->udev) == USB_SPEED_HIGH) { @@ -1943,7 +1943,7 @@ qh->qh_endp &= htohc32(temp.sc, ~EHCI_QH_DTC); - if (xfer->pipe->toggle_next) { + if (xfer->endpoint->toggle_next) { /* DATA1 is next */ qh->qh_qtd.qtd_status |= htohc32(temp.sc, EHCI_QTD_SET_TOGGLE(1)); @@ -1999,8 +1999,8 @@ ehci_sitd_t *td = xfer->td_transfer_first; ehci_sitd_t **pp_last = &sc->sc_isoc_fs_p_last[xfer->qh_pos]; - DPRINTFN(13, "xfer=%p pipe=%p transfer done\n", - xfer, xfer->pipe); + DPRINTFN(13, "xfer=%p endpoint=%p transfer done\n", + xfer, xfer->endpoint); while (nframes--) { if (td == NULL) { @@ -2053,8 +2053,8 @@ ehci_itd_t *td = xfer->td_transfer_first; ehci_itd_t **pp_last = &sc->sc_isoc_hs_p_last[xfer->qh_pos]; - DPRINTFN(13, "xfer=%p pipe=%p transfer done\n", - xfer, xfer->pipe); + DPRINTFN(13, "xfer=%p endpoint=%p transfer done\n", + xfer, xfer->endpoint); while (nframes--) { if (td == NULL) { @@ -2113,20 +2113,20 @@ static void ehci_device_done(struct usb_xfer *xfer, usb_error_t error) { - struct usb_pipe_methods *methods = xfer->pipe->methods; + struct usb_pipe_methods *methods = xfer->endpoint->methods; ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus); USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); - DPRINTFN(2, "xfer=%p, pipe=%p, error=%d\n", - xfer, xfer->pipe, error); + DPRINTFN(2, "xfer=%p, endpoint=%p, error=%d\n", + xfer, xfer->endpoint, error); if ((methods == &ehci_device_bulk_methods) || (methods == &ehci_device_ctrl_methods)) { #if USB_DEBUG if (ehcidebug > 8) { DPRINTF("nexttog=%d; data after transfer:\n", - xfer->pipe->toggle_next); + xfer->endpoint->toggle_next); ehci_dump_sqtds(sc, xfer->td_transfer_first); } @@ -2358,11 +2358,11 @@ sitd_portaddr = EHCI_SITD_SET_ADDR(xfer->address) | - EHCI_SITD_SET_ENDPT(UE_GET_ADDR(xfer->endpoint)) | + EHCI_SITD_SET_ENDPT(UE_GET_ADDR(xfer->endpointno)) | EHCI_SITD_SET_HUBA(xfer->xroot->udev->hs_hub_addr) | EHCI_SITD_SET_PORT(xfer->xroot->udev->hs_port_no); - if (UE_GET_DIR(xfer->endpoint) == UE_DIR_IN) { + if (UE_GET_DIR(xfer->endpointno) == UE_DIR_IN) { sitd_portaddr |= EHCI_SITD_SET_DIR_IN; } sitd_portaddr = htohc32(sc, sitd_portaddr); @@ -2422,7 +2422,7 @@ #endif DPRINTFN(6, "xfer=%p next=%d nframes=%d\n", - xfer, xfer->pipe->isoc_next, xfer->nframes); + xfer, xfer->endpoint->isoc_next, xfer->nframes); /* get the current frame index */ @@ -2432,10 +2432,10 @@ * check if the frame index is within the window where the frames * will be inserted */ - buf_offset = (nframes - xfer->pipe->isoc_next) & + buf_offset = (nframes - xfer->endpoint->isoc_next) & (EHCI_VIRTUAL_FRAMELIST_COUNT - 1); - if ((xfer->pipe->is_synced == 0) || + if ((xfer->endpoint->is_synced == 0) || (buf_offset < xfer->nframes)) { /* * If there is data underflow or the pipe queue is empty we @@ -2443,16 +2443,16 @@ * frame position. Else two isochronous transfers might * overlap. */ - xfer->pipe->isoc_next = (nframes + 3) & + xfer->endpoint->isoc_next = (nframes + 3) & (EHCI_VIRTUAL_FRAMELIST_COUNT - 1); - xfer->pipe->is_synced = 1; - DPRINTFN(3, "start next=%d\n", xfer->pipe->isoc_next); + xfer->endpoint->is_synced = 1; + DPRINTFN(3, "start next=%d\n", xfer->endpoint->isoc_next); } /* * compute how many milliseconds the insertion is ahead of the * current frame position: */ - buf_offset = (xfer->pipe->isoc_next - nframes) & + buf_offset = (xfer->endpoint->isoc_next - nframes) & (EHCI_VIRTUAL_FRAMELIST_COUNT - 1); /* @@ -2478,11 +2478,11 @@ td = xfer->td_start[xfer->flags_int.curr_dma_set]; xfer->td_transfer_first = td; - pp_last = &sc->sc_isoc_fs_p_last[xfer->pipe->isoc_next]; + pp_last = &sc->sc_isoc_fs_p_last[xfer->endpoint->isoc_next]; /* store starting position */ - xfer->qh_pos = xfer->pipe->isoc_next; + xfer->qh_pos = xfer->endpoint->isoc_next; fss = fss_start + (xfer->qh_pos % USB_ISOC_TIME_MAX); @@ -2543,7 +2543,7 @@ temp = 0; } - if (UE_GET_DIR(xfer->endpoint) == UE_DIR_OUT) { + if (UE_GET_DIR(xfer->endpointno) == UE_DIR_OUT) { tlen = *plen; if (tlen <= 188) { temp |= 1; /* T-count = 1, TP = ALL */ @@ -2609,7 +2609,7 @@ xfer->td_transfer_last = td_last; /* update isoc_next */ - xfer->pipe->isoc_next = (pp_last - &sc->sc_isoc_fs_p_last[0]) & + xfer->endpoint->isoc_next = (pp_last - &sc->sc_isoc_fs_p_last[0]) & (EHCI_VIRTUAL_FRAMELIST_COUNT - 1); } @@ -2658,13 +2658,13 @@ /* set endpoint and address */ td->itd_bp[0] = htohc32(sc, EHCI_ITD_SET_ADDR(xfer->address) | - EHCI_ITD_SET_ENDPT(UE_GET_ADDR(xfer->endpoint))); + EHCI_ITD_SET_ENDPT(UE_GET_ADDR(xfer->endpointno))); temp = EHCI_ITD_SET_MPL(xfer->max_packet_size & 0x7FF); /* set direction */ - if (UE_GET_DIR(xfer->endpoint) == UE_DIR_IN) { + if (UE_GET_DIR(xfer->endpointno) == UE_DIR_IN) { temp |= EHCI_ITD_SET_DIR_IN; } /* set maximum packet size */ @@ -2708,7 +2708,7 @@ #endif DPRINTFN(6, "xfer=%p next=%d nframes=%d\n", - xfer, xfer->pipe->isoc_next, xfer->nframes); + xfer, xfer->endpoint->isoc_next, xfer->nframes); /* get the current frame index */ @@ -2718,10 +2718,10 @@ * check if the frame index is within the window where the frames * will be inserted */ - buf_offset = (nframes - xfer->pipe->isoc_next) & + buf_offset = (nframes - xfer->endpoint->isoc_next) & (EHCI_VIRTUAL_FRAMELIST_COUNT - 1); - if ((xfer->pipe->is_synced == 0) || + if ((xfer->endpoint->is_synced == 0) || (buf_offset < ((xfer->nframes + 7) / 8))) { /* * If there is data underflow or the pipe queue is empty we @@ -2729,16 +2729,16 @@ * frame position. Else two isochronous transfers might * overlap. */ - xfer->pipe->isoc_next = (nframes + 3) & + xfer->endpoint->isoc_next = (nframes + 3) & (EHCI_VIRTUAL_FRAMELIST_COUNT - 1); - xfer->pipe->is_synced = 1; - DPRINTFN(3, "start next=%d\n", xfer->pipe->isoc_next); + xfer->endpoint->is_synced = 1; + DPRINTFN(3, "start next=%d\n", xfer->endpoint->isoc_next); } /* * compute how many milliseconds the insertion is ahead of the * current frame position: */ - buf_offset = (xfer->pipe->isoc_next - nframes) & + buf_offset = (xfer->endpoint->isoc_next - nframes) & (EHCI_VIRTUAL_FRAMELIST_COUNT - 1); /* @@ -2764,11 +2764,11 @@ td = xfer->td_start[xfer->flags_int.curr_dma_set]; xfer->td_transfer_first = td; - pp_last = &sc->sc_isoc_hs_p_last[xfer->pipe->isoc_next]; + pp_last = &sc->sc_isoc_hs_p_last[xfer->endpoint->isoc_next]; /* store starting position */ - xfer->qh_pos = xfer->pipe->isoc_next; + xfer->qh_pos = xfer->endpoint->isoc_next; while (nframes--) { if (td == NULL) { @@ -2875,7 +2875,7 @@ xfer->td_transfer_last = td_last; /* update isoc_next */ - xfer->pipe->isoc_next = (pp_last - &sc->sc_isoc_hs_p_last[0]) & + xfer->endpoint->isoc_next = (pp_last - &sc->sc_isoc_hs_p_last[0]) & (EHCI_VIRTUAL_FRAMELIST_COUNT - 1); } @@ -3636,12 +3636,12 @@ static void ehci_pipe_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc, - struct usb_pipe *pipe) + struct usb_endpoint *ep) { ehci_softc_t *sc = EHCI_BUS2SC(udev->bus); - DPRINTFN(2, "pipe=%p, addr=%d, endpt=%d, mode=%d (%d)\n", - pipe, udev->address, + DPRINTFN(2, "endpoint=%p, addr=%d, endpt=%d, mode=%d (%d)\n", + ep, udev->address, edesc->bEndpointAddress, udev->flags.usb_mode, sc->sc_addr); @@ -3661,21 +3661,21 @@ } switch (edesc->bmAttributes & UE_XFERTYPE) { case UE_CONTROL: - pipe->methods = &ehci_device_ctrl_methods; + ep->methods = &ehci_device_ctrl_methods; break; case UE_INTERRUPT: - pipe->methods = &ehci_device_intr_methods; + ep->methods = &ehci_device_intr_methods; break; case UE_ISOCHRONOUS: if (udev->speed == USB_SPEED_HIGH) { - pipe->methods = &ehci_device_isoc_hs_methods; + ep->methods = &ehci_device_isoc_hs_methods; } else if (udev->speed == USB_SPEED_FULL) { - pipe->methods = &ehci_device_isoc_fs_methods; + ep->methods = &ehci_device_isoc_fs_methods; } break; case UE_BULK: if (udev->speed != USB_SPEED_LOW) { - pipe->methods = &ehci_device_bulk_methods; + ep->methods = &ehci_device_bulk_methods; } break; default: @@ -3712,7 +3712,7 @@ if (xfer->xroot->udev == udev) { - methods = xfer->pipe->methods; + methods = xfer->endpoint->methods; if ((methods == &ehci_device_bulk_methods) || (methods == &ehci_device_ctrl_methods)) { @@ -3746,7 +3746,7 @@ if (xfer->xroot->udev == udev) { - methods = xfer->pipe->methods; + methods = xfer->endpoint->methods; if ((methods == &ehci_device_bulk_methods) || (methods == &ehci_device_ctrl_methods)) { ==== //depot/projects/usb_buf/src/sys/dev/usb/controller/musb_otg.c#6 (text+ko) ==== @@ -1114,7 +1114,7 @@ uint8_t ep_no; DPRINTFN(8, "addr=%d endpt=%d sumlen=%d speed=%d\n", - xfer->address, UE_GET_ADDR(xfer->endpoint), + xfer->address, UE_GET_ADDR(xfer->endpointno), xfer->sumlen, usb2_get_speed(xfer->xroot->udev)); temp.max_frame_size = xfer->max_frame_size; @@ -1132,7 +1132,7 @@ temp.did_stall = !xfer->flags_int.control_stall; sc = MUSBOTG_BUS2SC(xfer->xroot->bus); - ep_no = (xfer->endpoint & UE_ADDR); + ep_no = (xfer->endpointno & UE_ADDR); /* check if we should prepend a setup message */ @@ -1152,7 +1152,7 @@ } if (x != xfer->nframes) { - if (xfer->endpoint & UE_DIR_IN) { + if (xfer->endpointno & UE_DIR_IN) { if (xfer->flags_int.control_xfr) temp.func = &musbotg_setup_data_tx; else @@ -1249,7 +1249,7 @@ { struct musbotg_softc *sc = MUSBOTG_BUS2SC(xfer->xroot->bus); uint16_t temp; - uint8_t ep_no = xfer->endpoint & UE_ADDR; + uint8_t ep_no = xfer->endpointno & UE_ADDR; /* * Only enable the endpoint interrupt when we are @@ -1390,8 +1390,8 @@ { usb_error_t err = 0; - DPRINTFN(12, "xfer=%p pipe=%p transfer done\n", - xfer, xfer->pipe); + DPRINTFN(12, "xfer=%p endpoint=%p transfer done\n", + xfer, xfer->endpoint); /* reset scanner */ @@ -1439,8 +1439,8 @@ { USB_BUS_LOCK_ASSERT(xfer->xroot->bus, MA_OWNED); - DPRINTFN(2, "xfer=%p, pipe=%p, error=%d\n", - xfer, xfer->pipe, error); + DPRINTFN(2, "xfer=%p, endpoint=%p, error=%d\n", + xfer, xfer->endpoint, error); if (xfer->flags_int.usb_mode == USB_MODE_DEVICE) { @@ -1454,14 +1454,14 @@ static void musbotg_set_stall(struct usb_device *udev, struct usb_xfer *xfer, - struct usb_pipe *pipe) + struct usb_endpoint *ep) { struct musbotg_softc *sc; uint8_t ep_no; USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED); - DPRINTFN(4, "pipe=%p\n", pipe); + DPRINTFN(4, "endpoint=%p\n", ep); if (xfer) { /* cancel any ongoing transfers */ @@ -1470,12 +1470,12 @@ /* set FORCESTALL */ sc = MUSBOTG_BUS2SC(udev->bus); - ep_no = (pipe->edesc->bEndpointAddress & UE_ADDR); + ep_no = (ep->edesc->bEndpointAddress & UE_ADDR); /* select endpoint */ MUSB2_WRITE_1(sc, MUSB2_REG_EPINDEX, ep_no); - if (pipe->edesc->bEndpointAddress & UE_DIR_IN) { + if (ep->edesc->bEndpointAddress & UE_DIR_IN) { MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, MUSB2_MASK_CSRL_TXSENDSTALL); } else { @@ -1636,12 +1636,12 @@ } static void -musbotg_clear_stall(struct usb_device *udev, struct usb_pipe *pipe) +musbotg_clear_stall(struct usb_device *udev, struct usb_endpoint *ep) { struct musbotg_softc *sc; struct usb_endpoint_descriptor *ed; - DPRINTFN(4, "pipe=%p\n", pipe); >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905311843.n4VIh5ne020829>