Hi Greg, Thanks for your help. On Tue, Feb 10, 2009 at 2:20 AM, Greg KH <greg@xxxxxxxxx> wrote: > On Tue, Feb 10, 2009 at 12:26:23AM +0530, Shivdas Gujare wrote: >> Hi Greg, >> I am currently testing my device(eZ430) using generic usb-serial >> driver, and I came across some strange problem. > > Ick, generic usb-serial? Why? There's no flow control with that > driver, and it's extreemly slow. > > Also, what kernel version are you using? I am using 2.6.29-rc2 from http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=summary > >> If I test the device with x86, it works very well. It sends character >> strings to USB serial, after pressing key on device. >> But when I test with ARM board(Beagle), it shows some characters >> missed in between.(for ex "Hello" receives as "Helo" with "l" missed) > > What host controller driver are you using here? It's "Mentor Graphics INVENTRA" musb from drivers/usb/musb/ > >> While debugging, I enabled debug messages with debug=1 while modprobe. >> And I started getting data properly with no characters missed. >> I found out that it was "usb_serial_debug_data" function from >> "usb_serial_generic_read_bulk_callback" printing data received.ow >> >> But here, If I disables debug, I starts getting data corrupted again. >> in short "modprobe usbserial debug=1" works very well but "modprobe >> usbserial" doesn't. > > So it's a buffer/timing issue :( Seems to be same, I am debugging only with putting printks for data received, as I don't have any specific H/W to debug it. > >> Is there any possibility that specific to my device, it needs the urb >> flushing to be delayed some time using debug messages? > > Sounds like it. > >> What could be the probable reason? How can I debug these problems? > > Use a usb protocol "sniffer" to verify that the data really is not > getting to/from your device to see if there is an overflow in either > your device, or in the host would be a good place to start. > > You can use usbmon for that. It seems that device is sending proper data, because it works fine with x86. I tried to use usbmon but I can't get any data on "bulk in" endpoints, but I can get every packet generated on control endpoint if I disconnect and re-connect device. Also, I could be wrong, but is it worth to keep null check for urb->actual_length before calling "usb_serial_debug_data" Thanks and Regards, Shivdas > > good luck, > > greg k-h > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html