summaryrefslogtreecommitdiff
path: root/firmware/usbstack/usb_storage.c (follow)
Commit message (Collapse)AuthorAge
* The AMSv1 driver limitation that disallows 64K transfers is a USB core ↵Frank Gevaerts2011-12-31
| | | | | | limitation, not a CPU limitation, so use the appropriate defines to test for it git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31476 a1c6a512-1295-4272-9138-f99709370657
* usb PACK_DATA: use a static inline to enable type checkingRafaël Carré2011-12-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31467 a1c6a512-1295-4272-9138-f99709370657
* Commit to certain names for cache coherency APIs and discard the aliases.Michael Sevakis2011-12-17
| | | | | | | Wouldn't surprise me a bit to get some non-green. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31339 a1c6a512-1295-4272-9138-f99709370657
* Remove USB time sync code when there's no RTC.Boris Gjenero2011-12-16
| | | | | | | | | Without an RTC, Rockbox doesn't keep time. In that situation, USB time sync previously did nothing but reported success. After this change, the USB time sync request won't be recognized on those targets. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31319 a1c6a512-1295-4272-9138-f99709370657
* Oops, fixed the wrong lineAmaury Pouly2011-12-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31275 a1c6a512-1295-4272-9138-f99709370657
* Remove two useless variable and hopefully finally fix redAmaury Pouly2011-12-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31274 a1c6a512-1295-4272-9138-f99709370657
* Add support for for per-drive logical sector size. This allows targets to ↵Amaury Pouly2011-12-15
| | | | | | have a different logical sector size for the internal storage and the sd card, like on the fuze+ for example. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31270 a1c6a512-1295-4272-9138-f99709370657
* FS#12378 : Remove various unused code, and comment out some unused code and ↵Boris Gjenero2011-12-14
| | | | | | data for reference or future use. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31256 a1c6a512-1295-4272-9138-f99709370657
* Use array index 'i' only -after- bounds checkThomas Jarosch2011-10-21
| | | | | | Reported by cppcheck git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30815 a1c6a512-1295-4272-9138-f99709370657
* Add "USB Hide Internal Drive" option for multidrive devices with software usb.Frank Gevaerts2011-09-09
| | | | | | | | 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
* iPod Classic CE-ATA Support (Part 2 of 4: Remove on-stack sector buffers, ↵Michael Sparmann2011-02-27
| | | | | | 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
* Bootloader USB mode for PP502x. Enable only on GoGear SA9200 for the time ↵Michael Sevakis2011-01-15
| | | | | | 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
* Gigabeat S: Make it a removable mass-storage device. Windows will assign a ↵Michael Sevakis2011-01-05
| | | | | | 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
* Handle disk errors properly in USB storage driver. Fixes FS#10873Frank Gevaerts2010-12-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28733 a1c6a512-1295-4272-9138-f99709370657
* Fix outdated commentFrank Gevaerts2010-10-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28196 a1c6a512-1295-4272-9138-f99709370657
* usb_storage seems to be working now, enable USE_ROCKBOX_USB on C200v2, other ↵Tobias Diedrich2010-06-22
| | | | | | AMSv1 untested. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27039 a1c6a512-1295-4272-9138-f99709370657
* remane hotswap.* to sdmmc.*. The contents have nothing at all to do with ↵Frank Gevaerts2010-06-05
| | | | | | hotswapping things git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26598 a1c6a512-1295-4272-9138-f99709370657
* revert part of r26176 to avoid large static allocationRafaël Carré2010-05-19
| | | | | | 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
* as3525: don't use IRAM for usb, and avoid usb storage using uncached ↵Rafaël Carré2010-05-19
| | | | | | | | 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
* Make usb storage wait for new commands in parallel with sending out the CSW ↵Frank Gevaerts2010-04-08
| | | | | | | | | 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
* Add IO priority handling. Currently all IO has equal priority, except the ↵Frank Gevaerts2010-04-03
| | | | | | | | | | | | 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
* Even more Nano2G FTL speedup. Now 8% faster than disk mode, 10% slower than ↵Michael Sparmann2010-03-11
| | | | | | 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
* don't start waiting for the new command in send_csw(). Although on the USB ↵Frank Gevaerts2010-01-25
| | | | | | | | | 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
* Fix even more tabsAndree Buschmann2010-01-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24155 a1c6a512-1295-4272-9138-f99709370657
* Simplify some boolean expressions that compare directly against 'true'Bertrik Sikken2010-01-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24144 a1c6a512-1295-4272-9138-f99709370657
* Comment out LOGF_ENABLE defines everywhere, replace evil commentsJeffrey Goode2009-11-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23497 a1c6a512-1295-4272-9138-f99709370657
* iPod Nano 2G USB support based on the S3C6400X datasheet. Disabled by ↵Michael Sparmann2009-10-20
| | | | | | default for now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23285 a1c6a512-1295-4272-9138-f99709370657
* Change control handling to start expecting host packets before sending data ↵Frank Gevaerts2009-10-19
| | | | | | 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
* get rid of one hardcoded 512. SECTOR_SIZE is still there. It should probably ↵Frank Gevaerts2009-10-01
| | | | | | 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
* Move yearday_to_daymonth() to usb_storage.c. It's the only user, this ↵Frank Gevaerts2009-08-11
| | | | | | 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
* Consolidate day of week calculationFrank Gevaerts2009-08-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22258 a1c6a512-1295-4272-9138-f99709370657
* Fix "statement with no effect" warningFrank Gevaerts2009-08-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22256 a1c6a512-1295-4272-9138-f99709370657
* Add support for setting the clock using a special SCSI command. This is the ↵Frank Gevaerts2009-08-11
| | | | | | | | | | | 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
* Commit FS#9545, storage cleanup and multi-driver supportFrank Gevaerts2009-07-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21933 a1c6a512-1295-4272-9138-f99709370657
* ignore write data if the length doesn't match what we expect. This avoids ↵Frank Gevaerts2009-06-26
| | | | | | 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
* Reorganise USB stack defines. Now config.h decides which class drivers get ↵Frank Gevaerts2009-05-23
| | | | | | | | | 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
* Don't force double-buffering for sd devices. They apparently are not faster ↵Frank Gevaerts2009-05-20
| | | | | | with it, ans possibly actually slower git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20999 a1c6a512-1295-4272-9138-f99709370657
* Use different read and write buffer sizes. Due to interaction between common ↵Frank Gevaerts2009-05-19
| | | | | | 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
* Speed up USB storage by being a bit smarter in ordering transfer setupsFrank Gevaerts2009-05-18
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20982 a1c6a512-1295-4272-9138-f99709370657
* Add working USB HID driver, by Tomer Shalev (part of his GSoC work).Frank Gevaerts2009-05-16
| | | | | | | | | 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
* fix send_command_result() size checking for the SCSI_REQUEST_SENSE case ↵Frank Gevaerts2009-05-11
| | | | | | (thanks to Tomer Shalev, FS#10203) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20914 a1c6a512-1295-4272-9138-f99709370657
* USB related Cosmetics, whitespace and readability fixes (FS#10147 by Tomer ↵Frank Gevaerts2009-04-18
| | | | | | Shalev) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20737 a1c6a512-1295-4272-9138-f99709370657
* Allow class drivers to reuse the core data buffer for control transfers. ↵Frank Gevaerts2009-04-18
| | | | | | 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
* Add a PACK_DESCRIPTOR macro to make the class drivers a bit more readable ↵Frank Gevaerts2009-04-18
| | | | | | (FS#10145 by Tomer Shalev) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20733 a1c6a512-1295-4272-9138-f99709370657
* Revert r20617 for nowMaurus Cuelenaere2009-04-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20624 a1c6a512-1295-4272-9138-f99709370657
* Don't leave LOGF_ENABLE enabled...Maurus Cuelenaere2009-04-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20619 a1c6a512-1295-4272-9138-f99709370657
* Use the audio buffer in USB storage for ISP1583-having targetsMaurus Cuelenaere2009-04-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20617 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#10015 - Use chained transfer descriptor to speed up USB transfers ↵Frank Gevaerts2009-03-29
| | | | | | | | | | 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
* Don't swamp the system with broadcast messages that nobody is listening to ↵Frank Gevaerts2009-03-11
| | | | | | | | | | 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
* Allow the user to leave MSC mode by pressing the USB POWER button (the one ↵Frank Gevaerts2009-03-08
| | | | | | | | | | 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