All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support
@ 2017-06-26 11:05 Bin Meng
  2017-06-26 11:05 ` [U-Boot] [PATCH 1/3] " Bin Meng
                   ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: Bin Meng @ 2017-06-26 11:05 UTC (permalink / raw)
  To: u-boot

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(-)

-- 
2.9.2

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 1/3] usb: xhci: Add interrupt transfer support
  2017-06-26 11:05 [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support Bin Meng
@ 2017-06-26 11:05 ` Bin Meng
  2017-06-26 11:05 ` [U-Boot] [PATCH 2/3] usb: kbd: kconfig: Set a default polling mechanism for USB keyboard Bin Meng
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 25+ messages in thread
From: Bin Meng @ 2017-06-26 11:05 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 drivers/usb/host/xhci.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index a82502c..c0d0b4a 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -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);
 }
 
 /**
-- 
2.9.2

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 2/3] usb: kbd: kconfig: Set a default polling mechanism for USB keyboard
  2017-06-26 11:05 [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support Bin Meng
  2017-06-26 11:05 ` [U-Boot] [PATCH 1/3] " Bin Meng
@ 2017-06-26 11:05 ` Bin Meng
  2017-06-26 11:05 ` [U-Boot] [PATCH 3/3] usb: configs: Clean up CONFIG_SYS_USB_EVENT_POLL_(xxx) in board configs Bin Meng
  2017-06-28 11:00 ` [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support Stefan Roese
  3 siblings, 0 replies; 25+ messages in thread
From: Bin Meng @ 2017-06-26 11:05 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 drivers/usb/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
index da3ec2f..acbac69 100644
--- a/drivers/usb/Kconfig
+++ b/drivers/usb/Kconfig
@@ -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.
 
-- 
2.9.2

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 3/3] usb: configs: Clean up CONFIG_SYS_USB_EVENT_POLL_(xxx) in board configs
  2017-06-26 11:05 [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support Bin Meng
  2017-06-26 11:05 ` [U-Boot] [PATCH 1/3] " Bin Meng
  2017-06-26 11:05 ` [U-Boot] [PATCH 2/3] usb: kbd: kconfig: Set a default polling mechanism for USB keyboard Bin Meng
@ 2017-06-26 11:05 ` Bin Meng
  2017-07-07  3:57   ` Simon Glass
  2017-07-30 21:01   ` Rask Ingemann Lambertsen
  2017-06-28 11:00 ` [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support Stefan Roese
  3 siblings, 2 replies; 25+ messages in thread
From: Bin Meng @ 2017-06-26 11:05 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>

---

 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(-)

diff --git a/configs/A10-OLinuXino-Lime_defconfig b/configs/A10-OLinuXino-Lime_defconfig
index ec16a44..a809cb8 100644
--- a/configs/A10-OLinuXino-Lime_defconfig
+++ b/configs/A10-OLinuXino-Lime_defconfig
@@ -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
diff --git a/configs/A10s-OLinuXino-M_defconfig b/configs/A10s-OLinuXino-M_defconfig
index af6f5bc..618883c 100644
--- a/configs/A10s-OLinuXino-M_defconfig
+++ b/configs/A10s-OLinuXino-M_defconfig
@@ -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
diff --git a/configs/A13-OLinuXinoM_defconfig b/configs/A13-OLinuXinoM_defconfig
index 530a60e..d8d1040 100644
--- a/configs/A13-OLinuXinoM_defconfig
+++ b/configs/A13-OLinuXinoM_defconfig
@@ -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
diff --git a/configs/A13-OLinuXino_defconfig b/configs/A13-OLinuXino_defconfig
index 15c6879..111df03 100644
--- a/configs/A13-OLinuXino_defconfig
+++ b/configs/A13-OLinuXino_defconfig
@@ -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"
diff --git a/configs/A20-OLinuXino-Lime2_defconfig b/configs/A20-OLinuXino-Lime2_defconfig
index 1f2daa6..81a3997 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -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"
diff --git a/configs/A20-OLinuXino-Lime_defconfig b/configs/A20-OLinuXino-Lime_defconfig
index 7f63d4a..925a8be 100644
--- a/configs/A20-OLinuXino-Lime_defconfig
+++ b/configs/A20-OLinuXino-Lime_defconfig
@@ -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
diff --git a/configs/A20-OLinuXino_MICRO_defconfig b/configs/A20-OLinuXino_MICRO_defconfig
index 89e87e7..a65a9fe 100644
--- a/configs/A20-OLinuXino_MICRO_defconfig
+++ b/configs/A20-OLinuXino_MICRO_defconfig
@@ -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
diff --git a/configs/A20-Olimex-SOM-EVB_defconfig b/configs/A20-Olimex-SOM-EVB_defconfig
index 6c87648..fe1a2b5 100644
--- a/configs/A20-Olimex-SOM-EVB_defconfig
+++ b/configs/A20-Olimex-SOM-EVB_defconfig
@@ -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
diff --git a/configs/A33-OLinuXino_defconfig b/configs/A33-OLinuXino_defconfig
index e959240..fafbeb2 100644
--- a/configs/A33-OLinuXino_defconfig
+++ b/configs/A33-OLinuXino_defconfig
@@ -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
diff --git a/configs/Ainol_AW1_defconfig b/configs/Ainol_AW1_defconfig
index 0e5023a..af2d593 100644
--- a/configs/Ainol_AW1_defconfig
+++ b/configs/Ainol_AW1_defconfig
@@ -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
diff --git a/configs/Ampe_A76_defconfig b/configs/Ampe_A76_defconfig
index f3f599d..03f5139 100644
--- a/configs/Ampe_A76_defconfig
+++ b/configs/Ampe_A76_defconfig
@@ -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
diff --git a/configs/Auxtek-T003_defconfig b/configs/Auxtek-T003_defconfig
index f152414..badfd94 100644
--- a/configs/Auxtek-T003_defconfig
+++ b/configs/Auxtek-T003_defconfig
@@ -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
diff --git a/configs/Auxtek-T004_defconfig b/configs/Auxtek-T004_defconfig
index 3f24a06..48a8344 100644
--- a/configs/Auxtek-T004_defconfig
+++ b/configs/Auxtek-T004_defconfig
@@ -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
diff --git a/configs/Bananapi_M2_Ultra_defconfig b/configs/Bananapi_M2_Ultra_defconfig
index 4332eca..da3eb2b 100644
--- a/configs/Bananapi_M2_Ultra_defconfig
+++ b/configs/Bananapi_M2_Ultra_defconfig
@@ -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
diff --git a/configs/Bananapi_defconfig b/configs/Bananapi_defconfig
index fe75eef..84f7d98 100644
--- a/configs/Bananapi_defconfig
+++ b/configs/Bananapi_defconfig
@@ -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
diff --git a/configs/Bananapro_defconfig b/configs/Bananapro_defconfig
index df65922..dd96b2c 100644
--- a/configs/Bananapro_defconfig
+++ b/configs/Bananapro_defconfig
@@ -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
diff --git a/configs/CHIP_defconfig b/configs/CHIP_defconfig
index 9b9e0b7..ef13091 100644
--- a/configs/CHIP_defconfig
+++ b/configs/CHIP_defconfig
@@ -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"
diff --git a/configs/CHIP_pro_defconfig b/configs/CHIP_pro_defconfig
index 52572bd..8777491 100644
--- a/configs/CHIP_pro_defconfig
+++ b/configs/CHIP_pro_defconfig
@@ -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"
diff --git a/configs/CSQ_CS908_defconfig b/configs/CSQ_CS908_defconfig
index a6fcbf5..348abb5 100644
--- a/configs/CSQ_CS908_defconfig
+++ b/configs/CSQ_CS908_defconfig
@@ -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
diff --git a/configs/Chuwi_V7_CW0825_defconfig b/configs/Chuwi_V7_CW0825_defconfig
index 684213e..7ece4f9 100644
--- a/configs/Chuwi_V7_CW0825_defconfig
+++ b/configs/Chuwi_V7_CW0825_defconfig
@@ -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"
diff --git a/configs/Colombus_defconfig b/configs/Colombus_defconfig
index 1359281..21e87e6 100644
--- a/configs/Colombus_defconfig
+++ b/configs/Colombus_defconfig
@@ -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
diff --git a/configs/Cubieboard2_defconfig b/configs/Cubieboard2_defconfig
index 02c503f..48cb448 100644
--- a/configs/Cubieboard2_defconfig
+++ b/configs/Cubieboard2_defconfig
@@ -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
diff --git a/configs/Cubieboard4_defconfig b/configs/Cubieboard4_defconfig
index 97cef1f..6f9fd2b 100644
--- a/configs/Cubieboard4_defconfig
+++ b/configs/Cubieboard4_defconfig
@@ -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
diff --git a/configs/Cubieboard_defconfig b/configs/Cubieboard_defconfig
index a8e9c98..7c79807 100644
--- a/configs/Cubieboard_defconfig
+++ b/configs/Cubieboard_defconfig
@@ -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
diff --git a/configs/Cubietruck_defconfig b/configs/Cubietruck_defconfig
index f9d56c8..a2ddf8d 100644
--- a/configs/Cubietruck_defconfig
+++ b/configs/Cubietruck_defconfig
@@ -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"
diff --git a/configs/Cubietruck_plus_defconfig b/configs/Cubietruck_plus_defconfig
index 1a59e93..34444ec 100644
--- a/configs/Cubietruck_plus_defconfig
+++ b/configs/Cubietruck_plus_defconfig
@@ -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
diff --git a/configs/Empire_electronix_d709_defconfig b/configs/Empire_electronix_d709_defconfig
index 032056b..f83e33a 100644
--- a/configs/Empire_electronix_d709_defconfig
+++ b/configs/Empire_electronix_d709_defconfig
@@ -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
diff --git a/configs/Empire_electronix_m712_defconfig b/configs/Empire_electronix_m712_defconfig
index 8437da3..5a7bc09 100644
--- a/configs/Empire_electronix_m712_defconfig
+++ b/configs/Empire_electronix_m712_defconfig
@@ -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
diff --git a/configs/Hummingbird_A31_defconfig b/configs/Hummingbird_A31_defconfig
index 6f9b103..45fd4f4 100644
--- a/configs/Hummingbird_A31_defconfig
+++ b/configs/Hummingbird_A31_defconfig
@@ -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
diff --git a/configs/Hyundai_A7HD_defconfig b/configs/Hyundai_A7HD_defconfig
index b7bd437..0808ada 100644
--- a/configs/Hyundai_A7HD_defconfig
+++ b/configs/Hyundai_A7HD_defconfig
@@ -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
diff --git a/configs/Itead_Ibox_A20_defconfig b/configs/Itead_Ibox_A20_defconfig
index 4bae19f..0bd79ce 100644
--- a/configs/Itead_Ibox_A20_defconfig
+++ b/configs/Itead_Ibox_A20_defconfig
@@ -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
diff --git a/configs/Lamobo_R1_defconfig b/configs/Lamobo_R1_defconfig
index cc29d60..3a7318f 100644
--- a/configs/Lamobo_R1_defconfig
+++ b/configs/Lamobo_R1_defconfig
@@ -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
diff --git a/configs/LicheePi_Zero_defconfig b/configs/LicheePi_Zero_defconfig
index 887997b..bd754cb 100644
--- a/configs/LicheePi_Zero_defconfig
+++ b/configs/LicheePi_Zero_defconfig
@@ -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
diff --git a/configs/Linksprite_pcDuino3_Nano_defconfig b/configs/Linksprite_pcDuino3_Nano_defconfig
index 80416cb..94a122a 100644
--- a/configs/Linksprite_pcDuino3_Nano_defconfig
+++ b/configs/Linksprite_pcDuino3_Nano_defconfig
@@ -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
diff --git a/configs/Linksprite_pcDuino3_defconfig b/configs/Linksprite_pcDuino3_defconfig
index b9f89a0..1ec8de2 100644
--- a/configs/Linksprite_pcDuino3_defconfig
+++ b/configs/Linksprite_pcDuino3_defconfig
@@ -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
diff --git a/configs/Linksprite_pcDuino_defconfig b/configs/Linksprite_pcDuino_defconfig
index e33a9c1..06edc5e 100644
--- a/configs/Linksprite_pcDuino_defconfig
+++ b/configs/Linksprite_pcDuino_defconfig
@@ -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
diff --git a/configs/MK808C_defconfig b/configs/MK808C_defconfig
index e4a2dd7..790b161 100644
--- a/configs/MK808C_defconfig
+++ b/configs/MK808C_defconfig
@@ -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
diff --git a/configs/MSI_Primo73_defconfig b/configs/MSI_Primo73_defconfig
index bd4cc03..6f23d87 100644
--- a/configs/MSI_Primo73_defconfig
+++ b/configs/MSI_Primo73_defconfig
@@ -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
diff --git a/configs/MSI_Primo81_defconfig b/configs/MSI_Primo81_defconfig
index 08a7db2..ccdea4a 100644
--- a/configs/MSI_Primo81_defconfig
+++ b/configs/MSI_Primo81_defconfig
@@ -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"
diff --git a/configs/Marsboard_A10_defconfig b/configs/Marsboard_A10_defconfig
index 6b8bd1a..082c825 100644
--- a/configs/Marsboard_A10_defconfig
+++ b/configs/Marsboard_A10_defconfig
@@ -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
diff --git a/configs/Mele_A1000G_quad_defconfig b/configs/Mele_A1000G_quad_defconfig
index 5b1b5f5..d908e33 100644
--- a/configs/Mele_A1000G_quad_defconfig
+++ b/configs/Mele_A1000G_quad_defconfig
@@ -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
diff --git a/configs/Mele_A1000_defconfig b/configs/Mele_A1000_defconfig
index 0442360..466dcf7 100644
--- a/configs/Mele_A1000_defconfig
+++ b/configs/Mele_A1000_defconfig
@@ -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
diff --git a/configs/Mele_I7_defconfig b/configs/Mele_I7_defconfig
index b609697..3c33739 100644
--- a/configs/Mele_I7_defconfig
+++ b/configs/Mele_I7_defconfig
@@ -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
diff --git a/configs/Mele_M3_defconfig b/configs/Mele_M3_defconfig
index 08e8c2d..b500611 100644
--- a/configs/Mele_M3_defconfig
+++ b/configs/Mele_M3_defconfig
@@ -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
diff --git a/configs/Mele_M5_defconfig b/configs/Mele_M5_defconfig
index 4c377e3..83ad132 100644
--- a/configs/Mele_M5_defconfig
+++ b/configs/Mele_M5_defconfig
@@ -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
diff --git a/configs/Mele_M9_defconfig b/configs/Mele_M9_defconfig
index dc7901f..d357566 100644
--- a/configs/Mele_M9_defconfig
+++ b/configs/Mele_M9_defconfig
@@ -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
diff --git a/configs/Merrii_A80_Optimus_defconfig b/configs/Merrii_A80_Optimus_defconfig
index 8bc751c..7bea3e2 100644
--- a/configs/Merrii_A80_Optimus_defconfig
+++ b/configs/Merrii_A80_Optimus_defconfig
@@ -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
diff --git a/configs/Mini-X_defconfig b/configs/Mini-X_defconfig
index 811c941..67ae102 100644
--- a/configs/Mini-X_defconfig
+++ b/configs/Mini-X_defconfig
@@ -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
diff --git a/configs/Nintendo_NES_Classic_Edition_defconfig b/configs/Nintendo_NES_Classic_Edition_defconfig
index 5f91c35..4d88ce6 100644
--- a/configs/Nintendo_NES_Classic_Edition_defconfig
+++ b/configs/Nintendo_NES_Classic_Edition_defconfig
@@ -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"
diff --git a/configs/Orangepi_defconfig b/configs/Orangepi_defconfig
index b8c1ea4..a1108fc 100644
--- a/configs/Orangepi_defconfig
+++ b/configs/Orangepi_defconfig
@@ -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
diff --git a/configs/Orangepi_mini_defconfig b/configs/Orangepi_mini_defconfig
index 19c35ef..ac2c88e 100644
--- a/configs/Orangepi_mini_defconfig
+++ b/configs/Orangepi_mini_defconfig
@@ -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
diff --git a/configs/Sinlinx_SinA31s_defconfig b/configs/Sinlinx_SinA31s_defconfig
index 7f815a3..0cb8c13 100644
--- a/configs/Sinlinx_SinA31s_defconfig
+++ b/configs/Sinlinx_SinA31s_defconfig
@@ -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
diff --git a/configs/Sinlinx_SinA33_defconfig b/configs/Sinlinx_SinA33_defconfig
index d1b5b22..6ba5207 100644
--- a/configs/Sinlinx_SinA33_defconfig
+++ b/configs/Sinlinx_SinA33_defconfig
@@ -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"
diff --git a/configs/Sinovoip_BPI_M2_Plus_defconfig b/configs/Sinovoip_BPI_M2_Plus_defconfig
index 651a2ff..43ae6ca 100644
--- a/configs/Sinovoip_BPI_M2_Plus_defconfig
+++ b/configs/Sinovoip_BPI_M2_Plus_defconfig
@@ -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
diff --git a/configs/Sinovoip_BPI_M2_defconfig b/configs/Sinovoip_BPI_M2_defconfig
index a2cadbc..feec46e 100644
--- a/configs/Sinovoip_BPI_M2_defconfig
+++ b/configs/Sinovoip_BPI_M2_defconfig
@@ -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
diff --git a/configs/Sinovoip_BPI_M3_defconfig b/configs/Sinovoip_BPI_M3_defconfig
index 45eadcb..8392836 100644
--- a/configs/Sinovoip_BPI_M3_defconfig
+++ b/configs/Sinovoip_BPI_M3_defconfig
@@ -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
diff --git a/configs/Sunchip_CX-A99_defconfig b/configs/Sunchip_CX-A99_defconfig
index 0641b1f..2284bd3 100644
--- a/configs/Sunchip_CX-A99_defconfig
+++ b/configs/Sunchip_CX-A99_defconfig
@@ -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
diff --git a/configs/UTOO_P66_defconfig b/configs/UTOO_P66_defconfig
index 99b15ea..dcfd570 100644
--- a/configs/UTOO_P66_defconfig
+++ b/configs/UTOO_P66_defconfig
@@ -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
diff --git a/configs/Wexler_TAB7200_defconfig b/configs/Wexler_TAB7200_defconfig
index f80233a..3f04c39 100644
--- a/configs/Wexler_TAB7200_defconfig
+++ b/configs/Wexler_TAB7200_defconfig
@@ -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
diff --git a/configs/Wits_Pro_A20_DKT_defconfig b/configs/Wits_Pro_A20_DKT_defconfig
index 8658ef6..739355a 100644
--- a/configs/Wits_Pro_A20_DKT_defconfig
+++ b/configs/Wits_Pro_A20_DKT_defconfig
@@ -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
diff --git a/configs/Wobo_i5_defconfig b/configs/Wobo_i5_defconfig
index 90f391f..e1746fb 100644
--- a/configs/Wobo_i5_defconfig
+++ b/configs/Wobo_i5_defconfig
@@ -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
diff --git a/configs/Yones_Toptech_BD1078_defconfig b/configs/Yones_Toptech_BD1078_defconfig
index 9612712..2d57784 100644
--- a/configs/Yones_Toptech_BD1078_defconfig
+++ b/configs/Yones_Toptech_BD1078_defconfig
@@ -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
diff --git a/configs/Yones_Toptech_BS1078_V2_defconfig b/configs/Yones_Toptech_BS1078_V2_defconfig
index 3cbf41e..99481c9 100644
--- a/configs/Yones_Toptech_BS1078_V2_defconfig
+++ b/configs/Yones_Toptech_BS1078_V2_defconfig
@@ -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
diff --git a/configs/ba10_tv_box_defconfig b/configs/ba10_tv_box_defconfig
index ad066fd..083ead5 100644
--- a/configs/ba10_tv_box_defconfig
+++ b/configs/ba10_tv_box_defconfig
@@ -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
diff --git a/configs/bananapi_m64_defconfig b/configs/bananapi_m64_defconfig
index 3908d42..4a08c1e 100644
--- a/configs/bananapi_m64_defconfig
+++ b/configs/bananapi_m64_defconfig
@@ -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
diff --git a/configs/cgtqmx6eval_defconfig b/configs/cgtqmx6eval_defconfig
index 77dd227..814d959 100644
--- a/configs/cgtqmx6eval_defconfig
+++ b/configs/cgtqmx6eval_defconfig
@@ -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
diff --git a/configs/colorfly_e708_q1_defconfig b/configs/colorfly_e708_q1_defconfig
index c0ed30e..9e62d3b 100644
--- a/configs/colorfly_e708_q1_defconfig
+++ b/configs/colorfly_e708_q1_defconfig
@@ -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
diff --git a/configs/difrnce_dit4350_defconfig b/configs/difrnce_dit4350_defconfig
index 629507e..be16346 100644
--- a/configs/difrnce_dit4350_defconfig
+++ b/configs/difrnce_dit4350_defconfig
@@ -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
diff --git a/configs/dms-ba16-1g_defconfig b/configs/dms-ba16-1g_defconfig
index 60db289..4a7ecc1 100644
--- a/configs/dms-ba16-1g_defconfig
+++ b/configs/dms-ba16-1g_defconfig
@@ -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
diff --git a/configs/dms-ba16_defconfig b/configs/dms-ba16_defconfig
index 7a8c268..61f2068 100644
--- a/configs/dms-ba16_defconfig
+++ b/configs/dms-ba16_defconfig
@@ -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
diff --git a/configs/dserve_dsrv9703c_defconfig b/configs/dserve_dsrv9703c_defconfig
index c92fdb1..645bbbc 100644
--- a/configs/dserve_dsrv9703c_defconfig
+++ b/configs/dserve_dsrv9703c_defconfig
@@ -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
diff --git a/configs/ga10h_v1_1_defconfig b/configs/ga10h_v1_1_defconfig
index 8e1c9f7..99ef75b 100644
--- a/configs/ga10h_v1_1_defconfig
+++ b/configs/ga10h_v1_1_defconfig
@@ -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
diff --git a/configs/gt90h_v4_defconfig b/configs/gt90h_v4_defconfig
index 8f6469d..a651fe5 100644
--- a/configs/gt90h_v4_defconfig
+++ b/configs/gt90h_v4_defconfig
@@ -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
diff --git a/configs/gwventana_emmc_defconfig b/configs/gwventana_emmc_defconfig
index a476dc2..4b7f179 100644
--- a/configs/gwventana_emmc_defconfig
+++ b/configs/gwventana_emmc_defconfig
@@ -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
diff --git a/configs/gwventana_gw5904_defconfig b/configs/gwventana_gw5904_defconfig
index bd38e6d..719d1a0 100644
--- a/configs/gwventana_gw5904_defconfig
+++ b/configs/gwventana_gw5904_defconfig
@@ -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
diff --git a/configs/gwventana_nand_defconfig b/configs/gwventana_nand_defconfig
index 296f015..701257f 100644
--- a/configs/gwventana_nand_defconfig
+++ b/configs/gwventana_nand_defconfig
@@ -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
diff --git a/configs/h8_homlet_v2_defconfig b/configs/h8_homlet_v2_defconfig
index 368233a..cd599ad 100644
--- a/configs/h8_homlet_v2_defconfig
+++ b/configs/h8_homlet_v2_defconfig
@@ -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
diff --git a/configs/i12-tvbox_defconfig b/configs/i12-tvbox_defconfig
index 4245491..416d771 100644
--- a/configs/i12-tvbox_defconfig
+++ b/configs/i12-tvbox_defconfig
@@ -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
diff --git a/configs/iNet_3F_defconfig b/configs/iNet_3F_defconfig
index 231b2b9..0c3d226 100644
--- a/configs/iNet_3F_defconfig
+++ b/configs/iNet_3F_defconfig
@@ -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
diff --git a/configs/iNet_3W_defconfig b/configs/iNet_3W_defconfig
index a366abe..5c1dc32 100644
--- a/configs/iNet_3W_defconfig
+++ b/configs/iNet_3W_defconfig
@@ -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
diff --git a/configs/iNet_86VS_defconfig b/configs/iNet_86VS_defconfig
index ed8650b..6beabda 100644
--- a/configs/iNet_86VS_defconfig
+++ b/configs/iNet_86VS_defconfig
@@ -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
diff --git a/configs/iNet_D978_rev2_defconfig b/configs/iNet_D978_rev2_defconfig
index 62e4f1b..907b6cd 100644
--- a/configs/iNet_D978_rev2_defconfig
+++ b/configs/iNet_D978_rev2_defconfig
@@ -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
diff --git a/configs/icnova-a20-swac_defconfig b/configs/icnova-a20-swac_defconfig
index 6f79c58..f0c663d 100644
--- a/configs/icnova-a20-swac_defconfig
+++ b/configs/icnova-a20-swac_defconfig
@@ -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
diff --git a/configs/inet1_defconfig b/configs/inet1_defconfig
index d1bebc2..a8905ae 100644
--- a/configs/inet1_defconfig
+++ b/configs/inet1_defconfig
@@ -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
diff --git a/configs/inet86dz_defconfig b/configs/inet86dz_defconfig
index 7940d97..a596e09 100644
--- a/configs/inet86dz_defconfig
+++ b/configs/inet86dz_defconfig
@@ -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
diff --git a/configs/inet97fv2_defconfig b/configs/inet97fv2_defconfig
index 4f1a7b5..6376f5f 100644
--- a/configs/inet97fv2_defconfig
+++ b/configs/inet97fv2_defconfig
@@ -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
diff --git a/configs/inet98v_rev2_defconfig b/configs/inet98v_rev2_defconfig
index 2afe3be..1b5dc9b 100644
--- a/configs/inet98v_rev2_defconfig
+++ b/configs/inet98v_rev2_defconfig
@@ -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
diff --git a/configs/inet9f_rev03_defconfig b/configs/inet9f_rev03_defconfig
index ae732fa..3265a44 100644
--- a/configs/inet9f_rev03_defconfig
+++ b/configs/inet9f_rev03_defconfig
@@ -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
diff --git a/configs/inet_q972_defconfig b/configs/inet_q972_defconfig
index d436005..1d0fe8f 100644
--- a/configs/inet_q972_defconfig
+++ b/configs/inet_q972_defconfig
@@ -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
diff --git a/configs/jesurun_q5_defconfig b/configs/jesurun_q5_defconfig
index 822d56b..6882144 100644
--- a/configs/jesurun_q5_defconfig
+++ b/configs/jesurun_q5_defconfig
@@ -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
diff --git a/configs/mixtile_loftq_defconfig b/configs/mixtile_loftq_defconfig
index 6264b3a..00f6945 100644
--- a/configs/mixtile_loftq_defconfig
+++ b/configs/mixtile_loftq_defconfig
@@ -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
diff --git a/configs/mk802_a10s_defconfig b/configs/mk802_a10s_defconfig
index 69e9cfd..9b358a4 100644
--- a/configs/mk802_a10s_defconfig
+++ b/configs/mk802_a10s_defconfig
@@ -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
diff --git a/configs/mk802_defconfig b/configs/mk802_defconfig
index da9728a..d806916 100644
--- a/configs/mk802_defconfig
+++ b/configs/mk802_defconfig
@@ -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
diff --git a/configs/mk802ii_defconfig b/configs/mk802ii_defconfig
index c55f1f3..286900d 100644
--- a/configs/mk802ii_defconfig
+++ b/configs/mk802ii_defconfig
@@ -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
diff --git a/configs/mx6qsabrelite_defconfig b/configs/mx6qsabrelite_defconfig
index a542799..69cf5bb 100644
--- a/configs/mx6qsabrelite_defconfig
+++ b/configs/mx6qsabrelite_defconfig
@@ -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
diff --git a/configs/nanopi_m1_defconfig b/configs/nanopi_m1_defconfig
index 498496b..b1fbc4d 100644
--- a/configs/nanopi_m1_defconfig
+++ b/configs/nanopi_m1_defconfig
@@ -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
diff --git a/configs/nanopi_m1_plus_defconfig b/configs/nanopi_m1_plus_defconfig
index d7a908d..abe93f6 100644
--- a/configs/nanopi_m1_plus_defconfig
+++ b/configs/nanopi_m1_plus_defconfig
@@ -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
diff --git a/configs/nanopi_neo2_defconfig b/configs/nanopi_neo2_defconfig
index c0ac100..c7db07a 100644
--- a/configs/nanopi_neo2_defconfig
+++ b/configs/nanopi_neo2_defconfig
@@ -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
diff --git a/configs/nanopi_neo_air_defconfig b/configs/nanopi_neo_air_defconfig
index a73640e..0a3dbae 100644
--- a/configs/nanopi_neo_air_defconfig
+++ b/configs/nanopi_neo_air_defconfig
@@ -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
diff --git a/configs/nanopi_neo_defconfig b/configs/nanopi_neo_defconfig
index 8b55497..cc49aaf 100644
--- a/configs/nanopi_neo_defconfig
+++ b/configs/nanopi_neo_defconfig
@@ -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
diff --git a/configs/nitrogen6dl2g_defconfig b/configs/nitrogen6dl2g_defconfig
index 5744ede..32db5ab 100644
--- a/configs/nitrogen6dl2g_defconfig
+++ b/configs/nitrogen6dl2g_defconfig
@@ -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
diff --git a/configs/nitrogen6dl_defconfig b/configs/nitrogen6dl_defconfig
index dca89ec..4372d4f 100644
--- a/configs/nitrogen6dl_defconfig
+++ b/configs/nitrogen6dl_defconfig
@@ -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
diff --git a/configs/nitrogen6q2g_defconfig b/configs/nitrogen6q2g_defconfig
index a19d093..b747cdd 100644
--- a/configs/nitrogen6q2g_defconfig
+++ b/configs/nitrogen6q2g_defconfig
@@ -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
diff --git a/configs/nitrogen6q_defconfig b/configs/nitrogen6q_defconfig
index edf4b63..cb14c37 100644
--- a/configs/nitrogen6q_defconfig
+++ b/configs/nitrogen6q_defconfig
@@ -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
diff --git a/configs/nitrogen6s1g_defconfig b/configs/nitrogen6s1g_defconfig
index 0f75320..8303c52 100644
--- a/configs/nitrogen6s1g_defconfig
+++ b/configs/nitrogen6s1g_defconfig
@@ -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
diff --git a/configs/nitrogen6s_defconfig b/configs/nitrogen6s_defconfig
index 45a5acb..4d7db06 100644
--- a/configs/nitrogen6s_defconfig
+++ b/configs/nitrogen6s_defconfig
@@ -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
diff --git a/configs/novena_defconfig b/configs/novena_defconfig
index afacea7..fe6cf2f 100644
--- a/configs/novena_defconfig
+++ b/configs/novena_defconfig
@@ -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
diff --git a/configs/orangepi_2_defconfig b/configs/orangepi_2_defconfig
index dffba8c..7c9cc45 100644
--- a/configs/orangepi_2_defconfig
+++ b/configs/orangepi_2_defconfig
@@ -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
diff --git a/configs/orangepi_lite_defconfig b/configs/orangepi_lite_defconfig
index 448a161..04910bd 100644
--- a/configs/orangepi_lite_defconfig
+++ b/configs/orangepi_lite_defconfig
@@ -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
diff --git a/configs/orangepi_one_defconfig b/configs/orangepi_one_defconfig
index 97d0e06..2e5eeee 100644
--- a/configs/orangepi_one_defconfig
+++ b/configs/orangepi_one_defconfig
@@ -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
diff --git a/configs/orangepi_pc2_defconfig b/configs/orangepi_pc2_defconfig
index 5a64ad3..9731e7a 100644
--- a/configs/orangepi_pc2_defconfig
+++ b/configs/orangepi_pc2_defconfig
@@ -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
diff --git a/configs/orangepi_pc_defconfig b/configs/orangepi_pc_defconfig
index af7568f..df834a2 100644
--- a/configs/orangepi_pc_defconfig
+++ b/configs/orangepi_pc_defconfig
@@ -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
diff --git a/configs/orangepi_pc_plus_defconfig b/configs/orangepi_pc_plus_defconfig
index 935e96d..2fd2611 100644
--- a/configs/orangepi_pc_plus_defconfig
+++ b/configs/orangepi_pc_plus_defconfig
@@ -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
diff --git a/configs/orangepi_plus2e_defconfig b/configs/orangepi_plus2e_defconfig
index 3301ca0..89bb059 100644
--- a/configs/orangepi_plus2e_defconfig
+++ b/configs/orangepi_plus2e_defconfig
@@ -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
diff --git a/configs/orangepi_plus_defconfig b/configs/orangepi_plus_defconfig
index 34c5750..b9b4207 100644
--- a/configs/orangepi_plus_defconfig
+++ b/configs/orangepi_plus_defconfig
@@ -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
diff --git a/configs/orangepi_prime_defconfig b/configs/orangepi_prime_defconfig
index dc8d59e..103936d 100644
--- a/configs/orangepi_prime_defconfig
+++ b/configs/orangepi_prime_defconfig
@@ -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
diff --git a/configs/orangepi_win_defconfig b/configs/orangepi_win_defconfig
index 85d8fa4..a3e278f 100644
--- a/configs/orangepi_win_defconfig
+++ b/configs/orangepi_win_defconfig
@@ -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
diff --git a/configs/orangepi_zero_defconfig b/configs/orangepi_zero_defconfig
index c650ce8..934e3d2 100644
--- a/configs/orangepi_zero_defconfig
+++ b/configs/orangepi_zero_defconfig
@@ -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
diff --git a/configs/orangepi_zero_plus2_defconfig b/configs/orangepi_zero_plus2_defconfig
index e3776f6..57c63b9 100644
--- a/configs/orangepi_zero_plus2_defconfig
+++ b/configs/orangepi_zero_plus2_defconfig
@@ -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
diff --git a/configs/parrot_r16_defconfig b/configs/parrot_r16_defconfig
index 76e4e34..0dea72e 100644
--- a/configs/parrot_r16_defconfig
+++ b/configs/parrot_r16_defconfig
@@ -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"
diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig
index a509ca9..d0a957b 100644
--- a/configs/pine64_plus_defconfig
+++ b/configs/pine64_plus_defconfig
@@ -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
diff --git a/configs/polaroid_mid2407pxe03_defconfig b/configs/polaroid_mid2407pxe03_defconfig
index d48a507..da120ed 100644
--- a/configs/polaroid_mid2407pxe03_defconfig
+++ b/configs/polaroid_mid2407pxe03_defconfig
@@ -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
diff --git a/configs/polaroid_mid2809pxe04_defconfig b/configs/polaroid_mid2809pxe04_defconfig
index 72fe096..7b31abc 100644
--- a/configs/polaroid_mid2809pxe04_defconfig
+++ b/configs/polaroid_mid2809pxe04_defconfig
@@ -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
diff --git a/configs/pov_protab2_ips9_defconfig b/configs/pov_protab2_ips9_defconfig
index d4af808..16ac1a6 100644
--- a/configs/pov_protab2_ips9_defconfig
+++ b/configs/pov_protab2_ips9_defconfig
@@ -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
diff --git a/configs/q8_a13_tablet_defconfig b/configs/q8_a13_tablet_defconfig
index 5115739..321c3a6 100644
--- a/configs/q8_a13_tablet_defconfig
+++ b/configs/q8_a13_tablet_defconfig
@@ -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
diff --git a/configs/q8_a23_tablet_800x480_defconfig b/configs/q8_a23_tablet_800x480_defconfig
index 1762fe4..bd95f9b 100644
--- a/configs/q8_a23_tablet_800x480_defconfig
+++ b/configs/q8_a23_tablet_800x480_defconfig
@@ -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
diff --git a/configs/q8_a33_tablet_1024x600_defconfig b/configs/q8_a33_tablet_1024x600_defconfig
index d42b597..51509d3 100644
--- a/configs/q8_a33_tablet_1024x600_defconfig
+++ b/configs/q8_a33_tablet_1024x600_defconfig
@@ -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
diff --git a/configs/q8_a33_tablet_800x480_defconfig b/configs/q8_a33_tablet_800x480_defconfig
index 5b6dfe0..1349269 100644
--- a/configs/q8_a33_tablet_800x480_defconfig
+++ b/configs/q8_a33_tablet_800x480_defconfig
@@ -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
diff --git a/configs/r7-tv-dongle_defconfig b/configs/r7-tv-dongle_defconfig
index 4817e6c..137614c 100644
--- a/configs/r7-tv-dongle_defconfig
+++ b/configs/r7-tv-dongle_defconfig
@@ -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
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index 6a6e774..e880fa7 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -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
diff --git a/configs/sandbox_flattree_defconfig b/configs/sandbox_flattree_defconfig
index c5ef69f..eaf29df 100644
--- a/configs/sandbox_flattree_defconfig
+++ b/configs/sandbox_flattree_defconfig
@@ -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
diff --git a/configs/sandbox_noblk_defconfig b/configs/sandbox_noblk_defconfig
index 747d4b1..e335a2d 100644
--- a/configs/sandbox_noblk_defconfig
+++ b/configs/sandbox_noblk_defconfig
@@ -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
diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig
index 6889206..17dba3f 100644
--- a/configs/sandbox_spl_defconfig
+++ b/configs/sandbox_spl_defconfig
@@ -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
diff --git a/configs/sopine_baseboard_defconfig b/configs/sopine_baseboard_defconfig
index 122bba3..7f1b0bb 100644
--- a/configs/sopine_baseboard_defconfig
+++ b/configs/sopine_baseboard_defconfig
@@ -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
diff --git a/configs/sun8i_a23_evb_defconfig b/configs/sun8i_a23_evb_defconfig
index 49ba431..32254ef 100644
--- a/configs/sun8i_a23_evb_defconfig
+++ b/configs/sun8i_a23_evb_defconfig
@@ -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
diff --git a/configs/sunxi_Gemei_G9_defconfig b/configs/sunxi_Gemei_G9_defconfig
index 903def1..9dbf5d0 100644
--- a/configs/sunxi_Gemei_G9_defconfig
+++ b/configs/sunxi_Gemei_G9_defconfig
@@ -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
diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
index ac8f9c6..7cc2a05 100644
--- a/configs/tbs2910_defconfig
+++ b/configs/tbs2910_defconfig
@@ -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
diff --git a/include/configs/MPC8610HPCD.h b/include/configs/MPC8610HPCD.h
index 2014450..bea3405 100644
--- a/include/configs/MPC8610HPCD.h
+++ b/include/configs/MPC8610HPCD.h
@@ -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
diff --git a/include/configs/MPC8641HPCN.h b/include/configs/MPC8641HPCN.h
index 7ec36eb..02bd482 100644
--- a/include/configs/MPC8641HPCN.h
+++ b/include/configs/MPC8641HPCN.h
@@ -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
diff --git a/include/configs/advantech_dms-ba16.h b/include/configs/advantech_dms-ba16.h
index f320792..fa3b62c 100644
--- a/include/configs/advantech_dms-ba16.h
+++ b/include/configs/advantech_dms-ba16.h
@@ -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
diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h
index eb768b9..aa0b3e0 100644
--- a/include/configs/am3517_crane.h
+++ b/include/configs/am3517_crane.h
@@ -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 */
 
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index 829dd3ec..5ce3467 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -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 */
 
diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
index 8be586b..4d6397b 100644
--- a/include/configs/apalis_imx6.h
+++ b/include/configs/apalis_imx6.h
@@ -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
diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h
index cad1357..2491dda 100644
--- a/include/configs/cgtqmx6eval.h
+++ b/include/configs/cgtqmx6eval.h
@@ -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
 
diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h
index 82812e5..3ea8ec8 100644
--- a/include/configs/colibri_imx6.h
+++ b/include/configs/colibri_imx6.h
@@ -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
diff --git a/include/configs/cyrus.h b/include/configs/cyrus.h
index a23da19..7d55b3f 100644
--- a/include/configs/cyrus.h
+++ b/include/configs/cyrus.h
@@ -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
 
diff --git a/include/configs/ge_bx50v3.h b/include/configs/ge_bx50v3.h
index f60a029..8bcf786 100644
--- a/include/configs/ge_bx50v3.h
+++ b/include/configs/ge_bx50v3.h
@@ -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
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index 2227eea..1fdf1f8 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -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
diff --git a/include/configs/mx6cuboxi.h b/include/configs/mx6cuboxi.h
index bc22f56..fed6f09 100644
--- a/include/configs/mx6cuboxi.h
+++ b/include/configs/mx6cuboxi.h
@@ -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; "		       \
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
index 00b84f7..717e54f 100644
--- a/include/configs/nitrogen6x.h
+++ b/include/configs/nitrogen6x.h
@@ -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
diff --git a/include/configs/novena.h b/include/configs/novena.h
index 1f1bf15..9812606 100644
--- a/include/configs/novena.h
+++ b/include/configs/novena.h
@@ -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
diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index 53bfc13..a2a5a07 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -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 */
 
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
index d715eaa..534e03e 100644
--- a/include/configs/rpi.h
+++ b/include/configs/rpi.h
@@ -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 */
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index ee669cb..da91117 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -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
diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h
index 84ca1c4..f92eec3 100644
--- a/include/configs/tbs2910.h
+++ b/include/configs/tbs2910.h
@@ -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 " \
diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h
index dd72e5b..743be6b 100644
--- a/include/configs/tegra-common-post.h
+++ b/include/configs/tegra-common-post.h
@@ -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 ""
diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h
index 70a559b..11fa1d4 100644
--- a/include/configs/x86-common.h
+++ b/include/configs/x86-common.h
@@ -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
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index f7c8814..4545c31 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -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
-- 
2.9.2

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support
  2017-06-26 11:05 [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support Bin Meng
                   ` (2 preceding siblings ...)
  2017-06-26 11:05 ` [U-Boot] [PATCH 3/3] usb: configs: Clean up CONFIG_SYS_USB_EVENT_POLL_(xxx) in board configs Bin Meng
@ 2017-06-28 11:00 ` Stefan Roese
  2017-06-28 12:11   ` Bin Meng
  2017-06-28 22:52   ` Bin Meng
  3 siblings, 2 replies; 25+ messages in thread
