Hi Is there a mechanism to save log messages at boot time? I tested again and found that ehci_wait_td function timeouts in all execution of for loop including first. which registers you want to know? i got these information from log messages:
pipe->qh.current = 0x1eff8d80 pipe->qh.token = 0x00400141 pipe->qh.qtd_next = 0x1efff140 td->token = 0x00400c80 pipe->qh.info1 = 0x00400202 pipe->qh.info2 = 0x00400202
for uhci i used vmware workstation and it works perfectly and i can send and receive data from hid device, but my real hardware does not have uhci controller , instead it has 2 EHCI controller with rate matching hub, so i should use ehci driver for this kind of controller.
On Sun, Mar 15, 2015 at 7:03 PM, Kevin O'Connor kevin@koconnor.net wrote:
On Sun, Mar 15, 2015 at 12:32:04PM +0330, Navid Movahedi wrote:
Hi I have a usb 1 HID device with 2 endpoints, 1 in, 1 out, and i want to enumerate this usb device with seabios at boot time, so i hacked seabios hid source code and add needed codes for this device. now device is full functional with uhci driver in vmware and i have no problem with read and write to device . the problem is for machines with ehci controllers that don't have companion uhci controller and uses rate matching hub to connect to this usb 1 device. The currewnt status for this kind of controller is that the device is detected and configured and 2 endpoints and corresponding 2 interrupt pipes are allocated and initialized but when i use usb_send_pipe function to write to device , error occurs . error is Timeout in ehci_wait_td function in this section of code:
for (i=0, td=tds; i<STACKQTDS; i++, td++) { ret = ehci_wait_td(pipe, td, end); if (ret) return -1; }
timeout occurs for second td. i called usb_send_pipe function in this
way:
usb_send_pipe(out_pipe, USB_DIR_OUT , NULL , data, 64);
is it correct?
How can i solve this problem?
We'd need to see the full seabios log in order to help. When the EHCI controller complains, it should also print out some ehci registers which give further information on what the controller was doing at the time of the error.
Was this second ehci setup also on vmware or on some other emulator/real hardware?
-Kevin