platform/x86: dell-uart-backlight: handle stray EC byte in responses
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest2 patches 3 repliesIn review
- v32 patches 1 replySuperseded
- v22 patches 2 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 1 patch | 1 reply | Superseded |
Changes in v4 from the cover letter
- Perform resync inside dell_uart_bl_receive_data() rather than in the wrapper; status stays -EBUSY so serdev re-delivers the checksum byte without additional handling in the caller
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | platform/x86: dell-uart-backlight: extract dell_uart_bl_receive_data() helperdrivers/ | +27 | 0 replies | |
| 2/2 | platform/x86: dell-uart-backlight: recover from stray EC response bytedrivers/ | +10 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [PATCH v4 0/2] platform/x86: dell-uart-backlight: handle stray EC byte in responses
From: Chitransh Mandhaniya <[email protected]>
On some Dell All-in-One machines the EC sporadically inserts a spurious byte after the command echo in UART backlight response frames. This causes a checksum mismatch and the driver returns -EIO to userspace.
Patch 1 is a preparatory refactor: extract the byte-level response parsing into a dedicated dell_uart_bl_receive_data() helper with no functional change.
Patch 2 adds single-attempt stray-byte recovery inside that helper. When a checksum mismatch occurs on a frame longer than the minimum size, the suspect byte is dropped, the buffer is shifted down, and status remains -EBUSY so serdev re-delivers the real checksum byte naturally.
Tested on Dell OptiPlex AIO 7410 65W (board 0TKWC4) where the EC inserts a stray byte on every get-brightness response.
v3 -> v4:
- Perform resync inside dell_uart_bl_receive_data() rather than in the wrapper; status stays -EBUSY so serdev re-delivers the checksum byte without additional handling in the caller
v2 -> v3:
- Guard resync with resp_idx == resp_len to prevent memmove on a truncated or out-of-range length field
v1 -> v2:
- Extract dell_uart_bl_receive_data() helper instead of using a for-loop with a pass counter
- Split into two patches: refactor then feature
Chitransh Mandhaniya (2):
platform/x86: dell-uart-backlight: extract dell_uart_bl_receive_data()
helper
platform/x86: dell-uart-backlight: recover from stray EC response byte
.../platform/x86/dell/dell-uart-backlight.c | 52 +++++++++++++------ 1 file changed, 37 insertions(+), 15 deletions(-)
Signature · 1 line
2.43.0