Skip to contentSkip to conversation

usb: xhci: Add interrupt transfer support

PATCH New Bin Meng 6 participants 25 messages Jun 26, 2017 – Jul 30, 2017

Subsystems (6)
lore
Share & tools
lore

Bin Meng

author
#0 lore raw

cover usb: xhci: Add interrupt transfer support

This series is the final series of the xHCI driver update.

This adds the missing interrupt transfer support to xHCI driver, so that devices like USB keyboard that uses interrupt transfer when CONFIG_SYS_USB_EVENT_POLL is defined can work.

Previous two series:
[1]: usb: xhci: Fix USB xHCI support on Intel platform
https://lists.denx.de/pipermail/u-boot/2017-June/296166.html
[2]: usb: hub: Support USB 3.0 hubs
https://lists.denx.de/pipermail/u-boot/2017-June/296284.html

This series is available at u-boot-x86/xhci-working3 for testing.

Bin Meng (3):
usb: xhci: Add interrupt transfer support
usb: kbd: kconfig: Set a default polling mechanism for USB keyboard
usb: configs: Clean up CONFIG_SYS_USB_EVENT_POLL_(xxx) in board
configs

 configs/A10-OLinuXino-Lime_defconfig           |  1 +
 configs/A10s-OLinuXino-M_defconfig             |  1 +
 configs/A13-OLinuXinoM_defconfig               |  1 +
 configs/A13-OLinuXino_defconfig                |  1 +
 configs/A20-OLinuXino-Lime2_defconfig          |  1 +
 configs/A20-OLinuXino-Lime_defconfig           |  1 +
 configs/A20-OLinuXino_MICRO_defconfig          |  1 +
 configs/A20-Olimex-SOM-EVB_defconfig           |  1 +
 configs/A33-OLinuXino_defconfig                |  1 +
 configs/Ainol_AW1_defconfig                    |  1 +
 configs/Ampe_A76_defconfig                     |  1 +
 configs/Auxtek-T003_defconfig                  |  1 +
 configs/Auxtek-T004_defconfig                  |  1 +
 configs/Bananapi_M2_Ultra_defconfig            |  1 +
 configs/Bananapi_defconfig                     |  1 +
 configs/Bananapro_defconfig                    |  1 +
 configs/CHIP_defconfig                         |  1 +
 configs/CHIP_pro_defconfig                     |  1 +
 configs/CSQ_CS908_defconfig                    |  1 +
 configs/Chuwi_V7_CW0825_defconfig              |  1 +
 configs/Colombus_defconfig                     |  1 +
 configs/Cubieboard2_defconfig                  |  1 +
 configs/Cubieboard4_defconfig                  |  1 +
 configs/Cubieboard_defconfig                   |  1 +
 configs/Cubietruck_defconfig                   |  1 +
 configs/Cubietruck_plus_defconfig              |  1 +
 configs/Empire_electronix_d709_defconfig       |  1 +
 configs/Empire_electronix_m712_defconfig       |  1 +
 configs/Hummingbird_A31_defconfig              |  1 +
 configs/Hyundai_A7HD_defconfig                 |  1 +
 configs/Itead_Ibox_A20_defconfig               |  1 +
 configs/Lamobo_R1_defconfig                    |  1 +
 configs/LicheePi_Zero_defconfig                |  1 +
 configs/Linksprite_pcDuino3_Nano_defconfig     |  1 +
 configs/Linksprite_pcDuino3_defconfig          |  1 +
 configs/Linksprite_pcDuino_defconfig           |  1 +
 configs/MK808C_defconfig                       |  1 +
 configs/MSI_Primo73_defconfig                  |  1 +
 configs/MSI_Primo81_defconfig                  |  1 +
 configs/Marsboard_A10_defconfig                |  1 +
 configs/Mele_A1000G_quad_defconfig             |  1 +
 configs/Mele_A1000_defconfig                   |  1 +
 configs/Mele_I7_defconfig                      |  1 +
 configs/Mele_M3_defconfig                      |  1 +
 configs/Mele_M5_defconfig                      |  1 +
 configs/Mele_M9_defconfig                      |  1 +
 configs/Merrii_A80_Optimus_defconfig           |  1 +
 configs/Mini-X_defconfig                       |  1 +
 configs/Nintendo_NES_Classic_Edition_defconfig |  1 +
 configs/Orangepi_defconfig                     |  1 +
 configs/Orangepi_mini_defconfig                |  1 +
 configs/Sinlinx_SinA31s_defconfig              |  1 +
 configs/Sinlinx_SinA33_defconfig               |  1 +
 configs/Sinovoip_BPI_M2_Plus_defconfig         |  1 +
 configs/Sinovoip_BPI_M2_defconfig              |  1 +
 configs/Sinovoip_BPI_M3_defconfig              |  1 +
 configs/Sunchip_CX-A99_defconfig               |  1 +
 configs/UTOO_P66_defconfig                     |  1 +
 configs/Wexler_TAB7200_defconfig               |  1 +
 configs/Wits_Pro_A20_DKT_defconfig             |  1 +
 configs/Wobo_i5_defconfig                      |  1 +
 configs/Yones_Toptech_BD1078_defconfig         |  1 +
 configs/Yones_Toptech_BS1078_V2_defconfig      |  1 +
 configs/ba10_tv_box_defconfig                  |  1 +
 configs/bananapi_m64_defconfig                 |  1 +
 configs/cgtqmx6eval_defconfig                  |  1 +
 configs/colorfly_e708_q1_defconfig             |  1 +
 configs/difrnce_dit4350_defconfig              |  1 +
 configs/dms-ba16-1g_defconfig                  |  1 +
 configs/dms-ba16_defconfig                     |  1 +
 configs/dserve_dsrv9703c_defconfig             |  1 +
 configs/ga10h_v1_1_defconfig                   |  1 +
 configs/gt90h_v4_defconfig                     |  1 +
 configs/gwventana_emmc_defconfig               |  1 +
 configs/gwventana_gw5904_defconfig             |  1 +
 configs/gwventana_nand_defconfig               |  1 +
 configs/h8_homlet_v2_defconfig                 |  1 +
 configs/i12-tvbox_defconfig                    |  1 +
 configs/iNet_3F_defconfig                      |  1 +
 configs/iNet_3W_defconfig                      |  1 +
 configs/iNet_86VS_defconfig                    |  1 +
 configs/iNet_D978_rev2_defconfig               |  1 +
 configs/icnova-a20-swac_defconfig              |  1 +
 configs/inet1_defconfig                        |  1 +
 configs/inet86dz_defconfig                     |  1 +
 configs/inet97fv2_defconfig                    |  1 +
 configs/inet98v_rev2_defconfig                 |  1 +
 configs/inet9f_rev03_defconfig                 |  1 +
 configs/inet_q972_defconfig                    |  1 +
 configs/jesurun_q5_defconfig                   |  1 +
 configs/mixtile_loftq_defconfig                |  1 +
 configs/mk802_a10s_defconfig                   |  1 +
 configs/mk802_defconfig                        |  1 +
 configs/mk802ii_defconfig                      |  1 +
 configs/mx6qsabrelite_defconfig                |  1 +
 configs/nanopi_m1_defconfig                    |  1 +
 configs/nanopi_m1_plus_defconfig               |  1 +
 configs/nanopi_neo2_defconfig                  |  1 +
 configs/nanopi_neo_air_defconfig               |  1 +
 configs/nanopi_neo_defconfig                   |  1 +
 configs/nitrogen6dl2g_defconfig                |  1 +
 configs/nitrogen6dl_defconfig                  |  1 +
 configs/nitrogen6q2g_defconfig                 |  1 +
 configs/nitrogen6q_defconfig                   |  1 +
 configs/nitrogen6s1g_defconfig                 |  1 +
 configs/nitrogen6s_defconfig                   |  1 +
 configs/novena_defconfig                       |  1 +
 configs/orangepi_2_defconfig                   |  1 +
 configs/orangepi_lite_defconfig                |  1 +
 configs/orangepi_one_defconfig                 |  1 +
 configs/orangepi_pc2_defconfig                 |  1 +
 configs/orangepi_pc_defconfig                  |  1 +
 configs/orangepi_pc_plus_defconfig             |  1 +
 configs/orangepi_plus2e_defconfig              |  1 +
 configs/orangepi_plus_defconfig                |  1 +
 configs/orangepi_prime_defconfig               |  1 +
 configs/orangepi_win_defconfig                 |  1 +
 configs/orangepi_zero_defconfig                |  1 +
 configs/orangepi_zero_plus2_defconfig          |  1 +
 configs/parrot_r16_defconfig                   |  1 +
 configs/pine64_plus_defconfig                  |  1 +
 configs/polaroid_mid2407pxe03_defconfig        |  1 +
 configs/polaroid_mid2809pxe04_defconfig        |  1 +
 configs/pov_protab2_ips9_defconfig             |  1 +
 configs/q8_a13_tablet_defconfig                |  1 +
 configs/q8_a23_tablet_800x480_defconfig        |  1 +
 configs/q8_a33_tablet_1024x600_defconfig       |  1 +
 configs/q8_a33_tablet_800x480_defconfig        |  1 +
 configs/r7-tv-dongle_defconfig                 |  1 +
 configs/sandbox_defconfig                      |  1 -
 configs/sandbox_flattree_defconfig             |  1 -
 configs/sandbox_noblk_defconfig                |  1 -
 configs/sandbox_spl_defconfig                  |  1 -
 configs/sopine_baseboard_defconfig             |  1 +
 configs/sun8i_a23_evb_defconfig                |  1 +
 configs/sunxi_Gemei_G9_defconfig               |  1 +
 configs/tbs2910_defconfig                      |  1 +
 drivers/usb/Kconfig                            |  2 +-
 drivers/usb/host/xhci.c                        | 13 ++++++++++---
 include/configs/MPC8610HPCD.h                  |  1 -
 include/configs/MPC8641HPCN.h                  |  1 -
 include/configs/advantech_dms-ba16.h           |  1 -
 include/configs/am3517_crane.h                 |  1 -
 include/configs/am3517_evm.h                   |  1 -
 include/configs/apalis_imx6.h                  |  3 ---
 include/configs/cgtqmx6eval.h                  |  1 -
 include/configs/colibri_imx6.h                 |  3 ---
 include/configs/cyrus.h                        |  1 -
 include/configs/ge_bx50v3.h                    |  1 -
 include/configs/gw_ventana.h                   |  1 -
 include/configs/mx6cuboxi.h                    |  1 -
 include/configs/nitrogen6x.h                   |  1 -
 include/configs/novena.h                       |  1 -
 include/configs/omap3_evm.h                    |  1 -
 include/configs/rpi.h                          |  1 -
 include/configs/sunxi-common.h                 |  1 -
 include/configs/tbs2910.h                      |  1 -
 include/configs/tegra-common-post.h            |  1 -
 include/configs/x86-common.h                   |  1 -
 scripts/config_whitelist.txt                   |  3 ---
 160 files changed, 144 insertions(+), 35 deletions(-)
Signature · 1 line
2.9.2
author
#1 lore raw

PATCH 1/3 usb: xhci: Add interrupt transfer support

xHCI uses normal TRBs for both bulk and interrupt. This adds the missing interrupt transfer support to xHCI so that devices like USB keyboard that uses interrupt transfer can work.

---

 drivers/usb/host/xhci.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
drivers/usb/host/xhci.c +10 -3
index a82502c..c0d0b4a 100644
@@ -890,11 +890,18 @@ unknown:
 static int _xhci_submit_int_msg(struct usb_device *udev, unsigned long pipe,
 				void *buffer, int length, int interval)
 {
+	if (usb_pipetype(pipe) != PIPE_INTERRUPT) {
+		printf("non-interrupt pipe (type=%lu)", usb_pipetype(pipe));
+		return -EINVAL;
+	}
+
 	/*
-	 * TODO: Not addressing any interrupt type transfer requests
-	 * Add support for it later.
+	 * xHCI uses normal TRBs for both bulk and interrupt. When the
+	 * interrupt endpoint is to be serviced, the xHC will consume
+	 * (at most) one TD. A TD (comprised of sg list entries) can
+	 * take several service intervals to transmit.
 	 */
-	return -EINVAL;
+	return xhci_bulk_tx(udev, pipe, length, buffer);
 }
 
 /**
Signature · 1 line
2.9.2
author
#2 lore raw

PATCH 2/3 usb: kbd: kconfig: Set a default polling mechanism for USB keyboard

In reply to Bin Meng

The choice of "USB keyboard polling" cannot be optional as without one mechanism being set, it just doesn't work. Set the default one to CONFIG_SYS_USB_EVENT_POLL.

---

 drivers/usb/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/Kconfig +1 -1
index da3ec2f..acbac69 100644
@@ -75,7 +75,7 @@ if USB_KEYBOARD
 
 choice
 	prompt "USB keyboard polling"
-	optional
+	default SYS_USB_EVENT_POLL
 	---help---
 	  Enable a polling mechanism for USB keyboard.
 
Signature · 1 line
2.9.2
author
#3 lore raw

PATCH 3/3 usb: configs: Clean up CONFIG_SYS_USB_EVENT_POLL_(xxx) in board configs

In reply to Bin Meng

The following 3 Kconfig options
- CONFIG_SYS_USB_EVENT_POLL
- CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
- CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE

are already converted to Kconfig. Let's clean up all board configs to switch over to use them.

---

 configs/A10-OLinuXino-Lime_defconfig           | 1 +
 configs/A10s-OLinuXino-M_defconfig             | 1 +
 configs/A13-OLinuXinoM_defconfig               | 1 +
 configs/A13-OLinuXino_defconfig                | 1 +
 configs/A20-OLinuXino-Lime2_defconfig          | 1 +
 configs/A20-OLinuXino-Lime_defconfig           | 1 +
 configs/A20-OLinuXino_MICRO_defconfig          | 1 +
 configs/A20-Olimex-SOM-EVB_defconfig           | 1 +
 configs/A33-OLinuXino_defconfig                | 1 +
 configs/Ainol_AW1_defconfig                    | 1 +
 configs/Ampe_A76_defconfig                     | 1 +
 configs/Auxtek-T003_defconfig                  | 1 +
 configs/Auxtek-T004_defconfig                  | 1 +
 configs/Bananapi_M2_Ultra_defconfig            | 1 +
 configs/Bananapi_defconfig                     | 1 +
 configs/Bananapro_defconfig                    | 1 +
 configs/CHIP_defconfig                         | 1 +
 configs/CHIP_pro_defconfig                     | 1 +
 configs/CSQ_CS908_defconfig                    | 1 +
 configs/Chuwi_V7_CW0825_defconfig              | 1 +
 configs/Colombus_defconfig                     | 1 +
 configs/Cubieboard2_defconfig                  | 1 +
 configs/Cubieboard4_defconfig                  | 1 +
 configs/Cubieboard_defconfig                   | 1 +
 configs/Cubietruck_defconfig                   | 1 +
 configs/Cubietruck_plus_defconfig              | 1 +
 configs/Empire_electronix_d709_defconfig       | 1 +
 configs/Empire_electronix_m712_defconfig       | 1 +
 configs/Hummingbird_A31_defconfig              | 1 +
 configs/Hyundai_A7HD_defconfig                 | 1 +
 configs/Itead_Ibox_A20_defconfig               | 1 +
 configs/Lamobo_R1_defconfig                    | 1 +
 configs/LicheePi_Zero_defconfig                | 1 +
 configs/Linksprite_pcDuino3_Nano_defconfig     | 1 +
 configs/Linksprite_pcDuino3_defconfig          | 1 +
 configs/Linksprite_pcDuino_defconfig           | 1 +
 configs/MK808C_defconfig                       | 1 +
 configs/MSI_Primo73_defconfig                  | 1 +
 configs/MSI_Primo81_defconfig                  | 1 +
 configs/Marsboard_A10_defconfig                | 1 +
 configs/Mele_A1000G_quad_defconfig             | 1 +
 configs/Mele_A1000_defconfig                   | 1 +
 configs/Mele_I7_defconfig                      | 1 +
 configs/Mele_M3_defconfig                      | 1 +
 configs/Mele_M5_defconfig                      | 1 +
 configs/Mele_M9_defconfig                      | 1 +
 configs/Merrii_A80_Optimus_defconfig           | 1 +
 configs/Mini-X_defconfig                       | 1 +
 configs/Nintendo_NES_Classic_Edition_defconfig | 1 +
 configs/Orangepi_defconfig                     | 1 +
 configs/Orangepi_mini_defconfig                | 1 +
 configs/Sinlinx_SinA31s_defconfig              | 1 +
 configs/Sinlinx_SinA33_defconfig               | 1 +
 configs/Sinovoip_BPI_M2_Plus_defconfig         | 1 +
 configs/Sinovoip_BPI_M2_defconfig              | 1 +
 configs/Sinovoip_BPI_M3_defconfig              | 1 +
 configs/Sunchip_CX-A99_defconfig               | 1 +
 configs/UTOO_P66_defconfig                     | 1 +
 configs/Wexler_TAB7200_defconfig               | 1 +
 configs/Wits_Pro_A20_DKT_defconfig             | 1 +
 configs/Wobo_i5_defconfig                      | 1 +
 configs/Yones_Toptech_BD1078_defconfig         | 1 +
 configs/Yones_Toptech_BS1078_V2_defconfig      | 1 +
 configs/ba10_tv_box_defconfig                  | 1 +
 configs/bananapi_m64_defconfig                 | 1 +
 configs/cgtqmx6eval_defconfig                  | 1 +
 configs/colorfly_e708_q1_defconfig             | 1 +
 configs/difrnce_dit4350_defconfig              | 1 +
 configs/dms-ba16-1g_defconfig                  | 1 +
 configs/dms-ba16_defconfig                     | 1 +
 configs/dserve_dsrv9703c_defconfig             | 1 +
 configs/ga10h_v1_1_defconfig                   | 1 +
 configs/gt90h_v4_defconfig                     | 1 +
 configs/gwventana_emmc_defconfig               | 1 +
 configs/gwventana_gw5904_defconfig             | 1 +
 configs/gwventana_nand_defconfig               | 1 +
 configs/h8_homlet_v2_defconfig                 | 1 +
 configs/i12-tvbox_defconfig                    | 1 +
 configs/iNet_3F_defconfig                      | 1 +
 configs/iNet_3W_defconfig                      | 1 +
 configs/iNet_86VS_defconfig                    | 1 +
 configs/iNet_D978_rev2_defconfig               | 1 +
 configs/icnova-a20-swac_defconfig              | 1 +
 configs/inet1_defconfig                        | 1 +
 configs/inet86dz_defconfig                     | 1 +
 configs/inet97fv2_defconfig                    | 1 +
 configs/inet98v_rev2_defconfig                 | 1 +
 configs/inet9f_rev03_defconfig                 | 1 +
 configs/inet_q972_defconfig                    | 1 +
 configs/jesurun_q5_defconfig                   | 1 +
 configs/mixtile_loftq_defconfig                | 1 +
 configs/mk802_a10s_defconfig                   | 1 +
 configs/mk802_defconfig                        | 1 +
 configs/mk802ii_defconfig                      | 1 +
 configs/mx6qsabrelite_defconfig                | 1 +
 configs/nanopi_m1_defconfig                    | 1 +
 configs/nanopi_m1_plus_defconfig               | 1 +
 configs/nanopi_neo2_defconfig                  | 1 +
 configs/nanopi_neo_air_defconfig               | 1 +
 configs/nanopi_neo_defconfig                   | 1 +
 configs/nitrogen6dl2g_defconfig                | 1 +
 configs/nitrogen6dl_defconfig                  | 1 +
 configs/nitrogen6q2g_defconfig                 | 1 +
 configs/nitrogen6q_defconfig                   | 1 +
 configs/nitrogen6s1g_defconfig                 | 1 +
 configs/nitrogen6s_defconfig                   | 1 +
 configs/novena_defconfig                       | 1 +
 configs/orangepi_2_defconfig                   | 1 +
 configs/orangepi_lite_defconfig                | 1 +
 configs/orangepi_one_defconfig                 | 1 +
 configs/orangepi_pc2_defconfig                 | 1 +
 configs/orangepi_pc_defconfig                  | 1 +
 configs/orangepi_pc_plus_defconfig             | 1 +
 configs/orangepi_plus2e_defconfig              | 1 +
 configs/orangepi_plus_defconfig                | 1 +
 configs/orangepi_prime_defconfig               | 1 +
 configs/orangepi_win_defconfig                 | 1 +
 configs/orangepi_zero_defconfig                | 1 +
 configs/orangepi_zero_plus2_defconfig          | 1 +
 configs/parrot_r16_defconfig                   | 1 +
 configs/pine64_plus_defconfig                  | 1 +
 configs/polaroid_mid2407pxe03_defconfig        | 1 +
 configs/polaroid_mid2809pxe04_defconfig        | 1 +
 configs/pov_protab2_ips9_defconfig             | 1 +
 configs/q8_a13_tablet_defconfig                | 1 +
 configs/q8_a23_tablet_800x480_defconfig        | 1 +
 configs/q8_a33_tablet_1024x600_defconfig       | 1 +
 configs/q8_a33_tablet_800x480_defconfig        | 1 +
 configs/r7-tv-dongle_defconfig                 | 1 +
 configs/sandbox_defconfig                      | 1 -
 configs/sandbox_flattree_defconfig             | 1 -
 configs/sandbox_noblk_defconfig                | 1 -
 configs/sandbox_spl_defconfig                  | 1 -
 configs/sopine_baseboard_defconfig             | 1 +
 configs/sun8i_a23_evb_defconfig                | 1 +
 configs/sunxi_Gemei_G9_defconfig               | 1 +
 configs/tbs2910_defconfig                      | 1 +
 include/configs/MPC8610HPCD.h                  | 1 -
 include/configs/MPC8641HPCN.h                  | 1 -
 include/configs/advantech_dms-ba16.h           | 1 -
 include/configs/am3517_crane.h                 | 1 -
 include/configs/am3517_evm.h                   | 1 -
 include/configs/apalis_imx6.h                  | 3 ---
 include/configs/cgtqmx6eval.h                  | 1 -
 include/configs/colibri_imx6.h                 | 3 ---
 include/configs/cyrus.h                        | 1 -
 include/configs/ge_bx50v3.h                    | 1 -
 include/configs/gw_ventana.h                   | 1 -
 include/configs/mx6cuboxi.h                    | 1 -
 include/configs/nitrogen6x.h                   | 1 -
 include/configs/novena.h                       | 1 -
 include/configs/omap3_evm.h                    | 1 -
 include/configs/rpi.h                          | 1 -
 include/configs/sunxi-common.h                 | 1 -
 include/configs/tbs2910.h                      | 1 -
 include/configs/tegra-common-post.h            | 1 -
 include/configs/x86-common.h                   | 1 -
 scripts/config_whitelist.txt                   | 3 ---
 158 files changed, 133 insertions(+), 31 deletions(-)
configs/A10-OLinuXino-Lime_defconfig +1 -0
index ec16a44..a809cb8 100644
@@ -22,3 +22,4 @@ CONFIG_SUN4I_EMAC=y
 CONFIG_AXP_ALDO3_VOLT=2800
 CONFIG_AXP_ALDO4_VOLT=2800
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/A10s-OLinuXino-M_defconfig +1 -0
index af6f5bc..618883c 100644
@@ -19,3 +19,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SUN4I_EMAC=y
 CONFIG_AXP152_POWER=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/A13-OLinuXinoM_defconfig +1 -0
index 530a60e..d8d1040 100644
@@ -21,3 +21,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUNXI_NO_PMIC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/A13-OLinuXino_defconfig +1 -0
index 15c6879..111df03 100644
@@ -28,6 +28,7 @@ CONFIG_DFU_RAM=y
 CONFIG_AXP_ALDO3_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Allwinner Technology"
configs/A20-OLinuXino-Lime2_defconfig +1 -0
index 1f2daa6..81a3997 100644
@@ -28,6 +28,7 @@ CONFIG_AXP_ALDO3_VOLT=2800
 CONFIG_AXP_ALDO4_VOLT=2800
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Allwinner Technology"
configs/A20-OLinuXino-Lime_defconfig +1 -0
index 7f63d4a..925a8be 100644
@@ -21,3 +21,4 @@ CONFIG_SUN7I_GMAC=y
 CONFIG_AXP_ALDO3_VOLT=2800
 CONFIG_AXP_ALDO4_VOLT=2800
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/A20-OLinuXino_MICRO_defconfig +1 -0
index 89e87e7..a65a9fe 100644
@@ -24,3 +24,4 @@ CONFIG_SUN7I_GMAC=y
 CONFIG_AXP_ALDO3_VOLT=2800
 CONFIG_AXP_ALDO4_VOLT=2800
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/A20-Olimex-SOM-EVB_defconfig +1 -0
index 6c87648..fe1a2b5 100644
@@ -26,3 +26,4 @@ CONFIG_SUN7I_GMAC=y
 CONFIG_AXP_ALDO3_VOLT=2800
 CONFIG_AXP_ALDO4_VOLT=2800
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/A33-OLinuXino_defconfig +1 -0
index e959240..fafbeb2 100644
@@ -24,3 +24,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_AXP_DCDC1_VOLT=3300
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Ainol_AW1_defconfig +1 -0
index 0e5023a..af2d593 100644
@@ -22,3 +22,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Ampe_A76_defconfig +1 -0
index f3f599d..03f5139 100644
@@ -23,3 +23,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Auxtek-T003_defconfig +1 -0
index f152414..badfd94 100644
@@ -17,3 +17,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_AXP152_POWER=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Auxtek-T004_defconfig +1 -0
index 3f24a06..48a8344 100644
@@ -15,3 +15,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_AXP152_POWER=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Bananapi_M2_Ultra_defconfig +1 -0
index 4332eca..da3eb2b 100644
@@ -16,3 +16,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_CMD_FPGA is not set
 CONFIG_AXP_DLDO4_VOLT=2500
 CONFIG_AXP_ELDO3_VOLT=1200
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Bananapi_defconfig +1 -0
index fe75eef..84f7d98 100644
@@ -21,3 +21,4 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Bananapro_defconfig +1 -0
index df65922..dd96b2c 100644
@@ -24,3 +24,4 @@ CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_AXP_ALDO4_VOLT=2500
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/CHIP_defconfig +1 -0
index 9b9e0b7..ef13091 100644
@@ -19,6 +19,7 @@ CONFIG_AXP_ALDO3_VOLT=3300
 CONFIG_AXP_ALDO4_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Allwinner Technology"
configs/CHIP_pro_defconfig +1 -0
index 52572bd..8777491 100644
@@ -25,6 +25,7 @@ CONFIG_AXP_ALDO3_VOLT=3300
 CONFIG_AXP_ALDO4_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Allwinner Technology"
configs/CSQ_CS908_defconfig +1 -0
index a6fcbf5..348abb5 100644
@@ -19,3 +19,4 @@ CONFIG_AXP_ALDO1_VOLT=3300
 CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Chuwi_V7_CW0825_defconfig +1 -0
index 684213e..7ece4f9 100644
@@ -22,6 +22,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_VIDEO_LCD_SPI_CS="PA0"
 CONFIG_VIDEO_LCD_SPI_SCLK="PA1"
 CONFIG_VIDEO_LCD_SPI_MOSI="PA2"
configs/Colombus_defconfig +1 -0
index 1359281..21e87e6 100644
@@ -28,3 +28,4 @@ CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_AXP_ALDO1_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Cubieboard2_defconfig +1 -0
index 02c503f..48cb448 100644
@@ -18,3 +18,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Cubieboard4_defconfig +1 -0
index 97cef1f..6f9fd2b 100644
@@ -19,3 +19,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_AXP809_POWER=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Cubieboard_defconfig +1 -0
index a8e9c98..7c79807 100644
@@ -17,3 +17,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN4I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Cubietruck_defconfig +1 -0
index f9d56c8..a2ddf8d 100644
@@ -28,6 +28,7 @@ CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Allwinner Technology"
configs/Cubietruck_plus_defconfig +1 -0
index 1a59e93..34444ec 100644
@@ -26,3 +26,4 @@ CONFIG_AXP_DLDO4_VOLT=3300
 CONFIG_AXP_FLDO1_VOLT=1200
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Empire_electronix_d709_defconfig +1 -0
index 032056b..f83e33a 100644
@@ -24,3 +24,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Empire_electronix_m712_defconfig +1 -0
index 8437da3..5a7bc09 100644
@@ -23,3 +23,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Hummingbird_A31_defconfig +1 -0
index 6f9b103..45fd4f4 100644
@@ -20,3 +20,4 @@ CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_AXP_ALDO1_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Hyundai_A7HD_defconfig +1 -0
index b7bd437..0808ada 100644
@@ -23,3 +23,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Itead_Ibox_A20_defconfig +1 -0
index 4bae19f..0bd79ce 100644
@@ -18,3 +18,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Lamobo_R1_defconfig +1 -0
index cc29d60..3a7318f 100644
@@ -21,3 +21,4 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/LicheePi_Zero_defconfig +1 -0
index 887997b..bd754cb 100644
@@ -8,3 +8,4 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-v3s-licheepi-zero"
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
 # CONFIG_NETDEVICES is not set
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Linksprite_pcDuino3_Nano_defconfig +1 -0
index 80416cb..94a122a 100644
@@ -21,3 +21,4 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Linksprite_pcDuino3_defconfig +1 -0
index b9f89a0..1ec8de2 100644
@@ -18,3 +18,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Linksprite_pcDuino_defconfig +1 -0
index e33a9c1..06edc5e 100644
@@ -15,3 +15,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN4I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/MK808C_defconfig +1 -0
index e4a2dd7..790b161 100644
@@ -13,3 +13,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/MSI_Primo73_defconfig +1 -0
index bd4cc03..6f23d87 100644
@@ -17,3 +17,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/MSI_Primo81_defconfig +1 -0
index 08a7db2..ccdea4a 100644
@@ -22,6 +22,7 @@ CONFIG_SPL=y
 CONFIG_AXP_DLDO1_VOLT=3300
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_VIDEO_LCD_SSD2828_TX_CLK=27
 CONFIG_VIDEO_LCD_SSD2828_RESET="PA26"
 CONFIG_VIDEO_LCD_SPI_CS="PH9"
configs/Marsboard_A10_defconfig +1 -0
index 6b8bd1a..082c825 100644
@@ -14,3 +14,4 @@ CONFIG_SPL=y
 CONFIG_SUN4I_EMAC=y
 CONFIG_SUNXI_NO_PMIC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Mele_A1000G_quad_defconfig +1 -0
index 5b1b5f5..d908e33 100644
@@ -22,3 +22,4 @@ CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_AXP_DLDO4_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Mele_A1000_defconfig +1 -0
index 0442360..466dcf7 100644
@@ -17,3 +17,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN4I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Mele_I7_defconfig +1 -0
index b609697..3c33739 100644
@@ -20,3 +20,4 @@ CONFIG_AXP_ALDO1_VOLT=3300
 CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_AXP_DLDO4_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Mele_M3_defconfig +1 -0
index 08e8c2d..b500611 100644
@@ -19,3 +19,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Mele_M5_defconfig +1 -0
index 4c377e3..83ad132 100644
@@ -19,3 +19,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Mele_M9_defconfig +1 -0
index dc7901f..d357566 100644
@@ -20,3 +20,4 @@ CONFIG_AXP_ALDO1_VOLT=3300
 CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_AXP_DLDO4_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Merrii_A80_Optimus_defconfig +1 -0
index 8bc751c..7bea3e2 100644
@@ -19,3 +19,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_AXP809_POWER=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Mini-X_defconfig +1 -0
index 811c941..67ae102 100644
@@ -15,3 +15,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Nintendo_NES_Classic_Edition_defconfig +1 -0
index 5f91c35..4d88ce6 100644
@@ -19,6 +19,7 @@ CONFIG_SPL=y
 CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_AXP_ELDO2_VOLT=1800
 CONFIG_USB_MUSB_GADGET=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Allwinner Technology"
configs/Orangepi_defconfig +1 -0
index b8c1ea4..a1108fc 100644
@@ -23,3 +23,4 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Orangepi_mini_defconfig +1 -0
index 19c35ef..ac2c88e 100644
@@ -25,3 +25,4 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Sinlinx_SinA31s_defconfig +1 -0
index 7f815a3..0cb8c13 100644
@@ -21,3 +21,4 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Sinlinx_SinA33_defconfig +1 -0
index d1b5b22..6ba5207 100644
@@ -24,6 +24,7 @@ CONFIG_CMD_DFU=y
 CONFIG_DFU_RAM=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Allwinner Technology"
configs/Sinovoip_BPI_M2_Plus_defconfig +1 -0
index 651a2ff..43ae6ca 100644
@@ -17,3 +17,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN8I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Sinovoip_BPI_M2_defconfig +1 -0
index a2cadbc..feec46e 100644
@@ -20,3 +20,4 @@ CONFIG_AXP_ALDO1_VOLT=3300
 CONFIG_AXP_ALDO2_VOLT=1800
 CONFIG_AXP_DLDO1_VOLT=3000
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Sinovoip_BPI_M3_defconfig +1 -0
index 45eadcb..8392836 100644
@@ -27,3 +27,4 @@ CONFIG_AXP_DLDO3_VOLT=2500
 CONFIG_AXP_SW_ON=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Sunchip_CX-A99_defconfig +1 -0
index 0641b1f..2284bd3 100644
@@ -18,3 +18,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/UTOO_P66_defconfig +1 -0
index 99b15ea..dcfd570 100644
@@ -29,3 +29,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_EFI_PARTITION is not set
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Wexler_TAB7200_defconfig +1 -0
index f80233a..3f04c39 100644
@@ -22,3 +22,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Wits_Pro_A20_DKT_defconfig +1 -0
index 8658ef6..739355a 100644
@@ -23,3 +23,4 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Wobo_i5_defconfig +1 -0
index 90f391f..e1746fb 100644
@@ -17,3 +17,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_AXP_ALDO3_VOLT=3300
 CONFIG_AXP_ALDO4_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Yones_Toptech_BD1078_defconfig +1 -0
index 9612712..2d57784 100644
@@ -27,3 +27,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/Yones_Toptech_BS1078_V2_defconfig +1 -0
index 3cbf41e..99481c9 100644
@@ -24,3 +24,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/ba10_tv_box_defconfig +1 -0
index ad066fd..083ead5 100644
@@ -19,3 +19,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SUN4I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/bananapi_m64_defconfig +1 -0
index 3908d42..4a08c1e 100644
@@ -15,3 +15,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN8I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/cgtqmx6eval_defconfig +1 -0
index 77dd227..814d959 100644
@@ -48,6 +48,7 @@ CONFIG_DFU_SF=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
configs/colorfly_e708_q1_defconfig +1 -0
index c0ed30e..9e62d3b 100644
@@ -25,3 +25,4 @@ CONFIG_SPL=y
 CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_AXP_DLDO2_VOLT=1800
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/difrnce_dit4350_defconfig +1 -0
index 629507e..be16346 100644
@@ -23,3 +23,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/dms-ba16-1g_defconfig +1 -0
index 60db289..4a7ecc1 100644
@@ -33,6 +33,7 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_USB=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
configs/dms-ba16_defconfig +1 -0
index 7a8c268..61f2068 100644
@@ -32,6 +32,7 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_USB=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
configs/dserve_dsrv9703c_defconfig +1 -0
index c92fdb1..645bbbc 100644
@@ -22,3 +22,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/ga10h_v1_1_defconfig +1 -0
index 8e1c9f7..99ef75b 100644
@@ -26,3 +26,4 @@ CONFIG_SPL=y
 CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/gt90h_v4_defconfig +1 -0
index 8f6469d..a651fe5 100644
@@ -24,3 +24,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/gwventana_emmc_defconfig +1 -0
index a476dc2..4b7f179 100644
@@ -57,6 +57,7 @@ CONFIG_DM_SERIAL=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
configs/gwventana_gw5904_defconfig +1 -0
index bd38e6d..719d1a0 100644
@@ -61,6 +61,7 @@ CONFIG_DM_SERIAL=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
configs/gwventana_nand_defconfig +1 -0
index 296f015..701257f 100644
@@ -58,6 +58,7 @@ CONFIG_DM_SERIAL=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
configs/h8_homlet_v2_defconfig +1 -0
index 368233a..cd599ad 100644
@@ -20,3 +20,4 @@ CONFIG_SPL=y
 CONFIG_AXP_DLDO4_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/i12-tvbox_defconfig +1 -0
index 4245491..416d771 100644
@@ -17,3 +17,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/iNet_3F_defconfig +1 -0
index 231b2b9..0c3d226 100644
@@ -22,3 +22,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/iNet_3W_defconfig +1 -0
index a366abe..5c1dc32 100644
@@ -22,3 +22,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/iNet_86VS_defconfig +1 -0
index ed8650b..6beabda 100644
@@ -21,3 +21,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/iNet_D978_rev2_defconfig +1 -0
index 62e4f1b..907b6cd 100644
@@ -26,3 +26,4 @@ CONFIG_SPL=y
 CONFIG_AXP_DLDO1_VOLT=3300
 # CONFIG_REQUIRE_SERIAL_CONSOLE is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/icnova-a20-swac_defconfig +1 -0
index 6f79c58..f0c663d 100644
@@ -24,3 +24,4 @@ CONFIG_CMD_UNZIP=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/inet1_defconfig +1 -0
index d1bebc2..a8905ae 100644
@@ -23,3 +23,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/inet86dz_defconfig +1 -0
index 7940d97..a596e09 100644
@@ -24,3 +24,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/inet97fv2_defconfig +1 -0
index 4f1a7b5..6376f5f 100644
@@ -21,3 +21,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/inet98v_rev2_defconfig +1 -0
index 2afe3be..1b5dc9b 100644
@@ -23,3 +23,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/inet9f_rev03_defconfig +1 -0
index ae732fa..3265a44 100644
@@ -21,3 +21,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/inet_q972_defconfig +1 -0
index d436005..1d0fe8f 100644
@@ -24,3 +24,4 @@ CONFIG_SPL=y
 CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/jesurun_q5_defconfig +1 -0
index 822d56b..6882144 100644
@@ -18,3 +18,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SUN4I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/mixtile_loftq_defconfig +1 -0
index 6264b3a..00f6945 100644
@@ -20,3 +20,4 @@ CONFIG_RGMII=y
 CONFIG_SUN7I_GMAC=y
 CONFIG_AXP_ALDO1_VOLT=3300
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/mk802_a10s_defconfig +1 -0
index 69e9cfd..9b358a4 100644
@@ -16,3 +16,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_AXP152_POWER=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/mk802_defconfig +1 -0
index da9728a..d806916 100644
@@ -13,3 +13,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUNXI_NO_PMIC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/mk802ii_defconfig +1 -0
index c55f1f3..286900d 100644
@@ -12,3 +12,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/mx6qsabrelite_defconfig +1 -0
index a542799..69cf5bb 100644
@@ -37,6 +37,7 @@ CONFIG_DM_THERMAL=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
configs/nanopi_m1_defconfig +1 -0
index 498496b..b1fbc4d 100644
@@ -14,3 +14,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/nanopi_m1_plus_defconfig +1 -0
index d7a908d..abe93f6 100644
@@ -16,3 +16,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/nanopi_neo2_defconfig +1 -0
index c0ac100..c7db07a 100644
@@ -14,3 +14,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN8I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/nanopi_neo_air_defconfig +1 -0
index a73640e..0a3dbae 100644
@@ -16,3 +16,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/nanopi_neo_defconfig +1 -0
index 8b55497..cc49aaf 100644
@@ -17,3 +17,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN8I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/nitrogen6dl2g_defconfig +1 -0
index 5744ede..32db5ab 100644
@@ -35,6 +35,7 @@ CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
configs/nitrogen6dl_defconfig +1 -0
index dca89ec..4372d4f 100644
@@ -35,6 +35,7 @@ CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
configs/nitrogen6q2g_defconfig +1 -0
index a19d093..b747cdd 100644
@@ -35,6 +35,7 @@ CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
configs/nitrogen6q_defconfig +1 -0
index edf4b63..cb14c37 100644
@@ -35,6 +35,7 @@ CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
configs/nitrogen6s1g_defconfig +1 -0
index 0f75320..8303c52 100644
@@ -35,6 +35,7 @@ CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
configs/nitrogen6s_defconfig +1 -0
index 45a5acb..4d7db06 100644
@@ -35,6 +35,7 @@ CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
configs/novena_defconfig +1 -0
index afacea7..fe6cf2f 100644
@@ -36,6 +36,7 @@ CONFIG_PCI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 # CONFIG_VIDEO_SW_CURSOR is not set
configs/orangepi_2_defconfig +1 -0
index dffba8c..7c9cc45 100644
@@ -19,3 +19,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SUN8I_EMAC=y
 CONFIG_SY8106A_POWER=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_lite_defconfig +1 -0
index 448a161..04910bd 100644
@@ -14,3 +14,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_one_defconfig +1 -0
index 97d0e06..2e5eeee 100644
@@ -15,3 +15,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN8I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_pc2_defconfig +1 -0
index 5a64ad3..9731e7a 100644
@@ -16,3 +16,4 @@ CONFIG_SPL=y
 CONFIG_SPL_SPI_SUNXI=y
 CONFIG_SUN8I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_pc_defconfig +1 -0
index af7568f..df834a2 100644
@@ -17,3 +17,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SUN8I_EMAC=y
 CONFIG_SY8106A_POWER=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_pc_plus_defconfig +1 -0
index 935e96d..2fd2611 100644
@@ -18,3 +18,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SUN8I_EMAC=y
 CONFIG_SY8106A_POWER=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_plus2e_defconfig +1 -0
index 3301ca0..89bb059 100644
@@ -19,3 +19,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SUN8I_EMAC=y
 CONFIG_SY8106A_POWER=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_plus_defconfig +1 -0
index 34c5750..b9b4207 100644
@@ -21,3 +21,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SUN8I_EMAC=y
 CONFIG_SY8106A_POWER=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_prime_defconfig +1 -0
index dc8d59e..103936d 100644
@@ -14,3 +14,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN8I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_win_defconfig +1 -0
index 85d8fa4..a3e278f 100644
@@ -14,3 +14,4 @@ CONFIG_SPL=y
 CONFIG_SPL_SPI_SUNXI=y
 CONFIG_SUN8I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_zero_defconfig +1 -0
index c650ce8..934e3d2 100644
@@ -16,3 +16,4 @@ CONFIG_SPL=y
 CONFIG_SPL_SPI_SUNXI=y
 CONFIG_SUN8I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/orangepi_zero_plus2_defconfig +1 -0
index e3776f6..57c63b9 100644
@@ -16,3 +16,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_SUN8I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/parrot_r16_defconfig +1 -0
index 76e4e34..0dea72e 100644
@@ -20,6 +20,7 @@ CONFIG_SPL=y
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_GADGET=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Allwinner Technology"
configs/pine64_plus_defconfig +1 -0
index a509ca9..d0a957b 100644
@@ -14,3 +14,4 @@ CONFIG_SPL=y
 CONFIG_OF_LIST="sun50i-a64-pine64 sun50i-a64-pine64-plus"
 CONFIG_SUN8I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/polaroid_mid2407pxe03_defconfig +1 -0
index d48a507..da120ed 100644
@@ -24,3 +24,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/polaroid_mid2809pxe04_defconfig +1 -0
index 72fe096..7b31abc 100644
@@ -24,3 +24,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/pov_protab2_ips9_defconfig +1 -0
index d4af808..16ac1a6 100644
@@ -22,3 +22,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/q8_a13_tablet_defconfig +1 -0
index 5115739..321c3a6 100644
@@ -23,3 +23,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/q8_a23_tablet_800x480_defconfig +1 -0
index 1762fe4..bd95f9b 100644
@@ -24,3 +24,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/q8_a33_tablet_1024x600_defconfig +1 -0
index d42b597..51509d3 100644
@@ -24,3 +24,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/q8_a33_tablet_800x480_defconfig +1 -0
index 5b6dfe0..1349269 100644
@@ -24,3 +24,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_AXP_DLDO1_VOLT=3300
 CONFIG_USB_MUSB_HOST=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/r7-tv-dongle_defconfig +1 -0
index 4817e6c..137614c 100644
@@ -15,3 +15,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_AXP152_POWER=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/sandbox_defconfig +0 -1
index 6a6e774..e880fa7 100644
@@ -170,7 +170,6 @@ CONFIG_DM_USB=y
 CONFIG_USB_EMUL=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
-CONFIG_SYS_USB_EVENT_POLL=y
 CONFIG_DM_VIDEO=y
 CONFIG_CONSOLE_ROTATION=y
 CONFIG_CONSOLE_TRUETYPE=y
configs/sandbox_flattree_defconfig +0 -1
index c5ef69f..eaf29df 100644
@@ -160,7 +160,6 @@ CONFIG_DM_USB=y
 CONFIG_USB_EMUL=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
-CONFIG_SYS_USB_EVENT_POLL=y
 CONFIG_DM_VIDEO=y
 CONFIG_CONSOLE_ROTATION=y
 CONFIG_CONSOLE_TRUETYPE=y
configs/sandbox_noblk_defconfig +0 -1
index 747d4b1..e335a2d 100644
@@ -169,7 +169,6 @@ CONFIG_DM_USB=y
 CONFIG_USB_EMUL=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
-CONFIG_SYS_USB_EVENT_POLL=y
 CONFIG_DM_VIDEO=y
 CONFIG_CONSOLE_ROTATION=y
 CONFIG_CONSOLE_TRUETYPE=y
configs/sandbox_spl_defconfig +0 -1
index 6889206..17dba3f 100644
@@ -176,7 +176,6 @@ CONFIG_DM_USB=y
 CONFIG_USB_EMUL=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
-CONFIG_SYS_USB_EVENT_POLL=y
 CONFIG_DM_VIDEO=y
 CONFIG_CONSOLE_ROTATION=y
 CONFIG_CONSOLE_TRUETYPE=y
configs/sopine_baseboard_defconfig +1 -0
index 122bba3..7f1b0bb 100644
@@ -20,3 +20,4 @@ CONFIG_SPL=y
 CONFIG_SPL_SPI_SUNXI=y
 CONFIG_SUN8I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/sun8i_a23_evb_defconfig +1 -0
index 49ba431..32254ef 100644
@@ -16,3 +16,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/sunxi_Gemei_G9_defconfig +1 -0
index 903def1..9dbf5d0 100644
@@ -19,3 +19,4 @@ CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_USB_EHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
configs/tbs2910_defconfig +1 -0
index ac8f9c6..7cc2a05 100644
@@ -39,6 +39,7 @@ CONFIG_DM_THERMAL=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
include/configs/MPC8610HPCD.h +0 -1
index 2014450..bea3405 100644
@@ -273,7 +273,6 @@
  ************************************************************/
 #define CONFIG_PCI_OHCI		1
 #define CONFIG_USB_OHCI_NEW		1
