lkml.org 
[lkml]   [2019]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/4] usb: dwc2: optionally assert phy reset when waking up
Hi,

On Fri, Apr 12, 2019 at 4:56 PM Matthias Kaehlcke <mka@chromium.org> wrote:
> > @@ -5271,11 +5282,10 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg)
> > hsotg->hc_ptr_array[i] = channel;
> > }
> >
> > - /* Initialize hsotg start work */
> > + /* Initialize work */
> > INIT_DELAYED_WORK(&hsotg->start_work, dwc2_hcd_start_func);
> > -
> > - /* Initialize port reset work */
> > INIT_DELAYED_WORK(&hsotg->reset_work, dwc2_hcd_reset_func);
> > + INIT_WORK(&hsotg->phy_reset_work, dwc2_hcd_phy_reset_func);
>
> You also want to make sure that the work is cancelled when the
> controller is stopped/removed. It seems dwc2_hcd_stop() would be a
> suitable place for that.

Good point. dwc2_hcd_stop() doesn't work though because it's called
with interrupts disabled (because it's holding the hsotg->lock
spinlock). I put it in dwc2_hcd_free() where there's another similar
cancel.

-Doug

\
 
 \ /
  Last update: 2019-04-16 23:55    [W:0.084 / U:1.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site