mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
28150775bf0e60e497ab50524c78dbf971be1d60
The xhci hcd use the port polling timer (rh_timer) to poll the roothub for port events. But we can't allow the USB core to poll the port events during shutdown because the xhci controller may be disable and can't be accessed in shutdown. If we access xhci port registers with port polling timer after xhci shutdown, it may cause kernel crash or unexpected behavior. So we need to stop the port polling timer while shutdown xhci. I can easily reproduce the issue on rk3399 platform, plug in a Type-C hub and an USB ethernet dongle, then do reboot test, result in a crash with the following backtrace. Unhandled fault: synchronous external abort (0x96000010) at 0xffffff80002f0430 Internal error: : 96000010 [#1] PREEMPT SMP task: ffffffc001092cb0 ti: ffffffc00107c000 task.ti: ffffffc00107c000 PC is at xhci_hub_status_data+0xec/0x1e4 LR is at xhci_hub_status_data+0xb0/0x1e4 [<ffffffc00067a210>] xhci_hub_status_data+0xec/0x1e4 [<ffffffc00063ebf8>] usb_hcd_poll_rh_status+0x54/0x148 [<ffffffc00063ed0c>] rh_timer_func+0x20/0x2c [<ffffffc0002845cc>] call_timer_fn+0xa4/0x1c8 [<ffffffc000284964>] run_timer_softirq+0x248/0x2cc [<ffffffc000200928>] __do_softirq+0x178/0x338 [<ffffffc000224b08>] irq_exit+0x78/0xc0 [<ffffffc00027089c>] __handle_domain_irq+0x9c/0xbc [<ffffffc0002006f4>] gic_handle_irq+0xcc/0x188 BUG=chrome-os-partner:59111 TEST=Plug in a Type-C hub, then do reboot test, check if kernel crash during shutdown. Change-Id: I3ca3d12d101241cd78138ea5d995708a2893d1a0 Signed-off-by: William wu <wulf@rock-chips.com> Reviewed-on: https://chromium-review.googlesource.com/401121 Commit-Ready: Guenter Roeck <groeck@chromium.org> Tested-by: Guenter Roeck <groeck@chromium.org> Reviewed-by: Guenter Roeck <groeck@chromium.org>
Linux kernel
============
There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.
In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``. The formatted documentation can also be read online at:
https://www.kernel.org/doc/html/latest/
There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.
Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
Languages
C
97.7%
Assembly
1.6%
Makefile
0.3%
Perl
0.1%