On Thu, Dec 20, 2018 at 2:12 AM Felipe Balbi <balbi@xxxxxxxxxx> wrote: > > You're using a really old kernel. Please try with v4.19.11 or v4.20-rc7 > I have to use an altera patched kernel linux-socfpga to boot my board, and it always lags behind mainline kernel. If I really had to, I can probably backport an individual driver (I already backported dwc2 from 4.17). Anyways, in principal is this a bug in dwc2 or libcomposite? That is, is libcomposite correct in assuming the dwc2 should call the gadget "resume" callback when the plug is reinserted? Or should libcomposite getting just the gadget "reset" be enough for it to know it may need to update the suspended flag? I played around with my hardware a bit more, and when I suspend/resume the gadget from the host over the usb bus (rather than pulling out then reinserting the physical cable) it works fine. That is, the dwc2 hardware generates a suspend interrupt then later a resume/wakeup interrupt which results in the gadget "resume" callback getting called. However, when pulling/reinserting the cable only the suspend interrupt is generated. When the cable is reinserted, there is no resume/wakeup interrupt (only some usb reset interrupts) and thus the gadget "resume" is never called. -- Frank