Changeset 49e62998 in mainline for uspace/drv/bus/usb/xhci/rh.h


Ignore:
Timestamp:
2018-01-11T23:06:57Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
50be3c6
Parents:
f3baab1
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-11 23:01:08)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-11 23:06:57)
Message:

xhci: defer roothub events processing

There are two new generic mechanisms, which are used in only one
instance.

First one is a simple wrapper for roothub event handlers that should run
in separate fibril. The usage can be seen at line 337, for example. The
mechanism just passes arguments to a newly created fibril.

The second is a bit more complex, and its purpose is to broadcast roothub
events to all fibrils that could wait for it. It's used to wait for port
reset complete at USB 2 ports. See rh_port_reset_sync.

Sorry for naming both mechanisms "rh_event", which could create
a confusion.

File:
1 edited

Legend:

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

    rf3baab1 r49e62998  
    7575        /* Device pointers connected to RH ports or NULL. (size is `max_ports`) */
    7676        xhci_device_t **devices_by_port;
     77
     78        /* Roothub events. */
     79        fibril_mutex_t event_guard;
     80        fibril_condvar_t event_ready, event_handled;
     81        unsigned event_readers_waiting, event_readers_to_go;
     82        struct {
     83                uint8_t port_id;
     84                uint32_t events;
     85        } event;
    7786} xhci_rh_t;
    7887
     
    8089int xhci_rh_fini(xhci_rh_t *);
    8190const xhci_port_speed_t *xhci_rh_get_port_speed(xhci_rh_t *, uint8_t);
    82 int xhci_rh_reset_port(xhci_rh_t *, uint8_t);
    8391
    8492int xhci_rh_handle_port_status_change_event(xhci_hc_t *, xhci_trb_t *);
Note: See TracChangeset for help on using the changeset viewer.