Skip to content

device: Fix device recreation after failed restore

xinpeng.wang linux-bluetooth 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest1 patch 1 replyIn review

Changes in v2 from the cover letter

- Fix code formatting (checkpatch.pl warnings)
- Align logic with BlueZ's existing restore pattern
- Fix a bug in list handling that could cause double-free

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1device: Recreate paired device from storage after failed restoresrc/adapter.c+101 -121 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/1] device: Fix device recreation after failed restore

During S4 suspend/resume stress testing, I observed that some paired devices disappeared after system resume. This happened because adapter_create_device() skipped restoring from storage, even if the initial restore had failed.

My desktop application treats temporary and paired devices differently, so the disappearance of paired devices led to a poor user experience. I believe this is a valid issue that should be addressed.

This patch introduces a list of pending restore addresses. When a device in this list is created, it will be reloaded from storage to ensure pairing information is properly restored.

Changes since v1:
- Fix code formatting (checkpatch.pl warnings)
- Align logic with BlueZ's existing restore pattern
- Fix a bug in list handling that could cause double-free

Please review ,thanks.

xinpeng.wang (1):
device: Recreate paired device from storage after failed restore

 src/adapter.c | 113 ++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 101 insertions(+), 12 deletions(-)
Signature · 1 line
2.20.1