linux-stable/drivers/usb/gadget
Lorenzo Colitti 424f50e646 usb: gadget: u_ether: enable qmult on SuperSpeed Plus as well
[ Upstream commit 4eea21dc67 ]

The u_ether driver has a qmult setting that multiplies the
transmit queue length (which by default is 2).

The intent is that it should be enabled at high/super speed, but
because the code does not explicitly check for USB_SUPER_PLUS,
it is disabled at that speed.

Fix this by ensuring that the queue multiplier is enabled for any
wired link at high speed or above. Using >= for USB_SPEED_*
constants seems correct because it is what the gadget_is_xxxspeed
functions do.

The queue multiplier substantially helps performance at higher
speeds. On a direct SuperSpeed Plus link to a Linux laptop,
iperf3 single TCP stream:

Before (qmult=1): 1.3 Gbps
After  (qmult=5): 3.2 Gbps

Fixes: 04617db7aa ("usb: gadget: add SS descriptors to Ethernet gadget")
Reviewed-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29 09:07:07 +01:00
..
function usb: gadget: u_ether: enable qmult on SuperSpeed Plus as well 2020-10-29 09:07:07 +01:00
legacy usb: gadget: legacy: fix redundant initialization warnings 2020-06-03 08:17:54 +02:00
udc usb: bdc: Halt controller on suspend 2020-08-21 09:48:06 +02:00
composite.c usb: gadget: Fix issue with config_ep_by_speed function 2020-06-25 15:41:55 +02:00
config.c
configfs.c USB: gadget: fix illegal array access in binding with UDC 2020-05-20 08:17:16 +02:00
configfs.h
epautoconf.c
functions.c
Kconfig
Makefile
u_f.c
u_f.h USB: gadget: u_f: Unbreak offset calculation in VLAs 2020-09-03 11:22:34 +02:00
u_os_desc.h
usbstring.c