WSL2-Linux-Kernel/drivers/usb
Ivaylo Dimitrov 9db5992e72 usb: musb: remove extra check in musb_gadget_vbus_draw
[ Upstream commit ecec4b20d2 ]

The checks for musb->xceiv and musb->xceiv->set_power duplicate those in
usb_phy_set_power(), so there is no need of them. Moreover, not calling
usb_phy_set_power() results in usb_phy_set_charger_current() not being
called, so current USB config max current is not propagated through USB
charger framework and charger drivers may try to draw more current than
allowed or possible.

Fix that by removing those extra checks and calling usb_phy_set_power()
directly.

Tested on Motorola Droid4 and Nokia N900

Fixes: a9081a008f ("usb: phy: Add USB charger support")
Cc: stable <stable@kernel.org>
Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Link: https://lore.kernel.org/r/1669400475-4762-1-git-send-email-ivo.g.dimitrov.75@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:13:56 +01:00
..
atm
c67x00
cdns3 usb: cdnsp: fix issue with ZLP - added TD_SIZE = 1 2022-12-02 17:41:08 +01:00
chipidea usb: chipidea: fix deadlock in ci_otg_del_timer 2022-11-26 09:24:45 +01:00
class USB: cdc-acm: Add Icom PMR F3400 support (0c26:0020) 2022-09-08 12:28:06 +02:00
common usb: common: debug: Check non-standard control requests 2022-10-26 12:35:03 +02:00
core usb: add NO_LPM quirk for Realforce 87U Keyboard 2022-11-26 09:24:45 +01:00
dwc2 usb: dwc2: fix wrong order of phy_power_on and phy_init 2022-09-08 12:28:06 +02:00
dwc3 usb: dwc3: pci: Update PCIe device ID for USB3 controller on CPU sub-system for Raptor Lake 2022-12-21 17:36:37 +01:00
early Revert "usb: early: convert to readl_poll_timeout_atomic()" 2021-12-22 09:32:45 +01:00
gadget usb: gadget: uvc: Prevent buffer overflow in setup handler 2022-12-21 17:36:36 +01:00
host xhci: Apply XHCI_RESET_TO_DEFAULT quirk to ADL-N 2022-12-21 17:36:37 +01:00
image
isp1760 usb: isp1760: Fix out-of-bounds array access 2022-06-09 10:22:27 +02:00
misc usb: idmouse: fix an uninit-value in idmouse_open 2022-10-26 12:35:51 +02:00
mon usb: mon: make mmapped memory read only 2022-10-12 09:53:28 +02:00
mtu3 usb: mtu3: fix failed runtime suspend in host only mode 2022-10-26 12:35:19 +02:00
musb usb: musb: remove extra check in musb_gadget_vbus_draw 2022-12-31 13:13:56 +01:00
phy extcon: Fix extcon_get_extcon_dev() error handling 2022-06-14 18:36:21 +02:00
renesas_usbhs usb: renesas: Fix refcount leak bug 2022-08-25 11:40:33 +02:00
roles
serial USB: serial: f81534: fix division by zero on line-speed change 2022-12-21 17:36:37 +01:00
storage Revert "usb: storage: Add quirk for Samsung Fit flash" 2022-10-26 12:35:50 +02:00
typec usb: typec: mux: Enter safe mode only when pins need to be reconfigured 2022-11-26 09:24:45 +01:00
usbip usb: usbip: add missing device lock on tweak configuration cmd 2022-06-14 18:36:04 +02:00
Kconfig
Makefile
usb-skeleton.c