/drivers/isdn/hisax/ |
D | netjet.c | 67 static void fill_mem(struct BCState *bcs, u_int *pos, u_int cnt, int chan, u_char fill) in fill_mem() argument 81 if (p > bcs->hw.tiger.s_end) in fill_mem() 82 p = bcs->hw.tiger.send; in fill_mem() 87 mode_tiger(struct BCState *bcs, int mode, int bc) in mode_tiger() argument 89 struct IsdnCardState *cs = bcs->cs; in mode_tiger() 94 mode, bc, bcs->channel); in mode_tiger() 95 bcs->mode = mode; in mode_tiger() 96 bcs->channel = bc; in mode_tiger() 99 fill_mem(bcs, bcs->hw.tiger.send, in mode_tiger() 103 bcs->hw.tiger.r_tot, bcs->hw.tiger.r_err, in mode_tiger() [all …]
|
D | hscx_irq.c | 53 hscx_empty_fifo(struct BCState *bcs, int count) in hscx_empty_fifo() argument 56 struct IsdnCardState *cs = bcs->cs; in hscx_empty_fifo() 61 if (bcs->hw.hscx.rcvidx + count > HSCX_BUFMAX) { in hscx_empty_fifo() 64 WriteHSCXCMDR(cs, bcs->hw.hscx.hscx, 0x80); in hscx_empty_fifo() 65 bcs->hw.hscx.rcvidx = 0; in hscx_empty_fifo() 68 ptr = bcs->hw.hscx.rcvbuf + bcs->hw.hscx.rcvidx; in hscx_empty_fifo() 69 bcs->hw.hscx.rcvidx += count; in hscx_empty_fifo() 70 READHSCXFIFO(cs, bcs->hw.hscx.hscx, ptr, count); in hscx_empty_fifo() 71 WriteHSCXCMDR(cs, bcs->hw.hscx.hscx, 0x80); in hscx_empty_fifo() 73 char *t = bcs->blog; in hscx_empty_fifo() [all …]
|
D | hfc_2bs0.c | 57 GetFreeFifoBytes(struct BCState *bcs) in GetFreeFifoBytes() argument 61 if (bcs->hw.hfc.f1 == bcs->hw.hfc.f2) in GetFreeFifoBytes() 62 return (bcs->cs->hw.hfc.fifosize); in GetFreeFifoBytes() 63 s = bcs->hw.hfc.send[bcs->hw.hfc.f1] - bcs->hw.hfc.send[bcs->hw.hfc.f2]; in GetFreeFifoBytes() 65 s += bcs->cs->hw.hfc.fifosize; in GetFreeFifoBytes() 66 s = bcs->cs->hw.hfc.fifosize - s; in GetFreeFifoBytes() 71 ReadZReg(struct BCState *bcs, u_char reg) in ReadZReg() argument 75 WaitNoBusy(bcs->cs); in ReadZReg() 76 val = 256 * bcs->cs->BC_Read_Reg(bcs->cs, HFC_DATA, reg | HFC_CIP | HFC_Z_HIGH); in ReadZReg() 77 WaitNoBusy(bcs->cs); in ReadZReg() [all …]
|
D | isar.c | 32 static void isar_pump_cmd(struct BCState *bcs, u_char cmd, u_char para); 33 static void ll_deliver_faxstat(struct BCState *bcs, u_char status); 136 struct isar_reg *ir = cs->bcs[0].hw.isar.reg; in waitrecmsg() 177 if (cs->bcs[0].hw.isar.reg->iis == ISAR_IIS_VNR) { in ISARVersion() 198 struct isar_reg *ireg = cs->bcs[0].hw.isar.reg; in isar_load_firmware() 443 struct BCState *bcs = container_of(work, struct BCState, tqueue); in isar_bh() local 446 if (test_and_clear_bit(B_LL_NOCARRIER, &bcs->event)) in isar_bh() 447 ll_deliver_faxstat(bcs, ISDN_FAX_CLASS1_NOCARR); in isar_bh() 448 if (test_and_clear_bit(B_LL_CONNECT, &bcs->event)) in isar_bh() 449 ll_deliver_faxstat(bcs, ISDN_FAX_CLASS1_CONNECT); in isar_bh() [all …]
|
D | avm_pci.c | 166 if (cs->bcs[0].mode && (cs->bcs[0].channel == channel)) in Sel_BCS() 167 return (&cs->bcs[0]); in Sel_BCS() 168 else if (cs->bcs[1].mode && (cs->bcs[1].channel == channel)) in Sel_BCS() 169 return (&cs->bcs[1]); in Sel_BCS() 175 write_ctrl(struct BCState *bcs, int which) { in write_ctrl() argument 177 if (bcs->cs->debug & L1_DEB_HSCX) in write_ctrl() 178 debugl1(bcs->cs, "hdlc %c wr%x ctrl %x", in write_ctrl() 179 'A' + bcs->channel, which, bcs->hw.hdlc.ctrl.ctrl); in write_ctrl() 180 if (bcs->cs->subtyp == AVM_FRITZ_PCI) { in write_ctrl() 181 WriteHDLCPCI(bcs->cs, bcs->channel, HDLC_STATUS, bcs->hw.hdlc.ctrl.ctrl); in write_ctrl() [all …]
|
D | jade_irq.c | 43 jade_empty_fifo(struct BCState *bcs, int count) in jade_empty_fifo() argument 46 struct IsdnCardState *cs = bcs->cs; in jade_empty_fifo() 51 if (bcs->hw.hscx.rcvidx + count > HSCX_BUFMAX) { in jade_empty_fifo() 54 WriteJADECMDR(cs, bcs->hw.hscx.hscx, jade_HDLC_RCMD, jadeRCMD_RMC); in jade_empty_fifo() 55 bcs->hw.hscx.rcvidx = 0; in jade_empty_fifo() 58 ptr = bcs->hw.hscx.rcvbuf + bcs->hw.hscx.rcvidx; in jade_empty_fifo() 59 bcs->hw.hscx.rcvidx += count; in jade_empty_fifo() 60 READJADEFIFO(cs, bcs->hw.hscx.hscx, ptr, count); in jade_empty_fifo() 61 WriteJADECMDR(cs, bcs->hw.hscx.hscx, jade_HDLC_RCMD, jadeRCMD_RMC); in jade_empty_fifo() 63 char *t = bcs->blog; in jade_empty_fifo() [all …]
|
D | hscx.c | 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 [all …]
|
D | jade.c | 78 modejade(struct BCState *bcs, int mode, int bc) in modejade() argument 80 struct IsdnCardState *cs = bcs->cs; in modejade() 81 int jade = bcs->hw.hscx.hscx; in modejade() 86 bcs->mode = mode; in modejade() 87 bcs->channel = bc; in modejade() 133 struct BCState *bcs = st->l1.bcs; in jade_l2l1() local 139 spin_lock_irqsave(&bcs->cs->lock, flags); in jade_l2l1() 140 if (bcs->tx_skb) { in jade_l2l1() 141 skb_queue_tail(&bcs->squeue, skb); in jade_l2l1() 143 bcs->tx_skb = skb; in jade_l2l1() [all …]
|
D | st5481_b.c | 20 static inline void B_L1L2(struct st5481_bcs *bcs, int pr, void *arg) in B_L1L2() argument 22 struct hisax_if *ifc = (struct hisax_if *) &bcs->b_if; in B_L1L2() 30 static void usb_b_out(struct st5481_bcs *bcs, int buf_nr) in usb_b_out() argument 32 struct st5481_b_out *b_out = &bcs->b_out; in usb_b_out() 33 struct st5481_adapter *adapter = bcs->adapter; in usb_b_out() 41 DBG(4, "ep %d urb %d busy", (bcs->channel + 1) * 2, buf_nr); in usb_b_out() 50 DBG(4, "B%d,adjust flow,add %d bytes", bcs->channel + 1, B_FLOW_ADJUST); in usb_b_out() 54 DBG(4, "B%d,adjust flow,remove %d bytes", bcs->channel + 1, B_FLOW_ADJUST); in usb_b_out() 65 DBG(4, "B%d,len=%d", bcs->channel + 1, skb->len); in usb_b_out() 67 if (bcs->mode == L1_MODE_TRANS) { in usb_b_out() [all …]
|
D | ipacx.c | 45 static void bch_empty_fifo(struct BCState *bcs, int count); 46 static void bch_fill_fifo(struct BCState *bcs); 48 static void bch_mode(struct BCState *bcs, int mode, int bc); 49 static void bch_close_state(struct BCState *bcs); 50 static int bch_open_state(struct IsdnCardState *cs, struct BCState *bcs); 51 static int bch_setstack(struct PStack *st, struct BCState *bcs); 446 struct BCState *bcs = st->l1.bcs; in bch_l2l1() local 452 spin_lock_irqsave(&bcs->cs->lock, flags); in bch_l2l1() 453 if (bcs->tx_skb) { in bch_l2l1() 454 skb_queue_tail(&bcs->squeue, skb); in bch_l2l1() [all …]
|
D | hisax_fcpcipnp.c | 223 static void __fcpci_write_ctrl(struct fritz_bcs *bcs, int which) in __fcpci_write_ctrl() argument 225 struct fritz_adapter *adapter = bcs->adapter; in __fcpci_write_ctrl() 226 int idx = bcs->channel ? AVM_IDX_HDLC_2 : AVM_IDX_HDLC_1; in __fcpci_write_ctrl() 229 'A' + bcs->channel, which, bcs->ctrl.ctrl); in __fcpci_write_ctrl() 232 outl(bcs->ctrl.ctrl, adapter->io + AVM_DATA + HDLC_CTRL); in __fcpci_write_ctrl() 235 static void fcpci_write_ctrl(struct fritz_bcs *bcs, int which) in fcpci_write_ctrl() argument 237 struct fritz_adapter *adapter = bcs->adapter; in fcpci_write_ctrl() 241 __fcpci_write_ctrl(bcs, which); in fcpci_write_ctrl() 313 static void fcpci2_write_ctrl(struct fritz_bcs *bcs, int which) in fcpci2_write_ctrl() argument 315 struct fritz_adapter *adapter = bcs->adapter; in fcpci2_write_ctrl() [all …]
|
D | hfc_2bds0.c | 143 GetFreeFifoBytes_B(struct BCState *bcs) in GetFreeFifoBytes_B() argument 147 if (bcs->hw.hfc.f1 == bcs->hw.hfc.f2) in GetFreeFifoBytes_B() 148 return (bcs->cs->hw.hfcD.bfifosize); in GetFreeFifoBytes_B() 149 s = bcs->hw.hfc.send[bcs->hw.hfc.f1] - bcs->hw.hfc.send[bcs->hw.hfc.f2]; in GetFreeFifoBytes_B() 151 s += bcs->cs->hw.hfcD.bfifosize; in GetFreeFifoBytes_B() 152 s = bcs->cs->hw.hfcD.bfifosize - s; in GetFreeFifoBytes_B() 183 *hfc_empty_fifo(struct BCState *bcs, int count) in hfc_empty_fifo() argument 187 struct IsdnCardState *cs = bcs->cs; in hfc_empty_fifo() 198 cip = HFCB_FIFO | HFCB_FIFO_OUT | HFCB_REC | HFCB_CHANNEL(bcs->channel); in hfc_empty_fifo() 207 cip = HFCB_FIFO | HFCB_FIFO_OUT | HFCB_REC | HFCB_CHANNEL(bcs->channel); in hfc_empty_fifo() [all …]
|
D | w6692.c | 204 W6692B_empty_fifo(struct BCState *bcs, int count) in W6692B_empty_fifo() argument 207 struct IsdnCardState *cs = bcs->cs; in W6692B_empty_fifo() 212 if (bcs->hw.w6692.rcvidx + count > HSCX_BUFMAX) { in W6692B_empty_fifo() 215 cs->BC_Write_Reg(cs, bcs->channel, W_B_CMDR, W_B_CMDR_RACK | W_B_CMDR_RACT); in W6692B_empty_fifo() 216 bcs->hw.w6692.rcvidx = 0; in W6692B_empty_fifo() 219 ptr = bcs->hw.w6692.rcvbuf + bcs->hw.w6692.rcvidx; in W6692B_empty_fifo() 220 bcs->hw.w6692.rcvidx += count; in W6692B_empty_fifo() 221 READW6692BFIFO(cs, bcs->channel, ptr, count); in W6692B_empty_fifo() 222 cs->BC_Write_Reg(cs, bcs->channel, W_B_CMDR, W_B_CMDR_RACK | W_B_CMDR_RACT); in W6692B_empty_fifo() 224 char *t = bcs->blog; in W6692B_empty_fifo() [all …]
|
D | elsa_ser.c | 240 write_modem(struct BCState *bcs) { in write_modem() argument 242 struct IsdnCardState *cs = bcs->cs; in write_modem() 245 if (!bcs->tx_skb) in write_modem() 247 if (bcs->tx_skb->len <= 0) in write_modem() 249 len = bcs->tx_skb->len; in write_modem() 257 skb_copy_from_linear_data(bcs->tx_skb, in write_modem() 259 skb_pull(bcs->tx_skb, count); in write_modem() 265 skb_copy_from_linear_data(bcs->tx_skb, in write_modem() 267 skb_pull(bcs->tx_skb, count); in write_modem() 280 modem_fill(struct BCState *bcs) { in modem_fill() argument [all …]
|
D | hfc_pci.c | 192 hfcpci_sched_event(struct BCState *bcs, int event) in hfcpci_sched_event() argument 194 test_and_set_bit(event, &bcs->event); in hfcpci_sched_event() 195 schedule_work(&bcs->tqueue); in hfcpci_sched_event() 205 if (cs->bcs[0].mode && (cs->bcs[0].channel == channel)) in Sel_BCS() 206 return (&cs->bcs[0]); in Sel_BCS() 207 else if (cs->bcs[1].mode && (cs->bcs[1].channel == channel)) in Sel_BCS() 208 return (&cs->bcs[1]); in Sel_BCS() 271 hfcpci_empty_fifo(struct BCState *bcs, bzfifo_type *bz, u_char *bdata, int count) in hfcpci_empty_fifo() argument 275 struct IsdnCardState *cs = bcs->cs; in hfcpci_empty_fifo() 291 bcs->err_inv++; in hfcpci_empty_fifo() [all …]
|
D | hfc_sx.c | 437 if (cs->bcs[0].mode && (cs->bcs[0].channel == channel)) in Sel_BCS() 438 return (&cs->bcs[0]); in Sel_BCS() 439 else if (cs->bcs[1].mode && (cs->bcs[1].channel == channel)) in Sel_BCS() 440 return (&cs->bcs[1]); in Sel_BCS() 476 main_rec_hfcsx(struct BCState *bcs) in main_rec_hfcsx() argument 478 struct IsdnCardState *cs = bcs->cs; in main_rec_hfcsx() 485 debugl1(cs, "rec_data %d blocked", bcs->channel); in main_rec_hfcsx() 488 skb = read_fifo(cs, ((bcs->channel) && (!cs->hw.hfcsx.bswapped)) ? in main_rec_hfcsx() 490 (bcs->mode == L1_MODE_TRANS) ? in main_rec_hfcsx() 494 skb_queue_tail(&bcs->rqueue, skb); in main_rec_hfcsx() [all …]
|
D | diva.c | 401 Memhscx_empty_fifo(struct BCState *bcs, int count) in Memhscx_empty_fifo() argument 404 struct IsdnCardState *cs = bcs->cs; in Memhscx_empty_fifo() 410 if (bcs->hw.hscx.rcvidx + count > HSCX_BUFMAX) { in Memhscx_empty_fifo() 413 MemWriteHSCXCMDR(cs, bcs->hw.hscx.hscx, 0x80); in Memhscx_empty_fifo() 414 bcs->hw.hscx.rcvidx = 0; in Memhscx_empty_fifo() 417 ptr = bcs->hw.hscx.rcvbuf + bcs->hw.hscx.rcvidx; in Memhscx_empty_fifo() 420 *ptr++ = memreadreg(cs->hw.diva.cfg_reg, bcs->hw.hscx.hscx ? 0x40 : 0); in Memhscx_empty_fifo() 421 MemWriteHSCXCMDR(cs, bcs->hw.hscx.hscx, 0x80); in Memhscx_empty_fifo() 422 ptr = bcs->hw.hscx.rcvbuf + bcs->hw.hscx.rcvidx; in Memhscx_empty_fifo() 423 bcs->hw.hscx.rcvidx += count; in Memhscx_empty_fifo() [all …]
|
/drivers/isdn/gigaset/ |
D | isocdata.c | 480 int gigaset_isoc_buildframe(struct bc_state *bcs, unsigned char *in, int len) in gigaset_isoc_buildframe() argument 484 switch (bcs->proto2) { in gigaset_isoc_buildframe() 486 result = hdlc_buildframe(bcs->hw.bas->isooutbuf, in, len); in gigaset_isoc_buildframe() 491 result = trans_buildframe(bcs->hw.bas->isooutbuf, in, len); in gigaset_isoc_buildframe() 501 static inline void hdlc_putbyte(unsigned char c, struct bc_state *bcs) in hdlc_putbyte() argument 503 bcs->rx_fcs = crc_ccitt_byte(bcs->rx_fcs, c); in hdlc_putbyte() 504 if (bcs->rx_skb == NULL) in hdlc_putbyte() 507 if (bcs->rx_skb->len >= bcs->rx_bufsize) { in hdlc_putbyte() 508 dev_warn(bcs->cs->dev, "received oversized packet discarded\n"); in hdlc_putbyte() 509 bcs->hw.bas->giants++; in hdlc_putbyte() [all …]
|
D | i4l.c | 47 struct bc_state *bcs; in writebuf_from_LL() local 60 bcs = &cs->bcs[channel]; in writebuf_from_LL() 104 return cs->ops->send_skb(bcs, skb); in writebuf_from_LL() 115 void gigaset_skb_sent(struct bc_state *bcs, struct sk_buff *skb) in gigaset_skb_sent() argument 117 isdn_if *iif = bcs->cs->iif; in gigaset_skb_sent() 122 ++bcs->trans_up; in gigaset_skb_sent() 125 dev_warn(bcs->cs->dev, "%s: skb->len==%d\n", in gigaset_skb_sent() 131 bcs->cs->myid, bcs->channel, len); in gigaset_skb_sent() 133 response.driver = bcs->cs->myid; in gigaset_skb_sent() 135 response.arg = bcs->channel; in gigaset_skb_sent() [all …]
|
D | capi.c | 370 void gigaset_skb_sent(struct bc_state *bcs, struct sk_buff *dskb) in gigaset_skb_sent() argument 372 struct cardstate *cs = bcs->cs; in gigaset_skb_sent() 374 struct gigaset_capi_appl *ap = bcs->ap; in gigaset_skb_sent() 379 ++bcs->trans_up; in gigaset_skb_sent() 387 if (bcs->apconnstate < APCONN_ACTIVE) { in gigaset_skb_sent() 399 bcs->channel + 1, CAPIMSG_HANDLE_REQ(req), in gigaset_skb_sent() 415 void gigaset_skb_rcvd(struct bc_state *bcs, struct sk_buff *skb) in gigaset_skb_rcvd() argument 417 struct cardstate *cs = bcs->cs; in gigaset_skb_rcvd() 419 struct gigaset_capi_appl *ap = bcs->ap; in gigaset_skb_rcvd() 423 bcs->trans_down++; in gigaset_skb_rcvd() [all …]
|
D | common.c | 167 if (test_timeout(&cs->bcs[channel].at_state)) in timer_tick() 188 int gigaset_get_channel(struct bc_state *bcs) in gigaset_get_channel() argument 192 spin_lock_irqsave(&bcs->cs->lock, flags); in gigaset_get_channel() 193 if (bcs->use_count || !try_module_get(bcs->cs->driver->owner)) { in gigaset_get_channel() 195 bcs->channel); in gigaset_get_channel() 196 spin_unlock_irqrestore(&bcs->cs->lock, flags); in gigaset_get_channel() 199 ++bcs->use_count; in gigaset_get_channel() 200 bcs->busy = 1; in gigaset_get_channel() 201 gig_dbg(DEBUG_CHANNEL, "allocated channel %d", bcs->channel); in gigaset_get_channel() 202 spin_unlock_irqrestore(&bcs->cs->lock, flags); in gigaset_get_channel() [all …]
|
D | gigaset.h | 324 struct bc_state *bcs; member 349 struct bc_state *bcs; member 423 struct bc_state *bcs; /* Array of struct bc_state */ member 579 int (*init_bchannel)(struct bc_state *bcs); 583 int (*close_bchannel)(struct bc_state *bcs); 586 int (*initbcshw)(struct bc_state *bcs); 589 void (*freebcshw)(struct bc_state *bcs); 592 void (*reinitbcshw)(struct bc_state *bcs); 610 int (*send_skb)(struct bc_state *bcs, struct sk_buff *skb); 633 int gigaset_m10x_send_skb(struct bc_state *bcs, struct sk_buff *skb); [all …]
|
D | ev-layer.c | 666 struct cardstate *cs, struct bc_state *bcs) in disconnect_bc() argument 682 cs->ops->close_bchannel(bcs); in disconnect_bc() 685 if (bcs->chstate & (CHS_D_UP | CHS_NOTIFY_LL)) { in disconnect_bc() 686 bcs->chstate &= ~(CHS_D_UP | CHS_NOTIFY_LL); in disconnect_bc() 687 gigaset_isdn_hupD(bcs); in disconnect_bc() 709 if (gigaset_get_channel(cs->bcs + i) >= 0) { in get_free_channel() 710 ret = &cs->bcs[i].at_state; in get_free_channel() 735 at_state = &cs->bcs[i].at_state; in init_failed() 798 if (cid == cs->bcs[i].at_state.cid) in at_state_from_cid() 799 return &cs->bcs[i].at_state; in at_state_from_cid() [all …]
|
D | asyncdata.c | 141 struct bc_state *bcs = cs->bcs; in hdlc_loop() local 142 int inputstate = bcs->inputstate; in hdlc_loop() 143 __u16 fcs = bcs->rx_fcs; in hdlc_loop() 144 struct sk_buff *skb = bcs->rx_skb; in hdlc_loop() 206 gigaset_isdn_rcv_err(bcs); in hdlc_loop() 212 gigaset_isdn_rcv_err(bcs); in hdlc_loop() 219 gigaset_isdn_rcv_err(bcs); in hdlc_loop() 224 gigaset_skb_rcvd(bcs, skb); in hdlc_loop() 229 skb = gigaset_new_rx_skb(bcs); in hdlc_loop() 233 ++bcs->emptycount; in hdlc_loop() [all …]
|
D | bas-gigaset.c | 345 static inline void error_hangup(struct bc_state *bcs) in error_hangup() argument 347 struct cardstate *cs = bcs->cs; in error_hangup() 349 gigaset_add_event(cs, &bcs->at_state, EV_HUP, NULL, 0, NULL); in error_hangup() 365 if (req_submit(cs->bcs, HD_RESET_INTERRUPT_PIPE, 0, BAS_TIMEOUT)) in error_reset() 675 struct bc_state *bcs; in read_int_callback() local 742 bcs = cs->bcs + channel; in read_int_callback() 744 gigaset_bchannel_up(bcs); in read_int_callback() 755 bcs = cs->bcs + channel; in read_int_callback() 757 stopurbs(bcs->hw.bas); in read_int_callback() 758 gigaset_bchannel_down(bcs); in read_int_callback() [all …]
|