By the way, if I try to do a control out transfer to the g_zero gadget
I get 'Pipe error' (using libusb-1.0). Is this expected?

On Thu, Nov 9, 2017 at 4:24 PM, Alan Stern <st...@rowland.harvard.edu> wrote:
> On Thu, 9 Nov 2017, Felipe Balbi wrote:
>
>>
>> Hi,
>>
>> Hinko Kocevar <hinkoce...@gmail.com> writes:
>> >> The way dummy was written, it can only instantiate one gadget. You
>> >> either need a real USB peripheral controller, or you need to patch dummy
>> >> to instantiate more than one gadget.
>> >>
>> >> --
>> >> balbi
>> >
>> > By dummy - are you referring to g_zero of dummy_hcd?
>>
>> Okay, we need a little more explanation. In order to have a gadget
>> driver like g_zero loaded, you need a USB peripheral controller (in your
>> case, that's handled by dummy).
>>
>> Now, when you want that g_zero to be useful, you need to plug it to a
>> USB host controller (in your case, that's also handled by dummy).
>>
>> What I'm saying, though, is that this dummy (dummy_hcd.c) can only
>> handle ONE gadget (a fake USB peripheral controller) at a time. It does
>> NOT instantiate more than one of those.
>
> In fact, this isn't correct.  See the "num" module parameter in
> dummy_hcd.c (added by commit c7a1db457bfc "usb: gadget: dummy_hcd: add
> setup / cleanup of multiple HW intances").
>
> Alan Stern
>
>> Because of that, there's no way
>> to get g_zero to probe for a second time.
>>
>> In fact, even if you were to patch dummy_hcd.c to instantiate N gadgets,
>> you wouldn't be able to use g_zero.ko, and would be required to rely on
>> our configfs interface for dynamically generating and binding different
>> gadget drivers to each of your gadget instances, but that's another
>> story altogether.
>
>
>



-- 
.. the more I see the less I believe.., AE AoR
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to