From: Stefan Roese @ 2017-06-28 11:00 UTC (permalink / raw)
  To: u-boot

Hi Bin,

On 26.06.2017 13:05, Bin Meng wrote:
> 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.

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support
  2017-06-28 11:00 ` [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support Stefan Roese
@ 2017-06-28 12:11   ` Bin Meng
  2017-06-28 12:47     ` Stefan Roese
  2017-06-28 22:52   ` Bin Meng
  1 sibling, 1 reply; 25+ messages in thread
From: Bin Meng @ 2017-06-28 12:11 UTC (permalink / raw)
  To: u-boot

Hi Stefan,

On Wed, Jun 28, 2017 at 7:00 PM, Stefan Roese <sr@denx.de> wrote:
> Hi Bin,
>
> On 26.06.2017 13:05, Bin Meng wrote:
>> 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.
>
> 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?

"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?

>
> 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?

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support
  2017-06-28 12:11   ` Bin Meng
@ 2017-06-28 12:47     ` Stefan Roese
  2017-06-29  5:39       ` Bin Meng
  0 siblings, 1 reply; 25+ messages in thread
From: Stefan Roese @ 2017-06-28 12:47 UTC (permalink / raw)
  To: u-boot

Hi Bin,

On 28.06.2017 14:11, Bin Meng wrote:
> On Wed, Jun 28, 2017 at 7:00 PM, Stefan Roese <sr@denx.de> wrote:
>> Hi Bin,
>>
>> On 26.06.2017 13:05, Bin Meng wrote:
>>> 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.
>>
>> 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?
> 
> "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.

> 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?
 
>>
>> 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?
> 
> 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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support
  2017-06-28 11:00 ` [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support Stefan Roese
  2017-06-28 12:11   ` Bin Meng
@ 2017-06-28 22:52   ` Bin Meng
  2017-06-29  2:38     ` Bin Meng
  1 sibling, 1 reply; 25+ messages in thread
From: Bin Meng @ 2017-06-28 22:52 UTC (permalink / raw)
  To: u-boot

+Simon

On Wed, Jun 28, 2017 at 7:00 PM, Stefan Roese <sr@denx.de> wrote:
> Hi Bin,
>
> On 26.06.2017 13:05, Bin Meng wrote:
>> 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.
>
> 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?

Simon,

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

Regards,
Bin

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support
  2017-06-28 22:52   ` Bin Meng
@ 2017-06-29  2:38     ` Bin Meng
  0 siblings, 0 replies; 25+ messages in thread
From: Bin Meng @ 2017-06-29  2:38 UTC (permalink / raw)
  To: u-boot

On Thu, Jun 29, 2017 at 6:52 AM, Bin Meng <bmeng.cn@gmail.com> wrote:
> +Simon
>
> On Wed, Jun 28, 2017 at 7:00 PM, Stefan Roese <sr@denx.de> wrote:
>> Hi Bin,
>>
>> On 26.06.2017 13:05, Bin Meng wrote:
>>> 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.
>>
>> 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?
>
> 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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support
  2017-06-28 12:47     ` Stefan Roese
@ 2017-06-29  5:39       ` Bin Meng
  2017-06-29  6:13         ` Stefan Roese
  0 siblings, 1 reply; 25+ messages in thread
From: Bin Meng @ 2017-06-29  5:39 UTC (permalink / raw)
  To: u-boot

Hi Stefan,

On Wed, Jun 28, 2017 at 8:47 PM, Stefan Roese <sr@denx.de> wrote:
> Hi Bin,
>
> On 28.06.2017 14:11, Bin Meng wrote:
>> On Wed, Jun 28, 2017 at 7:00 PM, Stefan Roese <sr@denx.de> wrote:
>>> Hi Bin,
>>>
>>> On 26.06.2017 13:05, Bin Meng wrote:
>>>> 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.
>>>
>>> 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?
>>
>> "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.
>
>> 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?
>

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support
  2017-06-29  5:39       ` Bin Meng
@ 2017-06-29  6:13         ` Stefan Roese
  2017-06-29  6:51           ` Bin Meng
  2017-06-29  9:12           ` Stefan Bruens
  0 siblings, 2 replies; 25+ messages in thread
From: Stefan Roese @ 2017-06-29  6:13 UTC (permalink / raw)
  To: u-boot

Hi Bin,

On 29.06.2017 07:39, Bin Meng wrote:
> Hi Stefan,
> 
> On Wed, Jun 28, 2017 at 8:47 PM, Stefan Roese <sr@denx.de> wrote:
>> Hi Bin,
>>
>> On 28.06.2017 14:11, Bin Meng wrote:
>>> On Wed, Jun 28, 2017 at 7:00 PM, Stefan Roese <sr@denx.de> wrote:
>>>> Hi Bin,
>>>>
>>>> On 26.06.2017 13:05, Bin Meng wrote:
>>>>> 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.
>>>>
>>>> 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?
>>>
>>> "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.
>>
>>> 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?
>>
> 
> 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?

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support
  2017-06-29  6:13         ` Stefan Roese
@ 2017-06-29  6:51           ` Bin Meng
  2017-06-29  8:09             ` Stefan Roese
  2017-06-29  9:12           ` Stefan Bruens
  1 sibling, 1 reply; 25+ messages in thread
From: Bin Meng @ 2017-06-29  6:51 UTC (permalink / raw)
  To: u-boot

Hi Stefan,

On Thu, Jun 29, 2017 at 2:13 PM, Stefan Roese <sr@denx.de> wrote:
> Hi Bin,
>
> On 29.06.2017 07:39, Bin Meng wrote:
>> Hi Stefan,
>>
>> On Wed, Jun 28, 2017 at 8:47 PM, Stefan Roese <sr@denx.de> wrote:
>>> Hi Bin,
>>>
>>> On 28.06.2017 14:11, Bin Meng wrote:
>>>> On Wed, Jun 28, 2017 at 7:00 PM, Stefan Roese <sr@denx.de> wrote:
>>>>> Hi Bin,
>>>>>
>>>>> On 26.06.2017 13:05, Bin Meng wrote:
>>>>>> 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.
>>>>>
>>>>> 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?
>>>>
>>>> "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.
>>>
>>>> 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?
>>>
>>
>> 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?
>
> 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)?

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support
  2017-06-29  6:51           ` Bin Meng
@ 2017-06-29  8:09             ` Stefan Roese
  2017-06-29  8:20               ` Stefan Roese
  2017-06-29  8:57               ` Bin Meng
  0 siblings, 2 replies; 25+ messages in thread
