On 13/06/12 13:59, Xiaofan Chen wrote:
> On Wed, Jun 13, 2012 at 7:04 PM, Toby Gray<toby.g...@realvnc.com>  wrote:
>> Sorry, my email client decided to send that email as HTML.
>>
>> Here is the contents as plain text:
>>
>>
>> On 13/06/12 11:13, Toby Gray wrote:
>>> The attached patch fixes this by allowing the SET_CONFIGURATION message to
>>> be sent on the bus if it matches the currently active configuration.
>>>
>>> Would this be a change considered for inclusion in v1.0.13 of libusbx? Or
>>> is there a reason for the current behavior, other than just avoiding
>>> unnecessary bus activity?
> I believe one of the reason is that some device chock on this request.
>
> On the other hand, I think your patch is not necessary. If the
> SET_CONFIGURATION control request is really desired for
> your device, you can do that with the explicit control request.

I tried that when I didn't see a SET_CONFIGURATION on the bus when using 
libusb_set_configuration. This didn't work though as 
windows_set_configuration is just doing exactly the same.

The check that this patch modifies is inside 
winusb_submit_control_transfer, which means that both 
libusb_set_configuration and submitting control transfers trigger it.

I'd be happy to submit a patch which made windows_set_configuration 
return success with on bus activity but allowed an explicit 
libusb_control_transfer for the same configuration to go onto the bus. 
Would that be preferable?

Regards,

Toby


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to