Patch "usb: gadget: u_ether: enable qmult on SuperSpeed Plus as well" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    usb: gadget: u_ether: enable qmult on SuperSpeed Plus as well

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     usb-gadget-u_ether-enable-qmult-on-superspeed-plus-a.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 31e2324c58b6e3d798d22ed0664bc77dfc6f69fe
Author: Lorenzo Colitti <lorenzo@xxxxxxxxxx>
Date:   Wed Aug 19 01:19:49 2020 +0900

    usb: gadget: u_ether: enable qmult on SuperSpeed Plus as well
    
    [ Upstream commit 4eea21dc67b0c6ba15ae41b1defa113a680a858e ]
    
    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: 04617db7aa68 ("usb: gadget: add SS descriptors to Ethernet gadget")
    Reviewed-by: Maciej Żenczykowski <maze@xxxxxxxxxx>
    Signed-off-by: Lorenzo Colitti <lorenzo@xxxxxxxxxx>
    Signed-off-by: Felipe Balbi <balbi@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c
index fbe96ef1ac7a4..891e9f7f40d59 100644
--- a/drivers/usb/gadget/function/u_ether.c
+++ b/drivers/usb/gadget/function/u_ether.c
@@ -93,7 +93,7 @@ struct eth_dev {
 static inline int qlen(struct usb_gadget *gadget, unsigned qmult)
 {
 	if (gadget_is_dualspeed(gadget) && (gadget->speed == USB_SPEED_HIGH ||
-					    gadget->speed == USB_SPEED_SUPER))
+					    gadget->speed >= USB_SPEED_SUPER))
 		return qmult * DEFAULT_QLEN;
 	else
 		return DEFAULT_QLEN;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux