arjav1528 opened a new pull request, #18543: URL: https://github.com/apache/nuttx/pull/18543
## Summary Addressed the issue by documenting how SDIO lower-half drivers must provide R2 (CID/CSD) responses and by adding a small sanity check in the MMCSD upper-half. `include/nuttx/sdio.h` now explains the R2 format, states that the upper-half expects a 128‑bit CID/CSD payload in the standard layout, and notes that controllers which strip the CRC must shift the four 32‑bit words left by one byte (with `bcm2711_sdio.c` and `imx9_usdhc.c` as examples). `mmcsd_decode_csd` in `drivers/mmcsd/mmcsd_sdio.c` gains a `DEBUGASSERT(csd[0] != 0);` under `CONFIG_DEBUG_FEATURES` to catch obviously invalid or misaligned CSDs, and the SDIO/MMCSD docs now describe the SDIO lower-half call-flow and R2/CSD expectations and point implementers to this guidance. ## Impact - **Runtime behavior**: Only a debug‑only `DEBUGASSERT` in `mmcsd_decode_csd` is added; there is **no behavior or performance change** in non‑debug builds. - **API/ABI**: No changes to SDIO or MMCSD public interfaces; existing correct SDIO lower‑halves continue to work unchanged. - **Documentation**: SDIO docs now explicitly describe `recv_r2`/R2 handling (including CRC‑stripping controllers), and MMCSD docs direct SDIO lower‑half implementers there. - **Build / compatibility / security**: No new Kconfig options or dependencies beyond existing Sphinx for docs; no security impact; compatibility for `/dev/mmcsd*` users is unchanged. ## Testing - `make html` in `Documentation/` to verify the updated RST documentation builds successfully. - No runtime or hardware tests were performed because no SDIO/MMC-capable target hardware is available in this environment; the new `DEBUGASSERT` behavior is validated by static inspection only. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
