Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36448c46 authored by Jack Pham's avatar Jack Pham
Browse files

usb: gadget: throttle IRQ rate for SuperSpeed



There was a merge error from commit 6e0c86d1 "USB: gadget:
u_ether: Fix data stall issue in RNDIS tethering mode"
that resulted in the accidental removal of checking if
the gadget is connected at SuperSpeed. Re-introduce this
check so that IRQs on the downlink path are throttled,
decreasing the load on the CPU.

Change-Id: Ic2aa1d433e0fded95c6e825a760e89f726360522
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 39e0d0b3
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -866,9 +866,10 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb,

	req->length = length;

	/* throttle highspeed IRQ rate back slightly */
	/* throttle high/super speed IRQ rate back slightly */
	if (gadget_is_dualspeed(dev->gadget) &&
			 (dev->gadget->speed == USB_SPEED_HIGH)) {
		 (dev->gadget->speed == USB_SPEED_HIGH ||
		  dev->gadget->speed == USB_SPEED_SUPER)) {
		dev->tx_qlen++;
		if (dev->tx_qlen == (qmult/2)) {
			req->no_interrupt = 0;