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

Jules Maselbas jmaselbas at kalray.eu
Mon Mar 1 11:06:23 EST 2021


On Mon, Mar 01, 2021 at 05:03:31PM +0100, Sascha Hauer wrote:
> 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.
Ok thanks, I wasn't sure to send this as fixup or not.
I'll take a look at master next time.

> 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