Hello, I wrote:
Why does this have two different code paths for the
"unlink everything that the hardware doesn't have its
mittens on" branch?
It certainly *looks* goofy this way, and if it's not
buggy today then it'll probably grow some in the future.
Whoops, I see. The answer should have been in a comment;
Thank goodness. I hoped that I hadn't spent the time writing the
patch description in vain too... :-/
I'll fix that and send to Greg.
Answer to my question: because one branch must advance
the bulk or control queue the endpoint was on, but the
other branch doesn't.
Yes. The other branch also must not call musb_giveback() because
thel latter assumes to be called on active qh and will e.g. spoil the
saved toggle state otherwise.
There's *much more important* reason which somehow slipped out of my
attention (at least when writing the patch description): musb_giveback()
will clobber hw_ep->{in_out}_qh once it sees that URB list has emptied
which will ruin the current I/O. I'll reflect that in the updated patch
description.
WBR, Sergei
--
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