Enhance HW reset recovery logic and streaming state management - #397
Merged
Conversation
- Implement a lightweight stability probe during HW reset recovery to ensure natural recovery before full verification. - Modify `ds5_mux_s_stream()` to enforce a stop on streaming if reset-generation invalidation is detected, ensuring proper reconfiguration.
There was a problem hiding this comment.
Pull request overview
This PR tightens post-HW-reset recovery behavior in the D4XX kernel driver by adding a lightweight “natural recovery” stability probe before running the full I2C stability loop, and by making stream start more robust when cached state is invalidated by a reset-generation bump.
Changes:
- Add a lightweight Step-10 stability probe on the natural-recovery path; if it fails, trigger Phase 1 SERDES recovery and then run full stability verification.
- Update
ds5_mux_s_stream()to avoid treating “already streaming” as a no-op when a reset-generation invalidation was detected; force-stop and clear state to ensure a clean reconfigure. - Document these behavioral rules in repo guidance files.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
kernel/realsense/d4xx.c |
Adds natural-recovery stability gating to HW reset Step 10 and strengthens streaming state handling after reset-generation invalidation. |
CLAUDE.md |
Documents the new Step 10 natural-recovery gate and the updated ds5_mux_s_stream() rule. |
.github/copilot-instructions.md |
Codifies the same reset/streaming behavior expectations for future changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
ejgoldik
previously approved these changes
Mar 16, 2026
sareluzi
approved these changes
Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ds5_mux_s_stream()to enforce a stop on streaming if reset-generation invalidation is detected, ensuring proper reconfiguration.