[PATCH] [RFC] EHCI: add to memory barrier to updating hw_next
stern at rowland.harvard.edu
Fri Jul 19 11:26:56 EDT 2013
On Fri, 19 Jul 2013, Gioh Kim wrote:
> > I was going to ask the same question. This particular piece of code gets
> > executed _only_ when an URB is unlinked. Not during any other kind of
> > error.
> I've got the problem when I listened to the mp3 file of USB HDD.
> I checked the urb data when the problem occurred, the last-status value of
> urb was EINPROGRESS and
> urb->unlinked was ECONNRESET.
Ah, so the URB _was_ unlinked.
> I think the 'stopped' case was occurred by the reset of USB port.
> The block device driver did reset USB port because there is no return from
> USB device.
> If I made block device driver could not reset USB port, the EHCI driver
> codes were not executed.
> Finally the halt of HC makes 'stopped' case.
Why was the HC halted? That should happen only when there is an
extremely severe error.
> I think halt of the HC might be caused that store-buffer delays command for
> When I applied the patch from https://lkml.org/lkml/2011/8/31/344 and added
> a mb() into hw_next updating
> to remove delay of store-buffer, My platform works well.
> Can the store-buffer delay halt HC? Is it possible?
I don't see how. It could slow things down but it should not cause any
> IMHO, if the qTD list is broken the HC think there is no qTD to send.
> So I added mb() at hw_next update code.
At the time when the hw_next update gets executed, what is the value of
"state"? It should be QH_STATE_IDLE.
More information about the linux-arm-kernel