Re: Regarding USB-to-serial device driver

From: Greg KH
Date: Tue Sep 28 2010 - 07:35:31 EST


On Tue, Sep 28, 2010 at 02:51:57PM +0530, Raju Rameshwar Uprade wrote:
> Hello Greg,
>
> I am using pl2303.c ( USB to serial device driver ) to communicate to various
> devices connected in parallel using RS-485 interface card.
>
> I am now able to separate the Address byte and data bytes.Driver send the Address byte
> properly but when it tries to send the data bytes following error occurs,
>
> pl2303_mcm ttyUSB0: pl2303_write - failed submitting write urb, error -22.

Is this with your patched pl2303 driver, or are you now doing this from
userspace?

> I have also attached the kernel log.
>
> /home/teleset/Desktop/USB-Serial/pl2303_mcm.c: pl2303_write before any thing - port 0, 9
> bytes
> /home/teleset/Desktop/USB-Serial/pl2303_mcm.c: set_control_lines - value = 3, retval = 0
>
> Data in The BUF 0 is -----> 02
>
> Data in The BUF 1 is -----> 08
>
> Data in The BUF 2 is -----> 00
>
> Data in The BUF 3 is -----> 00
>
> Data in The BUF 4 is -----> 00
>
> Data in The BUF 5 is -----> 00
>
> Data in The BUF 6 is -----> 00
>
> Data in The BUF 7 is -----> 00
>
> Data in The BUF 8 is -----> f8
> pl2303_mcm ttyUSB0: pl2303_write - length = 1, data = 02
> /home/teleset/Desktop/USB-Serial/pl2303_mcm.c: After the first urb submission count = 9
> and length = 8
> pl2303_mcm ttyUSB0: pl2303_write - length = 8, data = 08 00 00 00 00 00 00 f8
> pl2303_mcm ttyUSB0: pl2303_write - failed submitting write urb, error -22
> /home/teleset/Desktop/USB-Serial/pl2303_mcm.c: pl2303_write_bulk_callback - port 0
> /home/teleset/Desktop/USB-Serial/pl2303_mcm.c: set_control_lines - value = 0, retval = 0

This looks like your driver, not mine, sorry, you are on your own here.
See my previous emails as to why this should be done in userspace and
not in the kernel.

good luck,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/