Re: Regarding USB-to-serial device driver

From: Greg KH
Date: Thu Sep 23 2010 - 10:03:21 EST


On Thu, Sep 23, 2010 at 03:45:52PM +0530, Raju Rameshwar Uprade wrote:
> > For what driver?
>
> I am using pl2303.c ( USB to serial device driver ) to communicate to
> various devices connected in parallel using RS-485 interface card.

So your program is going to fail if you use a different hardware device?
That doesn't sound like a good idea.

> > > Kindly help me.I am facing the problem in separating the data bytes so
> > > that I can send the data bytes separately using usb_submit_urb.
> >
> > It all depends on the driver you are using. Why not do all of this from
> > userspace? That way it works on any device you are talking to.
>
> I want to write data twice :
>
> 1. Only address byte and then
> 2. Data bytes.

Again, do this in userspace.

> I am properly allocating memory for write_urb using kzalloc.When I write complete user
> buffer to the port, it send the data properly.
>
> But when I try to write only address byte machine get hang.
>
> I have attached the source file.

Sorry, I really don't know, you are on your own here.

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/