On 10.10.2013 18:33, Felipe Balbi wrote:
> Hi,
> 
> On Thu, Oct 10, 2013 at 06:28:32PM +0200, Sebastian Andrzej Siewior wrote:
>> I have am335x-evm with one port running in OTG mode. Since commit
>> fe4cb09 ("usb: musb: gadget: remove hcd initialization") the loaded
>> gadget does non pop up on the host. All I see is
>> |usb 4-5: new high-speed USB device number 52 using ehci-pci
>> |usb 4-5: device descriptor read/64, error -110
>>
>> A few commits later, commit 2cc65fe ("usb: musb: add musb_host_setup()
>> and musb_host_cleanup()) the gadget shows up on the host again but only
>> in OTG mode (because we have the host init code running). It does not
>> work in device only mode.
>> If running in OTG mode and the gadget is removed and added back then the
>> same error is pops up on the hos side.
>>
>> This patch fixes the problem for me. My question how do we do a pretty
>> version of this hack?

Sebastian: thanks for addressing this. It has bugged quite some people
already.

>> diff --git a/drivers/usb/musb/musb_virthub.c 
>> b/drivers/usb/musb/musb_virthub.c
>> index a523950..f717073 100644
>> --- a/drivers/usb/musb/musb_virthub.c
>> +++ b/drivers/usb/musb/musb_virthub.c
>> @@ -47,7 +47,7 @@
>>  /*
>>  * Program the HDRC to start (enable interrupts, dma, etc.).
>>  */
>> -static void musb_start(struct musb *musb)
>> +void musb_start(struct musb *musb)
> 
> then perhaps musb_start() should be moved out of virthub and into
> core.c ?

Yes please. Just next to musb_start(). I just made the functions local
to their only users when I cleaned up the driver. It clearly shouldn't
be in virthub.

Other than that, please make sure not to call that function more than
once for dual role mode.


Thanks!
Daniel



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