Revert "usb: kbd: destroy device after console is stopped"
PATCH 1/1 Revert "usb: kbd: destroy device after console is stopped"
Reverts commit eb5fd9e46c1, it causes ARMv7 devices to stop booting Linux when a USB keyboard is attached. The kernels starts but there's no output. Reverting it makes things work again.
---
This has caused us issues on a number of ARMv7 deviices. I'm not sure why specifically ARMv7 because it happens on a RPi3 running Fedora armhfp, but doesn't happen on aarch64. Issue seen on RPis, Cubietruck, and others.
common/usb_kbd.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
common/usb_kbd.c +8 -8
@@ -622,12 +622,12 @@ int usb_kbd_deregister(int force)if (dev) { usb_kbd_dev = (struct usb_device *)dev->priv; data = usb_kbd_dev->privptr; +if (stdio_deregister_dev (dev, force) !=0 ) +return 1 ;#if CONFIG_IS_ENABLED (CONSOLE_MUX ) -if (iomux_replace_device (stdin,DEVNAME , force ?"nulldev" :"" )) +if (iomux_doenv (stdin,env_get ("stdin" )) !=0 )return 1 ;#endif -if (stdio_deregister_dev (dev, force) !=0 ) -return 1 ;#ifdef CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE destroy_int_queue (usb_kbd_dev, data->intq);#endif
@@ -665,16 +665,16 @@ static int usb_kbd_remove(struct udevice *dev) goto err; } data = udev->privptr; +if (stdio_deregister_dev (sdev, true)) { + ret = -EPERM ; + goto err; + }#if CONFIG_IS_ENABLED (CONSOLE_MUX ) -if (iomux_replace_device (stdin,DEVNAME ,"nulldev" )) { +if (iomux_doenv (stdin,env_get ("stdin" ))) { ret = -ENOLINK ; goto err; }#endif -if (stdio_deregister_dev (sdev, true)) { - ret = -EPERM ; - goto err; - }#ifdef CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE destroy_int_queue (udev, data->intq);#endif
Signature · 1 line
2.31.1
PATCH 1/1 Revert "usb: kbd: destroy device after console is stopped"
On Thu, Apr 22, 2021 at 10:19:10AM +0100, Peter Robinson wrote:
Thanks for the report.
Quoted 3 lines
Reverts commit
eb5fd9e46c1, it causes ARMv7 devices to stop booting Linux when a USB keyboard is attached. The kernels starts but there's no output. Reverting it makes things work again.
It's not good. When we revert, we introduce another (I consider more serious) bug.
Quoted 9 lines
Signed-off-by Peter Robinson <[email protected]>Cc Nicolas Saenz Julienne <[email protected]>Cc Andy Shevchenko <[email protected]>---
This has caused us issues on a number of ARMv7 deviices. I'm not sure why specifically ARMv7 because it happens on a RPi3 running Fedora armhfp, but doesn't happen on aarch64. Issue seen on RPis, Cubietruck, and others.
Can we conduct a bit of investigation here?
Is it using ATAGs or command line? How Linux kernel gets its parameters?
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH 1/1 Revert "usb: kbd: destroy device after console is stopped"
Quoted 11 lines · Andy Shevchenko
On Thu, Apr 22, 2021 at 10:19:10AM +0100, Peter Robinson wrote:
Thanks for the report.
Quoted 3 lines
Reverts commit
eb5fd9e46c1, it causes ARMv7 devices to stop booting Linux when a USB keyboard is attached. The kernels starts but there's no output. Reverting it makes things work again.It's not good. When we revert, we introduce another (I consider more serious) bug.
Sure, looking at the fixes tags I figured as much, but it also causes regressions itself. I figured sending a revert would at least start the discussion off.
Quoted 5 lines
Quoted 5 lines
Signed-off-by Peter Robinson <[email protected]>Cc Nicolas Saenz Julienne <[email protected]>Cc Andy Shevchenko <[email protected]>---
Quoted 7 lines
Quoted 4 lines
This has caused us issues on a number of ARMv7 deviices. I'm not sure why specifically ARMv7 because it happens on a RPi3 running Fedora armhfp, but doesn't happen on aarch64. Issue seen on RPis, Cubietruck, and others.
Can we conduct a bit of investigation here?
Is it using ATAGs or command line? How Linux kernel gets its parameters?
I believe command line, I've been testing booting using UEFI. TBH I'm unsure why I see the problem on ARMv7 and not using aarchc64 on the same device.
PATCH 1/1 Revert "usb: kbd: destroy device after console is stopped"
Quoted 3 lines · Peter Robinson
Quoted 1 line · Andy Shevchenko
On Thu, Apr 22, 2021 at 10:19:10AM +0100, Peter Robinson wrote:
...
Quoted 11 lines
Quoted 7 lines
Quoted 4 lines
This has caused us issues on a number of ARMv7 deviices. I'm not sure why specifically ARMv7 because it happens on a RPi3 running Fedora armhfp, but doesn't happen on aarch64. Issue seen on RPis, Cubietruck, and others.
Can we conduct a bit of investigation here?
Is it using ATAGs or command line? How Linux kernel gets its parameters?I believe command line, I've been testing booting using UEFI. TBH I'm unsure why I see the problem on ARMv7 and not using aarchc64 on the same device.
What is the command line in both cases?
(I'm not so familiar with ARM.aarch64 boards, but does it mean that the
hardware is absolutely the same, just the CPU mode is different?)
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH 1/1 Revert "usb: kbd: destroy device after console is stopped"
In reply to Peter RobinsonQuoted 28 lines · Peter Robinson
Quoted 11 lines · Andy Shevchenko
On Thu, Apr 22, 2021 at 10:19:10AM +0100, Peter Robinson wrote:
Thanks for the report.
Quoted 3 lines
Reverts commit
eb5fd9e46c1, it causes ARMv7 devices to stop booting Linux when a USB keyboard is attached. The kernels starts but there's no output. Reverting it makes things work again.It's not good. When we revert, we introduce another (I consider more serious) bug.
Sure, looking at the fixes tags I figured as much, but it also causes regressions itself. I figured sending a revert would at least start the discussion off.
Quoted 10 lines
Quoted 9 lines
Signed-off-by Peter Robinson <[email protected]>Cc Nicolas Saenz Julienne <[email protected]>Cc Andy Shevchenko <[email protected]>---
This has caused us issues on a number of ARMv7 deviices. I'm not sure why specifically ARMv7 because it happens on a RPi3 running Fedora armhfp, but doesn't happen on aarch64. Issue seen on RPis, Cubietruck, and others.
Quoted 6 lines
Quoted 2 lines
Can we conduct a bit of investigation here?
Is it using ATAGs or command line? How Linux kernel gets its parameters?I believe command line, I've been testing booting using UEFI. TBH I'm unsure why I see the problem on ARMv7 and not using aarchc64 on the same device.
And what is the U-Boot environment in both cases? (Can you share it somewhere?)
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH 1/1 Revert "usb: kbd: destroy device after console is stopped"
Quoted 29 lines · Andy Shevchenko
Quoted 28 lines · Peter Robinson
Quoted 11 lines · Andy Shevchenko
On Thu, Apr 22, 2021 at 10:19:10AM +0100, Peter Robinson wrote:
Thanks for the report.
Quoted 3 lines
Reverts commit
eb5fd9e46c1, it causes ARMv7 devices to stop booting Linux when a USB keyboard is attached. The kernels starts but there's no output. Reverting it makes things work again.It's not good. When we revert, we introduce another (I consider more serious) bug.
Sure, looking at the fixes tags I figured as much, but it also causes regressions itself. I figured sending a revert would at least start the discussion off.
Quoted 10 lines
Quoted 9 lines
Signed-off-by Peter Robinson <[email protected]>Cc Nicolas Saenz Julienne <[email protected]>Cc Andy Shevchenko <[email protected]>---
This has caused us issues on a number of ARMv7 deviices. I'm not sure why specifically ARMv7 because it happens on a RPi3 running Fedora armhfp, but doesn't happen on aarch64. Issue seen on RPis, Cubietruck, and others.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Can we conduct a bit of investigation here?
Is it using ATAGs or command line? How Linux kernel gets its parameters?I believe command line, I've been testing booting using UEFI. TBH I'm unsure why I see the problem on ARMv7 and not using aarchc64 on the same device.
And what is the U-Boot environment in both cases? (Can you share it somewhere?)
Could it be related to CONFIG_SYS_DEVICE_NULLDEV / CONFIG_NULLDEV_SERIAL not being set in one of the cases ?