From: Stefan Roese @ 2017-06-29  8:09 UTC (permalink / raw)
  To: u-boot

Hi Bin,

On 29.06.2017 08:51, Bin Meng wrote:
> Hi Stefan,
> 
> On Thu, Jun 29, 2017 at 2:13 PM, Stefan Roese <sr@denx.de> wrote:
>> Hi Bin,
>>
>> On 29.06.2017 07:39, Bin Meng wrote:
>>> Hi Stefan,
>>>
>>> On Wed, Jun 28, 2017 at 8:47 PM, Stefan Roese <sr@denx.de> wrote:
>>>> Hi Bin,
>>>>
>>>> On 28.06.2017 14:11, Bin Meng wrote:
>>>>> On Wed, Jun 28, 2017 at 7:00 PM, Stefan Roese <sr@denx.de> wrote:
>>>>>> Hi Bin,
>>>>>>
>>>>>> On 26.06.2017 13:05, Bin Meng wrote:
>>>>>>> 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.
>>>>>>
>>>>>> 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?
>>>>>
>>>>> "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.
>>>>
>>>>> 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?
>>>>
>>>
>>> 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?
>>
>> 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)?
> 
> 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.

> 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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support
  2017-06-29  8:09             ` Stefan Roese
@ 2017-06-29  8:20               ` Stefan Roese
  2017-06-29  9:01                 ` Bin Meng
  2017-06-29  8:57               ` Bin Meng
  1 sibling, 1 reply; 25+ messages in thread