-#define CONFIG_SYS_USB_EVENT_POLL	1
 #define CONFIG_SYS_USB_OHCI_SLOT_NAME	"ohci_pci"
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15
 #define CONFIG_SYS_OHCI_SWAP_REG_ACCESS	1
include/configs/MPC8641HPCN.h +0 -1
index 7ec36eb..02bd482 100644
@@ -352,7 +352,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
  ************************************************************/
 #define CONFIG_PCI_OHCI			1
 #define CONFIG_USB_OHCI_NEW		1
-#define CONFIG_SYS_USB_EVENT_POLL		1
 #define CONFIG_SYS_USB_OHCI_SLOT_NAME		"ohci_pci"
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS	15
 #define CONFIG_SYS_OHCI_SWAP_REG_ACCESS	1
include/configs/advantech_dms-ba16.h +0 -1
index f320792..fa3b62c 100644
@@ -59,7 +59,6 @@
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_MXC_USB_PORTSC	(PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS	0
-#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
 
 #define CONFIG_USBD_HS
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
include/configs/am3517_crane.h +0 -1
index eb768b9..aa0b3e0 100644
@@ -81,7 +81,6 @@
 #ifdef CONFIG_USB_MUSB_HCD
 
 #ifdef CONFIG_USB_KEYBOARD
-#define CONFIG_SYS_USB_EVENT_POLL
 #define CONFIG_PREBOOT "usb start"
 #endif /* CONFIG_USB_KEYBOARD */
 
include/configs/am3517_evm.h +0 -1
index 829dd3ec..5ce3467 100644
@@ -74,7 +74,6 @@
 #ifdef CONFIG_USB_MUSB_HOST
 
 #ifdef CONFIG_USB_KEYBOARD
-#define CONFIG_SYS_USB_EVENT_POLL
 #define CONFIG_PREBOOT "usb start"
 #endif /* CONFIG_USB_KEYBOARD */
 
include/configs/apalis_imx6.h +0 -3
index 8be586b..4d6397b 100644
@@ -105,9 +105,6 @@
 #define CONFIG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS		0
 #define CONFIG_USB_KEYBOARD
-#ifdef CONFIG_USB_KEYBOARD
-#define CONFIG_SYS_USB_EVENT_POLL
-#endif /* CONFIG_USB_KEYBOARD */
 /* Client */
 #define CONFIG_USB_GADGET_VBUS_DRAW	2
 #define CONFIG_USBD_HS
include/configs/cgtqmx6eval.h +0 -1
index cad1357..2491dda 100644
@@ -67,7 +67,6 @@
 #define CONFIG_MXC_USB_PORTSC	(PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS	0
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 /* Enabled USB controller number */
-#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
 
 #define CONFIG_USBD_HS
 
include/configs/colibri_imx6.h +0 -3
index 82812e5..3ea8ec8 100644
@@ -86,9 +86,6 @@
 #define CONFIG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS		0
 #define CONFIG_USB_KEYBOARD
-#ifdef CONFIG_USB_KEYBOARD
-#define CONFIG_SYS_USB_EVENT_POLL
-#endif /* CONFIG_USB_KEYBOARD */
 /* Client */
 #define CONFIG_USB_GADGET_VBUS_DRAW	2
 #define CONFIG_USBD_HS
include/configs/cyrus.h +0 -1
index a23da19..7d55b3f 100644
@@ -427,7 +427,6 @@
 #define CONFIG_USB_EHCI_FSL
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_EHCI_IS_TDI
-#define CONFIG_SYS_USB_EVENT_POLL
  /* _VIA_CONTROL_EP  */
 #endif
 
include/configs/ge_bx50v3.h +0 -1
index f60a029..8bcf786 100644
@@ -71,7 +71,6 @@
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #define CONFIG_MXC_USB_PORTSC	(PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS	0
-#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
 
 #define CONFIG_CI_UDC
 #define CONFIG_USBD_HS
include/configs/gw_ventana.h +0 -1
index 2227eea..1fdf1f8 100644
@@ -163,7 +163,6 @@
 #define CONFIG_USB_ETHER
 #define CONFIG_USB_ETH_CDC
 #define CONFIG_NETCONSOLE
-#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
 
 /* USB Mass Storage Gadget */
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
include/configs/mx6cuboxi.h +0 -1
index bc22f56..fed6f09 100644
@@ -47,7 +47,6 @@
 #define CONFIG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS		0
 #define CONFIG_USB_MAX_CONTROLLER_COUNT	2
-#define CONFIG_SYS_USB_EVENT_POLL
 #define CONFIG_PREBOOT \
 	"if hdmidet; then " \
 		"usb start; "		       \
include/configs/nitrogen6x.h +0 -1
index 00b84f7..717e54f 100644
@@ -82,7 +82,6 @@
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET	/* For OTG port */
 #define CONFIG_MXC_USB_PORTSC	(PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS	0
-#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
 
 /* Framebuffer and LCD */
 #define CONFIG_VIDEO_IPUV3
include/configs/novena.h +0 -1
index 1f1bf15..9812606 100644
@@ -133,7 +133,6 @@
 
 /* USB Configs */
 #ifdef CONFIG_CMD_USB
-#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
 #define CONFIG_USB_ETHER_SMSC95XX
include/configs/omap3_evm.h +0 -1
index 53bfc13..a2a5a07 100644
@@ -206,7 +206,6 @@
 #ifdef CONFIG_USB_MUSB_HCD
 
 #ifdef CONFIG_USB_KEYBOARD
-#define CONFIG_SYS_USB_EVENT_POLL
 #define CONFIG_PREBOOT			"usb start"
 #endif /* CONFIG_USB_KEYBOARD */
 
include/configs/rpi.h +0 -1
index d715eaa..534e03e 100644
@@ -76,7 +76,6 @@
 #define CONFIG_USB_ETHER_SMSC95XX
 #define CONFIG_TFTP_TSIZE
 #define CONFIG_MISC_INIT_R
-#define CONFIG_SYS_USB_EVENT_POLL
 #endif
 
 /* Console UART */
include/configs/sunxi-common.h +0 -1
index ee669cb..da91117 100644
@@ -340,7 +340,6 @@ extern int soft_i2c_gpio_scl;
 
 #ifdef CONFIG_USB_KEYBOARD
 #define CONFIG_PREBOOT
-#define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
 #endif
 
 #define CONFIG_MISC_INIT_R
include/configs/tbs2910.h +0 -1
index 84ca1c4..f92eec3 100644
@@ -100,7 +100,6 @@
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #endif /* CONFIG_CMD_USB_MASS_STORAGE */
 #ifdef CONFIG_USB_KEYBOARD
-#define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
 #define CONFIG_PREBOOT \
 	"usb start; " \
 	"if hdmidet; then " \
include/configs/tegra-common-post.h +0 -1
index dd72e5b..743be6b 100644
@@ -41,7 +41,6 @@
 
 #ifdef CONFIG_USB_KEYBOARD
 #define STDIN_KBD_USB ",usbkbd"
-#define CONFIG_SYS_USB_EVENT_POLL
 #define CONFIG_PREBOOT			"usb start"
 #else
 #define STDIN_KBD_USB ""
include/configs/x86-common.h +0 -1
index 70a559b..11fa1d4 100644
@@ -131,7 +131,6 @@
  * USB configuration
  */
 #define CONFIG_USB_EHCI_PCI
-#define CONFIG_SYS_USB_EVENT_POLL
 
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
scripts/config_whitelist.txt +0 -3
index f7c8814..4545c31 100644
@@ -5570,9 +5570,6 @@ CONFIG_SYS_USB_BRGCLK
 CONFIG_SYS_USB_DEVICE
 CONFIG_SYS_USB_EHCI_CPU_INIT
 CONFIG_SYS_USB_EHCI_REGS_BASE
-CONFIG_SYS_USB_EVENT_POLL
-CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
-CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
 CONFIG_SYS_USB_FAT_BOOT_PARTITION
 CONFIG_SYS_USB_HOST
 CONFIG_SYS_USB_OHCI_BOARD_INIT
Signature · 1 line
2.9.2
#4 lore raw

PATCH 3/3 usb: configs: Clean up CONFIG_SYS_USB_EVENT_POLL_(xxx) in board configs

Quoted 5 lines · Bin Meng

The following 3 Kconfig options
- CONFIG_SYS_USB_EVENT_POLL
- CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
- CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE

Quoted 7 lines

are already converted to Kconfig. Let's clean up all board configs to switch over to use them.

---

#5 lore raw

PATCH 3/3 usb: configs: Clean up CONFIG_SYS_USB_EVENT_POLL_(xxx) in board configs

In reply to Bin Meng
Quoted 9 lines · Bin Meng

The following 3 Kconfig options
- CONFIG_SYS_USB_EVENT_POLL
- CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
- CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE

are already converted to Kconfig. Let's clean up all board configs to switch over to use them.

[snip]

Quoted 9 lines
configs/Sunchip_CX-A99_defconfig +1 -0
index 0641b1f..2284bd3 100644
@@ -18,3 +18,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y

[snip]

include/configs/sunxi-common.h extern int soft_i2c_gpio_scl; · line 345

Quoted 12 lines
include/configs/sunxi-common.h +0 -1
index ee669cb..da91117 100644
@@ -340,7 +340,6 @@ extern int soft_i2c_gpio_scl;
 
 #ifdef CONFIG_USB_KEYBOARD
 #define CONFIG_PREBOOT
-#define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
 #endif
 
 #define CONFIG_MISC_INIT_R

Rather than adding that option to each and every SUNXI board's defconfig when removing it from include/configs/sunxi-common.h, wouldn't it better to set it from arch/arm/Kconfig instead? Something like this (untested):

arch/arm/Kconfig +0 -0
index dce4105561..ab4837bd14 100644
@@ -673,6 +673,7 @@ config ARCH_SUNXI

select USB if DISTRO_DEFAULTS
select USB_STORAGE if DISTRO_DEFAULTS
select USB_KEYBOARD if DISTRO_DEFAULTS
+ select SYS_USB_EVENT_POLL_VIA_INT_QUEUE if DISTRO_DEFAULTS
select USE_TINY_PRINTF
imply FAT_WRITE
imply PRE_CONSOLE_BUFFER

Because it seems to me that it's common to the SUNXI architecture boards rather than something board specific.

Signature · 1 line
Rask Ingemann Lambertsen
author
#6 lore raw

PATCH 3/3 usb: configs: Clean up CONFIG_SYS_USB_EVENT_POLL_(xxx) in board configs

Quoted 32 lines · Rask Ingemann Lambertsen
Quoted 9 lines · Bin Meng

The following 3 Kconfig options
- CONFIG_SYS_USB_EVENT_POLL
- CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
- CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE

are already converted to Kconfig. Let's clean up all board configs to switch over to use them.

[snip]

Quoted 9 lines
configs/Sunchip_CX-A99_defconfig +1 -0
index 0641b1f..2284bd3 100644
@@ -18,3 +18,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y

[snip]

Quoted 11 lines
include/configs/sunxi-common.h +0 -1
index ee669cb..da91117 100644
@@ -340,7 +340,6 @@ extern int soft_i2c_gpio_scl;
 
 #ifdef CONFIG_USB_KEYBOARD
 #define CONFIG_PREBOOT
-#define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
 #endif
 
Quoted 6 lines

include/configs/sunxi-common.h extern int soft_i2c_gpio_scl; · line 345

Quoted 1 line
include/configs/sunxi-common.h +0 -0
 #define CONFIG_MISC_INIT_R

Rather than adding that option to each and every SUNXI board's defconfig when removing it from include/configs/sunxi-common.h, wouldn't it better to set it from arch/arm/Kconfig instead? Something like this (untested):

Makes sense.

Regards,
Bin

#7 lore raw

PATCH 3/3 usb: configs: Clean up CONFIG_SYS_USB_EVENT_POLL_(xxx) in board configs

Quoted 34 lines · Bin Meng
Quoted 32 lines · Rask Ingemann Lambertsen
Quoted 9 lines · Bin Meng

The following 3 Kconfig options
- CONFIG_SYS_USB_EVENT_POLL
- CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
- CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE

are already converted to Kconfig. Let's clean up all board configs to switch over to use them.

[snip]

Quoted 9 lines
configs/Sunchip_CX-A99_defconfig +1 -0
index 0641b1f..2284bd3 100644
@@ -18,3 +18,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y

[snip]

Quoted 11 lines
include/configs/sunxi-common.h +0 -1
index ee669cb..da91117 100644
@@ -340,7 +340,6 @@ extern int soft_i2c_gpio_scl;
 
 #ifdef CONFIG_USB_KEYBOARD
 #define CONFIG_PREBOOT
-#define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
 #endif
 
Quoted 8 lines
Quoted 6 lines

include/configs/sunxi-common.h extern int soft_i2c_gpio_scl; · line 345

Quoted 1 line
include/configs/sunxi-common.h +0 -0
 #define CONFIG_MISC_INIT_R

Rather than adding that option to each and every SUNXI board's defconfig when removing it from include/configs/sunxi-common.h, wouldn't it better to set it from arch/arm/Kconfig instead? Something like this (untested):

Makes sense.

AFAIR this is a property of the USB controller driver implementation (if it does / does not implement the interrupt transfers), but also not everyone needs this, so putting it into defconfigs makes sense IMO.

Signature · 2 lines
Best regards,
Marek Vasut
author
#8 lore raw

PATCH 3/3 usb: configs: Clean up CONFIG_SYS_USB_EVENT_POLL_(xxx) in board configs

Quoted 42 lines · Marek Vasut
Quoted 41 lines · Bin Meng
Quoted 38 lines · Rask Ingemann Lambertsen
Quoted 9 lines · Bin Meng

The following 3 Kconfig options
- CONFIG_SYS_USB_EVENT_POLL
- CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
- CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE

are already converted to Kconfig. Let's clean up all board configs to switch over to use them.

[snip]

Quoted 9 lines
configs/Sunchip_CX-A99_defconfig +1 -0
index 0641b1f..2284bd3 100644
@@ -18,3 +18,4 @@ CONFIG_SPL=y
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_ISO_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y

[snip]

include/configs/sunxi-common.h extern int soft_i2c_gpio_scl; · line 345

Quoted 12 lines
include/configs/sunxi-common.h +0 -1
index ee669cb..da91117 100644
@@ -340,7 +340,6 @@ extern int soft_i2c_gpio_scl;
 
 #ifdef CONFIG_USB_KEYBOARD
 #define CONFIG_PREBOOT
-#define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
 #endif
 
 #define CONFIG_MISC_INIT_R

Rather than adding that option to each and every SUNXI board's defconfig when removing it from include/configs/sunxi-common.h, wouldn't it better to set it from arch/arm/Kconfig instead? Something like this (untested):

Quoted 6 lines
Quoted 1 line

Makes sense.

AFAIR this is a property of the USB controller driver implementation (if it does / does not implement the interrupt transfers), but also not everyone needs this, so putting it into defconfigs makes sense IMO.

Either way. If all sunxi needs this, that means something? (ie:
sunxi's EHCI controller only supports the int queue?) Frankly when I was working on this, I don't quite understand why this Kconfig option was introduced in the first place :)

Regards,
Bin

#9 lore raw

cover usb: xhci: Add interrupt transfer support

In reply to Bin Meng

Hi Bin,

Quoted 6 lines · Bin Meng

This series is the final series of the xHCI driver update.

This adds the missing interrupt transfer support to xHCI driver, so that devices like USB keyboard that uses interrupt transfer when CONFIG_SYS_USB_EVENT_POLL is defined can work.

Quoted 7 lines

Previous two series:
[1]: usb: xhci: Fix USB xHCI support on Intel platform
https://lists.denx.de/pipermail/u-boot/2017-June/296166.html
[2]: usb: hub: Support USB 3.0 hubs
https://lists.denx.de/pipermail/u-boot/2017-June/296284.html

This series is available at u-boot-x86/xhci-working3 for testing.

I'm using this git branch to test all your xHCI related patches now. On my BayTrail platform I get these messages upon "usb reset" scanning:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

On the 2nd scan, the "cannot reset port 1" line is gone:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8) 5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

All USB devices seem to be detected correctly though. Here the logs:

=> usb tree
USB device tree:
1 Hub (5 Gb/s, 0mA)
| U-Boot XHCI Host Controller
|

  +-2  Hub (480 Mb/s, 100mA)
  |  
  +-3  Hub (480 Mb/s, 2mA)
  | |
  | +-5  Mass Storage (480 Mb/s, 200mA)
  |      JetFlash Mass Storage Device 3281440601
  |    
  +-4  Vendor specific (5 Gb/s, 64mA)
       Realtek USB 10/100/1000 LAN 000002000000

=> usb info
1: Hub, USB Revision 3.0
- U-Boot XHCI Host Controller
- Class: Hub
- PacketSize: 512 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Hub, USB Revision 2.0
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0409 Product 0x005a Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Hub, USB Revision 2.1
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0424 Product 0x4604 Version 1.131
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 2mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

5: Mass Storage, USB Revision 2.10
- JetFlash Mass Storage Device 3281440601
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x8564 Product 0x1000 Version 16.117
Configuration: 1
- Interfaces: 1 Bus Powered 200mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 2 Out Bulk MaxPacket 512
- Endpoint 1 In Bulk MaxPacket 512

4: Vendor specific, USB Revision 3.0
- Realtek USB 10/100/1000 LAN 000002000000
- Class: (from Interface) Vendor specific
- PacketSize: 512 Configurations: 2
- Vendor: 0x0bda Product 0x8153 Version 48.0
Configuration: 1
- Interfaces: 1 Bus Powered Remote Wakeup 64mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Vendor specific
- Endpoint 1 In Bulk MaxPacket 1024
- Endpoint 2 Out Bulk MaxPacket 1024
- Endpoint 3 In Interrupt MaxPacket 2 Interval 8ms

