Hello!
I use coreboot+SeaBIOS bundle on custom motherboard with Intel Haswell i7 and Lynxpoint-LP chipset and I've come to a strange issue with USB-to-SATA bridge TUSB9261 (http://www.ti.com/product/TUSB9261). In my experiments I plug HDD to one USB port, and USB boot flash drive to another USB port. Everything works fine when HDD is present on USB-to-SATA bridge. SeaBIOS displays both devices in its boot menu. But if HDD is not present and if USB boot flash drive is plugged to a port greater than USB-to-SATA bridge port, SeaBIOS doesn't see flash drive as bootable device.
In this case I see in log messages similar to this: """ Searching bootorder for: /pci@i0cf8/usb@1d/hub@1/storage@7/*@0/*@0,0 Searching bootorder for: /pci@i0cf8/usb@1d/hub@1/usb-*@7 ehci_send_pipe qh=0x000eab80 dir=0 data=0x00006b79 size=31 ehci_send_pipe qh=0x000eab00 dir=128 data=0x00006c98 size=36 WARNING - Timeout at ehci_wait_td:516! ehci pipe=0x000eab00 cur=000069c0 tok=80240d80 next=1 td=0x000069c0 status=240d80 USB transmission failed Unable to configure USB MSC drive. phys_free f4950 (detail=0x7f6c13c0) Unable to configure USB MSC device. """
Summarizing all the above with SeaBIOS logs:
SeaBIOS displays flash drive correctly as bootable device when: - HDD is present on SATA-to-USB port (https://pastebin.com/SuKBkQrq) - HDD is not present on USB port, but SATA-to-USB port number is greater than USB flash drive number (https://pastebin.com/9f6RTBHB)
SeaBIOS doesn't display flash drive as bootable device when: - HDD is not present on USB port and SATA-to-USB port number is less than USB flash drive number (https://pastebin.com/abBPhej0)
What can be the source of the problem and what can I do to solve this issue?
Best Regards, Aladyshev Konstantin
Dear Aladyshev,
On 12/18/18 15:15, Аладышев Константин wrote:
I use coreboot+SeaBIOS bundle on custom motherboard with Intel Haswell i7 and Lynxpoint-LP chipset and I've come to a strange issue with USB-to-SATA bridge TUSB9261 (http://www.ti.com/product/TUSB9261). In my experiments I plug HDD to one USB port, and USB boot flash drive to another USB port. Everything works fine when HDD is present on USB-to-SATA bridge. SeaBIOS displays both devices in its boot menu. But if HDD is not present and if USB boot flash drive is plugged to a port greater than USB-to-SATA bridge port, SeaBIOS doesn't see flash drive as bootable device.
In this case I see in log messages similar to this: """ Searching bootorder for: /pci@i0cf8/usb@1d/hub@1/storage@7/*@0/*@0,0 Searching bootorder for: /pci@i0cf8/usb@1d/hub@1/usb-*@7 ehci_send_pipe qh=0x000eab80 dir=0 data=0x00006b79 size=31 ehci_send_pipe qh=0x000eab00 dir=128 data=0x00006c98 size=36 WARNING - Timeout at ehci_wait_td:516! ehci pipe=0x000eab00 cur=000069c0 tok=80240d80 next=1 td=0x000069c0 status=240d80 USB transmission failed Unable to configure USB MSC drive. phys_free f4950 (detail=0x7f6c13c0) Unable to configure USB MSC device. """
Summarizing all the above with SeaBIOS logs:
SeaBIOS displays flash drive correctly as bootable device when:
- HDD is present on SATA-to-USB port (https://pastebin.com/SuKBkQrq)
- HDD is not present on USB port, but SATA-to-USB port number is greater
than USB flash drive number (https://pastebin.com/9f6RTBHB)
SeaBIOS doesn't display flash drive as bootable device when:
- HDD is not present on USB port and SATA-to-USB port number is less than
USB flash drive number (https://pastebin.com/abBPhej0)
What can be the source of the problem and what can I do to solve this issue?
Without looking at the code, can you come up with an example for QEMU to reproduce this?
Kind regards,
Paul
PS: Please attach the logs in the future, so reading the mail one does not need to be online.
Hello!
I don't know how to provide an example for QEMU for this issue...
Anyway, I tried to debug more and have found out that the problem seems to be in "scsi_drive_setup" (src\hw\blockcmd.c) function:
int scsi_drive_setup(...) { .... ret = scsi_is_ready(&dop); if (ret) { dprintf(1, "scsi_is_ready returned %d\n", ret); return ret; } ... }
When HDD is not present on the USB-to-SATA bridge, "scsi_is_ready" function returns "-1" and this causes problems to USB flash drives on ports greater than USB-to-SATA bridge USB port.
For now, I've simply replaced code above with version with hardcode check:
ret = scsi_is_ready(&dop); if (ret) { dprintf(1, "scsi_is_ready returned %d\n", ret); if (!strcmp(product, "TUSB9261")) { dprintf(1, "Skip TUSB9261 USB-to-SATA bridge with no devices\n"); return 0; } return ret; }
This, of course, is not a full solution, but it works for my case. I hope my info will help and someone with better understanding of SeaBIOS will come up with a full solution.
Best regards, Aladyshev Konstantin
-----Original Message----- From: Paul Menzel [mailto:pmenzel@molgen.mpg.de] Sent: Tuesday, December 18, 2018 5:21 PM To: Аладышев Константин Cc: seabios@seabios.org Subject: Re: [SeaBIOS] USB-to-SATA bridge conflicts with USB boot flash drive
Dear Aladyshev,
On 12/18/18 15:15, Аладышев Константин wrote:
I use coreboot+SeaBIOS bundle on custom motherboard with Intel Haswell i7 and Lynxpoint-LP chipset and I've come to a strange issue with USB-to-SATA bridge TUSB9261 (http://www.ti.com/product/TUSB9261). In my experiments I plug HDD to one USB port, and USB boot flash drive to another USB port. Everything works fine when HDD is present on USB-to-SATA bridge. SeaBIOS displays both devices in its boot menu. But if HDD is not present and if USB boot flash drive is plugged to a port greater than USB-to-SATA bridge port, SeaBIOS doesn't see flash drive as bootable device.
In this case I see in log messages similar to this: """ Searching bootorder for: /pci@i0cf8/usb@1d/hub@1/storage@7/*@0/*@0,0 Searching bootorder for: /pci@i0cf8/usb@1d/hub@1/usb-*@7 ehci_send_pipe qh=0x000eab80 dir=0 data=0x00006b79 size=31 ehci_send_pipe qh=0x000eab00 dir=128 data=0x00006c98 size=36 WARNING - Timeout at ehci_wait_td:516! ehci pipe=0x000eab00 cur=000069c0 tok=80240d80 next=1 td=0x000069c0 status=240d80 USB transmission failed Unable to configure USB MSC drive. phys_free f4950 (detail=0x7f6c13c0) Unable to configure USB MSC device. """
Summarizing all the above with SeaBIOS logs:
SeaBIOS displays flash drive correctly as bootable device when:
- HDD is present on SATA-to-USB port (https://pastebin.com/SuKBkQrq)
- HDD is not present on USB port, but SATA-to-USB port number is greater
than USB flash drive number (https://pastebin.com/9f6RTBHB)
SeaBIOS doesn't display flash drive as bootable device when:
- HDD is not present on USB port and SATA-to-USB port number is less than
USB flash drive number (https://pastebin.com/abBPhej0)
What can be the source of the problem and what can I do to solve this issue?
Without looking at the code, can you come up with an example for QEMU to reproduce this?
Kind regards,
Paul
PS: Please attach the logs in the future, so reading the mail one does not need to be online.
On Tue, Dec 18, 2018 at 05:15:49PM +0300, Аладышев Константин wrote:
I use coreboot+SeaBIOS bundle on custom motherboard with Intel Haswell i7 and Lynxpoint-LP chipset and I've come to a strange issue with USB-to-SATA bridge TUSB9261 (http://www.ti.com/product/TUSB9261). In my experiments I plug HDD to one USB port, and USB boot flash drive to another USB port. Everything works fine when HDD is present on USB-to-SATA bridge. SeaBIOS displays both devices in its boot menu. But if HDD is not present and if USB boot flash drive is plugged to a port greater than USB-to-SATA bridge port, SeaBIOS doesn't see flash drive as bootable device.
Does the patch below help?
-Kevin
--- a/src/hw/usb-ehci.c +++ b/src/hw/usb-ehci.c @@ -467,6 +467,7 @@ ehci_realloc_pipe(struct usbdevice_s *usbdev, struct usb_pipe *upipe // Use previously allocated pipe. struct ehci_pipe *pipe = container_of(usbpipe, struct ehci_pipe, pipe); ehci_desc2pipe(pipe, usbdev, epdesc); + pipe->qh.token = 0; return usbpipe; }