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

Changeset f45c78f in mainline


Ignore:
Timestamp:
2017-10-21T14:19:22Z (4 years ago)
Author:
Petr Manek <petr.manek@…>
Branches:
lfn, master
Children:
74b852b
Parents:
f270ecb
Message:

Added boilerplate for device detach.

File:
1 edited

Legend:

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

    rf270ecb rf45c78f  
    276276}
    277277
     278/** Deal with a detached device.
     279 */
     280static int handle_disconnected_device(xhci_rh_t *rh, uint8_t port_id)
     281{
     282        // TODO: Find XHCI device by the port.
     283        // TODO: Destroy DDF function using _gone.
     284        // TODO: Remove device endpoints on the bus.
     285        // TODO: Free device context.
     286        // TODO: Free TRB rings.
     287        // TODO: Figure out what was forgotten and free that as well.
     288
     289        return EOK;
     290}
     291
    278292/** Handle an incoming Port Change Detected Event.
    279293 */
     
    308322
    309323                        bool connected = XHCI_REG_RD(regs, XHCI_PORT_CCS);
    310                         if (connected)
     324                        if (connected) {
    311325                                handle_connected_device(rh, i);
     326                        } else {
     327                                handle_disconnected_device(rh, i);
     328                        }
    312329                }
    313330
Note: See TracChangeset for help on using the changeset viewer.