* [PATCH] HID: wake up reading tasks when debug event occurs
@ 2010-08-30 17:27 Chase Douglas
2010-09-08 10:03 ` Jiri Kosina
0 siblings, 1 reply; 2+ messages in thread
From: Chase Douglas @ 2010-08-30 17:27 UTC (permalink / raw)
To: Jiri Kosina
Cc: H Hartley Sweeten, Julia Lawall, Dmitry Torokhov, linux-input,
linux-kernel
From: Chase Douglas <chase.douglas@ubuntu.com>
Some devices poke the hid core in a way that causes hid_debug_event to
be called, while never calling hid_dump_input. Without this wakeup
addition, tasks reading for hid events through debugfs may never see any
events. It may be that a well written driver doesn't cause this, but
then what's the point of debugfs?
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
---
drivers/hid/hid-debug.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index 850d02a..adff4ef 100644
--- a/drivers/hid/hid-debug.c
+++ b/drivers/hid/hid-debug.c
@@ -570,6 +570,8 @@ void hid_debug_event(struct hid_device *hdev, char *buf)
buf[i];
list->tail = (list->tail + i) % HID_DEBUG_BUFSIZE;
}
+
+ wake_up_interruptible(&hdev->debug_wait);
}
EXPORT_SYMBOL_GPL(hid_debug_event);
--
1.7.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] HID: wake up reading tasks when debug event occurs
2010-08-30 17:27 [PATCH] HID: wake up reading tasks when debug event occurs Chase Douglas
@ 2010-09-08 10:03 ` Jiri Kosina
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2010-09-08 10:03 UTC (permalink / raw)
To: Chase Douglas
Cc: H Hartley Sweeten, Julia Lawall, Dmitry Torokhov, linux-input,
linux-kernel
On Mon, 30 Aug 2010, Chase Douglas wrote:
> From: Chase Douglas <chase.douglas@ubuntu.com>
>
> Some devices poke the hid core in a way that causes hid_debug_event to
> be called, while never calling hid_dump_input. Without this wakeup
> addition, tasks reading for hid events through debugfs may never see any
> events. It may be that a well written driver doesn't cause this, but
> then what's the point of debugfs?
Well the main reason for the debugfs interface has been to debug strange
devices. But your fix is a clear improvement for pathological cases, which
is OK for debugging interface.
Applied, thanks.
>
> Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
> ---
> drivers/hid/hid-debug.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
> index 850d02a..adff4ef 100644
> --- a/drivers/hid/hid-debug.c
> +++ b/drivers/hid/hid-debug.c
> @@ -570,6 +570,8 @@ void hid_debug_event(struct hid_device *hdev, char *buf)
> buf[i];
> list->tail = (list->tail + i) % HID_DEBUG_BUFSIZE;
> }
> +
> + wake_up_interruptible(&hdev->debug_wait);
> }
> EXPORT_SYMBOL_GPL(hid_debug_event);
>
> --
> 1.7.1
>
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-08 10:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-30 17:27 [PATCH] HID: wake up reading tasks when debug event occurs Chase Douglas
2010-09-08 10:03 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®