Do you have any ideas about the scanning logs that I've noticed above? Would it help if I provided some debug logs (-DDEBUG) for this?

BTW: I need to re-add the SYS_USB_EVENT_POLL* options back to the whilelist file. Otherwise compiling fails with this message:

$ make minnowmax_defconfig
$ make -s -j10
Error: You must add new CONFIG options using Kconfig
The following new ad-hoc CONFIG options were detected:
CONFIG_SYS_USB_EVENT_POLL

Please add these via Kconfig instead. Find a suitable Kconfig file and add a 'config' or 'menuconfig' option. Makefile:862: recipe for target 'all' failed

Don't you see this error? Any idea whats going wrong here?

Thanks,
Stefan

author
#10 lore raw

cover usb: xhci: Add interrupt transfer support

Hi Stefan,

Quoted 123 lines · Stefan Roese

Hi Bin,

Quoted 6 lines · Bin Meng

This series is the final series of the xHCI driver update.

This adds the missing interrupt transfer support to xHCI driver, so that devices like USB keyboard that uses interrupt transfer when CONFIG_SYS_USB_EVENT_POLL is defined can work.

Quoted 7 lines

Previous two series:
[1]: usb: xhci: Fix USB xHCI support on Intel platform
https://lists.denx.de/pipermail/u-boot/2017-June/296166.html
[2]: usb: hub: Support USB 3.0 hubs
https://lists.denx.de/pipermail/u-boot/2017-June/296284.html

This series is available at u-boot-x86/xhci-working3 for testing.

I'm using this git branch to test all your xHCI related patches now. On my BayTrail platform I get these messages upon "usb reset" scanning:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

On the 2nd scan, the "cannot reset port 1" line is gone:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8) 5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

All USB devices seem to be detected correctly though. Here the logs:

=> usb tree
USB device tree:
1 Hub (5 Gb/s, 0mA)
| U-Boot XHCI Host Controller
|

  +-2  Hub (480 Mb/s, 100mA)
  |
  +-3  Hub (480 Mb/s, 2mA)
  | |
  | +-5  Mass Storage (480 Mb/s, 200mA)
  |      JetFlash Mass Storage Device 3281440601
  |
  +-4  Vendor specific (5 Gb/s, 64mA)
       Realtek USB 10/100/1000 LAN 000002000000

=> usb info
1: Hub, USB Revision 3.0
- U-Boot XHCI Host Controller
- Class: Hub
- PacketSize: 512 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Hub, USB Revision 2.0
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0409 Product 0x005a Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Hub, USB Revision 2.1
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0424 Product 0x4604 Version 1.131
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 2mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

5: Mass Storage, USB Revision 2.10
- JetFlash Mass Storage Device 3281440601
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x8564 Product 0x1000 Version 16.117
Configuration: 1
- Interfaces: 1 Bus Powered 200mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 2 Out Bulk MaxPacket 512
- Endpoint 1 In Bulk MaxPacket 512

4: Vendor specific, USB Revision 3.0
- Realtek USB 10/100/1000 LAN 000002000000
- Class: (from Interface) Vendor specific
- PacketSize: 512 Configurations: 2
- Vendor: 0x0bda Product 0x8153 Version 48.0
Configuration: 1
- Interfaces: 1 Bus Powered Remote Wakeup 64mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Vendor specific
- Endpoint 1 In Bulk MaxPacket 1024
- Endpoint 2 Out Bulk MaxPacket 1024
- Endpoint 3 In Interrupt MaxPacket 2 Interval 8ms

Quoted 3 lines

Do you have any ideas about the scanning logs that I've noticed above? Would it help if I provided some debug logs (-DDEBUG) for this?

"cannot reset port 1" message is annoying, but that may happen sometimes due to unstable power supply. I will see if we can mute it if it's not the final round of reset try. I am more concerned about the "USB device descriptor short read (expected 18, got 8)". This message indicates U-Boot cannot get the device descriptor during set configuration process. So did you manage to get all USB devices that are connected on your board enumerated?

Quoted 11 lines

BTW: I need to re-add the SYS_USB_EVENT_POLL* options back to the whilelist file. Otherwise compiling fails with this message:

$ make minnowmax_defconfig
$ make -s -j10
Error: You must add new CONFIG options using Kconfig
The following new ad-hoc CONFIG options were detected:
CONFIG_SYS_USB_EVENT_POLL
Quoted 5 lines

Please add these via Kconfig instead. Find a suitable Kconfig file and add a 'config' or 'menuconfig' option. Makefile:862: recipe for target 'all' failed

Don't you see this error? Any idea whats going wrong here?

This is strange. I did not see this error when I sent the patch series before. I rebased xhci-working3 branch to u-boot/master this afternoon for the v2 patch rework, and now am seeing the same issue.

Regards,
Bin

#11 lore raw

cover usb: xhci: Add interrupt transfer support

Hi Bin,

Quoted 124 lines · Bin Meng
Quoted 123 lines · Stefan Roese

Hi Bin,

Quoted 6 lines · Bin Meng

This series is the final series of the xHCI driver update.

This adds the missing interrupt transfer support to xHCI driver, so that devices like USB keyboard that uses interrupt transfer when CONFIG_SYS_USB_EVENT_POLL is defined can work.

Quoted 7 lines

Previous two series:
[1]: usb: xhci: Fix USB xHCI support on Intel platform
https://lists.denx.de/pipermail/u-boot/2017-June/296166.html
[2]: usb: hub: Support USB 3.0 hubs
https://lists.denx.de/pipermail/u-boot/2017-June/296284.html

This series is available at u-boot-x86/xhci-working3 for testing.

I'm using this git branch to test all your xHCI related patches now. On my BayTrail platform I get these messages upon "usb reset" scanning:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

On the 2nd scan, the "cannot reset port 1" line is gone:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8) 5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

All USB devices seem to be detected correctly though. Here the logs:

=> usb tree
USB device tree:

   1  Hub (5 Gb/s, 0mA)
   |  U-Boot XHCI Host Controller
   |
   +-2  Hub (480 Mb/s, 100mA)
   |
   +-3  Hub (480 Mb/s, 2mA)
   | |
   | +-5  Mass Storage (480 Mb/s, 200mA)
   |      JetFlash Mass Storage Device 3281440601
   |
   +-4  Vendor specific (5 Gb/s, 64mA)
        Realtek USB 10/100/1000 LAN 000002000000

=> usb info
1: Hub, USB Revision 3.0
- U-Boot XHCI Host Controller
- Class: Hub
- PacketSize: 512 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Hub, USB Revision 2.0
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0409 Product 0x005a Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Hub, USB Revision 2.1
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0424 Product 0x4604 Version 1.131
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 2mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

5: Mass Storage, USB Revision 2.10
- JetFlash Mass Storage Device 3281440601
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x8564 Product 0x1000 Version 16.117
Configuration: 1
- Interfaces: 1 Bus Powered 200mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 2 Out Bulk MaxPacket 512
- Endpoint 1 In Bulk MaxPacket 512

4: Vendor specific, USB Revision 3.0
- Realtek USB 10/100/1000 LAN 000002000000
- Class: (from Interface) Vendor specific
- PacketSize: 512 Configurations: 2
- Vendor: 0x0bda Product 0x8153 Version 48.0
Configuration: 1
- Interfaces: 1 Bus Powered Remote Wakeup 64mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Vendor specific
- Endpoint 1 In Bulk MaxPacket 1024
- Endpoint 2 Out Bulk MaxPacket 1024
- Endpoint 3 In Interrupt MaxPacket 2 Interval 8ms

Quoted 7 lines
Quoted 3 lines

Do you have any ideas about the scanning logs that I've noticed above? Would it help if I provided some debug logs (-DDEBUG) for this?

"cannot reset port 1" message is annoying, but that may happen sometimes due to unstable power supply. I will see if we can mute it if it's not the final round of reset try.

That would be good, thanks.

Quoted 5 lines

I am more concerned about
the "USB device descriptor short read (expected 18, got 8)". This message indicates U-Boot cannot get the device descriptor during set configuration process. So did you manage to get all USB devices that are connected on your board enumerated?

Might be that I'm missing some keyboard / mouse, which I'm not using and not really aware of. One USB port is connected to a KVM switch, enumberating such devices. Here the log from U-Boot and Linux again:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
6 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:
1 Hub (5 Gb/s, 0mA)
| U-Boot XHCI Host Controller
|

  +-2  Hub (480 Mb/s, 100mA)
  |  
  +-3  Mass Storage (480 Mb/s, 98mA)
  |    USBest Technology USB Mass Storage Device 09092207fbf0c4
  |  
  +-4  Hub (480 Mb/s, 2mA)
  | |
  | +-6  Mass Storage (480 Mb/s, 200mA)
  |      JetFlash Mass Storage Device 3281440601
  |    
  +-5  Vendor specific (5 Gb/s, 64mA)
       Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 4: Dev 4, If 0, Class=Hub, Driver=hub/4p, 12M
            |__ Port 1: Dev 6, If 1, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 1: Dev 6, If 2, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 1: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
    |__ Port 5: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 7, If 0, Class=Mass Storage, Driver=usb-storage, 480M

Which event polling Kconfig option do I need to enable?

Quoted 15 lines
Quoted 15 lines

BTW: I need to re-add the SYS_USB_EVENT_POLL* options back to the whilelist file. Otherwise compiling fails with this message:

$ make minnowmax_defconfig
$ make -s -j10
Error: You must add new CONFIG options using Kconfig
The following new ad-hoc CONFIG options were detected:
CONFIG_SYS_USB_EVENT_POLL

Please add these via Kconfig instead. Find a suitable Kconfig file and add a 'config' or 'menuconfig' option. Makefile:862: recipe for target 'all' failed

Quoted 5 lines
Quoted 1 line

Don't you see this error? Any idea whats going wrong here?

This is strange. I did not see this error when I sent the patch series before. I rebased xhci-working3 branch to u-boot/master this afternoon for the v2 patch rework, and now am seeing the same issue.

Ah, good. So you see it as well.

Please let me know, if you need me to do some further tests to help here.

Thanks,
Stefan

author
#12 lore raw

cover usb: xhci: Add interrupt transfer support

Hi Stefan,

Quoted 190 lines · Stefan Roese

Hi Bin,

Quoted 124 lines · Bin Meng
Quoted 123 lines · Stefan Roese

Hi Bin,

Quoted 6 lines · Bin Meng

This series is the final series of the xHCI driver update.

This adds the missing interrupt transfer support to xHCI driver, so that devices like USB keyboard that uses interrupt transfer when CONFIG_SYS_USB_EVENT_POLL is defined can work.

Quoted 7 lines

Previous two series:
[1]: usb: xhci: Fix USB xHCI support on Intel platform
https://lists.denx.de/pipermail/u-boot/2017-June/296166.html
[2]: usb: hub: Support USB 3.0 hubs
https://lists.denx.de/pipermail/u-boot/2017-June/296284.html

This series is available at u-boot-x86/xhci-working3 for testing.

I'm using this git branch to test all your xHCI related patches now. On my BayTrail platform I get these messages upon "usb reset" scanning:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

On the 2nd scan, the "cannot reset port 1" line is gone:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8) 5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

All USB devices seem to be detected correctly though. Here the logs:

=> usb tree
USB device tree:

   1  Hub (5 Gb/s, 0mA)
   |  U-Boot XHCI Host Controller
   |
   +-2  Hub (480 Mb/s, 100mA)
   |
   +-3  Hub (480 Mb/s, 2mA)
   | |
   | +-5  Mass Storage (480 Mb/s, 200mA)
   |      JetFlash Mass Storage Device 3281440601
   |
   +-4  Vendor specific (5 Gb/s, 64mA)
        Realtek USB 10/100/1000 LAN 000002000000

=> usb info
1: Hub, USB Revision 3.0
- U-Boot XHCI Host Controller
- Class: Hub
- PacketSize: 512 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Hub, USB Revision 2.0
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0409 Product 0x005a Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Hub, USB Revision 2.1
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0424 Product 0x4604 Version 1.131
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 2mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

5: Mass Storage, USB Revision 2.10
- JetFlash Mass Storage Device 3281440601
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x8564 Product 0x1000 Version 16.117
Configuration: 1
- Interfaces: 1 Bus Powered 200mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 2 Out Bulk MaxPacket 512
- Endpoint 1 In Bulk MaxPacket 512

4: Vendor specific, USB Revision 3.0
- Realtek USB 10/100/1000 LAN 000002000000
- Class: (from Interface) Vendor specific
- PacketSize: 512 Configurations: 2
- Vendor: 0x0bda Product 0x8153 Version 48.0
Configuration: 1
- Interfaces: 1 Bus Powered Remote Wakeup 64mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Vendor specific
- Endpoint 1 In Bulk MaxPacket 1024
- Endpoint 2 Out Bulk MaxPacket 1024
- Endpoint 3 In Interrupt MaxPacket 2 Interval 8ms

Quoted 7 lines
Quoted 3 lines

Do you have any ideas about the scanning logs that I've noticed above? Would it help if I provided some debug logs (-DDEBUG) for this?

"cannot reset port 1" message is annoying, but that may happen sometimes due to unstable power supply. I will see if we can mute it if it's not the final round of reset try.

That would be good, thanks.

Quoted 5 lines

I am more concerned about
the "USB device descriptor short read (expected 18, got 8)". This message indicates U-Boot cannot get the device descriptor during set configuration process. So did you manage to get all USB devices that are connected on your board enumerated?

Might be that I'm missing some keyboard / mouse, which I'm not using and not really aware of. One USB port is connected to a KVM switch, enumberating such devices. Here the log from U-Boot and Linux again:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
6 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:
1 Hub (5 Gb/s, 0mA)
| U-Boot XHCI Host Controller
|

  +-2  Hub (480 Mb/s, 100mA)
  |
  +-3  Mass Storage (480 Mb/s, 98mA)
  |    USBest Technology USB Mass Storage Device 09092207fbf0c4
  |
  +-4  Hub (480 Mb/s, 2mA)
  | |
  | +-6  Mass Storage (480 Mb/s, 200mA)
  |      JetFlash Mass Storage Device 3281440601
  |
  +-5  Vendor specific (5 Gb/s, 64mA)
       Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 4: Dev 4, If 0, Class=Hub, Driver=hub/4p, 12M
            |__ Port 1: Dev 6, If 1, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 1: Dev 6, If 2, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 1: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
    |__ Port 5: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 7, If 0, Class=Mass Storage, Driver=usb-storage, 480M
Quoted 2 lines

Which event polling Kconfig option do I need to enable?

The default one CONFIG_SYS_USB_EVENT_POLL should be OK. By comparing your U-Boot log and Linux one, I found the following devices were enumerated by Linux but not by U-Boot:

|__ Port 1: Dev 6, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 1: Dev 6, If 2, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 1: Dev 6, If 0, Class=Human Interface Device,
Driver=usbhid, 12M

These devices are full speed devices. I believe the reason is that U-Boot encounters "USB device descriptor short read (expected 18, got 8)" so it does not continue the enumeration. As to why these full speed devices only return 8 bytes descriptors, this needs to be investigated. Which devices are they?

[snip]

Regards,
Bin

#13 lore raw

cover usb: xhci: Add interrupt transfer support

Hi Bin,

Quoted 207 lines · Bin Meng

Hi Stefan,

Quoted 190 lines · Stefan Roese

Hi Bin,

Quoted 124 lines · Bin Meng
Quoted 123 lines · Stefan Roese

Hi Bin,

Quoted 6 lines · Bin Meng

This series is the final series of the xHCI driver update.

This adds the missing interrupt transfer support to xHCI driver, so that devices like USB keyboard that uses interrupt transfer when CONFIG_SYS_USB_EVENT_POLL is defined can work.

Quoted 7 lines

Previous two series:
[1]: usb: xhci: Fix USB xHCI support on Intel platform
https://lists.denx.de/pipermail/u-boot/2017-June/296166.html
[2]: usb: hub: Support USB 3.0 hubs
https://lists.denx.de/pipermail/u-boot/2017-June/296284.html

This series is available at u-boot-x86/xhci-working3 for testing.

I'm using this git branch to test all your xHCI related patches now. On my BayTrail platform I get these messages upon "usb reset" scanning:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

On the 2nd scan, the "cannot reset port 1" line is gone:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8) 5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

All USB devices seem to be detected correctly though. Here the logs:

=> usb tree
USB device tree:

    1  Hub (5 Gb/s, 0mA)
    |  U-Boot XHCI Host Controller
    |
    +-2  Hub (480 Mb/s, 100mA)
    |
    +-3  Hub (480 Mb/s, 2mA)
    | |
    | +-5  Mass Storage (480 Mb/s, 200mA)
    |      JetFlash Mass Storage Device 3281440601
    |
    +-4  Vendor specific (5 Gb/s, 64mA)
         Realtek USB 10/100/1000 LAN 000002000000

=> usb info
1: Hub, USB Revision 3.0
- U-Boot XHCI Host Controller
- Class: Hub
- PacketSize: 512 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Hub, USB Revision 2.0
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0409 Product 0x005a Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Hub, USB Revision 2.1
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0424 Product 0x4604 Version 1.131
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 2mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

5: Mass Storage, USB Revision 2.10
- JetFlash Mass Storage Device 3281440601
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x8564 Product 0x1000 Version 16.117
Configuration: 1
- Interfaces: 1 Bus Powered 200mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 2 Out Bulk MaxPacket 512
- Endpoint 1 In Bulk MaxPacket 512

4: Vendor specific, USB Revision 3.0
- Realtek USB 10/100/1000 LAN 000002000000
- Class: (from Interface) Vendor specific
- PacketSize: 512 Configurations: 2
- Vendor: 0x0bda Product 0x8153 Version 48.0
Configuration: 1
- Interfaces: 1 Bus Powered Remote Wakeup 64mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Vendor specific
- Endpoint 1 In Bulk MaxPacket 1024
- Endpoint 2 Out Bulk MaxPacket 1024
- Endpoint 3 In Interrupt MaxPacket 2 Interval 8ms

Quoted 7 lines
Quoted 3 lines

Do you have any ideas about the scanning logs that I've noticed above? Would it help if I provided some debug logs (-DDEBUG) for this?

"cannot reset port 1" message is annoying, but that may happen sometimes due to unstable power supply. I will see if we can mute it if it's not the final round of reset try.

That would be good, thanks.

Quoted 5 lines

I am more concerned about
the "USB device descriptor short read (expected 18, got 8)". This message indicates U-Boot cannot get the device descriptor during set configuration process. So did you manage to get all USB devices that are connected on your board enumerated?

Might be that I'm missing some keyboard / mouse, which I'm not using and not really aware of. One USB port is connected to a KVM switch, enumberating such devices. Here the log from U-Boot and Linux again:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
6 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:

   1  Hub (5 Gb/s, 0mA)
   |  U-Boot XHCI Host Controller
   |
   +-2  Hub (480 Mb/s, 100mA)
   |
   +-3  Mass Storage (480 Mb/s, 98mA)
   |    USBest Technology USB Mass Storage Device 09092207fbf0c4
   |
   +-4  Hub (480 Mb/s, 2mA)
   | |
   | +-6  Mass Storage (480 Mb/s, 200mA)
   |      JetFlash Mass Storage Device 3281440601
   |
   +-5  Vendor specific (5 Gb/s, 64mA)
        Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
     |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
     |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
         |__ Port 4: Dev 4, If 0, Class=Hub, Driver=hub/4p, 12M
             |__ Port 1: Dev 6, If 1, Class=Human Interface Device, Driver=usbhid, 12M
             |__ Port 1: Dev 6, If 2, Class=Human Interface Device, Driver=usbhid, 12M
             |__ Port 1: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M
     |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
     |__ Port 5: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
         |__ Port 1: Dev 7, If 0, Class=Mass Storage, Driver=usb-storage, 480M
Quoted 2 lines

Which event polling Kconfig option do I need to enable?

The default one CONFIG_SYS_USB_EVENT_POLL should be OK. By comparing your U-Boot log and Linux one, I found the following devices were enumerated by Linux but not by U-Boot:

|__ Port 1: Dev 6, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 1: Dev 6, If 2, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 1: Dev 6, If 0, Class=Human Interface Device,
Driver=usbhid, 12M

Quoted 5 lines

These devices are full speed devices. I believe the reason is that U-Boot encounters "USB device descriptor short read (expected 18, got 8)" so it does not continue the enumeration. As to why these full speed devices only return 8 bytes descriptors, this needs to be investigated. Which devices are they?

This is my KVM switch with its USB keyboard and mouse. When I unplug this USB cable, this message does not appear while running "usb reset".

This also happen, when I only plug a USB mouse to this same USB port:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8) 5 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:
1 Hub (5 Gb/s, 0mA)
| U-Boot XHCI Host Controller
|

  +-2  Mass Storage (480 Mb/s, 98mA)
  |    USBest Technology USB Mass Storage Device 09092207fbf0c4
  |  
  +-3  Hub (480 Mb/s, 2mA)
  | |
  | +-5  Mass Storage (480 Mb/s, 200mA)
  |      JetFlash Mass Storage Device 3281440601
  |    
  +-4  Vendor specific (5 Gb/s, 64mA)
       Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
    |__ Port 2: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 2: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
    |__ Port 5: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M

Can you reproduce this on your MinnowMax? Would it help, if I would enable some traces (-DDEBUG)?

Thanks,
Stefan

author
#14 lore raw

cover usb: xhci: Add interrupt transfer support

