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

Commit 5cdb2f19 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: u_ether: add tx multipler module param"

parents 8df452d7 736f89e8
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -154,6 +154,18 @@ static unsigned qmult = 20;
module_param(qmult, uint, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(qmult, "queue length multiplier at high/super speed");

/*
 * Usually downlink rates are higher than uplink rates and it
 * deserve higher number of requests. For CAT-6 data rates of
 * 300Mbps (~30 packets per milli-sec) 40 usb request may not
 * be sufficient. At this rate and with interrupt moderation
 * of interconnect, data can be very bursty. tx_qmult is the
 * additional multipler on qmult.
 */
static unsigned tx_qmult = 1;
module_param(tx_qmult, uint, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(tx_qmult, "Additional queue length multiplier for tx");

/* for dual-speed hardware, use deeper queues at high/super speed */
static inline int qlen(struct usb_gadget *gadget)
{
@@ -512,7 +524,7 @@ static int alloc_requests(struct eth_dev *dev, struct gether *link, unsigned n)
	int	status;

	spin_lock(&dev->req_lock);
	status = prealloc(&dev->tx_reqs, link->in_ep, n,
	status = prealloc(&dev->tx_reqs, link->in_ep, n * tx_qmult,
				dev->gadget->sg_supported,
				dev->header_len);
	if (status < 0)