• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/net/irda/

Lines Matching refs:fsm

31 /* substate handler of the config-fsm to handle the cases where we want
37 struct sir_fsm *fsm = &dev->fsm;
42 next_state = fsm->substate; /* default: stay in current substate */
45 switch(fsm->substate) {
87 fsm->substate = next_state;
99 * On entry, fsm->sem is always locked and the netdev xmit queue stopped.
105 struct sir_dev *dev = container_of(work, struct sir_dev, fsm.work.work);
106 struct sir_fsm *fsm = &dev->fsm;
115 __func__, fsm->state, fsm->substate);
117 next_state = fsm->state;
120 switch(fsm->state) {
126 fsm->result = -EINVAL;
133 ret = sirdev_get_dongle(dev, fsm->param);
135 fsm->result = ret;
147 fsm->substate = SIRDEV_STATE_DONGLE_RESET;
150 fsm->param = 9600;
157 fsm->result = -EINVAL;
164 fsm->result = ret;
173 (fsm->param&0x02) ? TRUE : FALSE,
174 (fsm->param&0x01) ? TRUE : FALSE);
179 fsm->substate = SIRDEV_STATE_WAIT_XMIT;
186 fsm->result = ret;
194 fsm->substate = SIRDEV_STATE_DONGLE_RESET;
198 dev->speed = fsm->param;
207 fsm->result = ret;
218 fsm->substate = SIRDEV_STATE_DONGLE_SPEED;
225 ret = dev->dongle_drv->set_speed(dev, fsm->param);
227 fsm->result = ret;
254 fsm->result = -EINVAL;
258 IRDA_ERROR("%s - error: %d\n", __func__, fsm->result);
266 up(&fsm->sem);
269 fsm->state = next_state;
272 queue_delayed_work(irda_sir_wq, &fsm->work, msecs_to_jiffies(delay));
282 struct sir_fsm *fsm = &dev->fsm;
287 if (down_trylock(&fsm->sem)) {
292 down(&fsm->sem);
295 if (fsm->state == SIRDEV_STATE_DEAD) {
298 up(&fsm->sem);
305 fsm->state = initial_state;
306 fsm->param = param;
307 fsm->result = 0;
309 INIT_DELAYED_WORK(&fsm->work, sirdev_config_fsm);
310 queue_delayed_work(irda_sir_wq, &fsm->work, 0);
347 down(&dev->fsm.sem); /* block until config change completed */
348 err = dev->fsm.result;
349 up(&dev->fsm.sem);
602 /* Failed to initiate the speed change, likely the fsm
606 * fsm completes and wakes the queue.
830 down(&dev->fsm.sem); /* block on pending config completion */
851 up(&dev->fsm.sem);
898 init_MUTEX(&dev->fsm.sem);
938 down(&dev->fsm.sem);
939 dev->fsm.state = SIRDEV_STATE_DEAD; /* mark staled */
942 up(&dev->fsm.sem);