October 27, 2008

USB Mass Storage

Moin.

Since I have signed for the USB Mass Storage bounty, I started to toy with the USB manuals, AROS' USB stack and Efika. During my coding evening it suddenly turned out, that I've lost the bits and pieces of AROS USB code which were responsible for Bulk transfers. Funny. They were there a very long time ago, among my sources, now they were gone.

Whatever. I've added the bulk transfer support to USB stack implemented it in both OHCI and UHCI driver (the support for UHCI will follow shortly) and wrote the first bits and pieces of mass storage class. Here's the result:


[USB] USB::NewDevice()
[USB] Trying external class "hid.hidd"
[USB] Trying external class "storage.hidd"
[MSS] MatchCLID(0x8ed55, 0x89d74)
[MSS] UDCLASS_IN_INTERFACE OK. Checking interface 0
[MSS] iface 0 @ 0x89d7d class 8 subclass 6 protocol 80
[MSS] Interface may be handled by Mass Storage Class
[MSS] Lucky you. The device supports Bulk Only transport
[MSS] Protocol used: SCSI complete
[MSS] Pick me! Pick me! Pick me! I can handle it!
[USB] clid = 0xff93ede4
[MSS] Storage::New()
[USB] USBDevice::New()
[USBDevice::New] Device 0165:1307 00/00/00 at address 0008c314:02
[USBDevice::New] Default LangID=0904
[USBDevice::New] iProduct = "USB Flash Disk"
[USBDevice::New] iManufacturer = "General"
[USBDevice::New] iSerial = "4b25950686c791"
[MSS] GetMaxLUN returns 0
[MSS] Interface is supposed to have 3 endpoints
[MSS] OUT endpoint found
[MSS] IN endpoint found
[MSS] DirectSCSI -> (43425355,00000001,00000008,00,80,0a)
[MSS] DirectSCSI <- (53425355,00000001,00000000,00)
[MSS] Detected capacity: 964MB
[MSS] DirectSCSI -> (43425355,00000002,00000400,00,80,0a)
[MSS] DirectSCSI <- (53425355,00000002,00000000,00)
[MSS] 0000: eb 3c 90 4d 53 44 4f 53 35 2e 30 00 02 20 01 00 .<.MSDOS5.0.. ..
[MSS] 0010: 02 00 02 00 00 f8 f1 00 3f 00 ff 00 00 00 00 00 ........?.......
[MSS] 0020: 00 20 1e 00 00 00 29 b6 3b 10 80 4e 4f 20 4e 41 . ....).;..NO NA
[MSS] 0030: 4d 45 20 20 20 20 46 41 54 31 36 20 20 20 33 c9 ME FAT16 3.
[MSS] 0040: 8e d1 bc f0 7b 8e d9 b8 00 20 8e c0 fc bd 00 7c ....{.... .....|
[MSS] 0050: 38 4e 24 7d 24 8b c1 99 e8 3c 01 72 1c 83 eb 3a 8N$}$....<.r...:
[MSS] 0060: 66 a1 1c 7c 26 66 3b 07 26 8a 57 fc 75 06 80 ca f..|&f;.&.W.u...
[MSS] 0070: 02 88 56 02 80 c3 10 73 eb 33 c9 8a 46 10 98 f7 ..V....s.3..F...
[MSS] 0080: 66 16 03 46 1c 13 56 1e 03 46 0e 13 d1 8b 76 11 f..F..V..F....v.
[MSS] 0090: 60 89 46 fc 89 56 fe b8 20 00 f7 e6 8b 5e 0b 03 `.F..V.. ....^..
[MSS] 00a0: c3 48 f7 f3 01 46 fc 11 4e fe 61 bf 00 00 e8 e6 .H...F..N.a.....
[MSS] 00b0: 00 72 39 26 38 2d 74 17 60 b1 0b be a1 7d f3 a6 .r9&8-t.`....}..
[MSS] 00c0: 61 74 32 4e 74 09 83 c7 20 3b fb 72 e6 eb dc a0 at2Nt... ;.r....
[MSS] 00d0: fb 7d b4 7d 8b f0 ac 98 40 74 0c 48 74 13 b4 0e .}.}....@t.Ht...
[MSS] 00e0: bb 07 00 cd 10 eb ef a0 fd 7d eb e6 a0 fc 7d eb .........}....}.
[MSS] 00f0: e1 cd 16 cd 19 26 8b 55 1a 52 b0 01 bb 00 00 e8 .....&.U.R......
[MSS] 0100: 3b 00 72 e8 5b 8a 56 24 be 0b 7c 8b fc c7 46 f0 ;.r.[.V$..|...F.
[MSS] 0110: 3d 7d c7 46 f4 29 7d 8c d9 89 4e f2 89 4e f6 c6 =}.F.)}...N..N..
[MSS] 0120: 06 96 7d cb ea 03 00 00 20 0f b6 c8 66 8b 46 f8 ..}..... ...f.F.
[MSS] 0130: 66 03 46 1c 66 8b d0 66 c1 ea 10 eb 5e 0f b6 c8 f.F.f..f....^...
[MSS] 0140: 4a 4a 8a 46 0d 32 e4 f7 e2 03 46 fc 13 56 fe eb JJ.F.2....F..V..
[MSS] 0150: 4a 52 50 06 53 6a 01 6a 10 91 8b 46 18 96 92 33 JRP.Sj.j...F...3
[MSS] 0160: d2 f7 f6 91 f7 f6 42 87 ca f7 76 1a 8a f2 8a e8 ......B...v.....
[MSS] 0170: c0 cc 02 0a cc b8 01 02 80 7e 02 0e 75 04 b4 42 .........~..u..B
[MSS] 0180: 8b f4 8a 56 24 cd 13 61 61 72 0b 40 75 01 42 03 ...V$..aar.@u.B.
[MSS] 0190: 5e 0b 49 75 06 f8 c3 41 bb 00 00 60 66 6a 00 eb ^.Iu...A...`fj..
[MSS] 01a0: b0 4e 54 4c 44 52 20 20 20 20 20 20 0d 0a 4e 54 .NTLDR ..NT
[MSS] 01b0: 4c 44 52 20 69 73 20 6d 69 73 73 69 6e 67 ff 0d LDR is missing..
[MSS] 01c0: 0a 44 69 73 6b 20 65 72 72 6f 72 ff 0d 0a 50 72 .Disk error...Pr
[MSS] 01d0: 65 73 73 20 61 6e 79 20 6b 65 79 20 74 6f 20 72 ess any key to r
[MSS] 01e0: 65 73 74 61 72 74 0d 0a 00 00 00 00 00 00 00 00 estart..........
[MSS] 01f0: 00 00 00 00 00 00 00 00 00 00 00 ac bf cc 55 aa ..............U.


With a bit of luck mass storage bounty will be completed next week :)

7 Comments:

Anonymous Andi said...

WOW - Michael!!!

You're a miracle. Thanx a lot.
Keep up your wonderful work.

Greets
Andi

8:55 AM  
Anonymous Anonymous said...

I just love fast moving bounties!!

Zevs

3:55 PM  
Anonymous Anonymous said...

hooray for michal! hooray for aros!

6:35 PM  
Anonymous TADsince1995 said...

Really great work!!! Do you think that with the usb mass storage bounty we will be able to boot aros from a usb/sd drive? My goal is to install aros on a SDHC and have it run on my eeepc 900!

5:07 PM  
Anonymous skipp604 said...

Can't wait to see the results of your work on my own Efi :-) Waiting impatiently.

8:24 AM  
Anonymous Anonymous said...

looks it can read msdos disk, woohoo, we are almost in!
Please keep up!!!

11:38 PM  
Anonymous Anonymous said...

Just hope the FAT/FAT32 file system is implemented correctly this time around. A while back when I looked, it wasn't compatible with Windows.

2:30 PM  

Post a Comment

<< Home