On 6/1/2016 11:38 PM, Felipe Balbi wrote: > > Hi, > > John Youn <John.Youn@xxxxxxxxxxxx> writes: >>>> However, I'm not aware of any issue with END_TRANSFER, could you let >>>> me know how to reproduce it? >>> >>> it's a rare and difficult bug to reproduce. If you take my testing/next >>> (I didn't check if it happens with v4.7-rc1) - $subject and keep large >>> mass storage transfers going on, eventually you'll see mass storage >>> hang. After some 30s, host side will timeout and cancel all URBs and >>> issue a bus reset. This will, in turn, cause the gadget driver to issue >>> END_TRANSFER to a possible in-flight transfer. >>> >>> After Reset completion, the gadget will reenumerate and, when gadget >>> driver queues to a bulk EP, StartTransfer will return "No Resource". The >>> reason for that is that END_TRANSFER deallocates the resource, according >>> to section 6.3.5.2 of 2.60a databook. > ^^^^^^^^^^^^^^^ > section 6.3.2.5.2 > That section is only saying the resource is used by the endpoint during the transfer, then it is "released", meaning it is not used, upon EndTransfer or XferComplete. Theoretically another endpoint could use that resource if it is unused. But if it is in-use by another endpoint, it will return an error upon StartTransfer. The assignment of resources to endpoints is not affected by the EndTransfer or XferComplete. Regards, John -- 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