--- Begin Message --- En/na David Brownell ha escrit:

Josep Comas wrote:

Hello,

I am a developer of some ADSL USB modems (https://sourceforge.net/users/jcomas/). I have some USB timeout problems using kernel 2.4.22 and kernel 2.6.0test8. I have a program in user space to send firmware to modem. With kernel 2.4.20 all is ok but with these new kernels I have timeout when firmware is sent (just CPU of USB device start to run) and I try to send a USB transfer. Some occurs when I send USB firmware and after a renum process (new VID/PID appears) is did. I hope you can give me an orientation about how I can solve the problem.


You'd need to provide a better problem description.



Examples:

printf(gettext("Firmware is sent!\n"));

 /* wait until firmware is ready */
 sleep(1);


/*************/ /* post load */ /*************/

PDEBUG(gettext("PostInit...\n"));

/* configure something */

len = transfer_ctrl_msg(adsl_handle, VENDOR_REQUEST_IN, 0x0a, 0x0c, 0x08, buf, 0x1);
if (len < 1)
return -1;
value = buf[0];


Fail to transfer_ctrl_msg:
Error: usb_control_msg: error sending control message: Connection timed out
Error: usb_control_msg: error sending control message: Connection timed out
Error: usb_control_msg: error sending control message: Connection timed out
Error: usb_control_msg: error sending control message: Connection timed out
Error: usb_control_msg failed after 4 retries

I have a robust function that it retries 4 times same USB transfer adding x ms to current timeout.
In /var/log/messages you can see USB TIMEOUT (I think -110). With kernel 2.4.18, 2.4.20 it works ok.


I use libusb library to access USB from user space. In recent kernels timeout was changed, maybe I need change my timeout > 5 seconds

There is an ADSL modem that it takes 14 seconds to answer to USB bulk transfer (Windows and Linux USB log), Allied Data Copperjet 800 USB uses Texas Instruments reference design but. It fails from user space but in kernel space transfer is retained until callback is did. This is applied to all kernel versions.

What do you recommend to activate kernel USB debug?

I have other modem that it happens this with kernel > 2.4.20:
.- Firmare for VID1/PID1 is sent.
.- Modem renums as VID1/PID2.
.- Trying to send firmware for VID1/PID2 fails. It just fails to first USB transfer.


Thanks for your attention,
  Josep



--- End Message ---


Reply via email to