Welcome, Guest. Please login or register.

Author Topic: Subway and its mysteries  (Read 1695 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline GillooTopic starter

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 124
    • Show only replies by Gilloo
Subway and its mysteries
« on: May 04, 2011, 09:05:32 AM »
I've noticed a strange thing with a Sandisk Cruzer 256Mo and Subway

On Windows, usb 2.0 hispeed bulk endpoints are 512 bytes long.
On Subway usb 1.x fullspeed bulk endpoints are 64 bytes long.

On Subway, there are 2KB memory for data. If I use only 64 bytes for a transfer, It's a bad thing, for what are done all the rest ? So I got a grazy idea: in a transaction batch, I've put 8 data transfer (each 64 bytes long) for the same bulk endpoint, in hope to get the same 512 transfer...
and...
it works!!! I get nearly 400KB/s with fat95 (with ANAIIS, on a simple 68000!).

but this tip fails on 4GB thumbs, so, I have some questions:

Is it safe or what can I must check before to try this *dangerous* mode ?
What is the maximum data transfer rate with Subway on a 68000 (is it 64KBytes/s (64 bytes per ms) or higher) ?

thanks.
 

Offline mboehmer_e3b

  • Sr. Member
  • ****
  • Join Date: Aug 2002
  • Posts: 312
    • Show only replies by mboehmer_e3b
    • http://www.e3b.de/usb/
Re: Subway and its mysteries
« Reply #1 on: May 04, 2011, 12:44:15 PM »
Quote from: Gilloo;635260

On Windows, usb 2.0 hispeed bulk endpoints are 512 bytes long.
On Subway usb 1.x fullspeed bulk endpoints are 64 bytes long.


Per USB 1.1 specification, bulk endpoints are limited to 64bytes. This does not refer to Amiga, Windows, or SUBWAY, it is the USB1.1 limit on bulk endpoints. Only isochronous transfers can be longer (1023bytes AFAIK).

Quote

in a transaction batch, I've put 8 data transfer (each 64 bytes long) for the same bulk endpoint, in hope to get the same 512 transfer...
and...
it works!!! I get nearly 400KB/s with fat95 (with ANAIIS, on a simple 68000!).


This depends on if the device supports this kind of transfer correctly.
AFAIK there are rules on how transactions must be split across SOFs to ensure correct operation, but it's quite some time that I worked through USB specs...

I also remember devices (while Poseidon was in its first stages, and I bought quite some USB devices for testing) which had firmware problems on certain transaction, like refusing each second data packet.

How does the transfer fail on the 4GB stick?

Quote
What is the maximum data transfer rate with Subway on a 68000 (is it 64KBytes/s (64 bytes per ms) or higher) ?


Depends on the speed of clockport, and other factors. I have measure quite some time ago SUBWAY on both the original clockport and Zorro II based clockports (published on E3B website, section "USB", "Benchmarks"). For normal clockports it was around 350kB with Poseidon 2.0 and MSDs, for Zorro II based clockports around 600kB/s (Zorro II based clockports are faster).

USB1.1. allows 12MBit/s, which gives a theoretical limit of 1.43MB/s on raw bus transfer without Bit Stuffing, so if you go for 75% of bus bandwith you are stuck with 1.07MB/s on USB1.1 full speed devices.

Numbers are "rules of thumb", so don't expect it to be precise to the last digit :-)

Michael
 

Offline GillooTopic starter

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 124
    • Show only replies by Gilloo
Re: Subway and its mysteries
« Reply #2 on: May 04, 2011, 01:41:28 PM »
Hi Michael

I forgot this link, sorry
http://www.e3b.de/usb/index_e.html

Quote from: mboehmer_e3b;635283

How does the transfer fail on the 4GB stick?


First packet is ok, second and other packets fail (with STALL)

I thinking that bulk data endpoints have the same behaviour than endpoint 0, one packet per usb frame, but in this condition it would be impossible to get rate upper than 64KB/s (64 B/ms) So there is certainly a tip to organize packets in the transaction, perhaps by interleaving with other packets... perhaps I'm wrong.

I try to speed up this part, because usb thumbs are better than disks.
Actually I must wait 5 minutes to mount 4GB thumbs (because fat95 reads 4Mo of data at mount time)

thanks.