Hi Stefan,

Quoted 258 lines · Stefan Roese

Hi Bin,

Quoted 207 lines · Bin Meng

Hi Stefan,

Quoted 190 lines · Stefan Roese

Hi Bin,

Quoted 124 lines · Bin Meng
Quoted 123 lines · Stefan Roese

Hi Bin,

Quoted 6 lines · Bin Meng

This series is the final series of the xHCI driver update.

This adds the missing interrupt transfer support to xHCI driver, so that devices like USB keyboard that uses interrupt transfer when CONFIG_SYS_USB_EVENT_POLL is defined can work.

Quoted 7 lines

Previous two series:
[1]: usb: xhci: Fix USB xHCI support on Intel platform
https://lists.denx.de/pipermail/u-boot/2017-June/296166.html
[2]: usb: hub: Support USB 3.0 hubs
https://lists.denx.de/pipermail/u-boot/2017-June/296284.html

This series is available at u-boot-x86/xhci-working3 for testing.

I'm using this git branch to test all your xHCI related patches now. On my BayTrail platform I get these messages upon "usb reset" scanning:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

On the 2nd scan, the "cannot reset port 1" line is gone:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8) 5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

All USB devices seem to be detected correctly though. Here the logs:

=> usb tree
USB device tree:

    1  Hub (5 Gb/s, 0mA)
    |  U-Boot XHCI Host Controller
    |
    +-2  Hub (480 Mb/s, 100mA)
    |
    +-3  Hub (480 Mb/s, 2mA)
    | |
    | +-5  Mass Storage (480 Mb/s, 200mA)
    |      JetFlash Mass Storage Device 3281440601
    |
    +-4  Vendor specific (5 Gb/s, 64mA)
         Realtek USB 10/100/1000 LAN 000002000000

=> usb info
1: Hub, USB Revision 3.0
- U-Boot XHCI Host Controller
- Class: Hub
- PacketSize: 512 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Hub, USB Revision 2.0
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0409 Product 0x005a Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Hub, USB Revision 2.1
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0424 Product 0x4604 Version 1.131
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 2mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

5: Mass Storage, USB Revision 2.10
- JetFlash Mass Storage Device 3281440601
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x8564 Product 0x1000 Version 16.117
Configuration: 1
- Interfaces: 1 Bus Powered 200mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 2 Out Bulk MaxPacket 512
- Endpoint 1 In Bulk MaxPacket 512

4: Vendor specific, USB Revision 3.0
- Realtek USB 10/100/1000 LAN 000002000000
- Class: (from Interface) Vendor specific
- PacketSize: 512 Configurations: 2
- Vendor: 0x0bda Product 0x8153 Version 48.0
Configuration: 1
- Interfaces: 1 Bus Powered Remote Wakeup 64mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Vendor specific
- Endpoint 1 In Bulk MaxPacket 1024
- Endpoint 2 Out Bulk MaxPacket 1024
- Endpoint 3 In Interrupt MaxPacket 2 Interval 8ms

Quoted 7 lines
Quoted 3 lines

Do you have any ideas about the scanning logs that I've noticed above? Would it help if I provided some debug logs (-DDEBUG) for this?

"cannot reset port 1" message is annoying, but that may happen sometimes due to unstable power supply. I will see if we can mute it if it's not the final round of reset try.

That would be good, thanks.

Quoted 5 lines

I am more concerned about
the "USB device descriptor short read (expected 18, got 8)". This message indicates U-Boot cannot get the device descriptor during set configuration process. So did you manage to get all USB devices that are connected on your board enumerated?

Might be that I'm missing some keyboard / mouse, which I'm not using and not really aware of. One USB port is connected to a KVM switch, enumberating such devices. Here the log from U-Boot and Linux again:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
6 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:

   1  Hub (5 Gb/s, 0mA)
   |  U-Boot XHCI Host Controller
   |
   +-2  Hub (480 Mb/s, 100mA)
   |
   +-3  Mass Storage (480 Mb/s, 98mA)
   |    USBest Technology USB Mass Storage Device 09092207fbf0c4
   |
   +-4  Hub (480 Mb/s, 2mA)
   | |
   | +-6  Mass Storage (480 Mb/s, 200mA)
   |      JetFlash Mass Storage Device 3281440601
   |
   +-5  Vendor specific (5 Gb/s, 64mA)
        Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
     |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
     |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
         |__ Port 4: Dev 4, If 0, Class=Hub, Driver=hub/4p, 12M
             |__ Port 1: Dev 6, If 1, Class=Human Interface Device, Driver=usbhid, 12M
             |__ Port 1: Dev 6, If 2, Class=Human Interface Device, Driver=usbhid, 12M
             |__ Port 1: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M
     |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
     |__ Port 5: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
         |__ Port 1: Dev 7, If 0, Class=Mass Storage, Driver=usb-storage, 480M
Quoted 2 lines

Which event polling Kconfig option do I need to enable?

The default one CONFIG_SYS_USB_EVENT_POLL should be OK. By comparing your U-Boot log and Linux one, I found the following devices were enumerated by Linux but not by U-Boot:

|__ Port 1: Dev 6, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 1: Dev 6, If 2, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 1: Dev 6, If 0, Class=Human Interface Device,
Driver=usbhid, 12M

Quoted 5 lines

These devices are full speed devices. I believe the reason is that U-Boot encounters "USB device descriptor short read (expected 18, got 8)" so it does not continue the enumeration. As to why these full speed devices only return 8 bytes descriptors, this needs to be investigated. Which devices are they?

This is my KVM switch with its USB keyboard and mouse. When I unplug this USB cable, this message does not appear while running "usb reset".

This also happen, when I only plug a USB mouse to this same USB port:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8) 5 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:
1 Hub (5 Gb/s, 0mA)
| U-Boot XHCI Host Controller
|

  +-2  Mass Storage (480 Mb/s, 98mA)
  |    USBest Technology USB Mass Storage Device 09092207fbf0c4
  |
  +-3  Hub (480 Mb/s, 2mA)
  | |
  | +-5  Mass Storage (480 Mb/s, 200mA)
  |      JetFlash Mass Storage Device 3281440601
  |
  +-4  Vendor specific (5 Gb/s, 64mA)
       Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
    |__ Port 2: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 2: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
    |__ Port 5: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M
Quoted 2 lines

Can you reproduce this on your MinnowMax? Would it help, if I would enable some traces (-DDEBUG)?

I cannot reproduce this on MinnowMax. Is the KVM switch a USB 2.0 or 3.0 hub? Is it possible to switch BayTrail SoC to EHCI and do the same testing?

Regards,
Bin

#15 lore raw

cover usb: xhci: Add interrupt transfer support

Hi Bin,

Quoted 261 lines · Bin Meng

Hi Stefan,

Quoted 258 lines · Stefan Roese

Hi Bin,

Quoted 207 lines · Bin Meng

Hi Stefan,

Quoted 190 lines · Stefan Roese

Hi Bin,

Quoted 124 lines · Bin Meng
Quoted 123 lines · Stefan Roese

Hi Bin,

Quoted 6 lines · Bin Meng

This series is the final series of the xHCI driver update.

This adds the missing interrupt transfer support to xHCI driver, so that devices like USB keyboard that uses interrupt transfer when CONFIG_SYS_USB_EVENT_POLL is defined can work.

Quoted 7 lines

Previous two series:
[1]: usb: xhci: Fix USB xHCI support on Intel platform
https://lists.denx.de/pipermail/u-boot/2017-June/296166.html
[2]: usb: hub: Support USB 3.0 hubs
https://lists.denx.de/pipermail/u-boot/2017-June/296284.html

This series is available at u-boot-x86/xhci-working3 for testing.

I'm using this git branch to test all your xHCI related patches now. On my BayTrail platform I get these messages upon "usb reset" scanning:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

On the 2nd scan, the "cannot reset port 1" line is gone:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8) 5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

All USB devices seem to be detected correctly though. Here the logs:

=> usb tree
USB device tree:

     1  Hub (5 Gb/s, 0mA)
     |  U-Boot XHCI Host Controller
     |
     +-2  Hub (480 Mb/s, 100mA)
     |
     +-3  Hub (480 Mb/s, 2mA)
     | |
     | +-5  Mass Storage (480 Mb/s, 200mA)
     |      JetFlash Mass Storage Device 3281440601
     |
     +-4  Vendor specific (5 Gb/s, 64mA)
          Realtek USB 10/100/1000 LAN 000002000000

=> usb info
1: Hub, USB Revision 3.0
- U-Boot XHCI Host Controller
- Class: Hub
- PacketSize: 512 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Hub, USB Revision 2.0
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0409 Product 0x005a Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Hub, USB Revision 2.1
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0424 Product 0x4604 Version 1.131
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 2mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

5: Mass Storage, USB Revision 2.10
- JetFlash Mass Storage Device 3281440601
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x8564 Product 0x1000 Version 16.117
Configuration: 1
- Interfaces: 1 Bus Powered 200mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 2 Out Bulk MaxPacket 512
- Endpoint 1 In Bulk MaxPacket 512

4: Vendor specific, USB Revision 3.0
- Realtek USB 10/100/1000 LAN 000002000000
- Class: (from Interface) Vendor specific
- PacketSize: 512 Configurations: 2
- Vendor: 0x0bda Product 0x8153 Version 48.0
Configuration: 1
- Interfaces: 1 Bus Powered Remote Wakeup 64mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Vendor specific
- Endpoint 1 In Bulk MaxPacket 1024
- Endpoint 2 Out Bulk MaxPacket 1024
- Endpoint 3 In Interrupt MaxPacket 2 Interval 8ms

Quoted 7 lines
Quoted 3 lines

Do you have any ideas about the scanning logs that I've noticed above? Would it help if I provided some debug logs (-DDEBUG) for this?

"cannot reset port 1" message is annoying, but that may happen sometimes due to unstable power supply. I will see if we can mute it if it's not the final round of reset try.

That would be good, thanks.

Quoted 5 lines

I am more concerned about
the "USB device descriptor short read (expected 18, got 8)". This message indicates U-Boot cannot get the device descriptor during set configuration process. So did you manage to get all USB devices that are connected on your board enumerated?

Might be that I'm missing some keyboard / mouse, which I'm not using and not really aware of. One USB port is connected to a KVM switch, enumberating such devices. Here the log from U-Boot and Linux again:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
6 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:

    1  Hub (5 Gb/s, 0mA)
    |  U-Boot XHCI Host Controller
    |
    +-2  Hub (480 Mb/s, 100mA)
    |
    +-3  Mass Storage (480 Mb/s, 98mA)
    |    USBest Technology USB Mass Storage Device 09092207fbf0c4
    |
    +-4  Hub (480 Mb/s, 2mA)
    | |
    | +-6  Mass Storage (480 Mb/s, 200mA)
    |      JetFlash Mass Storage Device 3281440601
    |
    +-5  Vendor specific (5 Gb/s, 64mA)
         Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
      |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
      |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
          |__ Port 4: Dev 4, If 0, Class=Hub, Driver=hub/4p, 12M
              |__ Port 1: Dev 6, If 1, Class=Human Interface Device, Driver=usbhid, 12M
              |__ Port 1: Dev 6, If 2, Class=Human Interface Device, Driver=usbhid, 12M
              |__ Port 1: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M
      |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
      |__ Port 5: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
          |__ Port 1: Dev 7, If 0, Class=Mass Storage, Driver=usb-storage, 480M
Quoted 2 lines

Which event polling Kconfig option do I need to enable?

The default one CONFIG_SYS_USB_EVENT_POLL should be OK. By comparing your U-Boot log and Linux one, I found the following devices were enumerated by Linux but not by U-Boot:

|__ Port 1: Dev 6, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 1: Dev 6, If 2, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 1: Dev 6, If 0, Class=Human Interface Device,
Driver=usbhid, 12M

Quoted 5 lines

These devices are full speed devices. I believe the reason is that U-Boot encounters "USB device descriptor short read (expected 18, got 8)" so it does not continue the enumeration. As to why these full speed devices only return 8 bytes descriptors, this needs to be investigated. Which devices are they?

This is my KVM switch with its USB keyboard and mouse. When I unplug this USB cable, this message does not appear while running "usb reset".

This also happen, when I only plug a USB mouse to this same USB port:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8) 5 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:

   1  Hub (5 Gb/s, 0mA)
   |  U-Boot XHCI Host Controller
   |
   +-2  Mass Storage (480 Mb/s, 98mA)
   |    USBest Technology USB Mass Storage Device 09092207fbf0c4
   |
   +-3  Hub (480 Mb/s, 2mA)
   | |
   | +-5  Mass Storage (480 Mb/s, 200mA)
   |      JetFlash Mass Storage Device 3281440601
   |
   +-4  Vendor specific (5 Gb/s, 64mA)
        Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
     |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
     |__ Port 2: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
     |__ Port 2: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
     |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
     |__ Port 5: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
         |__ Port 1: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M
Quoted 5 lines
Quoted 2 lines

Can you reproduce this on your MinnowMax? Would it help, if I would enable some traces (-DDEBUG)?

I cannot reproduce this on MinnowMax. Is the KVM switch a USB 2.0 or 3.0 hub?

USB 2.0, its a pretty old device. But the example above is without the KVM and only with the USB mouse.

Quoted 2 lines

Is it possible to switch BayTrail SoC to EHCI and do the same testing?

Sure. After disabling CONFIG_USB_XHCI_HC I now get this error:

=> usb reset
resetting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... Divide Error
EIP: 0010:[<7b587862>] EFLAGS: 00010246 Original EIP :[<fff33862>]
EAX: 00000040 EBX: 7b35db00 ECX: 00000380 EDX: 00000000
ESI: 7b33af40 EDI: 7b33aa00 EBP: 7b35a640 ESP: 7b33a990
DS: 0018 ES: 0018 FS: 0020 GS: 0018 SS: 0018
CR0: 00000033 CR2: 00000000 CR3: 00000000 CR4: 00000600
DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
DR6: ffff0ff0 DR7: 00000400

Stack:
     0x7b33a9d0 : 0x7b35dac0
     0x7b33a9cc : 0x7b33af40
     0x7b33a9c8 : 0x00000100
     0x7b33a9c4 : 0x7b33ac80
     0x7b33a9c0 : 0x00000001
     0x7b33a9bc : 0x7b33ac80
     0x7b33a9b8 : 0x7b35a680
     0x7b33a9b4 : 0x00000000
     0x7b33a9b0 : 0x00000040
     0x7b33a9ac : 0x80000080
     0x7b33a9a8 : 0x7b35db00
     0x7b33a9a4 : 0x00000040
     0x7b33a9a0 : 0x00000002
     0x7b33a99c : 0x7b35dac0
     0x7b33a998 : 0x1616cae2
     0x7b33a994 : 0xc8159ec7
--->0x7b33a990 : 0xc1b7c2b0
     0x7b33a98c : 0x00010246
     0x7b33a988 : 0x00000010
     0x7b33a984 : 0x7b587862

### ERROR ### Please RESET the board ###

EHCI worked before just fine. Does this (EHCI) work on your MinnoxMax?

Thanks,
Stefan

#16 lore raw

cover usb: xhci: Add interrupt transfer support

Hi Bin,

Quoted 326 lines · Stefan Roese

Hi Bin,

Quoted 276 lines · Bin Meng

Hi Stefan,

Quoted 273 lines · Stefan Roese

Hi Bin,

Quoted 216 lines · Bin Meng

Hi Stefan,

Quoted 199 lines · Stefan Roese

Hi Bin,

Quoted 127 lines · Bin Meng
Quoted 126 lines · Stefan Roese

Hi Bin,

Quoted 6 lines · Bin Meng

This series is the final series of the xHCI driver update.

This adds the missing interrupt transfer support to xHCI driver, so that devices like USB keyboard that uses interrupt transfer when CONFIG_SYS_USB_EVENT_POLL is defined can work.

Quoted 7 lines

Previous two series:
[1]: usb: xhci: Fix USB xHCI support on Intel platform
https://lists.denx.de/pipermail/u-boot/2017-June/296166.html
[2]: usb: hub: Support USB 3.0 hubs
https://lists.denx.de/pipermail/u-boot/2017-June/296284.html

This series is available at u-boot-x86/xhci-working3 for testing.

I'm using this git branch to test all your xHCI related patches now. On my BayTrail platform I get these messages upon "usb reset" scanning:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s)
found

On the 2nd scan, the "cannot reset port 1" line is gone:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s)
found

All USB devices seem to be detected correctly though. Here the logs:

=> usb tree
USB device tree:

     1  Hub (5 Gb/s, 0mA)
     |  U-Boot XHCI Host Controller
     |
     +-2  Hub (480 Mb/s, 100mA)
     |
     +-3  Hub (480 Mb/s, 2mA)
     | |
     | +-5  Mass Storage (480 Mb/s, 200mA)
     |      JetFlash Mass Storage Device 3281440601
     |
     +-4  Vendor specific (5 Gb/s, 64mA)
          Realtek USB 10/100/1000 LAN 000002000000

=> usb info
1: Hub, USB Revision 3.0
- U-Boot XHCI Host Controller
- Class: Hub
- PacketSize: 512 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Hub, USB Revision 2.0
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0409 Product 0x005a Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Hub, USB Revision 2.1
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0424 Product 0x4604 Version 1.131
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 2mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

5: Mass Storage, USB Revision 2.10
- JetFlash Mass Storage Device 3281440601
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x8564 Product 0x1000 Version 16.117
Configuration: 1
- Interfaces: 1 Bus Powered 200mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 2 Out Bulk MaxPacket 512
- Endpoint 1 In Bulk MaxPacket 512

4: Vendor specific, USB Revision 3.0
- Realtek USB 10/100/1000 LAN 000002000000
- Class: (from Interface) Vendor specific
- PacketSize: 512 Configurations: 2
- Vendor: 0x0bda Product 0x8153 Version 48.0
Configuration: 1
- Interfaces: 1 Bus Powered Remote Wakeup 64mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Vendor specific
- Endpoint 1 In Bulk MaxPacket 1024
- Endpoint 2 Out Bulk MaxPacket 1024
- Endpoint 3 In Interrupt MaxPacket 2 Interval 8ms

Quoted 7 lines
Quoted 3 lines

Do you have any ideas about the scanning logs that I've noticed above? Would it help if I provided some debug logs (-DDEBUG) for this?

"cannot reset port 1" message is annoying, but that may happen sometimes due to unstable power supply. I will see if we can mute it if it's not the final round of reset try.

That would be good, thanks.

Quoted 5 lines

I am more concerned about
the "USB device descriptor short read (expected 18, got 8)". This message indicates U-Boot cannot get the device descriptor during set configuration process. So did you manage to get all USB devices that are connected on your board enumerated?

Might be that I'm missing some keyboard / mouse, which I'm not using and not really aware of. One USB port is connected to a KVM switch, enumberating such devices. Here the log from U-Boot and Linux again:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
6 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:

    1  Hub (5 Gb/s, 0mA)
    |  U-Boot XHCI Host Controller
    |
    +-2  Hub (480 Mb/s, 100mA)
    |
    +-3  Mass Storage (480 Mb/s, 98mA)
    |    USBest Technology USB Mass Storage Device 09092207fbf0c4
    |
    +-4  Hub (480 Mb/s, 2mA)
    | |
    | +-6  Mass Storage (480 Mb/s, 200mA)
    |      JetFlash Mass Storage Device 3281440601
    |
    +-5  Vendor specific (5 Gb/s, 64mA)
         Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
      |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, 
Driver=r8152, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
      |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
          |__ Port 4: Dev 4, If 0, Class=Hub, Driver=hub/4p, 12M
              |__ Port 1: Dev 6, If 1, Class=Human Interface 
Device, Driver=usbhid, 12M
              |__ Port 1: Dev 6, If 2, Class=Human Interface 
Device, Driver=usbhid, 12M
              |__ Port 1: Dev 6, If 0, Class=Human Interface 
Device, Driver=usbhid, 12M
      |__ Port 4: Dev 3, If 0, Class=Mass Storage, 
Driver=usb-storage, 480M
      |__ Port 5: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
          |__ Port 1: Dev 7, If 0, Class=Mass Storage, 
Driver=usb-storage, 480M
Quoted 2 lines

Which event polling Kconfig option do I need to enable?

The default one CONFIG_SYS_USB_EVENT_POLL should be OK. By comparing your U-Boot log and Linux one, I found the following devices were enumerated by Linux but not by U-Boot:

|__ Port 1: Dev 6, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 1: Dev 6, If 2, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 1: Dev 6, If 0, Class=Human Interface Device,
Driver=usbhid, 12M

Quoted 5 lines

These devices are full speed devices. I believe the reason is that U-Boot encounters "USB device descriptor short read (expected 18, got 8)" so it does not continue the enumeration. As to why these full speed devices only return 8 bytes descriptors, this needs to be investigated. Which devices are they?

This is my KVM switch with its USB keyboard and mouse. When I unplug this USB cable, this message does not appear while running "usb reset".

This also happen, when I only plug a USB mouse to this same USB port:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:

   1  Hub (5 Gb/s, 0mA)
   |  U-Boot XHCI Host Controller
   |
   +-2  Mass Storage (480 Mb/s, 98mA)
   |    USBest Technology USB Mass Storage Device 09092207fbf0c4
   |
   +-3  Hub (480 Mb/s, 2mA)
   | |
   | +-5  Mass Storage (480 Mb/s, 200mA)
   |      JetFlash Mass Storage Device 3281440601
   |
   +-4  Vendor specific (5 Gb/s, 64mA)
        Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
     |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, 
Driver=r8152, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
     |__ Port 2: Dev 2, If 0, Class=Human Interface Device, 
