Benjamin Herrenschmidt wrote:
> 
> Ok, Back to USB hacking.
> 
> I didn't reproduce my USB host disconnect problem after fixing a
> problem with the IO timings on the CPU bus to the controller.
> 
> However, I noticed another issue. I tried plugging an USB mass storage
> device and experienced very very slow transfer speed (about 4k/sec).
> 
> Using an analyser, I noticed that the driver is only tranfering one
> bulk (64 bytes) packet every 2 frames. Actually, I see that when
> "spying" a transfer:
> 
>  IN (ep 1)  DATA0 (64 bytes)
>  ACK
>  SOF
>  SOF
>  IN (ep 1)  DATA1 (64 bytes)
>  SOF
>  SOF
> 
> etc...
> 
> Before I start diving into your driver's guts, any clue about
> what's up ?
> 
The one packet is a limitation of v0.8. But you can change it to
a larger number e.g. 4 or 8 (max 19) by replacing the 1s in
hc_add_trans()/hc_isp116x.c

-  if (len > maxps *1)
-    len = maxps * 1;
+  if (len > maxps * 8)
+    len = maxps * 8;

A larger number means more packets to the same Endpoint 
per frame. But if the device
don't accept so many packets it NAKs and this means wasted 
(expensive) data I/O to the isp1161.
More than 19 packets makes no sense because the USB can
only transfer up to 19 64-Bytes long packets within one frame.
And if the packets (endpoint maxpacketsize)
are shorter then 64 then the endpoint 
most likely does not expect that much bandwidth, anyway. 
But I have to think about a 
good heuristic for the number of packets.

The wasted frames between the transfers seems to be a feature of the 
isp1161. 


> BTW. On the "device" side, now that those low-level IO stuffs are
> fixed, I could verify that my interface to the chip is working properly,
> I'll have a coupe of functions implemented soon, I'll post the code
> once done so we can think about a unified device interface.
> 

OK.

- Roman

> Regards,
> Ben.
> 
> _______________________________________________
> [EMAIL PROTECTED]
> To unsubscribe, use the last form field at:
> https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to