Alan,

My fault...I was enabling interrupts before setting hcd's state to
HC_STATE_RUNNING in my method hcd_start.

Could you tell me what driver I should look to implement gadget
support. My hardware can be configured to be a device and support OTG.
Is OTG fully implemented in Linux ?

Thanks.
--
               Franck

2005/9/20, Alan Stern <[EMAIL PROTECTED]>:
> On Tue, 20 Sep 2005, Franck wrote:
>
> > Hi,
> >
> > I'm still debuging this [EMAIL PROTECTED] HCD. Hardware causes me a lot of
> > troubles. Anyways, I have noticed that if I plug a usb device before
> > booting, then HC's IRQ are not handled. That can be explain by the
> > following call graph:
> >
> > usb_add_hcd
> > ->    hc_reset
> > ->    request_irq
> > ->    hc_start
> >
> > In my current implementation, hc_reset set the state of hcd into
> > HC_STATE_HALT. Therefore once request_irq is called, all interruptions
> > generated by the HW are not handle because of the hcd state (cf
> > usb_hcd_irq).
>
> When you are in HC_STATE_HALT, the controller should not generate any IRQs
> at all.  That's what "HALT" means; the controller is supposed to be
> inactive.
>
> >  hc_start will normally set hc state into
> > HC_STATE_RUNNING but it never gets time to be called. It can be fix by
> > changing the call graph by:
> >
> > usb_add_hcd
> > ->    hc_reset
> > ->    hc_start         /* has been moved */
> > ->    request_irq
>
> That's definitely wrong.  You never want to have a device generating
> interrupt requests before you have requested that IRQ.
>
> > My question is: what is the correct fix ? Should I set hc's state into
> > HC_STATE_RUNNING in hc_reset method (probably nor) or should
> > usb_add_hcd be fixed ?
>
> The correct fix is to make sure that hc_reset and hc_stop disable
> interrupt generation and hc_start enables it.
>
> Alan Stern
>
>


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to