From: Stefan Roese @ 2017-06-29  8:20 UTC (permalink / raw)
  To: u-boot

Hi Bin,

On 29.06.2017 10:09, Stefan Roese wrote:
> Hi Bin,
> 
> On 29.06.2017 08:51, Bin Meng wrote:
>> Hi Stefan,
>>
>> On Thu, Jun 29, 2017 at 2:13 PM, Stefan Roese <sr@denx.de> wrote:
>>> Hi Bin,
>>>
>>> On 29.06.2017 07:39, Bin Meng wrote:
>>>> Hi Stefan,
>>>>
>>>> On Wed, Jun 28, 2017 at 8:47 PM, Stefan Roese <sr@denx.de> wrote:
>>>>> Hi Bin,
>>>>>
>>>>> On 28.06.2017 14:11, Bin Meng wrote:
>>>>>> On Wed, Jun 28, 2017 at 7:00 PM, Stefan Roese <sr@denx.de> wrote:
>>>>>>> Hi Bin,
>>>>>>>
>>>>>>> On 26.06.2017 13:05, Bin Meng wrote:
>>>>>>>> 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.
>>>>>>>
>>>>>>> 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?
>>>>>>
>>>>>> "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.
>>>>>
>>>>>> 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?
>>>>>
>>>>
>>>> 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?
>>>
>>> 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)?
>>
>> 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.
> 
>> 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?

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support
  2017-06-29  8:09             ` Stefan Roese
  2017-06-29  8:20               ` Stefan Roese
