All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Recent nuvoton-cir changes introduce a hang with nct6775
       [not found] <CAKv9HNaj76n4ccAJc6hGYm+B0acv3oyn1PHobUDCAafD2p9hgQ@mail.gmail.com>
@ 2016-07-06 21:25 ` Heiner Kallweit
  2016-07-07  5:50   ` Antti Seppälä
  0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2016-07-06 21:25 UTC (permalink / raw)
  To: Antti Seppälä; +Cc: linux-media

Am 06.07.2016 um 08:51 schrieb Antti Seppälä:
> Hello.
> 
> I recently updated my kernel to a newer version but couldn't boot it
> because it hangs.
> 
> It turns out that your patch[1] to nuvoton-cir has really bad
> side-effects when it interacts with nct6775 module. It could be that
> one of the devices never frees the request_muxed_region which causes
> the other module to wait indefinitely.
> 
> Reverting the patch or preventing nct6775 module from loading makes
> the issue go away.
> 
> Other people have run into this issue too[2].
> 
> This is a regression and should be fixed.
> Could you look into it and maybe submit a follow-up patch to fix this
> or shall I perhaps ask for a revert of the troublesome commit?
> 
> 
> [1]: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/media/rc/nuvoton-cir.c?id=3def9ad6d3066e597d0ce86801a81eedb130b04a
> 
> [2]: https://bbs.archlinux.org/viewtopic.php?id=213647
> 
> 
> Regards,
> 
Thanks for reporting. Indeed there may be an issue with systems using
the alternative EFM IO address of the Nuvoton chip.
Therefore it doesn't occur on all systems with this chip and then
only if the nct6775 driver is loaded after the nuvoton-cir driver.
Could you please check whether the following patch fixes the issue for you?

diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 99b303b..e8ceb0e 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -401,6 +401,7 @@ static int nvt_hw_detect(struct nvt_dev *nvt)
        /* Check if we're wired for the alternate EFER setup */
        nvt->chip_major = nvt_cr_read(nvt, CR_CHIP_ID_HI);
        if (nvt->chip_major == 0xff) {
+               nvt_efm_disable(nvt);
                nvt->cr_efir = CR_EFIR2;
                nvt->cr_efdr = CR_EFDR2;
                nvt_efm_enable(nvt);
--
2.9.0

Regards, Heiner


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

* Re: Recent nuvoton-cir changes introduce a hang with nct6775
  2016-07-06 21:25 ` Recent nuvoton-cir changes introduce a hang with nct6775 Heiner Kallweit
@ 2016-07-07  5:50   ` Antti Seppälä
  0 siblings, 0 replies; 2+ messages in thread
From: Antti Seppälä @ 2016-07-07  5:50 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: linux-media

On 7 July 2016 at 00:25, Heiner Kallweit <hkallweit1@gmail.com> wrote:
> Am 06.07.2016 um 08:51 schrieb Antti Seppälä:
>> Hello.
>>
>> I recently updated my kernel to a newer version but couldn't boot it
>> because it hangs.
>>
>> It turns out that your patch[1] to nuvoton-cir has really bad
>> side-effects when it interacts with nct6775 module. It could be that
>> one of the devices never frees the request_muxed_region which causes
>> the other module to wait indefinitely.
>>
>> Reverting the patch or preventing nct6775 module from loading makes
>> the issue go away.
>>
>> Other people have run into this issue too[2].
>>
>> This is a regression and should be fixed.
>> Could you look into it and maybe submit a follow-up patch to fix this
>> or shall I perhaps ask for a revert of the troublesome commit?
>>
>>
>> [1]: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/media/rc/nuvoton-cir.c?id=3def9ad6d3066e597d0ce86801a81eedb130b04a
>>
>> [2]: https://bbs.archlinux.org/viewtopic.php?id=213647
>>
>>
>> Regards,
>>
> Thanks for reporting. Indeed there may be an issue with systems using
> the alternative EFM IO address of the Nuvoton chip.
> Therefore it doesn't occur on all systems with this chip and then
> only if the nct6775 driver is loaded after the nuvoton-cir driver.
> Could you please check whether the following patch fixes the issue for you?
>
> diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
> index 99b303b..e8ceb0e 100644
> --- a/drivers/media/rc/nuvoton-cir.c
> +++ b/drivers/media/rc/nuvoton-cir.c
> @@ -401,6 +401,7 @@ static int nvt_hw_detect(struct nvt_dev *nvt)
>         /* Check if we're wired for the alternate EFER setup */
>         nvt->chip_major = nvt_cr_read(nvt, CR_CHIP_ID_HI);
>         if (nvt->chip_major == 0xff) {
> +               nvt_efm_disable(nvt);
>                 nvt->cr_efir = CR_EFIR2;
>                 nvt->cr_efdr = CR_EFDR2;
>                 nvt_efm_enable(nvt);
> --
> 2.9.0
>

Yes, I can confirm that with this patch the hang doesn't occur
anymore. Thank you!

Please submit a patch with proper commit message. I think it's best to
Cc it to stable@vger.kernel.org as well.

Best regards,
-- 
Antti

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

end of thread, other threads:[~2016-07-07  5:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAKv9HNaj76n4ccAJc6hGYm+B0acv3oyn1PHobUDCAafD2p9hgQ@mail.gmail.com>
2016-07-06 21:25 ` Recent nuvoton-cir changes introduce a hang with nct6775 Heiner Kallweit
2016-07-07  5:50   ` Antti Seppälä

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.