I have been testing the g_serial serial gadget with my superh_udc driver on the 2.4.21 kernel. It works when I send data from the host to the device but when I send from the device to the host I get extra characters.

Example:

device# echo 1234 >/dev/ttygs0

host# cat /dev/usb/tts/0
1234
1^^^^^

I don't think these extra characters are being introduced by the UDC driver, they seem to be being sent by the g_serial driver, possibly due to some problem with line discipline in the tty driver. Here is some debug output, I can see the 1234 followed by CR/LF being sent but then gs_put_char gets called with the extra characters. There also seems to be a timing issue as when I have really verbose debug the extra characters carry on forever.

# echo 1234 >/dev/ttygs0
gs_open: (0,8ce7d000,8c1027b0)
gs_open: (0,8ce7d000,8c1027b0) completed
gs_ioctl: (0,8ce7d000,8c1027b0) cmd=0x5401, arg=2080374064
gs_write_room: (0,8ce7d000) room=8191
gs_flush_chars: (0,8ce7d000)
gs_write: (0,8ce7d000) writing 4 bytes
gs_send_packet: size=4, 31
gs_write: (0,8ce7d000) wrote 4 bytes
gs_write_room: (0,8ce7d000) room=8191
gs_put_char: 0D
gs_put_char: 0A
gs_flush_chars: (0,8ce7d000)
gs_write_room: (0,8ce7d000) room=8189
gs_put_char: 31
gs_flush_chars: (0,8ce7d000)
gs_send_packet: size=3, 0D
gs_write_room: (0,8ce7d000) room=8191
gs_put_char: 5E
gs_flush_chars: (0,8ce7d000)
gs_send_packet: size=1, 5E
gs_write_room: (0,8ce7d000) room=8191
gs_put_char: 5E
gs_flush_chars: (0,8ce7d000)
gs_send_packet: size=1, 5E
gs_write_room: (0,8ce7d000) room=8191
gs_put_char: 5E
gs_flush_chars: (0,8ce7d000)
gs_send_packet: size=1, 5E
gs_write_room: (0,8ce7d000) room=8191
gs_put_char: 5E
gs_flush_chars: (0,8ce7d000)
gs_send_packet: size=1, 5E
gs_write_room: (0,8ce7d000) room=8191
gs_put_char: 5E
gs_flush_chars: (0,8ce7d000)
gs_send_packet: size=1, 5E
gs_close: (0,8ce7d000,8c1027b0)
#

I wonder if anyone else has seen anything similar on another platform with another UDC driver?

Thanks

Julian



-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to