@ 2017-06-29  8:57               ` Bin Meng
  2017-06-29  9:54                 ` Bin Meng
  1 sibling, 1 reply; 25+ messages in thread
From: Bin Meng @ 2017-06-29  8:57 UTC (permalink / raw)
  To: u-boot

Hi Stefan,

On Thu, Jun 29, 2017 at 4:09 PM, Stefan Roese <sr@denx.de> wrote:
> Hi Bin,
>
>
> On 29.06.2017 08:51, Bin Meng wrote:
>>
>> Hi Stefan,
>>
>> On Thu, Jun 29, 2017 at 2:13 PM, Stefan Roese <sr@denx.de> wrote:
>>>
>>> Hi Bin,
>>>
>>> On 29.06.2017 07:39, Bin Meng wrote:
>>>>
>>>> Hi Stefan,
>>>>
>>>> On Wed, Jun 28, 2017 at 8:47 PM, Stefan Roese <sr@denx.de> wrote:
>>>>>
>>>>> Hi Bin,
>>>>>
>>>>> On 28.06.2017 14:11, Bin Meng wrote:
>>>>>>
>>>>>> On Wed, Jun 28, 2017 at 7:00 PM, Stefan Roese <sr@denx.de> wrote:
>>>>>>>
>>>>>>> Hi Bin,
>>>>>>>
>>>>>>> On 26.06.2017 13:05, Bin Meng wrote:
>>>>>>>>
>>>>>>>> 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.
>>>>>>>
>>>>>>>
>>>>>>> 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?
>>>>>>
>>>>>>
>>>>>> "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.
>>>>>
>>>>>> 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?
>>>>>
>>>>
>>>> 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?
>>>
>>>
>>> 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)?
>>
>>
>> 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.
>
>> 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?

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support
  2017-06-29  8:20               ` Stefan Roese
@ 2017-06-29  9:01                 ` Bin Meng
  2017-06-29  9:03                   ` Stefan Roese
  0 siblings, 1 reply; 25+ messages in thread
From: Bin Meng @ 2017-06-29  9:01 UTC (permalink / raw)
  To: u-boot

Hi Stefan,

On Thu, Jun 29, 2017 at 4:20 PM, Stefan Roese <sr@denx.de> wrote:
> Hi Bin,
>
>
> On 29.06.2017 10:09, Stefan Roese wrote:
>>
>> Hi Bin,
>>
>> On 29.06.2017 08:51, Bin Meng wrote:
>>>
>>> Hi Stefan,
>>>
>>> On Thu, Jun 29, 2017 at 2:13 PM, Stefan Roese <sr@denx.de> wrote:
>>>>
>>>> Hi Bin,
>>>>
>>>> On 29.06.2017 07:39, Bin Meng wrote:
>>>>>
>>>>> Hi Stefan,
>>>>>
>>>>> On Wed, Jun 28, 2017 at 8:47 PM, Stefan Roese <sr@denx.de> wrote:
>>>>>>
>>>>>> Hi Bin,
>>>>>>
>>>>>> On 28.06.2017 14:11, Bin Meng wrote:
>>>>>>>
>>>>>>> On Wed, Jun 28, 2017 at 7:00 PM, Stefan Roese <sr@denx.de> wrote:
>>>>>>>>
>>>>>>>> Hi Bin,
>>>>>>>>
>>>>>>>> On 26.06.2017 13:05, Bin Meng wrote:
>>>>>>>>>
>>>>>>>>> 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.
>>>>>>>>
>>>>>>>>
>>>>>>>> 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?
>>>>>>>
>>>>>>>
>>>>>>> "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.
>>>>>>
>>>>>>> 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?
>>>>>>
>>>>>
>>>>> 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?
>>>>
>>>>
>>>> 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)?
>>>
>>>
>>> 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.
>>
>>> 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?
>
>
> 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
>

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support
  2017-06-29  9:01                 ` Bin Meng
