mabe a bug in kernel 5.4 since patchlevel 159 - dma error because use ttynull?

jim.cromie at gmail.com jim.cromie at gmail.com
Thu Oct 13 11:11:13 EDT 2022


On Thu, Oct 13, 2022 at 4:48 AM Simon Lindhorst <s.lindhorst at wut.de> wrote:
>
> Hello all,
>
>
> when I updated my Kernel from version 5.4.155 to 5.4.215 I get an strange xhci error:
>
> xhci-hcd f10f0000.usb3: ERROR unknown event type 37
> xhci-hcd f10f0000.usb3: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 13
>
> After a lot of this messages, my hardware makes a reboot without any more outputs.
>
> The error only occures when i add console=null to my kernel bootargs. When I add instead console=ttyS0,115200 no error occured.
>
> Now I go back in kernelversions. The error occured first in version 5.4.159. Between patchlevel 158 and 159 there is a change:
>
> --- linux-5.4.158/kernel/printk/printk.c    2021-11-06 13:59:45.000000000 +0100
> +++ linux-5.4.159/kernel/printk/printk.c    2021-11-12 14:43:05.000000000 +0100
> @@ -2193,8 +2193,15 @@
>      char *s, *options, *brl_options = NULL;
>      int idx;
>
> -    if (str[0] == 0)
> +    /*
> +     * console="" or console=null have been suggested as a way to
> +     * disable console output. Use ttynull that has been created
> +     * for exacly this purpose.
> +     */
> +    if (str[0] == 0 || strcmp(str, "null") == 0) {
> +        __add_preferred_console("ttynull", 0, NULL, NULL);
>          return 1;
> +    }
>
>      if (_braille_console_setup(&str, &brl_options))
>          return 1;
>
> I checked my kernelconfig and found that I have no ttynull device configured (CONFIG_NULL_TTY=n). Add CONFIG_NULL_TTY=y to my kernelconfig doesn't made a change.
>
> When I undo the change above, everything works fine.
>
>
> Does anybody know, what could be the main trigger for the error above?
>

while there have been lots of change to printk,
the code you cite is still there.
If that code is a candidate for the root-cause,
and you can re-create the error on master,
you are 1/2 the way to getting it fixed.

Also, note latest:

commit 3ef4ea3d84ca568dcd57816b9521e82e3bd94f08
Merge: 30d024b5058e 5eb17c1f458c
Author: Linus Torvalds <torvalds at linux-foundation.org>
Date:   Wed Mar 23 10:54:27 2022 -0700

    Merge tag 'printk-for-5.18' of
git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux

    Pull printk updates from Petr Mladek:

     - Make %pK behave the same as %p for kptr_restrict == 0 also with
       no_hash_pointers parameter

     - Ignore the default console in the device tree also when console=null
       or console="" is used on the command line

     - Document console=null and console="" behavior


that last one is pertinent.



More information about the Kernelnewbies mailing list