lkml.org 
[lkml]   [2021]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] usb: cdnsp: Fix incorrect status for control request
On 21-12-07 10:18:38, Pawel Laszczak wrote:
> From: Pawel Laszczak <pawell@cadence.com>
>
> Patch fixes incorrect status for control request.
> Without this fix all usb_request objects were returned to upper drivers
> with usb_reqest->status field set to -EINPROGRESS.
>
> Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
> Reported-by: Ken (Jian) He <jianhe@ambarella.com>
> cc: <stable@vger.kernel.org>
> Signed-off-by: Pawel Laszczak <pawell@cadence.com>
> ---
> drivers/usb/cdns3/cdnsp-ring.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/usb/cdns3/cdnsp-ring.c b/drivers/usb/cdns3/cdnsp-ring.c
> index 1b1438457fb0..e8f5ecbb5c75 100644
> --- a/drivers/usb/cdns3/cdnsp-ring.c
> +++ b/drivers/usb/cdns3/cdnsp-ring.c
> @@ -1029,6 +1029,8 @@ static void cdnsp_process_ctrl_td(struct cdnsp_device *pdev,
> return;
> }
>
> + *status = 0;
> +
> cdnsp_finish_td(pdev, td, event, pep, status);
> }
>
> --
I think you may move *status = 0 at the beginning of
cdnsp_process_ctrl_td in case you would like to handle some error
conditions during this function.

--

Thanks,
Peter Chen

\
 
 \ /
  Last update: 2021-12-09 12:34    [W:0.076 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site