Changes in / [3f2af64:4776ba9] in mainline


Ignore:
Location:
uspace
Files:
2 added
3 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ohci/iface.c

    r3f2af64 r4776ba9  
    6363        }
    6464
     65        usb_log_debug("%s %d:%d %zu(%zu).\n",
     66            name, target.address, target.endpoint, size, ep->max_packet_size);
     67
    6568        const size_t bw = bandwidth_count_usb11(
    6669            ep->speed, ep->transfer_type, size, ep->max_packet_size);
     
    6871                usb_log_error("Endpoint(%d:%d) %s needs %zu bw "
    6972                    "but only %zu is reserved.\n",
    70                     name, target.address, target.endpoint, bw, res_bw);
     73                    target.address, target.endpoint, name, bw, res_bw);
    7174                return ENOSPC;
    7275        }
    73         usb_log_debug("%s %d:%d %zu(%zu).\n",
    74             name, target.address, target.endpoint, size, ep->max_packet_size);
    7576
    7677        *batch = batch_get(
     
    157158        hc_t *hc = fun_to_hc(fun);
    158159        assert(hc);
    159         if (address == hc->rh.address)
    160                 return EOK;
     160
    161161        usb_speed_t speed = usb_device_keeper_get_speed(&hc->manager, address);
    162162        if (speed >= USB_SPEED_MAX) {
    163163                speed = ep_speed;
    164164        }
    165         const size_t size =
    166             (transfer_type == USB_TRANSFER_INTERRUPT
    167             || transfer_type == USB_TRANSFER_ISOCHRONOUS) ?
    168             max_packet_size : 0;
     165        const size_t size = max_packet_size;
    169166        int ret;
     167
     168        usb_log_debug("Register endpoint %d:%d %s %s(%d) %zu(%zu) %u.\n",
     169            address, endpoint, usb_str_transfer_type(transfer_type),
     170            usb_str_speed(speed), direction, size, max_packet_size, interval);
    170171
    171172        endpoint_t *ep = malloc(sizeof(endpoint_t));
     
    178179                return ret;
    179180        }
    180 
    181         usb_log_debug("Register endpoint %d:%d %s %s(%d) %zu(%zu) %u.\n",
    182             address, endpoint, usb_str_transfer_type(transfer_type),
    183             usb_str_speed(speed), direction, size, max_packet_size, interval);
    184181
    185182        ret = usb_endpoint_manager_register_ep(&hc->ep_manager, ep, size);
  • uspace/drv/uhci-hcd/iface.c

    r3f2af64 r4776ba9  
    6363        }
    6464
     65        usb_log_debug("%s %d:%d %zu(%zu).\n",
     66            name, target.address, target.endpoint, size, ep->max_packet_size);
     67
    6568        const size_t bw = bandwidth_count_usb11(
    6669            ep->speed, ep->transfer_type, size, ep->max_packet_size);
     
    6871                usb_log_error("Endpoint(%d:%d) %s needs %zu bw "
    6972                    "but only %zu is reserved.\n",
    70                     name, target.address, target.endpoint, bw, res_bw);
     73                    target.address, target.endpoint, name, bw, res_bw);
    7174                return ENOSPC;
    7275        }
    73         usb_log_debug("%s %d:%d %zu(%zu).\n",
    74             name, target.address, target.endpoint, size, ep->max_packet_size);
    7576
    7677        *batch = batch_get(
     
    146147        hc_t *hc = fun_to_hc(fun);
    147148        assert(hc);
     149        const size_t size = max_packet_size;
     150        int ret;
    148151        usb_speed_t speed = usb_device_keeper_get_speed(&hc->manager, address);
    149152        if (speed >= USB_SPEED_MAX) {
    150153                speed = ep_speed;
    151154        }
    152         const size_t size =
    153             (transfer_type == USB_TRANSFER_INTERRUPT
    154             || transfer_type == USB_TRANSFER_ISOCHRONOUS) ?
    155             max_packet_size : 0;
    156         int ret;
     155        usb_log_debug("Register endpoint %d:%d %s %s(%d) %zu(%zu) %u.\n",
     156            address, endpoint, usb_str_transfer_type(transfer_type),
     157            usb_str_speed(speed), direction, size, max_packet_size, interval);
     158
    157159
    158160        endpoint_t *ep = malloc(sizeof(endpoint_t));
     
    166168        }
    167169
    168         usb_log_debug("Register endpoint %d:%d %s %s(%d) %zu(%zu) %u.\n",
    169             address, endpoint, usb_str_transfer_type(transfer_type),
    170             usb_str_speed(speed), direction, size, max_packet_size, interval);
    171 
    172170        ret = usb_endpoint_manager_register_ep(&hc->ep_manager, ep, size);
    173171        if (ret != EOK) {
  • uspace/lib/usb/src/host/endpoint.c

    r3f2af64 r4776ba9  
    9999        assert(instance);
    100100        if (instance->address == target.address &&
    101             instance->endpoint == target.endpoint)
     101            (instance->endpoint == target.endpoint || target.endpoint == 0))
    102102                instance->toggle = 0;
    103103}
Note: See TracChangeset for help on using the changeset viewer.