ch32 usbfs hcd: retire in-flight transfer across port reset

A transfer completing during port reset ran hcd_int_handler() with
DEV_ADDR already 0. get_edpt_record(0, ep) returns NULL for a
non-control endpoint, so PANIC() hung the board. Mask the transfer IRQ
with the detect IRQ, clear the busy and NAK-pending state, and only
treat UIF_TRANSFER as ours when UIE_TRANSFER is armed.
1 file changed