Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5742b0c9 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman
Browse files

[PATCH] USB dummy_hcd: Partial OTG emulation



Partial OTG support for dummy_hcd, mostly as a framework for further work.
It emulates the new OTG flags in the host and peripheral frameworks, if
that option is configured.  But it's incomplete:

  - Resetting the peripheral needs to clear the OTG state bits;
    a second enumeration won't work correctly.

  - This stops modeling HNP right when roles should switch the first time.
    It should probably disconnect, then set the usb_bus.is_b_host and
    usb_gadget.is_a_peripheral flags; then it'd enumerate almost normally,
    except for the role reversal.  Roles could then switch a second time,
    back to "normal" (with those flags cleared).

  - SRP should be modeled as "resume from port-unpowered", which is
    a state that usbcore doesn't yet use.

HNP can be triggered by enabling the OTG whitelist and configuring a
gadget driver that's not in that list; or by configuring Gadget Zero
to identify itself as the HNP test device.

Sent-by: default avatarDavid Brownell <david-b@pacbell.net>
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 65111084
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment