Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset fa9d3af in mainline


Ignore:
Timestamp:
2013-08-07T15:11:40Z (7 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
master
Children:
5dad73d
Parents:
14dd4c9
Message:

libusbhost: Add information about the nearest HS hub.

The last pice of info needed for HS SPLIT transactions.

Location:
uspace/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/include/usb/usb.h

    r14dd4c9 rfa9d3af  
    8383        USB_SPEED_MAX
    8484} usb_speed_t;
     85
     86static inline bool usb_speed_is_11(const usb_speed_t s)
     87{
     88        return (s == USB_SPEED_FULL) || (s == USB_SPEED_LOW);
     89}
    8590
    8691const char *usb_str_speed(usb_speed_t);
  • uspace/lib/usbhost/src/ddf_helpers.c

    r14dd4c9 rfa9d3af  
    5353        usb_address_t address;
    5454        usb_speed_t speed;
     55        usb_address_t tt_address;
    5556        unsigned port;
    5657} usb_dev_t;
     
    325326        info->fun = fun;
    326327        info->port = port;
     328        info->tt_address = hub_dev ? hub_dev->tt_address : -1;
    327329        link_initialize(&info->link);
    328330        list_initialize(&info->devices);
    329331        fibril_mutex_initialize(&info->guard);
     332
     333        if (hub_dev->speed == USB_SPEED_HIGH && usb_speed_is_11(speed))
     334                info->tt_address = hub_dev->address;
    330335
    331336        ddf_fun_set_ops(fun, &usb_ops);
Note: See TracChangeset for help on using the changeset viewer.