MLK-22675 usb: dwc3: host: disable park mode for super speed
authorLi Jun <jun.li@nxp.com>
Fri, 8 Nov 2019 06:01:04 +0000 (14:01 +0800)
committerYe Li <ye.li@nxp.com>
Thu, 29 Apr 2021 07:56:34 +0000 (00:56 -0700)
commit15f1c0bc27cb159fc37ae7cb98686ecc662c425c
tree7fe6f3368880f76a9d2070380afbe4da1ee0b373
parenta3bf249e01e973c7a46fa7a61430e5518ea89a1f
MLK-22675 usb: dwc3: host: disable park mode for super speed

- Advantage of park mode
  When only a single Async endpoint is active.

- Behavior of park mode
  1. The controller prefetches data/TRBs to do 3 * burst_size worth
     of packets.
  2. When park mode is disabled there will be some delay between
     bursts on the USB. This can be avoided if park mode is enabled
     in cases of only one endpoint is active.
  3. But this delay is significant only with systems of large
     latencies.
  4. We have noticed that in cases where a device NAKs often, it
     tends to bring down the performance for a single endpoint case.

- Issue on "park mode"
  1. LSP (List Processor) goes in and out of park mode irrespective
     of the fact that there are more endpoints active. #LSP consider
     that there is only one endpoint active.
  2. This causes master scheduler and transaction handlers to think
     that they are in park mode even though they are not. This is
     because request to transaction handlers, generated by HSCH is
     in park mode when the request is made
  3. This causes a case where the master scheduler calculates wrongly
     the number of TRB cache space available.
  4. Because of the wrongly calculated number of TRB spaces, the core
     fetches more TRBS than there is space for.
  5. This causes overwriting the TRB cache area into the TRQ cache
     area which is next to the TRB cache area.
  6. This causes invalidating an entry in the TRQ
  7. This causes transaction handlers to ignore a request in the TRQ
     which it should have processed.
  8. This causes the main scheduler to hang because it is waiting for
     status from transaction handler.
  9. This causes host controller to hang.

- Work Around
  Disabling park mode for super speed by setting GUCTL1[17] to be 1.

The STAR number is 9001415732, which is target to be released around
May,2020.

Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
(cherry picked from commit 191211adfc8a797875079c228a10269c5b0d7e13)
(cherry picked from commit ee96ccf8455a100488af6449ab941423c81b1789)
drivers/usb/dwc3/core.c
drivers/usb/dwc3/core.h