Driver=usbhid, 12M
     |__ Port 2: Dev 2, If 1, Class=Human Interface Device, 
Driver=usbhid, 12M
     |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 
480M
     |__ Port 5: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
         |__ Port 1: Dev 5, If 0, Class=Mass Storage, 
Driver=usb-storage, 480M
Quoted 5 lines
Quoted 2 lines

Can you reproduce this on your MinnowMax? Would it help, if I would enable some traces (-DDEBUG)?

I cannot reproduce this on MinnowMax. Is the KVM switch a USB 2.0 or 3.0 hub?

USB 2.0, its a pretty old device. But the example above is without the KVM and only with the USB mouse.

Quoted 2 lines

Is it possible to switch BayTrail SoC to EHCI and do the same testing?

Sure. After disabling CONFIG_USB_XHCI_HC I now get this error:

=> usb reset
resetting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... Divide Error
EIP: 0010:[<7b587862>] EFLAGS: 00010246 Original EIP :[<fff33862>]
EAX: 00000040 EBX: 7b35db00 ECX: 00000380 EDX: 00000000
ESI: 7b33af40 EDI: 7b33aa00 EBP: 7b35a640 ESP: 7b33a990
DS: 0018 ES: 0018 FS: 0020 GS: 0018 SS: 0018
CR0: 00000033 CR2: 00000000 CR3: 00000000 CR4: 00000600
DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
DR6: ffff0ff0 DR7: 00000400

Stack:
     0x7b33a9d0 : 0x7b35dac0
     0x7b33a9cc : 0x7b33af40
     0x7b33a9c8 : 0x00000100
     0x7b33a9c4 : 0x7b33ac80
     0x7b33a9c0 : 0x00000001
     0x7b33a9bc : 0x7b33ac80
     0x7b33a9b8 : 0x7b35a680
     0x7b33a9b4 : 0x00000000
     0x7b33a9b0 : 0x00000040
     0x7b33a9ac : 0x80000080
     0x7b33a9a8 : 0x7b35db00
     0x7b33a9a4 : 0x00000040
     0x7b33a9a0 : 0x00000002
     0x7b33a99c : 0x7b35dac0
     0x7b33a998 : 0x1616cae2
     0x7b33a994 : 0xc8159ec7
--->0x7b33a990 : 0xc1b7c2b0
     0x7b33a98c : 0x00010246
     0x7b33a988 : 0x00000010
     0x7b33a984 : 0x7b587862
Quoted 4 lines

### ERROR ### Please RESET the board ###

EHCI worked before just fine. Does this (EHCI) work on your MinnoxMax?

I just installed an earlier version with EHCI still working. Here the USB mouse is detected:

=> usb reset
resetting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 5 USB Device(s) found => usb tree
USB device tree:
1 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|

   +-2  Hub (480 Mb/s, 0mA)
     |
     +-3  Vendor specific (480 Mb/s, 180mA)
     |    Realtek USB 10/100/1000 LAN 000002000000
     |
     +-5  Mass Storage (480 Mb/s, 98mA)
     |    USBest Technology USB Mass Storage Device 09092207fbf0c4
     |
     +-4  Human Interface (12 Mb/s, 98mA)

Logitech USB Receiver

=> usb info
1: Hub, USB Revision 2.0
- u-boot EHCI Host Controller
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Hub, USB Revision 2.0
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x8087 Product 0x07e6 Version 0.23
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Vendor specific, USB Revision 2.10
- Realtek USB 10/100/1000 LAN 000002000000
- Class: (from Interface) Vendor specific
- PacketSize: 64 Configurations: 2
- Vendor: 0x0bda Product 0x8153 Version 48.0
Configuration: 1
- Interfaces: 1 Bus Powered Remote Wakeup 180mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Vendor specific
- Endpoint 1 In Bulk MaxPacket 512
- Endpoint 2 Out Bulk MaxPacket 512
- Endpoint 3 In Interrupt MaxPacket 2 Interval 8ms

5: Mass Storage, USB Revision 2.0
- USBest Technology USB Mass Storage Device 09092207fbf0c4
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x1307 Product 0x0165 Version 1.0
Configuration: 1
- Interfaces: 1 Bus Powered 98mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 1 Out Bulk MaxPacket 512
- Endpoint 2 In Bulk MaxPacket 512
- Endpoint 3 In Interrupt MaxPacket 64 Interval 8ms

4: Human Interface, USB Revision 2.0
- Logitech USB Receiver
- Class: (from Interface) Human Interface
- PacketSize: 8 Configurations: 1
- Vendor: 0x046d Product 0xc52f Version 34.0
Configuration: 1
- Interfaces: 2 Bus Powered Remote Wakeup 98mA
- String: "RQR22.00_B0005"
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Human Interface, Subclass: Boot Mouse
- Endpoint 1 In Interrupt MaxPacket 8 Interval 2ms
Interface: 1
- Alternate Setting 0, Endpoints: 1
- Class Human Interface, Subclass: None
- Endpoint 2 In Interrupt MaxPacket 20 Interval 2ms

Thanks,
Stefan

author
#17 lore raw

cover usb: xhci: Add interrupt transfer support

Hi Stefan,

Quoted 427 lines · Stefan Roese

Hi Bin,

Quoted 342 lines · Stefan Roese

Hi Bin,

Quoted 288 lines · Bin Meng

Hi Stefan,

Quoted 284 lines · Stefan Roese

Hi Bin,

Quoted 225 lines · Bin Meng

Hi Stefan,

Quoted 207 lines · Stefan Roese

Hi Bin,

Quoted 131 lines · Bin Meng
Quoted 129 lines · Stefan Roese

Hi Bin,

Quoted 7 lines · Bin Meng

This series is the final series of the xHCI driver update.

This adds the missing interrupt transfer support to xHCI driver, so that devices like USB keyboard that uses interrupt transfer when CONFIG_SYS_USB_EVENT_POLL is defined can work.

Quoted 7 lines

Previous two series:
[1]: usb: xhci: Fix USB xHCI support on Intel platform
https://lists.denx.de/pipermail/u-boot/2017-June/296166.html
[2]: usb: hub: Support USB 3.0 hubs
https://lists.denx.de/pipermail/u-boot/2017-June/296284.html

This series is available at u-boot-x86/xhci-working3 for testing.

I'm using this git branch to test all your xHCI related patches now. On my BayTrail platform I get these messages upon "usb reset" scanning:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s)
found

On the 2nd scan, the "cannot reset port 1" line is gone:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s)
found

All USB devices seem to be detected correctly though. Here the logs:

=> usb tree
USB device tree:

     1  Hub (5 Gb/s, 0mA)
     |  U-Boot XHCI Host Controller
     |
     +-2  Hub (480 Mb/s, 100mA)
     |
     +-3  Hub (480 Mb/s, 2mA)
     | |
     | +-5  Mass Storage (480 Mb/s, 200mA)
     |      JetFlash Mass Storage Device 3281440601
     |
     +-4  Vendor specific (5 Gb/s, 64mA)
          Realtek USB 10/100/1000 LAN 000002000000

=> usb info
1: Hub, USB Revision 3.0
- U-Boot XHCI Host Controller
- Class: Hub
- PacketSize: 512 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Hub, USB Revision 2.0
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0409 Product 0x005a Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Hub, USB Revision 2.1
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0424 Product 0x4604 Version 1.131
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 2mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

5: Mass Storage, USB Revision 2.10
- JetFlash Mass Storage Device 3281440601
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x8564 Product 0x1000 Version 16.117
Configuration: 1
- Interfaces: 1 Bus Powered 200mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 2 Out Bulk MaxPacket 512
- Endpoint 1 In Bulk MaxPacket 512

4: Vendor specific, USB Revision 3.0
- Realtek USB 10/100/1000 LAN 000002000000
- Class: (from Interface) Vendor specific
- PacketSize: 512 Configurations: 2
- Vendor: 0x0bda Product 0x8153 Version 48.0
Configuration: 1
- Interfaces: 1 Bus Powered Remote Wakeup 64mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Vendor specific
- Endpoint 1 In Bulk MaxPacket 1024
- Endpoint 2 Out Bulk MaxPacket 1024
- Endpoint 3 In Interrupt MaxPacket 2 Interval 8ms

Quoted 8 lines
Quoted 3 lines

Do you have any ideas about the scanning logs that I've noticed above? Would it help if I provided some debug logs (-DDEBUG) for this?

"cannot reset port 1" message is annoying, but that may happen sometimes due to unstable power supply. I will see if we can mute it if it's not the final round of reset try.

That would be good, thanks.

Quoted 5 lines

I am more concerned about
the "USB device descriptor short read (expected 18, got 8)". This message indicates U-Boot cannot get the device descriptor during set configuration process. So did you manage to get all USB devices that are connected on your board enumerated?

Might be that I'm missing some keyboard / mouse, which I'm not using and not really aware of. One USB port is connected to a KVM switch, enumberating such devices. Here the log from U-Boot and Linux again:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
6 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:

    1  Hub (5 Gb/s, 0mA)
    |  U-Boot XHCI Host Controller
    |
    +-2  Hub (480 Mb/s, 100mA)
    |
    +-3  Mass Storage (480 Mb/s, 98mA)
    |    USBest Technology USB Mass Storage Device 09092207fbf0c4
    |
    +-4  Hub (480 Mb/s, 2mA)
    | |
    | +-6  Mass Storage (480 Mb/s, 200mA)
    |      JetFlash Mass Storage Device 3281440601
    |
    +-5  Vendor specific (5 Gb/s, 64mA)
         Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
      |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class,
Driver=r8152, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
      |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
          |__ Port 4: Dev 4, If 0, Class=Hub, Driver=hub/4p, 12M
              |__ Port 1: Dev 6, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
              |__ Port 1: Dev 6, If 2, Class=Human Interface Device,
Driver=usbhid, 12M
              |__ Port 1: Dev 6, If 0, Class=Human Interface Device,
Driver=usbhid, 12M
      |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage,
480M
      |__ Port 5: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
          |__ Port 1: Dev 7, If 0, Class=Mass Storage,
Driver=usb-storage, 480M
Quoted 2 lines

Which event polling Kconfig option do I need to enable?

The default one CONFIG_SYS_USB_EVENT_POLL should be OK. By comparing your U-Boot log and Linux one, I found the following devices were enumerated by Linux but not by U-Boot:

|__ Port 1: Dev 6, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 1: Dev 6, If 2, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 1: Dev 6, If 0, Class=Human Interface Device,
Driver=usbhid, 12M

Quoted 5 lines

These devices are full speed devices. I believe the reason is that U-Boot encounters "USB device descriptor short read (expected 18, got 8)" so it does not continue the enumeration. As to why these full speed devices only return 8 bytes descriptors, this needs to be investigated. Which devices are they?

This is my KVM switch with its USB keyboard and mouse. When I unplug this USB cable, this message does not appear while running "usb reset".

This also happen, when I only plug a USB mouse to this same USB port:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:

   1  Hub (5 Gb/s, 0mA)
   |  U-Boot XHCI Host Controller
   |
   +-2  Mass Storage (480 Mb/s, 98mA)
   |    USBest Technology USB Mass Storage Device 09092207fbf0c4
   |
   +-3  Hub (480 Mb/s, 2mA)
   | |
   | +-5  Mass Storage (480 Mb/s, 200mA)
   |      JetFlash Mass Storage Device 3281440601
   |
   +-4  Vendor specific (5 Gb/s, 64mA)
        Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
     |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152,
5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
     |__ Port 2: Dev 2, If 0, Class=Human Interface Device,
Driver=usbhid, 12M
     |__ Port 2: Dev 2, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
     |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage,
480M
     |__ Port 5: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
         |__ Port 1: Dev 5, If 0, Class=Mass Storage,
Driver=usb-storage, 480M
Quoted 6 lines
Quoted 2 lines

Can you reproduce this on your MinnowMax? Would it help, if I would enable some traces (-DDEBUG)?

I cannot reproduce this on MinnowMax. Is the KVM switch a USB 2.0 or 3.0 hub?

USB 2.0, its a pretty old device. But the example above is without the KVM and only with the USB mouse.

Quoted 2 lines

Is it possible to switch BayTrail SoC to EHCI and do the same testing?

Sure. After disabling CONFIG_USB_XHCI_HC I now get this error:

=> usb reset
resetting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... Divide Error
EIP: 0010:[<7b587862>] EFLAGS: 00010246 Original EIP :[<fff33862>]
EAX: 00000040 EBX: 7b35db00 ECX: 00000380 EDX: 00000000
ESI: 7b33af40 EDI: 7b33aa00 EBP: 7b35a640 ESP: 7b33a990
DS: 0018 ES: 0018 FS: 0020 GS: 0018 SS: 0018
CR0: 00000033 CR2: 00000000 CR3: 00000000 CR4: 00000600
DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
DR6: ffff0ff0 DR7: 00000400

Stack:
     0x7b33a9d0 : 0x7b35dac0
     0x7b33a9cc : 0x7b33af40
     0x7b33a9c8 : 0x00000100
     0x7b33a9c4 : 0x7b33ac80
     0x7b33a9c0 : 0x00000001
     0x7b33a9bc : 0x7b33ac80
     0x7b33a9b8 : 0x7b35a680
     0x7b33a9b4 : 0x00000000
     0x7b33a9b0 : 0x00000040
     0x7b33a9ac : 0x80000080
     0x7b33a9a8 : 0x7b35db00
     0x7b33a9a4 : 0x00000040
     0x7b33a9a0 : 0x00000002
     0x7b33a99c : 0x7b35dac0
     0x7b33a998 : 0x1616cae2
     0x7b33a994 : 0xc8159ec7
--->0x7b33a990 : 0xc1b7c2b0
     0x7b33a98c : 0x00010246
     0x7b33a988 : 0x00000010
     0x7b33a984 : 0x7b587862
Quoted 4 lines

### ERROR ### Please RESET the board ###

EHCI worked before just fine. Does this (EHCI) work on your MinnoxMax?

I just installed an earlier version with EHCI still working. Here the USB mouse is detected:

=> usb reset
resetting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 5 USB Device(s) found => usb tree
USB device tree:
1 Hub (480 Mb/s, 0mA)
| u-boot EHCI Host Controller
|

  +-2  Hub (480 Mb/s, 0mA)
    |
    +-3  Vendor specific (480 Mb/s, 180mA)
    |    Realtek USB 10/100/1000 LAN 000002000000
    |
    +-5  Mass Storage (480 Mb/s, 98mA)
    |    USBest Technology USB Mass Storage Device 09092207fbf0c4
    |
    +-4  Human Interface (12 Mb/s, 98mA)

Logitech USB Receiver

=> usb info
1: Hub, USB Revision 2.0
- u-boot EHCI Host Controller
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Hub, USB Revision 2.0
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x8087 Product 0x07e6 Version 0.23
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Vendor specific, USB Revision 2.10
- Realtek USB 10/100/1000 LAN 000002000000
- Class: (from Interface) Vendor specific
- PacketSize: 64 Configurations: 2
- Vendor: 0x0bda Product 0x8153 Version 48.0
Configuration: 1
- Interfaces: 1 Bus Powered Remote Wakeup 180mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Vendor specific
- Endpoint 1 In Bulk MaxPacket 512
- Endpoint 2 Out Bulk MaxPacket 512
- Endpoint 3 In Interrupt MaxPacket 2 Interval 8ms

5: Mass Storage, USB Revision 2.0
- USBest Technology USB Mass Storage Device 09092207fbf0c4
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x1307 Product 0x0165 Version 1.0
Configuration: 1
- Interfaces: 1 Bus Powered 98mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 1 Out Bulk MaxPacket 512
- Endpoint 2 In Bulk MaxPacket 512
- Endpoint 3 In Interrupt MaxPacket 64 Interval 8ms

Quoted 17 lines

4: Human Interface, USB Revision 2.0
- Logitech USB Receiver
- Class: (from Interface) Human Interface
- PacketSize: 8 Configurations: 1
- Vendor: 0x046d Product 0xc52f Version 34.0
Configuration: 1
- Interfaces: 2 Bus Powered Remote Wakeup 98mA
- String: "RQR22.00_B0005"
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Human Interface, Subclass: Boot Mouse
- Endpoint 1 In Interrupt MaxPacket 8 Interval 2ms
Interface: 1
- Alternate Setting 0, Endpoints: 1
- Class Human Interface, Subclass: None
- Endpoint 2 In Interrupt MaxPacket 20 Interval 2ms

Thank you very much for the information. This is very helpful. Looks your USB mouse is Logitech which is a full speed device. My testing was using a DELL mouse and keyboard which are both low speed devices. It's possible that xHCI driver still has some issues somewhere that does not handle LS/FS very well. After my patches it only works for my mouse and keyboard. I may have some clue, but since I don't have the device so I will rely on you to test that :)

Regards,
Bin

#18 lore raw

cover usb: xhci: Add interrupt transfer support

Hi Bin,

Quoted 448 lines · Bin Meng

Hi Stefan,

Quoted 427 lines · Stefan Roese

Hi Bin,

Quoted 342 lines · Stefan Roese

Hi Bin,

Quoted 288 lines · Bin Meng

Hi Stefan,

Quoted 284 lines · Stefan Roese

Hi Bin,

Quoted 225 lines · Bin Meng

Hi Stefan,

Quoted 207 lines · Stefan Roese

Hi Bin,

Quoted 131 lines · Bin Meng
Quoted 129 lines · Stefan Roese

Hi Bin,

Quoted 7 lines · Bin Meng

This series is the final series of the xHCI driver update.

This adds the missing interrupt transfer support to xHCI driver, so that devices like USB keyboard that uses interrupt transfer when CONFIG_SYS_USB_EVENT_POLL is defined can work.

Quoted 7 lines

Previous two series:
[1]: usb: xhci: Fix USB xHCI support on Intel platform
https://lists.denx.de/pipermail/u-boot/2017-June/296166.html
[2]: usb: hub: Support USB 3.0 hubs
https://lists.denx.de/pipermail/u-boot/2017-June/296284.html

This series is available at u-boot-x86/xhci-working3 for testing.

I'm using this git branch to test all your xHCI related patches now. On my BayTrail platform I get these messages upon "usb reset" scanning:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s)
found

On the 2nd scan, the "cannot reset port 1" line is gone:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s)
found

All USB devices seem to be detected correctly though. Here the logs:

=> usb tree
USB device tree:

      1  Hub (5 Gb/s, 0mA)
      |  U-Boot XHCI Host Controller
      |
      +-2  Hub (480 Mb/s, 100mA)
      |
      +-3  Hub (480 Mb/s, 2mA)
      | |
      | +-5  Mass Storage (480 Mb/s, 200mA)
      |      JetFlash Mass Storage Device 3281440601
      |
      +-4  Vendor specific (5 Gb/s, 64mA)
           Realtek USB 10/100/1000 LAN 000002000000

=> usb info
1: Hub, USB Revision 3.0
- U-Boot XHCI Host Controller
- Class: Hub
- PacketSize: 512 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Hub, USB Revision 2.0
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0409 Product 0x005a Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Hub, USB Revision 2.1
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0424 Product 0x4604 Version 1.131
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 2mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

5: Mass Storage, USB Revision 2.10
- JetFlash Mass Storage Device 3281440601
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x8564 Product 0x1000 Version 16.117
Configuration: 1
- Interfaces: 1 Bus Powered 200mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 2 Out Bulk MaxPacket 512
- Endpoint 1 In Bulk MaxPacket 512

4: Vendor specific, USB Revision 3.0
- Realtek USB 10/100/1000 LAN 000002000000
- Class: (from Interface) Vendor specific
- PacketSize: 512 Configurations: 2
- Vendor: 0x0bda Product 0x8153 Version 48.0
Configuration: 1
- Interfaces: 1 Bus Powered Remote Wakeup 64mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Vendor specific
- Endpoint 1 In Bulk MaxPacket 1024
- Endpoint 2 Out Bulk MaxPacket 1024
- Endpoint 3 In Interrupt MaxPacket 2 Interval 8ms

Quoted 8 lines
Quoted 3 lines

Do you have any ideas about the scanning logs that I've noticed above? Would it help if I provided some debug logs (-DDEBUG) for this?

"cannot reset port 1" message is annoying, but that may happen sometimes due to unstable power supply. I will see if we can mute it if it's not the final round of reset try.

That would be good, thanks.

Quoted 5 lines

I am more concerned about
the "USB device descriptor short read (expected 18, got 8)". This message indicates U-Boot cannot get the device descriptor during set configuration process. So did you manage to get all USB devices that are connected on your board enumerated?

Might be that I'm missing some keyboard / mouse, which I'm not using and not really aware of. One USB port is connected to a KVM switch, enumberating such devices. Here the log from U-Boot and Linux again:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
6 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:

     1  Hub (5 Gb/s, 0mA)
     |  U-Boot XHCI Host Controller
     |
     +-2  Hub (480 Mb/s, 100mA)
     |
     +-3  Mass Storage (480 Mb/s, 98mA)
     |    USBest Technology USB Mass Storage Device 09092207fbf0c4
     |
     +-4  Hub (480 Mb/s, 2mA)
     | |
     | +-6  Mass Storage (480 Mb/s, 200mA)
     |      JetFlash Mass Storage Device 3281440601
     |
     +-5  Vendor specific (5 Gb/s, 64mA)
          Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
       |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class,
Driver=r8152, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
       |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
           |__ Port 4: Dev 4, If 0, Class=Hub, Driver=hub/4p, 12M
               |__ Port 1: Dev 6, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
               |__ Port 1: Dev 6, If 2, Class=Human Interface Device,
Driver=usbhid, 12M
               |__ Port 1: Dev 6, If 0, Class=Human Interface Device,
Driver=usbhid, 12M
       |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage,
480M
       |__ Port 5: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
           |__ Port 1: Dev 7, If 0, Class=Mass Storage,
Driver=usb-storage, 480M
Quoted 2 lines

Which event polling Kconfig option do I need to enable?

The default one CONFIG_SYS_USB_EVENT_POLL should be OK. By comparing your U-Boot log and Linux one, I found the following devices were enumerated by Linux but not by U-Boot:

|__ Port 1: Dev 6, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 1: Dev 6, If 2, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 1: Dev 6, If 0, Class=Human Interface Device,
Driver=usbhid, 12M

Quoted 5 lines

These devices are full speed devices. I believe the reason is that U-Boot encounters "USB device descriptor short read (expected 18, got 8)" so it does not continue the enumeration. As to why these full speed devices only return 8 bytes descriptors, this needs to be investigated. Which devices are they?

This is my KVM switch with its USB keyboard and mouse. When I unplug this USB cable, this message does not appear while running "usb reset".

This also happen, when I only plug a USB mouse to this same USB port:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:

    1  Hub (5 Gb/s, 0mA)
    |  U-Boot XHCI Host Controller
    |
    +-2  Mass Storage (480 Mb/s, 98mA)
    |    USBest Technology USB Mass Storage Device 09092207fbf0c4
    |
    +-3  Hub (480 Mb/s, 2mA)
    | |
    | +-5  Mass Storage (480 Mb/s, 200mA)
    |      JetFlash Mass Storage Device 3281440601
    |
    +-4  Vendor specific (5 Gb/s, 64mA)
         Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
      |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152,
5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
      |__ Port 2: Dev 2, If 0, Class=Human Interface Device,
Driver=usbhid, 12M
      |__ Port 2: Dev 2, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
      |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage,
480M
      |__ Port 5: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
          |__ Port 1: Dev 5, If 0, Class=Mass Storage,
Driver=usb-storage, 480M
Quoted 6 lines
Quoted 2 lines

Can you reproduce this on your MinnowMax? Would it help, if I would enable some traces (-DDEBUG)?

I cannot reproduce this on MinnowMax. Is the KVM switch a USB 2.0 or 3.0 hub?

USB 2.0, its a pretty old device. But the example above is without the KVM and only with the USB mouse.

Quoted 2 lines

Is it possible to switch BayTrail SoC to EHCI and do the same testing?

Sure. After disabling CONFIG_USB_XHCI_HC I now get this error:

=> usb reset
resetting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... Divide Error
EIP: 0010:[<7b587862>] EFLAGS: 00010246 Original EIP :[<fff33862>]
EAX: 00000040 EBX: 7b35db00 ECX: 00000380 EDX: 00000000
ESI: 7b33af40 EDI: 7b33aa00 EBP: 7b35a640 ESP: 7b33a990
DS: 0018 ES: 0018 FS: 0020 GS: 0018 SS: 0018
CR0: 00000033 CR2: 00000000 CR3: 00000000 CR4: 00000600
DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
DR6: ffff0ff0 DR7: 00000400

Stack:
      0x7b33a9d0 : 0x7b35dac0
      0x7b33a9cc : 0x7b33af40
      0x7b33a9c8 : 0x00000100
      0x7b33a9c4 : 0x7b33ac80
      0x7b33a9c0 : 0x00000001
      0x7b33a9bc : 0x7b33ac80
      0x7b33a9b8 : 0x7b35a680
      0x7b33a9b4 : 0x00000000
      0x7b33a9b0 : 0x00000040
      0x7b33a9ac : 0x80000080
      0x7b33a9a8 : 0x7b35db00
      0x7b33a9a4 : 0x00000040
      0x7b33a9a0 : 0x00000002
      0x7b33a99c : 0x7b35dac0
      0x7b33a998 : 0x1616cae2
      0x7b33a994 : 0xc8159ec7
--->0x7b33a990 : 0xc1b7c2b0
      0x7b33a98c : 0x00010246
      0x7b33a988 : 0x00000010
      0x7b33a984 : 0x7b587862
Quoted 4 lines

### ERROR ### Please RESET the board ###

EHCI worked before just fine. Does this (EHCI) work on your MinnoxMax?

I just installed an earlier version with EHCI still working. Here the USB mouse is detected:

=> usb reset
resetting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 5 USB Device(s) found => usb tree
USB device tree:

   1  Hub (480 Mb/s, 0mA)
   |  u-boot EHCI Host Controller
   |
   +-2  Hub (480 Mb/s, 0mA)
     |
     +-3  Vendor specific (480 Mb/s, 180mA)
     |    Realtek USB 10/100/1000 LAN 000002000000
     |
     +-5  Mass Storage (480 Mb/s, 98mA)
     |    USBest Technology USB Mass Storage Device 09092207fbf0c4
     |
     +-4  Human Interface (12 Mb/s, 98mA)
          Logitech USB Receiver

=> usb info
1: Hub, USB Revision 2.0
- u-boot EHCI Host Controller
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Hub, USB Revision 2.0
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x8087 Product 0x07e6 Version 0.23
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Vendor specific, USB Revision 2.10
- Realtek USB 10/100/1000 LAN 000002000000
- Class: (from Interface) Vendor specific
- PacketSize: 64 Configurations: 2
- Vendor: 0x0bda Product 0x8153 Version 48.0
Configuration: 1
- Interfaces: 1 Bus Powered Remote Wakeup 180mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Vendor specific
- Endpoint 1 In Bulk MaxPacket 512
- Endpoint 2 Out Bulk MaxPacket 512
- Endpoint 3 In Interrupt MaxPacket 2 Interval 8ms

5: Mass Storage, USB Revision 2.0
- USBest Technology USB Mass Storage Device 09092207fbf0c4
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x1307 Product 0x0165 Version 1.0
Configuration: 1
- Interfaces: 1 Bus Powered 98mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 1 Out Bulk MaxPacket 512
- Endpoint 2 In Bulk MaxPacket 512
- Endpoint 3 In Interrupt MaxPacket 64 Interval 8ms

Quoted 17 lines

4: Human Interface, USB Revision 2.0
- Logitech USB Receiver
- Class: (from Interface) Human Interface
- PacketSize: 8 Configurations: 1
- Vendor: 0x046d Product 0xc52f Version 34.0
Configuration: 1
- Interfaces: 2 Bus Powered Remote Wakeup 98mA
- String: "RQR22.00_B0005"
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Human Interface, Subclass: Boot Mouse
- Endpoint 1 In Interrupt MaxPacket 8 Interval 2ms
Interface: 1
- Alternate Setting 0, Endpoints: 1
- Class Human Interface, Subclass: None
- Endpoint 2 In Interrupt MaxPacket 20 Interval 2ms

Quoted 7 lines

Thank you very much for the information. This is very helpful. Looks your USB mouse is Logitech which is a full speed device. My testing was using a DELL mouse and keyboard which are both low speed devices. It's possible that xHCI driver still has some issues somewhere that does not handle LS/FS very well. After my patches it only works for my mouse and keyboard. I may have some clue, but since I don't have the device so I will rely on you to test that :)

Sure. I will gladly do some further tests.

BTW: The mouse is a Logitech M305, in case you might want to know. ;)

Thanks,
Stefan

author
#19 lore raw

cover usb: xhci: Add interrupt transfer support

In reply to Stefan Roese

Hi Stefan,

Quoted 342 lines · Stefan Roese

Hi Bin,

Quoted 288 lines · Bin Meng

Hi Stefan,

Quoted 284 lines · Stefan Roese

Hi Bin,

Quoted 225 lines · Bin Meng

Hi Stefan,

Quoted 207 lines · Stefan Roese

Hi Bin,

Quoted 131 lines · Bin Meng
Quoted 129 lines · Stefan Roese

Hi Bin,

Quoted 7 lines · Bin Meng

This series is the final series of the xHCI driver update.

This adds the missing interrupt transfer support to xHCI driver, so that devices like USB keyboard that uses interrupt transfer when CONFIG_SYS_USB_EVENT_POLL is defined can work.

Quoted 7 lines

Previous two series:
[1]: usb: xhci: Fix USB xHCI support on Intel platform
https://lists.denx.de/pipermail/u-boot/2017-June/296166.html
[2]: usb: hub: Support USB 3.0 hubs
https://lists.denx.de/pipermail/u-boot/2017-June/296284.html

This series is available at u-boot-x86/xhci-working3 for testing.

I'm using this git branch to test all your xHCI related patches now. On my BayTrail platform I get these messages upon "usb reset" scanning:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s)
found

On the 2nd scan, the "cannot reset port 1" line is gone:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s)
found

All USB devices seem to be detected correctly though. Here the logs:

=> usb tree
USB device tree:

     1  Hub (5 Gb/s, 0mA)
     |  U-Boot XHCI Host Controller
     |
     +-2  Hub (480 Mb/s, 100mA)
     |
     +-3  Hub (480 Mb/s, 2mA)
     | |
     | +-5  Mass Storage (480 Mb/s, 200mA)
     |      JetFlash Mass Storage Device 3281440601
     |
     +-4  Vendor specific (5 Gb/s, 64mA)
          Realtek USB 10/100/1000 LAN 000002000000

=> usb info
1: Hub, USB Revision 3.0
- U-Boot XHCI Host Controller
- Class: Hub
- PacketSize: 512 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Hub, USB Revision 2.0
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0409 Product 0x005a Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Hub, USB Revision 2.1
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0424 Product 0x4604 Version 1.131
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 2mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

5: Mass Storage, USB Revision 2.10
- JetFlash Mass Storage Device 3281440601
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x8564 Product 0x1000 Version 16.117
Configuration: 1
- Interfaces: 1 Bus Powered 200mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 2 Out Bulk MaxPacket 512
- Endpoint 1 In Bulk MaxPacket 512

4: Vendor specific, USB Revision 3.0
- Realtek USB 10/100/1000 LAN 000002000000
- Class: (from Interface) Vendor specific
- PacketSize: 512 Configurations: 2
- Vendor: 0x0bda Product 0x8153 Version 48.0
Configuration: 1
- Interfaces: 1 Bus Powered Remote Wakeup 64mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Vendor specific
- Endpoint 1 In Bulk MaxPacket 1024
- Endpoint 2 Out Bulk MaxPacket 1024
- Endpoint 3 In Interrupt MaxPacket 2 Interval 8ms

Quoted 8 lines
Quoted 3 lines

Do you have any ideas about the scanning logs that I've noticed above? Would it help if I provided some debug logs (-DDEBUG) for this?

"cannot reset port 1" message is annoying, but that may happen sometimes due to unstable power supply. I will see if we can mute it if it's not the final round of reset try.

That would be good, thanks.

Quoted 5 lines

I am more concerned about
the "USB device descriptor short read (expected 18, got 8)". This message indicates U-Boot cannot get the device descriptor during set configuration process. So did you manage to get all USB devices that are connected on your board enumerated?

Might be that I'm missing some keyboard / mouse, which I'm not using and not really aware of. One USB port is connected to a KVM switch, enumberating such devices. Here the log from U-Boot and Linux again:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
6 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:

    1  Hub (5 Gb/s, 0mA)
    |  U-Boot XHCI Host Controller
    |
    +-2  Hub (480 Mb/s, 100mA)
    |
    +-3  Mass Storage (480 Mb/s, 98mA)
    |    USBest Technology USB Mass Storage Device 09092207fbf0c4
    |
    +-4  Hub (480 Mb/s, 2mA)
    | |
    | +-6  Mass Storage (480 Mb/s, 200mA)
    |      JetFlash Mass Storage Device 3281440601
    |
    +-5  Vendor specific (5 Gb/s, 64mA)
         Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
      |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class,
Driver=r8152, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
      |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
          |__ Port 4: Dev 4, If 0, Class=Hub, Driver=hub/4p, 12M
              |__ Port 1: Dev 6, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
              |__ Port 1: Dev 6, If 2, Class=Human Interface Device,
Driver=usbhid, 12M
              |__ Port 1: Dev 6, If 0, Class=Human Interface Device,
Driver=usbhid, 12M
      |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage,
480M
      |__ Port 5: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
          |__ Port 1: Dev 7, If 0, Class=Mass Storage,
Driver=usb-storage, 480M
Quoted 2 lines

Which event polling Kconfig option do I need to enable?

The default one CONFIG_SYS_USB_EVENT_POLL should be OK. By comparing your U-Boot log and Linux one, I found the following devices were enumerated by Linux but not by U-Boot:

|__ Port 1: Dev 6, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 1: Dev 6, If 2, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 1: Dev 6, If 0, Class=Human Interface Device,
Driver=usbhid, 12M

Quoted 5 lines

These devices are full speed devices. I believe the reason is that U-Boot encounters "USB device descriptor short read (expected 18, got 8)" so it does not continue the enumeration. As to why these full speed devices only return 8 bytes descriptors, this needs to be investigated. Which devices are they?

This is my KVM switch with its USB keyboard and mouse. When I unplug this USB cable, this message does not appear while running "usb reset".

This also happen, when I only plug a USB mouse to this same USB port:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:

   1  Hub (5 Gb/s, 0mA)
   |  U-Boot XHCI Host Controller
   |
   +-2  Mass Storage (480 Mb/s, 98mA)
   |    USBest Technology USB Mass Storage Device 09092207fbf0c4
   |
   +-3  Hub (480 Mb/s, 2mA)
   | |
   | +-5  Mass Storage (480 Mb/s, 200mA)
   |      JetFlash Mass Storage Device 3281440601
   |
   +-4  Vendor specific (5 Gb/s, 64mA)
        Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
     |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152,
5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
     |__ Port 2: Dev 2, If 0, Class=Human Interface Device,
Driver=usbhid, 12M
     |__ Port 2: Dev 2, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
     |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage,
480M
     |__ Port 5: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
         |__ Port 1: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage,
480M
Quoted 6 lines
Quoted 2 lines

Can you reproduce this on your MinnowMax? Would it help, if I would enable some traces (-DDEBUG)?

I cannot reproduce this on MinnowMax. Is the KVM switch a USB 2.0 or 3.0 hub?

USB 2.0, its a pretty old device. But the example above is without the KVM and only with the USB mouse.

Quoted 2 lines

Is it possible to switch BayTrail SoC to EHCI and do the same testing?

Sure. After disabling CONFIG_USB_XHCI_HC I now get this error:

=> usb reset
resetting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... Divide Error
EIP: 0010:[<7b587862>] EFLAGS: 00010246 Original EIP :[<fff33862>]
EAX: 00000040 EBX: 7b35db00 ECX: 00000380 EDX: 00000000
ESI: 7b33af40 EDI: 7b33aa00 EBP: 7b35a640 ESP: 7b33a990
DS: 0018 ES: 0018 FS: 0020 GS: 0018 SS: 0018
CR0: 00000033 CR2: 00000000 CR3: 00000000 CR4: 00000600
DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
DR6: ffff0ff0 DR7: 00000400

Stack:
    0x7b33a9d0 : 0x7b35dac0
    0x7b33a9cc : 0x7b33af40
    0x7b33a9c8 : 0x00000100
    0x7b33a9c4 : 0x7b33ac80
    0x7b33a9c0 : 0x00000001
    0x7b33a9bc : 0x7b33ac80
    0x7b33a9b8 : 0x7b35a680
    0x7b33a9b4 : 0x00000000
    0x7b33a9b0 : 0x00000040
    0x7b33a9ac : 0x80000080
    0x7b33a9a8 : 0x7b35db00
    0x7b33a9a4 : 0x00000040
    0x7b33a9a0 : 0x00000002
    0x7b33a99c : 0x7b35dac0
    0x7b33a998 : 0x1616cae2
    0x7b33a994 : 0xc8159ec7
--->0x7b33a990 : 0xc1b7c2b0
    0x7b33a98c : 0x00010246
    0x7b33a988 : 0x00000010
    0x7b33a984 : 0x7b587862
Quoted 4 lines

### ERROR ### Please RESET the board ###

EHCI worked before just fine. Does this (EHCI) work on your MinnoxMax?

I've reproduced the EHCI crash issue. Looks the crash happens in ehci_submit_async(). However my patches did not touch this function. I will debug this.

Regards,
Bin

author
#20 lore raw

cover usb: xhci: Add interrupt transfer support

Hi Stefan,

Quoted 347 lines · Bin Meng

Hi Stefan,

Quoted 344 lines · Stefan Roese

Hi Bin,

Quoted 288 lines · Bin Meng

Hi Stefan,

Quoted 284 lines · Stefan Roese

Hi Bin,

Quoted 225 lines · Bin Meng

Hi Stefan,

Quoted 207 lines · Stefan Roese

Hi Bin,

Quoted 131 lines · Bin Meng
Quoted 129 lines · Stefan Roese

Hi Bin,

Quoted 7 lines · Bin Meng

This series is the final series of the xHCI driver update.

This adds the missing interrupt transfer support to xHCI driver, so that devices like USB keyboard that uses interrupt transfer when CONFIG_SYS_USB_EVENT_POLL is defined can work.

Quoted 7 lines

Previous two series:
[1]: usb: xhci: Fix USB xHCI support on Intel platform
https://lists.denx.de/pipermail/u-boot/2017-June/296166.html
[2]: usb: hub: Support USB 3.0 hubs
https://lists.denx.de/pipermail/u-boot/2017-June/296284.html

This series is available at u-boot-x86/xhci-working3 for testing.

I'm using this git branch to test all your xHCI related patches now. On my BayTrail platform I get these messages upon "usb reset" scanning:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s)
found

On the 2nd scan, the "cannot reset port 1" line is gone:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s)
found

All USB devices seem to be detected correctly though. Here the logs:

=> usb tree
USB device tree:

     1  Hub (5 Gb/s, 0mA)
     |  U-Boot XHCI Host Controller
     |
     +-2  Hub (480 Mb/s, 100mA)
     |
     +-3  Hub (480 Mb/s, 2mA)
     | |
     | +-5  Mass Storage (480 Mb/s, 200mA)
     |      JetFlash Mass Storage Device 3281440601
     |
     +-4  Vendor specific (5 Gb/s, 64mA)
          Realtek USB 10/100/1000 LAN 000002000000

=> usb info
1: Hub, USB Revision 3.0
- U-Boot XHCI Host Controller
- Class: Hub
- PacketSize: 512 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Hub, USB Revision 2.0
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0409 Product 0x005a Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Hub, USB Revision 2.1
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0424 Product 0x4604 Version 1.131
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 2mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

5: Mass Storage, USB Revision 2.10
- JetFlash Mass Storage Device 3281440601
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x8564 Product 0x1000 Version 16.117
Configuration: 1
- Interfaces: 1 Bus Powered 200mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 2 Out Bulk MaxPacket 512
- Endpoint 1 In Bulk MaxPacket 512

4: Vendor specific, USB Revision 3.0
- Realtek USB 10/100/1000 LAN 000002000000
- Class: (from Interface) Vendor specific
- PacketSize: 512 Configurations: 2
- Vendor: 0x0bda Product 0x8153 Version 48.0
Configuration: 1
- Interfaces: 1 Bus Powered Remote Wakeup 64mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Vendor specific
- Endpoint 1 In Bulk MaxPacket 1024
- Endpoint 2 Out Bulk MaxPacket 1024
- Endpoint 3 In Interrupt MaxPacket 2 Interval 8ms

Quoted 8 lines
Quoted 3 lines

Do you have any ideas about the scanning logs that I've noticed above? Would it help if I provided some debug logs (-DDEBUG) for this?

"cannot reset port 1" message is annoying, but that may happen sometimes due to unstable power supply. I will see if we can mute it if it's not the final round of reset try.

That would be good, thanks.

Quoted 5 lines

I am more concerned about
the "USB device descriptor short read (expected 18, got 8)". This message indicates U-Boot cannot get the device descriptor during set configuration process. So did you manage to get all USB devices that are connected on your board enumerated?

Might be that I'm missing some keyboard / mouse, which I'm not using and not really aware of. One USB port is connected to a KVM switch, enumberating such devices. Here the log from U-Boot and Linux again:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
6 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:

    1  Hub (5 Gb/s, 0mA)
    |  U-Boot XHCI Host Controller
    |
    +-2  Hub (480 Mb/s, 100mA)
    |
    +-3  Mass Storage (480 Mb/s, 98mA)
    |    USBest Technology USB Mass Storage Device 09092207fbf0c4
    |
    +-4  Hub (480 Mb/s, 2mA)
    | |
    | +-6  Mass Storage (480 Mb/s, 200mA)
    |      JetFlash Mass Storage Device 3281440601
    |
    +-5  Vendor specific (5 Gb/s, 64mA)
         Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
      |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class,
Driver=r8152, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
      |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
          |__ Port 4: Dev 4, If 0, Class=Hub, Driver=hub/4p, 12M
              |__ Port 1: Dev 6, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
              |__ Port 1: Dev 6, If 2, Class=Human Interface Device,
Driver=usbhid, 12M
              |__ Port 1: Dev 6, If 0, Class=Human Interface Device,
Driver=usbhid, 12M
      |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage,
480M
      |__ Port 5: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
          |__ Port 1: Dev 7, If 0, Class=Mass Storage,
Driver=usb-storage, 480M
Quoted 2 lines

Which event polling Kconfig option do I need to enable?

The default one CONFIG_SYS_USB_EVENT_POLL should be OK. By comparing your U-Boot log and Linux one, I found the following devices were enumerated by Linux but not by U-Boot:

|__ Port 1: Dev 6, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 1: Dev 6, If 2, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 1: Dev 6, If 0, Class=Human Interface Device,
Driver=usbhid, 12M

