All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Al Borchers <alborchers@steinerpoint.com>,
	linux-usb-devel <linux-usb-devel@lists.sourceforge.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: new locking in change_termios breaks USB serial drivers
Date: Fri, 1 Oct 2004 10:42:43 -0700	[thread overview]
Message-ID: <20041001174243.GA14015@kroah.com> (raw)
In-Reply-To: <1096630567.21871.4.camel@localhost.localdomain>

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 belkin_sa.c, digi_acceleport.c,
> > ftdi_sio.c, io_ti.c, kl5usb105.c, mct_u232.c, pl2303.c, and whiteheat.c
> > all sleep in their set_termios functions.
> > 
> > If this locking in change_termios() stays, we are going to have to
> > fix set_termios in all of these drivers.  I am updating io_ti.c right
> > now.
> 
> How much of a problem is this, would it make more sense to make the
> termios locking also include a semaphore to serialize driver side events
> and not the spin lock ?

It would make the usb-serial drivers much simpler if this was turned
into a semaphore.

> We need some kind of locking there otherwise multiple parallel termios
> setters resulting in truely strange occurences because driver authors
> don't think about 64 parallel executions of ->change_termios()
> 
> I can switch the lock around if you want.

I'm all for it, if the tty core isn't messing with any line settings
from interrupts.

thanks,

greg k-h

      parent reply	other threads:[~2004-10-01 17:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-01 10:40 new locking in change_termios breaks USB serial drivers Al Borchers
2004-10-01 11:36 ` Alan Cox
2004-10-01 16:24   ` Al Borchers
2004-10-01 15:49     ` Alan Cox
2004-10-01 18:14       ` [linux-usb-devel] " Al Borchers
2004-10-02 15:08         ` Alan Cox
2004-10-02 17:19           ` Al Borchers
2004-10-01 20:15     ` Stuart MacDonald
2004-10-01 17:42   ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041001174243.GA14015@kroah.com \
    --to=greg@kroah.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=alborchers@steinerpoint.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.