What determines # endpoints on RT73?

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=5201

Spoon

10-02-2009 15:45:53

I've noticed that the rt73 driver in 2.6.29 fully supports rt73 devices that have multiple out endpoints -- one for each TX queue.

I have 6 different RT73 devices. 2 of these have multiple out endpoints, the other 4 only have a single one. All of them appear to use the same chip the RT2571WF.

Does anyone know what determines if the RT73 exposes the multiple endpoints or not? It's the same hardware... same driver.. so why would they change this behavior on different devices?

IvD

10-02-2009 15:54:34

The driver loops through all provided endpoints. The USB subsystem lists these endpoints for the driver, so the deciding factor of how many endpoints are available would be the USB device itself and the USB host.

Spoon

10-02-2009 18:15:07

Yes, I understand that part. My question is why do some (most?) RT73 devices only have 1 out endpoint, but others all 4? It's the same hardware, so why are they different?

IvD

10-02-2009 18:25:03

Did you stick them in the same USB host device?
Otherwise, I don't wnow why there are differences.

Spoon

10-02-2009 19:25:09

Yep, same host. My Gigabyte and Qcom RT73 devices show
[code3rmza0f3]C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=300mA
I:* If#= 0 Alt= 0 #EPs= 5 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms[/code3rmza0f3]
But my Linksys, Asus, D-Link, and AZiO show
[code3rmza0f3]C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=300mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms[/code3rmza0f3]
Pretty strange.

IvD

10-02-2009 19:29:05

Oh that isn't "the same hardware" it only means "the same Ralink chipset". It is up to the actual manufacturer of the stick to decide the number of endpoints. Apparently Gigabyte and Qcom try to provide most endpoints to get some better performance, while the others don't care.

Spoon

10-02-2009 20:03:34

Sorry, yes, that is what I meant they all have RT2571WF chips in them. So I guess when the chip boots it must look up details like its USB VID, PID, and endpoints from somewhere (the VID and PID don't appear to be in the EEPROM, from what I can tell).

Rather disappointing that all RT73s are not equal!

IvD

10-02-2009 21:42:22

As I said, the chipset does not control the number of endpoints. It is the manufacturer of the actual USB dongle which adds the USB endpoints. rt2x00 will poll the device to see the number of endpoints, it can't ask the Ralink chip that information, since the chip doesn't contain that information.

Starcrasher

11-02-2009 23:53:49

Oh that isn't "the same hardware" it only means "the same Ralink chipset". It is up to the actual manufacturer of the stick to decide the number of endpoints. Apparently Gigabyte and Qcom try to provide most endpoints to get some better performance, while the others don't care.[/quoteaupgjy08]
Well, Soon started with a question and we have another in return.
Did you notice if those devices with multiple out endpoints really perform better ?

IvD

12-02-2009 11:51:11

I haven't done any performance testing with the new code (I hardly do any perfomance testing at all, I leave that up to the users. ;) )

Spoon

12-02-2009 17:41:09

It does seem to make a difference in some cases. For example, I can see a difference when trying to do an FTP upload with a VoIP call up. However, I can't detect a difference with a VoIP call and casual web browsing.

I'm still trying to figure out how each device maker changes this behavior. I guess there must be another EEPROM somewhere that contains the VID, PID, and endpoint definitions. The EEPROM that is exposed by the rt2x00 debug interface certainly does not contain this information.

IvD

12-02-2009 18:09:49

It does seem to make a difference in some cases. For example, I can see a difference when trying to do an FTP upload with a VoIP call up. However, I can't detect a difference with a VoIP call and casual web browsing.
[/quotejz6y5xi6]

Did you enable CONFIG_NET_SCHED and did you use tc to add trafficshapers to control the priorities of the outgoing queues?


I'm still trying to figure out how each device maker changes this behavior. I guess there must be another EEPROM somewhere that contains the VID, PID, and endpoint definitions. The EEPROM that is exposed by the rt2x00 debug interface certainly does not contain this information.[/quotejz6y5xi6]

I have already explained the reason for this several times now. Reread my previous posts.

Spoon

12-02-2009 19:49:26

Did you enable CONFIG_NET_SCHED and did you use tc to add trafficshapers to control the priorities of the outgoing queues?[/quote3q33kxzg]No. I thought the requirement of CONFIG_NET_SCHED for mac80211 QoS was removed a while ago (and from the code it looks like it). My VoIP traffic has its DSCP set and does get placed in a different QoS queue. I can see the difference between my Gigabyte device and Linksys device.

I have already explained the reason for this several times now. Reread my previous posts.[/quote3q33kxzg]All you've said is that the manufacturer is responsible for defining the endpoints, not [i3q33kxzg]how[/i3q33kxzg] they do it.

IvD

12-02-2009 20:01:58

Did you enable CONFIG_NET_SCHED and did you use tc to add trafficshapers to control the priorities of the outgoing queues?[/quote3jtdglej]No. I thought the requirement of CONFIG_NET_SCHED for mac80211 QoS was removed a while ago (and from the code it looks like it). My VoIP traffic has its DSCP set and does get placed in a different QoS queue. I can see the difference between my Gigabyte device and Linksys device.
[/quote3jtdglej]

The requirement is still present, since although the QOS was removed from mac80211 it was completely moved into the network stack. mac80211 registers multiple TX queues to the network stack, and in there the regular traffic shapers must be used to optimize the prioritization of all frames. Otherwise all MGMT frames go to queue 1 while all DATA frames go to queue 3. While the DATA frames need to be prioritized as well.