linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND,1/5] usb: mtu3: avoid TX data length truncated in SS/SSP mode
@ 2018-05-05  2:21 Chunfeng Yun
  0 siblings, 0 replies; 3+ messages in thread
From: Chunfeng Yun @ 2018-05-05  2:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Felipe Balbi
  Cc: Matthias Brugger, Chunfeng Yun, linux-usb, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek

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>
---
 drivers/usb/mtu3/mtu3_gadget_ep0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/mtu3/mtu3_gadget_ep0.c b/drivers/usb/mtu3/mtu3_gadget_ep0.c
index ebdcf7a..d67b540 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__);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [RESEND,1/5] usb: mtu3: avoid TX data length truncated in SS/SSP mode
@ 2018-05-10  2:16 Chunfeng Yun
  0 siblings, 0 replies; 3+ messages in thread
From: Chunfeng Yun @ 2018-05-10  2:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Felipe Balbi, Matthias Brugger, linux-usb, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek

Hi, Greg

   Could you please pick up the series of patches, thanks a lot
 
On Sat, 2018-05-05 at 10:21 +0800, Chunfeng Yun wrote:
> 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>
> ---
>  drivers/usb/mtu3/mtu3_gadget_ep0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/mtu3/mtu3_gadget_ep0.c b/drivers/usb/mtu3/mtu3_gadget_ep0.c
> index ebdcf7a..d67b540 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__);
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [RESEND,1/5] usb: mtu3: avoid TX data length truncated in SS/SSP mode
@ 2018-05-10  3:11 Chunfeng Yun
  0 siblings, 0 replies; 3+ messages in thread
From: Chunfeng Yun @ 2018-05-10  3:11 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Felipe Balbi, Matthias Brugger, linux-usb, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek

Hi, Greg
On Thu, 2018-05-10 at 10:16 +0800, Chunfeng Yun wrote:
> Hi, Greg
> 
>    Could you please pick up the series of patches, thanks a lot
Please ignore it, I find a problem in [RESEND PATCH 4/5], and need send
a new version.

Very sorry

>  
> On Sat, 2018-05-05 at 10:21 +0800, Chunfeng Yun wrote:
> > 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>
> > ---
> >  drivers/usb/mtu3/mtu3_gadget_ep0.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/usb/mtu3/mtu3_gadget_ep0.c b/drivers/usb/mtu3/mtu3_gadget_ep0.c
> > index ebdcf7a..d67b540 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__);
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-10  3:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-10  3:11 [RESEND,1/5] usb: mtu3: avoid TX data length truncated in SS/SSP mode Chunfeng Yun
  -- strict thread matches above, loose matches on Subject: below --
2018-05-10  2:16 Chunfeng Yun
2018-05-05  2:21 Chunfeng Yun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).