Prior to DM, we could not enable different types of USB controllers
at the same time.  DM was supposed to loosen the limitation.  We can
compile drivers, but not working.

For example, if EHCI is enabled, xHCI fails as follows:

  => usb read 82000000 0 2000

  USB read: device 0 block # 0, count 8192 ... WARN halted endpoint, queueing 
URB anyway.
  Unexpected XHCI event TRB, skipping... (3fb54010 00000001 13000000 01008401)
  BUG: failure at drivers/usb/host/xhci-ring.c:489/abort_td()!
  BUG!
  ### ERROR ### Please RESET the board ###

The cause of the error seems #ifdef CONFIG_USB_EHCI_HCD in
common/usb_storage.c

To fix the problem, align USB_MAX_XFER_BLK to the lowest common
denominator if CONFIG_DM is defined.

Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com>
---

 common/usb_storage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/usb_storage.c b/common/usb_storage.c
index df0b05730879..fa0cf68c3353 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -100,7 +100,7 @@ struct us_data {
        trans_cmnd      transport;              /* transport routine */
 };
 
-#ifdef CONFIG_USB_EHCI_HCD
+#if !defined(CONFIG_DM_USB) && defined(CONFIG_USB_EHCI_HCD)
 /*
  * The U-Boot EHCI driver can handle any transfer length as long as there is
  * enough free heap space left, but the SCSI READ(10) and WRITE(10) commands 
are
-- 
2.7.4

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to