hid-service: recover failed upstream passthrough exchanges
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 20/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- rust
- Domaine
- embedded-iot
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Rust
- Étoiles
- 25
- Forks
- 54
- Merge moyen
- 3 j 9 h
- PR mergées (30 j)
- 7
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de OpenDevicePartnership/embedded-services
-
[mctp-rs] SmbusEspiMedium::serialize: bounds-check body_wire_len before truncating to byte_count: u8Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
Difficulté 3/5 Une demi-journée Accessibilité débutants 66/100
-
tcpm-service/ucsi: Implement `GET_ERROR_STATUS` UCSI PPM commandPeut-être à nouveau libre @RobertZ2011 l’a pris il y a 35 jours, et aucune pull request n’est ouverte. Ouverte
OpenDevicePartnership/embedded-services#977 · 1 personne assignée ·
-
Patina on 8380 - PR ReviewOuverte
Difficulté 4/5 3-5 jours Accessibilité débutants 20/100
-
EC HidDevice implementation: ThermalPeut-être à nouveau libre @williampMSFT l’a pris il y a 61 jours, et aucune pull request n’est ouverte. Ouverte
OpenDevicePartnership/embedded-services#970 · 1 personne assignée ·
Toutes les issues de OpenDevicePartnership/embedded-services
Issues similaires
-
app bug session
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
marketing
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
Les mainteneurs répondent en général sous 1 jour
-
macOS autosubmit enable passes unsupported --wait to launchctl bootoutPeut-être pris @iqdoctor l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
junhoyeo/tokscale#1713 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour