Commit graph

271 commits

Author SHA1 Message Date
Amaury Pouly
9bae382e95 Fill USB serial number descriptor on imx233 targets.
Compute a serial number using the ocotp OPS bits like the OF.
Also add a comment about the first character of serial number
being a indicator of the enabled interfaces.

Change-Id: I9b90aed4e3b803f12fec003c9bc8ee8a046f4e42
2012-05-31 13:57:25 +02:00
Rafaël Carré
dae7a29b35 fix a mistake of 803408f18 spotted by n1s
When the source string terminates (with a 0) we pad the rest of the
destination with spaces.
2012-05-07 12:54:11 -04:00
Rafaël Carré
c4a51d2d88 missing const 2012-05-07 01:35:57 -04:00
Rafaël Carré
dd57c01bef simplify yearday_to_daymonth() 2012-05-07 01:30:45 -04:00
Rafaël Carré
803408f186 simplify copy_padded 2012-05-07 01:19:15 -04:00
Frank Gevaerts
4fcffcbdf3 Reorganise USB initialisation to not depend on a specific enumeration sequence, by Bartosz Fabianowski, with minor tweaks by Michael Sevakis (FS#12497)
FreeBSD apparently sends a SET_ADDRESS first, which confused our code.
This patch fixes that, and also simplifies the connection handling a bit.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31582 a1c6a512-1295-4272-9138-f99709370657
2012-01-04 21:55:09 +00:00
Rafaël Carré
568c441fd8 usb-target.h: remove
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31498 a1c6a512-1295-4272-9138-f99709370657
2011-12-31 18:44:55 +00:00
Michael Sparmann
a9b5c2af93 usb_core: Fix typo in comment
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31482 a1c6a512-1295-4272-9138-f99709370657
2011-12-31 16:53:41 +00:00
Frank Gevaerts
ab475d121c The AMSv1 driver limitation that disallows 64K transfers is a USB core 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
2011-12-31 14:42:10 +00:00
Rafaël Carré
4c2126b5a8 usb PACK_DATA: use a static inline to enable type checking
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31467 a1c6a512-1295-4272-9138-f99709370657
2011-12-29 21:58:34 +00:00
Rafaël Carré
6a6269ffd8 usb_hid: fix r31457
descriptor_hid_get() updates its parameter so we need to take its address
the update is hidden inside PACK_DATA macro

Fix HID on the Fuze+
Reported by jlbiasini

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31466 a1c6a512-1295-4272-9138-f99709370657
2011-12-29 21:49:29 +00:00
Rafaël Carré
ddd2edaa33 USB HID: cosmetics / simplifications
Declare loop variables inside for() ala C99
Remove useless casts
Remove one level of pointer indirection in descriptor_hid_get()
Simplify a few switch()
Align case on the same level than switch

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31457 a1c6a512-1295-4272-9138-f99709370657
2011-12-28 19:45:28 +00:00
Michael Sevakis
6a67707b5e Commit to certain names for cache coherency APIs and discard the aliases.
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
2011-12-17 07:27:24 +00:00
Boris Gjenero
ff1c567417 Remove USB time sync code when there's no RTC.
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
2011-12-16 00:09:28 +00:00
Amaury Pouly
0180a1cf55 Oops, fixed the wrong line
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31275 a1c6a512-1295-4272-9138-f99709370657
2011-12-15 17:33:30 +00:00
Amaury Pouly
8632f955f4 Remove two useless variable and hopefully finally fix red
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31274 a1c6a512-1295-4272-9138-f99709370657
2011-12-15 17:28:30 +00:00
Amaury Pouly
3a6e3c254e Add support for for per-drive logical sector size. This allows targets to 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
2011-12-15 17:07:19 +00:00
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
Bertrik Sikken
9c33dca647 Fix tabs in .c and .h files in firmware/
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29832 a1c6a512-1295-4272-9138-f99709370657
2011-05-08 11:37:18 +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
05f6f3419a Add a higher level USB detection that prevents fraudulent bus resets from causing USB mode to be entered. Enable for SA9200 only at this time. Also, for SA9200, use the bus power GPIO rather than the 'connector inserted' GPIO to detect the cable.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29068 a1c6a512-1295-4272-9138-f99709370657
2011-01-17 12:24:41 +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
Amaury Pouly
7baa522364 usb: remove unused variable and correctly stall on unhandled control requests
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28121 a1c6a512-1295-4272-9138-f99709370657
2010-09-20 14:18:14 +00:00
Rafaël Carré
336cec2e1f Fix set_serial_descriptor() for targets with as3543
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28013 a1c6a512-1295-4272-9138-f99709370657
2010-09-06 18:26:17 +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
Torne Wuff
2eb0142587 New USB charging system, part 2 - "Force" charging mode
Enable support for the "force" mode of USB charging. This should work on Gigabeat S and Nano2g (and any other future target which has a RB usb stack and supports charging) - if a host connection is not detected within 10 seconds of USB insertion, assume that the connected device is an AC charger and charge anyway, if the user has specified "force" as the mode.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26594 a1c6a512-1295-4272-9138-f99709370657
2010-06-05 20:43:30 +00:00
Torne Wuff
991e92fd3d New USB charging system, part 1 - API rework and user-visible setting update
1) "Charge during USB connection" option is now tristate: off/on/force. Currently "force" behaves just like "on", but in future it will allow charging even when it was not possible to positively identify a charger.

2) The H300 code has been adjusted to use the new system but there should be no functional differences, it already had the USB charging option and its USB/charging support is hardware controlled.

3) The Gigabeat S code has been adjusted to use the new system: the player now has the USB charging option, which wasn't previously available. The player will only charge at full speed when allowed to do so by a working USB host, so USB AC adapters won't work very well; however, they didn't work before either, so this is not a change in functionality.

4) The iPod Nano 2G code has been adjusted to use the new system: it already had the USB charging option. Using a USB AC adapter won't charge at full speed any more (it did before) - the old implementation was equivalent to the not-yet-implemented "force" option in the new system.

No other target should be affected. Support for the "force" mode and support for at least some other iPod models will come in a future commit :)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26570 a1c6a512-1295-4272-9138-f99709370657
2010-06-05 10:05:27 +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
Amaury Pouly
0104539a5f Enforce the 80-char limit to make everyone happy.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25619 a1c6a512-1295-4272-9138-f99709370657
2010-04-13 10:07:02 +00:00
Amaury Pouly
8a8568088f - Forget a cosmetic change.
- Interface number is in lower half of wIndex for interface control requests. Upper half is reserved and used in other protocols.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25618 a1c6a512-1295-4272-9138-f99709370657
2010-04-13 08:40:27 +00:00
Amaury Pouly
d372e3c8e6 Attempt to have a consistent coding convention in usb_core.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25617 a1c6a512-1295-4272-9138-f99709370657
2010-04-13 08:40:21 +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
Frank Gevaerts
c689496e04 Remove unnecessary (and incorrect) acks after stalling the control endpoint
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25359 a1c6a512-1295-4272-9138-f99709370657
2010-03-27 19:41:37 +00:00
Amaury Pouly
ad55f78a07 Commit a HID fix by gevaerts that prevent the HID driver to call usb_drv_send_nonblocking while the previous transfer has not finished because the current stack doesn't support transfer queueing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25329 a1c6a512-1295-4272-9138-f99709370657
2010-03-25 13:50:26 +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
Amaury Pouly
ae208af9cc - Fix the control_handler selection in usb_core when a request in sent to an endpoint (use endpoint dir and not EP_CONTROL !)
- Only interpret standard endpoint requests (previous code didn't check the request type) and pass all others to usb drivers.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25069 a1c6a512-1295-4272-9138-f99709370657
2010-03-08 13:00:24 +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
Amaury Pouly
ea5c6b94d0 Fix a compilation warning (simulator build on 64-bit host).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24251 a1c6a512-1295-4272-9138-f99709370657
2010-01-16 18:53:58 +00:00
Amaury Pouly
ca370f4b40 Fix a bug in usbserial that would allow to send messages on EP_CONTROL between usb init and endpoints allocation via logf.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24214 a1c6a512-1295-4272-9138-f99709370657
2010-01-11 21:03:48 +00:00
Bertrik Sikken
f736159e5c Make a few global variables static instead of global where possible
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24206 a1c6a512-1295-4272-9138-f99709370657
2010-01-09 17:42:54 +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
Frank Gevaerts
c12502f249 use the EP_DIR() macro to go from USB_DIR_* to a 0 or 1 value
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23640 a1c6a512-1295-4272-9138-f99709370657
2009-11-15 22:17:45 +00:00
Frank Gevaerts
724e4fe5e4 Don't use the same completion_event for both directions. This could cause problems on USB controllers that have IN and OUT endpoints with the same endpoint number (such as the arc controller)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23639 a1c6a512-1295-4272-9138-f99709370657
2009-11-15 21:58:25 +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
Tomer Shalev
31c18116de USB: Use explicit casting when setting wTotalLength field in descriptor
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23157 a1c6a512-1295-4272-9138-f99709370657
2009-10-13 19:50:23 +00:00
Tomer Shalev
de45938554 Fix yellow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22916 a1c6a512-1295-4272-9138-f99709370657
2009-10-04 14:23:55 +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
Tomer Shalev
8c5141b32e Commit "FS#10468 - USB HID: Show keypad mode on screen"
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22852 a1c6a512-1295-4272-9138-f99709370657
2009-09-30 10:06:04 +00:00
Frank Gevaerts
1eeab430a1 Add const to usb_serial_send() buffer.
Flyspray: FS#10519
Author: Amaury Pouly



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22422 a1c6a512-1295-4272-9138-f99709370657
2009-08-19 05:30:40 +00:00
Frank Gevaerts
f10a3c7bed Limit usb_serial packets to 32 bytes. It's unclear why this is needed, but usb serial packets larger than 96 bytes seem to never be sent.
Thanks to Amaury Pouly for investigating this


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22285 a1c6a512-1295-4272-9138-f99709370657
2009-08-12 20:35:01 +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
Bertrik Sikken
d767883a41 Various files: make functions static if they're local or make sure there is a proper #include if not
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22184 a1c6a512-1295-4272-9138-f99709370657
2009-08-06 09:28:25 +00:00
Maurus Cuelenaere
f060b9764d Remove USB storage defines from USB core
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22018 a1c6a512-1295-4272-9138-f99709370657
2009-07-23 23:05:26 +00:00
Frank Gevaerts
e409fba7f8 Flyspray: FS#10326
Author: Tomer Shalev

Adds a USB HID sample application, a plugin tha allows to send HID commands while connected in non-storage mode.
This also removes the HID stuff in the debug menu. Testing is now easily doable from the plugin
Also general HID updates


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21953 a1c6a512-1295-4272-9138-f99709370657
2009-07-18 12:58:29 +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
4f2dfcc01b always call the class driver init function. This is needed because they are called before the usb_core_enable_driver() calls, so depending on enabled status breaks things
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21069 a1c6a512-1295-4272-9138-f99709370657
2009-05-24 20:46:57 +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
bca3d3dca4 Fix #ifdef nesting to allow USB_HID to be built without USB_CHARGING_ONLY (FS#10236 by Tomer Shalev)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21052 a1c6a512-1295-4272-9138-f99709370657
2009-05-23 12:41:46 +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
2bc6b7c5cd Add usb_hid_usage_tables.h for HID to actually compile
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20963 a1c6a512-1295-4272-9138-f99709370657
2009-05-16 15:30:39 +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
Maurus Cuelenaere
1ab19d0b9b Disable usage of USB serial descriptor when no unique one is available
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20761 a1c6a512-1295-4272-9138-f99709370657
2009-04-20 20:24:23 +00:00
Frank Gevaerts
2a085f4477 Add preliminary HID driver. It doesn't do anything yet, but that should change soon (FS#10116 by Tomer Shalev)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20750 a1c6a512-1295-4272-9138-f99709370657
2009-04-19 21:17:18 +00:00
Frank Gevaerts
08b04cc587 reorganise usb_core.c a bit, to make the code more readable and more maintainable (FS#10150 by Tomer Shalev))
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20748 a1c6a512-1295-4272-9138-f99709370657
2009-04-19 19:53:32 +00:00
Frank Gevaerts
4bff30a77f simplify and cleanup usb_serial.c (FS#10149 by Tomer Shalev)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20746 a1c6a512-1295-4272-9138-f99709370657
2009-04-19 19:25:59 +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
Frank Gevaerts
463e20271b Fix some whitespace issues (including tabs that slipped in somehow) (FS#10144 by Tomer Shalev)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20731 a1c6a512-1295-4272-9138-f99709370657
2009-04-18 18:17:29 +00:00
Frank Gevaerts
a8b6f1cb7b Fix unintentional usage of relatively unknown C features (FS#10119, found by Tomer Shalev)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20685 a1c6a512-1295-4272-9138-f99709370657
2009-04-11 12:55:34 +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
Nicolas Pennequin
396aeafa6c Correct Björn's name in various file headers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20491 a1c6a512-1295-4272-9138-f99709370657
2009-03-23 17:08:46 +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