<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 6, 2017 at 4:46 PM, Kevin O'Connor <span dir="ltr"><<a href="mailto:kevin@koconnor.net" target="_blank">kevin@koconnor.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Jan 06, 2017 at 09:22:46AM +0200, Евгени Димитров wrote:<br>
> On Thu, Jan 5, 2017 at 6:29 PM, Kevin O'Connor <<a href="mailto:kevin@koconnor.net">kevin@koconnor.net</a>> wrote:<br>
><br>
> > On Thu, Jan 05, 2017 at 09:44:14AM +0200, Евгени Димитров wrote:<br>
> > > On Wed, Jan 4, 2017 at 4:52 PM, Kevin O'Connor <<a href="mailto:kevin@koconnor.net">kevin@koconnor.net</a>><br>
> > wrote:<br>
> > ><br>
> > > > On Wed, Jan 04, 2017 at 03:57:33PM +0200, Евгени Димитров wrote:<br>
> > > > > Hi,<br>
> > > > ><br>
> > > > > I'm testing Coreboot with SeaBIOS as payload on my old Alix.2C2. When<br>
> > > > > trying to boot from an USB device I get the following error:<br>
> > > > ><br>
> > > > > Searching bootorder for: /pci@i0cf8/usb@f,5/storage@2/*<wbr>@0/*@0,0<br>
> > > > > Searching bootorder for: /pci@i0cf8/usb@f,5/usb-*@2<br>
> > > > > ehci_send_pipe qh=0x000ecf00 dir=0 data=0x00006cf9 size=31<br>
> > > > > ehci_send_pipe qh=0x000ecf80 dir=128 data=0x00006dc4 size=36<br>
> > > > > ehci_send_pipe qh=0x000ecf80 dir=128 data=0x00006cec size=13<br>
> > > > > WARNING - Timeout at ehci_wait_td:516!<br>
> > > > > ehci pipe=0x000ecf80 cur=00000000 tok=00000000 next=6b40<br>
> > td=0x00006b40<br>
> > > > > status=d0d80<br>
> > > > > USB transmission failed<br>
> > > > > Unable to configure USB MSC drive.<br>
> > > > > phys_free f6030 (detail=0x0f7688a0)<br>
> > > > > Unable to configure USB MSC device.<br>
> > > ><br>
> > > > Did you disable threads in seabios (either via the kconfig option or<br>
> > > > via the /etc/threads runtime option)?  It's not recommended to disable<br>
> > > > threads, and the USB code is less capable of handling timeouts when<br>
> > > > threads are disabled.  Can you retry (and send the log) with threads<br>
> > > > enabled.<br>
> > > ><br>
> > > > If that fails, can you also try disabling CONFIG_USB_EHCI in Kconfig<br>
> > > > and send that log as well.<br>
> > > I get the same error with threads enabled. Disabling ehci did not help<br>
> > > either. Logs are attached as requested.<br>
> ><br>
> > It looks like the USB device is successfully identified and<br>
> > configured, but when sending the "inquiry" command to the drive behind<br>
> > the USB interface the connection halts.  Not sure why that would be -<br>
> > it could be something with the controller, but it's odd that it<br>
> > happens with both the ohci and ehci controllers.<br>
> ><br>
> > If you boot to linux (using some other bootable device) what does<br>
> > 'lsusb' and 'lsusb -t' report?  Have you tested with a different type<br>
> > of usb drive?<br>
> ><br>
> > -Kevin<br>
> ><br>
><br>
> USB works on Linux. And yes I have tried a bunch of USB drives. All of them<br>
> failed with the same error.<br>
><br>
> root@OpenWrt:/# lsusb<br>
> Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br>
> Bus 001 Device 002: ID 0011:7788<br>
> Bus 001 Device 003: ID 058f:6377 Alcor Micro Corp. Multimedia Card Reader<br>
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br>
> root@OpenWrt:/# lsusb -t<br>
> /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/4p, 12M<br>
> /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/4p, 480M<br>
>     |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=, 480M<br>
>     |__ Port 2: Dev 2, If 0, Class=Mass Storage, Driver=, 480M<br>
<br>
Are you trying to boot from the "Multimedia Card Reader" or from a<br>
regular USB flash drive?  If you're not booting from the card reader,<br>
does the patch below help?<br>
<br>
-Kevin<br>
<br>
<br>
--- a/src/hw/usb-msc.c<br>
+++ b/src/hw/usb-msc.c<br>
@@ -203,6 +203,8 @@ usb_msc_setup(struct usbdevice_s *usbdev)<br>
         goto fail;<br>
<br>
     int maxlun = usb_msc_maxlun(usbdev-><wbr>defpipe);<br>
+    if (maxlun)<br>
+        goto fail;<br>
     int lun, pipesused = 0;<br>
     for (lun = 0; lun < maxlun + 1; lun++) {<br>
         int ret = usb_msc_lun_setup(inpipe, outpipe, usbdev, lun);<br>
</blockquote></div><br></div><div class="gmail_extra">I was trying to boot from whatever USB devices I can get my hands on. Ultimately my goal is to boot from a regular flash drive. The patch doesn't help.</div></div>