Quoted 5 lines

These devices are full speed devices. I believe the reason is that U-Boot encounters "USB device descriptor short read (expected 18, got 8)" so it does not continue the enumeration. As to why these full speed devices only return 8 bytes descriptors, this needs to be investigated. Which devices are they?

This is my KVM switch with its USB keyboard and mouse. When I unplug this USB cable, this message does not appear while running "usb reset".

This also happen, when I only plug a USB mouse to this same USB port:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:

   1  Hub (5 Gb/s, 0mA)
   |  U-Boot XHCI Host Controller
   |
   +-2  Mass Storage (480 Mb/s, 98mA)
   |    USBest Technology USB Mass Storage Device 09092207fbf0c4
   |
   +-3  Hub (480 Mb/s, 2mA)
   | |
   | +-5  Mass Storage (480 Mb/s, 200mA)
   |      JetFlash Mass Storage Device 3281440601
   |
   +-4  Vendor specific (5 Gb/s, 64mA)
        Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
     |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152,
5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
     |__ Port 2: Dev 2, If 0, Class=Human Interface Device,
Driver=usbhid, 12M
     |__ Port 2: Dev 2, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
     |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage,
480M
     |__ Port 5: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
         |__ Port 1: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage,
480M
Quoted 6 lines
Quoted 2 lines

Can you reproduce this on your MinnowMax? Would it help, if I would enable some traces (-DDEBUG)?

I cannot reproduce this on MinnowMax. Is the KVM switch a USB 2.0 or 3.0 hub?

USB 2.0, its a pretty old device. But the example above is without the KVM and only with the USB mouse.

Quoted 2 lines

Is it possible to switch BayTrail SoC to EHCI and do the same testing?

Sure. After disabling CONFIG_USB_XHCI_HC I now get this error:

=> usb reset
resetting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... Divide Error
EIP: 0010:[<7b587862>] EFLAGS: 00010246 Original EIP :[<fff33862>]
EAX: 00000040 EBX: 7b35db00 ECX: 00000380 EDX: 00000000
ESI: 7b33af40 EDI: 7b33aa00 EBP: 7b35a640 ESP: 7b33a990
DS: 0018 ES: 0018 FS: 0020 GS: 0018 SS: 0018
CR0: 00000033 CR2: 00000000 CR3: 00000000 CR4: 00000600
DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
DR6: ffff0ff0 DR7: 00000400

Stack:
    0x7b33a9d0 : 0x7b35dac0
    0x7b33a9cc : 0x7b33af40
    0x7b33a9c8 : 0x00000100
    0x7b33a9c4 : 0x7b33ac80
    0x7b33a9c0 : 0x00000001
    0x7b33a9bc : 0x7b33ac80
    0x7b33a9b8 : 0x7b35a680
    0x7b33a9b4 : 0x00000000
    0x7b33a9b0 : 0x00000040
    0x7b33a9ac : 0x80000080
    0x7b33a9a8 : 0x7b35db00
    0x7b33a9a4 : 0x00000040
    0x7b33a9a0 : 0x00000002
    0x7b33a99c : 0x7b35dac0
    0x7b33a998 : 0x1616cae2
    0x7b33a994 : 0xc8159ec7
--->0x7b33a990 : 0xc1b7c2b0
    0x7b33a98c : 0x00010246
    0x7b33a988 : 0x00000010
    0x7b33a984 : 0x7b587862

### ERROR ### Please RESET the board ###

Quoted 6 lines
Quoted 2 lines

EHCI worked before just fine. Does this (EHCI) work on your MinnoxMax?

I've reproduced the EHCI crash issue. Looks the crash happens in ehci_submit_async(). However my patches did not touch this function. I will debug this.

It turns out this patch breaks EHCI.
http://patchwork.ozlabs.org/patch/779917/

Regards,
Bin

#21 lore raw

cover usb: xhci: Add interrupt transfer support

In reply to Stefan Roese
Quoted 6 lines · On Donnerstag, 29. Juni 2017 08:13:41 CEST Stefan Roese wrote:

Hi Bin,

Quoted 3 lines · Bin Meng

Hi Stefan,

On Wed, Jun 28, 2017 at 8:47 PM, Stefan Roese <[email protected]> wrote:

[...]

Quoted 144 lines
Quoted 87 lines
Quoted 71 lines
Quoted 5 lines

I am more concerned about
the "USB device descriptor short read (expected 18, got 8)". This message indicates U-Boot cannot get the device descriptor during set configuration process. So did you manage to get all USB devices that are connected on your board enumerated?

Might be that I'm missing some keyboard / mouse, which I'm not using and not really aware of. One USB port is connected to a KVM switch, enumberating such devices. Here the log from U-Boot and Linux again:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!? USB device descriptor short read (expected 18, got 8) 6 USB Device(s) found

scanning usb for storage devices... 2 Storage Device(s) found

=> usb tree

USB device tree:

   1  Hub (5 Gb/s, 0mA)
   
   |  U-Boot XHCI Host Controller
   
   +-2  Hub (480 Mb/s, 100mA)
   
   +-3  Mass Storage (480 Mb/s, 98mA)
   
   |    USBest Technology USB Mass Storage Device 09092207fbf0c4
   
   +-4  Hub (480 Mb/s, 2mA)
   
   | +-6  Mass Storage (480 Mb/s, 200mA)
   | 
   |      JetFlash Mass Storage Device 3281440601
   
   +-5  Vendor specific (5 Gb/s, 64mA)
   
        Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
     |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152,
     |5000M

/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M

     |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
     |
         |__ Port 4: Dev 4, If 0, Class=Hub, Driver=hub/4p, 12M
         |
             |__ Port 1: Dev 6, If 1, Class=Human Interface Device,
             |Driver=usbhid, 12M
             |__ Port 1: Dev 6, If 2, Class=Human Interface Device,
             |Driver=usbhid, 12M
             |__ Port 1: Dev 6, If 0, Class=Human Interface Device,
             |Driver=usbhid, 12M
     |
     |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage,
     |480M
     |__ Port 5: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
     |
         |__ Port 1: Dev 7, If 0, Class=Mass Storage, Driver=usb-storage,
         |480M
Quoted 1 line

Which event polling Kconfig option do I need to enable?

The default one CONFIG_SYS_USB_EVENT_POLL should be OK. By comparing your U-Boot log and Linux one, I found the following devices were

enumerated by Linux but not by U-Boot:
|__ Port 1: Dev 6, If 1, Class=Human Interface Device,

Driver=usbhid, 12M

|__ Port 1: Dev 6, If 2, Class=Human Interface Device,

Driver=usbhid, 12M

|__ Port 1: Dev 6, If 0, Class=Human Interface Device,

Quoted 7 lines

Driver=usbhid, 12M

These devices are full speed devices. I believe the reason is that U-Boot encounters "USB device descriptor short read (expected 18, got 8)" so it does not continue the enumeration. As to why these full speed devices only return 8 bytes descriptors, this needs to be investigated. Which devices are they?

This is my KVM switch with its USB keyboard and mouse. When I unplug this USB cable, this message does not appear while running "usb reset".

This also happen, when I only plug a USB mouse to this same USB port:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8) 5 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:
1 Hub (5 Gb/s, 0mA)

| U-Boot XHCI Host Controller

+-2 Mass Storage (480 Mb/s, 98mA)

| USBest Technology USB Mass Storage Device 09092207fbf0c4

+-3 Hub (480 Mb/s, 2mA)

  | +-5  Mass Storage (480 Mb/s, 200mA)
  | 
  |      JetFlash Mass Storage Device 3281440601

+-4 Vendor specific (5 Gb/s, 64mA)

       Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152,
    |5000M

/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M

    |__ Port 2: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid,
    |12M
    |__ Port 2: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid,
    |12M
    |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
    |__ Port 5: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
    |
Quoted 2 lines

|__ Port 1: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, |480M

U-Boot requests the whole USB Device descriptor, i.e. at least 18 bytes. *If* the devices bMaxPacketSize0 is 8, it will only return 8 bytes per IN transfer. If the driver fails to set the packet size according to the devices capabilities, the HC may only do one instead of multiple IN transfers, i.e. you end up with only 8 bytes.

I you look at common/usb.c, usb_setup_descriptor(...), you can see it actually only requests *at least* 8 bytes. You should verify where you descriptor request is coming from. Either it failed to query the bMaxPacketSize0, or it somehow got reset, i.e. later requests are not split into multiple IN transfers.

Kind regards,

Stefan

Signature · 2 lines
Stefan Brüns  /  Bergstraße 21  /  52062 Aachen
home: +49 241 53809034     mobile: +49 151 50412019
author
#22 lore raw

cover usb: xhci: Add interrupt transfer support

Hi Stefan,

Quoted 161 lines · Stefan Bruens
Quoted 6 lines · On Donnerstag, 29. Juni 2017 08:13:41 CEST Stefan Roese wrote:

Hi Bin,

Quoted 3 lines · Bin Meng

Hi Stefan,

On Wed, Jun 28, 2017 at 8:47 PM, Stefan Roese <[email protected]> wrote:

[...]

Quoted 144 lines
Quoted 87 lines
Quoted 71 lines
Quoted 5 lines

I am more concerned about
the "USB device descriptor short read (expected 18, got 8)". This message indicates U-Boot cannot get the device descriptor during set configuration process. So did you manage to get all USB devices that are connected on your board enumerated?

Might be that I'm missing some keyboard / mouse, which I'm not using and not really aware of. One USB port is connected to a KVM switch, enumberating such devices. Here the log from U-Boot and Linux again:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!? USB device descriptor short read (expected 18, got 8) 6 USB Device(s) found

scanning usb for storage devices... 2 Storage Device(s) found

=> usb tree

USB device tree:

   1  Hub (5 Gb/s, 0mA)

   |  U-Boot XHCI Host Controller

   +-2  Hub (480 Mb/s, 100mA)

   +-3  Mass Storage (480 Mb/s, 98mA)

   |    USBest Technology USB Mass Storage Device 09092207fbf0c4

   +-4  Hub (480 Mb/s, 2mA)

   | +-6  Mass Storage (480 Mb/s, 200mA)
   |
   |      JetFlash Mass Storage Device 3281440601

   +-5  Vendor specific (5 Gb/s, 64mA)

        Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
     |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152,
     |5000M

/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M

     |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
     |
         |__ Port 4: Dev 4, If 0, Class=Hub, Driver=hub/4p, 12M
         |
             |__ Port 1: Dev 6, If 1, Class=Human Interface Device,
             |Driver=usbhid, 12M
             |__ Port 1: Dev 6, If 2, Class=Human Interface Device,
             |Driver=usbhid, 12M
             |__ Port 1: Dev 6, If 0, Class=Human Interface Device,
             |Driver=usbhid, 12M
     |
     |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage,
     |480M
     |__ Port 5: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
     |
         |__ Port 1: Dev 7, If 0, Class=Mass Storage, Driver=usb-storage,
         |480M
Quoted 1 line

Which event polling Kconfig option do I need to enable?

The default one CONFIG_SYS_USB_EVENT_POLL should be OK. By comparing your U-Boot log and Linux one, I found the following devices were

enumerated by Linux but not by U-Boot:
|__ Port 1: Dev 6, If 1, Class=Human Interface Device,

Driver=usbhid, 12M

|__ Port 1: Dev 6, If 2, Class=Human Interface Device,

Driver=usbhid, 12M

|__ Port 1: Dev 6, If 0, Class=Human Interface Device,

Quoted 7 lines

Driver=usbhid, 12M

These devices are full speed devices. I believe the reason is that U-Boot encounters "USB device descriptor short read (expected 18, got 8)" so it does not continue the enumeration. As to why these full speed devices only return 8 bytes descriptors, this needs to be investigated. Which devices are they?

This is my KVM switch with its USB keyboard and mouse. When I unplug this USB cable, this message does not appear while running "usb reset".

This also happen, when I only plug a USB mouse to this same USB port:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8) 5 USB Device(s) found
scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:
1 Hub (5 Gb/s, 0mA)

| U-Boot XHCI Host Controller

+-2 Mass Storage (480 Mb/s, 98mA)

| USBest Technology USB Mass Storage Device 09092207fbf0c4

+-3 Hub (480 Mb/s, 2mA)

  | +-5  Mass Storage (480 Mb/s, 200mA)
  |
  |      JetFlash Mass Storage Device 3281440601

+-4 Vendor specific (5 Gb/s, 64mA)

       Realtek USB 10/100/1000 LAN 000002000000
$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152,
    |5000M

/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M

    |__ Port 2: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid,
    |12M
    |__ Port 2: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid,
    |12M
    |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
    |__ Port 5: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
    |
Quoted 2 lines

|__ Port 1: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, |480M

U-Boot requests the whole USB Device descriptor, i.e. at least 18 bytes. *If* the devices bMaxPacketSize0 is 8, it will only return 8 bytes per IN transfer. If the driver fails to set the packet size according to the devices capabilities, the HC may only do one instead of multiple IN transfers, i.e. you end up with only 8 bytes.

Quoted 6 lines

I you look at common/usb.c, usb_setup_descriptor(...), you can see it actually only requests *at least* 8 bytes. You should verify where you descriptor request is coming from. Either it failed to query the bMaxPacketSize0, or it somehow got reset, i.e. later requests are not split into multiple IN transfers.

Thanks for your information. Actually I suspect the same thing here. I noticed the comment block in usb_setup_descriptor() before. Not like other HCs, xHC does things differently (do_read is false in that function).

Regards,
Bin

author
#23 lore raw

cover usb: xhci: Add interrupt transfer support

In reply to Stefan Roese

+Simon

Quoted 138 lines · Stefan Roese

Hi Bin,

Quoted 6 lines · Bin Meng

This series is the final series of the xHCI driver update.

This adds the missing interrupt transfer support to xHCI driver, so that devices like USB keyboard that uses interrupt transfer when CONFIG_SYS_USB_EVENT_POLL is defined can work.

Quoted 7 lines

Previous two series:
[1]: usb: xhci: Fix USB xHCI support on Intel platform
https://lists.denx.de/pipermail/u-boot/2017-June/296166.html
[2]: usb: hub: Support USB 3.0 hubs
https://lists.denx.de/pipermail/u-boot/2017-June/296284.html

This series is available at u-boot-x86/xhci-working3 for testing.

I'm using this git branch to test all your xHCI related patches now. On my BayTrail platform I get these messages upon "usb reset" scanning:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

On the 2nd scan, the "cannot reset port 1" line is gone:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8) 5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

All USB devices seem to be detected correctly though. Here the logs:

=> usb tree
USB device tree:
1 Hub (5 Gb/s, 0mA)
| U-Boot XHCI Host Controller
|

  +-2  Hub (480 Mb/s, 100mA)
  |
  +-3  Hub (480 Mb/s, 2mA)
  | |
  | +-5  Mass Storage (480 Mb/s, 200mA)
  |      JetFlash Mass Storage Device 3281440601
  |
  +-4  Vendor specific (5 Gb/s, 64mA)
       Realtek USB 10/100/1000 LAN 000002000000

=> usb info
1: Hub, USB Revision 3.0
- U-Boot XHCI Host Controller
- Class: Hub
- PacketSize: 512 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Hub, USB Revision 2.0
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0409 Product 0x005a Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Hub, USB Revision 2.1
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0424 Product 0x4604 Version 1.131
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 2mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

5: Mass Storage, USB Revision 2.10
- JetFlash Mass Storage Device 3281440601
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x8564 Product 0x1000 Version 16.117
Configuration: 1
- Interfaces: 1 Bus Powered 200mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 2 Out Bulk MaxPacket 512
- Endpoint 1 In Bulk MaxPacket 512

4: Vendor specific, USB Revision 3.0
- Realtek USB 10/100/1000 LAN 000002000000
- Class: (from Interface) Vendor specific
- PacketSize: 512 Configurations: 2
- Vendor: 0x0bda Product 0x8153 Version 48.0
Configuration: 1
- Interfaces: 1 Bus Powered Remote Wakeup 64mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Vendor specific
- Endpoint 1 In Bulk MaxPacket 1024
- Endpoint 2 Out Bulk MaxPacket 1024
- Endpoint 3 In Interrupt MaxPacket 2 Interval 8ms

Do you have any ideas about the scanning logs that I've noticed above? Would it help if I provided some debug logs (-DDEBUG) for this?

BTW: I need to re-add the SYS_USB_EVENT_POLL* options back to the whilelist file. Otherwise compiling fails with this message:

$ make minnowmax_defconfig
$ make -s -j10
Error: You must add new CONFIG options using Kconfig
The following new ad-hoc CONFIG options were detected:
CONFIG_SYS_USB_EVENT_POLL
Quoted 5 lines

Please add these via Kconfig instead. Find a suitable Kconfig file and add a 'config' or 'menuconfig' option. Makefile:862: recipe for target 'all' failed

Don't you see this error? Any idea whats going wrong here?

Simon,

Do you know why this error was generated? CONFIG_SYS_USB_EVENT_POLL was already a Kconfig option.

Regards,
Bin

author
#24 lore raw

cover usb: xhci: Add interrupt transfer support

Quoted 145 lines · Bin Meng

+Simon

Quoted 142 lines · Stefan Roese

Hi Bin,

Quoted 6 lines · Bin Meng

This series is the final series of the xHCI driver update.

This adds the missing interrupt transfer support to xHCI driver, so that devices like USB keyboard that uses interrupt transfer when CONFIG_SYS_USB_EVENT_POLL is defined can work.

Quoted 7 lines

Previous two series:
[1]: usb: xhci: Fix USB xHCI support on Intel platform
https://lists.denx.de/pipermail/u-boot/2017-June/296166.html
[2]: usb: hub: Support USB 3.0 hubs
https://lists.denx.de/pipermail/u-boot/2017-June/296284.html

This series is available at u-boot-x86/xhci-working3 for testing.

I'm using this git branch to test all your xHCI related patches now. On my BayTrail platform I get these messages upon "usb reset" scanning:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
USB device descriptor short read (expected 18, got 8)
5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

On the 2nd scan, the "cannot reset port 1" line is gone:

=> usb reset
resetting USB...
USB0: Register 7000820 NbrPorts 7
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... USB device descriptor short read (expected 18, got 8) 5 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

All USB devices seem to be detected correctly though. Here the logs:

=> usb tree
USB device tree:
1 Hub (5 Gb/s, 0mA)
| U-Boot XHCI Host Controller
|

  +-2  Hub (480 Mb/s, 100mA)
  |
  +-3  Hub (480 Mb/s, 2mA)
  | |
  | +-5  Mass Storage (480 Mb/s, 200mA)
  |      JetFlash Mass Storage Device 3281440601
  |
  +-4  Vendor specific (5 Gb/s, 64mA)
       Realtek USB 10/100/1000 LAN 000002000000

=> usb info
1: Hub, USB Revision 3.0
- U-Boot XHCI Host Controller
- Class: Hub
- PacketSize: 512 Configurations: 1
- Vendor: 0x0000 Product 0x0000 Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered 0mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 8 Interval 255ms

2: Hub, USB Revision 2.0
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0409 Product 0x005a Version 1.0
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 100mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

3: Hub, USB Revision 2.1
- Class: Hub
- PacketSize: 64 Configurations: 1
- Vendor: 0x0424 Product 0x4604 Version 1.131
Configuration: 1
- Interfaces: 1 Self Powered Remote Wakeup 2mA
Interface: 0
- Alternate Setting 0, Endpoints: 1
- Class Hub
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms
- Endpoint 1 In Interrupt MaxPacket 1 Interval 12ms

5: Mass Storage, USB Revision 2.10
- JetFlash Mass Storage Device 3281440601
- Class: (from Interface) Mass Storage
- PacketSize: 64 Configurations: 1
- Vendor: 0x8564 Product 0x1000 Version 16.117
Configuration: 1
- Interfaces: 1 Bus Powered 200mA
Interface: 0
- Alternate Setting 0, Endpoints: 2
- Class Mass Storage, Transp. SCSI, Bulk only
- Endpoint 2 Out Bulk MaxPacket 512
- Endpoint 1 In Bulk MaxPacket 512

4: Vendor specific, USB Revision 3.0
- Realtek USB 10/100/1000 LAN 000002000000
- Class: (from Interface) Vendor specific
- PacketSize: 512 Configurations: 2
- Vendor: 0x0bda Product 0x8153 Version 48.0
Configuration: 1
- Interfaces: 1 Bus Powered Remote Wakeup 64mA
Interface: 0
- Alternate Setting 0, Endpoints: 3
- Class Vendor specific
- Endpoint 1 In Bulk MaxPacket 1024
- Endpoint 2 Out Bulk MaxPacket 1024
- Endpoint 3 In Interrupt MaxPacket 2 Interval 8ms

Do you have any ideas about the scanning logs that I've noticed above? Would it help if I provided some debug logs (-DDEBUG) for this?

BTW: I need to re-add the SYS_USB_EVENT_POLL* options back to the whilelist file. Otherwise compiling fails with this message:

$ make minnowmax_defconfig
$ make -s -j10
Error: You must add new CONFIG options using Kconfig
The following new ad-hoc CONFIG options were detected:
CONFIG_SYS_USB_EVENT_POLL

Please add these via Kconfig instead. Find a suitable Kconfig file and add a 'config' or 'menuconfig' option. Makefile:862: recipe for target 'all' failed

Quoted 6 lines
Quoted 1 line

Don't you see this error? Any idea whats going wrong here?

Simon,

Do you know why this error was generated? CONFIG_SYS_USB_EVENT_POLL was already a Kconfig option.

I've figured out where the problem is. Will send a patch soon.

Regards,
Bin