[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2307888.TWO9u1uPK9@xps13>
Date: Wed, 08 Jul 2015 12:24:50 +0200
From: Gabriele Mazzotta <gabriele.mzt@...il.com>
To: Jiri Kosina <jkosina@...e.com>
Cc: benjamin.tissoires@...hat.com, aduggan@...aptics.com,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] HID: i2c-hid: Call device suspend callback before disabling irq
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@...il.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists