Home
last modified time | relevance | path

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

/linux-4.1.27/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 …]
DMakefile84 obj-$(CONFIG_BCH) += bch.o
/linux-4.1.27/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()
165 mISDN_ctrl_bchannel(struct bchannel *bch, struct mISDN_ctrl_req *cq) in mISDN_ctrl_bchannel() argument
176 memset(bch->fill, cq->p2 & 0xff, MISDN_BCH_FILL_SIZE); in mISDN_ctrl_bchannel()
177 test_and_set_bit(FLG_FILLEMPTY, &bch->Flags); in mISDN_ctrl_bchannel()
179 test_and_clear_bit(FLG_FILLEMPTY, &bch->Flags); in mISDN_ctrl_bchannel()
[all …]
Dl1oip_core.c366 struct bchannel *bch; in l1oip_socket_recv() local
388 bch = hc->chan[channel].bch; in l1oip_socket_recv()
389 if (!dch && !bch) { in l1oip_socket_recv()
417 if (bch) { in l1oip_socket_recv()
453 queue_ch_frame(&bch->ch, PH_DATA_IND, rx_counter, nskb); in l1oip_socket_recv()
1023 struct bchannel *bch; in open_bchannel() local
1031 bch = hc->chan[ch].bch; in open_bchannel()
1032 if (!bch) { in open_bchannel()
1037 if (test_and_set_bit(FLG_OPEN, &bch->Flags)) in open_bchannel()
1039 bch->ch.protocol = rq->protocol; in open_bchannel()
[all …]
Dl1oip.h33 struct bchannel *bch; member
/linux-4.1.27/drivers/isdn/hardware/mISDN/
Davmfritz.c143 struct bchannel bch[2]; member
154 card->bch[0].debug = debug; in _set_debug()
155 card->bch[1].debug = debug; in _set_debug()
263 if (test_bit(FLG_ACTIVE, &fc->bch[0].Flags) && in Sel_BCS()
264 (fc->bch[0].nr & channel)) in Sel_BCS()
265 return &fc->bch[0]; in Sel_BCS()
266 else if (test_bit(FLG_ACTIVE, &fc->bch[1].Flags) && in Sel_BCS()
267 (fc->bch[1].nr & channel)) in Sel_BCS()
268 return &fc->bch[1]; in Sel_BCS()
288 write_ctrl(struct bchannel *bch, int which) { in write_ctrl() argument
[all …]
DmISDNisar.c82 if (isar->ch[0].bch.debug & DEBUG_HW_BFIFO) { in send_mbox()
111 if (isar->ch[0].bch.debug & DEBUG_HW_BFIFO) { in rcv_mbox()
188 u32 saved_debug = isar->ch[0].bch.debug; in load_firmware()
207 isar->ch[0].bch.debug &= ~DEBUG_HW_BFIFO; in load_firmware()
294 isar->ch[0].bch.debug = saved_debug; in load_firmware()
406 isar->ch[0].bch.debug = saved_debug; in load_firmware()
418 _queue_data(&ch->bch.ch, PH_CONTROL_IND, status, 0, NULL, GFP_ATOMIC); in deliver_status()
432 if (test_bit(FLG_RX_OFF, &ch->bch.Flags)) { in isar_rcv_frame()
433 ch->bch.dropcnt += ch->is->clsb; in isar_rcv_frame()
437 switch (ch->bch.state) { in isar_rcv_frame()
[all …]
Dnetjet.c55 struct bchannel bch; member
109 card->bc[0].bch.debug = debug; in _set_debug()
110 card->bc[1].bch.debug = debug; in _set_debug()
190 struct tiger_hw *card = bc->bch.hw; in fill_mem()
194 bc->bch.nr, fill, cnt, idx, card->send.idx); in fill_mem()
195 if (bc->bch.nr & 2) { in fill_mem()
213 struct tiger_hw *card = bc->bch.hw; in mode_tiger()
216 bc->bch.nr, bc->bch.state, protocol); in mode_tiger()
219 if (bc->bch.state == ISDN_P_NONE) in mode_tiger()
222 bc->bch.state = protocol; in mode_tiger()
[all …]
Dw6692.c61 struct bchannel bch; member
99 card->bc[0].bch.debug = debug; in _set_debug()
100 card->bc[1].bch.debug = debug; in _set_debug()
466 struct w6692_hw *card = wch->bch.hw; in W6692_empty_Bfifo()
471 if (unlikely(wch->bch.state == ISDN_P_NONE)) { in W6692_empty_Bfifo()
474 if (wch->bch.rx_skb) in W6692_empty_Bfifo()
475 skb_trim(wch->bch.rx_skb, 0); in W6692_empty_Bfifo()
478 if (test_bit(FLG_RX_OFF, &wch->bch.Flags)) { in W6692_empty_Bfifo()
479 wch->bch.dropcnt += count; in W6692_empty_Bfifo()
483 maxlen = bchannel_get_rxbuf(&wch->bch, count); in W6692_empty_Bfifo()
[all …]
Dhfcpci.c148 struct bchannel bch[2]; member
321 if (test_bit(FLG_ACTIVE, &hc->bch[0].Flags) && in Sel_BCS()
322 (hc->bch[0].nr & channel)) in Sel_BCS()
323 return &hc->bch[0]; in Sel_BCS()
324 else if (test_bit(FLG_ACTIVE, &hc->bch[1].Flags) && in Sel_BCS()
325 (hc->bch[1].nr & channel)) in Sel_BCS()
326 return &hc->bch[1]; in Sel_BCS()
379 if (hc->bch[fifo].debug & DEBUG_HW_BCHANNEL) in hfcpci_clear_fifo_tx()
393 if (hc->bch[fifo].debug & DEBUG_HW_BCHANNEL) in hfcpci_clear_fifo_tx()
405 hfcpci_empty_bfifo(struct bchannel *bch, struct bzfifo *bz, in hfcpci_empty_bfifo() argument
[all …]
DmISDNipac.c901 pr_debug("%s: B%1d CEC %d us\n", hx->ip->name, hx->bch.nr, in waitforCEC()
904 pr_info("%s: B%1d CEC timeout\n", hx->ip->name, hx->bch.nr); in waitforCEC()
921 pr_debug("%s: B%1d XFW %d us\n", hx->ip->name, hx->bch.nr, in waitforXFW()
924 pr_info("%s: B%1d XFW timeout\n", hx->ip->name, hx->bch.nr); in waitforXFW()
944 pr_debug("%s: B%1d %d\n", hscx->ip->name, hscx->bch.nr, count); in hscx_empty_fifo()
945 if (test_bit(FLG_RX_OFF, &hscx->bch.Flags)) { in hscx_empty_fifo()
946 hscx->bch.dropcnt += count; in hscx_empty_fifo()
950 maxlen = bchannel_get_rxbuf(&hscx->bch, count); in hscx_empty_fifo()
953 if (hscx->bch.rx_skb) in hscx_empty_fifo()
954 skb_trim(hscx->bch.rx_skb, 0); in hscx_empty_fifo()
[all …]
Dhfcsusb.c61 static int hfcsusb_setup_bch(struct bchannel *bch, int protocol);
62 static void deactivate_bchannel(struct bchannel *bch);
212 struct bchannel *bch = container_of(ch, struct bchannel, ch); in hfcusb_l2l1B() local
213 struct hfcsusb *hw = bch->hw; in hfcusb_l2l1B()
224 ret = bchannel_senddata(bch, skb); in hfcusb_l2l1B()
233 if (!test_and_set_bit(FLG_ACTIVE, &bch->Flags)) { in hfcusb_l2l1B()
234 hfcsusb_start_endpoint(hw, bch->nr - 1); in hfcusb_l2l1B()
235 ret = hfcsusb_setup_bch(bch, ch->protocol); in hfcusb_l2l1B()
243 deactivate_bchannel(bch); in hfcusb_l2l1B()
272 phi->bch[i].protocol = hw->bch[i].ch.protocol; in hfcsusb_ph_info()
[all …]
Dhfcmulti.c858 struct bchannel *bch = hc->chan[ch].bch; in vpm_echocan_on() local
866 if (!bch) in vpm_echocan_on()
873 recv_Bchannel_skb(bch, skb); in vpm_echocan_on()
890 struct bchannel *bch = hc->chan[ch].bch; in vpm_echocan_off() local
899 if (!bch) in vpm_echocan_off()
906 recv_Bchannel_skb(bch, skb); in vpm_echocan_off()
1844 struct bchannel *bch = NULL; in hfcmulti_dtmf() local
1856 bch = hc->chan[ch].bch; in hfcmulti_dtmf()
1857 if (!bch) in hfcmulti_dtmf()
1861 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.c92 card->isar.ch[0].bch.debug = debug; in _set_debug()
93 card->isar.ch[1].bch.debug = debug; in _set_debug()
411 list_add(&card->isar.ch[i].bch.ch.list, in setup_instance()
Disar.h29 struct bchannel bch; member
Dipac.h60 struct bchannel bch; member
Dhfc_multi.h41 struct bchannel *bch; /* link if channel is a B-channel */ member
DmISDNinfineon.c242 card->ipac.hscx[0].bch.debug = debug; in _set_debug()
243 card->ipac.hscx[1].bch.debug = debug; in _set_debug()
/linux-4.1.27/drivers/isdn/hisax/
Dhfc4s8s_l1.c383 struct hfc4s8s_btype *bch = ifc->priv; in bch_l2l1() local
384 struct hfc4s8s_l1 *l1 = bch->l1p; in bch_l2l1()
392 if (!l1->enabled || (bch->mode == L1_MODE_NULL)) { in bch_l2l1()
397 skb_queue_tail(&bch->tx_queue, skb); in bch_l2l1()
398 if (!bch->tx_skb && (bch->tx_cnt <= 0)) { in bch_l2l1()
400 ((bch->bchan == 1) ? 1 : 4); in bch_l2l1()
423 ((bch->bchan == in bch_l2l1()
427 ((bch->bchan == in bch_l2l1()
438 ((bch->bchan == in bch_l2l1()
449 (bch->bchan & 3); in bch_l2l1()
[all …]
Dcallc.c876 *selectfreechannel(struct PStack *st, int bch) in selectfreechannel() argument
887 if (!bch) { in selectfreechannel()
892 while (i < ((bch) ? cs->chanlimit : (2 + MAX_WAITING_CALLS))) { in selectfreechannel()
899 if (bch) /* number of channels is limited */ { in selectfreechannel()
/linux-4.1.27/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()
Ddocg4.c91 struct bch_control *bch; member
428 numerrs = decode_bch(doc->bch, NULL, DOCG4_USERDATA_LEN, NULL, in correct_data()
1326 doc->bch = init_bch(DOCG4_M, DOCG4_T, DOCG4_PRIMITIVE_POLY); in probe_docg4()
1327 if (doc->bch == NULL) { in probe_docg4()
1363 free_bch(doc->bch); in probe_docg4()
1374 free_bch(doc->bch); in cleanup_docg4()
Dnandsim.c109 static unsigned int bch; variable
141 module_param(bch, uint, 0400);
175 MODULE_PARM_DESC(bch, "Enable BCH ecc and set how many bits should "
2317 if (bch) { in ns_init_module()
2326 eccbytes = (bch*13+7)/8; in ns_init_module()
2334 NS_ERR("invalid bch value %u\n", bch); in ns_init_module()
2340 chip->ecc.strength = bch; in ns_init_module()
2342 NS_INFO("using %u-bit/%u bytes BCH ECC\n", bch, chip->ecc.size); in ns_init_module()
/linux-4.1.27/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-4.1.27/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,
DmISDNif.h326 struct ph_info_ch bch[]; member
/linux-4.1.27/Documentation/devicetree/bindings/mtd/
Dgpmi-nand.txt8 - reg : should contain registers location and length for gpmi and bch.
9 - reg-names: Should contain the reg names "gpmi-nand" and "bch"
11 - interrupt-names : Should be "bch".
49 reg-names = "gpmi-nand", "bch";
51 interrupt-names = "bch";
/linux-4.1.27/drivers/mtd/devices/
Ddocg3.h281 struct bch_control *bch; member
Ddocg3.c642 numerrs = decode_bch(docg3->cascade->bch, NULL, in doc_ecc_bch_fix_data()
2054 cascade->bch = init_bch(DOC_ECC_BCH_M, DOC_ECC_BCH_T, in docg3_probe()
2056 if (!cascade->bch) in docg3_probe()
2090 free_bch(cascade->bch); in docg3_probe()
2115 free_bch(docg3->cascade->bch); in docg3_release()
/linux-4.1.27/arch/arm/boot/dts/
Dimx23.dtsi82 reg-names = "gpmi-nand", "bch";
84 interrupt-names = "bch";
Dimx28.dtsi106 reg-names = "gpmi-nand", "bch";
108 interrupt-names = "bch";
Dimx6qdl.dtsi107 reg-names = "gpmi-nand", "bch";
109 interrupt-names = "bch";
Dimx6sx.dtsi177 reg-names = "gpmi-nand", "bch";
179 interrupt-names = "bch";