~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/usb/dwc3.rst

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 ===========
  2 DWC3 driver
  3 ===========
  4 
  5 
  6 TODO
  7 ~~~~
  8 
  9 Please pick something while reading :)
 10 
 11 - Convert interrupt handler to per-ep-thread-irq
 12 
 13   As it turns out some DWC3-commands ~1ms to complete. Currently we spin
 14   until the command completes which is bad.
 15 
 16   Implementation idea:
 17 
 18   - dwc core implements a demultiplexing irq chip for interrupts per
 19     endpoint. The interrupt numbers are allocated during probe and belong
 20     to the device. If MSI provides per-endpoint interrupt this dummy
 21     interrupt chip can be replaced with "real" interrupts.
 22   - interrupts are requested / allocated on usb_ep_enable() and removed on
 23     usb_ep_disable(). Worst case are 32 interrupts, the lower limit is two
 24     for ep0/1.
 25   - dwc3_send_gadget_ep_cmd() will sleep in wait_for_completion_timeout()
 26     until the command completes.
 27   - the interrupt handler is split into the following pieces:
 28 
 29     - primary handler of the device
 30       goes through every event and calls generic_handle_irq() for event
 31       it. On return from generic_handle_irq() in acknowledges the event
 32       counter so interrupt goes away (eventually).
 33 
 34     - threaded handler of the device
 35       none
 36 
 37     - primary handler of the EP-interrupt
 38       reads the event and tries to process it. Everything that requires
 39       sleeping is handed over to the Thread. The event is saved in an
 40       per-endpoint data-structure.
 41       We probably have to pay attention not to process events once we
 42       handed something to thread so we don't process event X prio Y
 43       where X > Y.
 44 
 45     - threaded handler of the EP-interrupt
 46       handles the remaining EP work which might sleep such as waiting
 47       for command completion.
 48 
 49   Latency:
 50 
 51    There should be no increase in latency since the interrupt-thread has a
 52    high priority and will be run before an average task in user land
 53    (except the user changed priorities).

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php