dwc2: keep class endpoint buffers when DMA may be selected at runtime
With both CFG_TUD_DWC2_DMA_ENABLE and CFG_TUD_DWC2_SLAVE_ENABLE set, the
driver picks Buffer DMA or Slave mode per controller at runtime (GHWCFG2),
but CFG_TUD_EDPT_DEDICATED_HWFIFO followed SLAVE_ENABLE alone. Classes then
dropped their endpoint buffers and used usbd_edpt_xfer_fifo(), which leaves
xfer->buffer NULL: on a DMA-capable core the endpoint DMA address became 0,
the core raised AHBERR and the endpoint NAKed forever (CDC write hang on
STM32H7S3 OTG_HS).
- CFG_TUD/TUH_EDPT_DEDICATED_HWFIFO = SLAVE && !DMA: a fifo transfer is only
allowed when no runtime mode needs a linear buffer.
- CFG_TUSB_FIFO_HWFIFO_API follows SLAVE_ENABLE directly, so the slave path
keeps its hwfifo helpers; tusb_fifo.h only defaults it.
- dcd_edpt_xfer_fifo() asserts when the controller runs Buffer DMA.
3 files changed