Commit 288ee3c3 authored by Chunfeng Yun's avatar Chunfeng Yun Committed by Felipe Balbi

usb: mtu3: avoid TX data length truncated in SS/SSP mode

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: default avatarChunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 64f5b56c
...@@ -546,7 +546,7 @@ static void ep0_tx_state(struct mtu3 *mtu) ...@@ -546,7 +546,7 @@ static void ep0_tx_state(struct mtu3 *mtu)
struct usb_request *req; struct usb_request *req;
u32 csr; u32 csr;
u8 *src; u8 *src;
u8 count; u32 count;
u32 maxp; u32 maxp;
dev_dbg(mtu->dev, "%s\n", __func__); dev_dbg(mtu->dev, "%s\n", __func__);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment