Changeset c04e7c2 in rtems-libbsd


Ignore:
Timestamp:
Jan 5, 2016, 9:18:43 AM (4 years ago)
Author:
hselasky <hselasky@…>
Branches:
c1e05b9ea378b2971e3d7704779112b4bc4296da, freebsd-9.3, e6acc15bc94ea35f40e50b42692584c456ba9722
Children:
c2864c2
Parents:
1061324
git-author:
hselasky <hselasky@…> (01/05/16 09:18:43)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/05/16 09:23:15)
Message:

Fix for directly connected FULL or LOW speed USB devices.

Found by: Sebastian Huber <sebastian.huber@…>
MFC after: 1 week

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/dev/usb/controller/dwc_otg.c

    r1061324 rc04e7c2  
    457457        }
    458458        return (0);
     459}
     460
     461static uint8_t
     462dwc_otg_uses_split(struct usb_device *udev)
     463{
     464        /*
     465         * When a LOW or FULL speed device is connected directly to
     466         * the USB port we don't use split transactions:
     467         */
     468        return (udev->speed != USB_SPEED_HIGH &&
     469            udev->parent_hs_hub != NULL &&
     470            udev->parent_hs_hub->parent_hub != NULL);
    459471}
    460472
     
    33323344                        hcchar |= (td->ep_type << HCCHAR_EPTYPE_SHIFT);
    33333345
    3334                 if (usbd_get_speed(xfer->xroot->udev) == USB_SPEED_LOW)
    3335                         hcchar |= HCCHAR_LSPDDEV;
    33363346                if (UE_GET_DIR(xfer->endpointno) == UE_DIR_IN)
    33373347                        hcchar |= HCCHAR_EPDIR_IN;
    33383348
    33393349                switch (xfer->xroot->udev->speed) {
     3350                case USB_SPEED_LOW:
     3351                        hcchar |= HCCHAR_LSPDDEV;
     3352                        /* FALLTHROUGH */
    33403353                case USB_SPEED_FULL:
    3341                 case USB_SPEED_LOW:
    33423354                        /* check if root HUB port is running High Speed */
    3343                         if (xfer->xroot->udev->parent_hs_hub != NULL) {
     3355                        if (dwc_otg_uses_split(xfer->xroot->udev)) {
    33443356                                hcsplt = HCSPLT_SPLTENA |
    33453357                                    (xfer->xroot->udev->hs_port_no <<
     
    41634175        }
    41644176
    4165         if (xfer->xroot->udev->parent_hs_hub != NULL)
     4177        /*
     4178         * Check if port is doing 8000 or 1000 frames per second:
     4179         */
     4180        if (sc->sc_flags.status_high_speed)
    41664181                framenum /= 8;
    41674182
     
    48404855
    48414856                        /* compute shared bandwidth resource index for TT */
    4842                         if (parm->udev->parent_hs_hub != NULL && parm->udev->speed != USB_SPEED_HIGH) {
     4857                        if (dwc_otg_uses_split(parm->udev)) {
    48434858                                if (parm->udev->parent_hs_hub->ddesc.bDeviceProtocol == UDPROTO_HSHUBMTT)
    48444859                                        td->tt_index = parm->udev->device_index;
Note: See TracChangeset for help on using the changeset viewer.