• Home
  • Raw
  • Download

Lines Matching refs:bcs

41 modehscx(struct BCState *bcs, int mode, int bc)  in modehscx()  argument
43 struct IsdnCardState *cs = bcs->cs; in modehscx()
44 int hscx = bcs->hw.hscx.hscx; in modehscx()
49 bcs->mode = mode; in modehscx()
50 bcs->channel = bc; in modehscx()
68 test_bit(HW_IOM1, &cs->HW_Flags) ? 0x7 : bcs->hw.hscx.tsaxr0); in modehscx()
70 test_bit(HW_IOM1, &cs->HW_Flags) ? 0x7 : bcs->hw.hscx.tsaxr0); in modehscx()
72 cs->BC_Write_Reg(cs, hscx, HSCX_TSAX, bcs->hw.hscx.tsaxr1); in modehscx()
73 cs->BC_Write_Reg(cs, hscx, HSCX_TSAR, bcs->hw.hscx.tsaxr1); in modehscx()
98 struct BCState *bcs = st->l1.bcs; in hscx_l2l1() local
104 spin_lock_irqsave(&bcs->cs->lock, flags); in hscx_l2l1()
105 if (bcs->tx_skb) { in hscx_l2l1()
106 skb_queue_tail(&bcs->squeue, skb); in hscx_l2l1()
108 bcs->tx_skb = skb; in hscx_l2l1()
109 test_and_set_bit(BC_FLG_BUSY, &bcs->Flag); in hscx_l2l1()
110 bcs->hw.hscx.count = 0; in hscx_l2l1()
111 bcs->cs->BC_Send_Data(bcs); in hscx_l2l1()
113 spin_unlock_irqrestore(&bcs->cs->lock, flags); in hscx_l2l1()
116 spin_lock_irqsave(&bcs->cs->lock, flags); in hscx_l2l1()
117 if (bcs->tx_skb) { in hscx_l2l1()
120 test_and_set_bit(BC_FLG_BUSY, &bcs->Flag); in hscx_l2l1()
121 bcs->tx_skb = skb; in hscx_l2l1()
122 bcs->hw.hscx.count = 0; in hscx_l2l1()
123 bcs->cs->BC_Send_Data(bcs); in hscx_l2l1()
125 spin_unlock_irqrestore(&bcs->cs->lock, flags); in hscx_l2l1()
128 if (!bcs->tx_skb) { in hscx_l2l1()
135 spin_lock_irqsave(&bcs->cs->lock, flags); in hscx_l2l1()
136 test_and_set_bit(BC_FLG_ACTIV, &bcs->Flag); in hscx_l2l1()
137 modehscx(bcs, st->l1.mode, st->l1.bc); in hscx_l2l1()
138 spin_unlock_irqrestore(&bcs->cs->lock, flags); in hscx_l2l1()
145 spin_lock_irqsave(&bcs->cs->lock, flags); in hscx_l2l1()
146 test_and_clear_bit(BC_FLG_ACTIV, &bcs->Flag); in hscx_l2l1()
147 test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag); in hscx_l2l1()
148 modehscx(bcs, 0, st->l1.bc); in hscx_l2l1()
149 spin_unlock_irqrestore(&bcs->cs->lock, flags); in hscx_l2l1()
156 close_hscxstate(struct BCState *bcs) in close_hscxstate() argument
158 modehscx(bcs, 0, bcs->channel); in close_hscxstate()
159 if (test_and_clear_bit(BC_FLG_INIT, &bcs->Flag)) { in close_hscxstate()
160 kfree(bcs->hw.hscx.rcvbuf); in close_hscxstate()
161 bcs->hw.hscx.rcvbuf = NULL; in close_hscxstate()
162 kfree(bcs->blog); in close_hscxstate()
163 bcs->blog = NULL; in close_hscxstate()
164 skb_queue_purge(&bcs->rqueue); in close_hscxstate()
165 skb_queue_purge(&bcs->squeue); in close_hscxstate()
166 if (bcs->tx_skb) { in close_hscxstate()
167 dev_kfree_skb_any(bcs->tx_skb); in close_hscxstate()
168 bcs->tx_skb = NULL; in close_hscxstate()
169 test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag); in close_hscxstate()
175 open_hscxstate(struct IsdnCardState *cs, struct BCState *bcs) in open_hscxstate() argument
177 if (!test_and_set_bit(BC_FLG_INIT, &bcs->Flag)) { in open_hscxstate()
178 if (!(bcs->hw.hscx.rcvbuf = kmalloc(HSCX_BUFMAX, GFP_ATOMIC))) { in open_hscxstate()
181 test_and_clear_bit(BC_FLG_INIT, &bcs->Flag); in open_hscxstate()
184 if (!(bcs->blog = kmalloc(MAX_BLOG_SPACE, GFP_ATOMIC))) { in open_hscxstate()
187 test_and_clear_bit(BC_FLG_INIT, &bcs->Flag); in open_hscxstate()
188 kfree(bcs->hw.hscx.rcvbuf); in open_hscxstate()
189 bcs->hw.hscx.rcvbuf = NULL; in open_hscxstate()
192 skb_queue_head_init(&bcs->rqueue); in open_hscxstate()
193 skb_queue_head_init(&bcs->squeue); in open_hscxstate()
195 bcs->tx_skb = NULL; in open_hscxstate()
196 test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag); in open_hscxstate()
197 bcs->event = 0; in open_hscxstate()
198 bcs->hw.hscx.rcvidx = 0; in open_hscxstate()
199 bcs->tx_cnt = 0; in open_hscxstate()
204 setstack_hscx(struct PStack *st, struct BCState *bcs) in setstack_hscx() argument
206 bcs->channel = st->l1.bc; in setstack_hscx()
207 if (open_hscxstate(st->l1.hardware, bcs)) in setstack_hscx()
209 st->l1.bcs = bcs; in setstack_hscx()
212 bcs->st = st; in setstack_hscx()
246 cs->bcs[0].BC_SetStack = setstack_hscx; in inithscx()
247 cs->bcs[1].BC_SetStack = setstack_hscx; in inithscx()
248 cs->bcs[0].BC_Close = close_hscxstate; in inithscx()
249 cs->bcs[1].BC_Close = close_hscxstate; in inithscx()
250 cs->bcs[0].hw.hscx.hscx = 0; in inithscx()
251 cs->bcs[1].hw.hscx.hscx = 1; in inithscx()
252 cs->bcs[0].hw.hscx.tsaxr0 = 0x2f; in inithscx()
253 cs->bcs[0].hw.hscx.tsaxr1 = 3; in inithscx()
254 cs->bcs[1].hw.hscx.tsaxr0 = 0x2f; in inithscx()
255 cs->bcs[1].hw.hscx.tsaxr1 = 3; in inithscx()
256 modehscx(cs->bcs, 0, 0); in inithscx()
257 modehscx(cs->bcs + 1, 0, 0); in inithscx()