[SeaBIOS] error in write and read from usb hid device

Navid Movahedi n.movahedi67 at gmail.com
Sun Mar 15 10:02:04 CET 2015


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?

thanks



More information about the SeaBIOS mailing list