Home
last modified time | relevance | path

Searched refs:bch (Results 1 – 25 of 29) sorted by relevance

12

/linux-2.6.39/lib/
Dbch.c114 static void encode_bch_unaligned(struct bch_control *bch, in encode_bch_unaligned() argument
120 const int l = BCH_ECC_WORDS(bch)-1; in encode_bch_unaligned()
123 p = bch->mod8_tab + (l+1)*(((ecc[0] >> 24)^(*data++)) & 0xff); in encode_bch_unaligned()
135 static void load_ecc8(struct bch_control *bch, uint32_t *dst, in load_ecc8() argument
139 unsigned int i, nwords = BCH_ECC_WORDS(bch)-1; in load_ecc8()
144 memcpy(pad, src, BCH_ECC_BYTES(bch)-4*nwords); in load_ecc8()
151 static void store_ecc8(struct bch_control *bch, uint8_t *dst, in store_ecc8() argument
155 unsigned int i, nwords = BCH_ECC_WORDS(bch)-1; in store_ecc8()
167 memcpy(dst, pad, BCH_ECC_BYTES(bch)-4*nwords); in store_ecc8()
184 void encode_bch(struct bch_control *bch, const uint8_t *data, in encode_bch() argument
[all …]
DMakefile72 obj-$(CONFIG_BCH) += bch.o
/linux-2.6.39/drivers/isdn/hardware/mISDN/
Davmfritz.c138 struct bchannel bch[2]; member
149 card->bch[0].debug = debug; in _set_debug()
150 card->bch[1].debug = debug; in _set_debug()
258 if (test_bit(FLG_ACTIVE, &fc->bch[0].Flags) && in Sel_BCS()
259 (fc->bch[0].nr & channel)) in Sel_BCS()
260 return &fc->bch[0]; in Sel_BCS()
261 else if (test_bit(FLG_ACTIVE, &fc->bch[1].Flags) && in Sel_BCS()
262 (fc->bch[1].nr & channel)) in Sel_BCS()
263 return &fc->bch[1]; in Sel_BCS()
283 write_ctrl(struct bchannel *bch, int which) { in write_ctrl() argument
[all …]
DmISDNisar.c81 if (isar->ch[0].bch.debug & DEBUG_HW_BFIFO) { in send_mbox()
110 if (isar->ch[0].bch.debug & DEBUG_HW_BFIFO) { in rcv_mbox()
187 u32 saved_debug = isar->ch[0].bch.debug; in load_firmware()
206 isar->ch[0].bch.debug &= ~DEBUG_HW_BFIFO; in load_firmware()
293 isar->ch[0].bch.debug = saved_debug; in load_firmware()
405 isar->ch[0].bch.debug = saved_debug; in load_firmware()
417 _queue_data(&ch->bch.ch, PH_CONTROL_IND, status, 0, NULL, GFP_ATOMIC); in deliver_status()
430 switch (ch->bch.state) { in isar_rcv_frame()
439 if (!ch->bch.rx_skb) { in isar_rcv_frame()
440 ch->bch.rx_skb = mI_alloc_skb(ch->bch.maxlen, in isar_rcv_frame()
[all …]
Dnetjet.c54 struct bchannel bch; member
108 card->bc[0].bch.debug = debug; in _set_debug()
109 card->bc[1].bch.debug = debug; in _set_debug()
189 struct tiger_hw *card = bc->bch.hw; in fill_mem()
193 bc->bch.nr, fill, cnt, idx, card->send.idx); in fill_mem()
194 if (bc->bch.nr & 2) { in fill_mem()
212 struct tiger_hw *card = bc->bch.hw; in mode_tiger()
215 bc->bch.nr, bc->bch.state, protocol); in mode_tiger()
218 if (bc->bch.state == ISDN_P_NONE) in mode_tiger()
221 bc->bch.state = protocol; in mode_tiger()
[all …]
Dw6692.c60 struct bchannel bch; member
98 card->bc[0].bch.debug = debug; in _set_debug()
99 card->bc[1].bch.debug = debug; in _set_debug()
465 struct w6692_hw *card = wch->bch.hw; in W6692_empty_Bfifo()
469 if (unlikely(wch->bch.state == ISDN_P_NONE)) { in W6692_empty_Bfifo()
472 if (wch->bch.rx_skb) in W6692_empty_Bfifo()
473 skb_trim(wch->bch.rx_skb, 0); in W6692_empty_Bfifo()
476 if (!wch->bch.rx_skb) { in W6692_empty_Bfifo()
477 wch->bch.rx_skb = mI_alloc_skb(wch->bch.maxlen, GFP_ATOMIC); in W6692_empty_Bfifo()
478 if (unlikely(!wch->bch.rx_skb)) { in W6692_empty_Bfifo()
[all …]
Dhfcpci.c147 struct bchannel bch[2]; member
320 if (test_bit(FLG_ACTIVE, &hc->bch[0].Flags) && in Sel_BCS()
321 (hc->bch[0].nr & channel)) in Sel_BCS()
322 return &hc->bch[0]; in Sel_BCS()
323 else if (test_bit(FLG_ACTIVE, &hc->bch[1].Flags) && in Sel_BCS()
324 (hc->bch[1].nr & channel)) in Sel_BCS()
325 return &hc->bch[1]; in Sel_BCS()
378 if (hc->bch[fifo].debug & DEBUG_HW_BCHANNEL) in hfcpci_clear_fifo_tx()
392 if (hc->bch[fifo].debug & DEBUG_HW_BCHANNEL) in hfcpci_clear_fifo_tx()
404 hfcpci_empty_bfifo(struct bchannel *bch, struct bzfifo *bz, in hfcpci_empty_bfifo() argument
[all …]
DmISDNipac.c890 pr_debug("%s: B%1d CEC %d us\n", hx->ip->name, hx->bch.nr, in waitforCEC()
893 pr_info("%s: B%1d CEC timeout\n", hx->ip->name, hx->bch.nr); in waitforCEC()
910 pr_debug("%s: B%1d XFW %d us\n", hx->ip->name, hx->bch.nr, in waitforXFW()
913 pr_info("%s: B%1d XFW timeout\n", hx->ip->name, hx->bch.nr); in waitforXFW()
932 pr_debug("%s: B%1d %d\n", hscx->ip->name, hscx->bch.nr, count); in hscx_empty_fifo()
933 if (!hscx->bch.rx_skb) { in hscx_empty_fifo()
934 hscx->bch.rx_skb = mI_alloc_skb(hscx->bch.maxlen, GFP_ATOMIC); in hscx_empty_fifo()
935 if (!hscx->bch.rx_skb) { in hscx_empty_fifo()
942 if ((hscx->bch.rx_skb->len + count) > hscx->bch.maxlen) { in hscx_empty_fifo()
944 hscx->bch.rx_skb->len + count); in hscx_empty_fifo()
[all …]
Dhfcsusb.c62 static int hfcsusb_setup_bch(struct bchannel *bch, int protocol);
63 static void deactivate_bchannel(struct bchannel *bch);
215 struct bchannel *bch = container_of(ch, struct bchannel, ch); in hfcusb_l2l1B() local
216 struct hfcsusb *hw = bch->hw; in hfcusb_l2l1B()
227 ret = bchannel_senddata(bch, skb); in hfcusb_l2l1B()
243 if (!test_and_set_bit(FLG_ACTIVE, &bch->Flags)) { in hfcusb_l2l1B()
244 hfcsusb_start_endpoint(hw, bch->nr); in hfcusb_l2l1B()
245 ret = hfcsusb_setup_bch(bch, ch->protocol); in hfcusb_l2l1B()
253 deactivate_bchannel(bch); in hfcusb_l2l1B()
282 phi->bch[i].protocol = hw->bch[i].ch.protocol; in hfcsusb_ph_info()
[all …]
Dhfcmulti.c842 struct bchannel *bch = hc->chan[ch].bch; in vpm_echocan_on() local
850 if (!bch) in vpm_echocan_on()
857 recv_Bchannel_skb(bch, skb); in vpm_echocan_on()
874 struct bchannel *bch = hc->chan[ch].bch; in vpm_echocan_off() local
883 if (!bch) in vpm_echocan_off()
890 recv_Bchannel_skb(bch, skb); in vpm_echocan_off()
1807 struct bchannel *bch = NULL; in hfcmulti_dtmf() local
1819 bch = hc->chan[ch].bch; in hfcmulti_dtmf()
1820 if (!bch) in hfcmulti_dtmf()
1824 if (!test_bit(FLG_TRANSPARENT, &bch->Flags)) in hfcmulti_dtmf()
[all …]
Dhfcsusb.h264 struct bchannel *bch; /* link to hfcsusb_t->bch */ member
273 struct bchannel bch[2]; member
Dspeedfax.c91 card->isar.ch[0].bch.debug = debug; in _set_debug()
92 card->isar.ch[1].bch.debug = debug; in _set_debug()
407 list_add(&card->isar.ch[i].bch.ch.list, in setup_instance()
Disar.h29 struct bchannel bch; member
Dipac.h60 struct bchannel bch; member
/linux-2.6.39/drivers/isdn/mISDN/
Dhwchannel.c48 struct bchannel *bch = container_of(ws, struct bchannel, workq); in bchannel_bh() local
52 if (test_and_clear_bit(FLG_RECVQUEUE, &bch->Flags)) { in bchannel_bh()
53 while ((skb = skb_dequeue(&bch->rqueue))) { in bchannel_bh()
54 bch->rcount--; in bchannel_bh()
55 if (likely(bch->ch.peer)) { in bchannel_bh()
56 err = bch->ch.recv(bch->ch.peer, skb); in bchannel_bh()
200 recv_Bchannel(struct bchannel *bch, unsigned int id) in recv_Bchannel() argument
204 hh = mISDN_HEAD_P(bch->rx_skb); in recv_Bchannel()
207 if (bch->rcount >= 64) { in recv_Bchannel()
209 "flushing!\n", bch); in recv_Bchannel()
[all …]
Dl1oip_core.c371 struct bchannel *bch; in l1oip_socket_recv() local
393 bch = hc->chan[channel].bch; in l1oip_socket_recv()
394 if (!dch && !bch) { in l1oip_socket_recv()
422 if (bch) { in l1oip_socket_recv()
458 queue_ch_frame(&bch->ch, PH_DATA_IND, rx_counter, nskb); in l1oip_socket_recv()
1030 struct bchannel *bch; in open_bchannel() local
1038 bch = hc->chan[ch].bch; in open_bchannel()
1039 if (!bch) { in open_bchannel()
1044 if (test_and_set_bit(FLG_OPEN, &bch->Flags)) in open_bchannel()
1046 bch->ch.protocol = rq->protocol; in open_bchannel()
[all …]
Dl1oip.h33 struct bchannel *bch; member
/linux-2.6.39/drivers/isdn/hisax/
Dhfc4s8s_l1.c425 struct hfc4s8s_btype *bch = ifc->priv; in bch_l2l1() local
426 struct hfc4s8s_l1 *l1 = bch->l1p; in bch_l2l1()
434 if (!l1->enabled || (bch->mode == L1_MODE_NULL)) { in bch_l2l1()
439 skb_queue_tail(&bch->tx_queue, skb); in bch_l2l1()
440 if (!bch->tx_skb && (bch->tx_cnt <= 0)) { in bch_l2l1()
442 ((bch->bchan == 1) ? 1 : 4); in bch_l2l1()
465 ((bch->bchan == in bch_l2l1()
469 ((bch->bchan == in bch_l2l1()
480 ((bch->bchan == in bch_l2l1()
491 (bch->bchan & 3); in bch_l2l1()
[all …]
/linux-2.6.39/drivers/mtd/nand/
Dnand_bch.c40 struct bch_control *bch; member
60 encode_bch(nbc->bch, buf, chip->ecc.size, code); in nand_bch_calculate_ecc()
87 count = decode_bch(nbc->bch, NULL, chip->ecc.size, read_ecc, calc_ecc, in nand_bch_correct_data()
147 nbc->bch = init_bch(m, t, 0); in nand_bch_init()
148 if (!nbc->bch) in nand_bch_init()
152 if (nbc->bch->ecc_bytes != eccbytes) { in nand_bch_init()
154 eccbytes, nbc->bch->ecc_bytes); in nand_bch_init()
213 encode_bch(nbc->bch, erased_page, eccsize, nbc->eccmask); in nand_bch_init()
233 free_bch(nbc->bch); in nand_bch_free()
Dnandsim.c112 static unsigned int bch; variable
137 module_param(bch, uint, 0400);
171 MODULE_PARM_DESC(bch, "Enable BCH ecc and set how many bits should "
2325 if (bch) { in ns_init_module()
2334 eccbytes = (bch*13+7)/8; in ns_init_module()
2342 NS_ERR("invalid bch value %u\n", bch); in ns_init_module()
2349 NS_INFO("using %u-bit/%u bytes BCH ECC\n", bch, chip->ecc.size); in ns_init_module()
/linux-2.6.39/drivers/isdn/act2000/
Dcapi.c139 eazmask |= card->bch[i].eazmask; in actcapi_listen_req()
508 if (card->bch[i].plci == 0x8000) { in new_plci()
509 card->bch[i].plci = plci; in new_plci()
520 if (card->bch[i].plci == plci) in find_plci()
530 if (card->bch[i].ncci == ncci) in find_ncci()
540 if ((card->bch[i].callref == callref) && in find_dialing()
541 (card->bch[i].fsm_state == ACT2000_STATE_OCALL)) in find_dialing()
559 if (card->bch[chan].fsm_state != ACT2000_STATE_ACTIVE) in actcapi_data_b3_ind()
561 if (card->bch[chan].plci != plci) in actcapi_data_b3_ind()
655 if ((chan >= 0) && (card->bch[chan].fsm_state == ACT2000_STATE_ACTIVE)) { in actcapi_dispatch()
[all …]
Dmodule.c54 return &(card->bch[channel]); in find_channel()
606 card->bch[i].plci = 0x8000; in act2000_alloccard()
607 card->bch[i].ncci = 0x8000; in act2000_alloccard()
608 card->bch[i].l2prot = ISDN_PROTO_L2_X75I; in act2000_alloccard()
609 card->bch[i].l3prot = ISDN_PROTO_L3_TRANS; in act2000_alloccard()
Dact2000.h174 act2000_chan bch[ACT2000_BCH]; /* B-Channel status/control */ member
/linux-2.6.39/include/linux/
Dbch.h70 void free_bch(struct bch_control *bch);
72 void encode_bch(struct bch_control *bch, const uint8_t *data,
75 int decode_bch(struct bch_control *bch, const uint8_t *data, unsigned int len,
DmISDNhw.h182 extern void confirm_Bsend(struct bchannel *bch);

12