linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Jiri Kosina <jkosina@suse.cz>,
	Ondrej Zajicek <santiago@crfreenet.org>,
	linux-input@vger.kernel.org
Subject: Re: BUG in sermouse driver
Date: Mon, 10 Mar 2008 10:13:16 -0400	[thread overview]
Message-ID: <20080310100940.ZZRA012@mailhub.coreip.homeip.net> (raw)
In-Reply-To: <20080310120137.GB29197@elf.ucw.cz>

Hi,

On Mon, Mar 10, 2008 at 01:01:37PM +0100, Pavel Machek wrote:
> Hi!
> 
> > > There is a bug in sermouse driver that inputattach program terminates 
> > > during suspend (or resume) to ram hence mouse does not work afer resume. 
> > > When i execute inputattach after resume, the mouse is working.
> > 
> > I know that Pavel (added to CC) knows where the problem is (improper fake 
> > signal handling around try_to_freeze() call), I guess he'd be able to 
> > provide a patch to test.
> 
> I don't have a patch ready, but I believe we localized the problem to
> serport_ldisc_read().
> 
>         wait_event_interruptible(serport->wait,
> +test_bit(SERPORT_DEAD,&serport->flags));
> 
> It does interruptible wait, but does not expect signals. We tried
> something like:
> 
> do {
>         wait_event_interruptible(serport->wait, test_bit(SERPORT_DEAD,&serport->flags));
> } while (try_to_freeze());
> 
> ...but that did not help IIRC.

I think the current behavior is correct one. The device 99% of the
time needs to be re-initialized after suspend to ram so returning
from read is sane thing to do, this allows us to singnal userspace
that device needs attention.

As far as userspace goes we could either try to get inputattach
reinitialize device or just make sure that inputattach is called
again from resume scripts.

-- 
Dmitry

      reply	other threads:[~2008-03-10 14:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-10  9:30 BUG in sermouse driver Ondrej Zajicek
2008-03-10 10:34 ` Jiri Kosina
2008-03-10 12:01   ` Pavel Machek
2008-03-10 14:13     ` Dmitry Torokhov [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=20080310100940.ZZRA012@mailhub.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=santiago@crfreenet.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).