(forward port of r26481 + cosmetics)
This lead to freezes under various conditons (bug report: FS#11267)
Battery life is almost not (if at all) affected:
- between 4 and 8 minutes less runtime for fuzev1
- 9 minutes less runtime for c200v2 (2 minutes difference on a 2 hours run)
Additional verifications of the runtime (including on other models) wouldn't hurt
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26512 a1c6a512-1295-4272-9138-f99709370657
Waiting for TRAN state after the end of the transfer caused writing problems for some uSD cards. Removing this wait returns write functionality to those cards.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26365 a1c6a512-1295-4272-9138-f99709370657
- retry failed commands up to 6 times
- wait at most 5 seconds for the card to go to TRAN state
- wait for the card to be in TRAN state (i.e. not programming) before
disabling SD clocks (remove the workaround in sd_enable() )
should fix lockups reported on fuzev1 under heavy internal storage + µSD use
(playback + database/pictureflow updating)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26291 a1c6a512-1295-4272-9138-f99709370657
test_disk doesn't freeze anymore when closing the file between writing & reading
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26164 a1c6a512-1295-4272-9138-f99709370657
Better be safe than sorry, don't try to read/write outside our storage,
because we might overwrite the OF on the internal storage
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26077 a1c6a512-1295-4272-9138-f99709370657
adjust logical starting sector to physical starting sector after the check
number of blocks is already adjusted from physical to logical
don't panic anymore when accessing the last part of storage
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26050 a1c6a512-1295-4272-9138-f99709370657
Use it in fuzev2 to improve some big delays (correct the biggest one to actually wait for the fifo to empty), and use it in the sd drivers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25734 a1c6a512-1295-4272-9138-f99709370657