- Status Closed
- Percent Complete
- Task Type Patches
- Category Drivers
- Assigned To No-one
- Operating System All players
- Severity Low
- Priority Very Low
- Reported Version Daily build (which?)
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#9545 - Storage cleanup and multi-driver support
This patch add HAVE_MULTIDRIVE as opposed to HAVE_MULTIVOLUME. It also mostly implements multi-driver support.
This has not been tested yet.
Still to do:
- update usb_storage.c properly
- finish multi-driver iplementation (maybe just #define NUM_DRIVES storage_num_drives(), not clear yet
- handle NUM_VOLUMES and NUM_DRIVES properly (allocate NUM_VOLUMES*NUM_DRIVES filesystems, and loop accordingly?)
- test
Longer-term multi-driver open issues:
- storage_*() that don’t take a drive argument currently get “broadcasted” to all drivers. It’s not clear if that is the right thing to do in all cases
- The current implementation doesn’t allow flexibility in deciding which is the primary drive.
ID | Project | Summary | Priority | Severity | Assigned To | Progress | |
---|---|---|---|---|---|---|---|
10415 | Rockbox | Very Low | Low |
Closed by fg
2009-07-17 22:47
Reason for closing: Accepted
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
2009-07-17 22:47
Reason for closing: Accepted
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
Committed as r21933
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
- usb_storage.c updated
- some small fixes
- still totally untested
This will be split in separate MULTIVOLUME vs MULTIDRIVE and multidriver patches before commit
NUM_VOLUMES in the HAVE_MULTIDRIVE case is still not finalised
- Fix stupidity in storage.c
- Some small fixes
- Tested on ipod mini in ATA+RAMDISK configuration. The ramdisk is accessible over USB, but not in the file browser. This could be an issue with it not being formatted on first boot.
It looks good to me. Just a little question: Do we need this? Are there known upcoming targets that use several different storage devices?
With my Code Police hat on, I don’t think storage.c should be “compacted” so much though, even if has many repeated lines. Whitespace is reader friendly.
D2, Elio, and at least some of the ondas need this. In a more hypothetical future this is also needed by USB host.
Actually I want to split the patch to separate the multivolume confusion from the multi-driver work.
Sync with r20256 (+ fix sd_sleepnow(), nand_sleepnow() etc warnings).
Confirmed working on Onda VX747.
Sync with r21163
Sync to r21835, with the following fixes:
- add storage.c which was missing from v5
- fix HAVE_HOTSWAP typo
- fix warnings in storage.c
- add missing stubs to TCC NAND driver
Tested working on Cowon D2 with SD and NAND drivers (see
FS#10415).For some reason your patch removed drivers/sd.c from SOURCES; I added it again and now the Onda VX747 build compiles again (I suppose this breaks the D2?)
Yes, it looks like I made a mistake fixing up the failed hunks. Your v7 patch looks correct.
btw. this only compiled on my D2 build because I had added sd.c elsewhere in SOURCES while hacking around previously… doh!
This patch still misses something : the storage system asks the drivers how many drives they have, but it should also tell them what the drive numbers will be. This is needed for e.g. hotswap drives that need to call disk_mount()
If we make *num_drives accept a parameter (e.g. int sd_num_drives(int first_drive)), and storage_init() passes num_drives to all drivers, it should work I think
Patch updated with the above change - note that I have NOT yet updated the various hotswap drivers to make use of this functionality. An example of how this can be done is in v4 of the Cowon D2 SD driver patch (
FS#10415).EDIT: Fixed hunk that shouldn’t have been present…
it would be nice to define void functions to “(void)0” in storage.h and hardcode functions returning a value to 0 or 1, to avoid dummy stubs in target drivers