Changeset 888238e9 in mainline for uspace/drv/bus/usb


Ignore:
Timestamp:
2017-11-20T12:56:00Z (8 years ago)
Author:
Aearsis <Hlavaty.Ondrej@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d3086873
Parents:
ff14aede
git-author:
Aearsis <Hlavaty.Ondrej@…> (2017-11-20 12:55:58)
git-committer:
Aearsis <Hlavaty.Ondrej@…> (2017-11-20 12:56:00)
Message:

usbhost: endpoints do not have speed on their own

This information was redundant, and the fact it was never set proves it
should be removed because it is source of errors.

Location:
uspace/drv/bus/usb
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/hw_struct/queue_head.c

    rff14aede r888238e9  
    6464                return;
    6565        }
    66         assert(ep->speed < ARRAY_SIZE(speed));
     66        assert(ep->device->speed < ARRAY_SIZE(speed));
    6767        EHCI_MEM32_WR(instance->ep_char,
    6868            QH_EP_CHAR_ADDR_SET(ep->device->address) |
    6969            QH_EP_CHAR_EP_SET(ep->endpoint) |
    70             speed[ep->speed] |
     70            speed[ep->device->speed] |
    7171            QH_EP_CHAR_MAX_LENGTH_SET(ep->max_packet_size)
    7272        );
    7373        if (ep->transfer_type == USB_TRANSFER_CONTROL) {
    74                 if (ep->speed != USB_SPEED_HIGH)
     74                if (ep->device->speed != USB_SPEED_HIGH)
    7575                        EHCI_MEM32_SET(instance->ep_char, QH_EP_CHAR_C_FLAG);
    7676                /* Let BULK and INT use queue head managed toggle,
     
    8080        uint32_t ep_cap = QH_EP_CAP_C_MASK_SET(3 << 2) |
    8181                    QH_EP_CAP_MULTI_SET(ep->packets);
    82         if (ep->speed != USB_SPEED_HIGH) {
     82        if (ep->device->speed != USB_SPEED_HIGH) {
    8383                ep_cap |=
    8484                    QH_EP_CAP_TT_PORT_SET(ep->device->tt.port) |
  • uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.c

    rff14aede r888238e9  
    8888
    8989        /* Low speed flag */
    90         if (ep->speed == USB_SPEED_LOW)
     90        if (ep->device->speed == USB_SPEED_LOW)
    9191                OHCI_MEM32_SET(instance->status, ED_STATUS_S_FLAG);
    9292
  • uspace/drv/bus/usb/uhci/hc.c

    rff14aede r888238e9  
    475475
    476476        transfer_list_t *list =
    477             instance->transfers[batch->ep->speed][batch->ep->transfer_type];
     477            instance->transfers[batch->ep->device->speed][batch->ep->transfer_type];
    478478        assert(list);
    479479        transfer_list_add_batch(list, uhci_batch);
  • uspace/drv/bus/usb/uhci/uhci_batch.c

    rff14aede r888238e9  
    233233        const usb_packet_id pid = direction_pids[dir];
    234234        const bool low_speed =
    235             uhci_batch->base.ep->speed == USB_SPEED_LOW;
     235            uhci_batch->base.ep->device->speed == USB_SPEED_LOW;
    236236        const size_t mps = uhci_batch->base.ep->max_packet_size;
    237237
     
    295295        const usb_packet_id status_stage_pid = status_stage_pids[dir];
    296296        const bool low_speed =
    297             uhci_batch->base.ep->speed == USB_SPEED_LOW;
     297            uhci_batch->base.ep->device->speed == USB_SPEED_LOW;
    298298        const size_t mps = uhci_batch->base.ep->max_packet_size;
    299299        const usb_target_t target = uhci_batch->base.target;
  • uspace/drv/bus/usb/xhci/endpoint.c

    rff14aede r888238e9  
    141141int xhci_endpoint_request_streams(xhci_hc_t *hc, xhci_device_t *dev, xhci_endpoint_t *xhci_ep, unsigned count) {
    142142        if (xhci_ep->base.transfer_type != USB_TRANSFER_BULK
    143                 || xhci_ep->base.speed != USB_SPEED_SUPER) {
     143                || dev->base.speed != USB_SPEED_SUPER) {
    144144                usb_log_error("Streams are only supported by superspeed bulk endpoints.");
    145145                return EINVAL;
Note: See TracChangeset for help on using the changeset viewer.