Lines Matching +full:cs +full:- +full:2
37 * 2 Teles 8.0 p0=irq p1=membase
44 * 9 ITK ix1-micro p0=irq p1=iobase
57 * 20 Travers Technologies NETjet-S PCI card
66 * 29 Siemens I-Surf p0=irq p1=iobase p2=memory (from isapnp setup)
72 * 35 HFC 2BDS0 PCI none
74 * 37 HFC 2BDS0 S+/SP p0=irq p1=iobase
75 * 38 Travers Technologies NETspider-U PCI card
76 * 39 HFC 2BDS0-SP PCMCIA p0=irq p1=iobase
78 * 41 Formula-n enter:now ISDN PCI a/b none
88 "Teles PCMCIA", "ITK ix1-micro Rev.2", "Elsa PCMCIA",
91 "Elsa PCI", "Compaq ISA", "NETjet-S", "Teles PCI",
94 "Siemens I-Surf", "Acer P10", "HST Saphir", "Telekom A4T",
95 "Scitel Quadro", "Gazel", "HFC 2BDS0 PCI", "Winbond 6692",
96 "HFC 2BDS0 SX", "NETspider-U", "HFC-2BDS0-SP PCMCIA",
97 "Hotplug", "Formula-n enter:now PCI a/b",
371 rev = p + 2; in HiSax_getrev()
373 *--p = 0; in HiSax_getrev()
420 argc--; in HiSax_setup()
425 argc--; in HiSax_setup()
430 argc--; in HiSax_setup()
435 argc--; in HiSax_setup()
438 cards[i].para[2] = ints[j]; in HiSax_setup()
440 argc--; in HiSax_setup()
579 if (cards[i].cs) in hisax_findcard()
580 if (cards[i].cs->myid == driverid) in hisax_findcard()
581 return cards[i].cs; in hisax_findcard()
592 if (cards[cardnr - 1].cs)
593 return cards[cardnr - 1].cs;
602 struct IsdnCardState *cs = hisax_findcard(id); in HiSax_readstatus() local
604 if (cs) { in HiSax_readstatus()
610 count = cs->status_end - cs->status_read + 1; in HiSax_readstatus()
613 if (copy_to_user(p, cs->status_read, count)) in HiSax_readstatus()
614 return -EFAULT; in HiSax_readstatus()
615 cs->status_read += count; in HiSax_readstatus()
616 if (cs->status_read > cs->status_end) in HiSax_readstatus()
617 cs->status_read = cs->status_buf; in HiSax_readstatus()
619 count = len - count; in HiSax_readstatus()
625 if (copy_to_user(p, cs->status_read, cnt)) in HiSax_readstatus()
626 return -EFAULT; in HiSax_readstatus()
628 cs->status_read += cnt % HISAX_STATUS_BUFSIZE; in HiSax_readstatus()
629 count -= cnt; in HiSax_readstatus()
635 return -ENODEV; in HiSax_readstatus()
643 *s-- = '\0'; in jiftime()
644 *s-- = mark % 10 + '0'; in jiftime()
646 *s-- = mark % 10 + '0'; in jiftime()
648 *s-- = '.'; in jiftime()
649 *s-- = mark % 10 + '0'; in jiftime()
651 *s-- = mark % 6 + '0'; in jiftime()
653 *s-- = ':'; in jiftime()
654 *s-- = mark % 10 + '0'; in jiftime()
656 *s-- = mark % 10 + '0'; in jiftime()
662 void VHiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, in VHiSax_putstatus() argument
673 if (!cs) { in VHiSax_putstatus()
677 spin_lock_irqsave(&cs->statlock, flags); in VHiSax_putstatus()
685 len = p - tmpbuf; in VHiSax_putstatus()
692 spin_unlock_irqrestore(&cs->statlock, flags); in VHiSax_putstatus()
698 i = cs->status_end - cs->status_write + 1; in VHiSax_putstatus()
701 len -= i; in VHiSax_putstatus()
702 memcpy(cs->status_write, p, i); in VHiSax_putstatus()
703 cs->status_write += i; in VHiSax_putstatus()
704 if (cs->status_write > cs->status_end) in VHiSax_putstatus()
705 cs->status_write = cs->status_buf; in VHiSax_putstatus()
708 memcpy(cs->status_write, p, len); in VHiSax_putstatus()
709 cs->status_write += len; in VHiSax_putstatus()
712 i = (ulong) & len - current->kernel_stack_page; in VHiSax_putstatus()
713 sprintf(tmpbuf, "kstack %s %lx use %ld\n", current->comm, in VHiSax_putstatus()
714 current->kernel_stack_page, i); in VHiSax_putstatus()
716 for (p = tmpbuf, i = len; i > 0; i--, p++) { in VHiSax_putstatus()
717 *cs->status_write++ = *p; in VHiSax_putstatus()
718 if (cs->status_write > cs->status_end) in VHiSax_putstatus()
719 cs->status_write = cs->status_buf; in VHiSax_putstatus()
723 spin_unlock_irqrestore(&cs->statlock, flags); in VHiSax_putstatus()
726 ic.driver = cs->myid; in VHiSax_putstatus()
728 cs->iif.statcallb(&ic); in VHiSax_putstatus()
732 void HiSax_putstatus(struct IsdnCardState *cs, char *head, char *fmt, ...) in HiSax_putstatus() argument
737 VHiSax_putstatus(cs, head, fmt, args); in HiSax_putstatus()
741 int ll_run(struct IsdnCardState *cs, int addfeatures) in ll_run() argument
745 ic.driver = cs->myid; in ll_run()
747 cs->iif.features |= addfeatures; in ll_run()
748 cs->iif.statcallb(&ic); in ll_run()
752 static void ll_stop(struct IsdnCardState *cs) in ll_stop() argument
757 ic.driver = cs->myid; in ll_stop()
758 cs->iif.statcallb(&ic); in ll_stop()
759 // CallcFreeChan(cs); in ll_stop()
762 static void ll_unload(struct IsdnCardState *cs) in ll_unload() argument
767 ic.driver = cs->myid; in ll_unload()
768 cs->iif.statcallb(&ic); in ll_unload()
769 kfree(cs->status_buf); in ll_unload()
770 cs->status_read = NULL; in ll_unload()
771 cs->status_write = NULL; in ll_unload()
772 cs->status_end = NULL; in ll_unload()
773 kfree(cs->dlog); in ll_unload()
774 cs->dlog = NULL; in ll_unload()
779 struct IsdnCardState *csta = cards[cardnr].cs; in closecard()
781 if (csta->bcs->BC_Close != NULL) { in closecard()
782 csta->bcs->BC_Close(csta->bcs + 1); in closecard()
783 csta->bcs->BC_Close(csta->bcs); in closecard()
786 skb_queue_purge(&csta->rq); in closecard()
787 skb_queue_purge(&csta->sq); in closecard()
788 kfree(csta->rcvbuf); in closecard()
789 csta->rcvbuf = NULL; in closecard()
790 if (csta->tx_skb) { in closecard()
791 dev_kfree_skb(csta->tx_skb); in closecard()
792 csta->tx_skb = NULL; in closecard()
794 if (csta->DC_Close != NULL) { in closecard()
795 csta->DC_Close(csta); in closecard()
797 if (csta->cardmsg) in closecard()
798 csta->cardmsg(csta, CARD_RELEASE, NULL); in closecard()
799 if (csta->dbusytimer.function != NULL) // FIXME? in closecard()
800 del_timer(&csta->dbusytimer); in closecard()
806 struct IsdnCardState *cs = dev_id; in card_irq() local
807 irqreturn_t ret = cs->irq_func(intno, cs); in card_irq()
810 cs->irq_cnt++; in card_irq()
814 static int init_card(struct IsdnCardState *cs) in init_card() argument
818 if (!cs->irq) { in init_card()
819 ret = cs->cardmsg(cs, CARD_INIT, NULL); in init_card()
822 irq_cnt = cs->irq_cnt = 0; in init_card()
823 printk(KERN_INFO "%s: IRQ %d count %d\n", CardType[cs->typ], in init_card()
824 cs->irq, irq_cnt); in init_card()
825 if (request_irq(cs->irq, card_irq, cs->irq_flags, "HiSax", cs)) { in init_card()
827 cs->irq); in init_card()
831 cs->cardmsg(cs, CARD_INIT, NULL); in init_card()
835 CardType[cs->typ], cs->irq, cs->irq_cnt); in init_card()
836 if (cs->irq_cnt == irq_cnt) { in init_card()
839 CardType[cs->typ], cs->irq, 4 - cnt); in init_card()
841 free_irq(cs->irq, cs); in init_card()
842 return 2; in init_card()
844 cs->cardmsg(cs, CARD_RESET, NULL); in init_card()
845 cnt--; in init_card()
848 cs->cardmsg(cs, CARD_TEST, NULL); in init_card()
859 switch (card->typ) { in hisax_cs_setup_card()
1011 ret = 2; in hisax_cs_setup_card()
1016 CardType[card->typ]); in hisax_cs_setup_card()
1028 struct IsdnCardState *cs; in hisax_cs_new() local
1032 cs = kzalloc(sizeof(struct IsdnCardState), GFP_ATOMIC); in hisax_cs_new()
1033 if (!cs) { in hisax_cs_new()
1039 card->cs = cs; in hisax_cs_new()
1040 spin_lock_init(&cs->statlock); in hisax_cs_new()
1041 spin_lock_init(&cs->lock); in hisax_cs_new()
1042 cs->chanlimit = 2; /* maximum B-channel number */ in hisax_cs_new()
1043 cs->logecho = 0; /* No echo logging */ in hisax_cs_new()
1044 cs->cardnr = cardnr; in hisax_cs_new()
1045 cs->debug = L1_DEB_WARN; in hisax_cs_new()
1046 cs->HW_Flags = 0; in hisax_cs_new()
1047 cs->busy_flag = busy_flag; in hisax_cs_new()
1048 cs->irq_flags = I4L_IRQ_FLAG; in hisax_cs_new()
1050 if (card->protocol == ISDN_PTYPE_NI1) in hisax_cs_new()
1051 test_and_set_bit(FLG_TWO_DCHAN, &cs->HW_Flags); in hisax_cs_new()
1053 test_and_set_bit(FLG_TWO_DCHAN, &cs->HW_Flags); in hisax_cs_new()
1055 cs->protocol = card->protocol; in hisax_cs_new()
1057 if (card->typ <= 0 || card->typ > ISDN_CTYPE_COUNT) { in hisax_cs_new()
1059 "HiSax: Card Type %d out of range\n", card->typ); in hisax_cs_new()
1062 if (!(cs->dlog = kmalloc(MAX_DLOG_SPACE, GFP_ATOMIC))) { in hisax_cs_new()
1067 if (!(cs->status_buf = kmalloc(HISAX_STATUS_BUFSIZE, GFP_ATOMIC))) { in hisax_cs_new()
1073 cs->stlist = NULL; in hisax_cs_new()
1074 cs->status_read = cs->status_buf; in hisax_cs_new()
1075 cs->status_write = cs->status_buf; in hisax_cs_new()
1076 cs->status_end = cs->status_buf + HISAX_STATUS_BUFSIZE - 1; in hisax_cs_new()
1077 cs->typ = card->typ; in hisax_cs_new()
1079 cs->iif.owner = lockowner; in hisax_cs_new()
1081 strcpy(cs->iif.id, id); in hisax_cs_new()
1082 cs->iif.channels = 2; in hisax_cs_new()
1083 cs->iif.maxbufsize = MAX_DATA_SIZE; in hisax_cs_new()
1084 cs->iif.hl_hdrlen = MAX_HEADER_LEN; in hisax_cs_new()
1085 cs->iif.features = in hisax_cs_new()
1102 cs->iif.command = HiSax_command; in hisax_cs_new()
1103 cs->iif.writecmd = NULL; in hisax_cs_new()
1104 cs->iif.writebuf_skb = HiSax_writebuf_skb; in hisax_cs_new()
1105 cs->iif.readstat = HiSax_readstatus; in hisax_cs_new()
1106 register_isdn(&cs->iif); in hisax_cs_new()
1107 cs->myid = cs->iif.channels; in hisax_cs_new()
1109 *cs_out = cs; in hisax_cs_new()
1113 kfree(cs->dlog); in hisax_cs_new()
1115 kfree(cs); in hisax_cs_new()
1116 card->cs = NULL; in hisax_cs_new()
1122 struct IsdnCardState *cs) in hisax_cs_setup() argument
1126 if (!(cs->rcvbuf = kmalloc(MAX_DFRAME_LEN_L1, GFP_ATOMIC))) { in hisax_cs_setup()
1128 ll_unload(cs); in hisax_cs_setup()
1131 cs->rcvidx = 0; in hisax_cs_setup()
1132 cs->tx_skb = NULL; in hisax_cs_setup()
1133 cs->tx_cnt = 0; in hisax_cs_setup()
1134 cs->event = 0; in hisax_cs_setup()
1136 skb_queue_head_init(&cs->rq); in hisax_cs_setup()
1137 skb_queue_head_init(&cs->sq); in hisax_cs_setup()
1139 init_bcstate(cs, 0); in hisax_cs_setup()
1140 init_bcstate(cs, 1); in hisax_cs_setup()
1144 switch (card->typ) { in hisax_cs_setup()
1149 ret = init_card(cs); in hisax_cs_setup()
1156 init_tei(cs, cs->protocol); in hisax_cs_setup()
1157 ret = CallcNewChan(cs); in hisax_cs_setup()
1163 if (!test_bit(HW_ISAR, &cs->HW_Flags)) in hisax_cs_setup()
1164 ll_run(cs, 0); in hisax_cs_setup()
1169 kfree(cs); in hisax_cs_setup()
1170 card->cs = NULL; in hisax_cs_setup()
1183 struct IsdnCardState *cs; in checkcard() local
1185 ret = hisax_cs_new(cardnr, id, card, &cs, busy_flag, lockowner); in checkcard()
1191 (card->protocol == ISDN_PTYPE_1TR6) ? "1TR6" : in checkcard()
1192 (card->protocol == ISDN_PTYPE_EURO) ? "EDSS1" : in checkcard()
1193 (card->protocol == ISDN_PTYPE_LEASED) ? "LEASED" : in checkcard()
1194 (card->protocol == ISDN_PTYPE_NI1) ? "NI1" : in checkcard()
1195 "NONE", cs->iif.id, cs->myid); in checkcard()
1199 ll_unload(cs); in checkcard()
1203 ret = hisax_cs_setup(cardnr, card, cs); in checkcard()
1207 kfree(cs); in checkcard()
1208 card->cs = NULL; in checkcard()
1217 for (i = idx; i < (HISAX_MAX_CARDS - 1); i++) in HiSax_shiftcards()
1263 nrcards--; in HiSax_inithardware()
1271 int i, last = nrcards - 1; in HiSax_closecard()
1275 if (cards[cardnr].cs) { in HiSax_closecard()
1276 ll_stop(cards[cardnr].cs); in HiSax_closecard()
1277 release_tei(cards[cardnr].cs); in HiSax_closecard()
1278 CallcFreeChan(cards[cardnr].cs); in HiSax_closecard()
1281 if (cards[cardnr].cs->irq) in HiSax_closecard()
1282 free_irq(cards[cardnr].cs->irq, cards[cardnr].cs); in HiSax_closecard()
1283 kfree((void *) cards[cardnr].cs); in HiSax_closecard()
1284 cards[cardnr].cs = NULL; in HiSax_closecard()
1291 nrcards--; in HiSax_closecard()
1296 struct IsdnCardState *cs = cards[cardnr].cs; in HiSax_reportcard() local
1299 printk(KERN_DEBUG "HiSax: Type %s\n", CardType[cs->typ]); in HiSax_reportcard()
1300 printk(KERN_DEBUG "HiSax: debuglevel %x\n", cs->debug); in HiSax_reportcard()
1303 printk(KERN_DEBUG "HiSax: cs 0x%lX\n", (ulong) cs); in HiSax_reportcard()
1305 cs->HW_Flags, cs->bcs[0].Flag, cs->bcs[1].Flag); in HiSax_reportcard()
1307 cs->bcs[0].mode, cs->bcs[0].channel); in HiSax_reportcard()
1309 cs->bcs[1].mode, cs->bcs[1].channel); in HiSax_reportcard()
1312 cs->err_rx, cs->err_crc, cs->err_tx); in HiSax_reportcard()
1315 cs->bcs[0].err_inv, cs->bcs[0].err_rdo, cs->bcs[0].err_crc, in HiSax_reportcard()
1316 cs->bcs[0].err_tx); in HiSax_reportcard()
1319 cs->bcs[1].err_inv, cs->bcs[1].err_rdo, cs->bcs[1].err_crc, in HiSax_reportcard()
1320 cs->bcs[1].err_tx); in HiSax_reportcard()
1322 cs->err_rx = 0; in HiSax_reportcard()
1323 cs->err_crc = 0; in HiSax_reportcard()
1324 cs->err_tx = 0; in HiSax_reportcard()
1325 cs->bcs[0].err_inv = 0; in HiSax_reportcard()
1326 cs->bcs[0].err_rdo = 0; in HiSax_reportcard()
1327 cs->bcs[0].err_crc = 0; in HiSax_reportcard()
1328 cs->bcs[0].err_tx = 0; in HiSax_reportcard()
1329 cs->bcs[1].err_inv = 0; in HiSax_reportcard()
1330 cs->bcs[1].err_rdo = 0; in HiSax_reportcard()
1331 cs->bcs[1].err_crc = 0; in HiSax_reportcard()
1332 cs->bcs[1].err_tx = 0; in HiSax_reportcard()
1410 cards[j].para[2] = io[i]; in HiSax_init()
1423 cards[j].para[2] = io1[i]; in HiSax_init()
1428 cards[j].para[2] = io1[i]; in HiSax_init()
1465 cards[j].para[2] = mem[i]; in HiSax_init()
1485 cards[j++].para[0] = 2; in HiSax_init()
1504 "HiSax: Warning - no protocol specified\n"); in HiSax_init()
1521 return -ENODEV; in HiSax_init()
1538 int cardnr = nrcards - 1; in HiSax_exit()
1541 HiSax_closecard(cardnr--); in HiSax_exit()
1555 int ret = -1; in hisax_init_pcmcia()
1586 static int hisax_cardmsg(struct IsdnCardState *cs, int mt, void *arg);
1594 return 2; in hisax_setup_card_dynamic()
1602 struct IsdnCardState *cs; in hisax_register() local
1610 return -EBUSY; in hisax_register()
1616 retval = checkcard(i, id, NULL, hisax_d_if->owner, in hisax_register()
1620 nrcards--; in hisax_register()
1621 return -EINVAL; in hisax_register()
1623 cs = cards[i].cs; in hisax_register()
1624 hisax_d_if->cs = cs; in hisax_register()
1625 cs->hw.hisax_d_if = hisax_d_if; in hisax_register()
1626 cs->cardmsg = hisax_cardmsg; in hisax_register()
1627 INIT_WORK(&cs->tqueue, hisax_bh); in hisax_register()
1628 cs->channel[0].d_st->l2.l2l1 = hisax_d_l2l1; in hisax_register()
1629 for (i = 0; i < 2; i++) { in hisax_register()
1630 cs->bcs[i].BC_SetStack = hisax_bc_setstack; in hisax_register()
1631 cs->bcs[i].BC_Close = hisax_bc_close; in hisax_register()
1633 b_if[i]->ifc.l1l2 = hisax_b_l1l2; in hisax_register()
1635 hisax_d_if->b_if[i] = b_if[i]; in hisax_register()
1637 hisax_d_if->ifc.l1l2 = hisax_d_l1l2; in hisax_register()
1638 skb_queue_head_init(&hisax_d_if->erq); in hisax_register()
1639 clear_bit(0, &hisax_d_if->ph_state); in hisax_register()
1646 cards[hisax_d_if->cs->cardnr].typ = 0; in hisax_unregister()
1647 HiSax_closecard(hisax_d_if->cs->cardnr); in hisax_unregister()
1648 skb_queue_purge(&hisax_d_if->erq); in hisax_unregister()
1653 static void hisax_sched_event(struct IsdnCardState *cs, int event) in hisax_sched_event() argument
1655 test_and_set_bit(event, &cs->event); in hisax_sched_event()
1656 schedule_work(&cs->tqueue); in hisax_sched_event()
1661 struct IsdnCardState *cs = in hisax_bh() local
1666 if (test_and_clear_bit(D_RCVBUFREADY, &cs->event)) in hisax_bh()
1667 DChannel_proc_rcv(cs); in hisax_bh()
1668 if (test_and_clear_bit(E_RCVBUFREADY, &cs->event)) in hisax_bh()
1669 EChannel_proc_rcv(cs->hw.hisax_d_if); in hisax_bh()
1670 if (test_and_clear_bit(D_L1STATECHANGE, &cs->event)) { in hisax_bh()
1671 if (test_bit(0, &cs->hw.hisax_d_if->ph_state)) in hisax_bh()
1675 for (st = cs->stlist; st; st = st->next) in hisax_bh()
1676 st->l1.l1l2(st, pr, NULL); in hisax_bh()
1683 test_and_set_bit(event, &bcs->event); in hisax_b_sched_event()
1684 schedule_work(&bcs->tqueue); in hisax_b_sched_event()
1690 ifc->l2l1(ifc, pr, arg); in D_L2L1()
1696 ifc->l2l1(ifc, pr, arg); in B_L2L1()
1702 struct IsdnCardState *cs = d_if->cs; in hisax_d_l1l2() local
1708 set_bit(0, &d_if->ph_state); in hisax_d_l1l2()
1709 hisax_sched_event(cs, D_L1STATECHANGE); in hisax_d_l1l2()
1712 clear_bit(0, &d_if->ph_state); in hisax_d_l1l2()
1713 hisax_sched_event(cs, D_L1STATECHANGE); in hisax_d_l1l2()
1716 skb_queue_tail(&cs->rq, arg); in hisax_d_l1l2()
1717 hisax_sched_event(cs, D_RCVBUFREADY); in hisax_d_l1l2()
1720 skb = skb_dequeue(&cs->sq); in hisax_d_l1l2()
1725 clear_bit(FLG_L1_DBUSY, &cs->HW_Flags); in hisax_d_l1l2()
1726 for (st = cs->stlist; st; st = st->next) { in hisax_d_l1l2()
1727 if (test_and_clear_bit(FLG_L1_PULL_REQ, &st->l1.Flags)) { in hisax_d_l1l2()
1728 st->l1.l1l2(st, PH_PULL | CONFIRM, NULL); in hisax_d_l1l2()
1734 skb_queue_tail(&d_if->erq, arg); in hisax_d_l1l2()
1735 hisax_sched_event(cs, E_RCVBUFREADY); in hisax_d_l1l2()
1746 struct BCState *bcs = b_if->bcs; in hisax_b_l1l2()
1747 struct PStack *st = bcs->st; in hisax_b_l1l2()
1753 st->l1.l1l2(st, pr, NULL); in hisax_b_l1l2()
1756 st->l1.l1l2(st, pr, NULL); in hisax_b_l1l2()
1757 clear_bit(BC_FLG_BUSY, &bcs->Flag); in hisax_b_l1l2()
1758 skb_queue_purge(&bcs->squeue); in hisax_b_l1l2()
1759 bcs->hw.b_if = NULL; in hisax_b_l1l2()
1762 skb_queue_tail(&bcs->rqueue, arg); in hisax_b_l1l2()
1766 bcs->tx_cnt -= (long)arg; in hisax_b_l1l2()
1767 if (test_bit(FLG_LLI_L1WAKEUP,&bcs->st->lli.flag)) { in hisax_b_l1l2()
1769 spin_lock_irqsave(&bcs->aclock, flags); in hisax_b_l1l2()
1770 bcs->ackcnt += (long)arg; in hisax_b_l1l2()
1771 spin_unlock_irqrestore(&bcs->aclock, flags); in hisax_b_l1l2()
1774 skb = skb_dequeue(&bcs->squeue); in hisax_b_l1l2()
1779 clear_bit(BC_FLG_BUSY, &bcs->Flag); in hisax_b_l1l2()
1780 if (test_and_clear_bit(FLG_L1_PULL_REQ, &st->l1.Flags)) { in hisax_b_l1l2()
1781 st->l1.l1l2(st, PH_PULL | CONFIRM, NULL); in hisax_b_l1l2()
1792 struct IsdnCardState *cs = st->l1.hardware; in hisax_d_l2l1() local
1793 struct hisax_d_if *hisax_d_if = cs->hw.hisax_d_if; in hisax_d_l2l1()
1799 if (cs->debug & DEB_DLOG_HEX) in hisax_d_l2l1()
1800 LogFrame(cs, skb->data, skb->len); in hisax_d_l2l1()
1801 if (cs->debug & DEB_DLOG_VERBOSE) in hisax_d_l2l1()
1802 dlogframe(cs, skb, 0); in hisax_d_l2l1()
1803 Logl2Frame(cs, skb, "PH_DATA_REQ", 0); in hisax_d_l2l1()
1805 if (!test_and_set_bit(FLG_L1_DBUSY, &cs->HW_Flags)) in hisax_d_l2l1()
1808 skb_queue_tail(&cs->sq, skb); in hisax_d_l2l1()
1811 if (!test_bit(FLG_L1_DBUSY, &cs->HW_Flags)) in hisax_d_l2l1()
1812 st->l1.l1l2(st, PH_PULL | CONFIRM, NULL); in hisax_d_l2l1()
1814 set_bit(FLG_L1_PULL_REQ, &st->l1.Flags); in hisax_d_l2l1()
1822 static int hisax_cardmsg(struct IsdnCardState *cs, int mt, void *arg) in hisax_cardmsg() argument
1829 struct BCState *bcs = st->l1.bcs; in hisax_b_l2l1()
1830 struct hisax_b_if *b_if = bcs->hw.b_if; in hisax_b_l2l1()
1834 B_L2L1(b_if, pr, (void *)(unsigned long)st->l1.mode); in hisax_b_l2l1()
1839 if (!test_and_set_bit(BC_FLG_BUSY, &bcs->Flag)) { in hisax_b_l2l1()
1842 skb_queue_tail(&bcs->squeue, arg); in hisax_b_l2l1()
1846 if (!test_bit(BC_FLG_BUSY, &bcs->Flag)) in hisax_b_l2l1()
1847 st->l1.l1l2(st, PH_PULL | CONFIRM, NULL); in hisax_b_l2l1()
1849 set_bit(FLG_L1_PULL_REQ, &st->l1.Flags); in hisax_b_l2l1()
1852 test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag); in hisax_b_l2l1()
1853 skb_queue_purge(&bcs->squeue); in hisax_b_l2l1()
1862 struct IsdnCardState *cs = st->l1.hardware; in hisax_bc_setstack() local
1863 struct hisax_d_if *hisax_d_if = cs->hw.hisax_d_if; in hisax_bc_setstack()
1865 bcs->channel = st->l1.bc; in hisax_bc_setstack()
1867 bcs->hw.b_if = hisax_d_if->b_if[st->l1.bc]; in hisax_bc_setstack()
1868 hisax_d_if->b_if[st->l1.bc]->bcs = bcs; in hisax_bc_setstack()
1870 st->l1.bcs = bcs; in hisax_bc_setstack()
1871 st->l2.l2l1 = hisax_b_l2l1; in hisax_bc_setstack()
1873 bcs->st = st; in hisax_bc_setstack()
1875 skb_queue_head_init(&bcs->rqueue); in hisax_bc_setstack()
1876 skb_queue_head_init(&bcs->squeue); in hisax_bc_setstack()
1882 struct hisax_b_if *b_if = bcs->hw.b_if; in hisax_bc_close()
1890 struct IsdnCardState *cs = d_if->cs; in EChannel_proc_rcv() local
1894 while ((skb = skb_dequeue(&d_if->erq)) != NULL) { in EChannel_proc_rcv()
1895 if (cs->debug & DEB_DLOG_HEX) { in EChannel_proc_rcv()
1896 ptr = cs->dlog; in EChannel_proc_rcv()
1897 if ((skb->len) < MAX_DLOG_SPACE / 3 - 10) { in EChannel_proc_rcv()
1903 ptr += QuickHex(ptr, skb->data, skb->len); in EChannel_proc_rcv()
1904 ptr--; in EChannel_proc_rcv()
1907 HiSax_putstatus(cs, NULL, cs->dlog); in EChannel_proc_rcv()
1909 HiSax_putstatus(cs, "LogEcho: ", in EChannel_proc_rcv()
1911 skb->len); in EChannel_proc_rcv()