On 22/02/2008, Greg KH <[EMAIL PROTECTED]> wrote:
> On Wed, Feb 20, 2008 at 10:35:48AM -0800, Chetan Karia wrote:
>  > Hello,
>  >
>  > I am kernel newbie and I have a question about usb serial driver. I
>  > have a usb to serial driver which exposes 3 virtual serial ports
>  > ttyUSB0, ttyUSB1 and ttyUSB2. The endpoint to virtual serial port
>  > mapping is like this
>  >          ep0 ==> ttyUSB0
>  >         ep1 ==> ttyUSB1
>  >         ep2 ==> ttyUSB2.
>
>
> Which device is this?  I think you are talking about the endpoint
>  "pairs" one IN and one OUT per tty, right?
>
Yes I am talking about endpoint per one IN and one OUT per tty.

>
>  > All I want to do is create another virtual serial port ttyUSB3 (easy)
>  > and setup its endpoint address (bulk in and bulk out) to same as
>  > ttyUSB1 that is ep1. I do this in attach function of the driver and I
>  > want to know will there be any race condition if ttyUSB1 and ttyUSB3
>  > are used simultaneously? Is there any way to overcome that race
>  > condition or its simply not correct way to go.
>
>
> Does the device really support another serial endpoint?  You can't just
>  make a new one if the hardware can't handle it.
>
My intention was not to create new endpoint but two tty's (virtual
serial ports) that talk to a single pair of  IN and OUT endpoint.
(ep1)
>
>  > My sole intention for doing that is ttyUSB1 and ttyUSB3 should be able
>  > to read/write from/to same endpoint (ep1) concurrently. Is that
>  > possible?
>
>
> Hm, why?  Some devices might get very confused, depending on the
>  protocol used by the device.  It all depends on the hardware.
>
>  What's wrong with just having 2 programs write to the same tty node at
>  the same time?
>
I was under the impression that 2 user-level programs can't read/write
to single tty node concurrently. Am I wrong? I need both read and
write capability.
>  thanks,
>
>  greg k-h
>
-
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to