Re: [RFC PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Bin Liu
On Thu, Mar 08, 2018 at 07:00:16PM +0100, Merlijn Wajer wrote: > Hi, > > On 08/03/18 17:46, Bin Liu wrote: > > > > No need to flush, the work is already cancelled at this point. > > > >> + > >>musb_writeb(musb->mregs, MUSB_DEVCTL, 0); > >> + musb_platform_exit(musb); > > > > This can be

Re: [RFC PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Merlijn Wajer
Hi, On 08/03/18 17:46, Bin Liu wrote: > No need to flush, the work is already cancelled at this point. > >> + >> musb_writeb(musb->mregs, MUSB_DEVCTL, 0); >> +musb_platform_exit(musb); > > This can be move down to out side of holding the spinlock, > >>

Re: [RFC PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Bin Liu
Hi, On Thu, Mar 08, 2018 at 10:31:21AM +0100, Merlijn Wajer wrote: > This fixes an oops on unbind / module unload. The fix is similar to the > one in this commit: 0c3aae9bd59978fb8c3557d7883380bef0f2cfa1 (USB: musb: > fix late external abort on suspend), which only fixes the issue for >

[RFC PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Merlijn Wajer
This fixes an oops on unbind / module unload. The fix is similar to the one in this commit: 0c3aae9bd59978fb8c3557d7883380bef0f2cfa1 (USB: musb: fix late external abort on suspend), which only fixes the issue for musb_suspend. musb_remove function now also flushes any work and also calls