@ 2017-06-29  9:03                   ` Stefan Roese
  0 siblings, 0 replies; 25+ messages in thread
From: Stefan Roese @ 2017-06-29  9:03 UTC (permalink / raw)
  To: u-boot

Hi Bin,

On 29.06.2017 11:01, Bin Meng wrote:
> Hi Stefan,
> 
> On Thu, Jun 29, 2017 at 4:20 PM, Stefan Roese <sr@denx.de> wrote:
>> Hi Bin,
>>
>>
>> On 29.06.2017 10:09, Stefan Roese wrote:
>>>
>>> Hi Bin,
>>>
>>> On 29.06.2017 08:51, Bin Meng wrote:
>>>>
>>>> Hi Stefan,
>>>>
>>>> On Thu, Jun 29, 2017 at 2:13 PM, Stefan Roese <sr@denx.de> wrote:
>>>>>
>>>>> Hi Bin,
>>>>>
>>>>> On 29.06.2017 07:39, Bin Meng wrote:
>>>>>>
>>>>>> Hi Stefan,
>>>>>>
>>>>>> On Wed, Jun 28, 2017 at 8:47 PM, Stefan Roese <sr@denx.de> wrote:
>>>>>>>
>>>>>>> Hi Bin,
>>>>>>>
>>>>>>> On 28.06.2017 14:11, Bin Meng wrote:
>>>>>>>>
>>>>>>>> On Wed, Jun 28, 2017 at 7:00 PM, Stefan Roese <sr@denx.de> wrote:
>>>>>>>>>
>>>>>>>>> Hi Bin,
>>>>>>>>>
>>>>>>>>> On 26.06.2017 13:05, Bin Meng wrote:
>>>>>>>>>>
>>>>>>>>>> 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.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 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?
>>>>>>>>
>>>>>>>>
>>>>>>>> "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.
>>>>>>>
>>>>>>>> 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?
>>>>>>>
>>>>>>
>>>>>> 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?
>>>>>
>>>>>
>>>>> 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)?
>>>>
>>>>
>>>> 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.
>>>
>>>> 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?
>>
>>
>> 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
>>
> 
> 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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support
  2017-06-29  6:13         ` Stefan Roese
  2017-06-29  6:51           ` Bin Meng
@ 2017-06-29  9:12           ` Stefan Bruens
  2017-06-29  9:16             ` Bin Meng
  1 sibling, 1 reply; 25+ messages in thread
From: Stefan Bruens @ 2017-06-29  9:12 UTC (permalink / raw)
  To: u-boot

On Donnerstag, 29. Juni 2017 08:13:41 CEST Stefan Roese wrote:
> Hi Bin,
> 
> On 29.06.2017 07:39, Bin Meng wrote:
> > Hi Stefan,
> > 
> > On Wed, Jun 28, 2017 at 8:47 PM, Stefan Roese <sr@denx.de> wrote:
[...]
> >>> 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?
> > 
> > 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?
> 
> 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

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

-- 
Stefan Brüns  /  Bergstraße 21  /  52062 Aachen
home: +49 241 53809034     mobile: +49 151 50412019

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support
  2017-06-29  9:12           ` Stefan Bruens
