Benjamin Herrenschmidt wrote:
> 
> >Benjamin Herrenschmidt wrote:
> >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.
> 
> Ah ok, I didn't know a single PTD could cover more datas and
> was currently hacking a way to put several PTDs for such type
> of transfers. I'll go back to your solution,
> 

Well thats an OHCI feature ;)

> One more "definitive" solution would be to configure that by
> passing the packet type down to hc_add_trans so it can do statistics
> (per-packet type data counters) and decide wether to accept or not
> a packet depending on the buffer's occupation.
> 

Hm, eigther we make a full per endpoint statistic (max packets per
frame) 
or we just count the active URBs of bulk and control type and
calculate some strange heuristics(eg. 19 / number_of_URBS).

> Also, I beleive the ratio ATL/ITL should be somewhat configurable,
> probably as a module option.
> 

Should be no problem.

> I'll post a patch if I get something working better. If you have
> a more recent source or want me to do experiments with ISO (I have
> a CATC this week), don't hesitate to ask.
> 
> >The wasted frames between the transfers seems to be a feature of the
> >isp1161.
> 
> Looks like this chip has many interesting "features" ;)
>

What do you expect from a castrated OHCI controller ;-)
OHCI uses lists of lists of descriptors (somehow two-dimensional)
and the isp1161 just uses a linear array of copy in copy out memory.
I guess 16k or 32kByte of dual-port RAM and a unchanged OHCI 
would have done a better job.
 
> One thing I'll look into rsn is DMA.

The problem is that you get two interrupts per dma
transfer or three interrupts per frame (without isoc).
1. interrupt: hc_atl_transfered -> start dma in from isp1161
2. interrupt: dma in finished -> start dma out to isp1161
3. interrupt: dma out finished

With isoc you get up to 6 interrupts per 1ms frame.

- Roman

> 
> Ben.


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

Reply via email to