Re: [Query] Composite gadget: Issues with interface order

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

 



On Fri, 28 Jan 2011 14:42:01 +0100, Maulik Mankad <mankad.maulik@xxxxxxxxx> wrote:
While running USB CV MSC tests I found that the wIndex parameter sent
by the USB CV application is not matching the fsg->interface_number in
function fsg_setup() for USB_BULK_RESET_REQUEST and
USB_BULK_GET_MAX_LUN_REQUEST cases in file f_mass_storage.c.

This is with Android Gadget. This is a composite gadget with
RNDIS(interface 0 and 1), UMS (interface 2) and ADB interfaces.

I currently have no hardware to test the code with, and since
you're testing the Android gadget, I'd ask you if you could test
it with a mainline kernel.  I'm pretty sure I have tested RNDIS+UMS
configuration with a mainline kernel so it seems strange that such
a bug is present.

Note that wIndex passed from USB CV is 0x0 while fsg->interface_number
is 0x2 (since UMS is interface 2).

UMS takes it's ID from usb_interface_id() and 2 is correct value for
RNDIS+UMS configuration (since RNDIS uses two interfaces) so I'd say
wIndex somehow gets skewed.

This is strange since android.c doesn't really handle interface requests
so it should work well with Android Gadget as well.

As a result a check (w_index != fsg->interface_number) fails and the
USBCV test reports a failure.

If the UMS is the first interface and rndis is kept at the end, USB CV
MSC test works as expected.

See above...

If wIndex is zero then MSF should not be called at all since it is not
on the 3rd position of cdev->config->interface array.

Why is the interface_number incorrectly sent by USBCV? Any pointers
will be really helpful.

Also I saw in mail archives that RNDIS works reliably only when it is
assigned interface 0 and 1.
Is this a Windows issue?

Is interface order so important?

We have found that if RNDIS is not the first composite function, Windows
is likely to crash.  This is a Windows issue.

--
Best regards,                                       _     _
.o. | Liege of Serenly Enlightened Majesty of     o' \,=./ `o
..o | Computer Science,  Michal "mina86" Nazarewicz  (o o)
ooo +-<email/jid: mnazarewicz@xxxxxxxxxx>--------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