Skip to content
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

system instability with network traffic during suspend/resume operation #467

Open
bunnie opened this issue Dec 22, 2023 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@bunnie
Copy link
Member

bunnie commented Dec 22, 2023

Setup:

  • run sleep stress suspend/resume loop
  • try to set time with NTP while the suspend/resume loop is in progress

Result:

  • EC eventually stops responding, seems to be hung?
  • RTC sometimes goes unit on resume

There are likely two issues at play here, but more investigation is needed.

  1. The lack of EC response is probably related to a COM packet being interrupted by suspend/resume. This shouldn't be possible because COM should request S/R deferral until an atomic operation is finished, but likely we're missing a fence around some un-suspendable operation (maybe a split tx/rx pair)
  2. The RTC failure is probably because a write was issued to update the RTC with a new time offset but then a suspend call interrupts it. This would cause spurious data to be written to the RTC as the system powers down and the RTC is unlocked for writing

Not delaying 0.9.15 on account of this bug, but was found during release testing for 0.9.15.

@bunnie bunnie added the bug Something isn't working label Dec 22, 2023
@bunnie bunnie self-assigned this Dec 22, 2023
@bunnie
Copy link
Member Author

bunnie commented Dec 24, 2023

there also seems to be some possible conflicts if codec and RTC try to use the I2C bus together. There is a lock on the I2C bus, but it might not be sufficiently broad (it's only on the smallest transaction basis, but perhaps the bus should be locked for the entire duration of a logical operation, i.e., during codec init it should lock the bus until the sequence is done?)

bunnie added a commit that referenced this issue Dec 24, 2023
The `codec` seems to hang sometimes during `Setup8kStereo` at boot.
Did not get to the bottom of it, but suspect that the RTC I2C init
sequence is interfering with the codec init sequence. This might
be resolved while also fixing #467, but for now, a short delay
on boot works around the problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant