Re: rndis_host: rndis device enumeration

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

 



Bin Liu <binmlist@xxxxxxxxx> writes:

> Hi,
>
> Sorry if I missed any previous discussion on this topic.
>
> The msdn link [1] says that
>
> The host does not continuously poll the USB Control endpoint for input
> control messages. Upon placing a control message on its Control
> endpoint, the device must return a notification on the Communication
> Class interface's Interrupt IN endpoint, which is polled by the host
> whenever the device can return control messages.
>
> Which means the following transfer sequence from the host:
>
> - SETUP xfer: SET_ENCAPSULATED_COMMAND
> - INT xfer
> - SETUP xfer: GET_ENCAPSULATED_RESPONSE
>
> But in rndis_command() in rndis_host.c, the INT xfer between
> SET_ENCAPSULATED_COMMAND and GET_ENCAPSULATED_RESPONSE has a if
> condition check, so the INT xfer is not sent for some (most) rndis
> devices.
>
> Is there any reason why the INT xfer has this if condition?

I don't know the previous discussions either, but I have always assumed
this is just due to the usbnet restrictions at the time the code was
written.  You had to to the sync send + recv commands then, and the
interrupt transfer was probably considered unnecessary.  Until some
devices actually requiring it started showing up and the flag was
added. Guessing a lot here...

Anyway, I believe this code could be rewritten to do the async commands
now that Dan has added the ability to start the usbnet status URB at
driver probe time.


Bjørn
--
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