Update error handling for SDHCI tuning #181
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request reverts our previous commit to handle tuning interrupts in favor of the upstream commit that does the same thing.
This pull request also includes a fix for the sdhci_execute_tuning function, which was not actually returning the result of the underlying tuning function. This caused multiple retuning attempts for DDR50 cards, which cannot always be tuned, that led to an I/O error. This change updates sdhci_execute_tuning to return the error code which causes tuning to be disabled after the first attempt.
Testing
I built the kernel and installed it on two different setups that both use DDR50 SD cards. Previously only one setup reproduced the I/O error that resulted from repeated retuning. After installing the kernel both systems reported that the initial DDR50 tuning failed, but no other issues appeared in the dmesg logs and I was able to read and write to the SD cards on both systems.