Linux USB
 help / color / mirror / Atom feed
* [PATCH v3 0/6] Modernize the Faraday FOTG210 driver
@ 2026-09-03 21:17 Linus Walleij
  2026-09-03 21:17 ` [PATCH v3 1/6] usb: ehci: support non-standard port status registers Linus Walleij
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Linus Walleij @ 2026-09-03 21:17 UTC (permalink / raw)
  To: Alan Stern, Daniel Palmer, Greg Kroah-Hartman, Philipp Zabel
  Cc: linux-usb, linux-kernel, Linus Walleij

Replace the private FOTG210 EHCI fork with the common EHCI core and
quirks for its shifted or missing registers, integrated transaction
translator, speed reporting, and reset sequence.

This is a late reaction to a comment from Daniel Palmer in 2023:
https://lore.kernel.org/linux-usb/CAFr9PXmVXqAX73VUzAt_M2yPN93in9Y_LHyYcEA1Dfj_m_4ZHA@mail.gmail.com/

The fork was originally made from the v3.7 EHCI core driver. Arguably
this was a bad idea since it copied over 5000 lines of code. Correct the
mistake by using the maintained common implementation.

The quirks added by "usb: ehci: support additional controller quirks"
are left unconditional. With ARM multi_v7_defconfig and LLVM=1,
drivers/usb/host/ehci-hcd.o grows from 391,324 to 391,488 bytes, just
164 bytes; its text/data/BSS total grows from 43,629 to 43,745 bytes,
or 116 bytes. The checks are confined to controller lifecycle paths and
full- or low-speed isochronous submission, so Kconfig guards would save
little space and have no noticeable effect on normal execution.

Also clean up fixed-role initialization, power and resource handling,
UDC lifecycle, and system sleep handling. The binding and Gemini board
updates are split into a separate series.

Tested on the D-Link DIR-685.

Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
Changes in v3:
- Split the EHCI port reset and speed hooks into separate patches.
- Add a hidden Kconfig option for deviant port status registers,
  avoiding extra state and runtime checks on standard EHCI hosts.
- Gate the port reset and speed hooks behind hidden Kconfig options to
  avoid extra state and runtime checks on standard EHCI hosts.
- Document why the remaining EHCI quirks are not Kconfig-gated.
- Link to v2: https://patch.msgid.link/20260902-gemini-usb-fotg2-v2-0-0057408495d8@kernel.org

Changes in v2:
- Split the first v1 EHCI core patch into three patches covering port
  status registers, port reset and speed hooks, and other quirks.
- Call reset_control_reset() without a redundant optional-reset NULL
  check.
- Link to v1: https://patch.msgid.link/20260831-gemini-usb-fotg2-v1-0-8a8ee12c4b32@kernel.org

---
Linus Walleij (6):
      usb: ehci: support non-standard port status registers
      usb: ehci: add port reset hooks
      usb: ehci: add port speed hook
      usb: ehci: support additional controller quirks
      usb: fotg210: use the common EHCI core
      usb: fotg210-udc: fix endpoint and resource handling

 drivers/usb/fotg210/Kconfig        |    5 +
 drivers/usb/fotg210/fotg210-core.c |  274 +-
 drivers/usb/fotg210/fotg210-hcd.c  | 5672 +-----------------------------------
 drivers/usb/fotg210/fotg210-hcd.h  |  689 -----
 drivers/usb/fotg210/fotg210-udc.c  |   97 +-
 drivers/usb/fotg210/fotg210-udc.h  |    2 +-
 drivers/usb/fotg210/fotg210.h      |   26 +-
 drivers/usb/host/Kconfig           |   13 +
 drivers/usb/host/ehci-dbg.c        |    3 +-
 drivers/usb/host/ehci-hcd.c        |   31 +-
 drivers/usb/host/ehci-hub.c        |  104 +-
 drivers/usb/host/ehci-timer.c      |    3 +-
 drivers/usb/host/ehci.h            |   55 +-
 13 files changed, 545 insertions(+), 6429 deletions(-)
---
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
change-id: 20260203-gemini-usb-fotg2-3873e0d9288a

Best regards,
--  
Linus Walleij <linusw@kernel.org>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-09-03 21:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03 21:17 [PATCH v3 0/6] Modernize the Faraday FOTG210 driver Linus Walleij
2026-09-03 21:17 ` [PATCH v3 1/6] usb: ehci: support non-standard port status registers Linus Walleij
2026-09-03 21:17 ` [PATCH v3 2/6] usb: ehci: add port reset hooks Linus Walleij
2026-09-03 21:17 ` [PATCH v3 3/6] usb: ehci: add port speed hook Linus Walleij
2026-09-03 21:17 ` [PATCH v3 4/6] usb: ehci: support additional controller quirks Linus Walleij
2026-09-03 21:17 ` [PATCH v3 5/6] usb: fotg210: use the common EHCI core Linus Walleij
2026-09-03 21:17 ` [PATCH v3 6/6] usb: fotg210-udc: fix endpoint and resource handling Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox