Skip to content

Commit

Permalink
usb: mtu3: avoid TX data length truncated in SS/SSP mode
Browse files Browse the repository at this point in the history
The variable of 'count' is declared as u8, this will cause an issue
due to value truncated when works in SS or SSP mode and data length
is greater than 255, so change it as u32.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
  • Loading branch information
Chunfeng Yun authored and Felipe Balbi committed May 15, 2018
1 parent 64f5b56 commit 288ee3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/mtu3/mtu3_gadget_ep0.c
Original file line number Diff line number Diff line change
@@ -546,7 +546,7 @@ static void ep0_tx_state(struct mtu3 *mtu)
struct usb_request *req;
u32 csr;
u8 *src;
u8 count;
u32 count;
u32 maxp;

dev_dbg(mtu->dev, "%s\n", __func__);

0 comments on commit 288ee3c

Please sign in to comment.