Changeset 867b375 in mainline for uspace/drv/bus/usb/xhci/rh.h


Ignore:
Timestamp:
2017-10-15T02:04:10Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
20eaa82
Parents:
d7869d7e
Message:

hcd_ddf_new_device refactoring

This long function is now split into parts. Instead of passing dozens of arguments, it now creates the usb_dev_t right away, and uses that to pass it along. The address_device part is now modifiable by drivers.

There is still a work to be done. The biggest problem I see is in the addressing - currently, there is usb_address_t, and for high speed transaction translating there is another address. For (near) future extensibility, we should pass address as a structure. Or even better, make a way how to reference a device, maybe in a similar way how we work with endpoints.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/rh.h

    rd7869d7e r867b375  
    5151} xhci_port_speed_t;
    5252
     53typedef struct hcd_roothub hcd_roothub_t;
     54
    5355/* XHCI root hub instance */
    5456typedef struct {
     
    6466        /* Number of hub ports. */
    6567        uint8_t max_ports;
     68
     69        /* We need this to create child devices */
     70        hcd_roothub_t *hcd_rh;
    6671} xhci_rh_t;
    6772
     
    7479void xhci_rh_handle_port_change(xhci_rh_t *);
    7580
     81int xhci_rh_address_device(xhci_rh_t *, usb_speed_t, usb_tt_address_t, usb_address_t *);
     82
    7683#endif
    7784
Note: See TracChangeset for help on using the changeset viewer.