Skip to contentSkip to conversation

usb: xhci: Set number of event segments and entries to 1

PATCH New Marek Vasut 2 participants 2 messages Sep 12, 2017 – Sep 13, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: xhci: Set number of event segments and entries to 1

The Linux kernel driver sets the number of event segments and entries to 1 , while the initial import of the xhci code set that values to 3 for reasons unknown. While most controllers are fine with more event segments with more entries, there are standard-conformant controllers (ie. Renesas RCar xHCI) which only support 1 event segment.

Set the number of event segments and event entries back to 1 to allow such controllers to work with U-Boot xHCI stack. Note that the Renesas controller correctly indicates ERST Max = 1 in HCSPARAMS2[7:4] .

---
 drivers/usb/host/xhci.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/xhci.h +2 -2
index a497d9d830..3377450fca 100644
@@ -1045,9 +1045,9 @@ struct xhci_scratchpad {
  * (1K bytes * 8bytes/bit) / (4*32 bits) = 64 segment entries in the table,
  * meaning 64 ring segments.
  * Initial allocated size of the ERST, in number of entries */
-#define	ERST_NUM_SEGS	3
+#define	ERST_NUM_SEGS	1
 /* Initial number of event segment rings allocated */
-#define	ERST_ENTRIES	3
+#define	ERST_ENTRIES	1
 /* Initial allocated size of the ERST, in number of entries */
 #define	ERST_SIZE	64
 /* Poll every 60 seconds */
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 usb: xhci: Set number of event segments and entries to 1

Quoted 10 lines · Marek Vasut

The Linux kernel driver sets the number of event segments and entries to 1 , while the initial import of the xhci code set that values to 3 for reasons unknown. While most controllers are fine with more event segments with more entries, there are standard-conformant controllers (ie. Renesas RCar xHCI) which only support 1 event segment.

Set the number of event segments and event entries back to 1 to allow such controllers to work with U-Boot xHCI stack. Note that the Renesas controller correctly indicates ERST Max = 1 in HCSPARAMS2[7:4] .

Quoted 6 lines
---
 drivers/usb/host/xhci.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)