All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usbhid: discarded events don't abort idleness
@ 2015-11-05 11:55 Oliver Neukum
  2015-11-20 10:00 ` Jiri Kosina
  2015-11-23 14:47 ` Jiri Kosina
  0 siblings, 2 replies; 4+ messages in thread
From: Oliver Neukum @ 2015-11-05 11:55 UTC (permalink / raw)
  To: jkosina, linux-input; +Cc: Oliver Neukum

If an event is discarded the device stays idle.
Just reverse the order of check and marking busy.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
 drivers/hid/usbhid/hid-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 36712e9..19a4364 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -274,10 +274,10 @@ static void hid_irq_in(struct urb *urb)
 
 	switch (urb->status) {
 	case 0:			/* success */
-		usbhid_mark_busy(usbhid);
 		usbhid->retry_delay = 0;
 		if ((hid->quirks & HID_QUIRK_ALWAYS_POLL) && !hid->open)
 			break;
+		usbhid_mark_busy(usbhid);
 		if (!test_bit(HID_RESUME_RUNNING, &usbhid->iofl)) {
 			hid_input_report(urb->context, HID_INPUT_REPORT,
 					 urb->transfer_buffer,
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] usbhid: discarded events don't abort idleness
  2015-11-05 11:55 [PATCH] usbhid: discarded events don't abort idleness Oliver Neukum
@ 2015-11-20 10:00 ` Jiri Kosina
  2015-11-23  9:17   ` Oliver Neukum
  2015-11-23 14:47 ` Jiri Kosina
  1 sibling, 1 reply; 4+ messages in thread
From: Jiri Kosina @ 2015-11-20 10:00 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-input

On Thu, 5 Nov 2015, Oliver Neukum wrote:

> If an event is discarded the device stays idle.
> Just reverse the order of check and marking busy.
> 
> Signed-off-by: Oliver Neukum <oneukum@suse.com>

Hi Oliver,

thanks for the fix. This is a real bug, so I am wondering whether you have 
seen causing it real problems (and hence it should be merged for 4.4), or 
if you found it just by code inspection (and therefore it should be fine 
to merge it for 4.5).

Thanks,

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] usbhid: discarded events don't abort idleness
  2015-11-20 10:00 ` Jiri Kosina
@ 2015-11-23  9:17   ` Oliver Neukum
  0 siblings, 0 replies; 4+ messages in thread
From: Oliver Neukum @ 2015-11-23  9:17 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-input

On Fri, 2015-11-20 at 11:00 +0100, Jiri Kosina wrote:
> On Thu, 5 Nov 2015, Oliver Neukum wrote:
> 
> > If an event is discarded the device stays idle.
> > Just reverse the order of check and marking busy.
> > 
> > Signed-off-by: Oliver Neukum <oneukum@suse.com>
> 
> Hi Oliver,
> 
> thanks for the fix. This is a real bug, so I am wondering whether you have 
> seen causing it real problems (and hence it should be merged for 4.4), or 
> if you found it just by code inspection (and therefore it should be fine 
> to merge it for 4.5).

Hi,

I was looking for another bug. So code inspection.

	HTH
		Oliver




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] usbhid: discarded events don't abort idleness
  2015-11-05 11:55 [PATCH] usbhid: discarded events don't abort idleness Oliver Neukum
  2015-11-20 10:00 ` Jiri Kosina
@ 2015-11-23 14:47 ` Jiri Kosina
  1 sibling, 0 replies; 4+ messages in thread
From: Jiri Kosina @ 2015-11-23 14:47 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-input

On Thu, 5 Nov 2015, Oliver Neukum wrote:

> If an event is discarded the device stays idle.
> Just reverse the order of check and marking busy.
> 
> Signed-off-by: Oliver Neukum <oneukum@suse.com>

Applied to for-4.5/core. Thanks,

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-23 14:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-05 11:55 [PATCH] usbhid: discarded events don't abort idleness Oliver Neukum
2015-11-20 10:00 ` Jiri Kosina
2015-11-23  9:17   ` Oliver Neukum
2015-11-23 14:47 ` Jiri Kosina

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.