Re: [rtc-linux] Re: [PATCH 2/2 RESEND] rtc: rtc-hid-sensor-time:enable HID input processing early

From: Alexander Holler
Date: Fri Aug 09 2013 - 12:22:47 EST

Am 09.08.2013 13:12, schrieb Jiri Kosina:
On Fri, 9 Aug 2013, Alexander Holler wrote:

[ INFO: inconsistent lock state ]
3.10.5-dockstar-00038-g03242d1-dirty #408 Not tainted
inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
swapper/0 [HC1[1]:SC0[0]:HE0:SE1] takes:
(&(&sd->dyn_callback_lock)->rlock){?.+...}, at: [<c02af9f8>]
{HARDIRQ-ON-W} state was registered at:

I think you need the patch below. Please let me know if it fixes it.

Thanks a lot. That actually fixed the bug I never have seen before and the patch might be a candidate for the stable series (even if almost no one would see the problem because there don't seem to be many hid-sensor-hub users and the bug seems only to be visible with some debug options enabled).

Btw, I've lied and that bug happened with the enforced error path as well as during normal operation. It seems I have enabled some debug option in the kernel, I never had enabled before.

Unfortunaly that doesn't answer Andrew Mortons questions.

I've now also verified if hid-sensor-hub receives an event with sensor_hub_raw_event() in the error-path (hid_device_io_stop() called and probe() failed), and this still *does* happen. That event (input report) doesn't come through hid-sensor-hub to my driver, but I think this is because of my call to sensor_hub_remove_callback() which is in the error path too.
So I actually wonder why the input report still is reported from the hid-subsystem to hid-sensor-hub, even after I've called hid_device_io_stop() and probe() failed.
Maybe everything is still ok and I just got confused with the somehow complicate interactions between the usb- and hid-subsystem, hid-sensor-hub (which uses MFD) and rtc-hid-sensor-time.

I will also have a look if I find the seem to be missing down(), maybe that will offer some explanations to what goes on. Unfortunately I still don't know the complete path of events, I've stopped reading the source after you've told me about the patch from Andrew de los Reyes, beeing happy to have found a nice and proper solution (instead of the delayed rtc-device registering I did before). ;)


Alexander Holler
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at