@ 2017-06-29  9:16             ` Bin Meng
  0 siblings, 0 replies; 25+ messages in thread
From: Bin Meng @ 2017-06-29  9:16 UTC (permalink / raw)
  To: u-boot

Hi Stefan,

On Thu, Jun 29, 2017 at 5:12 PM, Stefan Bruens
<stefan.bruens@rwth-aachen.de> wrote:
> On Donnerstag, 29. Juni 2017 08:13:41 CEST Stefan Roese wrote:
>> Hi Bin,
>>
>> On 29.06.2017 07:39, Bin Meng wrote:
>> > Hi Stefan,
>> >
>> > On Wed, Jun 28, 2017 at 8:47 PM, Stefan Roese <sr@denx.de> wrote:
> [...]
>> >>> 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?
>> >
>> > 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?
>>
>> 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
>
> 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.
>

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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support
  2017-06-29  8:57               ` Bin Meng
@ 2017-06-29  9:54                 ` Bin Meng
  0 siblings, 0 replies; 25+ messages in thread
From: Bin Meng @ 2017-06-29  9:54 UTC (permalink / raw)
  To: u-boot

Hi Stefan,

On Thu, Jun 29, 2017 at 4:57 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Stefan,
>
> On Thu, Jun 29, 2017 at 4:09 PM, Stefan Roese <sr@denx.de> wrote:
>> Hi Bin,
>>
>>
>> On 29.06.2017 08:51, Bin Meng wrote:
>>>
>>> Hi Stefan,
>>>
>>> On Thu, Jun 29, 2017 at 2:13 PM, Stefan Roese <sr@denx.de> wrote:
>>>>
>>>> Hi Bin,
>>>>
>>>> On 29.06.2017 07:39, Bin Meng wrote:
>>>>>
>>>>> Hi Stefan,
>>>>>
>>>>> On Wed, Jun 28, 2017 at 8:47 PM, Stefan Roese <sr@denx.de> wrote:
>>>>>>
>>>>>> Hi Bin,
>>>>>>
>>>>>> On 28.06.2017 14:11, Bin Meng wrote:
>>>>>>>
>>>>>>> On Wed, Jun 28, 2017 at 7:00 PM, Stefan Roese <sr@denx.de> wrote:
>>>>>>>>
>>>>>>>> Hi Bin,
>>>>>>>>
>>>>>>>> On 26.06.2017 13:05, Bin Meng wrote:
>>>>>>>>>
>>>>>>>>> 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.
>>>>>>>>
>>>>>>>>
>>>>>>>> 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?
>>>>>>>
>>>>>>>
>>>>>>> "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.
>>>>>>
>>>>>>> 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?
>>>>>>
>>>>>
>>>>> 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?
>>>>
>>>>
>>>> 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)?
>>>
>>>
>>> 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.
>>
>>> 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?
>
> 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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 3/3] usb: configs: Clean up CONFIG_SYS_USB_EVENT_POLL_(xxx) in board configs
  2017-06-26 11:05 ` [U-Boot] [PATCH 3/3] usb: configs: Clean up CONFIG_SYS_USB_EVENT_POLL_(xxx) in board configs Bin Meng
@ 2017-07-07  3:57   ` Simon Glass
  2017-07-30 21:01   ` Rask Ingemann Lambertsen
  1 sibling, 0 replies; 25+ messages in thread
From: Simon Glass @ 2017-07-07  3:57 UTC (permalink / raw)
  To: u-boot

On 26 June 2017 at 05:05, Bin Meng <bmeng.cn@gmail.com> wrote:
> 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.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>
> ---
>

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 3/3] usb: configs: Clean up CONFIG_SYS_USB_EVENT_POLL_(xxx) in board configs
  2017-06-26 11:05 ` [U-Boot] [PATCH 3/3] usb: configs: Clean up CONFIG_SYS_USB_EVENT_POLL_(xxx) in board configs Bin Meng
  2017-07-07  3:57   ` Simon Glass
@ 2017-07-30 21:01   ` Rask Ingemann Lambertsen
  2017-07-30 22:30     ` Bin Meng
  1 sibling, 1 reply; 25+ messages in thread
From: Rask Ingemann Lambertsen @ 2017-07-30 21:01 UTC (permalink / raw)
  To: u-boot

On Mon, Jun 26, 2017 at 04:05:41AM -0700, Bin Meng wrote:
> 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.
> 
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
[snip]
> diff --git a/configs/Sunchip_CX-A99_defconfig b/configs/Sunchip_CX-A99_defconfig
> index 0641b1f..2284bd3 100644
> --- a/configs/Sunchip_CX-A99_defconfig
> +++ b/configs/Sunchip_CX-A99_defconfig
> @@ -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]
> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> index ee669cb..da91117 100644
> --- a/include/configs/sunxi-common.h
> +++ b/include/configs/sunxi-common.h
> @@ -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):

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index dce4105561..ab4837bd14 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -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.

-- 
Rask Ingemann Lambertsen

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 3/3] usb: configs: Clean up CONFIG_SYS_USB_EVENT_POLL_(xxx) in board configs
  2017-07-30 21:01   ` Rask Ingemann Lambertsen
@ 2017-07-30 22:30     ` Bin Meng
  2017-07-30 23:03       ` Marek Vasut
  0 siblings, 1 reply; 25+ messages in thread
From: Bin Meng @ 2017-07-30 22:30 UTC (permalink / raw)
  To: u-boot

On Mon, Jul 31, 2017 at 5:01 AM, Rask Ingemann Lambertsen
<rask@formelder.dk> wrote:
> On Mon, Jun 26, 2017 at 04:05:41AM -0700, Bin Meng wrote:
>> 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.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> [snip]
>> diff --git a/configs/Sunchip_CX-A99_defconfig b/configs/Sunchip_CX-A99_defconfig
>> index 0641b1f..2284bd3 100644
>> --- a/configs/Sunchip_CX-A99_defconfig
>> +++ b/configs/Sunchip_CX-A99_defconfig
>> @@ -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]
>> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
>> index ee669cb..da91117 100644
>> --- a/include/configs/sunxi-common.h
>> +++ b/include/configs/sunxi-common.h
>> @@ -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):
>

Makes sense.

Regards,
Bin

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 3/3] usb: configs: Clean up CONFIG_SYS_USB_EVENT_POLL_(xxx) in board configs
  2017-07-30 22:30     ` Bin Meng
@ 2017-07-30 23:03       ` Marek Vasut
  2017-07-30 23:42         ` Bin Meng
  0 siblings, 1 reply; 25+ messages in thread
From: Marek Vasut @ 2017-07-30 23:03 UTC (permalink / raw)
  To: u-boot

On 07/31/2017 12:30 AM, Bin Meng wrote:
> On Mon, Jul 31, 2017 at 5:01 AM, Rask Ingemann Lambertsen
> <rask@formelder.dk> wrote:
>> On Mon, Jun 26, 2017 at 04:05:41AM -0700, Bin Meng wrote:
>>> 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.
>>>
>>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> [snip]
>>> diff --git a/configs/Sunchip_CX-A99_defconfig b/configs/Sunchip_CX-A99_defconfig
>>> index 0641b1f..2284bd3 100644
>>> --- a/configs/Sunchip_CX-A99_defconfig
>>> +++ b/configs/Sunchip_CX-A99_defconfig
>>> @@ -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]
>>> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
>>> index ee669cb..da91117 100644
>>> --- a/include/configs/sunxi-common.h
>>> +++ b/include/configs/sunxi-common.h
>>> @@ -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):
>>
> 
> 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.

-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [U-Boot] [PATCH 3/3] usb: configs: Clean up CONFIG_SYS_USB_EVENT_POLL_(xxx) in board configs
  2017-07-30 23:03       ` Marek Vasut
@ 2017-07-30 23:42         ` Bin Meng
  0 siblings, 0 replies; 25+ messages in thread
From: Bin Meng @ 2017-07-30 23:42 UTC (permalink / raw)
  To: u-boot

On Mon, Jul 31, 2017 at 7:03 AM, Marek Vasut <marex@denx.de> wrote:
> On 07/31/2017 12:30 AM, Bin Meng wrote:
>> On Mon, Jul 31, 2017 at 5:01 AM, Rask Ingemann Lambertsen
>> <rask@formelder.dk> wrote:
>>> On Mon, Jun 26, 2017 at 04:05:41AM -0700, Bin Meng wrote:
>>>> 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.
>>>>
>>>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>>> [snip]
>>>> diff --git a/configs/Sunchip_CX-A99_defconfig b/configs/Sunchip_CX-A99_defconfig
>>>> index 0641b1f..2284bd3 100644
>>>> --- a/configs/Sunchip_CX-A99_defconfig
>>>> +++ b/configs/Sunchip_CX-A99_defconfig
>>>> @@ -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]
>>>> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
>>>> index ee669cb..da91117 100644
>>>> --- a/include/configs/sunxi-common.h
>>>> +++ b/include/configs/sunxi-common.h
>>>> @@ -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):
>>>
>>
>> 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

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2017-07-30 23:42 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-26 11:05 [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support Bin Meng
2017-06-26 11:05 ` [U-Boot] [PATCH 1/3] " Bin Meng
2017-06-26 11:05 ` [U-Boot] [PATCH 2/3] usb: kbd: kconfig: Set a default polling mechanism for USB keyboard Bin Meng
2017-06-26 11:05 ` [U-Boot] [PATCH 3/3] usb: configs: Clean up CONFIG_SYS_USB_EVENT_POLL_(xxx) in board configs Bin Meng
2017-07-07  3:57   ` Simon Glass
2017-07-30 21:01   ` Rask Ingemann Lambertsen
2017-07-30 22:30     ` Bin Meng
2017-07-30 23:03       ` Marek Vasut
2017-07-30 23:42         ` Bin Meng
2017-06-28 11:00 ` [U-Boot] [PATCH 0/3] usb: xhci: Add interrupt transfer support Stefan Roese
2017-06-28 12:11   ` Bin Meng
2017-06-28 12:47     ` Stefan Roese
2017-06-29  5:39       ` Bin Meng
2017-06-29  6:13         ` Stefan Roese
2017-06-29  6:51           ` Bin Meng
2017-06-29  8:09             ` Stefan Roese
2017-06-29  8:20               ` Stefan Roese
2017-06-29  9:01                 ` Bin Meng
2017-06-29  9:03                   ` Stefan Roese
2017-06-29  8:57               ` Bin Meng
2017-06-29  9:54                 ` Bin Meng
2017-06-29  9:12           ` Stefan Bruens
2017-06-29  9:16             ` Bin Meng
2017-06-28 22:52   ` Bin Meng
2017-06-29  2:38     ` Bin Meng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.