-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
disk: fixing the sending of commands with r1 response #15790
disk: fixing the sending of commands with r1 response #15790
Conversation
do we have a PR against master? Can you please open an issue for 1.14. |
Do I need to create another PR, this time against master, beyond this? |
Needs a rebase onto master |
The sdhc_cmd_r1_raw() function doesn't take into account the existence of commands with data response. Because of this, some datas were being lost. The commands that return a r1 response and a data are: SDHC_SEND_CSD, SDHC_SEND_CID, SDHC_READ_SINGLE_BLOCK, SDHC_READ_MULTIPLE_BLOCK, SDHC_WRITE_BLOCK, SDHC_WRITE_MULTIPLE_BLOCK. In order to solve this, was juts necessary skip the byte discard when the command is one of these. This problem was affecting, for example, the sdhc initialization. The token returned from SDHC_SEND_CSD was being lost and the initialization was broken. Fixes zephyrproject-rtos#15444. Signed-off-by: Lucas Peixoto <[email protected]>
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.
Needs to be rebased (the file was renamed, as was the function), but this works and needs to go in.
I can push the rebase if necessary. |
Please, push the rebase. Thanks in advance. |
@lucaspeixotot Sorry, turns out I can't push to this PR. So I added a new PR to replace this, and will handle the backport as well. Thanks for providing the fix. |
The sdhc_cmd_r1_raw() function doesn't take into account the existence
of commands with data response. Because of this, some datas were being
lost.
The commands that return a r1 response and a data are: SDHC_SEND_CSD,
SDHC_SEND_CID, SDHC_READ_SINGLE_BLOCK, SDHC_READ_MULTIPLE_BLOCK,
SDHC_WRITE_BLOCK, SDHC_WRITE_MULTIPLE_BLOCK.
In order to solve this, was juts necessary skip the byte discard when
the command is one of these.
This problem was affecting, for example, the sdhc initialization. The
token returned from SDHC_SEND_CSD was being lost and the initialization
was broken.
Fixes #15444.
Signed-off-by: Lucas Peixoto [email protected]