diff options
author | Paul Zimmerman <Paul.Zimmerman@synopsys.com> | 2011-06-27 14:13:18 -0700 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-07-08 13:55:30 +0300 |
commit | 04617db7aa688598ebd3fce20691d31a5e778b45 (patch) | |
tree | 101ac8a5892c1fb6e9aefe2a4acffc666ace3089 /drivers/usb/gadget/u_ether.c | |
parent | 96fe53ef5498ba130b2f054f2de38e090ddaa55f (diff) | |
download | linux-04617db7aa688598ebd3fce20691d31a5e778b45.tar.gz |
usb: gadget: add SS descriptors to Ethernet gadget
Add SuperSpeed descriptors to the Network USB
function drivers.
This has been lightly tested using a Linux host.
I was able to ssh from device to host and host to
device, no obvious problems seen.
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/u_ether.c')
-rw-r--r-- | drivers/usb/gadget/u_ether.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c index b91363e88db7..dfed4c1d96c0 100644 --- a/drivers/usb/gadget/u_ether.c +++ b/drivers/usb/gadget/u_ether.c @@ -97,16 +97,17 @@ struct eth_dev { static unsigned qmult = 5; module_param(qmult, uint, S_IRUGO|S_IWUSR); -MODULE_PARM_DESC(qmult, "queue length multiplier at high speed"); +MODULE_PARM_DESC(qmult, "queue length multiplier at high/super speed"); #else /* full speed (low speed doesn't do bulk) */ #define qmult 1 #endif -/* for dual-speed hardware, use deeper queues at highspeed */ +/* for dual-speed hardware, use deeper queues at high/super speed */ static inline int qlen(struct usb_gadget *gadget) { - if (gadget_is_dualspeed(gadget) && gadget->speed == USB_SPEED_HIGH) + if (gadget_is_dualspeed(gadget) && (gadget->speed == USB_SPEED_HIGH || + gadget->speed == USB_SPEED_SUPER)) return qmult * DEFAULT_QLEN; else return DEFAULT_QLEN; @@ -598,9 +599,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)) - req->no_interrupt = (dev->gadget->speed == USB_SPEED_HIGH) + req->no_interrupt = (dev->gadget->speed == USB_SPEED_HIGH || + dev->gadget->speed == USB_SPEED_SUPER) ? ((atomic_read(&dev->tx_qlen) % qmult) != 0) : 0; |