hid-service: recover failed upstream passthrough exchanges
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 20/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- rust
- Bereich
- embedded-iot
Rechercherichtung
Start at hid-service/src/i2c/mod.rs, where I2cSlaveAsync lacks recovery, and trace Host::process() through the upstream-read lifecycle; the MCXA HAL's recover() is the reference. Reproduce with the scripted upstream bus sequence in the issue and inspect the existing bridge recovery tests, which assume an aborted exchange. Done means a failed exchange is retired before the next request, a fresh request works after recovery, and a deterministic regression covers the retained pending read.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Problem
A downstream descriptor failure completes the internal request, but the upstream read can remain pending. The next host-loop iteration treats that read as a new input-report request and can send input-report bytes where the OS expects a descriptor.
The missing upstream recovery predates #990; its failure completions fix the hang and expose this sequence. The same gap is present in #991. This is separate from the interrupt-deassertion ordering fix.
Reproduction
Reproduced with the real Host and a scripted upstream bus on a single cooperative executor; no hardware was used:
- Upstream writes descriptor register
[01 00], followed by a pending READ. - Downstream descriptor request fails with
Timeout. Host::process()returns the error without consuming or retiring the READ.- The next
Host::process()treats it asRequest::InputReport. - Input bytes
[04 00 52 A5]are delivered on the descriptor read.
Existing bridge recovery tests assume the upstream exchange was aborted and do not retain this pending read.
Decision needed
The MCXA target HAL provides recover(), but the legacy hid-service/src/i2c/mod.rs::I2cSlaveAsync trait does not expose recovery. Obtain feedback from existing platform users before choosing the integration contract, including compatibility with stable-v0.1.y. A no-op or logging-only default does not establish recovery.
Acceptance criteria
- Retire the failed upstream exchange before accepting another request; never reinterpret its pending read as an input-report request.
- Permit a fresh request after successful recovery. Failed recovery must not allow stale phases to be reused.
- Add a deterministic bridge regression retaining the pending read, checking that no input-report data is sent for it, and exercising a subsequent fresh request.
- Document the platform recovery requirements and stable-branch compatibility approach. Keep software-only tests distinct from physical controller validation.
Deferred from the #991 review thread, as agreed with Robert.
Related: #990, #991, #987.
- Vorherrschende Sprache
- Rust
- Sterne
- 25
- Forks
- 54
- Ø Merge
- 3 T. 9 Std.
- Gemergte PRs (30 T.)
- 7
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus OpenDevicePartnership/embedded-services
-
[mctp-rs] SmbusEspiMedium::serialize: bounds-check body_wire_len before truncating to byte_count: u8Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Schwierigkeit 3/5 Ein halber Tag Anfängerfreundlichkeit 66/100
-
tcpm-service/ucsi: Implement `GET_ERROR_STATUS` UCSI PPM commandEvtl. wieder frei @RobertZ2011 hat das vor 35 Tagen übernommen, und es ist kein Pull Request offen. Offen
OpenDevicePartnership/embedded-services#977 · 1 zugewiesene Person ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 20/100
-
EC HidDevice implementation: ThermalEvtl. wieder frei @williampMSFT hat das vor 61 Tagen übernommen, und es ist kein Pull Request offen. Offen
OpenDevicePartnership/embedded-services#970 · 1 zugewiesene Person ·
Alle Issues in OpenDevicePartnership/embedded-services
Ähnliche Issues
-
app bug session
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
marketing
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
Maintainer antworten meist innerhalb von 1 Tag
-
macOS autosubmit enable passes unsupported --wait to launchctl bootoutEvtl. vergeben @iqdoctor hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
junhoyeo/tokscale#1713 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag