Skip to contentSkip to conversation

usb: musb: Scheduling of interrupt endpoints

DISCUSSION Carsten Behling 2 participants 6 messages Dec 23, 2014 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Would it help if I send a patch as a suggestion and as basis for discussion?

Quoted 18 lines · Carsten Behling

Hi all,

Long time ago, TI shipped a kernel named linux-2.6.32.17-psp03.01.01.39 with an additional kernel option for scheduling of interrupt endpoints.

AFAIK, this seems to be the only possibility to attach more that 4 in endpoints to MUSB (at least on a DM368).

This feature reserves one hardware endpoint unit to time schedule interrupt in endpoints based on its bInterval value triggered by the SOF interrupt.

I didn't find any discussion about adding such a feature to the mainline kernel. IMHO, this feature is absolutely necessary. But there may be reasons, not to add it (e.g. CPU load).

Please let me know your thoughts and ideas.

Best regards
-Carsten

#2 lore raw

Hi,

Quoted 2 lines · Carsten Behling

Would it help if I send a patch as a suggestion and as basis for discussion?

yes, it would also help if you didn't top-post :-)

Signature · 1 line
balbi
#3 lore raw

Hi Felipe,

Quoted 7 lines · Felipe Balbi

Hi,

Quoted 2 lines · Carsten Behling

Would it help if I send a patch as a suggestion and as basis for discussion?

yes, it would also help if you didn't top-post :-)

So would you suggestion be to port that feature from the old linux-2.6.32.17-psp03.01.01.39 kernel from TI or should we rather add a tree based implementation as done for OHCI?

-Carsten

#4 lore raw

Hi,

Quoted 9 lines · Carsten Behling
Quoted 5 lines · Carsten Behling
Quoted 2 lines

Would it help if I send a patch as a suggestion and as basis for discussion?

yes, it would also help if you didn't top-post :-)

So would you suggestion be to port that feature from the old linux-2.6.32.17-psp03.01.01.39
kernel from TI or should we rather add a tree based implementation as done for OHCI?

quite frankly, I don't know and, because of my email domain, I can't really say out loud what I really think about those old TI releases :-)

IMHO, the best thing would be to completely ignore old kernels and have a critical look at that part of the code on MUSB Host. Right now, MUSB has a really brain dead endpoint allocation algorithm and it only works for bulk (dynamic allocation, that is). Interrupt and isochronous are left out of dynamic allocation which, IMHO, makes no sense what so ever.

I guess the users of MUSB would benefit a whole lot more if someone were to redesign that logic altogether so that all endpoints can be dynamically allocated.

One easy way to test things out is to attach a ton of hubs and several USB Serial adapters to a single MUSB port. All hubs and all USB serial adapters - of course, as long as you follow USB spec's limitation on maximum tier level and maximum number of devices.

cheers

Signature · 1 line
balbi
#5 lore raw
In reply to Carsten Behling

The following comment can be found in 'musb_schedule()':

'* REVISIT what we really want here is a regular schedule tree
* like e.g. OHCI uses.'

So I assume the best practice would be to make an implementation based on the code in in ohci-q.c. And it would be waste of time to port the old interrupt endpoint scheduling feature of TI.

Am I right?

Quoted 22 lines · Carsten Behling

Would it help if I send a patch as a suggestion and as basis for discussion?

Quoted 18 lines · Carsten Behling

Hi all,

Long time ago, TI shipped a kernel named linux-2.6.32.17-psp03.01.01.39 with an additional kernel option for scheduling of interrupt endpoints.

AFAIK, this seems to be the only possibility to attach more that 4 in endpoints to MUSB (at least on a DM368).

This feature reserves one hardware endpoint unit to time schedule interrupt in endpoints based on its bInterval value triggered by the SOF interrupt.

I didn't find any discussion about adding such a feature to the mainline kernel. IMHO, this feature is absolutely necessary. But there may be reasons, not to add it (e.g. CPU load).

Please let me know your thoughts and ideas.

Best regards
-Carsten

#6 lore raw

Hi,

A: No.
Q: Should I include quotations after my reply?

Quoted 10 lines · Carsten Behling

The following comment can be found in 'musb_schedule()':

'* REVISIT what we really want here is a regular schedule tree
* like e.g. OHCI uses.'

So I assume the best practice would be to make an implementation based on the code in in ohci-q.c. And it would be waste of time to port the old interrupt endpoint scheduling feature of TI.

Am I right?

Frankly, OHCI is a better example than TI's MUSB from 200 years ago, that's correct :-)

cheers

Signature · 1 line
balbi