linux/drivers/usb
Alan Stern 19502e6911 USB: hub: Clean up use of port initialization schemes and retries
The SET_CONFIG_TRIES macro in hub.c is badly named; it controls the
number of port-initialization retry attempts rather than the number of
Set-Configuration attempts.  Furthermore, the USE_NEW_SCHEME macro and
use_new_scheme() function are written in a very confusing manner,
making it almost impossible to figure out exactly what they do or
check that they are correct.

This patch renames SET_CONFIG_TRIES to PORT_INIT_TRIES, removes
USE_NEW_SCHEME entirely, and rewrites use_new_scheme() to be much more
transparent, with added comments explaining how it works.  The patch
also pulls the single call site of use_new_scheme() out from the
Get-Descriptor retry loop (where it returns the same value each time)
and renames the local variable used to store the result.

The overall effect is a minor cleanup.  However, there is one
functional change: If the "use_both_schemes" module parameter isn't
set (by default it is set), the existing code does only two retry
iterations.  After this patch it will always perform four, regardless
of the parameter's value.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20200928152050.GA134701@rowland.harvard.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-02 11:28:59 +02:00
..
atm usb: atm: don't use snprintf() for sysfs attrs 2020-08-25 19:11:18 +02:00
c67x00 Linux 5.9-rc3 2020-08-31 07:11:45 +02:00
cdns3 usb: cdns3: convert to devm_platform_ioremap_resource_byname 2020-07-29 16:49:37 +02:00
chipidea usb: chipidea: ci_hdrc_imx: restore pinctrl 2020-09-03 16:32:07 +08:00
class USB: cdc-acm: clean up no-union-descriptor handling 2020-09-25 17:01:12 +02:00
common usb: common: usb-conn-gpio: Print error on failure to get VBUS 2020-08-18 12:13:44 +02:00
core USB: hub: Clean up use of port initialization schemes and retries 2020-10-02 11:28:59 +02:00
dwc2 usb: dwc2: Always disable regulators on driver teardown 2020-09-16 13:06:56 +02:00
dwc3 Revert "usb: dwc3: meson-g12a: fix shared reset control use" 2020-09-04 16:41:22 +02:00
early usb: early: ehci-dbgp: convert to readl_poll_timeout_atomic() 2020-09-25 16:29:09 +02:00
gadget usb: udc: net2280: convert to readl_poll_timeout_atomic() 2020-09-25 16:30:06 +02:00
host usb: fotg210-hcd: convert to readl_poll_timeout_atomic() 2020-09-25 16:30:05 +02:00
image USB: microtek: use set_host_byte() 2020-09-16 12:42:10 +02:00
isp1760 usb: isp1760-hcd: convert to readl_poll_timeout_atomic() 2020-09-25 16:30:05 +02:00
misc USB: legousbtower: use usb_control_msg_recv() 2020-09-25 16:33:59 +02:00
mon USB: mon: Use scnprintf() for avoiding potential buffer overflow 2020-03-12 09:49:28 +01:00
mtu3 usb: mtu3: Remove unsused inline function is_first_entry 2020-08-18 12:11:55 +02:00
musb treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
phy usb: phy: phy-mv-usb: convert to readl_poll_timeout_atomic() 2020-09-25 16:30:06 +02:00
renesas_usbhs usb: Use fallthrough pseudo-keyword 2020-07-10 08:55:17 +02:00
roles usb: roles: Switch on role-switch uevent reporting 2020-05-13 14:20:49 +02:00
serial Merge 5.9-rc5 into usb-next 2020-09-14 10:10:55 +02:00
storage USB: UAS: use macro for reporting results 2020-09-16 12:43:35 +02:00
typec Merge 5.0-rc6 into usb-next 2020-09-21 09:06:42 +02:00
usbip usbip: simplify the return expression of usbip_core_init() 2020-09-16 10:54:49 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
usb-skeleton.c USB: usb-skeleton: drop redundant in-urb check 2019-10-10 12:41:19 +02:00