OpenCloudOS-Kernel/drivers/usb/chipidea
Xu Yang 84a13b97e8 usb: chipidea: core: handle power lost in workqueue
commit cc509b6a47e7c8998d9e41c273191299d5d9d631 upstream.

When power is recycled in usb controller during system power management,
the controller will recognize it and switch role if role has been changed
during power lost. In current design, it will be completed in resume()
function. However, this may bring issues since usb class devices have
their pm operations too and these device's resume() functions are still
not being called at this point. When usb controller recognized host role
should be stopped, these usb class devices will be removed at this point.
But these usb class devices can't be removed in some cases, such as scsi
devices. Since scsi driver may sync data to U-disk, however it will block
there because scsi drvier can only handle pm request when is in suspended
state. Therefore, there may exist a dependency between ci_resume() and usb
class device's resume(). To break this potential dependency, we need to
handle power lost work in a workqueue.

Fixes: 74494b3321 ("usb: chipidea: core: add controller resume support when controller is powered off")
cc: stable@vger.kernel.org
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Link: https://lore.kernel.org/r/20240119123537.3614838-1-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-23 09:24:57 +01:00
..
Kconfig usb: chipidea: make configs for glue drivers visible with EXPERT 2022-09-08 13:32:50 +02:00
Makefile usb: chipidea: imx: avoid unnecessary probe defer 2023-04-05 19:16:59 +02:00
bits.h
ci.h usb: chipidea: core: handle power lost in workqueue 2024-02-23 09:24:57 +01:00
ci_hdrc_imx.c usb: chipidea: add workaround for chipidea PEC bug 2023-08-09 14:16:06 +02:00
ci_hdrc_imx.h usb: chipidea: imx: add one fsl picophy parameter tuning implementation 2023-07-25 18:21:52 +02:00
ci_hdrc_msm.c usb: chipidea/ci_hdrc_msm: Convert to platform remove callback returning void 2023-05-28 12:36:15 +01:00
ci_hdrc_pci.c
ci_hdrc_tegra.c usb: Explicitly include correct DT includes 2023-07-25 18:20:02 +02:00
ci_hdrc_usb2.c usb: chipidea/ci_hdrc_usb2: Convert to platform remove callback returning void 2023-05-28 12:36:15 +01:00
core.c usb: chipidea: core: handle power lost in workqueue 2024-02-23 09:24:57 +01:00
debug.c usb: chipidea: debug: remove redundant 'role' debug file 2023-03-23 17:27:46 +01:00
host.c usb: chipidea: Simplify Tegra DMA alignment code 2023-11-20 11:59:26 +01:00
host.h
otg.c usb: chipidea: core: fix possible concurrent when switch role 2023-03-23 18:17:32 +01:00
otg.h usb: chipidea: core: add controller resume support when controller is powered off 2022-10-23 14:34:53 +02:00
otg_fsm.c usb: chipidea: fix deadlock in ci_otg_del_timer 2022-11-09 12:34:18 +01:00
otg_fsm.h
trace.c usb: chipidea: add tracepoint support for udc 2020-12-10 08:45:26 +08:00
trace.h usb: chipidea: tracing: Use the new __vstring() helper 2022-07-15 17:44:40 -04:00
udc.c usb: chipidea: udc: Remove an unnecessary NULL value 2023-08-04 14:48:55 +02:00
udc.h
ulpi.c
usbmisc_imx.c usb: chipidea: imx: add one fsl picophy parameter tuning implementation 2023-07-25 18:21:52 +02:00