diff options
author | Jun Li <jun.li@nxp.com> | 2019-09-10 09:54:57 +0300 |
---|---|---|
committer | Peter Chen <peter.chen@nxp.com> | 2019-11-18 11:45:30 +0300 |
commit | 72dc8df7920fc24eba0f586c56e900a1643ff2b3 (patch) | |
tree | c9caf1c2e45a8864e3e496bb62f03f475bdb6fc5 /.get_maintainer.ignore | |
parent | d16ab536aad208421c5ed32cdcb01b5ab6aa1f19 (diff) | |
download | linux-72dc8df7920fc24eba0f586c56e900a1643ff2b3.tar.xz |
usb: chipidea: udc: protect usb interrupt enable
We hit the problem with below sequence:
- ci_udc_vbus_session() update vbus_active flag and ci->driver
is valid,
- before calling the ci_hdrc_gadget_connect(),
usb_gadget_udc_stop() is called by application remove gadget
driver,
- ci_udc_vbus_session() will contine do ci_hdrc_gadget_connect() as
gadget_ready is 1, so udc interrupt is enabled, but ci->driver is
NULL.
- USB connection irq generated but ci->driver is NULL.
As udc irq only should be enabled when gadget driver is binded, so
add spinlock to protect the usb irq enable for vbus session handling.
Signed-off-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Diffstat (limited to '.get_maintainer.ignore')
0 files changed, 0 insertions, 0 deletions