USB: host: hub: Adjust device speed after every port reset
To account for the possibility of a device coming out of second reset
operating at different speed compared to first, move the code that
stores device speed to be a part of hub_port_reset(). This way any
speed change happening as a result of port reset could be accounted
for.

The above behaviour was observed on i.MX51 ZII RDU1, on USBH2 port
connected to SMSC2660 USB Hub/SD card reader. For reasons unclear,
first reset would put it into Full Speed mode whereas second would
result in switch to High Speed. Artifically disabling second reset
would result in the device operating at Full Speed.

Not doing second speed adjustement on that board result would result
in un-processed control transfer and failure to execute
usb_set_address().

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent c1b48bc commit 0a6a3b4601a89c12bf22bef382083cbbbe8582b5
@Andrey Smirnov Andrey Smirnov authored on 29 Aug 2018
Sascha Hauer committed on 29 Aug 2018
Showing 3 changed files
View
drivers/usb/core/hub.c
View
drivers/usb/core/hub.h
View
drivers/usb/core/usb.c