Skip to content

Enhance HW reset recovery logic and streaming state management - #397

Merged
Nikolai-L merged 3 commits into
devfrom
fix_ds5_hw_reset
Mar 16, 2026
Merged

Enhance HW reset recovery logic and streaming state management#397
Nikolai-L merged 3 commits into
devfrom
fix_ds5_hw_reset

Conversation

@Nikolai-L

Copy link
Copy Markdown
Contributor
  • 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.

- 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread kernel/realsense/d4xx.c Outdated
Comment thread kernel/realsense/d4xx.c Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
ejgoldik
ejgoldik previously approved these changes Mar 16, 2026
@Nikolai-L
Nikolai-L merged commit a910db9 into dev Mar 16, 2026
7 checks passed
@Nikolai-L
Nikolai-L deleted the fix_ds5_hw_reset branch March 16, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants