-
Notifications
You must be signed in to change notification settings - Fork 8.2k
sd: mmc: Remove unwanted request to card for reading OCR content #86144
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
sd: mmc: Remove unwanted request to card for reading OCR content #86144
Conversation
decsny
left a comment
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.
seems fine to me
danieldegrasse
left a comment
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.
Looking at the spec I agree the second CMD1 could cause issues. We should drop the LOG_ERR (or reduce it to a LOG_DBG) on line 130 though- I suppose that since MMC cards are queried last, this isn't really a big issue (as working SDIO and SDMMC cards should never make it to this code flow). I just would prefer that SDIO/SDMMC cards that fail initialization don't also have a "Failed to query card OCR" log from the MMC code included in the output
|
yeah, I will better change it into LOG_DBG. |
As part of the MMC card initialization sequence, CMD1 command send multiple times to the card, first time to identify the card type and second time to check the requested voltage window is supported or not. There is a chance that after issuing the CMD1 for first time, card will move to the ready state before issuing the CMD1 for second time. In this case, card will not respond to the CMD1 send for the second time as card is already moved to ready state and this leads to failures. Hence remove the separate card identification logic and call mmc_send_op_cond only once to check both supported voltage window and card type identification. Signed-off-by: Paul Alvin <alvin.paulp@amd.com>
4f4688e to
02e8113
Compare
As part of the MMC card initialization sequence, CMD1 command send multiple times to the card, first time to identify the card type and second time to check the requested voltage window is supported or not. There is a chance that after issuing the CMD1 for first time, card will move to the ready state before issuing the CMD1 for second time. In this case, card will not respond to the CMD1 send for the second time as card is already moved to ready state and this leads to failures. Hence remove the separate card identification logic and call mmc_send_op_cond only once to check both supported voltage window and card type identification. Signed-off-by: Paul Alvin <alvin.paulp@amd.com> Message-ID: <20250221113857.2112-1-alvin.paulp@amd.com> Link: zephyrproject-rtos/zephyr#86144 State: waiting
As part of the MMC card initialization sequence, CMD1 command send multiple times to the card, first time to identify the card type and second time to check the requested voltage window is supported or not. There is a chance that after issuing the CMD1 for first time, card will move to the ready state before issuing the CMD1 for second time. In this case, card will not respond to the CMD1 send for the second time as card is already moved to ready state and this leads to failures. Hence remove the separate card identification logic and call mmc_send_op_cond only once to check both supported voltage window and card type identification.