linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gabriele Mazzotta <gabriele.mzt@gmail.com>
To: Jiri Kosina <jkosina@suse.com>
Cc: benjamin.tissoires@redhat.com, aduggan@synaptics.com,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HID: i2c-hid: Call device suspend callback before disabling irq
Date: Wed, 08 Jul 2015 12:24:50 +0200	[thread overview]
Message-ID: <2307888.TWO9u1uPK9@xps13> (raw)
In-Reply-To: <alpine.LNX.2.00.1507072248020.10183@pobox.suse.cz>

On Tuesday 07 July 2015 22:49:30 Jiri Kosina wrote:
> On Tue, 7 Jul 2015, Gabriele Mazzotta wrote:
> 
> > The irq is most likely required by the suspend callback, so disable it
> > only after the callback had been executed.
> 
> It would be nice to have a more verbose changelog here -- i.e. why we want 
> to do such change and what could go wrong if IRQ is disabled too early 
> (i.e. what bug is this exactly fixing).
> 
> > 
> > Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
> 
> I'd see this as a 4.2 material still. Please let me know if you'd rather 
> want to wait for 4.3.
> 
> Thanks,

I would have given an instance showing the problem, but AFAIK there
isn't one yet as there are no drivers doing something with IRQs on
suspend. I encounterd problems while modifying hid-rmi.c, but since
the changes aren't there yet, I couldn't mention them. Still, I could
have written something better.

What about something like the following? I can resend the patch with
the new message if it's OK.
---

i2c-hid takes care of requesting and handling IRQs for HID devices
which in turns might expect them to be always active when working
in normal conditions. Hence, disabling IRQs before calling the suspend
callbacks can potentially cause problems since device drivers might
try to perform operations needing them.

Fix this by disabling IRQs only after the suspend callbacks had been
executed.

  reply	other threads:[~2015-07-08 10:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-07 19:58 [PATCH] HID: i2c-hid: Call device suspend callback before disabling irq Gabriele Mazzotta
2015-07-07 20:34 ` Benjamin Tissoires
2015-07-07 20:49 ` Jiri Kosina
2015-07-08 10:24   ` Gabriele Mazzotta [this message]
2015-07-08 10:44     ` Jiri Kosina

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=2307888.TWO9u1uPK9@xps13 \
    --to=gabriele.mzt@gmail.com \
    --cc=aduggan@synaptics.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jkosina@suse.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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).