[PATCH 1/2] fixup! usb: gadget: dfu: Wrap fs operation in workqueue

Sascha Hauer s.hauer at pengutronix.de
Mon Mar 1 11:03:31 EST 2021


On Mon, Mar 01, 2021 at 10:30:39AM +0100, Jules Maselbas wrote:
> When not in mode "safe", do_close was never called.
> 
> Signed-off-by: Jules Maselbas <jmaselbas at kalray.eu>
> ---
>  drivers/usb/gadget/dfu.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

I have rewritten the commit messages while applying. fixup! is no longer
possible because the patch is already in master.

Applied, thanks

Sascha


> 
> diff --git a/drivers/usb/gadget/dfu.c b/drivers/usb/gadget/dfu.c
> index 82c9dc030..3234f25b3 100644
> --- a/drivers/usb/gadget/dfu.c
> +++ b/drivers/usb/gadget/dfu.c
> @@ -359,7 +359,6 @@ static void dfu_do_copy(struct dfu_work *dw)
>  	}
>  
>  	dfu->dfu_state = DFU_STATE_dfuIDLE;
> -	dfu_do_close(dw);
>  }
>  
>  static int
> @@ -557,6 +556,11 @@ static int handle_manifest(struct usb_function *f, const struct usb_ctrlrequest
>  		wq_queue_work(&dfu->wq, &dw->work);
>  	}
>  
> +	dw = xzalloc(sizeof(*dw));
> +	dw->dfu = dfu;
> +	dw->task = dfu_do_close;
> +	wq_queue_work(&dfu->wq, &dw->work);
> +
>  	return 0;
>  }
>  
> -- 
> 2.17.1
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list