From: David Laight > From: David Laight > > From: Alan Stern > > > On Wed, 15 Jan 2014, David Laight wrote: > > > > > > > I have a theory, I'll try to write a non-invasive patch. > ... > > > > > > Doesn't this mean you shouldn't change the ownership of a LINK TRB > > > until after you change the ownership of the TRB it points to? > > > > That is what I assume. > > In practise this means that the 'first_trb' (whose ownership is set > > last) has to be the one that is valid when prepare_ring() is called. > > > > The plan for the patch is: > > - Save the enq pointer in prepare_ring (in the ep_ring structure). > > - When writing a trb set the ownership unless it is the saved one > > (ignoring the value set by the caller). > > - At the end invert the ownership on the saved entry. > > Below is a possible patch, I've only compile tested it. > I've minimalised the patch by not removing all the code that saves > 'start_trb' and modifies the TRB_CYCLE bit. > If the patch works those parts can also be tidied up. I've had some feedback (in a private email) that the patch helps. This was using the ASMedia controller with the asx88179_178a ethernet device. So the theory was definitely on the right lines. And I managed to write the patch without any silly mistakes! David -- 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