Bug 214875
Summary: | USB 3.1 device cannot be detected | ||
---|---|---|---|
Product: | Drivers | Reporter: | Walt Jr. Brake (mr.yming81) |
Component: | USB | Assignee: | Default virtual assignee for Drivers/USB (drivers_usb) |
Status: | RESOLVED PATCH_ALREADY_AVAILABLE | ||
Severity: | blocking | CC: | chunfeng.yun, tucci.michele |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 5.10.42 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Walt Jr. Brake
2021-10-30 05:44:15 UTC
Yesterday I try to fix it myself, and after I revert the patch [usb: core: reduce power-on-good delay time of root hub](https://lore.kernel.org/all/1618017645-12259-1-git-send-email-chunfeng.yun%40mediatek.com/), compile the kernel and test, it works. Here is the patch: diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h index 22ea1f4f2d66..73f4482d833a 100644 --- a/drivers/usb/core/hub.h +++ b/drivers/usb/core/hub.h @@ -148,10 +148,8 @@ static inline unsigned hub_power_on_good_delay(struct usb_hub *hub) { unsigned delay = hub->descriptor->bPwrOn2PwrGood * 2; - if (!hub->hdev->parent) /* root hub */ - return delay; - else /* Wait at least 100 msec for power to become stable */ - return max(delay, 100U); + /* Wait at least 100 msec for power to become stable */ + return max(delay, 100U); } static inline int hub_port_debounce_be_connected(struct usb_hub *hub, correct the patch display format ``` diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h index 22ea1f4f2d66..73f4482d833a 100644 --- a/drivers/usb/core/hub.h +++ b/drivers/usb/core/hub.h @@ -148,10 +148,8 @@ static inline unsigned hub_power_on_good_delay(struct usb_hub *hub) { unsigned delay = hub->descriptor->bPwrOn2PwrGood * 2; - if (!hub->hdev->parent) /* root hub */ - return delay; - else /* Wait at least 100 msec for power to become stable */ - return max(delay, 100U); + /* Wait at least 100 msec for power to become stable */ + return max(delay, 100U); } static inline int hub_port_debounce_be_connected(struct usb_hub *hub, ``` It can be fixed by assigning a bigger value to bPwrOn2PwrGood in xhci controller driver instead of usb core It was fixed by the patch [xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay](https://lore.kernel.org/all/20211105160036.549516-1-mathias.nyman@linux.intel.com/) Thanks for your works. My USB 3 external hard drive cannot be detected after this fix. To get it working again, I restored to 10 (20ms) the value of desc->bPwrOn2PwrGood in drivers/usb/host/xhci-hub.c:347. This is how the device looks like from lsusb: ``` Bus 004 Device 002: ID 174c:55aa ASMedia Technology Inc. ASM1051E ... ``` (In reply to Michele Tucci from comment #5) > My USB 3 external hard drive cannot be detected after this fix. > > To get it working again, I restored to 10 (20ms) the value of > desc->bPwrOn2PwrGood in drivers/usb/host/xhci-hub.c:347. > > This is how the device looks like from lsusb: > ``` > Bus 004 Device 002: ID 174c:55aa ASMedia Technology Inc. ASM1051E ... > ``` Maybe you should using the reply to instructions from https://lore.kernel.org/all/1618017645-12259-1-git-send-email-chunfeng.yun%40mediatek.com/ to raise the issue on the linux-usb mailing list. (In reply to Michele Tucci from comment #5) > My USB 3 external hard drive cannot be detected after this fix. > > To get it working again, I restored to 10 (20ms) the value of > desc->bPwrOn2PwrGood in drivers/usb/host/xhci-hub.c:347. > > This is how the device looks like from lsusb: > ``` > Bus 004 Device 002: ID 174c:55aa ASMedia Technology Inc. ASM1051E ... > ``` Then will be reproduced if revert below patch? https://lore.kernel.org/all/1618017645-12259-1-git-send-email-chunfeng.yun%40mediatek.com/ |