Commit Graph

107 Commits

Author SHA1 Message Date
Boris Gjenero 8e6030c822 FS#12378 : Remove various unused code, and comment out some unused code and data for reference or future use.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31256 a1c6a512-1295-4272-9138-f99709370657
2011-12-14 21:45:25 +00:00
Thomas Jarosch eb97426c76 Use array index 'i' only -after- bounds check
Reported by cppcheck

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30815 a1c6a512-1295-4272-9138-f99709370657
2011-10-21 18:51:19 +00:00
Frank Gevaerts 544a52d9eb Add "USB Hide Internal Drive" option for multidrive devices with software usb.
This option allows accessing the card slot from "dumb" USB hosts like some car
audio systems that do not handle multi-LUN devices.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30489 a1c6a512-1295-4272-9138-f99709370657
2011-09-09 16:15:35 +00:00
Michael Sparmann 1b5e31ed43 iPod Classic CE-ATA Support (Part 2 of 4: Remove on-stack sector buffers, and replace them with a single statically allocated sector buffer that's arbitrated amongst users)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29445 a1c6a512-1295-4272-9138-f99709370657
2011-02-27 22:44:54 +00:00
Michael Sevakis 3a1127785b Bootloader USB mode for PP502x. Enable only on GoGear SA9200 for the time being. Add HAVE_BOOTLOADER_USB_MODE to config if BOOTLOADER is defined to enable it. Clean up some kernel stuff a little to support it. Mess up a bunch of other stuff (hopefully not too badly).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29053 a1c6a512-1295-4272-9138-f99709370657
2011-01-15 08:19:30 +00:00
Michael Sevakis 89a7a8138e Gigabeat S: Make it a removable mass-storage device. Windows will assign a drive to only the main data partition by default. To access the bootloader partition instead, press 'Vol -' while it connects (in bootloader and firmware). Hopefully doesn't break anything for anyone.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28972 a1c6a512-1295-4272-9138-f99709370657
2011-01-05 19:35:51 +00:00
Frank Gevaerts f9a6bde15f Handle disk errors properly in USB storage driver. Fixes FS#10873
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28733 a1c6a512-1295-4272-9138-f99709370657
2010-12-04 13:56:19 +00:00
Frank Gevaerts 0a7baec5ef Fix outdated comment
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28196 a1c6a512-1295-4272-9138-f99709370657
2010-10-02 16:03:31 +00:00
Tobias Diedrich 072c0a15cb usb_storage seems to be working now, enable USE_ROCKBOX_USB on C200v2, other AMSv1 untested.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27039 a1c6a512-1295-4272-9138-f99709370657
2010-06-22 05:46:54 +00:00
Frank Gevaerts a0557b23f0 remane hotswap.* to sdmmc.*. The contents have nothing at all to do with hotswapping things
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26598 a1c6a512-1295-4272-9138-f99709370657
2010-06-05 21:12:16 +00:00
Rafaël Carré 2e188a4dad revert part of r26176 to avoid large static allocation
we still need to convert uncached addresses to physical addresses

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26177 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 18:08:32 +00:00
Rafaël Carré bae0756acf as3525: don't use IRAM for usb, and avoid usb storage using uncached addresses behind our back
No need for special address handling, all addresses are equal to their physical address

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26176 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 17:56:47 +00:00
Frank Gevaerts 1d94c3fa69 Make usb storage wait for new commands in parallel with sending out the CSW again, for a nice speed improvement.
This is basically the same as was done before r24333, only this time it should be correct.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25542 a1c6a512-1295-4272-9138-f99709370657
2010-04-08 19:48:01 +00:00
Frank Gevaerts 376d8d577f Add IO priority handling. Currently all IO has equal priority, except the dircache scanning thread which is lower. This fixes the slow boot problem for me, with the added benefit that actual audio playback also starts faster.
Lots of the changes are due to changing storage_(read|write)sectors() from macros to wrapper functions. This means that they have to be called with IF_MD2(drive,) again.

Flyspray: FS#11167
Author: Frank Gevaerts


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25459 a1c6a512-1295-4272-9138-f99709370657
2010-04-03 22:02:09 +00:00
Michael Sparmann 62c011c8fb Even more Nano2G FTL speedup. Now 8% faster than disk mode, 10% slower than the OFW. 4.5MB/s sustained (contiguous) write, 6.0MB/s read for me now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25109 a1c6a512-1295-4272-9138-f99709370657
2010-03-11 00:59:17 +00:00
Frank Gevaerts 7a73a9cd4e don't start waiting for the new command in send_csw(). Although on the USB level this is entirely correct, and about 10% to 15% faster, usb_storage_transfer_complete() could get slightly confused by this.
The proper fix is obviously to make usb_storage_transfer_complete() not get confused, but that's a lot more work, and I prefer things to be correct to them being a bit faster right now


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24333 a1c6a512-1295-4272-9138-f99709370657
2010-01-25 22:33:53 +00:00
Andree Buschmann bfc129a592 Fix even more tabs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24155 a1c6a512-1295-4272-9138-f99709370657
2010-01-03 10:35:31 +00:00
Bertrik Sikken 799a0a5cd4 Simplify some boolean expressions that compare directly against 'true'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24144 a1c6a512-1295-4272-9138-f99709370657
2010-01-02 16:03:30 +00:00
Jeffrey Goode 9d842683eb Comment out LOGF_ENABLE defines everywhere, replace evil comments
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23497 a1c6a512-1295-4272-9138-f99709370657
2009-11-03 16:25:03 +00:00
Michael Sparmann d03fe64dcf iPod Nano 2G USB support based on the S3C6400X datasheet. Disabled by default for now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23285 a1c6a512-1295-4272-9138-f99709370657
2009-10-20 06:37:07 +00:00
Frank Gevaerts bad510ad10 Change control handling to start expecting host packets before sending data to the host. This makes the handling less timing sensitive on some controllers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23263 a1c6a512-1295-4272-9138-f99709370657
2009-10-19 16:21:50 +00:00
Frank Gevaerts 7d11b7ac03 get rid of one hardcoded 512. SECTOR_SIZE is still there. It should probably move up (to storage.h?) so fat and usb storage can share it
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22869 a1c6a512-1295-4272-9138-f99709370657
2009-10-01 20:33:52 +00:00
Frank Gevaerts ceccec503e Move yearday_to_daymonth() to usb_storage.c. It's the only user, this function is pretty specific, and it seems to be the cleanest way to avoid ram usage increases for unrelated targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22259 a1c6a512-1295-4272-9138-f99709370657
2009-08-11 20:03:59 +00:00
Frank Gevaerts 2dc50471ca Consolidate day of week calculation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22258 a1c6a512-1295-4272-9138-f99709370657
2009-08-11 19:30:19 +00:00
Frank Gevaerts 61cf783371 Fix "statement with no effect" warning
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22256 a1c6a512-1295-4272-9138-f99709370657
2009-08-11 18:07:14 +00:00
Frank Gevaerts ed73a3274c Add support for setting the clock using a special SCSI command. This is the same method that itunes uses, and there are host-side tools for it (e.g. libgpod)
Flyspray: FS#10514
Author: Laurent Papier and myself



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22255 a1c6a512-1295-4272-9138-f99709370657
2009-08-11 17:54:47 +00:00
Frank Gevaerts c0a5a67387 Commit FS#9545, storage cleanup and multi-driver support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21933 a1c6a512-1295-4272-9138-f99709370657
2009-07-17 22:28:49 +00:00
Frank Gevaerts 057a5802cd ignore write data if the length doesn't match what we expect. This avoids the data corruption caused by FS#10319, but doesn't solve the root cause yet (patch by Martin Ritter)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21521 a1c6a512-1295-4272-9138-f99709370657
2009-06-26 15:14:49 +00:00
Frank Gevaerts c61a75173b Reorganise USB stack defines. Now config.h decides which class drivers get enabled instead of usb_core.h
Also enable HID, and use that as the dummy class instead of charging-only for controllers that have working interrupt transfers.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21053 a1c6a512-1295-4272-9138-f99709370657
2009-05-23 14:30:20 +00:00
Frank Gevaerts fba4be213f Don't force double-buffering for sd devices. They apparently are not faster with it, ans possibly actually slower
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20999 a1c6a512-1295-4272-9138-f99709370657
2009-05-20 16:57:17 +00:00
Frank Gevaerts 792a7a6086 Use different read and write buffer sizes. Due to interaction between common transfer sizes used by most OSes (64k) and the double-buffering system we use for writes, writes need a smaller buffer to make sure that USB and disk I/O can overlap.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20988 a1c6a512-1295-4272-9138-f99709370657
2009-05-19 18:51:03 +00:00
Frank Gevaerts c8d6a02c5a Speed up USB storage by being a bit smarter in ordering transfer setups
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20982 a1c6a512-1295-4272-9138-f99709370657
2009-05-18 19:45:24 +00:00
Frank Gevaerts 69a4117c1d Add working USB HID driver, by Tomer Shalev (part of his GSoC work).
This needs support for usb interrupt transfers, so there are some changes in various USB drivers as well (only usb-drv-arc supports it at this point, others won't have working HID yet).

HID is disabled for now, as the apps/ part is not included yet.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20962 a1c6a512-1295-4272-9138-f99709370657
2009-05-16 15:30:09 +00:00
Frank Gevaerts 685cee87be fix send_command_result() size checking for the SCSI_REQUEST_SENSE case (thanks to Tomer Shalev, FS#10203)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20914 a1c6a512-1295-4272-9138-f99709370657
2009-05-11 23:00:56 +00:00
Frank Gevaerts 00b407b04f USB related Cosmetics, whitespace and readability fixes (FS#10147 by Tomer Shalev)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20737 a1c6a512-1295-4272-9138-f99709370657
2009-04-18 21:32:41 +00:00
Frank Gevaerts 3314f389ba Allow class drivers to reuse the core data buffer for control transfers. This doesn't make much difference right now, but it should keep HID memory usage lower (once HID is ready) (FS#10146 by Tomer Shalev)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20735 a1c6a512-1295-4272-9138-f99709370657
2009-04-18 20:40:50 +00:00
Frank Gevaerts ab09322b7a Add a PACK_DESCRIPTOR macro to make the class drivers a bit more readable (FS#10145 by Tomer Shalev)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20733 a1c6a512-1295-4272-9138-f99709370657
2009-04-18 20:04:52 +00:00
Maurus Cuelenaere 697869e892 Revert r20617 for now
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20624 a1c6a512-1295-4272-9138-f99709370657
2009-04-05 13:11:38 +00:00
Maurus Cuelenaere b4f6b259ef Don't leave LOGF_ENABLE enabled...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20619 a1c6a512-1295-4272-9138-f99709370657
2009-04-04 20:58:39 +00:00
Maurus Cuelenaere 2ca376cce8 Use the audio buffer in USB storage for ISP1583-having targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20617 a1c6a512-1295-4272-9138-f99709370657
2009-04-04 18:16:36 +00:00
Frank Gevaerts 0ece30a726 Commit FS#10015 - Use chained transfer descriptor to speed up USB transfers on PP and iMX31
(not exactly the same. This one actually works)



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20570 a1c6a512-1295-4272-9138-f99709370657
2009-03-29 19:56:21 +00:00
Frank Gevaerts 105fe0679d Don't swamp the system with broadcast messages that nobody is listening to yet anyway.
Also, these messages should probably be done in a different way, like an update every second (or maybe half-second)
This should fix FS#10006


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20294 a1c6a512-1295-4272-9138-f99709370657
2009-03-11 20:54:32 +00:00
Frank Gevaerts 871db6f5d9 Allow the user to leave MSC mode by pressing the USB POWER button (the one that's used to go to usb power mode on plugin) when the host OS hasn't locked the device.
This only works for devices that expose a removable device, so for now the gigabeat S is out of luck.
(slightly modified from FS#9993)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20244 a1c6a512-1295-4272-9138-f99709370657
2009-03-08 18:45:19 +00:00
Frank Gevaerts ec602b7e75 send the USB broadcast events at a less busy time
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20142 a1c6a512-1295-4272-9138-f99709370657
2009-02-28 19:39:28 +00:00
Frank Gevaerts 3b141d9c80 Also broadcast transfer information for use by fancy USB screens
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20140 a1c6a512-1295-4272-9138-f99709370657
2009-02-28 16:25:07 +00:00
Frank Gevaerts afedfcf44e Leave "usb mode" when all LUNs are ejected again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20139 a1c6a512-1295-4272-9138-f99709370657
2009-02-28 15:16:54 +00:00
Frank Gevaerts b6a1af2a9b Adds the possibility to show nice "do not disconnect" screens/icons on the USB screen. A proof-of-concept for the actual screen is at FS#9969
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20138 a1c6a512-1295-4272-9138-f99709370657
2009-02-28 14:47:18 +00:00
Frank Gevaerts 80410f21b9 remove SERIALIZE_WRITES. The reason for it (the SD bug) is gone, so there's no point in keeping this
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20098 a1c6a512-1295-4272-9138-f99709370657
2009-02-24 18:30:32 +00:00
Dave Chapman dff46d20e6 Commit my patch from FS#9940 - fix the invalid active flags in the Gigabeat S MBR on the fly in the UMS driver. It is hypothosized that actually changing these on the disk will make the OF more likely to reformat the data partition during recovery - but that is not confirmed. So we play it safe.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20085 a1c6a512-1295-4272-9138-f99709370657
2009-02-22 18:25:16 +00:00
Michael Sevakis 21f0c9a282 Make basic cache functions into calls, and get rid of CACHE_FUNCTION_WRAPPERS and CACHE_FUNCTIONS_AS_CALL macros. Rename flush/invalidate_icache to cpucache_flush/invalidate. They're inlined only if an implementation isn't provided by defining HAVE_CPUCACHE_FLUSH/INVALIDATE.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19971 a1c6a512-1295-4272-9138-f99709370657
2009-02-11 12:55:51 +00:00