All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Simon Arlott <simon@fire.lp0.eu>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>,
	USB list <linux-usb@vger.kernel.org>
Subject: Re: ftdi_sio: fix status line change handling for TIOCMIWAIT and TIOCGICOUNT
Date: Mon, 26 Mar 2012 13:31:23 -0700	[thread overview]
Message-ID: <20120326203123.GA26899@kroah.com> (raw)
In-Reply-To: <4F70CF5C.7030004@simon.arlott.org.uk>

On Mon, Mar 26, 2012 at 09:19:40PM +0100, Simon Arlott wrote:
> Handling of TIOCMIWAIT was changed by commit 1d749f9afa657f6ee9336b2bc1fcd750a647d157
>  USB: ftdi_sio.c: Use ftdi async_icount structure for TIOCMIWAIT, as in other drivers
> 
> FTDI_STATUS_B0_MASK does not indicate the changed modem status lines,
> it indicates the value of the current modem status lines. An xor is
> still required to determine which lines have changed.
> 
> The count was only being incremented if the line was high. The only
> reason TIOCMIWAIT still worked was because the status packet is
> repeated every 1ms, so the count was always changing. The wakeup
> itself still ran based on the status lines changing.
> 
> This change fixes handling of updates to the modem status lines and
> allows multiple processes to use TIOCMIWAIT concurrently.
> 
> Tested with two processes waiting on different status lines being
> toggled independently.

Nice, do you happen to have the source for such a test tool anywhere
around?  I'd like to use it for future testing if at all possible.

I'll queue this up after 3.4-rc1 is out.

greg k-h

      reply	other threads:[~2012-03-26 20:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26 20:19 ftdi_sio: fix status line change handling for TIOCMIWAIT and TIOCGICOUNT Simon Arlott
2012-03-26 20:31 ` 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=20120326203123.GA26899@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=bon@elektron.ikp.physik.tu-darmstadt.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=simon@fire.lp0.eu \
    /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.