[PATCH 0/4] usb: gadget: pch_udc: order IRQ and descriptor lifetimes
From: Myeonghun Pak
Date: Wed Oct 14 2026 - 23:49:34 EST
These fixes are part of our ongoing research while reviewing kernel code.
Apply after the published probe-cleanup and VBUS-work patches:
https://lore.kernel.org/all/20260811-pch-v1-1-f79801c1cd91@xxxxxxxxx/
https://lore.kernel.org/all/CAGEsz8GQR2vJ8ddedaLg=Yq_RoeTxgoXTQ4-QS8mJpDXNn36qA@xxxxxxxxxxxxxx/
1. Drain works and release IRQ handlers before cleanup; establish a final
controller interrupt mask after the PCI handler has finished.
2. Initialize DMA before IRQ registration; enable bus mastering afterwards.
3. Track successful EP0 mappings and return -EIO on mapping failure.
4. Return the EP0 data descriptor to its owning pool.
Compile-tested only.