On Fri, Dec 19, 2014 at 12:40:16PM +0530, Amit Virdi wrote: > When SG is used, there are two loops iterating to prepare TRBs: > - Outer loop over the request_list > - Inner loop over the SG list > > The driver must stop preparing TRBs when the max TRBs have been prepared. The > code was missing break to get out of the outer loop. > > Signed-off-by: Amit Virdi <[email protected]>
which bug is this fixing ? Which kernels are affected ? This need to be
backported to which kernel ? Which commit introduced this bug ? How can
I validate this to be a valid fix ?
> ---
> drivers/usb/dwc3/gadget.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
> index 0eec2e917994..8f65ab3a3b92 100644
> --- a/drivers/usb/dwc3/gadget.c
> +++ b/drivers/usb/dwc3/gadget.c
> @@ -900,6 +900,9 @@ static void dwc3_prepare_trbs(struct dwc3_ep *dep, bool
> starting)
> if (last_one)
> break;
> }
> +
> + if (last_one)
> + break;
> } else {
> dma = req->request.dma;
> length = req->request.length;
> --
> 1.8.0
>
--
balbi
signature.asc
Description: Digital signature
