Re: [PATCH 1/1] usb: ehci: put wmb at the end sitd/itd_link memory access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 23, 2017 at 03:39:20PM +0800, pierre kuo wrote:
> hi Greg:
> 
> 2017-03-23 15:15 GMT+08:00 Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>:
> > On Thu, Mar 23, 2017 at 03:09:05PM +0800, pierre Kuo wrote:
> >> for sitd_link and itd_link, put wmb after the last memory access to make
> >> sure ehci->period[frame] is visible before starting period schedule
> >
> > Is this fixing a known issue/bug that people are hitting?  Or are you
> > just finding this by looking at the code?
> I just finding this by looking at the code.
> 
> >
> >>
> >> Signed-off-by: pierre Kuo <vichy.kuo@xxxxxxxxx>
> >> ---
> >>  drivers/usb/host/ehci-sched.c | 6 ++++--
> >>  1 file changed, 4 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
> >> index 980a6b3..9bb708a 100644
> >> --- a/drivers/usb/host/ehci-sched.c
> >> +++ b/drivers/usb/host/ehci-sched.c
> >> @@ -1754,8 +1754,9 @@ static void reserve_release_iso_bandwidth(struct ehci_hcd *ehci,
> >>       itd->hw_next = *hw_p;
> >>       prev->itd = itd;
> >>       itd->frame = frame;
> >> -     wmb();
> >>       *hw_p = cpu_to_hc32(ehci, itd->itd_dma | Q_TYPE_ITD);
> >> +     /*  make sure ehci->period[frame] is visible */
> >
> > why an extra space in the comment?
> I use cvim template, and it will automatically put space at end of /*
> and before */

That's fine, but why did you add another one manually?

> since ./scripts/checkpatch.pl didn't complain, so I sent it out.
> should I remove the space and resent again?

Of course.

> > And is the comment correct here?
> The comment is added due to ./scripts/checkpatch.pl grumble me there
> should be comment before wmb();

Is the text of the comment correct?  It doesn't seem so to me...

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux