summaryrefslogtreecommitdiff
path: root/firmware/usbstack/usb_storage.c (follow)
Commit message (Collapse)AuthorAge
* 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
* send the USB broadcast events at a less busy timeFrank Gevaerts2009-02-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20142 a1c6a512-1295-4272-9138-f99709370657
* Also broadcast transfer information for use by fancy USB screensFrank Gevaerts2009-02-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20140 a1c6a512-1295-4272-9138-f99709370657
* Leave "usb mode" when all LUNs are ejected againFrank Gevaerts2009-02-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20139 a1c6a512-1295-4272-9138-f99709370657
* Adds the possibility to show nice "do not disconnect" screens/icons on the ↵Frank Gevaerts2009-02-28
| | | | | | 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
* remove SERIALIZE_WRITES. The reason for it (the SD bug) is gone, so there's ↵Frank Gevaerts2009-02-24
| | | | | | no point in keeping this git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20098 a1c6a512-1295-4272-9138-f99709370657
* Commit my patch from FS#9940 - fix the invalid active flags in the Gigabeat ↵Dave Chapman2009-02-22
| | | | | | 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
* Make basic cache functions into calls, and get rid of ↵Michael Sevakis2009-02-11
| | | | | | 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
* Fix RAM disk when no audio buffer is availableMaurus Cuelenaere2009-01-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19814 a1c6a512-1295-4272-9138-f99709370657
* USB storage driver:Maurus Cuelenaere2009-01-21
| | | | | | | | * Move RAM disk buffer allocation #ifdef below * Don't use the audio buffer for bootloaders git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19812 a1c6a512-1295-4272-9138-f99709370657
* USB detection changes. c200/e200: Consider USB to be powered when charger is ↵Michael Sevakis2009-01-19
| | | | | | plugged but detect USB connection by bus reset. When received, disconnect and restart the driver fully enabled. imx31: Fix hack used to make initial connect succeeded-- set PHY type before initial reset. General: Move some target code out of usb-drv-arc.c and implement it in respective usb sources and CPU headers so things stay clean. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19797 a1c6a512-1295-4272-9138-f99709370657
* USB retweaking: Take out the USB_REQUEST/RELEASE_DISK scheme and simply ask ↵Michael Sevakis2009-01-13
| | | | | | the USB core whether or not any drivers require exclusive access at the moment of connect. Doing anthing else just produces nasty effects on Windows because it expects some communication just for enabling the PHY and not allowing it to mount volumes if a thread doesn't ack causes annoying error message boxes. Make behavior of each USB type identical from the system perspective. Some miscellaneous changes (simplify, ata->storage naming, define only used USB_* enums values were possible). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19762 a1c6a512-1295-4272-9138-f99709370657
* improve handling of unimplemented commandsFrank Gevaerts2009-01-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19755 a1c6a512-1295-4272-9138-f99709370657
* correct wrong logfFrank Gevaerts2008-12-31
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19627 a1c6a512-1295-4272-9138-f99709370657