Commit graph

215 commits

Author SHA1 Message Date
Barry Wardell
4c67c334fe Oops. Didn't mean to commit this.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16515 a1c6a512-1295-4272-9138-f99709370657
2008-03-04 14:40:04 +00:00
Barry Wardell
46973f7f9f Only need to include these for e200.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16514 a1c6a512-1295-4272-9138-f99709370657
2008-03-04 14:36:22 +00:00
Frank Gevaerts
52df7addcf present a different USB serial number depending on which USB class drivers are enabled. This is needed for Windows to correctly detect the device if a different set of drivers is active than on the previous plugin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16511 a1c6a512-1295-4272-9138-f99709370657
2008-03-04 12:08:00 +00:00
Frank Gevaerts
931ceed47f MODE SENSE output data length field has to be the length of the response excluding the length field.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16508 a1c6a512-1295-4272-9138-f99709370657
2008-03-04 00:55:26 +00:00
Frank Gevaerts
19815f8197 fix endianness bug in MODE SENSE 10 response
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16507 a1c6a512-1295-4272-9138-f99709370657
2008-03-04 00:46:52 +00:00
Frank Gevaerts
6cfa909002 handle START_STOP_UNIT eject command, to make TEST_UNIT_READY return false once the OS ejects
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16503 a1c6a512-1295-4272-9138-f99709370657
2008-03-03 22:53:25 +00:00
Frank Gevaerts
81d3a02928 mark all drives as DEVICE_REMOVABLE to make mac osx (and some developers) happy
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16502 a1c6a512-1295-4272-9138-f99709370657
2008-03-03 22:19:38 +00:00
Frank Gevaerts
ebb49434c6 fix wrong building block_count from read and write commands
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16501 a1c6a512-1295-4272-9138-f99709370657
2008-03-03 22:17:21 +00:00
Frank Gevaerts
f8a5a40301 remove usb_benchmark. Its usefulness is extremely limited, and the usb stack around it is moving fast, so it's likely to suffer from bit rot very soon.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16500 a1c6a512-1295-4272-9138-f99709370657
2008-03-03 17:59:58 +00:00
Frank Gevaerts
c270b7a289 only send a Charging Only interface if nothing else is sent
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16499 a1c6a512-1295-4272-9138-f99709370657
2008-03-03 12:51:32 +00:00
Frank Gevaerts
a9afca99a8 remove stalls that are optional. This makes osx not crash on disconnect
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16498 a1c6a512-1295-4272-9138-f99709370657
2008-03-03 12:38:15 +00:00
Frank Gevaerts
0b4299a82f extra input checking
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16493 a1c6a512-1295-4272-9138-f99709370657
2008-03-02 23:34:30 +00:00
Frank Gevaerts
8abe9cffe4 remove a reundant MIN(), and reduce the buffer. We really don't need 16k for this. It seems to work reliably at full speed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16491 a1c6a512-1295-4272-9138-f99709370657
2008-03-02 22:12:51 +00:00
Frank Gevaerts
793fc3f072 add some #ifdefs to gt rid of some unused variable warnings (and their RAM use)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16487 a1c6a512-1295-4272-9138-f99709370657
2008-03-02 21:00:12 +00:00
Frank Gevaerts
776d015cc4 implement logf over usb-serial. Needs USB_SERIAL defined in usb_core.h to work, and needs to be enabled in the debug menu.
It stops sending data after a while for unknown reasons.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16486 a1c6a512-1295-4272-9138-f99709370657
2008-03-02 20:45:33 +00:00
Frank Gevaerts
b3ab788411 update the bNumInterfaces field in the configuration descriptor correctly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16485 a1c6a512-1295-4272-9138-f99709370657
2008-03-02 18:53:52 +00:00
Frank Gevaerts
f18d20ee36 Only show the usb screen once a real usb connection is established. In case other threads are slow in acknowledging the SYS_USB_CONNECTED message, tell the OS that the disk is not ready yet (the OS interprets this as "spinning up")
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16471 a1c6a512-1295-4272-9138-f99709370657
2008-03-02 00:15:02 +00:00
Frank Gevaerts
5daf9b043a only initialize class drivers that are actually enabled. This is needed for usb-storage because it grabs the audio buffer during usb_storage_init(), which stops playback. It's probably also the right thing to do for other drivers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16467 a1c6a512-1295-4272-9138-f99709370657
2008-03-01 19:28:09 +00:00
Frank Gevaerts
8865490106 Move all pointers to the transfer buffer area into a union. This makes it clear that they are meant to point to the same data, and should make code and RAM usage slightly smaller
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16458 a1c6a512-1295-4272-9138-f99709370657
2008-02-29 21:10:31 +00:00
Frank Gevaerts
d8df26abfb return real data on MODE_SENSE. This might fix the mac osx problems
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16457 a1c6a512-1295-4272-9138-f99709370657
2008-02-29 19:25:14 +00:00
Frank Gevaerts
f712c7ff36 fix alignment and packed-ness of USB structs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16455 a1c6a512-1295-4272-9138-f99709370657
2008-02-29 18:33:54 +00:00
Frank Gevaerts
2662f1b3ce - some SCSI/UMS fixes
- don't boost the CPU any more. The USB driver does that
- only mark the SD-card slot on sansas removable (decision on what is the right thing to do is still pending)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16448 a1c6a512-1295-4272-9138-f99709370657
2008-02-28 22:35:23 +00:00
Frank Gevaerts
be29249bf2 make the ipod serial number 24 characters long. This makes the Vista BSOD go away
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16438 a1c6a512-1295-4272-9138-f99709370657
2008-02-27 21:16:49 +00:00
Frank Gevaerts
1341ae3a24 use get_audio_buffer() to allocate all needed buffer stace for the usb storage driver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16437 a1c6a512-1295-4272-9138-f99709370657
2008-02-27 20:25:32 +00:00
Frank Gevaerts
6e7fac7c34 move the usb_core thread functionality to the main usb thread
fix button-detection so screenshots and charge-only mode work without enabling UMS
firewire detection is now handled separately from usb detection
increase the usb thread priority while an UMS connection is active


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16435 a1c6a512-1295-4272-9138-f99709370657
2008-02-27 19:08:30 +00:00
Frank Gevaerts
97d7f39680 added support for USB port test modes, which are (a) required by the spec, and (b) needed for electrical (i.e. signal quality) testing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16427 a1c6a512-1295-4272-9138-f99709370657
2008-02-26 18:02:26 +00:00
Frank Gevaerts
7bf5722a9d some progress towards software-selectability of usb class drivers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16422 a1c6a512-1295-4272-9138-f99709370657
2008-02-25 23:43:11 +00:00
Frank Gevaerts
30b129d025 only set the serial descriptor once
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16421 a1c6a512-1295-4272-9138-f99709370657
2008-02-25 22:26:07 +00:00
Frank Gevaerts
7b8bb47036 Don't send a serial number id USE_ROCKBOX_USB. There is something about the current ipod serial number that causes Vista BSODs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16416 a1c6a512-1295-4272-9138-f99709370657
2008-02-25 12:48:23 +00:00
Frank Gevaerts
abc3ae6a6f report usb 1.1 compliance if USE_HIGH_SPEED is not set. This should avoid Windows telling the user to plug in the device into a high speed port
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16406 a1c6a512-1295-4272-9138-f99709370657
2008-02-24 13:45:36 +00:00
Jens Arnold
fbfda7e5ba Identify info endianness is already handled in the ATA driver.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16380 a1c6a512-1295-4272-9138-f99709370657
2008-02-23 08:22:12 +00:00
Frank Gevaerts
6431cd327c - Attempt to generate the usb serial number from the disk serial number
- serial number length is again target dependent


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16374 a1c6a512-1295-4272-9138-f99709370657
2008-02-22 23:14:24 +00:00
Frank Gevaerts
f5c1262f75 fix usb string descriptors
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16372 a1c6a512-1295-4272-9138-f99709370657
2008-02-22 22:25:00 +00:00
Frank Gevaerts
9dbe7f2a8c Improve usb descriptor handling. This should fix any cache and/or alignment related problem.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16371 a1c6a512-1295-4272-9138-f99709370657
2008-02-22 20:38:31 +00:00
Frank Gevaerts
e744dd4353 fix wrong LBA range check with sectorsizes larger than 512 bytes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16362 a1c6a512-1295-4272-9138-f99709370657
2008-02-21 11:59:17 +00:00
Frank Gevaerts
07427592a9 Major USB stack improvements. It now works at nearly the maximum speed for a full speed connection, and does seem stable.
Still not enabled by default, #define USE_ROCKBOX_USB is still required to enable it.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16360 a1c6a512-1295-4272-9138-f99709370657
2008-02-20 22:54:26 +00:00
Dave Chapman
fe4ffbd94c Optimise (replace two loops with one) and bug-fix the ProductId string returned by SCSI Inquiry - the previous code was skipping 4 shorts (the first 8 chars) of the ProductId.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16285 a1c6a512-1295-4272-9138-f99709370657
2008-02-11 18:08:21 +00:00
Björn Stenberg
8545c3bdcf Removed compiler warning
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16280 a1c6a512-1295-4272-9138-f99709370657
2008-02-11 14:38:43 +00:00
Björn Stenberg
2f7cffa204 Major USB fixes by Frank Gevaerts. Still disabled in builds, #define USE_ROCKBOX_USB to test.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16279 a1c6a512-1295-4272-9138-f99709370657
2008-02-11 14:26:25 +00:00
Christian Gmeiner
94be71eab5 Add a working serial driver to usb stack. At the moment it simply echos back what it gets. You can test it on linux by
0) change relevant defines in usb_core.c
1) modprobe usbserial vendor=0x0781 product=0x7421 debug=1
2) picocom /dev/ttyUSB0
3) look at your logf screen if you build with logf support and enabled LOGF_ENABLE define in usb_serial.c
I also modified usb_core so that storage and serial both can make use the the 'usb_core'-thread. More will come :)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15850 a1c6a512-1295-4272-9138-f99709370657
2007-11-30 00:13:00 +00:00
Björn Stenberg
da245a9ae9 Added support for 'deconfiguration'.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15799 a1c6a512-1295-4272-9138-f99709370657
2007-11-24 23:43:06 +00:00
Björn Stenberg
d2b86885d5 Fixed memory corruption bug for those testing usb_storage.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15798 a1c6a512-1295-4272-9138-f99709370657
2007-11-24 22:40:37 +00:00
Björn Stenberg
bfff12aff9 Added GET_CONFIGURATION. Added usb state tracking. Changed charger pktsize to 512. Fixed compile errors for usb_storage.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15797 a1c6a512-1295-4272-9138-f99709370657
2007-11-24 22:37:41 +00:00
Björn Stenberg
20dbc1b21f Re-added USB charger detection and auto reboot on host connect.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15774 a1c6a512-1295-4272-9138-f99709370657
2007-11-23 15:02:26 +00:00
Björn Stenberg
482e839ea9 Enable usbstack on ipods.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15772 a1c6a512-1295-4272-9138-f99709370657
2007-11-23 09:58:47 +00:00
Björn Stenberg
b4e5123e5d New USB stack
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15758 a1c6a512-1295-4272-9138-f99709370657
2007-11-22 20:51:00 +00:00
Christian Gmeiner
0f5d9f9125 first part of usbstack patches -> show and use selection of usb stack mode only, if
a target supports both modes.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14916 a1c6a512-1295-4272-9138-f99709370657
2007-09-30 12:25:06 +00:00
Peter D'Hoye
a576657011 Get/Set Interface - just stores the value, makes one more compliance test pass
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14794 a1c6a512-1295-4272-9138-f99709370657
2007-09-20 23:31:57 +00:00
Peter D'Hoye
e4363c116c usb stack code police, fix some warnings and set svn keywords correctly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14761 a1c6a512-1295-4272-9138-f99709370657
2007-09-19 23:20:55 +00:00
Peter D'Hoye
b0c996ba92 code police, no functional changes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14737 a1c6a512-1295-4272-9138-f99709370657
2007-09-17 20:49:02 +00:00
Christian Gmeiner
db4753e924 usb stack: add support for standard request get string
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14626 a1c6a512-1295-4272-9138-f99709370657
2007-09-06 07:17:54 +00:00
Christian Gmeiner
649734f5fc remove some debug..
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14543 a1c6a512-1295-4272-9138-f99709370657
2007-08-30 19:55:36 +00:00
Christian Gmeiner
c7b3f8be9b add missing get configuration request handling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14530 a1c6a512-1295-4272-9138-f99709370657
2007-08-29 22:04:09 +00:00
Christian Gmeiner
e3bef6728f make USB Command Verifier happy
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14526 a1c6a512-1295-4272-9138-f99709370657
2007-08-29 19:13:07 +00:00
Christian Gmeiner
57c2a5fa5a add support to switch device driver at runtime
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14508 a1c6a512-1295-4272-9138-f99709370657
2007-08-29 11:55:23 +00:00
Christian Gmeiner
17f2dd5c13 endpoint address was only set in fs descriptor, but we need it in hs too. Update storage device descriptor dynamic based on dcd
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14507 a1c6a512-1295-4272-9138-f99709370657
2007-08-29 10:14:47 +00:00
Christian Gmeiner
7d4c7f9f28 we use only 2 endpoints
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14502 a1c6a512-1295-4272-9138-f99709370657
2007-08-29 09:17:15 +00:00
Peter D'Hoye
52a60df47e code police part two (/me blames his editor)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14500 a1c6a512-1295-4272-9138-f99709370657
2007-08-29 00:47:04 +00:00
Peter D'Hoye
924e906c27 Remove two more warnings when building the usb stack
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14497 a1c6a512-1295-4272-9138-f99709370657
2007-08-28 23:49:03 +00:00
Christian Gmeiner
4474d6827c binding a device driver could fail.. handle this case
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14493 a1c6a512-1295-4272-9138-f99709370657
2007-08-28 20:50:41 +00:00
Christian Gmeiner
195ef597f5 Add support for full and highspeed in stack and drivers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14492 a1c6a512-1295-4272-9138-f99709370657
2007-08-28 20:29:28 +00:00
Dave Chapman
b016131c00 Set svn:keywords
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14485 a1c6a512-1295-4272-9138-f99709370657
2007-08-27 22:12:35 +00:00
Dave Chapman
03745f4ed3 Cosmetic changes only - tab, whitespace and brace policing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14484 a1c6a512-1295-4272-9138-f99709370657
2007-08-27 22:07:36 +00:00
Christian Gmeiner
5365535daa fix lang problem and little clean up
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14477 a1c6a512-1295-4272-9138-f99709370657
2007-08-27 17:45:01 +00:00
Christian Gmeiner
8181a0c905 Usb Stack: only setup packet handling, and not enabled by default as there is a lot to do.
* settings code is not fully ready -> changing device driver has no effect
* clean ups
* check copyriths
* find a way to detect IN transfers
* support for full and highspeed
* ...




git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14470 a1c6a512-1295-4272-9138-f99709370657
2007-08-27 16:04:32 +00:00