tag | line | file | source code |
scc | 180 | drivers/char/scc.c | static void scc_change_speed(struct scc_channel *scc); |
scc | 181 | drivers/char/scc.c | static void kiss_encode(struct scc_channel *scc); |
scc | 183 | drivers/char/scc.c | static void init_channel(struct scc_channel *scc); |
scc | 184 | drivers/char/scc.c | static void scc_key_trx (struct scc_channel *scc, char tx); |
scc | 185 | drivers/char/scc.c | static void scc_txint(register struct scc_channel *scc); |
scc | 186 | drivers/char/scc.c | static void scc_exint(register struct scc_channel *scc); |
scc | 187 | drivers/char/scc.c | static void scc_rxint(register struct scc_channel *scc); |
scc | 188 | drivers/char/scc.c | static void scc_spint(register struct scc_channel *scc); |
scc | 191 | drivers/char/scc.c | static void scc_init_timer(struct scc_channel *scc); |
scc | 249 | drivers/char/scc.c | wr(register struct scc_channel *scc, register unsigned char reg, register unsigned char val) |
scc | 251 | drivers/char/scc.c | OutReg(scc->ctrl, reg, (scc->wreg[reg] = val)); |
scc | 255 | drivers/char/scc.c | or(register struct scc_channel *scc, register unsigned char reg, register unsigned char val) |
scc | 257 | drivers/char/scc.c | OutReg(scc->ctrl, reg, (scc->wreg[reg] |= val)); |
scc | 261 | drivers/char/scc.c | cl(register struct scc_channel *scc, register unsigned char reg, register unsigned char val) |
scc | 263 | drivers/char/scc.c | OutReg(scc->ctrl, reg, (scc->wreg[reg] &= ~val)); |
scc | 519 | drivers/char/scc.c | scc_isr_dispatch(register struct scc_channel *scc, register int vector) |
scc | 523 | drivers/char/scc.c | case TXINT: scc_txint(scc); break; |
scc | 524 | drivers/char/scc.c | case EXINT: scc_exint(scc); break; |
scc | 525 | drivers/char/scc.c | case RXINT: scc_rxint(scc); break; |
scc | 526 | drivers/char/scc.c | case SPINT: scc_spint(scc); break; |
scc | 527 | drivers/char/scc.c | default : printk("scc_isr(): unknown interrupt status (addr %4.4x, state %2.2x)\n",scc->ctrl,vector); |
scc | 544 | drivers/char/scc.c | register struct scc_channel *scc; |
scc | 568 | drivers/char/scc.c | scc=&SCC_Info[(((vector>>1)&0x7c)^0x04) >> 2]; |
scc | 570 | drivers/char/scc.c | if (!scc->tty) break; |
scc | 572 | drivers/char/scc.c | scc_isr_dispatch(scc, vector); |
scc | 574 | drivers/char/scc.c | Outb(scc->ctrl,0x38); /* Reset Highest IUS" opcode to WR0 */ |
scc | 609 | drivers/char/scc.c | scc = &SCC_Info[(((vector >> 1) & 0x7c) ^ 0x04) >> 2]; |
scc | 611 | drivers/char/scc.c | if (!scc->tty) break; |
scc | 615 | drivers/char/scc.c | scc_isr_dispatch(scc, vector); |
scc | 632 | drivers/char/scc.c | static inline void prepare_next_txframe(register struct scc_channel *scc) |
scc | 634 | drivers/char/scc.c | if ((scc->tbp = scc->sndq)) |
scc | 636 | drivers/char/scc.c | scc->sndq = scc->sndq->anext; |
scc | 637 | drivers/char/scc.c | scc->stat.tx_state = TXS_NEWFRAME; |
scc | 640 | drivers/char/scc.c | scc->stat.tx_state = TXS_BUSY; |
scc | 641 | drivers/char/scc.c | scc->t_tail = scc->kiss.tailtime; |
scc | 648 | drivers/char/scc.c | scc_txint(register struct scc_channel *scc) |
scc | 652 | drivers/char/scc.c | scc->stat.txints++; |
scc | 654 | drivers/char/scc.c | bp = scc->tbp; |
scc | 661 | drivers/char/scc.c | if (--scc->stat.tx_queued < 0) |
scc | 662 | drivers/char/scc.c | scc->stat.tx_queued = 0; |
scc | 664 | drivers/char/scc.c | Outb(scc->ctrl,RES_Tx_P); /* reset pending int */ |
scc | 665 | drivers/char/scc.c | cl(scc,R10,ABUNDER); /* frame complete, allow CRC transmit */ |
scc | 666 | drivers/char/scc.c | prepare_next_txframe(scc); |
scc | 670 | drivers/char/scc.c | if (scc->stat.tx_state == TXS_NEWFRAME) |
scc | 672 | drivers/char/scc.c | Outb(scc->ctrl, RES_Tx_CRC); /* reset CRC generator */ |
scc | 673 | drivers/char/scc.c | or(scc,R10,ABUNDER); /* re-install underrun protection */ |
scc | 674 | drivers/char/scc.c | Outb(scc->data,bp->data[bp->in_use++]); |
scc | 676 | drivers/char/scc.c | if (!scc->enhanced) /* reset EOM latch */ |
scc | 677 | drivers/char/scc.c | Outb(scc->ctrl, RES_EOM_L); |
scc | 679 | drivers/char/scc.c | scc->stat.tx_state = TXS_ACTIVE;/* next byte... */ |
scc | 681 | drivers/char/scc.c | Outb(scc->data,bp->data[bp->in_use++]); |
scc | 685 | drivers/char/scc.c | scc->tbp=bp; /* store buffer address */ |
scc | 692 | drivers/char/scc.c | scc_toss_buffer(register struct scc_channel *scc) |
scc | 696 | drivers/char/scc.c | if((bp = scc->rbp) != NULLBUF) |
scc | 700 | drivers/char/scc.c | scc->rbp1 = bp; /* Don't throw this one away */ |
scc | 707 | drivers/char/scc.c | flush_FIFO(register struct scc_channel *scc) |
scc | 712 | drivers/char/scc.c | Inb(scc->data); |
scc | 714 | drivers/char/scc.c | if(scc->rbp != NULLBUF) /* did we receive something? */ |
scc | 716 | drivers/char/scc.c | if(scc->rbp->next != NULLBUF || scc->rbp->cnt > 0) |
scc | 717 | drivers/char/scc.c | scc->stat.rxerrs++; /* then count it as an error */ |
scc | 719 | drivers/char/scc.c | scc_toss_buffer(scc); /* throw away buffer */ |
scc | 727 | drivers/char/scc.c | scc_exint(register struct scc_channel *scc) |
scc | 731 | drivers/char/scc.c | scc->stat.exints++; |
scc | 733 | drivers/char/scc.c | status = InReg(scc->ctrl,R0); |
scc | 734 | drivers/char/scc.c | changes = status ^ scc->status; |
scc | 740 | drivers/char/scc.c | flush_FIFO(scc); |
scc | 750 | drivers/char/scc.c | if (scc->modem.clocksrc != CLK_EXTERNAL) |
scc | 751 | drivers/char/scc.c | OutReg(scc->ctrl,R14,SEARCH|scc->wreg[R14]); /* DPLL: enter search mode */ |
scc | 753 | drivers/char/scc.c | or(scc,R3,ENT_HM|RxENABLE); /* enable the receiver, hunt mode */ |
scc | 755 | drivers/char/scc.c | cl(scc,R3,ENT_HM|RxENABLE); /* disable the receiver */ |
scc | 756 | drivers/char/scc.c | flush_FIFO(scc); |
scc | 765 | drivers/char/scc.c | if (!Running(t_txdel) && scc->kiss.txdelay == 0) /* zero TXDELAY = wait for CTS */ |
scc | 766 | drivers/char/scc.c | scc->t_txdel = 0; /* kick it! */ |
scc | 770 | drivers/char/scc.c | if ((scc->stat.tx_state == TXS_ACTIVE) && (status & TxEOM)) |
scc | 772 | drivers/char/scc.c | scc->stat.tx_under++; /* oops, an underrun! count 'em */ |
scc | 773 | drivers/char/scc.c | Outb(scc->ctrl, RES_Tx_P); |
scc | 774 | drivers/char/scc.c | Outb(scc->ctrl, RES_EXT_INT); /* reset ext/status interrupts */ |
scc | 775 | drivers/char/scc.c | scc->t_maxk = 1; |
scc | 776 | drivers/char/scc.c | scc->tbp = scc_free_chain(scc->tbp, BT_TRANSMIT); |
scc | 778 | drivers/char/scc.c | if (--scc->stat.tx_queued < 0) scc->stat.tx_queued = 0; |
scc | 779 | drivers/char/scc.c | or(scc,R10,ABUNDER); |
scc | 784 | drivers/char/scc.c | scc->stat.tx_under = 9999; /* errr... yes. */ |
scc | 785 | drivers/char/scc.c | Outb(scc->ctrl, RES_Tx_P); /* just to be sure */ |
scc | 786 | drivers/char/scc.c | scc->t_maxk = 1; |
scc | 787 | drivers/char/scc.c | scc->tbp = scc_free_chain(scc->tbp, BT_TRANSMIT); |
scc | 788 | drivers/char/scc.c | if (--scc->stat.tx_queued < 0) scc->stat.tx_queued = 0; |
scc | 789 | drivers/char/scc.c | scc->kiss.tx_inhibit = 1; /* don't try it again! */ |
scc | 793 | drivers/char/scc.c | scc->status = status; |
scc | 794 | drivers/char/scc.c | Outb(scc->ctrl,RES_EXT_INT); |
scc | 800 | drivers/char/scc.c | scc_rxint(register struct scc_channel *scc) |
scc | 804 | drivers/char/scc.c | scc->stat.rxints++; |
scc | 806 | drivers/char/scc.c | if( Running(t_maxk) && !(scc->kiss.fulldup)) |
scc | 808 | drivers/char/scc.c | Inb(scc->data); /* discard char */ |
scc | 809 | drivers/char/scc.c | or(scc,R3,ENT_HM); /* enter hunt mode for next flag */ |
scc | 813 | drivers/char/scc.c | if ((bp = scc->rbp1) == NULLBUF || bp->cnt >= bp->size) |
scc | 815 | drivers/char/scc.c | if (scc->rbp == NULLBUF) |
scc | 818 | drivers/char/scc.c | scc->rbp = scc->rbp1 = bp; |
scc | 823 | drivers/char/scc.c | scc_append_to_chain(&scc->rbp, bp); |
scc | 824 | drivers/char/scc.c | scc->rbp1 = bp; |
scc | 829 | drivers/char/scc.c | Inb(scc->data); /* discard character */ |
scc | 830 | drivers/char/scc.c | or(scc,R3,ENT_HM); /* enter hunt mode */ |
scc | 831 | drivers/char/scc.c | scc_toss_buffer(scc); /* throw away buffers */ |
scc | 832 | drivers/char/scc.c | scc->stat.nospace++; /* and count this error */ |
scc | 838 | drivers/char/scc.c | bp->data[bp->cnt++] = Inb(scc->data); |
scc | 845 | drivers/char/scc.c | kick_rx_timer(register struct scc_channel *scc) |
scc | 854 | drivers/char/scc.c | rx_timer_cb.scc = scc; |
scc | 865 | drivers/char/scc.c | scc_spint(register struct scc_channel *scc) |
scc | 870 | drivers/char/scc.c | scc->stat.spints++; |
scc | 872 | drivers/char/scc.c | status = InReg(scc->ctrl,R1); /* read receiver status */ |
scc | 874 | drivers/char/scc.c | Inb(scc->data); /* throw away Rx byte */ |
scc | 878 | drivers/char/scc.c | scc->stat.rx_over++; /* count them */ |
scc | 879 | drivers/char/scc.c | or(scc,R3,ENT_HM); /* enter hunt mode for next flag */ |
scc | 880 | drivers/char/scc.c | scc_toss_buffer(scc); /* rewind the buffer and toss */ |
scc | 883 | drivers/char/scc.c | if(status & END_FR && scc->rbp != NULLBUF) /* end of frame */ |
scc | 887 | drivers/char/scc.c | if (!(status & CRC_ERR) && (status & 0xe) == RES8 && scc->rbp->cnt) |
scc | 891 | drivers/char/scc.c | for (bp = scc->rbp; bp->next != NULLBUF; bp = bp->next) ; |
scc | 894 | drivers/char/scc.c | scc_enqueue(&scc->rcvq,scc->rbp); |
scc | 895 | drivers/char/scc.c | scc->rbp = scc->rbp1 = NULLBUF; |
scc | 896 | drivers/char/scc.c | scc->stat.rxframes++; |
scc | 897 | drivers/char/scc.c | scc->stat.rx_queued++; |
scc | 898 | drivers/char/scc.c | kick_rx_timer(scc); |
scc | 900 | drivers/char/scc.c | scc_toss_buffer(scc); /* throw away frame */ |
scc | 901 | drivers/char/scc.c | scc->stat.rxerrs++; |
scc | 905 | drivers/char/scc.c | Outb(scc->ctrl,ERR_RES); |
scc | 916 | drivers/char/scc.c | static inline void set_brg(register struct scc_channel *scc, unsigned int tc) |
scc | 922 | drivers/char/scc.c | cl(scc,R14,BRENABL); /* disable baudrate generator */ |
scc | 923 | drivers/char/scc.c | wr(scc,R12,tc & 255); /* brg rate LOW */ |
scc | 924 | drivers/char/scc.c | wr(scc,R13,tc >> 8); /* brg rate HIGH */ |
scc | 925 | drivers/char/scc.c | or(scc,R14,BRENABL); /* enable baudrate generator */ |
scc | 930 | drivers/char/scc.c | static inline void set_speed(register struct scc_channel *scc) |
scc | 932 | drivers/char/scc.c | set_brg(scc, (unsigned) (Clock / (scc->modem.speed * 64)) - 2); |
scc | 938 | drivers/char/scc.c | static inline void init_brg(register struct scc_channel *scc) |
scc | 940 | drivers/char/scc.c | wr(scc, R14, BRSRC); /* BRG source = PCLK */ |
scc | 941 | drivers/char/scc.c | OutReg(scc->ctrl, R14, SSBR|scc->wreg[R14]); /* DPLL source = BRG */ |
scc | 942 | drivers/char/scc.c | OutReg(scc->ctrl, R14, SNRZI|scc->wreg[R14]); /* DPLL NRZI mode */ |
scc | 946 | drivers/char/scc.c | init_channel(register struct scc_channel *scc) |
scc | 952 | drivers/char/scc.c | wr(scc,R1,0); /* no W/REQ operation */ |
scc | 953 | drivers/char/scc.c | wr(scc,R3,Rx8|RxCRC_ENAB); /* RX 8 bits/char, CRC, disabled */ |
scc | 954 | drivers/char/scc.c | wr(scc,R4,X1CLK|SDLC); /* *1 clock, SDLC mode */ |
scc | 955 | drivers/char/scc.c | wr(scc,R5,Tx8|DTR|TxCRC_ENAB); /* TX 8 bits/char, disabled, DTR */ |
scc | 956 | drivers/char/scc.c | wr(scc,R6,0); /* SDLC address zero (not used) */ |
scc | 957 | drivers/char/scc.c | wr(scc,R7,FLAG); /* SDLC flag value */ |
scc | 958 | drivers/char/scc.c | wr(scc,R10,(scc->modem.nrz? NRZ : NRZI)|CRCPS|ABUNDER); /* abort on underrun, preset CRC generator, NRZ(I) */ |
scc | 959 | drivers/char/scc.c | wr(scc,R14, 0); |
scc | 988 | drivers/char/scc.c | switch(scc->modem.clocksrc) |
scc | 991 | drivers/char/scc.c | wr(scc, R11, RCDPLL|TCDPLL|TRxCOI|TRxCDP); |
scc | 992 | drivers/char/scc.c | init_brg(scc); |
scc | 996 | drivers/char/scc.c | wr(scc, R11, ((Board & BAYCOM)? TRxCDP : TRxCBR) | RCDPLL|TCRTxCP|TRxCOI); |
scc | 997 | drivers/char/scc.c | init_brg(scc); |
scc | 1001 | drivers/char/scc.c | wr(scc, R11, (Board & BAYCOM)? RCTRxCP|TCRTxCP : RCRTxCP|TCTRxCP); |
scc | 1002 | drivers/char/scc.c | OutReg(scc->ctrl, R14, DISDPLL); |
scc | 1008 | drivers/char/scc.c | wr(scc,R15,((Board & BAYCOM) ? 0 : CTSIE)|BRKIE|DCDIE|TxUIE); |
scc | 1010 | drivers/char/scc.c | if(scc->enhanced) |
scc | 1012 | drivers/char/scc.c | or(scc,R15,SHDLCE|FIFOE); /* enable FIFO, SDLC/HDLC Enhancements (From now R7 is R7') */ |
scc | 1013 | drivers/char/scc.c | wr(scc,R7,AUTOEOM); |
scc | 1016 | drivers/char/scc.c | if((InReg(scc->ctrl,R0)) & DCD) /* DCD is now ON */ |
scc | 1018 | drivers/char/scc.c | if (scc->modem.clocksrc != CLK_EXTERNAL) |
scc | 1019 | drivers/char/scc.c | or(scc,R14, SEARCH); |
scc | 1021 | drivers/char/scc.c | or(scc,R3,ENT_HM|RxENABLE); /* enable the receiver, hunt mode */ |
scc | 1024 | drivers/char/scc.c | Outb(scc->ctrl,RES_EXT_INT); /* reset ext/status interrupts */ |
scc | 1025 | drivers/char/scc.c | Outb(scc->ctrl,RES_EXT_INT); /* must be done twice */ |
scc | 1027 | drivers/char/scc.c | scc->status = InReg(scc->ctrl,R0); /* read initial status */ |
scc | 1029 | drivers/char/scc.c | or(scc,R1,INT_ALL_Rx|TxINT_ENAB|EXT_INT_ENAB); /* enable interrupts */ |
scc | 1030 | drivers/char/scc.c | or(scc,R9,MIE); /* master interrupt enable */ |
scc | 1034 | drivers/char/scc.c | set_speed(scc); |
scc | 1049 | drivers/char/scc.c | scc_key_trx(struct scc_channel *scc, char tx) |
scc | 1053 | drivers/char/scc.c | if (scc->modem.speed < baud_table[1]) |
scc | 1054 | drivers/char/scc.c | scc->modem.speed = 1200; |
scc | 1057 | drivers/char/scc.c | Outb(scc->ctrl + 4, Option | (tx? 0x80 : 0)); |
scc | 1059 | drivers/char/scc.c | time_const = (unsigned) (Clock / (scc->modem.speed * (tx? 2:64))) - 2; |
scc | 1061 | drivers/char/scc.c | if (scc->modem.clocksrc == CLK_DPLL) |
scc | 1065 | drivers/char/scc.c | cl(scc,R3,RxENABLE|ENT_HM); /* then switch off receiver */ |
scc | 1067 | drivers/char/scc.c | set_brg(scc, time_const); /* reprogram baudrate generator */ |
scc | 1070 | drivers/char/scc.c | wr(scc, R11, RCDPLL|TCBR|TRxCOI|TRxCBR); |
scc | 1072 | drivers/char/scc.c | or(scc,R5,RTS|TxENAB); /* set the RTS line and enable TX */ |
scc | 1074 | drivers/char/scc.c | cl(scc,R5,RTS|TxENAB); |
scc | 1076 | drivers/char/scc.c | set_brg(scc, time_const); /* reprogram baudrate generator */ |
scc | 1079 | drivers/char/scc.c | wr(scc, R11, RCDPLL|TCDPLL|TRxCOI|TRxCDP); |
scc | 1081 | drivers/char/scc.c | or(scc,R3,RxENABLE|ENT_HM); |
scc | 1085 | drivers/char/scc.c | or(scc,R5,RTS|TxENAB); /* enable tx */ |
scc | 1087 | drivers/char/scc.c | cl(scc,R5,RTS|TxENAB); /* disable tx */ |
scc | 1096 | drivers/char/scc.c | static inline int is_grouped(register struct scc_channel *scc) |
scc | 1102 | drivers/char/scc.c | grp1 = scc->kiss.group; |
scc | 1109 | drivers/char/scc.c | if (scc2 == scc || !(scc2->tty && grp2)) |
scc | 1125 | drivers/char/scc.c | static inline void dw_slot_timeout(register struct scc_channel *scc) |
scc | 1127 | drivers/char/scc.c | scc->t_dwait = TIMER_STOPPED; |
scc | 1128 | drivers/char/scc.c | scc->t_slot = TIMER_STOPPED; |
scc | 1130 | drivers/char/scc.c | if (!scc->kiss.fulldup) |
scc | 1134 | drivers/char/scc.c | if ( (scc->kiss.softdcd? !(scc->status & SYNC_HUNT):(scc->status & DCD)) || (scc->kiss.persist) < Rand || (scc->kiss.group && is_grouped(scc)) ) |
scc | 1136 | drivers/char/scc.c | if (scc->t_mbusy == TIMER_STOPPED) |
scc | 1137 | drivers/char/scc.c | scc->t_mbusy = TPS * scc->kiss.maxdefer; |
scc | 1139 | drivers/char/scc.c | scc->t_slot = scc->kiss.slottime; |
scc | 1145 | drivers/char/scc.c | if ( !(scc->wreg[R5] & RTS) ) |
scc | 1147 | drivers/char/scc.c | scc->t_txdel = scc->kiss.txdelay; |
scc | 1148 | drivers/char/scc.c | scc_key_trx(scc, TX_ON); |
scc | 1150 | drivers/char/scc.c | scc->t_txdel = 0; |
scc | 1157 | drivers/char/scc.c | static inline void txdel_timeout(register struct scc_channel *scc) |
scc | 1159 | drivers/char/scc.c | scc->t_txdel = TIMER_STOPPED; |
scc | 1161 | drivers/char/scc.c | scc->t_maxk = TPS * scc->kiss.maxkeyup; |
scc | 1162 | drivers/char/scc.c | prepare_next_txframe(scc); |
scc | 1164 | drivers/char/scc.c | if (scc->stat.tx_state != TXS_BUSY) |
scc | 1165 | drivers/char/scc.c | scc_txint(scc); |
scc | 1170 | drivers/char/scc.c | static inline void tail_timeout(register struct scc_channel *scc) |
scc | 1172 | drivers/char/scc.c | scc->t_tail = TIMER_STOPPED; |
scc | 1182 | drivers/char/scc.c | if (scc->kiss.fulldup < 2) |
scc | 1184 | drivers/char/scc.c | if (scc->sndq) /* we had a timeout? */ |
scc | 1186 | drivers/char/scc.c | scc->stat.tx_state = TXS_BUSY; |
scc | 1187 | drivers/char/scc.c | scc->t_dwait = TPS * scc->kiss.mintime; /* try again */ |
scc | 1190 | drivers/char/scc.c | scc->stat.tx_state = TXS_IDLE; |
scc | 1191 | drivers/char/scc.c | scc->t_maxk = TIMER_STOPPED; |
scc | 1192 | drivers/char/scc.c | scc_key_trx(scc, TX_OFF); |
scc | 1196 | drivers/char/scc.c | if (scc->sndq) /* maxkeyup expired */ /* ?! */ |
scc | 1198 | drivers/char/scc.c | scc->stat.tx_state = TXS_BUSY; |
scc | 1199 | drivers/char/scc.c | scc->t_txdel = TPS * scc->kiss.waittime; |
scc | 1203 | drivers/char/scc.c | scc->t_idle = TPS * scc->kiss.idletime; |
scc | 1207 | drivers/char/scc.c | static inline void busy_timeout(register struct scc_channel *scc) |
scc | 1212 | drivers/char/scc.c | bp = scc->sndq; |
scc | 1216 | drivers/char/scc.c | scc->sndq = NULLBUF; |
scc | 1217 | drivers/char/scc.c | scc->stat.tx_state = TXS_IDLE; |
scc | 1220 | drivers/char/scc.c | scc->t_txdel = scc->kiss.txdelay; /* brute force ... */ |
scc | 1222 | drivers/char/scc.c | scc->t_mbusy = TIMER_STOPPED; |
scc | 1227 | drivers/char/scc.c | static inline void maxk_idle_timeout(register struct scc_channel *scc) |
scc | 1229 | drivers/char/scc.c | scc->t_maxk = TIMER_STOPPED; |
scc | 1230 | drivers/char/scc.c | scc->t_idle = TIMER_STOPPED; |
scc | 1232 | drivers/char/scc.c | scc->stat.tx_state = TXS_BUSY; |
scc | 1233 | drivers/char/scc.c | scc->t_tail = scc->kiss.tailtime; |
scc | 1236 | drivers/char/scc.c | static inline void check_rcv_queue(register struct scc_channel *scc) |
scc | 1240 | drivers/char/scc.c | if (scc->stat.rx_queued > QUEUE_THRES) |
scc | 1242 | drivers/char/scc.c | if (scc->rcvq == NULLBUF) |
scc | 1245 | drivers/char/scc.c | " (%d) but queue is empty\n", scc->stat.rx_queued); |
scc | 1247 | drivers/char/scc.c | scc->stat.rx_queued = 0; /* correct it */ |
scc | 1248 | drivers/char/scc.c | scc->stat.nospace = 12345; /* draw attention to it */ |
scc | 1252 | drivers/char/scc.c | bp = scc->rcvq->anext; /* don't use the one we currently use */ |
scc | 1254 | drivers/char/scc.c | while (bp && (scc->stat.rx_queued > QUEUE_HYST)) |
scc | 1257 | drivers/char/scc.c | scc->stat.rx_queued--; |
scc | 1258 | drivers/char/scc.c | scc->stat.nospace++; |
scc | 1261 | drivers/char/scc.c | scc->rcvq->anext = bp; |
scc | 1268 | drivers/char/scc.c | register struct scc_channel *scc; |
scc | 1275 | drivers/char/scc.c | scc = &SCC_Info[chan]; |
scc | 1277 | drivers/char/scc.c | if (scc->tty && scc->init) |
scc | 1279 | drivers/char/scc.c | kiss_encode(scc); |
scc | 1283 | drivers/char/scc.c | check_rcv_queue(scc); |
scc | 1287 | drivers/char/scc.c | if (Expired(t_dwait)) dw_slot_timeout(scc) ; else |
scc | 1288 | drivers/char/scc.c | if (Expired(t_slot)) dw_slot_timeout(scc) ; else |
scc | 1289 | drivers/char/scc.c | if (Expired(t_txdel)) txdel_timeout(scc) ; else |
scc | 1290 | drivers/char/scc.c | if (Expired(t_tail)) tail_timeout(scc) ; |
scc | 1294 | drivers/char/scc.c | if (Expired(t_mbusy)) busy_timeout(scc); |
scc | 1295 | drivers/char/scc.c | if (Expired(t_maxk)) maxk_idle_timeout(scc); |
scc | 1296 | drivers/char/scc.c | if (Expired(t_idle)) maxk_idle_timeout(scc); |
scc | 1313 | drivers/char/scc.c | scc_init_timer(struct scc_channel *scc) |
scc | 1326 | drivers/char/scc.c | scc->stat.tx_state = TXS_IDLE; |
scc | 1337 | drivers/char/scc.c | kiss_encode(rx_timer_cb.scc); |
scc | 1361 | drivers/char/scc.c | kiss_set_param(struct scc_channel *scc,char cmd, unsigned int val) |
scc | 1369 | drivers/char/scc.c | scc->kiss.txdelay = VAL; break; |
scc | 1371 | drivers/char/scc.c | scc->kiss.persist = val; break; |
scc | 1373 | drivers/char/scc.c | scc->kiss.slottime = VAL; break; |
scc | 1375 | drivers/char/scc.c | scc->kiss.tailtime = VAL; break; |
scc | 1377 | drivers/char/scc.c | scc->kiss.fulldup = val; break; |
scc | 1379 | drivers/char/scc.c | scc->kiss.waittime = VAL; break; |
scc | 1381 | drivers/char/scc.c | scc->kiss.maxkeyup = SVAL; break; |
scc | 1383 | drivers/char/scc.c | scc->kiss.mintime = SVAL; break; |
scc | 1385 | drivers/char/scc.c | scc->kiss.idletime = val; break; |
scc | 1387 | drivers/char/scc.c | scc->kiss.maxdefer = SVAL; break; |
scc | 1389 | drivers/char/scc.c | scc->kiss.group = val; break; |
scc | 1391 | drivers/char/scc.c | scc->kiss.tx_inhibit = val; |
scc | 1393 | drivers/char/scc.c | scc->kiss.softdcd = val; |
scc | 1404 | drivers/char/scc.c | static void kiss_interpret_frame(struct scc_channel * scc) |
scc | 1409 | drivers/char/scc.c | if (scc->sndq1->cnt < 2) |
scc | 1411 | drivers/char/scc.c | if (scc->sndq1) |
scc | 1412 | drivers/char/scc.c | scc_free_chain(scc->sndq1, BT_TRANSMIT); |
scc | 1414 | drivers/char/scc.c | scc->sndq1 = NULLBUF; |
scc | 1416 | drivers/char/scc.c | scc->sndq2 = NULLBUF; |
scc | 1422 | drivers/char/scc.c | if (scc->kiss.not_slip) |
scc | 1424 | drivers/char/scc.c | kisscmd = scc->sndq1->data[scc->sndq1->in_use++]; |
scc | 1425 | drivers/char/scc.c | scc->sndq1->cnt--; |
scc | 1432 | drivers/char/scc.c | if (scc->sndq1->cnt > 2) |
scc | 1433 | drivers/char/scc.c | scc->sndq1->cnt -= 2; |
scc | 1436 | drivers/char/scc.c | scc_free_chain(scc->sndq1, BT_TRANSMIT); |
scc | 1437 | drivers/char/scc.c | scc->sndq2 = NULLBUF; |
scc | 1448 | drivers/char/scc.c | kiss_set_param(scc, kisscmd, scc->sndq1->data[scc->sndq1->in_use]); |
scc | 1449 | drivers/char/scc.c | scc->sndq1->cnt=0; |
scc | 1450 | drivers/char/scc.c | scc->sndq1->in_use=0; |
scc | 1452 | drivers/char/scc.c | scc_free_chain(scc->sndq1, BT_TRANSMIT); |
scc | 1453 | drivers/char/scc.c | scc->sndq2 = NULLBUF; |
scc | 1457 | drivers/char/scc.c | scc_enqueue(&scc->sndq,scc->sndq1); /* scc_enqueue packet */ |
scc | 1458 | drivers/char/scc.c | scc->stat.txframes++; |
scc | 1459 | drivers/char/scc.c | scc->stat.tx_queued++; |
scc | 1460 | drivers/char/scc.c | scc->sndq2 = NULLBUF; /* acquire a new buffer next time */ |
scc | 1464 | drivers/char/scc.c | if(scc->stat.tx_state == TXS_IDLE) |
scc | 1466 | drivers/char/scc.c | scc_init_timer(scc); |
scc | 1467 | drivers/char/scc.c | scc->stat.tx_state = TXS_BUSY; |
scc | 1468 | drivers/char/scc.c | scc->t_dwait = (scc->kiss.fulldup? 0:scc->kiss.waittime); |
scc | 1474 | drivers/char/scc.c | static void kiss_store_byte(struct scc_channel *scc, unsigned char ch) |
scc | 1476 | drivers/char/scc.c | if (scc->sndq2 == NULLBUF) return; |
scc | 1478 | drivers/char/scc.c | if(scc->sndq2->cnt == scc->sndq2->size) /* buffer full? */ |
scc | 1480 | drivers/char/scc.c | if((scc->sndq2 = scc_get_buffer(BT_TRANSMIT)) == NULLBUF) |
scc | 1485 | drivers/char/scc.c | scc_append_to_chain(&scc->sndq1,scc->sndq2); /* add buffer */ |
scc | 1488 | drivers/char/scc.c | scc->sndq2->data[scc->sndq2->cnt++] = ch; |
scc | 1491 | drivers/char/scc.c | static inline int kiss_decode(struct scc_channel *scc, unsigned char ch) |
scc | 1493 | drivers/char/scc.c | switch (scc->stat.tx_kiss_state) |
scc | 1498 | drivers/char/scc.c | if (!(scc->sndq2 = scc->sndq1 = scc_get_buffer(BT_TRANSMIT))) |
scc | 1501 | drivers/char/scc.c | scc->stat.tx_kiss_state = KISS_DATA; |
scc | 1502 | drivers/char/scc.c | } else scc->stat.txerrs++; |
scc | 1507 | drivers/char/scc.c | scc->stat.tx_kiss_state = KISS_ESCAPE; |
scc | 1510 | drivers/char/scc.c | kiss_interpret_frame(scc); |
scc | 1511 | drivers/char/scc.c | scc->stat.tx_kiss_state = KISS_IDLE; |
scc | 1513 | drivers/char/scc.c | else kiss_store_byte(scc, ch); |
scc | 1519 | drivers/char/scc.c | kiss_store_byte(scc, FEND); |
scc | 1520 | drivers/char/scc.c | scc->stat.tx_kiss_state = KISS_DATA; |
scc | 1524 | drivers/char/scc.c | kiss_store_byte(scc, FESC); |
scc | 1525 | drivers/char/scc.c | scc->stat.tx_kiss_state = KISS_DATA; |
scc | 1529 | drivers/char/scc.c | scc_free_chain(scc->sndq1, BT_TRANSMIT); |
scc | 1530 | drivers/char/scc.c | scc->sndq2 = NULLBUF; |
scc | 1531 | drivers/char/scc.c | scc->stat.txerrs++; |
scc | 1532 | drivers/char/scc.c | scc->stat.tx_kiss_state = KISS_IDLE; |
scc | 1545 | drivers/char/scc.c | kiss_encode(register struct scc_channel *scc) |
scc | 1548 | drivers/char/scc.c | struct tty_struct * tty = scc->tty; |
scc | 1552 | drivers/char/scc.c | if(!scc->rcvq) |
scc | 1554 | drivers/char/scc.c | scc->stat.rx_kiss_state = KISS_IDLE; |
scc | 1562 | drivers/char/scc.c | if (scc->rcvq->cnt) |
scc | 1564 | drivers/char/scc.c | bp = scc->rcvq; |
scc | 1566 | drivers/char/scc.c | if (scc->stat.rx_kiss_state == KISS_IDLE) |
scc | 1570 | drivers/char/scc.c | if (scc->kiss.not_slip) |
scc | 1573 | drivers/char/scc.c | scc->stat.rx_kiss_state = KISS_RXFRAME; |
scc | 1595 | drivers/char/scc.c | while (!scc->rcvq->cnt) |
scc | 1597 | drivers/char/scc.c | bp = scc->rcvq->next; /* next buffer */ |
scc | 1598 | drivers/char/scc.c | bp2 = scc->rcvq->anext; /* next packet */ |
scc | 1601 | drivers/char/scc.c | scc_return_buffer(scc->rcvq, BT_RECEIVE); |
scc | 1605 | drivers/char/scc.c | scc->rcvq = bp2; |
scc | 1607 | drivers/char/scc.c | if (--scc->stat.rx_queued < 0) |
scc | 1608 | drivers/char/scc.c | scc->stat.rx_queued = 0; |
scc | 1610 | drivers/char/scc.c | if (scc->stat.rx_kiss_state == KISS_RXFRAME) /* new packet? */ |
scc | 1613 | drivers/char/scc.c | scc->stat.rx_kiss_state = KISS_IDLE; /* generate FEND for new frame */ |
scc | 1620 | drivers/char/scc.c | } else scc->rcvq = bp; /* next buffer */ |
scc | 1640 | drivers/char/scc.c | struct scc_channel *scc; |
scc | 1657 | drivers/char/scc.c | scc=&SCC_Info[2*chip]; |
scc | 1658 | drivers/char/scc.c | if (!scc->ctrl) continue; |
scc | 1664 | drivers/char/scc.c | Outb(scc->ctrl, 0); |
scc | 1665 | drivers/char/scc.c | OutReg(scc->ctrl,R9,FHWRES); /* force hardware reset */ |
scc | 1667 | drivers/char/scc.c | wr(scc, R2, chip*16); /* interrupt vector */ |
scc | 1668 | drivers/char/scc.c | wr(scc, R9, VIS); /* vector includes status */ |
scc | 1688 | drivers/char/scc.c | static inline int scc_paranoia_check(struct scc_channel *scc, dev_t device, const char *routine) |
scc | 1696 | drivers/char/scc.c | if (!scc->init) |
scc | 1701 | drivers/char/scc.c | if (scc->magic != SCC_MAGIC) { |
scc | 1715 | drivers/char/scc.c | struct scc_channel *scc; |
scc | 1722 | drivers/char/scc.c | scc = &SCC_Info[chan]; |
scc | 1724 | drivers/char/scc.c | tty->driver_data = scc; |
scc | 1730 | drivers/char/scc.c | if (scc->magic != SCC_MAGIC) |
scc | 1736 | drivers/char/scc.c | if(scc->tty != NULL) |
scc | 1738 | drivers/char/scc.c | scc->tty_opened++; |
scc | 1742 | drivers/char/scc.c | if(!scc->init) return 0; |
scc | 1744 | drivers/char/scc.c | scc->tty = tty; |
scc | 1745 | drivers/char/scc.c | init_channel(scc); |
scc | 1747 | drivers/char/scc.c | scc->stat.tx_kiss_state = KISS_IDLE; /* don't change this... */ |
scc | 1748 | drivers/char/scc.c | scc->stat.rx_kiss_state = KISS_IDLE; /* ...or this */ |
scc | 1750 | drivers/char/scc.c | scc_init_timer(scc); |
scc | 1765 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 1768 | drivers/char/scc.c | if (!scc || (scc->magic != SCC_MAGIC)) |
scc | 1771 | drivers/char/scc.c | if(scc->tty_opened) |
scc | 1773 | drivers/char/scc.c | scc->tty_opened--; |
scc | 1781 | drivers/char/scc.c | Outb(scc->ctrl,0); /* Make sure pointer is written */ |
scc | 1782 | drivers/char/scc.c | wr(scc,R1,0); /* disable interrupts */ |
scc | 1783 | drivers/char/scc.c | wr(scc,R3,0); |
scc | 1785 | drivers/char/scc.c | scc->tty = NULL; |
scc | 1799 | drivers/char/scc.c | scc_change_speed(struct scc_channel * scc) |
scc | 1801 | drivers/char/scc.c | if (scc->tty == NULL) |
scc | 1804 | drivers/char/scc.c | scc->modem.speed = baud_table[scc->tty->termios->c_cflag & CBAUD]; |
scc | 1806 | drivers/char/scc.c | if (scc->stat.tx_state == 0) /* only switch baudrate on rx... ;-) */ |
scc | 1807 | drivers/char/scc.c | set_speed(scc); |
scc | 1832 | drivers/char/scc.c | struct scc_channel * scc = tty->driver_data; |
scc | 1839 | drivers/char/scc.c | if (scc->magic != SCC_MAGIC) |
scc | 1864 | drivers/char/scc.c | if (!scc->init) |
scc | 1875 | drivers/char/scc.c | memcpy_fromfs(&scc->modem, (void *) arg, sizeof(struct scc_modem)); |
scc | 1879 | drivers/char/scc.c | if (scc->modem.speed < 4800) |
scc | 1881 | drivers/char/scc.c | scc->kiss.txdelay = 36*TPS/100; /* 360 ms */ |
scc | 1882 | drivers/char/scc.c | scc->kiss.persist = 42; /* 25% persistence */ /* was 25 */ |
scc | 1883 | drivers/char/scc.c | scc->kiss.slottime = 16*TPS/100; /* 160 ms */ |
scc | 1884 | drivers/char/scc.c | scc->kiss.tailtime = 4; /* minimal reasonable value */ |
scc | 1885 | drivers/char/scc.c | scc->kiss.fulldup = 0; /* CSMA */ |
scc | 1886 | drivers/char/scc.c | scc->kiss.waittime = 50*TPS/100; /* 500 ms */ |
scc | 1887 | drivers/char/scc.c | scc->kiss.maxkeyup = 10; /* 10 s */ |
scc | 1888 | drivers/char/scc.c | scc->kiss.mintime = 3; /* 3 s */ |
scc | 1889 | drivers/char/scc.c | scc->kiss.idletime = 30; /* 30 s */ |
scc | 1890 | drivers/char/scc.c | scc->kiss.maxdefer = 120; /* 2 min */ |
scc | 1891 | drivers/char/scc.c | scc->kiss.not_slip = 1; /* KISS mode */ |
scc | 1892 | drivers/char/scc.c | scc->kiss.softdcd = 0; /* hardware dcd */ |
scc | 1894 | drivers/char/scc.c | scc->kiss.txdelay = 10*TPS/100; /* 100 ms */ |
scc | 1895 | drivers/char/scc.c | scc->kiss.persist = 64; /* 25% persistence */ /* was 25 */ |
scc | 1896 | drivers/char/scc.c | scc->kiss.slottime = 8*TPS/100; /* 160 ms */ |
scc | 1897 | drivers/char/scc.c | scc->kiss.tailtime = 1; /* minimal reasonable value */ |
scc | 1898 | drivers/char/scc.c | scc->kiss.fulldup = 0; /* CSMA */ |
scc | 1899 | drivers/char/scc.c | scc->kiss.waittime = 50*TPS/100; /* 500 ms */ |
scc | 1900 | drivers/char/scc.c | scc->kiss.maxkeyup = 7; /* 7 s */ |
scc | 1901 | drivers/char/scc.c | scc->kiss.mintime = 3; /* 3 s */ |
scc | 1902 | drivers/char/scc.c | scc->kiss.idletime = 30; /* 30 s */ |
scc | 1903 | drivers/char/scc.c | scc->kiss.maxdefer = 120; /* 2 min */ |
scc | 1904 | drivers/char/scc.c | scc->kiss.not_slip = 1; /* KISS mode */ |
scc | 1905 | drivers/char/scc.c | scc->kiss.softdcd = 0; /* hardware dcd */ |
scc | 1908 | drivers/char/scc.c | scc->init = 1; |
scc | 1926 | drivers/char/scc.c | result = ((scc->wreg[R5] & RTS) ? TIOCM_RTS : 0) |
scc | 1927 | drivers/char/scc.c | | ((scc->wreg[R5] & DTR) ? TIOCM_DTR : 0) |
scc | 1928 | drivers/char/scc.c | | ((InReg(scc->ctrl,R0) & DCD) ? TIOCM_CAR : 0) |
scc | 1929 | drivers/char/scc.c | | ((InReg(scc->ctrl,R0) & CTS) ? TIOCM_CTS : 0); |
scc | 1940 | drivers/char/scc.c | scc->wreg[R5] |= DTR; |
scc | 1941 | drivers/char/scc.c | scc->wreg[R5] |= RTS; |
scc | 1944 | drivers/char/scc.c | scc->wreg[R5] &= ~DTR; |
scc | 1945 | drivers/char/scc.c | scc->wreg[R5] &= ~RTS; |
scc | 1951 | drivers/char/scc.c | scc->wreg[R5] |= DTR; |
scc | 1953 | drivers/char/scc.c | scc->wreg[R5] &= ~DTR; |
scc | 1955 | drivers/char/scc.c | scc->wreg[R5] |= RTS; |
scc | 1957 | drivers/char/scc.c | scc->wreg[R5] &= ~RTS; |
scc | 1963 | drivers/char/scc.c | if(scc->stat.tx_state == TXS_IDLE && !Running(t_idle)) |
scc | 1964 | drivers/char/scc.c | maxk_idle_timeout(scc); |
scc | 1977 | drivers/char/scc.c | memcpy_tofs((void *) arg, scc->tty->termios, sizeof(struct termios)); |
scc | 1988 | drivers/char/scc.c | memcpy_fromfs(scc->tty->termios, (void *) arg, sizeof(struct termios)); |
scc | 1989 | drivers/char/scc.c | scc_change_speed(scc); |
scc | 2001 | drivers/char/scc.c | scc->stat.used_buf = scc_count_used_buffers(&scc->stat.rx_alloc, |
scc | 2002 | drivers/char/scc.c | &scc->stat.tx_alloc); |
scc | 2004 | drivers/char/scc.c | memcpy_tofs((void *) arg, &scc->stat, sizeof(struct scc_stat)); |
scc | 2025 | drivers/char/scc.c | case PARAM_TXDELAY: r = CAST(scc->kiss.txdelay*TICKS); break; |
scc | 2026 | drivers/char/scc.c | case PARAM_PERSIST: r = CAST(scc->kiss.persist); break; |
scc | 2027 | drivers/char/scc.c | case PARAM_SLOTTIME: r = CAST(scc->kiss.slottime*TICKS); break; |
scc | 2028 | drivers/char/scc.c | case PARAM_TXTAIL: r = CAST(scc->kiss.tailtime*TICKS); break; |
scc | 2029 | drivers/char/scc.c | case PARAM_FULLDUP: r = CAST(scc->kiss.fulldup); break; |
scc | 2030 | drivers/char/scc.c | case PARAM_SOFTDCD: r = CAST(scc->kiss.softdcd); break; |
scc | 2031 | drivers/char/scc.c | case PARAM_DTR: r = CAST((scc->wreg[R5] & DTR)? 1:0); break; |
scc | 2032 | drivers/char/scc.c | case PARAM_RTS: r = CAST((scc->wreg[R5] & RTS)? 1:0); break; |
scc | 2033 | drivers/char/scc.c | case PARAM_SPEED: r = CAST(scc->modem.speed); break; |
scc | 2034 | drivers/char/scc.c | case PARAM_GROUP: r = CAST(scc->kiss.group); break; |
scc | 2035 | drivers/char/scc.c | case PARAM_IDLE: r = CAST(scc->kiss.idletime); break; |
scc | 2036 | drivers/char/scc.c | case PARAM_MIN: r = CAST(scc->kiss.mintime); break; |
scc | 2037 | drivers/char/scc.c | case PARAM_MAXKEY: r = CAST(scc->kiss.maxkeyup); break; |
scc | 2038 | drivers/char/scc.c | case PARAM_WAIT: r = CAST(scc->kiss.waittime); break; |
scc | 2039 | drivers/char/scc.c | case PARAM_MAXDEFER: r = CAST(scc->kiss.maxdefer); break; |
scc | 2040 | drivers/char/scc.c | case PARAM_TX: r = CAST(scc->kiss.tx_inhibit); break; |
scc | 2041 | drivers/char/scc.c | case PARAM_SLIP: r = CAST(!scc->kiss.not_slip); break; |
scc | 2062 | drivers/char/scc.c | case PARAM_TXDELAY: scc->kiss.txdelay=VAL; break; |
scc | 2063 | drivers/char/scc.c | case PARAM_PERSIST: scc->kiss.persist=Val; break; |
scc | 2064 | drivers/char/scc.c | case PARAM_SLOTTIME: scc->kiss.slottime=VAL; break; |
scc | 2065 | drivers/char/scc.c | case PARAM_TXTAIL: scc->kiss.tailtime=VAL; break; |
scc | 2066 | drivers/char/scc.c | case PARAM_FULLDUP: scc->kiss.fulldup=Val; break; |
scc | 2067 | drivers/char/scc.c | case PARAM_SOFTDCD: scc->kiss.softdcd=Val; break; |
scc | 2070 | drivers/char/scc.c | case PARAM_SPEED: scc->modem.speed=Val; break; |
scc | 2071 | drivers/char/scc.c | case PARAM_GROUP: scc->kiss.group=Val; break; |
scc | 2072 | drivers/char/scc.c | case PARAM_IDLE: scc->kiss.idletime=Val; break; |
scc | 2073 | drivers/char/scc.c | case PARAM_MIN: scc->kiss.mintime=SVAL; break; |
scc | 2074 | drivers/char/scc.c | case PARAM_MAXKEY: scc->kiss.maxkeyup=SVAL; break; |
scc | 2075 | drivers/char/scc.c | case PARAM_WAIT: scc->kiss.waittime=Val; break; |
scc | 2076 | drivers/char/scc.c | case PARAM_MAXDEFER: scc->kiss.maxdefer=SVAL; break; |
scc | 2077 | drivers/char/scc.c | case PARAM_TX: scc->kiss.tx_inhibit=Val; break; |
scc | 2078 | drivers/char/scc.c | case PARAM_SLIP: scc->kiss.not_slip=!Val; break; |
scc | 2107 | drivers/char/scc.c | static inline void check_tx_queue(register struct scc_channel *scc) |
scc | 2111 | drivers/char/scc.c | if (scc->stat.tx_queued > QUEUE_THRES) |
scc | 2113 | drivers/char/scc.c | if (scc->sndq1 == NULLBUF) |
scc | 2116 | drivers/char/scc.c | " (%d) but queue is empty\n", scc->stat.tx_queued); |
scc | 2118 | drivers/char/scc.c | scc->stat.tx_queued = 0; /* correct it */ |
scc | 2119 | drivers/char/scc.c | scc->stat.nospace = 54321; /* draw attention to it */ |
scc | 2123 | drivers/char/scc.c | bp = scc->sndq1->anext; /* don't use the one we currently use */ |
scc | 2125 | drivers/char/scc.c | while (bp && (scc->stat.tx_queued > QUEUE_HYST)) |
scc | 2128 | drivers/char/scc.c | scc->stat.tx_queued--; |
scc | 2129 | drivers/char/scc.c | scc->stat.nospace++; |
scc | 2132 | drivers/char/scc.c | scc->sndq1->anext = bp; |
scc | 2143 | drivers/char/scc.c | struct scc_channel * scc = tty->driver_data; |
scc | 2149 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_write")) |
scc | 2152 | drivers/char/scc.c | if (scc->kiss.tx_inhibit) return count; |
scc | 2154 | drivers/char/scc.c | check_tx_queue(scc); |
scc | 2173 | drivers/char/scc.c | if (kiss_decode(scc, *p++)) |
scc | 2175 | drivers/char/scc.c | scc->stat.nospace++; |
scc | 2189 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 2192 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_put_char")) |
scc | 2201 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 2203 | drivers/char/scc.c | scc_paranoia_check(scc, tty->device, "scc_flush_chars"); /* just to annoy the user... */ |
scc | 2212 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 2214 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_write_room")) |
scc | 2217 | drivers/char/scc.c | if (scc->stat.tx_alloc >= QUEUE_THRES) |
scc | 2228 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 2230 | drivers/char/scc.c | if (scc && scc->sndq2) |
scc | 2231 | drivers/char/scc.c | return scc->sndq2->cnt; |
scc | 2238 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 2240 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_flush_buffer")) |
scc | 2243 | drivers/char/scc.c | scc->stat.tx_kiss_state = KISS_IDLE; |
scc | 2253 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 2255 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_throttle")) |
scc | 2264 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 2266 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_unthrottle")) |
scc | 2274 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 2276 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_start")) |
scc | 2285 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 2287 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_stop")) |
scc | 130 | include/linux/scc.h | #define Running(k) (scc->k != TIMER_STOPPED) |
scc | 131 | include/linux/scc.h | #define Expired(k) (scc->k != TIMER_STOPPED) && (!(scc->k) || (--(scc->k) == 0)) |
scc | 132 | include/linux/scc.h | #define Stop_Timer(k) scc->k = TIMER_STOPPED |
scc | 271 | include/linux/scc.h | struct scc_channel *scc; |