Re: [linux-usb-devel] Re: new locking in change_termios breaks USB serial drivers

2004-10-02 Thread Al Borchers
Alan Cox wrote: On Gwe, 2004-10-01 at 19:14, Al Borchers wrote: * The tty layer could use a semaphore so the USB serial set_termios could sleep until the new termios settings have taken effect before returning. This seems to be the right choice and is the change I will implement. Great! Thanks.

Re: [linux-usb-devel] Re: new locking in change_termios breaks USB serial drivers

2004-10-02 Thread Alan Cox
On Gwe, 2004-10-01 at 19:14, Al Borchers wrote: * The tty layer could use a semaphore so the USB serial set_termios could sleep until the new termios settings have taken effect before returning. This seems to be the right choice and is the change I will implement.

[linux-usb-devel] Re: new locking in change_termios breaks USB serial drivers

2004-10-01 Thread Alan Cox
On Gwe, 2004-10-01 at 11:40, Al Borchers wrote: Unfortunately, many USB serial drivers' set_termios functions send an urb to change the termios settings and sleep waiting for it to complete. I just looked quickly, but it seems belkin_sa.c, digi_acceleport.c, ftdi_sio.c, io_ti.c,

[linux-usb-devel] Re: new locking in change_termios breaks USB serial drivers

2004-10-01 Thread Alan Cox
On Gwe, 2004-10-01 at 17:24, Al Borchers wrote: Its a design decision for the tty layer. You should choose whatever is best there and the drivers will have to adapt. From a tty layer I don't think there is a motivation to enforce no sleep. Hopefully nobody has a reason to need to fiddle with

[linux-usb-devel] Re: new locking in change_termios breaks USB serial drivers

2004-10-01 Thread Greg KH
On Fri, Oct 01, 2004 at 12:36:09PM +0100, Alan Cox wrote: On Gwe, 2004-10-01 at 11:40, Al Borchers wrote: Unfortunately, many USB serial drivers' set_termios functions send an urb to change the termios settings and sleep waiting for it to complete. I just looked quickly, but it seems

[Fwd: Re: [linux-usb-devel] Re: new locking in change_termios breaks USB serial drivers]

2004-10-01 Thread Al Borchers
Alan Cox wrote: In a waiting case the driver will get -chars_in_buffer until it returns zero -wait_until_sent -change_termios which serializes with respect to the one writer. If you have a writer during a termios change by another well tough luck, you lose and I've no

[linux-usb-devel] RE: new locking in change_termios breaks USB serial drivers

2004-10-01 Thread Stuart MacDonald
From: [EMAIL PROTECTED] Its a design decision for the tty layer. You should choose whatever is best there and the drivers will have to adapt. I agree. ..Stu --- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal