Skip to content

MMC over SPI: read wait - #65

Merged
dron0gus merged 1 commit into
rusefi:stable_21.11.x.rusefi_clean_historyfrom
dron0gus:mmc-spi-wait
Jan 5, 2026
Merged

dron0gus merged 1 commit into
rusefi:stable_21.11.x.rusefi_clean_historyfrom
dron0gus:mmc-spi-wait

Conversation

@dron0gus

@dron0gus dron0gus commented Jan 5, 2026

Copy link
Copy Markdown
Member

Some SD cards need significant time for initialization. Seems initialization happens on first read.

Some SD cards need significant time for initialization.
Seems initialization happens on first read.
@dron0gus
dron0gus merged commit 9dbac68 into rusefi:stable_21.11.x.rusefi_clean_history Jan 5, 2026
1 check failed
@dron0gus
dron0gus deleted the mmc-spi-wait branch January 5, 2026 19:17
rusefillc added a commit to rusefi/rusefi that referenced this pull request Jan 5, 2026
dron0gus pushed a commit to dron0gus/ChibiOS that referenced this pull request Sep 4, 2026
🤖 chibios-sheriff — backport (advisory)

Backport of **rusefi#59** (main commit `0d1d4d0`) to `stable-21.11.x`.

**Fixes** (defensive guards in `drvromfs_impl.inc`)
- `romfs_chunked_read`: early return at EOF / zero-length; reject a
misbehaving chunk backend (`copied == 0` → would spin; `copied >
chunk_available` → would overrun).
- `__romfile_setpos_impl`: validate `SEEK_CUR`/`SEEK_END` bounds before
the signed `vfs_offset_t` addition.

**Adaptation:** none — cherry-pick applied cleanly.

**Local gates** (stable has no CI, and stable currently has no in-tree
VFS/ROMFS *consumer* to link-build — the driver was backported as source
in rusefi#32): `drvromfs.c` `-fsyntax-only` compiles clean against the stable
F302 header set; `stylecheck.py` clean. The change is byte-identical in
effect to rusefi#59 on `main`, which passed full CI (it compiles `drvromfs.c`
via the SB_HOST_SWITCHED demo there).

**Changelog:** none — VFS/ROMFS debuts on stable in the pending 21.11.6
(via rusefi#32), so this is pre-release refinement of an unreleased subsystem
(same call as rusefi#59 on main).

Sheriff-authored backport — a human reviews/merges.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant