阅读:1620回复:0
need help
hello,
I am writing the firmware for an ARM-based development board (CX82100 from Conexant System Inc.), and it has a usb slave port. I can't tell which chip it uses since lacking of info, and I only know it uses the chip from Sand Microelectronic Inc., which seems disappered. My host system is linux 2.4.9, with builtin usb support. My problem is, after initing the USB device controller on the board, I can receive the linux's request, get-device-descriptor, which is the first time request, and is 8 bytes length, i.e. Linux wants to know my device's max packet size for the control endpoint, and then, as the response, I send the device info(8 bytes also) to linux (by filling the dma buffer), but the device always tells me it's pending on sending the packet, at the same time, at the linux side, printing debug info "usb_control/bulk_msg: timeout" for five times, and then "USB device not responding, giving up (error=-110)". Linux will retry the above process again, and gives up finally. The fact is my device can receive all the ten(5 * 2) 8-byte-length requests without any problem, but the transporting function suspended after the first response. As the board data sheet says, it seems the device is waiting for host's ACK. But linux seems doesn't recieve the response from the device, and won't send ACK but timeout again and again. What's the problem? Since my device only hands on the limited setup requests(e.g. GetDescriptor, GetConfiguration, SetConfiguration)to me, and the others are dealed with by the hardware such as SetAddress. I can't tell which step I was on, but I check the linux usb source(usb.c), and I notice the function usb_new_device(), seems the SetAddress has completed properly, but then failed at 2151: err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, &dev->descriptor, 8); Any kind of help or advice is welcome, thanks! |
|