• Home
  • Raw
  • Download

Lines Matching full:st

21 _queue_message(struct mISDNstack *st, struct sk_buff *skb)  in _queue_message()  argument
28 skb_queue_tail(&st->msgq, skb); in _queue_message()
29 if (likely(!test_bit(mISDN_STACK_STOPPED, &st->status))) { in _queue_message()
30 test_and_set_bit(mISDN_STACK_WORK, &st->status); in _queue_message()
31 wake_up_interruptible(&st->workq); in _queue_message()
38 _queue_message(ch->st, skb); in mISDN_queue_message()
43 get_channel4id(struct mISDNstack *st, u_int id) in get_channel4id() argument
47 mutex_lock(&st->lmutex); in get_channel4id()
48 list_for_each_entry(ch, &st->layer2, list) { in get_channel4id()
54 mutex_unlock(&st->lmutex); in get_channel4id()
82 send_layer2(struct mISDNstack *st, struct sk_buff *skb) in send_layer2() argument
89 if (!st) in send_layer2()
91 mutex_lock(&st->lmutex); in send_layer2()
93 list_for_each_entry(ch, &st->layer2, list) { in send_layer2()
94 if (list_is_last(&ch->list, &st->layer2)) { in send_layer2()
118 list_for_each_entry(ch, &st->layer2, list) { in send_layer2()
126 ret = st->dev->teimgr->ctrl(st->dev->teimgr, CHECK_DATA, skb); in send_layer2()
135 mutex_unlock(&st->lmutex); in send_layer2()
140 send_msg_to_layer(struct mISDNstack *st, struct sk_buff *skb) in send_msg_to_layer() argument
151 if (!hlist_empty(&st->l1sock.head)) { in send_msg_to_layer()
153 send_socklist(&st->l1sock, skb); in send_msg_to_layer()
155 return st->layer1->send(st->layer1, skb); in send_msg_to_layer()
157 if (!hlist_empty(&st->l1sock.head)) in send_msg_to_layer()
158 send_socklist(&st->l1sock, skb); in send_msg_to_layer()
159 send_layer2(st, skb); in send_msg_to_layer()
162 ch = get_channel4id(st, hh->id); in send_msg_to_layer()
168 __func__, dev_name(&st->dev->dev), hh->prim, in send_msg_to_layer()
172 ch = get_channel4id(st, hh->id); in send_msg_to_layer()
178 __func__, dev_name(&st->dev->dev), hh->prim, in send_msg_to_layer()
183 __func__, dev_name(&st->dev->dev), hh->prim); in send_msg_to_layer()
189 do_clear_stack(struct mISDNstack *st) in do_clear_stack() argument
196 struct mISDNstack *st = data; in mISDNStackd() local
205 dev_name(&st->dev->dev)); in mISDNStackd()
207 if (st->notify != NULL) { in mISDNStackd()
208 complete(st->notify); in mISDNStackd()
209 st->notify = NULL; in mISDNStackd()
215 if (unlikely(test_bit(mISDN_STACK_STOPPED, &st->status))) { in mISDNStackd()
216 test_and_clear_bit(mISDN_STACK_WORK, &st->status); in mISDNStackd()
217 test_and_clear_bit(mISDN_STACK_RUNNING, &st->status); in mISDNStackd()
219 test_and_set_bit(mISDN_STACK_RUNNING, &st->status); in mISDNStackd()
220 while (test_bit(mISDN_STACK_WORK, &st->status)) { in mISDNStackd()
221 skb = skb_dequeue(&st->msgq); in mISDNStackd()
224 &st->status); in mISDNStackd()
226 skb = skb_dequeue(&st->msgq); in mISDNStackd()
230 &st->status); in mISDNStackd()
233 st->msg_cnt++; in mISDNStackd()
235 err = send_msg_to_layer(st, skb); in mISDNStackd()
241 __func__, dev_name(&st->dev->dev), in mISDNStackd()
248 &st->status))) { in mISDNStackd()
250 &st->status); in mISDNStackd()
252 &st->status); in mISDNStackd()
256 if (test_bit(mISDN_STACK_CLEARING, &st->status)) { in mISDNStackd()
257 test_and_set_bit(mISDN_STACK_STOPPED, &st->status); in mISDNStackd()
258 test_and_clear_bit(mISDN_STACK_RUNNING, &st->status); in mISDNStackd()
259 do_clear_stack(st); in mISDNStackd()
260 test_and_clear_bit(mISDN_STACK_CLEARING, &st->status); in mISDNStackd()
261 test_and_set_bit(mISDN_STACK_RESTART, &st->status); in mISDNStackd()
263 if (test_and_clear_bit(mISDN_STACK_RESTART, &st->status)) { in mISDNStackd()
264 test_and_clear_bit(mISDN_STACK_STOPPED, &st->status); in mISDNStackd()
265 test_and_set_bit(mISDN_STACK_RUNNING, &st->status); in mISDNStackd()
266 if (!skb_queue_empty(&st->msgq)) in mISDNStackd()
268 &st->status); in mISDNStackd()
270 if (test_bit(mISDN_STACK_ABORT, &st->status)) in mISDNStackd()
272 if (st->notify != NULL) { in mISDNStackd()
273 complete(st->notify); in mISDNStackd()
274 st->notify = NULL; in mISDNStackd()
277 st->sleep_cnt++; in mISDNStackd()
279 test_and_clear_bit(mISDN_STACK_ACTIVE, &st->status); in mISDNStackd()
280 wait_event_interruptible(st->workq, (st->status & in mISDNStackd()
284 __func__, dev_name(&st->dev->dev), st->status); in mISDNStackd()
285 test_and_set_bit(mISDN_STACK_ACTIVE, &st->status); in mISDNStackd()
287 test_and_clear_bit(mISDN_STACK_WAKEUP, &st->status); in mISDNStackd()
289 if (test_bit(mISDN_STACK_STOPPED, &st->status)) { in mISDNStackd()
290 test_and_clear_bit(mISDN_STACK_RUNNING, &st->status); in mISDNStackd()
292 st->stopped_cnt++; in mISDNStackd()
299 dev_name(&st->dev->dev), st->msg_cnt, st->sleep_cnt, in mISDNStackd()
300 st->stopped_cnt); in mISDNStackd()
301 task_cputime(st->thread, &utime, &stime); in mISDNStackd()
304 dev_name(&st->dev->dev), utime, stime); in mISDNStackd()
307 dev_name(&st->dev->dev), st->thread->nvcsw, st->thread->nivcsw); in mISDNStackd()
309 dev_name(&st->dev->dev)); in mISDNStackd()
311 test_and_set_bit(mISDN_STACK_KILLED, &st->status); in mISDNStackd()
312 test_and_clear_bit(mISDN_STACK_RUNNING, &st->status); in mISDNStackd()
313 test_and_clear_bit(mISDN_STACK_ACTIVE, &st->status); in mISDNStackd()
314 test_and_clear_bit(mISDN_STACK_ABORT, &st->status); in mISDNStackd()
315 skb_queue_purge(&st->msgq); in mISDNStackd()
316 st->thread = NULL; in mISDNStackd()
317 if (st->notify != NULL) { in mISDNStackd()
318 complete(st->notify); in mISDNStackd()
319 st->notify = NULL; in mISDNStackd()
327 if (!ch->st) in l1_receive()
330 _queue_message(ch->st, skb); in l1_receive()
341 __add_layer2(struct mISDNchannel *ch, struct mISDNstack *st) in __add_layer2() argument
343 list_add_tail(&ch->list, &st->layer2); in __add_layer2()
347 add_layer2(struct mISDNchannel *ch, struct mISDNstack *st) in add_layer2() argument
349 mutex_lock(&st->lmutex); in add_layer2()
350 __add_layer2(ch, st); in add_layer2()
351 mutex_unlock(&st->lmutex); in add_layer2()
357 if (!ch->st || !ch->st->layer1) in st_own_ctrl()
359 return ch->st->layer1->ctrl(ch->st->layer1, cmd, arg); in st_own_ctrl()
381 dev->D.st = newst; in create_stack()
390 dev->teimgr->st = newst; in create_stack()
394 newst->own.st = newst; in create_stack()
399 printk(KERN_DEBUG "%s: st(%s)\n", __func__, in create_stack()
435 ch->peer = &dev->D.st->own; in connect_layer1()
436 ch->st = dev->D.st; in connect_layer1()
444 write_lock_bh(&dev->D.st->l1sock.lock); in connect_layer1()
445 sk_add_node(&msk->sk, &dev->D.st->l1sock.head); in connect_layer1()
446 write_unlock_bh(&dev->D.st->l1sock.lock); in connect_layer1()
467 ch->st = dev->D.st; in connect_Bstack()
479 rq.ch->st = dev->D.st; in connect_Bstack()
492 rq2.ch->st = dev->D.st; in connect_Bstack()
504 rq.ch->st = dev->D.st; in connect_Bstack()
534 ch->peer = &dev->D.st->own; in create_l2entity()
535 ch->st = dev->D.st; in create_l2entity()
549 add_layer2(rq.ch, dev->D.st); in create_l2entity()
551 rq.ch->peer = &dev->D.st->own; in create_l2entity()
567 if (!ch->st) { in delete_channel()
572 printk(KERN_DEBUG "%s: st(%s) protocol(%x)\n", __func__, in delete_channel()
573 dev_name(&ch->st->dev->dev), ch->protocol); in delete_channel()
586 write_lock_bh(&ch->st->l1sock.lock); in delete_channel()
588 write_unlock_bh(&ch->st->l1sock.lock); in delete_channel()
589 ch->st->dev->D.ctrl(&ch->st->dev->D, CLOSE_CHANNEL, NULL); in delete_channel()
592 pch = get_channel4id(ch->st, ch->nr); in delete_channel()
594 mutex_lock(&ch->st->lmutex); in delete_channel()
596 mutex_unlock(&ch->st->lmutex); in delete_channel()
598 pch = ch->st->dev->teimgr; in delete_channel()
605 pch = ch->st->dev->teimgr; in delete_channel()
621 struct mISDNstack *st = dev->D.st; in delete_stack() local
625 printk(KERN_DEBUG "%s: st(%s)\n", __func__, in delete_stack()
626 dev_name(&st->dev->dev)); in delete_stack()
629 if (st->thread) { in delete_stack()
630 if (st->notify) { in delete_stack()
633 complete(st->notify); in delete_stack()
635 st->notify = &done; in delete_stack()
636 test_and_set_bit(mISDN_STACK_ABORT, &st->status); in delete_stack()
637 test_and_set_bit(mISDN_STACK_WAKEUP, &st->status); in delete_stack()
638 wake_up_interruptible(&st->workq); in delete_stack()
641 if (!list_empty(&st->layer2)) in delete_stack()
644 if (!hlist_empty(&st->l1sock.head)) in delete_stack()
647 kfree(st); in delete_stack()