- Status Closed
- Percent Complete
- Task Type Patches
- Category
-
Assigned To
amiconn - Operating System
- Severity Low
- Priority Very Low
- Reported Version Unstable (example)
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#2475 - better USB mode handling if MMC plugged at startup
This patch avoids the prompt for MMC removal if plugged
right at the start. USB mode is handled before the
mounting, which else causes the first MMC access.
I have some issues with it, sometimes it gets confused
after leaving USB mode. Like, duplicating the MMC
content into the root (confusing cards, perhaps), or not
showing any content. Very strange, perhaps uncovering
an older bug.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
I tried the patch on my Ondio SP and didn't have any issues
with it (this was after the MMC driver got updated to handle
blocksizes != 512 byte).
I fixed the marked issues in main.c (glitch protection,
timeout), and also some others.
@Jörg: Please test the new patch.
The 'break' was unnecessary, it only increased code size.
Some research remarks:
(1) I updated the patch again, using a better place for
setting the 'MMC touched' flag.
I do have another idea for determining the state on boot.
Instead of simply 'guessing' (!coldstart meaning MMC was
probably touched, which is incorrect when booting a
non-flashed box, or left-booting), we can actually probe the
card without switching it. This is possible because the card
only switches to SPI mode when it receives a CMD0 and /CS is
low. So if we send another command instead (e.g. CMD1), the
card won't switch to SPI mode just because of that. If we
receive an answer, it already is in SPI mode, otherwise it's
not.
(2) I also observed the described behaviour (MMC contents
both as root volume and under /<MMC1>) now, but it seems
this is unrelated o the early USB handling. I found a way to
quite reliably reproduce it:
a) Ondio switched off, MMC in slot, but standing out ~8 mm
so it doesn't get detected
b) Switch on the Ondio, and after approx. one second
(rockbox logo still displayed), push in the card. ⇒ message
"No .rockbox directory…", and 2x card contents
This looks like a mount race to me. Both the main mount and
the MMC thread try to mount at the same time…
Awaiting comments….
Patch updated to current cvs.
- Removed the extra USB check and the start of dirbrowse()
- Try to detect correct MMC state when in doubt as described
- Small fix for player (no double height)
Awaiting comments/ test results, not only from Ondio owners…