[Nexus S Android Development] hedpe:
I am getting an error when a kernel module/driver is trying to load firmware to a device. I placed the firmware in /system/vendor/firmware where I believe is the right place for it to go. It does not complain that it cannot find the firmware, as when it does when the firmware is not in that directory. So, I'm sure it's finding it.

But, I get an error related to URBs when the kernel module attempts to load the firmware on to the device:

708.644762] usb 1-1.1: new high speed USB device number 4 using s3c_otghcd
<7>[ 708.730659] usb 1-1.1: default language 0x0409
<7>[ 708.731251] usb 1-1.1: udev 4, busnum 1, minor = 3
<6>[ 708.731705] usb 1-1.1: New USB device found, idVendor=0411, idProduct=017f
<6>[ 708.731906] usb 1-1.1: New USB device strings: Mfr=16, Product=32, SerialNumber=48
<6>[ 708.732230] usb 1-1.1: Product: (CEWL 1)
<6>[ 708.732404] usb 1-1.1: Manufacturer: BUFFALO
<6>[ 708.732766] usb 1-1.1: SerialNumber: 12345
<7>[ 708.735538] usb 1-1.1: usb_probe_device
<7>[ 708.735742] usb 1-1.1: configuration #1 chosen from 1 choice
<7>[ 708.736253] usb 1-1.1: adding 1-1.1:1.0 (config #1, interface 0)
<7>[ 708.738142] usbserial_generic 1-1.1:1.0: usb_probe_interface
<7>[ 708.738474] usbserial_generic 1-1.1:1.0: usb_probe_interface - got id
<7>[ 708.738912] ath9k_htc 1-1.1:1.0: usb_probe_interface
<7>[ 708.739241] ath9k_htc 1-1.1:1.0: usb_probe_interface - got id
<3>[ 708.999596] otg_err: in s5pc110_otghcd_urb_dequeue()::00508
<3>[ 709.000670] => fail to cancel_transfer()
<7>[ 709.002489] usb 1-1.1: hcd_unlink_urb d2f7c780 fail -1
<7>[ 709.004372] usb 1-1.1: khubd timed out on ep0out len=0/4096
<3>[ 709.005181] usb 1-1.1: ath9k_htc: Firmware - htc_7010.fw download failed
<4>[ 709.012208] ath9k_htc: probe of 1-1.1:1.0 failed with error -22
<7>[ 709.033403] hub 1-1:1.0: state 7 ports 4 chg 0000 evt 0002

has anyone ever seen this type of thing?

I just modified the kernel to go back to "manual" firmware loading where it mounts a data point in /sys (sysfs) for you to cat the firmware to. For example:

echo 1 > /sys/devices/platform/s3c_otghcd/usb1/1-1/1-1.1/firmware/1-1.1/loading
cat /sdcard/thefirmware.fw > /sys/devices/platform/s3c_otghcd/usb1/1-1/1-1.1/firmware/1-1.1/data
echo 0 > /sys/devices/platform/s3c_otghcd/usb1/1-1/1-1.1/firmware/1-1.1/loading

Unfortunately, this fails in the same way:

<3>[ 956.245829] otg_err: in s5pc110_otghcd_urb_dequeue()::00508
<3>[ 956.246459] => fail to cancel_transfer()
<7>[ 956.247866] usb 1-1.1: hcd_unlink_urb d1bd0380 fail -1
<7>[ 956.249621] usb 1-1.1: khubd timed out on ep0out len=0/4096
<3>[ 956.250385] usb 1-1.1: ath9k_htc: Firmware - htc_7010.fw download failed
<4>[ 956.257879] ath9k_htc: probe of 1-1.1:1.0 failed with error -22
<7>[ 956.285407] hub 1-1:1.0: state 7 ports 4 chg 0000 evt 0002

So, there seems to be a bug in the USB host controller :\

-------

Debugging: sztupy, do you have any suggestions on how to debug this? I tried to enable the debug flag OTG_DBG_OTGHCDI_HCD found in s3c-otg-hcdi-debug.h, but this brings the phone to a halt whenever Auto-host is enabled and a device is plugged in. Too much debug?

This is the function where things go wrong for me:

https://github.com/sztupy/samsung-k...vers/usb/host/s3c-otg/s3c-otg-hcdi-hcd.c#L459