USB Gadget only mode is broken: struct dwc2_hsotg has no member named bus_suspended

Open
#4,368 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
40/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
c, linux

Research direction

Inspect the definition of struct dwc2_hsotg and the failing dwc_handle_gpwrdn_disc_det function in drivers/usb/dwc2/core_intr.c. Build the kernel with CONFIG_USB_DWC2_PERIPHERAL=y to reproduce the missing-member error; done means the USB Gadget Only configuration compiles successfully.

Written by the indexing model from the issue text.

Description

One of the recent changes to the dwc2 driver has broken USB Gadget Only mode (CONFIG_USB_DWC2_PERIPHERAL=y).

The bus_suspended field of struct dwc2_hsotg is not included in the structure definition if CONFIG_USB_DWC2_PERIPHERAL is defined. This causes a compile error:

drivers/usb/dwc2/core_intr.c: In function 'dwc_handle_gpwrdn_disc_det':
drivers/usb/dwc2/core_intr.c:710:7: error: 'struct dwc2_hsotg' has no member named 'bus_suspended'
Dominant language
C
Stars
13.2k
Forks
5.5k
Avg merge
2d 21h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.