Configuration selection when RNDIS Host not enabled

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

 



I have a composite device which consists of an RNDIS interface as well
as several additional standard interfaces (cdc-serial, umass, etc.).
These are all contained in a single configuration using IADs. I've
discovered that kernels without CONFIG_USB_NET_RNDIS_HOST enabled will
refuse to select any configuration, rendering the standard interfaces
inaccessible (at least without additional jiggering). I traced this
back to generic.c:usb_choose_configuration() which rejects
configurations whose first interface is RNDIS when RNDIS is not
enabled:

|                /* When the first config's first interface is one of
Microsoft's
|                 * pet nonstandard Ethernet-over-USB protocols,
ignore it unless
|                 * this kernel has enabled the necessary host side driver.
|                 */
|                if (i == 0 && desc && (is_rndis(desc) ||
is_activesync(desc))) {
|#if !defined(CONFIG_USB_NET_RNDIS_HOST) &&
!defined(CONFIG_USB_NET_RNDIS_HOST_MODULE)
|                        continue;
|#else
|                        best = c;
|#endif
|                }

I would propose one of two solutions: (A) Reject the configuration as
we do today, but only if there are additional configurations available
to choose from (i.e. bNumConfigurations > 1), or (B) Reject the
configuration only if there are no additional interfaces in the config
besides RNDIS.

I lean toward (A).

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?

Thoughts?

--Adam
--
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