usbatm question

matthieu castet castet.matthieu at
Sun Mar 13 15:42:48 EST 2005


Roman Kagan wrote:
>>>->atm_start is naturally run _after_ ->heavy_init.
>>>Why not do the stats _in_ the ->atm_start?
>>Because I need the state machine for booting the modem.
> I don't understand, sorry.  It would have helped if you illustrated the
> problem you're trying to solve with an example.
Ok here is how the eagle-usb modem is booting :

1) send command to the modem telling that we want to boot, enter in 
reset mode.
2)wait 200ms, leave reset mode, clear tx and rx mailboxes.
3)wait 1s and send the mainpage of the firmware to the modem.

Now the modem will ask other swap page of the firmware via interrupt.

It could also tell that it is ready and we can send options by sending a 
request via interrupt.

Once we have finish to send all your options, we need to monitor the 
state of the modem :
- if it is not yet synchronized or in initialization we ask again its state.
- If the state is failed, we reboot it
- if it is operational, we start to monitor the modem : we ask other 
stats info(including rate), when we receive the answer, we ask the 
following stat info. When finish asking all the stat info, we ask again 
the state of the modem.

All the request are done via control pipe and the answer done via 
interrupt. You can't easily send another request before receiving the reply.

So I am no able to do the stats independently of the booting process. 
You could say that when the modem is operational, I do nothing and I 
start the stats in atm_start. But if the modem reboot it won't ask again 
the stats because I won't enter again in atm_start. Also that suppose 
that the modem is operational in atm_start, but it couldn't be true : 
the modem failed to synchronised...


More information about the Usbatm mailing list