Merge "usb: gadget: ether: Reduce max number of scatter/gather packets"

This commit is contained in:
Linux Build Service Account 2014-11-24 18:17:53 -08:00 committed by Gerrit - the friendly Code Review server
commit b67d397af1
2 changed files with 8 additions and 3 deletions

View file

@ -22,6 +22,11 @@
#include "u_rmnet.h"
#include "gadget_chips.h"
static unsigned int rmnet_dl_max_pkt_per_xfer = 7;
module_param(rmnet_dl_max_pkt_per_xfer, uint, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(rmnet_dl_max_pkt_per_xfer,
"Maximum packets per transfer for DL aggregation");
#define RMNET_NOTIFY_INTERVAL 5
#define RMNET_MAX_NOTIFY_SIZE sizeof(struct usb_cdc_notification)
@ -531,7 +536,8 @@ static int gport_rmnet_connect(struct f_rmnet *dev, unsigned intf)
return PTR_ERR(net);
}
gether_update_dl_max_pkts_per_xfer(&dev->gether_port, 10);
gether_update_dl_max_pkts_per_xfer(&dev->gether_port,
rmnet_dl_max_pkt_per_xfer);
gether_update_dl_max_xfer_size(&dev->gether_port, 16384);
break;
case USB_GADGET_XPORT_NONE:

View file

@ -511,7 +511,6 @@ static void rndis_response_complete(struct usb_ep *ep, struct usb_request *req)
}
}
#define MAX_PKTS_PER_XFER 10
static void rndis_command_complete(struct usb_ep *ep, struct usb_request *req)
{
struct f_rndis *rndis = req->context;
@ -543,7 +542,7 @@ static void rndis_command_complete(struct usb_ep *ep, struct usb_request *req)
* together too quickly. However, module param
* is not honored.
*/
rndis->port.dl_max_pkts_per_xfer = 5;
rndis->port.dl_max_pkts_per_xfer = 3;
gether_update_dl_max_pkts_per_xfer(&rndis->port,
rndis->port.dl_max_pkts_per_xfer);