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

[Backport v1.14-branch] disk: fixing the sending of commands with r1 response #17955

Merged

Conversation

pabigot
Copy link
Collaborator

@pabigot pabigot commented Aug 1, 2019

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]
Signed-off-by: Peter A. Bigot [email protected]

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]>
Signed-off-by: Peter A. Bigot <[email protected]>
@pabigot pabigot requested a review from galak August 1, 2019 16:09
@pabigot
Copy link
Collaborator Author

pabigot commented Aug 1, 2019

Backport on #17700 failed, hopefully this is the right recovery process for non-maintainers.

@galak galak changed the title disk: fixing the sending of commands with r1 response [backport] disk: fixing the sending of commands with r1 response Aug 1, 2019
@galak galak changed the title [backport] disk: fixing the sending of commands with r1 response [Backport v1.14-branch] disk: fixing the sending of commands with r1 response Aug 1, 2019
@pabigot pabigot added this to the v1.14.1 milestone Sep 19, 2019
@pabigot
Copy link
Collaborator Author

pabigot commented Sep 19, 2019

@nashif what more info do you need in Backports?

@nashif nashif merged commit e98cb34 into zephyrproject-rtos:v1.14-branch Sep 25, 2019
@pabigot pabigot deleted the backport-17700-to-v1.14-branch branch September 30, 2019 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants