-
Notifications
You must be signed in to change notification settings - Fork 30
[FIX] HW reset recovery regression #365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2248,6 +2248,38 @@ static int ds5_hw_reset_with_recovery(struct ds5 *state) | |||||||||||||||||||||||||||||
| int retry; | ||||||||||||||||||||||||||||||
| u16 status = 0; | ||||||||||||||||||||||||||||||
| bool device_went_down = false; | ||||||||||||||||||||||||||||||
| struct ds5_sensor *sensors[] = { | ||||||||||||||||||||||||||||||
| &state->depth.sensor, | ||||||||||||||||||||||||||||||
| &state->ir.sensor, | ||||||||||||||||||||||||||||||
| &state->rgb.sensor, | ||||||||||||||||||||||||||||||
| &state->imu.sensor, | ||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||
| int i; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| if (state->dser_dev) { | ||||||||||||||||||||||||||||||
| mutex_lock(&serdes_lock__); | ||||||||||||||||||||||||||||||
| for (i = 0; i < ARRAY_SIZE(sensors); i++) { | ||||||||||||||||||||||||||||||
| struct ds5_sensor *sensor = sensors[i]; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| sensor->cached_dt_value = 0xFFFF; | ||||||||||||||||||||||||||||||
| sensor->cached_md_value = 0xFFFF; | ||||||||||||||||||||||||||||||
| sensor->cached_override_value = 0xFFFF; | ||||||||||||||||||||||||||||||
| sensor->cached_fps_value = 0xFFFF; | ||||||||||||||||||||||||||||||
| sensor->cached_width_value = 0xFFFF; | ||||||||||||||||||||||||||||||
| sensor->cached_height_value = 0xFFFF; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| if (!sensor->pipe_configured) { | ||||||||||||||||||||||||||||||
| continue; | ||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||
| int release_ret = max9296_release_pipe(state->dser_dev, | ||||||||||||||||||||||||||||||
| sensor->pipe_id); | ||||||||||||||||||||||||||||||
| dev_warn(&state->client->dev, "release pipe %d (%d)\n", | ||||||||||||||||||||||||||||||
| sensor->pipe_id, release_ret); | ||||||||||||||||||||||||||||||
| sensor->pipe_configured = false; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
Comment on lines
+2273
to
+2279
|
||||||||||||||||||||||||||||||
| } else { | |
| int release_ret = max9296_release_pipe(state->dser_dev, | |
| sensor->pipe_id); | |
| dev_warn(&state->client->dev, "release pipe %d (%d)\n", | |
| sensor->pipe_id, release_ret); | |
| sensor->pipe_configured = false; | |
| } | |
| } | |
| int release_ret = max9296_release_pipe(state->dser_dev, | |
| sensor->pipe_id); | |
| dev_warn(&state->client->dev, "release pipe %d (%d)\n", | |
| sensor->pipe_id, release_ret); | |
| sensor->pipe_configured = false; |
Copilot
AI
Feb 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new code block is not wrapped in CONFIG_VIDEO_D4XX_SERDES conditional compilation guards, unlike the similar block at lines 2357-2392. The code accesses SERDES-specific fields (state->dser_dev, state->dser_ops) and uses the serdes_lock__ mutex, which are only defined when CONFIG_VIDEO_D4XX_SERDES is enabled. This will cause compilation errors when CONFIG_VIDEO_D4XX_SERDES is not defined. Wrap this code block with #ifdef CONFIG_VIDEO_D4XX_SERDES / #endif to match the pattern used elsewhere in the function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is calling max9296_release_pipe directly instead of using the interface abstraction pattern (state->dser_ops->release_pipe). This is inconsistent with the pattern used later in the same function at lines 2376-2377, which uses state->dser_ops->release_pipe. Direct calls bypass the interface abstraction and will fail if the deserializer is a MAX96712 instead of MAX9296. The code should use state->dser_ops->release_pipe to support both deserializer types.