From: Chunfeng Yun Date: Tue, 24 Apr 2018 02:52:46 +0000 (+0800) Subject: usb: mtu3: avoid TX data length truncated in SS/SSP mode X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=288ee3c36255d0c2d32830313f527e1474a09e9f;p=openwrt%2Fstaging%2Fblogic.git 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: Chunfeng Yun Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/mtu3/mtu3_gadget_ep0.c b/drivers/usb/mtu3/mtu3_gadget_ep0.c index ebdcf7a38c29..d67b54099562 100644 --- a/drivers/usb/mtu3/mtu3_gadget_ep0.c +++ b/drivers/usb/mtu3/mtu3_gadget_ep0.c @@ -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__);