Re: Configuration selection when RNDIS Host not enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 22 Jul 2010 14:41:06 +0200, Adam Kropelin <akropel1@xxxxxxxxxxxxxxxx> wrote:
2010/7/22 Michał Nazarewicz <m.nazarewicz@xxxxxxxxxxx>:
On Wed, 21 Jul 2010 23:44:25 +0200, Adam Kropelin
<akropel1@xxxxxxxxxxxxxxxx> wrote:
In the broader case, to some extent I wonder if the logic in
usb_choose_configuration() should be as simple as choosing the one and
only config regardless of any heuristics in all cases where only a
single config is present. Is there value in failing to select any
configuration at all?

I had an idea once to make the code choose configuration with the smallest
bConfigurationValue.   This way, composite devices could provide RNDIS
configuration as the first one with bConifgurationValue == 2 and the other
configuration, as second one, with bConfigurationValue == 1.  This is what
Ethernet gadget does for instance.

A reasonable idea, but not the issue I'm trying to solve. I want a
device with a single configuration to get configured even if it has an
RNDIS interface when the kernel is not configured with RNDIS support.
The heuristics to apply when choosing from multiple configs is a
separate topic with many twisty passages.

It would solve the issue as configuration with lowest iConfigurationValue
would be chosen even if the configuration has RNDIS interface.

Windows would still choose the first configuration so all would be grand.

Actually, Windows' enumeration of composite devices is quite broken
(ok, maybe "not ideal") and it will in fact only select a
configuration if a composite device has a single config. If it has
multiple configs Windows punts and makes you install an INF to force
it to select a config (using a registry setting of course...ugh!).
I've been trying to find a way to work around both the Linux RNDIS
issue and various Windows issues from the device side since I have
control of the device firmware. At this point I'm pretty much
convinced it's not possible to make both Linux and Windows happy at
the same time. I'd love to be wrong about that, though.

Unfortunately my experiences are similar...  I think it should be fairly
easy to create an INF that attaches usb composite driver to the gadget
even if it has more then one configuration but I never managed to do
that.

--
Best regards,                                        _     _
| Humble Liege of Serenely Enlightened Majesty of  o' \,=./ `o
| Computer Science,  Michał "mina86" Nazarewicz       (o o)
+----[mina86*mina86.com]---[mina86*jabber.org]----ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux