WSL2-Linux-Kernel/drivers/usb
Ferry Toth 4b51aa263a usb: ulpi: defer ulpi_register on ulpi_read_id timeout
[ Upstream commit 8a7b31d545 ]

Since commit 0f01017191 ("usb: dwc3: Don't switch OTG -> peripheral
if extcon is present") Dual Role support on Intel Merrifield platform
broke due to rearranging the call to dwc3_get_extcon().

It appears to be caused by ulpi_read_id() on the first test write failing
with -ETIMEDOUT. Currently ulpi_read_id() expects to discover the phy via
DT when the test write fails and returns 0 in that case, even if DT does not
provide the phy. As a result usb probe completes without phy.

Make ulpi_read_id() return -ETIMEDOUT to its user if the first test write
fails. The user should then handle it appropriately. A follow up patch
will make dwc3_core_init() set -EPROBE_DEFER in this case and bail out.

Fixes: ef6a7bcfb0 ("usb: ulpi: Support device discovery via DT")
Cc: stable@vger.kernel.org
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Ferry Toth <ftoth@exalondelft.nl>
Link: https://lore.kernel.org/r/20221205201527.13525-2-ftoth@exalondelft.nl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-18 11:48:52 +01:00
..
atm
c67x00
cdns3 usb: cdnsp: fix lack of ZLP for ep0 2022-12-31 13:14:46 +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: ulpi: defer ulpi_register on ulpi_read_id timeout 2023-01-18 11:48:52 +01: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: qcom: Fix memory leak in dwc3_qcom_interconnect_init 2023-01-12 11:58:41 +01:00
early Revert "usb: early: convert to readl_poll_timeout_atomic()" 2021-12-22 09:32:45 +01:00
gadget usb: gadget: f_hid: fix refcount leak on error path 2022-12-31 13:14:30 +01:00
host xhci: Prevent infinite loop in transaction errors recovery for streams 2022-12-31 13:14:46 +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 usb: roles: fix of node refcount leak in usb_role_switch_is_parent() 2022-12-31 13:14:30 +01:00
serial USB: serial: f81534: fix division by zero on line-speed change 2022-12-21 17:36:37 +01:00
storage usb: storage: Add check for kcalloc 2022-12-31 13:14:31 +01:00
typec usb: typec: Factor out non-PD fwnode properties 2022-12-31 13:14:28 +01:00
usbip usb: usbip: add missing device lock on tweak configuration cmd 2022-06-14 18:36:04 +02:00
Kconfig usb: remove reference to deleted config STB03xxx 2021-08-18 15:32:19 +02:00
Makefile usb: host: remove line for obsolete config USB_HWA_HCD 2021-08-18 15:32:19 +02:00
usb-skeleton.c