Searched refs:wch (Results 1 - 3 of 3) sorted by relevance

/linux-4.1.27/drivers/isdn/hardware/mISDN/
H A Dw6692.c464 W6692_empty_Bfifo(struct w6692_ch *wch, int count) W6692_empty_Bfifo() argument
466 struct w6692_hw *card = wch->bch.hw; W6692_empty_Bfifo()
471 if (unlikely(wch->bch.state == ISDN_P_NONE)) { W6692_empty_Bfifo()
473 WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RACK | W_B_CMDR_RACT); W6692_empty_Bfifo()
474 if (wch->bch.rx_skb) W6692_empty_Bfifo()
475 skb_trim(wch->bch.rx_skb, 0); W6692_empty_Bfifo()
478 if (test_bit(FLG_RX_OFF, &wch->bch.Flags)) { W6692_empty_Bfifo()
479 wch->bch.dropcnt += count; W6692_empty_Bfifo()
480 WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RACK | W_B_CMDR_RACT); W6692_empty_Bfifo()
483 maxlen = bchannel_get_rxbuf(&wch->bch, count); W6692_empty_Bfifo()
485 WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RACK | W_B_CMDR_RACT); W6692_empty_Bfifo()
486 if (wch->bch.rx_skb) W6692_empty_Bfifo()
487 skb_trim(wch->bch.rx_skb, 0); W6692_empty_Bfifo()
489 card->name, wch->bch.nr, count); W6692_empty_Bfifo()
492 ptr = skb_put(wch->bch.rx_skb, count); W6692_empty_Bfifo()
493 insb(wch->addr + W_B_RFIFO, ptr, count); W6692_empty_Bfifo()
494 WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RACK | W_B_CMDR_RACT); W6692_empty_Bfifo()
497 wch->bch.nr, card->name, count); W6692_empty_Bfifo()
503 W6692_fill_Bfifo(struct w6692_ch *wch) W6692_fill_Bfifo() argument
505 struct w6692_hw *card = wch->bch.hw; W6692_fill_Bfifo()
510 if (!wch->bch.tx_skb) { W6692_fill_Bfifo()
511 if (!test_bit(FLG_TX_EMPTY, &wch->bch.Flags)) W6692_fill_Bfifo()
513 ptr = wch->bch.fill; W6692_fill_Bfifo()
517 count = wch->bch.tx_skb->len - wch->bch.tx_idx; W6692_fill_Bfifo()
520 ptr = wch->bch.tx_skb->data + wch->bch.tx_idx; W6692_fill_Bfifo()
524 else if (test_bit(FLG_HDLC, &wch->bch.Flags)) W6692_fill_Bfifo()
528 count, wch->bch.tx_idx); W6692_fill_Bfifo()
529 wch->bch.tx_idx += count; W6692_fill_Bfifo()
532 outsb(wch->addr + W_B_XFIFO, ptr, MISDN_BCH_FILL_SIZE); W6692_fill_Bfifo()
536 outsb(wch->addr + W_B_XFIFO, ptr, count); W6692_fill_Bfifo()
538 WriteW6692B(wch, W_B_CMDR, cmd); W6692_fill_Bfifo()
541 wch->bch.nr, card->name, count); W6692_fill_Bfifo()
548 setvolume(struct w6692_ch *wch, int mic, struct sk_buff *skb)
550 struct w6692_hw *card = wch->bch.hw;
555 !test_bit(FLG_TRANSPARENT, &wch->bch.Flags))
575 enable_pots(struct w6692_ch *wch)
577 struct w6692_hw *card = wch->bch.hw;
580 !test_bit(FLG_TRANSPARENT, &wch->bch.Flags))
582 wch->b_mode |= W_B_MODE_EPCM | W_B_MODE_BSW0;
583 WriteW6692B(wch, W_B_MODE, wch->b_mode);
584 WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RRST | W_B_CMDR_XRST);
585 card->pctl |= ((wch->bch.nr & 2) ? W_PCTL_PCX : 0);
592 disable_pots(struct w6692_ch *wch) disable_pots() argument
594 struct w6692_hw *card = wch->bch.hw; disable_pots()
598 wch->b_mode &= ~(W_B_MODE_EPCM | W_B_MODE_BSW0); disable_pots()
599 WriteW6692B(wch, W_B_MODE, wch->b_mode); disable_pots()
600 WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RRST | W_B_CMDR_RACT | disable_pots()
606 w6692_mode(struct w6692_ch *wch, u32 pr) w6692_mode() argument
610 card = wch->bch.hw; w6692_mode()
612 wch->bch.nr, wch->bch.state, pr); w6692_mode()
615 if ((card->fmask & pots) && (wch->b_mode & W_B_MODE_EPCM)) w6692_mode()
616 disable_pots(wch); w6692_mode()
617 wch->b_mode = 0; w6692_mode()
618 mISDN_clear_bchannel(&wch->bch); w6692_mode()
619 WriteW6692B(wch, W_B_MODE, wch->b_mode); w6692_mode()
620 WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RRST | W_B_CMDR_XRST); w6692_mode()
621 test_and_clear_bit(FLG_HDLC, &wch->bch.Flags); w6692_mode()
622 test_and_clear_bit(FLG_TRANSPARENT, &wch->bch.Flags); w6692_mode()
625 wch->b_mode = W_B_MODE_MMS; w6692_mode()
626 WriteW6692B(wch, W_B_MODE, wch->b_mode); w6692_mode()
627 WriteW6692B(wch, W_B_EXIM, 0); w6692_mode()
628 WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RRST | W_B_CMDR_RACT | w6692_mode()
630 test_and_set_bit(FLG_TRANSPARENT, &wch->bch.Flags); w6692_mode()
633 wch->b_mode = W_B_MODE_ITF; w6692_mode()
634 WriteW6692B(wch, W_B_MODE, wch->b_mode); w6692_mode()
635 WriteW6692B(wch, W_B_ADM1, 0xff); w6692_mode()
636 WriteW6692B(wch, W_B_ADM2, 0xff); w6692_mode()
637 WriteW6692B(wch, W_B_EXIM, 0); w6692_mode()
638 WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RRST | W_B_CMDR_RACT | w6692_mode()
640 test_and_set_bit(FLG_HDLC, &wch->bch.Flags); w6692_mode()
646 wch->bch.state = pr; w6692_mode()
651 send_next(struct w6692_ch *wch) send_next() argument
653 if (wch->bch.tx_skb && wch->bch.tx_idx < wch->bch.tx_skb->len) { send_next()
654 W6692_fill_Bfifo(wch); send_next()
656 if (wch->bch.tx_skb) send_next()
657 dev_kfree_skb(wch->bch.tx_skb); send_next()
658 if (get_next_bframe(&wch->bch)) { send_next()
659 W6692_fill_Bfifo(wch); send_next()
660 test_and_clear_bit(FLG_TX_EMPTY, &wch->bch.Flags); send_next()
661 } else if (test_bit(FLG_TX_EMPTY, &wch->bch.Flags)) { send_next()
662 W6692_fill_Bfifo(wch); send_next()
670 struct w6692_ch *wch = &card->bc[ch]; W6692B_interrupt() local
674 stat = ReadW6692B(wch, W_B_EXIR); W6692B_interrupt()
675 pr_debug("%s: B%d EXIR %02x\n", card->name, wch->bch.nr, stat); W6692B_interrupt()
677 star = ReadW6692B(wch, W_B_STAR); W6692B_interrupt()
680 test_bit(FLG_ACTIVE, &wch->bch.Flags)) { W6692B_interrupt()
682 wch->bch.nr, wch->bch.state); W6692B_interrupt()
684 wch->bch.err_rdo++; W6692B_interrupt()
687 if (test_bit(FLG_HDLC, &wch->bch.Flags)) { W6692B_interrupt()
690 card->name, wch->bch.nr); W6692B_interrupt()
692 wch->bch.err_crc++; W6692B_interrupt()
697 card->name, wch->bch.nr); W6692B_interrupt()
699 wch->bch.err_inv++; W6692B_interrupt()
703 WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RACK | W6692B_interrupt()
705 if (wch->bch.rx_skb) W6692B_interrupt()
706 skb_trim(wch->bch.rx_skb, 0); W6692B_interrupt()
708 count = ReadW6692B(wch, W_B_RBCL) & W6692B_interrupt()
712 W6692_empty_Bfifo(wch, count); W6692B_interrupt()
713 recv_Bchannel(&wch->bch, 0, false); W6692B_interrupt()
718 star = ReadW6692B(wch, W_B_STAR); W6692B_interrupt()
721 wch->bch.nr, wch->bch.state); W6692B_interrupt()
723 wch->bch.err_rdo++; W6692B_interrupt()
725 WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RACK | W6692B_interrupt()
728 W6692_empty_Bfifo(wch, W_B_FIFO_THRESH); W6692B_interrupt()
729 if (test_bit(FLG_TRANSPARENT, &wch->bch.Flags)) W6692B_interrupt()
730 recv_Bchannel(&wch->bch, 0, false); W6692B_interrupt()
737 wch->bch.nr, wch->bch.state); W6692B_interrupt()
739 wch->bch.err_rdo++; W6692B_interrupt()
741 WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RACK | W6692B_interrupt()
747 star = ReadW6692B(wch, W_B_STAR); W6692B_interrupt()
749 wch->bch.nr, star); W6692B_interrupt()
753 wch->bch.nr, wch->bch.state); W6692B_interrupt()
755 wch->bch.err_xdu++; W6692B_interrupt()
757 WriteW6692B(wch, W_B_CMDR, W_B_CMDR_XRST | W6692B_interrupt()
760 if (wch->bch.tx_skb) { W6692B_interrupt()
761 if (!test_bit(FLG_TRANSPARENT, &wch->bch.Flags)) W6692B_interrupt()
762 wch->bch.tx_idx = 0; W6692B_interrupt()
765 send_next(wch); W6692B_interrupt()
771 wch->bch.nr, wch->bch.state); W6692B_interrupt()
773 wch->bch.err_xdu++; W6692B_interrupt()
776 if (wch->bch.tx_skb) { W6692B_interrupt()
777 if (!test_bit(FLG_TRANSPARENT, &wch->bch.Flags)) W6692B_interrupt()
778 wch->bch.tx_idx = 0; W6692B_interrupt()
779 } else if (test_bit(FLG_FILLEMPTY, &wch->bch.Flags)) { W6692B_interrupt()
780 test_and_set_bit(FLG_TX_EMPTY, &wch->bch.Flags); W6692B_interrupt()
782 send_next(wch); W6692B_interrupt()
/linux-4.1.27/drivers/s390/net/
H A Dctcm_fsms.c1763 struct channel *wch = priv->channel[CTCM_WRITE]; ctcmpc_chx_send_sweep() local
1777 __func__, wch->th_seq_num); ctcmpc_chx_send_sweep()
1781 if (fsm_getstate(wch->fsm) != CTC_STATE_TXIDLE) { ctcmpc_chx_send_sweep()
1783 fsm_addtimer(&wch->sweep_timer, ctcmpc_chx_send_sweep()
1784 200, CTC_EVENT_RSWEEP_TIMER, wch); ctcmpc_chx_send_sweep()
1788 skb = skb_dequeue(&wch->sweep_queue); ctcmpc_chx_send_sweep()
1792 if (set_normalized_cda(&wch->ccw[4], skb->data)) { ctcmpc_chx_send_sweep()
1800 skb_queue_tail(&wch->io_queue, skb); ctcmpc_chx_send_sweep()
1804 wch->ccw[4].count = skb->len; ctcmpc_chx_send_sweep()
1816 header->sw.th_last_seq = wch->th_seq_num; ctcmpc_chx_send_sweep()
1818 CTCM_CCW_DUMP((char *)&wch->ccw[3], sizeof(struct ccw1) * 3); ctcmpc_chx_send_sweep()
1822 fsm_addtimer(&wch->timer, CTCM_TIME_5_SEC, CTC_EVENT_TIMER, wch); ctcmpc_chx_send_sweep()
1823 fsm_newstate(wch->fsm, CTC_STATE_TX); ctcmpc_chx_send_sweep()
1825 spin_lock_irqsave(get_ccwdev_lock(wch->cdev), saveflags); ctcmpc_chx_send_sweep()
1826 wch->prof.send_stamp = jiffies; ctcmpc_chx_send_sweep()
1827 rc = ccw_device_start(wch->cdev, &wch->ccw[3], ctcmpc_chx_send_sweep()
1828 (unsigned long) wch, 0xff, 0); ctcmpc_chx_send_sweep()
1829 spin_unlock_irqrestore(get_ccwdev_lock(wch->cdev), saveflags); ctcmpc_chx_send_sweep()
1835 wch->th_seq_num = 0x00; ctcmpc_chx_send_sweep()
1840 __func__, wch->th_seq_num, rch->th_seq_num); ctcmpc_chx_send_sweep()
1843 ctcm_ccw_check_rc(wch, rc, "send sweep"); ctcmpc_chx_send_sweep()
H A Dctcm_mpc.c401 struct channel *rch, *wch; ctc_mpc_establish_connectivity() local
409 wch = priv->channel[CTCM_WRITE]; ctc_mpc_establish_connectivity()
456 (fsm_getstate(wch->fsm) > CH_XID0_PENDING)) { ctc_mpc_establish_connectivity()
484 if ((wch->in_mpcgroup) && ctc_mpc_establish_connectivity()
485 (fsm_getstate(wch->fsm) == CH_XID0_PENDING)) ctc_mpc_establish_connectivity()
486 fsm_event(grp->fsm, MPCG_EVENT_XID0DO, wch); ctc_mpc_establish_connectivity()
490 CTCM_FUNTAIL, dev->name, wch->id); ctc_mpc_establish_connectivity()
1356 struct channel *wch; mpc_action_go_inop() local
1379 wch = priv->channel[CTCM_WRITE]; mpc_action_go_inop()
1397 tasklet_hi_schedule(&wch->ch_disc_tasklet); mpc_action_go_inop()
1459 struct channel *wch; mpc_action_timeout() local
1464 wch = priv->channel[CTCM_WRITE]; mpc_action_timeout()
1473 (fsm_getstate(wch->fsm) == CH_XID0_PENDING)) mpc_action_timeout()

Completed in 171 milliseconds