Re: [PATCH v2 0/5] Introduced new Cadence USBSS DRD Driver.

From: Peter Chen
Date: Wed Jan 02 2019 - 01:45:30 EST


> - Improved algorithm fixing hardware issue related to blocking endpoints.
> This issue is related to on-chip shared FIFO buffers for OUT packets.
> Problem was reported by Peter Chan.

Pawel, I suggest not adding this workaround in this initial version
for Cadence USB3 driver,
we can add it later as patch, it can keep driver more simple and
clean, this WA only affects
a few of use cases. and I suggest adding flag for platform driver to
enable or disable this WA.

Besides, I begin to debug gadget mode based on your version, and find
some issues.
I use mass storage gadget to debug, and at host side, I use Bonnie++
for mounted folder.
Eg, bonnie\+\+ -d /mnt/disk -u 0:0 -s 256 -r 128

One is related to this workaround, you may improve it later. At
failure case, the class driver
has two OUT requests, one is 16384 bytes, and another is 4096 bytes.
The host sends the
data before class driver adding request, and the controller driver
only giveback 15872 bytes
for two requests. It seems the internal two requests (2 * 2048 bytes)
for DESCMISS doesn't
give the data to class driver. I attached the trace for you reference,
and dequeue occurs at
line 600.

Another issue is the interrupt (IOC, TRBERR, etc) can't occur during
the transfer, it can be improved
after introduce another WA (issue caused by simultaneous access to TRB
both by SW and HW).

Would you please have a look?

Peter

> - Changed organization of endpoint array in cdns3_device object.
> - added ep0 to common eps array
> - removed cdns3_free_trb_pool and cdns3_ep_addr_to_bit_pos macros.
> - removed ep0_trb_dma, ep0_trb fields from cdns3_device.
> - Removed ep0_request and ep_nums fields from cdns3_device.
> - Other minor changes according with Felipe suggestion.
>
> ---
>
> Pawel Laszczak (5):
> dt-bindings: add binding for USBSS-DRD controller.
> usb:common Separated decoding functions from dwc3 driver.
> usb:common Patch simplify usb_decode_set_clear_feature function.
> usb:common Simplify usb_decode_get_set_descriptor function.
> usb:cdns3 Add Cadence USB3 DRD Driver
>
> .../devicetree/bindings/usb/cdns3-usb.txt | 30 +
> drivers/usb/Kconfig | 2 +
> drivers/usb/Makefile | 2 +
> drivers/usb/cdns3/Kconfig | 44 +
> drivers/usb/cdns3/Makefile | 16 +
> drivers/usb/cdns3/cdns3-pci-wrap.c | 157 ++
> drivers/usb/cdns3/core.c | 406 ++++
> drivers/usb/cdns3/core.h | 116 +
> drivers/usb/cdns3/debug.h | 166 ++
> drivers/usb/cdns3/debugfs.c | 168 ++
> drivers/usb/cdns3/drd.c | 350 +++
> drivers/usb/cdns3/drd.h | 162 ++
> drivers/usb/cdns3/ep0.c | 896 +++++++
> drivers/usb/cdns3/gadget-export.h | 28 +
> drivers/usb/cdns3/gadget.c | 2102 +++++++++++++++++
> drivers/usb/cdns3/gadget.h | 1206 ++++++++++
> drivers/usb/cdns3/host-export.h | 28 +
> drivers/usb/cdns3/host.c | 72 +
> drivers/usb/cdns3/trace.c | 11 +
> drivers/usb/cdns3/trace.h | 389 +++
> drivers/usb/common/Makefile | 2 +-
> drivers/usb/common/debug.c | 265 +++
> drivers/usb/dwc3/debug.h | 243 --
> drivers/usb/dwc3/trace.h | 2 +-
> include/linux/usb/ch9.h | 19 +
> 25 files changed, 6637 insertions(+), 245 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/usb/cdns3-usb.txt
> create mode 100644 drivers/usb/cdns3/Kconfig
> create mode 100644 drivers/usb/cdns3/Makefile
> create mode 100644 drivers/usb/cdns3/cdns3-pci-wrap.c
> create mode 100644 drivers/usb/cdns3/core.c
> create mode 100644 drivers/usb/cdns3/core.h
> create mode 100644 drivers/usb/cdns3/debug.h
> create mode 100644 drivers/usb/cdns3/debugfs.c
> create mode 100644 drivers/usb/cdns3/drd.c
> create mode 100644 drivers/usb/cdns3/drd.h
> create mode 100644 drivers/usb/cdns3/ep0.c
> create mode 100644 drivers/usb/cdns3/gadget-export.h
> create mode 100644 drivers/usb/cdns3/gadget.c
> create mode 100644 drivers/usb/cdns3/gadget.h
> create mode 100644 drivers/usb/cdns3/host-export.h
> create mode 100644 drivers/usb/cdns3/host.c
> create mode 100644 drivers/usb/cdns3/trace.c
> create mode 100644 drivers/usb/cdns3/trace.h
> create mode 100644 drivers/usb/common/debug.c
>
> --
> 2.17.1
>

Attachment: descmiss_error.log
Description: Binary data