tag | line | file | source code |
scc | 142 | arch/mips/kernel/signal.c | struct sigcontext_struct scc; |
scc | 144 | arch/mips/kernel/signal.c | #define scc_offset ((size_t)&((struct sc *)0)->scc) |
scc | 185 | arch/mips/kernel/signal.c | frame->scc.sc_at = regs->reg1; /* Assembler temporary */ |
scc | 186 | arch/mips/kernel/signal.c | frame->scc.sc_v0 = regs->reg2; /* Result registers */ |
scc | 187 | arch/mips/kernel/signal.c | frame->scc.sc_v1 = regs->reg3; |
scc | 188 | arch/mips/kernel/signal.c | frame->scc.sc_a0 = regs->reg4; /* Argument registers */ |
scc | 189 | arch/mips/kernel/signal.c | frame->scc.sc_a1 = regs->reg5; |
scc | 190 | arch/mips/kernel/signal.c | frame->scc.sc_a2 = regs->reg6; |
scc | 191 | arch/mips/kernel/signal.c | frame->scc.sc_a3 = regs->reg7; |
scc | 193 | arch/mips/kernel/signal.c | frame->scc.sc_t0 = regs->reg8; /* Caller saved */ |
scc | 194 | arch/mips/kernel/signal.c | frame->scc.sc_t1 = regs->reg9; |
scc | 195 | arch/mips/kernel/signal.c | frame->scc.sc_t2 = regs->reg10; |
scc | 196 | arch/mips/kernel/signal.c | frame->scc.sc_t3 = regs->reg11; |
scc | 197 | arch/mips/kernel/signal.c | frame->scc.sc_t4 = regs->reg12; |
scc | 198 | arch/mips/kernel/signal.c | frame->scc.sc_t5 = regs->reg13; |
scc | 199 | arch/mips/kernel/signal.c | frame->scc.sc_t6 = regs->reg14; |
scc | 200 | arch/mips/kernel/signal.c | frame->scc.sc_t7 = regs->reg15; |
scc | 202 | arch/mips/kernel/signal.c | frame->scc.sc_s0 = regs->reg16; /* Callee saved */ |
scc | 203 | arch/mips/kernel/signal.c | frame->scc.sc_s1 = regs->reg17; |
scc | 204 | arch/mips/kernel/signal.c | frame->scc.sc_s2 = regs->reg18; |
scc | 205 | arch/mips/kernel/signal.c | frame->scc.sc_s3 = regs->reg19; |
scc | 206 | arch/mips/kernel/signal.c | frame->scc.sc_s4 = regs->reg20; |
scc | 207 | arch/mips/kernel/signal.c | frame->scc.sc_s5 = regs->reg21; |
scc | 208 | arch/mips/kernel/signal.c | frame->scc.sc_s6 = regs->reg22; |
scc | 209 | arch/mips/kernel/signal.c | frame->scc.sc_s7 = regs->reg23; |
scc | 211 | arch/mips/kernel/signal.c | frame->scc.sc_t8 = regs->reg24; /* Caller saved */ |
scc | 212 | arch/mips/kernel/signal.c | frame->scc.sc_t9 = regs->reg25; |
scc | 217 | arch/mips/kernel/signal.c | frame->scc.sc_gp = regs->reg28; /* global pointer / s8 */ |
scc | 218 | arch/mips/kernel/signal.c | frame->scc.sc_sp = regs->reg29; /* old stack pointer */ |
scc | 219 | arch/mips/kernel/signal.c | frame->scc.sc_fp = regs->reg30; /* old frame pointer */ |
scc | 220 | arch/mips/kernel/signal.c | frame->scc.sc_ra = regs->reg31; /* old return address */ |
scc | 222 | arch/mips/kernel/signal.c | frame->scc.sc_epc = regs->cp0_epc; /* Program counter */ |
scc | 223 | arch/mips/kernel/signal.c | frame->scc.sc_cause = regs->cp0_cause; /* c0_epc register */ |
scc | 225 | arch/mips/kernel/signal.c | frame->scc.sc_oldmask = oldmask; |
scc | 176 | drivers/char/scc.c | static void scc_change_speed(struct scc_channel *scc); |
scc | 177 | drivers/char/scc.c | static void kiss_encode(struct scc_channel *scc); |
scc | 179 | drivers/char/scc.c | static void init_channel(struct scc_channel *scc); |
scc | 180 | drivers/char/scc.c | static void scc_key_trx (struct scc_channel *scc, char tx); |
scc | 181 | drivers/char/scc.c | static void scc_txint(register struct scc_channel *scc); |
scc | 182 | drivers/char/scc.c | static void scc_exint(register struct scc_channel *scc); |
scc | 183 | drivers/char/scc.c | static void scc_rxint(register struct scc_channel *scc); |
scc | 184 | drivers/char/scc.c | static void scc_spint(register struct scc_channel *scc); |
scc | 187 | drivers/char/scc.c | static void scc_init_timer(struct scc_channel *scc); |
scc | 245 | drivers/char/scc.c | wr(register struct scc_channel *scc, register unsigned char reg, register unsigned char val) |
scc | 247 | drivers/char/scc.c | OutReg(scc->ctrl, reg, (scc->wreg[reg] = val)); |
scc | 251 | drivers/char/scc.c | or(register struct scc_channel *scc, register unsigned char reg, register unsigned char val) |
scc | 253 | drivers/char/scc.c | OutReg(scc->ctrl, reg, (scc->wreg[reg] |= val)); |
scc | 257 | drivers/char/scc.c | cl(register struct scc_channel *scc, register unsigned char reg, register unsigned char val) |
scc | 259 | drivers/char/scc.c | OutReg(scc->ctrl, reg, (scc->wreg[reg] &= ~val)); |
scc | 515 | drivers/char/scc.c | scc_isr_dispatch(register struct scc_channel *scc, register int vector) |
scc | 519 | drivers/char/scc.c | case TXINT: scc_txint(scc); break; |
scc | 520 | drivers/char/scc.c | case EXINT: scc_exint(scc); break; |
scc | 521 | drivers/char/scc.c | case RXINT: scc_rxint(scc); break; |
scc | 522 | drivers/char/scc.c | case SPINT: scc_spint(scc); break; |
scc | 523 | drivers/char/scc.c | default : printk("scc_isr(): unknown interrupt status (addr %4.4x, state %2.2x)\n",scc->ctrl,vector); |
scc | 540 | drivers/char/scc.c | register struct scc_channel *scc; |
scc | 564 | drivers/char/scc.c | scc=&SCC_Info[(((vector>>1)&0x7c)^0x04) >> 2]; |
scc | 566 | drivers/char/scc.c | if (!scc->tty) break; |
scc | 568 | drivers/char/scc.c | scc_isr_dispatch(scc, vector); |
scc | 570 | drivers/char/scc.c | Outb(scc->ctrl,0x38); /* Reset Highest IUS" opcode to WR0 */ |
scc | 605 | drivers/char/scc.c | scc = &SCC_Info[(((vector >> 1) & 0x7c) ^ 0x04) >> 2]; |
scc | 607 | drivers/char/scc.c | if (!scc->tty) break; |
scc | 611 | drivers/char/scc.c | scc_isr_dispatch(scc, vector); |
scc | 628 | drivers/char/scc.c | static inline void prepare_next_txframe(register struct scc_channel *scc) |
scc | 630 | drivers/char/scc.c | if ((scc->tbp = scc->sndq)) |
scc | 632 | drivers/char/scc.c | scc->sndq = scc->sndq->anext; |
scc | 633 | drivers/char/scc.c | scc->stat.tx_state = TXS_NEWFRAME; |
scc | 636 | drivers/char/scc.c | scc->stat.tx_state = TXS_BUSY; |
scc | 637 | drivers/char/scc.c | scc->t_tail = scc->kiss.tailtime; |
scc | 644 | drivers/char/scc.c | scc_txint(register struct scc_channel *scc) |
scc | 648 | drivers/char/scc.c | scc->stat.txints++; |
scc | 650 | drivers/char/scc.c | bp = scc->tbp; |
scc | 657 | drivers/char/scc.c | if (--scc->stat.tx_queued < 0) |
scc | 658 | drivers/char/scc.c | scc->stat.tx_queued = 0; |
scc | 660 | drivers/char/scc.c | Outb(scc->ctrl,RES_Tx_P); /* reset pending int */ |
scc | 661 | drivers/char/scc.c | cl(scc,R10,ABUNDER); /* frame complete, allow CRC transmit */ |
scc | 662 | drivers/char/scc.c | prepare_next_txframe(scc); |
scc | 666 | drivers/char/scc.c | if (scc->stat.tx_state == TXS_NEWFRAME) |
scc | 668 | drivers/char/scc.c | Outb(scc->ctrl, RES_Tx_CRC); /* reset CRC generator */ |
scc | 669 | drivers/char/scc.c | or(scc,R10,ABUNDER); /* re-install underrun protection */ |
scc | 670 | drivers/char/scc.c | Outb(scc->data,bp->data[bp->in_use++]); |
scc | 672 | drivers/char/scc.c | if (!scc->enhanced) /* reset EOM latch */ |
scc | 673 | drivers/char/scc.c | Outb(scc->ctrl, RES_EOM_L); |
scc | 675 | drivers/char/scc.c | scc->stat.tx_state = TXS_ACTIVE;/* next byte... */ |
scc | 677 | drivers/char/scc.c | Outb(scc->data,bp->data[bp->in_use++]); |
scc | 681 | drivers/char/scc.c | scc->tbp=bp; /* store buffer address */ |
scc | 688 | drivers/char/scc.c | scc_toss_buffer(register struct scc_channel *scc) |
scc | 692 | drivers/char/scc.c | if((bp = scc->rbp) != NULLBUF) |
scc | 696 | drivers/char/scc.c | scc->rbp1 = bp; /* Don't throw this one away */ |
scc | 703 | drivers/char/scc.c | flush_FIFO(register struct scc_channel *scc) |
scc | 708 | drivers/char/scc.c | Inb(scc->data); |
scc | 710 | drivers/char/scc.c | if(scc->rbp != NULLBUF) /* did we receive something? */ |
scc | 712 | drivers/char/scc.c | if(scc->rbp->next != NULLBUF || scc->rbp->cnt > 0) |
scc | 713 | drivers/char/scc.c | scc->stat.rxerrs++; /* then count it as an error */ |
scc | 715 | drivers/char/scc.c | scc_toss_buffer(scc); /* throw away buffer */ |
scc | 723 | drivers/char/scc.c | scc_exint(register struct scc_channel *scc) |
scc | 727 | drivers/char/scc.c | scc->stat.exints++; |
scc | 729 | drivers/char/scc.c | status = InReg(scc->ctrl,R0); |
scc | 730 | drivers/char/scc.c | changes = status ^ scc->status; |
scc | 736 | drivers/char/scc.c | flush_FIFO(scc); |
scc | 746 | drivers/char/scc.c | if (scc->modem.clocksrc != CLK_EXTERNAL) |
scc | 747 | drivers/char/scc.c | OutReg(scc->ctrl,R14,SEARCH|scc->wreg[R14]); /* DPLL: enter search mode */ |
scc | 749 | drivers/char/scc.c | or(scc,R3,ENT_HM|RxENABLE); /* enable the receiver, hunt mode */ |
scc | 751 | drivers/char/scc.c | cl(scc,R3,ENT_HM|RxENABLE); /* disable the receiver */ |
scc | 752 | drivers/char/scc.c | flush_FIFO(scc); |
scc | 761 | drivers/char/scc.c | if (!Running(t_txdel) && scc->kiss.txdelay == 0) /* zero TXDELAY = wait for CTS */ |
scc | 762 | drivers/char/scc.c | scc->t_txdel = 0; /* kick it! */ |
scc | 766 | drivers/char/scc.c | if ((scc->stat.tx_state == TXS_ACTIVE) && (status & TxEOM)) |
scc | 768 | drivers/char/scc.c | scc->stat.tx_under++; /* oops, an underrun! count 'em */ |
scc | 769 | drivers/char/scc.c | Outb(scc->ctrl, RES_Tx_P); |
scc | 770 | drivers/char/scc.c | Outb(scc->ctrl, RES_EXT_INT); /* reset ext/status interrupts */ |
scc | 771 | drivers/char/scc.c | scc->t_maxk = 1; |
scc | 772 | drivers/char/scc.c | scc->tbp = scc_free_chain(scc->tbp, BT_TRANSMIT); |
scc | 774 | drivers/char/scc.c | if (--scc->stat.tx_queued < 0) scc->stat.tx_queued = 0; |
scc | 775 | drivers/char/scc.c | or(scc,R10,ABUNDER); |
scc | 780 | drivers/char/scc.c | scc->stat.tx_under = 9999; /* errr... yes. */ |
scc | 781 | drivers/char/scc.c | Outb(scc->ctrl, RES_Tx_P); /* just to be sure */ |
scc | 782 | drivers/char/scc.c | scc->t_maxk = 1; |
scc | 783 | drivers/char/scc.c | scc->tbp = scc_free_chain(scc->tbp, BT_TRANSMIT); |
scc | 784 | drivers/char/scc.c | if (--scc->stat.tx_queued < 0) scc->stat.tx_queued = 0; |
scc | 785 | drivers/char/scc.c | scc->kiss.tx_inhibit = 1; /* don't try it again! */ |
scc | 789 | drivers/char/scc.c | scc->status = status; |
scc | 790 | drivers/char/scc.c | Outb(scc->ctrl,RES_EXT_INT); |
scc | 796 | drivers/char/scc.c | scc_rxint(register struct scc_channel *scc) |
scc | 800 | drivers/char/scc.c | scc->stat.rxints++; |
scc | 802 | drivers/char/scc.c | if( Running(t_maxk) && !(scc->kiss.fulldup)) |
scc | 804 | drivers/char/scc.c | Inb(scc->data); /* discard char */ |
scc | 805 | drivers/char/scc.c | or(scc,R3,ENT_HM); /* enter hunt mode for next flag */ |
scc | 809 | drivers/char/scc.c | if ((bp = scc->rbp1) == NULLBUF || bp->cnt >= bp->size) |
scc | 811 | drivers/char/scc.c | if (scc->rbp == NULLBUF) |
scc | 814 | drivers/char/scc.c | scc->rbp = scc->rbp1 = bp; |
scc | 819 | drivers/char/scc.c | scc_append_to_chain(&scc->rbp, bp); |
scc | 820 | drivers/char/scc.c | scc->rbp1 = bp; |
scc | 825 | drivers/char/scc.c | Inb(scc->data); /* discard character */ |
scc | 826 | drivers/char/scc.c | or(scc,R3,ENT_HM); /* enter hunt mode */ |
scc | 827 | drivers/char/scc.c | scc_toss_buffer(scc); /* throw away buffers */ |
scc | 828 | drivers/char/scc.c | scc->stat.nospace++; /* and count this error */ |
scc | 834 | drivers/char/scc.c | bp->data[bp->cnt++] = Inb(scc->data); |
scc | 841 | drivers/char/scc.c | kick_rx_timer(register struct scc_channel *scc) |
scc | 850 | drivers/char/scc.c | rx_timer_cb.scc = scc; |
scc | 861 | drivers/char/scc.c | scc_spint(register struct scc_channel *scc) |
scc | 866 | drivers/char/scc.c | scc->stat.spints++; |
scc | 868 | drivers/char/scc.c | status = InReg(scc->ctrl,R1); /* read receiver status */ |
scc | 870 | drivers/char/scc.c | Inb(scc->data); /* throw away Rx byte */ |
scc | 874 | drivers/char/scc.c | scc->stat.rx_over++; /* count them */ |
scc | 875 | drivers/char/scc.c | or(scc,R3,ENT_HM); /* enter hunt mode for next flag */ |
scc | 876 | drivers/char/scc.c | scc_toss_buffer(scc); /* rewind the buffer and toss */ |
scc | 879 | drivers/char/scc.c | if(status & END_FR && scc->rbp != NULLBUF) /* end of frame */ |
scc | 883 | drivers/char/scc.c | if (!(status & CRC_ERR) && (status & 0xe) == RES8 && scc->rbp->cnt) |
scc | 887 | drivers/char/scc.c | for (bp = scc->rbp; bp->next != NULLBUF; bp = bp->next) ; |
scc | 890 | drivers/char/scc.c | scc_enqueue(&scc->rcvq,scc->rbp); |
scc | 891 | drivers/char/scc.c | scc->rbp = scc->rbp1 = NULLBUF; |
scc | 892 | drivers/char/scc.c | scc->stat.rxframes++; |
scc | 893 | drivers/char/scc.c | scc->stat.rx_queued++; |
scc | 894 | drivers/char/scc.c | kick_rx_timer(scc); |
scc | 896 | drivers/char/scc.c | scc_toss_buffer(scc); /* throw away frame */ |
scc | 897 | drivers/char/scc.c | scc->stat.rxerrs++; |
scc | 901 | drivers/char/scc.c | Outb(scc->ctrl,ERR_RES); |
scc | 912 | drivers/char/scc.c | static inline void set_brg(register struct scc_channel *scc, unsigned int tc) |
scc | 918 | drivers/char/scc.c | cl(scc,R14,BRENABL); /* disable baudrate generator */ |
scc | 919 | drivers/char/scc.c | wr(scc,R12,tc & 255); /* brg rate LOW */ |
scc | 920 | drivers/char/scc.c | wr(scc,R13,tc >> 8); /* brg rate HIGH */ |
scc | 921 | drivers/char/scc.c | or(scc,R14,BRENABL); /* enable baudrate generator */ |
scc | 926 | drivers/char/scc.c | static inline void set_speed(register struct scc_channel *scc) |
scc | 928 | drivers/char/scc.c | set_brg(scc, (unsigned) (Clock / (scc->modem.speed * 64)) - 2); |
scc | 934 | drivers/char/scc.c | static inline void init_brg(register struct scc_channel *scc) |
scc | 936 | drivers/char/scc.c | wr(scc, R14, BRSRC); /* BRG source = PCLK */ |
scc | 937 | drivers/char/scc.c | OutReg(scc->ctrl, R14, SSBR|scc->wreg[R14]); /* DPLL source = BRG */ |
scc | 938 | drivers/char/scc.c | OutReg(scc->ctrl, R14, SNRZI|scc->wreg[R14]); /* DPLL NRZI mode */ |
scc | 942 | drivers/char/scc.c | init_channel(register struct scc_channel *scc) |
scc | 948 | drivers/char/scc.c | wr(scc,R1,0); /* no W/REQ operation */ |
scc | 949 | drivers/char/scc.c | wr(scc,R3,Rx8|RxCRC_ENAB); /* RX 8 bits/char, CRC, disabled */ |
scc | 950 | drivers/char/scc.c | wr(scc,R4,X1CLK|SDLC); /* *1 clock, SDLC mode */ |
scc | 951 | drivers/char/scc.c | wr(scc,R5,Tx8|DTR|TxCRC_ENAB); /* TX 8 bits/char, disabled, DTR */ |
scc | 952 | drivers/char/scc.c | wr(scc,R6,0); /* SDLC address zero (not used) */ |
scc | 953 | drivers/char/scc.c | wr(scc,R7,FLAG); /* SDLC flag value */ |
scc | 954 | drivers/char/scc.c | wr(scc,R10,(scc->modem.nrz? NRZ : NRZI)|CRCPS|ABUNDER); /* abort on underrun, preset CRC generator, NRZ(I) */ |
scc | 955 | drivers/char/scc.c | wr(scc,R14, 0); |
scc | 984 | drivers/char/scc.c | switch(scc->modem.clocksrc) |
scc | 987 | drivers/char/scc.c | wr(scc, R11, RCDPLL|TCDPLL|TRxCOI|TRxCDP); |
scc | 988 | drivers/char/scc.c | init_brg(scc); |
scc | 992 | drivers/char/scc.c | wr(scc, R11, ((Board & BAYCOM)? TRxCDP : TRxCBR) | RCDPLL|TCRTxCP|TRxCOI); |
scc | 993 | drivers/char/scc.c | init_brg(scc); |
scc | 997 | drivers/char/scc.c | wr(scc, R11, (Board & BAYCOM)? RCTRxCP|TCRTxCP : RCRTxCP|TCTRxCP); |
scc | 998 | drivers/char/scc.c | OutReg(scc->ctrl, R14, DISDPLL); |
scc | 1004 | drivers/char/scc.c | wr(scc,R15,((Board & BAYCOM) ? 0 : CTSIE)|BRKIE|DCDIE|TxUIE); |
scc | 1006 | drivers/char/scc.c | if(scc->enhanced) |
scc | 1008 | drivers/char/scc.c | or(scc,R15,SHDLCE|FIFOE); /* enable FIFO, SDLC/HDLC Enhancements (From now R7 is R7') */ |
scc | 1009 | drivers/char/scc.c | wr(scc,R7,AUTOEOM); |
scc | 1012 | drivers/char/scc.c | if((InReg(scc->ctrl,R0)) & DCD) /* DCD is now ON */ |
scc | 1014 | drivers/char/scc.c | if (scc->modem.clocksrc != CLK_EXTERNAL) |
scc | 1015 | drivers/char/scc.c | or(scc,R14, SEARCH); |
scc | 1017 | drivers/char/scc.c | or(scc,R3,ENT_HM|RxENABLE); /* enable the receiver, hunt mode */ |
scc | 1020 | drivers/char/scc.c | Outb(scc->ctrl,RES_EXT_INT); /* reset ext/status interrupts */ |
scc | 1021 | drivers/char/scc.c | Outb(scc->ctrl,RES_EXT_INT); /* must be done twice */ |
scc | 1023 | drivers/char/scc.c | scc->status = InReg(scc->ctrl,R0); /* read initial status */ |
scc | 1025 | drivers/char/scc.c | or(scc,R1,INT_ALL_Rx|TxINT_ENAB|EXT_INT_ENAB); /* enable interrupts */ |
scc | 1026 | drivers/char/scc.c | or(scc,R9,MIE); /* master interrupt enable */ |
scc | 1030 | drivers/char/scc.c | set_speed(scc); |
scc | 1045 | drivers/char/scc.c | scc_key_trx(struct scc_channel *scc, char tx) |
scc | 1049 | drivers/char/scc.c | if (scc->modem.speed < baud_table[1]) |
scc | 1050 | drivers/char/scc.c | scc->modem.speed = 1200; |
scc | 1053 | drivers/char/scc.c | Outb(scc->ctrl + 4, Option | (tx? 0x80 : 0)); |
scc | 1055 | drivers/char/scc.c | time_const = (unsigned) (Clock / (scc->modem.speed * (tx? 2:64))) - 2; |
scc | 1057 | drivers/char/scc.c | if (scc->modem.clocksrc == CLK_DPLL) |
scc | 1061 | drivers/char/scc.c | cl(scc,R3,RxENABLE|ENT_HM); /* then switch off receiver */ |
scc | 1063 | drivers/char/scc.c | set_brg(scc, time_const); /* reprogram baudrate generator */ |
scc | 1066 | drivers/char/scc.c | wr(scc, R11, RCDPLL|TCBR|TRxCOI|TRxCBR); |
scc | 1068 | drivers/char/scc.c | or(scc,R5,RTS|TxENAB); /* set the RTS line and enable TX */ |
scc | 1070 | drivers/char/scc.c | cl(scc,R5,RTS|TxENAB); |
scc | 1072 | drivers/char/scc.c | set_brg(scc, time_const); /* reprogram baudrate generator */ |
scc | 1075 | drivers/char/scc.c | wr(scc, R11, RCDPLL|TCDPLL|TRxCOI|TRxCDP); |
scc | 1077 | drivers/char/scc.c | or(scc,R3,RxENABLE|ENT_HM); |
scc | 1081 | drivers/char/scc.c | or(scc,R5,RTS|TxENAB); /* enable tx */ |
scc | 1083 | drivers/char/scc.c | cl(scc,R5,RTS|TxENAB); /* disable tx */ |
scc | 1092 | drivers/char/scc.c | static inline int is_grouped(register struct scc_channel *scc) |
scc | 1098 | drivers/char/scc.c | grp1 = scc->kiss.group; |
scc | 1105 | drivers/char/scc.c | if (scc2 == scc || !(scc2->tty && grp2)) |
scc | 1121 | drivers/char/scc.c | static inline void dw_slot_timeout(register struct scc_channel *scc) |
scc | 1123 | drivers/char/scc.c | scc->t_dwait = TIMER_STOPPED; |
scc | 1124 | drivers/char/scc.c | scc->t_slot = TIMER_STOPPED; |
scc | 1126 | drivers/char/scc.c | if (!scc->kiss.fulldup) |
scc | 1130 | 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 | 1132 | drivers/char/scc.c | if (scc->t_mbusy == TIMER_STOPPED) |
scc | 1133 | drivers/char/scc.c | scc->t_mbusy = TPS * scc->kiss.maxdefer; |
scc | 1135 | drivers/char/scc.c | scc->t_slot = scc->kiss.slottime; |
scc | 1141 | drivers/char/scc.c | if ( !(scc->wreg[R5] & RTS) ) |
scc | 1143 | drivers/char/scc.c | scc->t_txdel = scc->kiss.txdelay; |
scc | 1144 | drivers/char/scc.c | scc_key_trx(scc, TX_ON); |
scc | 1146 | drivers/char/scc.c | scc->t_txdel = 0; |
scc | 1153 | drivers/char/scc.c | static inline void txdel_timeout(register struct scc_channel *scc) |
scc | 1155 | drivers/char/scc.c | scc->t_txdel = TIMER_STOPPED; |
scc | 1157 | drivers/char/scc.c | scc->t_maxk = TPS * scc->kiss.maxkeyup; |
scc | 1158 | drivers/char/scc.c | prepare_next_txframe(scc); |
scc | 1160 | drivers/char/scc.c | if (scc->stat.tx_state != TXS_BUSY) |
scc | 1161 | drivers/char/scc.c | scc_txint(scc); |
scc | 1166 | drivers/char/scc.c | static inline void tail_timeout(register struct scc_channel *scc) |
scc | 1168 | drivers/char/scc.c | scc->t_tail = TIMER_STOPPED; |
scc | 1178 | drivers/char/scc.c | if (scc->kiss.fulldup < 2) |
scc | 1180 | drivers/char/scc.c | if (scc->sndq) /* we had a timeout? */ |
scc | 1182 | drivers/char/scc.c | scc->stat.tx_state = TXS_BUSY; |
scc | 1183 | drivers/char/scc.c | scc->t_dwait = TPS * scc->kiss.mintime; /* try again */ |
scc | 1186 | drivers/char/scc.c | scc->stat.tx_state = TXS_IDLE; |
scc | 1187 | drivers/char/scc.c | scc->t_maxk = TIMER_STOPPED; |
scc | 1188 | drivers/char/scc.c | scc_key_trx(scc, TX_OFF); |
scc | 1192 | drivers/char/scc.c | if (scc->sndq) /* maxkeyup expired */ /* ?! */ |
scc | 1194 | drivers/char/scc.c | scc->stat.tx_state = TXS_BUSY; |
scc | 1195 | drivers/char/scc.c | scc->t_txdel = TPS * scc->kiss.waittime; |
scc | 1199 | drivers/char/scc.c | scc->t_idle = TPS * scc->kiss.idletime; |
scc | 1203 | drivers/char/scc.c | static inline void busy_timeout(register struct scc_channel *scc) |
scc | 1208 | drivers/char/scc.c | bp = scc->sndq; |
scc | 1212 | drivers/char/scc.c | scc->sndq = NULLBUF; |
scc | 1213 | drivers/char/scc.c | scc->stat.tx_state = TXS_IDLE; |
scc | 1216 | drivers/char/scc.c | scc->t_txdel = scc->kiss.txdelay; /* brute force ... */ |
scc | 1218 | drivers/char/scc.c | scc->t_mbusy = TIMER_STOPPED; |
scc | 1223 | drivers/char/scc.c | static inline void maxk_idle_timeout(register struct scc_channel *scc) |
scc | 1225 | drivers/char/scc.c | scc->t_maxk = TIMER_STOPPED; |
scc | 1226 | drivers/char/scc.c | scc->t_idle = TIMER_STOPPED; |
scc | 1228 | drivers/char/scc.c | scc->stat.tx_state = TXS_BUSY; |
scc | 1229 | drivers/char/scc.c | scc->t_tail = scc->kiss.tailtime; |
scc | 1232 | drivers/char/scc.c | static inline void check_rcv_queue(register struct scc_channel *scc) |
scc | 1236 | drivers/char/scc.c | if (scc->stat.rx_queued > QUEUE_THRES) |
scc | 1238 | drivers/char/scc.c | if (scc->rcvq == NULLBUF) |
scc | 1241 | drivers/char/scc.c | " (%d) but queue is empty\n", scc->stat.rx_queued); |
scc | 1243 | drivers/char/scc.c | scc->stat.rx_queued = 0; /* correct it */ |
scc | 1244 | drivers/char/scc.c | scc->stat.nospace = 12345; /* draw attention to it */ |
scc | 1248 | drivers/char/scc.c | bp = scc->rcvq->anext; /* don't use the one we currently use */ |
scc | 1250 | drivers/char/scc.c | while (bp && (scc->stat.rx_queued > QUEUE_HYST)) |
scc | 1253 | drivers/char/scc.c | scc->stat.rx_queued--; |
scc | 1254 | drivers/char/scc.c | scc->stat.nospace++; |
scc | 1257 | drivers/char/scc.c | scc->rcvq->anext = bp; |
scc | 1264 | drivers/char/scc.c | register struct scc_channel *scc; |
scc | 1271 | drivers/char/scc.c | scc = &SCC_Info[chan]; |
scc | 1273 | drivers/char/scc.c | if (scc->tty && scc->init) |
scc | 1275 | drivers/char/scc.c | kiss_encode(scc); |
scc | 1279 | drivers/char/scc.c | check_rcv_queue(scc); |
scc | 1283 | drivers/char/scc.c | if (Expired(t_dwait)) dw_slot_timeout(scc) ; else |
scc | 1284 | drivers/char/scc.c | if (Expired(t_slot)) dw_slot_timeout(scc) ; else |
scc | 1285 | drivers/char/scc.c | if (Expired(t_txdel)) txdel_timeout(scc) ; else |
scc | 1286 | drivers/char/scc.c | if (Expired(t_tail)) tail_timeout(scc) ; |
scc | 1290 | drivers/char/scc.c | if (Expired(t_mbusy)) busy_timeout(scc); |
scc | 1291 | drivers/char/scc.c | if (Expired(t_maxk)) maxk_idle_timeout(scc); |
scc | 1292 | drivers/char/scc.c | if (Expired(t_idle)) maxk_idle_timeout(scc); |
scc | 1309 | drivers/char/scc.c | scc_init_timer(struct scc_channel *scc) |
scc | 1322 | drivers/char/scc.c | scc->stat.tx_state = TXS_IDLE; |
scc | 1333 | drivers/char/scc.c | kiss_encode(rx_timer_cb.scc); |
scc | 1357 | drivers/char/scc.c | kiss_set_param(struct scc_channel *scc,char cmd, unsigned int val) |
scc | 1365 | drivers/char/scc.c | scc->kiss.txdelay = VAL; break; |
scc | 1367 | drivers/char/scc.c | scc->kiss.persist = val; break; |
scc | 1369 | drivers/char/scc.c | scc->kiss.slottime = VAL; break; |
scc | 1371 | drivers/char/scc.c | scc->kiss.tailtime = VAL; break; |
scc | 1373 | drivers/char/scc.c | scc->kiss.fulldup = val; break; |
scc | 1375 | drivers/char/scc.c | scc->kiss.waittime = VAL; break; |
scc | 1377 | drivers/char/scc.c | scc->kiss.maxkeyup = SVAL; break; |
scc | 1379 | drivers/char/scc.c | scc->kiss.mintime = SVAL; break; |
scc | 1381 | drivers/char/scc.c | scc->kiss.idletime = val; break; |
scc | 1383 | drivers/char/scc.c | scc->kiss.maxdefer = SVAL; break; |
scc | 1385 | drivers/char/scc.c | scc->kiss.group = val; break; |
scc | 1387 | drivers/char/scc.c | scc->kiss.tx_inhibit = val; |
scc | 1389 | drivers/char/scc.c | scc->kiss.softdcd = val; |
scc | 1400 | drivers/char/scc.c | static void kiss_interpret_frame(struct scc_channel * scc) |
scc | 1405 | drivers/char/scc.c | if (scc->sndq1->cnt < 2) |
scc | 1407 | drivers/char/scc.c | if (scc->sndq1) |
scc | 1408 | drivers/char/scc.c | scc_free_chain(scc->sndq1, BT_TRANSMIT); |
scc | 1410 | drivers/char/scc.c | scc->sndq1 = NULLBUF; |
scc | 1412 | drivers/char/scc.c | scc->sndq2 = NULLBUF; |
scc | 1418 | drivers/char/scc.c | if (scc->kiss.not_slip) |
scc | 1420 | drivers/char/scc.c | kisscmd = scc->sndq1->data[scc->sndq1->in_use++]; |
scc | 1421 | drivers/char/scc.c | scc->sndq1->cnt--; |
scc | 1428 | drivers/char/scc.c | if (scc->sndq1->cnt > 2) |
scc | 1429 | drivers/char/scc.c | scc->sndq1->cnt -= 2; |
scc | 1432 | drivers/char/scc.c | scc_free_chain(scc->sndq1, BT_TRANSMIT); |
scc | 1433 | drivers/char/scc.c | scc->sndq2 = NULLBUF; |
scc | 1444 | drivers/char/scc.c | kiss_set_param(scc, kisscmd, scc->sndq1->data[scc->sndq1->in_use]); |
scc | 1445 | drivers/char/scc.c | scc->sndq1->cnt=0; |
scc | 1446 | drivers/char/scc.c | scc->sndq1->in_use=0; |
scc | 1448 | drivers/char/scc.c | scc_free_chain(scc->sndq1, BT_TRANSMIT); |
scc | 1449 | drivers/char/scc.c | scc->sndq2 = NULLBUF; |
scc | 1453 | drivers/char/scc.c | scc_enqueue(&scc->sndq,scc->sndq1); /* scc_enqueue packet */ |
scc | 1454 | drivers/char/scc.c | scc->stat.txframes++; |
scc | 1455 | drivers/char/scc.c | scc->stat.tx_queued++; |
scc | 1456 | drivers/char/scc.c | scc->sndq2 = NULLBUF; /* acquire a new buffer next time */ |
scc | 1460 | drivers/char/scc.c | if(scc->stat.tx_state == TXS_IDLE) |
scc | 1462 | drivers/char/scc.c | scc_init_timer(scc); |
scc | 1463 | drivers/char/scc.c | scc->stat.tx_state = TXS_BUSY; |
scc | 1464 | drivers/char/scc.c | scc->t_dwait = (scc->kiss.fulldup? 0:scc->kiss.waittime); |
scc | 1470 | drivers/char/scc.c | static void kiss_store_byte(struct scc_channel *scc, unsigned char ch) |
scc | 1472 | drivers/char/scc.c | if (scc->sndq2 == NULLBUF) return; |
scc | 1474 | drivers/char/scc.c | if(scc->sndq2->cnt == scc->sndq2->size) /* buffer full? */ |
scc | 1476 | drivers/char/scc.c | if((scc->sndq2 = scc_get_buffer(BT_TRANSMIT)) == NULLBUF) |
scc | 1481 | drivers/char/scc.c | scc_append_to_chain(&scc->sndq1,scc->sndq2); /* add buffer */ |
scc | 1484 | drivers/char/scc.c | scc->sndq2->data[scc->sndq2->cnt++] = ch; |
scc | 1487 | drivers/char/scc.c | static inline int kiss_decode(struct scc_channel *scc, unsigned char ch) |
scc | 1489 | drivers/char/scc.c | switch (scc->stat.tx_kiss_state) |
scc | 1494 | drivers/char/scc.c | if (!(scc->sndq2 = scc->sndq1 = scc_get_buffer(BT_TRANSMIT))) |
scc | 1497 | drivers/char/scc.c | scc->stat.tx_kiss_state = KISS_DATA; |
scc | 1498 | drivers/char/scc.c | } else scc->stat.txerrs++; |
scc | 1503 | drivers/char/scc.c | scc->stat.tx_kiss_state = KISS_ESCAPE; |
scc | 1506 | drivers/char/scc.c | kiss_interpret_frame(scc); |
scc | 1507 | drivers/char/scc.c | scc->stat.tx_kiss_state = KISS_IDLE; |
scc | 1509 | drivers/char/scc.c | else kiss_store_byte(scc, ch); |
scc | 1515 | drivers/char/scc.c | kiss_store_byte(scc, FEND); |
scc | 1516 | drivers/char/scc.c | scc->stat.tx_kiss_state = KISS_DATA; |
scc | 1520 | drivers/char/scc.c | kiss_store_byte(scc, FESC); |
scc | 1521 | drivers/char/scc.c | scc->stat.tx_kiss_state = KISS_DATA; |
scc | 1525 | drivers/char/scc.c | scc_free_chain(scc->sndq1, BT_TRANSMIT); |
scc | 1526 | drivers/char/scc.c | scc->sndq2 = NULLBUF; |
scc | 1527 | drivers/char/scc.c | scc->stat.txerrs++; |
scc | 1528 | drivers/char/scc.c | scc->stat.tx_kiss_state = KISS_IDLE; |
scc | 1541 | drivers/char/scc.c | kiss_encode(register struct scc_channel *scc) |
scc | 1544 | drivers/char/scc.c | struct tty_struct * tty = scc->tty; |
scc | 1548 | drivers/char/scc.c | if(!scc->rcvq) |
scc | 1550 | drivers/char/scc.c | scc->stat.rx_kiss_state = KISS_IDLE; |
scc | 1558 | drivers/char/scc.c | if (scc->rcvq->cnt) |
scc | 1560 | drivers/char/scc.c | bp = scc->rcvq; |
scc | 1562 | drivers/char/scc.c | if (scc->stat.rx_kiss_state == KISS_IDLE) |
scc | 1566 | drivers/char/scc.c | if (scc->kiss.not_slip) |
scc | 1569 | drivers/char/scc.c | scc->stat.rx_kiss_state = KISS_RXFRAME; |
scc | 1591 | drivers/char/scc.c | while (!scc->rcvq->cnt) |
scc | 1593 | drivers/char/scc.c | bp = scc->rcvq->next; /* next buffer */ |
scc | 1594 | drivers/char/scc.c | bp2 = scc->rcvq->anext; /* next packet */ |
scc | 1597 | drivers/char/scc.c | scc_return_buffer(scc->rcvq, BT_RECEIVE); |
scc | 1601 | drivers/char/scc.c | scc->rcvq = bp2; |
scc | 1603 | drivers/char/scc.c | if (--scc->stat.rx_queued < 0) |
scc | 1604 | drivers/char/scc.c | scc->stat.rx_queued = 0; |
scc | 1606 | drivers/char/scc.c | if (scc->stat.rx_kiss_state == KISS_RXFRAME) /* new packet? */ |
scc | 1609 | drivers/char/scc.c | scc->stat.rx_kiss_state = KISS_IDLE; /* generate FEND for new frame */ |
scc | 1616 | drivers/char/scc.c | } else scc->rcvq = bp; /* next buffer */ |
scc | 1636 | drivers/char/scc.c | struct scc_channel *scc; |
scc | 1653 | drivers/char/scc.c | scc=&SCC_Info[2*chip]; |
scc | 1654 | drivers/char/scc.c | if (!scc->ctrl) continue; |
scc | 1660 | drivers/char/scc.c | Outb(scc->ctrl, 0); |
scc | 1661 | drivers/char/scc.c | OutReg(scc->ctrl,R9,FHWRES); /* force hardware reset */ |
scc | 1663 | drivers/char/scc.c | wr(scc, R2, chip*16); /* interrupt vector */ |
scc | 1664 | drivers/char/scc.c | wr(scc, R9, VIS); /* vector includes status */ |
scc | 1684 | drivers/char/scc.c | static inline int scc_paranoia_check(struct scc_channel *scc, kdev_t device, |
scc | 1693 | drivers/char/scc.c | if (!scc->init) |
scc | 1698 | drivers/char/scc.c | if (scc->magic != SCC_MAGIC) { |
scc | 1712 | drivers/char/scc.c | struct scc_channel *scc; |
scc | 1719 | drivers/char/scc.c | scc = &SCC_Info[chan]; |
scc | 1721 | drivers/char/scc.c | tty->driver_data = scc; |
scc | 1727 | drivers/char/scc.c | if (scc->magic != SCC_MAGIC) |
scc | 1735 | drivers/char/scc.c | if(scc->tty != NULL) |
scc | 1737 | drivers/char/scc.c | scc->tty_opened++; |
scc | 1741 | drivers/char/scc.c | if(!scc->init) return 0; |
scc | 1743 | drivers/char/scc.c | scc->tty = tty; |
scc | 1744 | drivers/char/scc.c | init_channel(scc); |
scc | 1746 | drivers/char/scc.c | scc->stat.tx_kiss_state = KISS_IDLE; /* don't change this... */ |
scc | 1747 | drivers/char/scc.c | scc->stat.rx_kiss_state = KISS_IDLE; /* ...or this */ |
scc | 1749 | drivers/char/scc.c | scc_init_timer(scc); |
scc | 1764 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 1767 | drivers/char/scc.c | if (!scc || (scc->magic != SCC_MAGIC)) |
scc | 1770 | drivers/char/scc.c | if(scc->tty_opened) |
scc | 1772 | drivers/char/scc.c | scc->tty_opened--; |
scc | 1780 | drivers/char/scc.c | Outb(scc->ctrl,0); /* Make sure pointer is written */ |
scc | 1781 | drivers/char/scc.c | wr(scc,R1,0); /* disable interrupts */ |
scc | 1782 | drivers/char/scc.c | wr(scc,R3,0); |
scc | 1784 | drivers/char/scc.c | scc->tty = NULL; |
scc | 1798 | drivers/char/scc.c | scc_change_speed(struct scc_channel * scc) |
scc | 1800 | drivers/char/scc.c | if (scc->tty == NULL) |
scc | 1803 | drivers/char/scc.c | scc->modem.speed = baud_table[scc->tty->termios->c_cflag & CBAUD]; |
scc | 1805 | drivers/char/scc.c | if (scc->stat.tx_state == 0) /* only switch baudrate on rx... ;-) */ |
scc | 1806 | drivers/char/scc.c | set_speed(scc); |
scc | 1831 | drivers/char/scc.c | struct scc_channel * scc = tty->driver_data; |
scc | 1838 | drivers/char/scc.c | if (scc->magic != SCC_MAGIC) |
scc | 1863 | drivers/char/scc.c | if (!scc->init) |
scc | 1874 | drivers/char/scc.c | memcpy_fromfs(&scc->modem, (void *) arg, sizeof(struct scc_modem)); |
scc | 1878 | drivers/char/scc.c | if (scc->modem.speed < 4800) |
scc | 1880 | drivers/char/scc.c | scc->kiss.txdelay = 36*TPS/100; /* 360 ms */ |
scc | 1881 | drivers/char/scc.c | scc->kiss.persist = 42; /* 25% persistence */ /* was 25 */ |
scc | 1882 | drivers/char/scc.c | scc->kiss.slottime = 16*TPS/100; /* 160 ms */ |
scc | 1883 | drivers/char/scc.c | scc->kiss.tailtime = 4; /* minimal reasonable value */ |
scc | 1884 | drivers/char/scc.c | scc->kiss.fulldup = 0; /* CSMA */ |
scc | 1885 | drivers/char/scc.c | scc->kiss.waittime = 50*TPS/100; /* 500 ms */ |
scc | 1886 | drivers/char/scc.c | scc->kiss.maxkeyup = 10; /* 10 s */ |
scc | 1887 | drivers/char/scc.c | scc->kiss.mintime = 3; /* 3 s */ |
scc | 1888 | drivers/char/scc.c | scc->kiss.idletime = 30; /* 30 s */ |
scc | 1889 | drivers/char/scc.c | scc->kiss.maxdefer = 120; /* 2 min */ |
scc | 1890 | drivers/char/scc.c | scc->kiss.not_slip = 1; /* KISS mode */ |
scc | 1891 | drivers/char/scc.c | scc->kiss.softdcd = 0; /* hardware dcd */ |
scc | 1893 | drivers/char/scc.c | scc->kiss.txdelay = 10*TPS/100; /* 100 ms */ |
scc | 1894 | drivers/char/scc.c | scc->kiss.persist = 64; /* 25% persistence */ /* was 25 */ |
scc | 1895 | drivers/char/scc.c | scc->kiss.slottime = 8*TPS/100; /* 160 ms */ |
scc | 1896 | drivers/char/scc.c | scc->kiss.tailtime = 1; /* minimal reasonable value */ |
scc | 1897 | drivers/char/scc.c | scc->kiss.fulldup = 0; /* CSMA */ |
scc | 1898 | drivers/char/scc.c | scc->kiss.waittime = 50*TPS/100; /* 500 ms */ |
scc | 1899 | drivers/char/scc.c | scc->kiss.maxkeyup = 7; /* 7 s */ |
scc | 1900 | drivers/char/scc.c | scc->kiss.mintime = 3; /* 3 s */ |
scc | 1901 | drivers/char/scc.c | scc->kiss.idletime = 30; /* 30 s */ |
scc | 1902 | drivers/char/scc.c | scc->kiss.maxdefer = 120; /* 2 min */ |
scc | 1903 | drivers/char/scc.c | scc->kiss.not_slip = 1; /* KISS mode */ |
scc | 1904 | drivers/char/scc.c | scc->kiss.softdcd = 0; /* hardware dcd */ |
scc | 1907 | drivers/char/scc.c | scc->init = 1; |
scc | 1925 | drivers/char/scc.c | result = ((scc->wreg[R5] & RTS) ? TIOCM_RTS : 0) |
scc | 1926 | drivers/char/scc.c | | ((scc->wreg[R5] & DTR) ? TIOCM_DTR : 0) |
scc | 1927 | drivers/char/scc.c | | ((InReg(scc->ctrl,R0) & DCD) ? TIOCM_CAR : 0) |
scc | 1928 | drivers/char/scc.c | | ((InReg(scc->ctrl,R0) & CTS) ? TIOCM_CTS : 0); |
scc | 1939 | drivers/char/scc.c | scc->wreg[R5] |= DTR; |
scc | 1940 | drivers/char/scc.c | scc->wreg[R5] |= RTS; |
scc | 1943 | drivers/char/scc.c | scc->wreg[R5] &= ~DTR; |
scc | 1944 | drivers/char/scc.c | scc->wreg[R5] &= ~RTS; |
scc | 1950 | drivers/char/scc.c | scc->wreg[R5] |= DTR; |
scc | 1952 | drivers/char/scc.c | scc->wreg[R5] &= ~DTR; |
scc | 1954 | drivers/char/scc.c | scc->wreg[R5] |= RTS; |
scc | 1956 | drivers/char/scc.c | scc->wreg[R5] &= ~RTS; |
scc | 1962 | drivers/char/scc.c | if(scc->stat.tx_state == TXS_IDLE && !Running(t_idle)) |
scc | 1963 | drivers/char/scc.c | maxk_idle_timeout(scc); |
scc | 1976 | drivers/char/scc.c | memcpy_tofs((void *) arg, scc->tty->termios, sizeof(struct termios)); |
scc | 1987 | drivers/char/scc.c | memcpy_fromfs(scc->tty->termios, (void *) arg, sizeof(struct termios)); |
scc | 1988 | drivers/char/scc.c | scc_change_speed(scc); |
scc | 2000 | drivers/char/scc.c | scc->stat.used_buf = scc_count_used_buffers(&scc->stat.rx_alloc, |
scc | 2001 | drivers/char/scc.c | &scc->stat.tx_alloc); |
scc | 2003 | drivers/char/scc.c | memcpy_tofs((void *) arg, &scc->stat, sizeof(struct scc_stat)); |
scc | 2024 | drivers/char/scc.c | case PARAM_TXDELAY: r = CAST(scc->kiss.txdelay*TICKS); break; |
scc | 2025 | drivers/char/scc.c | case PARAM_PERSIST: r = CAST(scc->kiss.persist); break; |
scc | 2026 | drivers/char/scc.c | case PARAM_SLOTTIME: r = CAST(scc->kiss.slottime*TICKS); break; |
scc | 2027 | drivers/char/scc.c | case PARAM_TXTAIL: r = CAST(scc->kiss.tailtime*TICKS); break; |
scc | 2028 | drivers/char/scc.c | case PARAM_FULLDUP: r = CAST(scc->kiss.fulldup); break; |
scc | 2029 | drivers/char/scc.c | case PARAM_SOFTDCD: r = CAST(scc->kiss.softdcd); break; |
scc | 2030 | drivers/char/scc.c | case PARAM_DTR: r = CAST((scc->wreg[R5] & DTR)? 1:0); break; |
scc | 2031 | drivers/char/scc.c | case PARAM_RTS: r = CAST((scc->wreg[R5] & RTS)? 1:0); break; |
scc | 2032 | drivers/char/scc.c | case PARAM_SPEED: r = CAST(scc->modem.speed); break; |
scc | 2033 | drivers/char/scc.c | case PARAM_GROUP: r = CAST(scc->kiss.group); break; |
scc | 2034 | drivers/char/scc.c | case PARAM_IDLE: r = CAST(scc->kiss.idletime); break; |
scc | 2035 | drivers/char/scc.c | case PARAM_MIN: r = CAST(scc->kiss.mintime); break; |
scc | 2036 | drivers/char/scc.c | case PARAM_MAXKEY: r = CAST(scc->kiss.maxkeyup); break; |
scc | 2037 | drivers/char/scc.c | case PARAM_WAIT: r = CAST(scc->kiss.waittime); break; |
scc | 2038 | drivers/char/scc.c | case PARAM_MAXDEFER: r = CAST(scc->kiss.maxdefer); break; |
scc | 2039 | drivers/char/scc.c | case PARAM_TX: r = CAST(scc->kiss.tx_inhibit); break; |
scc | 2040 | drivers/char/scc.c | case PARAM_SLIP: r = CAST(!scc->kiss.not_slip); break; |
scc | 2061 | drivers/char/scc.c | case PARAM_TXDELAY: scc->kiss.txdelay=VAL; break; |
scc | 2062 | drivers/char/scc.c | case PARAM_PERSIST: scc->kiss.persist=Val; break; |
scc | 2063 | drivers/char/scc.c | case PARAM_SLOTTIME: scc->kiss.slottime=VAL; break; |
scc | 2064 | drivers/char/scc.c | case PARAM_TXTAIL: scc->kiss.tailtime=VAL; break; |
scc | 2065 | drivers/char/scc.c | case PARAM_FULLDUP: scc->kiss.fulldup=Val; break; |
scc | 2066 | drivers/char/scc.c | case PARAM_SOFTDCD: scc->kiss.softdcd=Val; break; |
scc | 2069 | drivers/char/scc.c | case PARAM_SPEED: scc->modem.speed=Val; break; |
scc | 2070 | drivers/char/scc.c | case PARAM_GROUP: scc->kiss.group=Val; break; |
scc | 2071 | drivers/char/scc.c | case PARAM_IDLE: scc->kiss.idletime=Val; break; |
scc | 2072 | drivers/char/scc.c | case PARAM_MIN: scc->kiss.mintime=SVAL; break; |
scc | 2073 | drivers/char/scc.c | case PARAM_MAXKEY: scc->kiss.maxkeyup=SVAL; break; |
scc | 2074 | drivers/char/scc.c | case PARAM_WAIT: scc->kiss.waittime=Val; break; |
scc | 2075 | drivers/char/scc.c | case PARAM_MAXDEFER: scc->kiss.maxdefer=SVAL; break; |
scc | 2076 | drivers/char/scc.c | case PARAM_TX: scc->kiss.tx_inhibit=Val; break; |
scc | 2077 | drivers/char/scc.c | case PARAM_SLIP: scc->kiss.not_slip=!Val; break; |
scc | 2106 | drivers/char/scc.c | static inline void check_tx_queue(register struct scc_channel *scc) |
scc | 2110 | drivers/char/scc.c | if (scc->stat.tx_queued > QUEUE_THRES) |
scc | 2112 | drivers/char/scc.c | if (scc->sndq1 == NULLBUF) |
scc | 2115 | drivers/char/scc.c | " (%d) but queue is empty\n", scc->stat.tx_queued); |
scc | 2117 | drivers/char/scc.c | scc->stat.tx_queued = 0; /* correct it */ |
scc | 2118 | drivers/char/scc.c | scc->stat.nospace = 54321; /* draw attention to it */ |
scc | 2122 | drivers/char/scc.c | bp = scc->sndq1->anext; /* don't use the one we currently use */ |
scc | 2124 | drivers/char/scc.c | while (bp && (scc->stat.tx_queued > QUEUE_HYST)) |
scc | 2127 | drivers/char/scc.c | scc->stat.tx_queued--; |
scc | 2128 | drivers/char/scc.c | scc->stat.nospace++; |
scc | 2131 | drivers/char/scc.c | scc->sndq1->anext = bp; |
scc | 2142 | drivers/char/scc.c | struct scc_channel * scc = tty->driver_data; |
scc | 2148 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_write")) |
scc | 2151 | drivers/char/scc.c | if (scc->kiss.tx_inhibit) return count; |
scc | 2153 | drivers/char/scc.c | check_tx_queue(scc); |
scc | 2172 | drivers/char/scc.c | if (kiss_decode(scc, *p++)) |
scc | 2174 | drivers/char/scc.c | scc->stat.nospace++; |
scc | 2188 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 2191 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_put_char")) |
scc | 2200 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 2202 | drivers/char/scc.c | scc_paranoia_check(scc, tty->device, "scc_flush_chars"); /* just to annoy the user... */ |
scc | 2211 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 2213 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_write_room")) |
scc | 2216 | drivers/char/scc.c | if (scc->stat.tx_alloc >= QUEUE_THRES) |
scc | 2227 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 2229 | drivers/char/scc.c | if (scc && scc->sndq2) |
scc | 2230 | drivers/char/scc.c | return scc->sndq2->cnt; |
scc | 2237 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 2239 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_flush_buffer")) |
scc | 2242 | drivers/char/scc.c | scc->stat.tx_kiss_state = KISS_IDLE; |
scc | 2252 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 2254 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_throttle")) |
scc | 2263 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 2265 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_unthrottle")) |
scc | 2273 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 2275 | drivers/char/scc.c | if (scc_paranoia_check(scc, tty->device, "scc_start")) |
scc | 2284 | drivers/char/scc.c | struct scc_channel *scc = tty->driver_data; |
scc | 2286 | 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; |