Starting with Kernel 4.16 the infrared remote has stopped working. Using "ir-keytable -t" does not produce any result when pressing keys on the IR remote. On 4.15.x kernels the same command works as expected. I have specifically tested it with 4.15.15-1 and 4.16.1-1 kernels, so it is a regression from 4.15 to 4.16. I have compared the kernel source between those versions and indeed there was some refactoring in exactly this area (drivers/media/rc). My hardware is a Zotac ZBOX nano ID62 (http://old.zotac.com/au/products/mini-pcs/zbox-m-series/product/zbox-m-series/detail/zbox-nano-id62.html). On a different hardware with an iMON remote everything works as expected. Cheers, Curly060 =;->
I can confirm this bug on a ASRock Beebox-S 7200U.
Created attachment 276093 [details] Series of 3 patches, you only need the first one though I'm seeing the same issue. It seems that we're not getting any interrupts since v4.16. I bisected it to: commit cb84343fced1febb5b21a9ef9082a07bfc3e7427 Author: Sean Young <sean@mess.org> Date: Sat Sep 23 17:44:03 2017 -0400 media: lirc: do not call close() or open() on unregistered devices If a lirc chardev is held open after a device is unplugged, rc_close() will be called after rc_unregister_device(). The driver is not expecting any calls at this point, and the iguanair driver causes an oops in this scenario. rc_open() can be called when the device is removed too, by calling open on the chardev whilst the device is being removed. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> But the commit looks good, so I don't think it's the real problem. I think that the real problem is caused by the fact that in nuvoton-cir we're writing to registers when the device is disabled... I've attached a series that fixes the issue, first patch should be enough to fix the issue, the other two are just minor refactoring. I'd appreciate if you could test it.
I have compiled the 4.16 kernel with all your patches applied and it does work indeed now. Great, thank you! Cheers, Curly060 =;->
Any chance of this getting merged in soon? The first patch at least is super trivial so that could be merged without the refactor if desired.
Nuvoton fixups are merged (for 4.18). Sean also created a fix in media/rc (enough to make this bug no longer reproducable), and that is also merged: d7832cd2a3c8 ("media: rc: ensure input/lirc device can be opened after register") This one has Cc:stable and is available in v4.17.3: b72cee00bc77 ("media: rc: ensure input/lirc device can be opened after register")