Skip to content

usb: dwc3: Export dwc3_event_buffers_cleanup() (fixes DWC3_APPLE=m build) - #321

Merged
RyanTheTide merged 1 commit into
aurora-wipfrom
fix/dwc3-export-event-buffers-cleanup
Oct 15, 2026
Merged

RyanTheTide merged 1 commit into
aurora-wipfrom
fix/dwc3-export-event-buffers-cleanup

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

What and why

dwc3-apple.c calls dwc3_event_buffers_cleanup() when it stops the core, but dwc3 core does not export it. A config with USB_DWC3=y and USB_DWC3_APPLE=m (or both modular) therefore fails at modpost. This was reported in #275:

ERROR: modpost: "dwc3_event_buffers_cleanup" [drivers/usb/dwc3/dwc3-apple.ko] undefined!

The fix exports it with EXPORT_SYMBOL_GPL, like the other core helpers the glue drivers use (dwc3_enable_susphy(), dwc3_core_exit()). Fixes: f5afac9.

Tests (build-only fix)

Config Before After
published J700 5f config with USB_DWC3=y, USB_DWC3_APPLE=m modpost ERROR above Image + modules build, dwc3-apple.ko links
published J700 5f config as is (=y/=y) builds builds (0 warnings, CONFIG_MATCHES_PUBLISHED)
  • KUnit on aurora-wip with this commit: 150 tests (incl. dwc3_apple_state), all passing.
  • checkpatch --strict is clean apart from the quoted error line and the accepted Assisted-by format.
  • No boot smoke on the Neo, which is busy with the SEP investigation. With built-in DWC3 (the J700 config) the generated code doesn't change beyond the export entry.

Risk

LOW. Export only.

🤖 Generated with Claude Code

The Apple glue calls dwc3_event_buffers_cleanup() when it stops the
core, but the function is not exported. With USB_DWC3=y and
USB_DWC3_APPLE=m (or both modular) modpost fails:

  ERROR: modpost: "dwc3_event_buffers_cleanup" [drivers/usb/dwc3/dwc3-apple.ko] undefined!

Export it like the other core helpers the glue drivers use
(dwc3_enable_susphy(), dwc3_core_exit()).

Fixes: f5afac9 ("drm/apple: compose lean J700 display and automatic recovery candidate")
Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide
RyanTheTide merged commit 04a63b1 into aurora-wip Oct 15, 2026
@DjDeveloperr
DjDeveloperr deleted the fix/dwc3-export-event-buffers-cleanup branch October 16, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant