mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-24 10:28:57 +00:00
usb: gadget: net2280: fix endpoint max packet for super speed connections
This patch fixes the register offset used for super-speed connection's max packet size. Without it using the 338x series of devices in enhanced mode will only allow full or high speed operation to function correctly. Signed-off-by: Simon Appleby <simon.appleby@pickeringtest.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
This commit is contained in:
parent
7b0a271d5c
commit
ca1c118942
@ -369,9 +369,20 @@ static inline void set_max_speed(struct net2280_ep *ep, u32 max)
|
||||
static const u32 ep_enhanced[9] = { 0x10, 0x60, 0x30, 0x80,
|
||||
0x50, 0x20, 0x70, 0x40, 0x90 };
|
||||
|
||||
if (ep->dev->enhanced_mode)
|
||||
if (ep->dev->enhanced_mode) {
|
||||
reg = ep_enhanced[ep->num];
|
||||
else{
|
||||
switch (ep->dev->gadget.speed) {
|
||||
case USB_SPEED_SUPER:
|
||||
reg += 2;
|
||||
break;
|
||||
case USB_SPEED_FULL:
|
||||
reg += 1;
|
||||
break;
|
||||
case USB_SPEED_HIGH:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
reg = (ep->num + 1) * 0x10;
|
||||
if (ep->dev->gadget.speed != USB_SPEED_HIGH)
|
||||
reg += 1;
|
||||
|
Loading…
Reference in New Issue
Block a user