summaryrefslogtreecommitdiff
path: root/SConscript
diff options
context:
space:
mode:
authorzelong_666 <[email protected]>2026-10-08 20:01:10 +0800
committersakumisu <[email protected]>2026-10-08 22:05:44 +0800
commit379b6a2cdb58b90ac2d338d18bdbb911fef4fafd (patch)
tree58f84a3a5ab22afd09c00aa2dd4bbd03b766268c /SConscript
parent17ff1f0045d3ee28a604c66bebeab3a9bb7f653e (diff)
fix(port/musb): Use the mapped channel in usbh_kill_urb on SiFli 52/56
usbh_kill_urb() derived both the channel to mask and the channel to flush from the endpoint number ((urb->ep->bEndpointAddress & 0x0f) and bEndpointAddress itself), which only holds when the channel number equals the endpoint number. When MUSB_SIFLI_EP_MAP is in use the channel is assigned by sifli_ep_map_alloc(): the SiFli 52/56 host channels are pooled per direction (IN ch1..ch4, OUT ch5..ch7), so e.g. EP1 OUT lives on ch5 and EP2 OUT on ch6. Masking by endpoint number therefore clears the interrupt enable of an unrelated channel and leaves the aborted channel's interrupt armed, and musb_fifo_flush() is asked to clean the FIFO of a different endpoint than the one the URB was using. Take the channel from pipe->chidx, which is the channel the URB was submitted on, and rebuild the byte musb_fifo_flush() expects (direction in bit7, channel in bits 6:0). Non-mapped MUSB ports keep their previous behaviour. EP0 is unaffected either way: with chidx 0 and bEndpointAddress 0 both forms resolve to bit 0 and byte 0.
Diffstat (limited to 'SConscript')
0 files changed, 0 insertions, 0 deletions