taglinefilesource code
scc142arch/mips/kernel/signal.cstruct sigcontext_struct scc;
scc144arch/mips/kernel/signal.c#define scc_offset ((size_t)&((struct sc *)0)->scc)
scc185arch/mips/kernel/signal.cframe->scc.sc_at = regs->reg1;    /* Assembler temporary */
scc186arch/mips/kernel/signal.cframe->scc.sc_v0 = regs->reg2;    /* Result registers */
scc187arch/mips/kernel/signal.cframe->scc.sc_v1 = regs->reg3;
scc188arch/mips/kernel/signal.cframe->scc.sc_a0 = regs->reg4;    /* Argument registers */
scc189arch/mips/kernel/signal.cframe->scc.sc_a1 = regs->reg5;
scc190arch/mips/kernel/signal.cframe->scc.sc_a2 = regs->reg6;
scc191arch/mips/kernel/signal.cframe->scc.sc_a3 = regs->reg7;
scc193arch/mips/kernel/signal.cframe->scc.sc_t0 = regs->reg8;    /* Caller saved */
scc194arch/mips/kernel/signal.cframe->scc.sc_t1 = regs->reg9;
scc195arch/mips/kernel/signal.cframe->scc.sc_t2 = regs->reg10;
scc196arch/mips/kernel/signal.cframe->scc.sc_t3 = regs->reg11;
scc197arch/mips/kernel/signal.cframe->scc.sc_t4 = regs->reg12;
scc198arch/mips/kernel/signal.cframe->scc.sc_t5 = regs->reg13;
scc199arch/mips/kernel/signal.cframe->scc.sc_t6 = regs->reg14;
scc200arch/mips/kernel/signal.cframe->scc.sc_t7 = regs->reg15;
scc202arch/mips/kernel/signal.cframe->scc.sc_s0 = regs->reg16;    /* Callee saved */
scc203arch/mips/kernel/signal.cframe->scc.sc_s1 = regs->reg17;
scc204arch/mips/kernel/signal.cframe->scc.sc_s2 = regs->reg18;
scc205arch/mips/kernel/signal.cframe->scc.sc_s3 = regs->reg19;
scc206arch/mips/kernel/signal.cframe->scc.sc_s4 = regs->reg20;
scc207arch/mips/kernel/signal.cframe->scc.sc_s5 = regs->reg21;
scc208arch/mips/kernel/signal.cframe->scc.sc_s6 = regs->reg22;
scc209arch/mips/kernel/signal.cframe->scc.sc_s7 = regs->reg23;
scc211arch/mips/kernel/signal.cframe->scc.sc_t8 = regs->reg24;    /* Caller saved */
scc212arch/mips/kernel/signal.cframe->scc.sc_t9 = regs->reg25;
scc217arch/mips/kernel/signal.cframe->scc.sc_gp = regs->reg28;    /* global pointer / s8 */
scc218arch/mips/kernel/signal.cframe->scc.sc_sp = regs->reg29;    /* old stack pointer */
scc219arch/mips/kernel/signal.cframe->scc.sc_fp = regs->reg30;    /* old frame pointer */
scc220arch/mips/kernel/signal.cframe->scc.sc_ra = regs->reg31;    /* old return address */
scc222arch/mips/kernel/signal.cframe->scc.sc_epc = regs->cp0_epc;  /* Program counter */
scc223arch/mips/kernel/signal.cframe->scc.sc_cause = regs->cp0_cause;  /* c0_epc register */
scc225arch/mips/kernel/signal.cframe->scc.sc_oldmask = oldmask;
scc176drivers/char/scc.cstatic void scc_change_speed(struct scc_channel *scc);
scc177drivers/char/scc.cstatic void kiss_encode(struct scc_channel *scc);
scc179drivers/char/scc.cstatic void init_channel(struct scc_channel *scc);
scc180drivers/char/scc.cstatic void scc_key_trx (struct scc_channel *scc, char tx);
scc181drivers/char/scc.cstatic void scc_txint(register struct scc_channel *scc);
scc182drivers/char/scc.cstatic void scc_exint(register struct scc_channel *scc);
scc183drivers/char/scc.cstatic void scc_rxint(register struct scc_channel *scc);
scc184drivers/char/scc.cstatic void scc_spint(register struct scc_channel *scc);
scc187drivers/char/scc.cstatic void scc_init_timer(struct scc_channel *scc);
scc245drivers/char/scc.cwr(register struct scc_channel *scc, register unsigned char reg, register unsigned char val)
scc247drivers/char/scc.cOutReg(scc->ctrl, reg, (scc->wreg[reg] = val));
scc251drivers/char/scc.cor(register struct scc_channel *scc, register unsigned char reg, register unsigned char val)
scc253drivers/char/scc.cOutReg(scc->ctrl, reg, (scc->wreg[reg] |= val));
scc257drivers/char/scc.ccl(register struct scc_channel *scc, register unsigned char reg, register unsigned char val)
scc259drivers/char/scc.cOutReg(scc->ctrl, reg, (scc->wreg[reg] &= ~val));
scc515drivers/char/scc.cscc_isr_dispatch(register struct scc_channel *scc, register int vector)
scc519drivers/char/scc.ccase TXINT: scc_txint(scc); break;
scc520drivers/char/scc.ccase EXINT: scc_exint(scc); break;
scc521drivers/char/scc.ccase RXINT: scc_rxint(scc); break;
scc522drivers/char/scc.ccase SPINT: scc_spint(scc); break;
scc523drivers/char/scc.cdefault    : printk("scc_isr(): unknown interrupt status (addr %4.4x, state %2.2x)\n",scc->ctrl,vector);
scc540drivers/char/scc.cregister struct scc_channel *scc;
scc564drivers/char/scc.cscc=&SCC_Info[(((vector>>1)&0x7c)^0x04) >> 2];
scc566drivers/char/scc.cif (!scc->tty) break;
scc568drivers/char/scc.cscc_isr_dispatch(scc, vector);
scc570drivers/char/scc.cOutb(scc->ctrl,0x38);              /* Reset Highest IUS" opcode to WR0 */
scc605drivers/char/scc.cscc = &SCC_Info[(((vector >> 1) & 0x7c) ^ 0x04) >> 2];
scc607drivers/char/scc.cif (!scc->tty) break;
scc611drivers/char/scc.cscc_isr_dispatch(scc, vector);
scc628drivers/char/scc.cstatic inline void prepare_next_txframe(register struct scc_channel *scc)
scc630drivers/char/scc.cif ((scc->tbp = scc->sndq))
scc632drivers/char/scc.cscc->sndq = scc->sndq->anext;
scc633drivers/char/scc.cscc->stat.tx_state = TXS_NEWFRAME;
scc636drivers/char/scc.cscc->stat.tx_state = TXS_BUSY;
scc637drivers/char/scc.cscc->t_tail = scc->kiss.tailtime;
scc644drivers/char/scc.cscc_txint(register struct scc_channel *scc)
scc648drivers/char/scc.cscc->stat.txints++;
scc650drivers/char/scc.cbp = scc->tbp;
scc657drivers/char/scc.cif (--scc->stat.tx_queued < 0)
scc658drivers/char/scc.cscc->stat.tx_queued = 0;
scc660drivers/char/scc.cOutb(scc->ctrl,RES_Tx_P);       /* reset pending int */          
scc661drivers/char/scc.ccl(scc,R10,ABUNDER);            /* frame complete, allow CRC transmit */ 
scc662drivers/char/scc.cprepare_next_txframe(scc);
scc666drivers/char/scc.cif (scc->stat.tx_state == TXS_NEWFRAME)
scc668drivers/char/scc.cOutb(scc->ctrl, RES_Tx_CRC);  /* reset CRC generator */
scc669drivers/char/scc.cor(scc,R10,ABUNDER);    /* re-install underrun protection */
scc670drivers/char/scc.cOutb(scc->data,bp->data[bp->in_use++]);
scc672drivers/char/scc.cif (!scc->enhanced)    /* reset EOM latch */
scc673drivers/char/scc.cOutb(scc->ctrl, RES_EOM_L);
scc675drivers/char/scc.cscc->stat.tx_state = TXS_ACTIVE;/* next byte... */
scc677drivers/char/scc.cOutb(scc->data,bp->data[bp->in_use++]);
scc681drivers/char/scc.cscc->tbp=bp;      /* store buffer address */
scc688drivers/char/scc.cscc_toss_buffer(register struct scc_channel *scc)
scc692drivers/char/scc.cif((bp = scc->rbp) != NULLBUF)
scc696drivers/char/scc.cscc->rbp1 = bp;         /* Don't throw this one away */
scc703drivers/char/scc.cflush_FIFO(register struct scc_channel *scc)
scc708drivers/char/scc.cInb(scc->data);
scc710drivers/char/scc.cif(scc->rbp != NULLBUF)  /* did we receive something? */
scc712drivers/char/scc.cif(scc->rbp->next != NULLBUF || scc->rbp->cnt > 0)
scc713drivers/char/scc.cscc->stat.rxerrs++;  /* then count it as an error */
scc715drivers/char/scc.cscc_toss_buffer(scc);         /* throw away buffer */
scc723drivers/char/scc.cscc_exint(register struct scc_channel *scc)
scc727drivers/char/scc.cscc->stat.exints++;
scc729drivers/char/scc.cstatus = InReg(scc->ctrl,R0);
scc730drivers/char/scc.cchanges = status ^ scc->status;
scc736drivers/char/scc.cflush_FIFO(scc);
scc746drivers/char/scc.cif (scc->modem.clocksrc != CLK_EXTERNAL)
scc747drivers/char/scc.cOutReg(scc->ctrl,R14,SEARCH|scc->wreg[R14]); /* DPLL: enter search mode */
scc749drivers/char/scc.cor(scc,R3,ENT_HM|RxENABLE); /* enable the receiver, hunt mode */
scc751drivers/char/scc.ccl(scc,R3,ENT_HM|RxENABLE); /* disable the receiver */
scc752drivers/char/scc.cflush_FIFO(scc);
scc761drivers/char/scc.cif (!Running(t_txdel) && scc->kiss.txdelay == 0) /* zero TXDELAY = wait for CTS */
scc762drivers/char/scc.cscc->t_txdel = 0;  /* kick it! */    
scc766drivers/char/scc.cif ((scc->stat.tx_state == TXS_ACTIVE) && (status & TxEOM))
scc768drivers/char/scc.cscc->stat.tx_under++;    /* oops, an underrun! count 'em */
scc769drivers/char/scc.cOutb(scc->ctrl, RES_Tx_P);
scc770drivers/char/scc.cOutb(scc->ctrl, RES_EXT_INT);  /* reset ext/status interrupts */
scc771drivers/char/scc.cscc->t_maxk = 1;
scc772drivers/char/scc.cscc->tbp = scc_free_chain(scc->tbp, BT_TRANSMIT);
scc774drivers/char/scc.cif (--scc->stat.tx_queued < 0) scc->stat.tx_queued = 0;
scc775drivers/char/scc.cor(scc,R10,ABUNDER);
scc780drivers/char/scc.cscc->stat.tx_under = 9999;  /* errr... yes. */
scc781drivers/char/scc.cOutb(scc->ctrl, RES_Tx_P); /* just to be sure */
scc782drivers/char/scc.cscc->t_maxk = 1;
scc783drivers/char/scc.cscc->tbp = scc_free_chain(scc->tbp, BT_TRANSMIT);
scc784drivers/char/scc.cif (--scc->stat.tx_queued < 0) scc->stat.tx_queued = 0;
scc785drivers/char/scc.cscc->kiss.tx_inhibit = 1;  /* don't try it again! */
scc789drivers/char/scc.cscc->status = status;
scc790drivers/char/scc.cOutb(scc->ctrl,RES_EXT_INT);
scc796drivers/char/scc.cscc_rxint(register struct scc_channel *scc)
scc800drivers/char/scc.cscc->stat.rxints++;
scc802drivers/char/scc.cif( Running(t_maxk) && !(scc->kiss.fulldup))
scc804drivers/char/scc.cInb(scc->data);    /* discard char */
scc805drivers/char/scc.cor(scc,R3,ENT_HM);  /* enter hunt mode for next flag */
scc809drivers/char/scc.cif ((bp = scc->rbp1) == NULLBUF || bp->cnt >= bp->size)  
scc811drivers/char/scc.cif (scc->rbp == NULLBUF)
scc814drivers/char/scc.cscc->rbp = scc->rbp1 = bp;
scc819drivers/char/scc.cscc_append_to_chain(&scc->rbp, bp);
scc820drivers/char/scc.cscc->rbp1 = bp;
scc825drivers/char/scc.cInb(scc->data);    /* discard character */
scc826drivers/char/scc.cor(scc,R3,ENT_HM);      /* enter hunt mode */
scc827drivers/char/scc.cscc_toss_buffer(scc);  /* throw away buffers */
scc828drivers/char/scc.cscc->stat.nospace++;    /* and count this error */
scc834drivers/char/scc.cbp->data[bp->cnt++] = Inb(scc->data);
scc841drivers/char/scc.ckick_rx_timer(register struct scc_channel *scc)
scc850drivers/char/scc.crx_timer_cb.scc = scc;
scc861drivers/char/scc.cscc_spint(register struct scc_channel *scc)
scc866drivers/char/scc.cscc->stat.spints++;
scc868drivers/char/scc.cstatus = InReg(scc->ctrl,R1);    /* read receiver status */
scc870drivers/char/scc.cInb(scc->data);        /* throw away Rx byte */
scc874drivers/char/scc.cscc->stat.rx_over++;                /* count them */
scc875drivers/char/scc.cor(scc,R3,ENT_HM);              /* enter hunt mode for next flag */
scc876drivers/char/scc.cscc_toss_buffer(scc);                 /* rewind the buffer and toss */
scc879drivers/char/scc.cif(status & END_FR && scc->rbp != NULLBUF)  /* end of frame */
scc883drivers/char/scc.cif (!(status & CRC_ERR) && (status & 0xe) == RES8 && scc->rbp->cnt)
scc887drivers/char/scc.cfor (bp = scc->rbp; bp->next != NULLBUF; bp = bp->next) ;
scc890drivers/char/scc.cscc_enqueue(&scc->rcvq,scc->rbp);
scc891drivers/char/scc.cscc->rbp = scc->rbp1 = NULLBUF;
scc892drivers/char/scc.cscc->stat.rxframes++;
scc893drivers/char/scc.cscc->stat.rx_queued++;
scc894drivers/char/scc.ckick_rx_timer(scc);
scc896drivers/char/scc.cscc_toss_buffer(scc);    /* throw away frame */
scc897drivers/char/scc.cscc->stat.rxerrs++;
scc901drivers/char/scc.cOutb(scc->ctrl,ERR_RES);
scc912drivers/char/scc.cstatic inline void set_brg(register struct scc_channel *scc, unsigned int tc)
scc918drivers/char/scc.ccl(scc,R14,BRENABL);    /* disable baudrate generator */
scc919drivers/char/scc.cwr(scc,R12,tc & 255);    /* brg rate LOW */
scc920drivers/char/scc.cwr(scc,R13,tc >> 8);       /* brg rate HIGH */
scc921drivers/char/scc.cor(scc,R14,BRENABL);    /* enable baudrate generator */
scc926drivers/char/scc.cstatic inline void set_speed(register struct scc_channel *scc)
scc928drivers/char/scc.cset_brg(scc, (unsigned) (Clock / (scc->modem.speed * 64)) - 2);
scc934drivers/char/scc.cstatic inline void init_brg(register struct scc_channel *scc)
scc936drivers/char/scc.cwr(scc, R14, BRSRC);        /* BRG source = PCLK */
scc937drivers/char/scc.cOutReg(scc->ctrl, R14, SSBR|scc->wreg[R14]);  /* DPLL source = BRG */
scc938drivers/char/scc.cOutReg(scc->ctrl, R14, SNRZI|scc->wreg[R14]);  /* DPLL NRZI mode */
scc942drivers/char/scc.cinit_channel(register struct scc_channel *scc)
scc948drivers/char/scc.cwr(scc,R1,0);      /* no W/REQ operation */
scc949drivers/char/scc.cwr(scc,R3,Rx8|RxCRC_ENAB);  /* RX 8 bits/char, CRC, disabled */  
scc950drivers/char/scc.cwr(scc,R4,X1CLK|SDLC);    /* *1 clock, SDLC mode */
scc951drivers/char/scc.cwr(scc,R5,Tx8|DTR|TxCRC_ENAB);  /* TX 8 bits/char, disabled, DTR */
scc952drivers/char/scc.cwr(scc,R6,0);      /* SDLC address zero (not used) */
scc953drivers/char/scc.cwr(scc,R7,FLAG);    /* SDLC flag value */
scc954drivers/char/scc.cwr(scc,R10,(scc->modem.nrz? NRZ : NRZI)|CRCPS|ABUNDER); /* abort on underrun, preset CRC generator, NRZ(I) */
scc955drivers/char/scc.cwr(scc,R14, 0);
scc984drivers/char/scc.cswitch(scc->modem.clocksrc)
scc987drivers/char/scc.cwr(scc, R11, RCDPLL|TCDPLL|TRxCOI|TRxCDP);
scc988drivers/char/scc.cinit_brg(scc);
scc992drivers/char/scc.cwr(scc, R11, ((Board & BAYCOM)? TRxCDP : TRxCBR) | RCDPLL|TCRTxCP|TRxCOI);
scc993drivers/char/scc.cinit_brg(scc);
scc997drivers/char/scc.cwr(scc, R11, (Board & BAYCOM)? RCTRxCP|TCRTxCP : RCRTxCP|TCTRxCP);
scc998drivers/char/scc.cOutReg(scc->ctrl, R14, DISDPLL);
scc1004drivers/char/scc.cwr(scc,R15,((Board & BAYCOM) ? 0 : CTSIE)|BRKIE|DCDIE|TxUIE);
scc1006drivers/char/scc.cif(scc->enhanced)
scc1008drivers/char/scc.cor(scc,R15,SHDLCE|FIFOE);  /* enable FIFO, SDLC/HDLC Enhancements (From now R7 is R7') */
scc1009drivers/char/scc.cwr(scc,R7,AUTOEOM);
scc1012drivers/char/scc.cif((InReg(scc->ctrl,R0)) & DCD)    /* DCD is now ON */
scc1014drivers/char/scc.cif (scc->modem.clocksrc != CLK_EXTERNAL)
scc1015drivers/char/scc.cor(scc,R14, SEARCH);
scc1017drivers/char/scc.cor(scc,R3,ENT_HM|RxENABLE);  /* enable the receiver, hunt mode */
scc1020drivers/char/scc.cOutb(scc->ctrl,RES_EXT_INT);  /* reset ext/status interrupts */
scc1021drivers/char/scc.cOutb(scc->ctrl,RES_EXT_INT);  /* must be done twice */
scc1023drivers/char/scc.cscc->status = InReg(scc->ctrl,R0);  /* read initial status */
scc1025drivers/char/scc.cor(scc,R1,INT_ALL_Rx|TxINT_ENAB|EXT_INT_ENAB); /* enable interrupts */
scc1026drivers/char/scc.cor(scc,R9,MIE);      /* master interrupt enable */
scc1030drivers/char/scc.cset_speed(scc); 
scc1045drivers/char/scc.cscc_key_trx(struct scc_channel *scc, char tx)
scc1049drivers/char/scc.cif (scc->modem.speed < baud_table[1]) 
scc1050drivers/char/scc.cscc->modem.speed = 1200;
scc1053drivers/char/scc.cOutb(scc->ctrl + 4, Option | (tx? 0x80 : 0));
scc1055drivers/char/scc.ctime_const = (unsigned) (Clock / (scc->modem.speed * (tx? 2:64))) - 2;
scc1057drivers/char/scc.cif (scc->modem.clocksrc == CLK_DPLL)
scc1061drivers/char/scc.ccl(scc,R3,RxENABLE|ENT_HM);  /* then switch off receiver */
scc1063drivers/char/scc.cset_brg(scc, time_const);  /* reprogram baudrate generator */
scc1066drivers/char/scc.cwr(scc, R11, RCDPLL|TCBR|TRxCOI|TRxCBR);
scc1068drivers/char/scc.cor(scc,R5,RTS|TxENAB);    /* set the RTS line and enable TX */
scc1070drivers/char/scc.ccl(scc,R5,RTS|TxENAB);
scc1072drivers/char/scc.cset_brg(scc, time_const);  /* reprogram baudrate generator */
scc1075drivers/char/scc.cwr(scc, R11, RCDPLL|TCDPLL|TRxCOI|TRxCDP);
scc1077drivers/char/scc.cor(scc,R3,RxENABLE|ENT_HM);
scc1081drivers/char/scc.cor(scc,R5,RTS|TxENAB);    /* enable tx */
scc1083drivers/char/scc.ccl(scc,R5,RTS|TxENAB);    /* disable tx */
scc1092drivers/char/scc.cstatic inline int is_grouped(register struct scc_channel *scc)
scc1098drivers/char/scc.cgrp1 = scc->kiss.group;
scc1105drivers/char/scc.cif (scc2 == scc || !(scc2->tty && grp2)) 
scc1121drivers/char/scc.cstatic inline void dw_slot_timeout(register struct scc_channel *scc)
scc1123drivers/char/scc.cscc->t_dwait = TIMER_STOPPED;
scc1124drivers/char/scc.cscc->t_slot = TIMER_STOPPED;
scc1126drivers/char/scc.cif (!scc->kiss.fulldup)
scc1130drivers/char/scc.cif ( (scc->kiss.softdcd? !(scc->status & SYNC_HUNT):(scc->status & DCD))  || (scc->kiss.persist) < Rand || (scc->kiss.group && is_grouped(scc)) )
scc1132drivers/char/scc.cif (scc->t_mbusy == TIMER_STOPPED)
scc1133drivers/char/scc.cscc->t_mbusy = TPS * scc->kiss.maxdefer;
scc1135drivers/char/scc.cscc->t_slot = scc->kiss.slottime;
scc1141drivers/char/scc.cif ( !(scc->wreg[R5] & RTS) )
scc1143drivers/char/scc.cscc->t_txdel = scc->kiss.txdelay;
scc1144drivers/char/scc.cscc_key_trx(scc, TX_ON);
scc1146drivers/char/scc.cscc->t_txdel = 0;
scc1153drivers/char/scc.cstatic inline void txdel_timeout(register struct scc_channel *scc)
scc1155drivers/char/scc.cscc->t_txdel = TIMER_STOPPED;
scc1157drivers/char/scc.cscc->t_maxk = TPS * scc->kiss.maxkeyup;
scc1158drivers/char/scc.cprepare_next_txframe(scc);
scc1160drivers/char/scc.cif (scc->stat.tx_state != TXS_BUSY)
scc1161drivers/char/scc.cscc_txint(scc);    
scc1166drivers/char/scc.cstatic inline void tail_timeout(register struct scc_channel *scc)
scc1168drivers/char/scc.cscc->t_tail = TIMER_STOPPED;
scc1178drivers/char/scc.cif (scc->kiss.fulldup < 2)
scc1180drivers/char/scc.cif (scc->sndq)    /* we had a timeout? */
scc1182drivers/char/scc.cscc->stat.tx_state = TXS_BUSY;
scc1183drivers/char/scc.cscc->t_dwait = TPS * scc->kiss.mintime; /* try again */
scc1186drivers/char/scc.cscc->stat.tx_state = TXS_IDLE;
scc1187drivers/char/scc.cscc->t_maxk = TIMER_STOPPED;
scc1188drivers/char/scc.cscc_key_trx(scc, TX_OFF);
scc1192drivers/char/scc.cif (scc->sndq)      /* maxkeyup expired */ /* ?! */
scc1194drivers/char/scc.cscc->stat.tx_state = TXS_BUSY;
scc1195drivers/char/scc.cscc->t_txdel = TPS * scc->kiss.waittime;
scc1199drivers/char/scc.cscc->t_idle = TPS * scc->kiss.idletime;
scc1203drivers/char/scc.cstatic inline void busy_timeout(register struct scc_channel *scc)
scc1208drivers/char/scc.cbp = scc->sndq;
scc1212drivers/char/scc.cscc->sndq = NULLBUF;
scc1213drivers/char/scc.cscc->stat.tx_state = TXS_IDLE;
scc1216drivers/char/scc.cscc->t_txdel = scc->kiss.txdelay;  /* brute force ... */
scc1218drivers/char/scc.cscc->t_mbusy = TIMER_STOPPED;
scc1223drivers/char/scc.cstatic inline void maxk_idle_timeout(register struct scc_channel *scc)
scc1225drivers/char/scc.cscc->t_maxk = TIMER_STOPPED;
scc1226drivers/char/scc.cscc->t_idle = TIMER_STOPPED;
scc1228drivers/char/scc.cscc->stat.tx_state = TXS_BUSY;
scc1229drivers/char/scc.cscc->t_tail = scc->kiss.tailtime;
scc1232drivers/char/scc.cstatic inline void check_rcv_queue(register struct scc_channel *scc)
scc1236drivers/char/scc.cif (scc->stat.rx_queued > QUEUE_THRES)
scc1238drivers/char/scc.cif (scc->rcvq == NULLBUF)
scc1241drivers/char/scc.c" (%d) but queue is empty\n", scc->stat.rx_queued);
scc1243drivers/char/scc.cscc->stat.rx_queued = 0;  /* correct it */
scc1244drivers/char/scc.cscc->stat.nospace = 12345;  /* draw attention to it */
scc1248drivers/char/scc.cbp = scc->rcvq->anext;  /* don't use the one we currently use */
scc1250drivers/char/scc.cwhile (bp && (scc->stat.rx_queued > QUEUE_HYST))
scc1253drivers/char/scc.cscc->stat.rx_queued--;
scc1254drivers/char/scc.cscc->stat.nospace++;
scc1257drivers/char/scc.cscc->rcvq->anext = bp;
scc1264drivers/char/scc.cregister struct scc_channel *scc;
scc1271drivers/char/scc.cscc = &SCC_Info[chan];
scc1273drivers/char/scc.cif (scc->tty && scc->init)
scc1275drivers/char/scc.ckiss_encode(scc);
scc1279drivers/char/scc.ccheck_rcv_queue(scc);
scc1283drivers/char/scc.cif (Expired(t_dwait)) dw_slot_timeout(scc)  ; else
scc1284drivers/char/scc.cif (Expired(t_slot))  dw_slot_timeout(scc)  ; else
scc1285drivers/char/scc.cif (Expired(t_txdel)) txdel_timeout(scc)     ; else
scc1286drivers/char/scc.cif (Expired(t_tail))  tail_timeout(scc)       ;
scc1290drivers/char/scc.cif (Expired(t_mbusy)) busy_timeout(scc);
scc1291drivers/char/scc.cif (Expired(t_maxk))  maxk_idle_timeout(scc);
scc1292drivers/char/scc.cif (Expired(t_idle))  maxk_idle_timeout(scc);
scc1309drivers/char/scc.cscc_init_timer(struct scc_channel *scc)
scc1322drivers/char/scc.cscc->stat.tx_state = TXS_IDLE;
scc1333drivers/char/scc.ckiss_encode(rx_timer_cb.scc);
scc1357drivers/char/scc.ckiss_set_param(struct scc_channel *scc,char cmd, unsigned int val)
scc1365drivers/char/scc.cscc->kiss.txdelay = VAL; break;
scc1367drivers/char/scc.cscc->kiss.persist = val; break;
scc1369drivers/char/scc.cscc->kiss.slottime = VAL; break;
scc1371drivers/char/scc.cscc->kiss.tailtime = VAL; break;
scc1373drivers/char/scc.cscc->kiss.fulldup = val; break;
scc1375drivers/char/scc.cscc->kiss.waittime = VAL; break;
scc1377drivers/char/scc.cscc->kiss.maxkeyup = SVAL; break;
scc1379drivers/char/scc.cscc->kiss.mintime = SVAL; break;
scc1381drivers/char/scc.cscc->kiss.idletime = val; break;
scc1383drivers/char/scc.cscc->kiss.maxdefer = SVAL; break;
scc1385drivers/char/scc.cscc->kiss.group = val;  break;
scc1387drivers/char/scc.cscc->kiss.tx_inhibit = val;
scc1389drivers/char/scc.cscc->kiss.softdcd = val;
scc1400drivers/char/scc.cstatic void kiss_interpret_frame(struct scc_channel * scc)
scc1405drivers/char/scc.cif (scc->sndq1->cnt < 2)
scc1407drivers/char/scc.cif (scc->sndq1) 
scc1408drivers/char/scc.cscc_free_chain(scc->sndq1, BT_TRANSMIT);
scc1410drivers/char/scc.cscc->sndq1 = NULLBUF;
scc1412drivers/char/scc.cscc->sndq2 = NULLBUF;
scc1418drivers/char/scc.cif (scc->kiss.not_slip)
scc1420drivers/char/scc.ckisscmd = scc->sndq1->data[scc->sndq1->in_use++];
scc1421drivers/char/scc.cscc->sndq1->cnt--;
scc1428drivers/char/scc.cif (scc->sndq1->cnt > 2)
scc1429drivers/char/scc.cscc->sndq1->cnt -= 2;
scc1432drivers/char/scc.cscc_free_chain(scc->sndq1, BT_TRANSMIT);
scc1433drivers/char/scc.cscc->sndq2 = NULLBUF;
scc1444drivers/char/scc.ckiss_set_param(scc, kisscmd, scc->sndq1->data[scc->sndq1->in_use]);
scc1445drivers/char/scc.cscc->sndq1->cnt=0;
scc1446drivers/char/scc.cscc->sndq1->in_use=0;
scc1448drivers/char/scc.cscc_free_chain(scc->sndq1, BT_TRANSMIT);
scc1449drivers/char/scc.cscc->sndq2 = NULLBUF;
scc1453drivers/char/scc.cscc_enqueue(&scc->sndq,scc->sndq1); /* scc_enqueue packet */
scc1454drivers/char/scc.cscc->stat.txframes++;
scc1455drivers/char/scc.cscc->stat.tx_queued++;
scc1456drivers/char/scc.cscc->sndq2 = NULLBUF;    /* acquire a new buffer next time */
scc1460drivers/char/scc.cif(scc->stat.tx_state == TXS_IDLE)
scc1462drivers/char/scc.cscc_init_timer(scc);
scc1463drivers/char/scc.cscc->stat.tx_state = TXS_BUSY;
scc1464drivers/char/scc.cscc->t_dwait = (scc->kiss.fulldup? 0:scc->kiss.waittime);
scc1470drivers/char/scc.cstatic void kiss_store_byte(struct scc_channel *scc, unsigned char ch)
scc1472drivers/char/scc.cif (scc->sndq2 == NULLBUF) return;
scc1474drivers/char/scc.cif(scc->sndq2->cnt == scc->sndq2->size)    /* buffer full? */
scc1476drivers/char/scc.cif((scc->sndq2 = scc_get_buffer(BT_TRANSMIT)) == NULLBUF)
scc1481drivers/char/scc.cscc_append_to_chain(&scc->sndq1,scc->sndq2);         /* add buffer */
scc1484drivers/char/scc.cscc->sndq2->data[scc->sndq2->cnt++] = ch;
scc1487drivers/char/scc.cstatic inline int kiss_decode(struct scc_channel *scc, unsigned char ch)
scc1489drivers/char/scc.cswitch (scc->stat.tx_kiss_state) 
scc1494drivers/char/scc.cif (!(scc->sndq2 = scc->sndq1 = scc_get_buffer(BT_TRANSMIT)))
scc1497drivers/char/scc.cscc->stat.tx_kiss_state = KISS_DATA;
scc1498drivers/char/scc.c} else scc->stat.txerrs++;
scc1503drivers/char/scc.cscc->stat.tx_kiss_state = KISS_ESCAPE;
scc1506drivers/char/scc.ckiss_interpret_frame(scc);  
scc1507drivers/char/scc.cscc->stat.tx_kiss_state = KISS_IDLE;
scc1509drivers/char/scc.celse kiss_store_byte(scc, ch);
scc1515drivers/char/scc.ckiss_store_byte(scc, FEND);
scc1516drivers/char/scc.cscc->stat.tx_kiss_state = KISS_DATA;
scc1520drivers/char/scc.ckiss_store_byte(scc, FESC);
scc1521drivers/char/scc.cscc->stat.tx_kiss_state = KISS_DATA;
scc1525drivers/char/scc.cscc_free_chain(scc->sndq1, BT_TRANSMIT);
scc1526drivers/char/scc.cscc->sndq2 = NULLBUF;
scc1527drivers/char/scc.cscc->stat.txerrs++;
scc1528drivers/char/scc.cscc->stat.tx_kiss_state = KISS_IDLE;
scc1541drivers/char/scc.ckiss_encode(register struct scc_channel *scc)
scc1544drivers/char/scc.cstruct tty_struct * tty = scc->tty;
scc1548drivers/char/scc.cif(!scc->rcvq)
scc1550drivers/char/scc.cscc->stat.rx_kiss_state = KISS_IDLE;
scc1558drivers/char/scc.cif (scc->rcvq->cnt)
scc1560drivers/char/scc.cbp = scc->rcvq;
scc1562drivers/char/scc.cif (scc->stat.rx_kiss_state == KISS_IDLE)
scc1566drivers/char/scc.cif (scc->kiss.not_slip)
scc1569drivers/char/scc.cscc->stat.rx_kiss_state = KISS_RXFRAME;
scc1591drivers/char/scc.cwhile (!scc->rcvq->cnt)
scc1593drivers/char/scc.cbp  = scc->rcvq->next;  /* next buffer */
scc1594drivers/char/scc.cbp2 = scc->rcvq->anext; /* next packet */
scc1597drivers/char/scc.cscc_return_buffer(scc->rcvq, BT_RECEIVE);
scc1601drivers/char/scc.cscc->rcvq = bp2;
scc1603drivers/char/scc.cif (--scc->stat.rx_queued < 0)
scc1604drivers/char/scc.cscc->stat.rx_queued = 0;
scc1606drivers/char/scc.cif (scc->stat.rx_kiss_state == KISS_RXFRAME)  /* new packet? */
scc1609drivers/char/scc.cscc->stat.rx_kiss_state = KISS_IDLE; /* generate FEND for new frame */
scc1616drivers/char/scc.c} else scc->rcvq = bp; /* next buffer */
scc1636drivers/char/scc.cstruct scc_channel *scc;
scc1653drivers/char/scc.cscc=&SCC_Info[2*chip];
scc1654drivers/char/scc.cif (!scc->ctrl) continue;
scc1660drivers/char/scc.cOutb(scc->ctrl, 0);
scc1661drivers/char/scc.cOutReg(scc->ctrl,R9,FHWRES);    /* force hardware reset */
scc1663drivers/char/scc.cwr(scc, R2, chip*16);      /* interrupt vector */
scc1664drivers/char/scc.cwr(scc, R9, VIS);      /* vector includes status */
scc1684drivers/char/scc.cstatic inline int scc_paranoia_check(struct scc_channel *scc, kdev_t device,
scc1693drivers/char/scc.cif (!scc->init) 
scc1698drivers/char/scc.cif (scc->magic != SCC_MAGIC) {
scc1712drivers/char/scc.cstruct scc_channel *scc;
scc1719drivers/char/scc.cscc = &SCC_Info[chan];
scc1721drivers/char/scc.ctty->driver_data = scc;
scc1727drivers/char/scc.cif (scc->magic != SCC_MAGIC)
scc1735drivers/char/scc.cif(scc->tty != NULL)
scc1737drivers/char/scc.cscc->tty_opened++;
scc1741drivers/char/scc.cif(!scc->init) return 0;
scc1743drivers/char/scc.cscc->tty = tty;
scc1744drivers/char/scc.cinit_channel(scc);
scc1746drivers/char/scc.cscc->stat.tx_kiss_state = KISS_IDLE;  /* don't change this... */
scc1747drivers/char/scc.cscc->stat.rx_kiss_state = KISS_IDLE;  /* ...or this */
scc1749drivers/char/scc.cscc_init_timer(scc);
scc1764drivers/char/scc.cstruct scc_channel *scc = tty->driver_data;
scc1767drivers/char/scc.cif (!scc || (scc->magic != SCC_MAGIC))
scc1770drivers/char/scc.cif(scc->tty_opened)
scc1772drivers/char/scc.cscc->tty_opened--;
scc1780drivers/char/scc.cOutb(scc->ctrl,0);    /* Make sure pointer is written */
scc1781drivers/char/scc.cwr(scc,R1,0);      /* disable interrupts */
scc1782drivers/char/scc.cwr(scc,R3,0);
scc1784drivers/char/scc.cscc->tty = NULL;
scc1798drivers/char/scc.cscc_change_speed(struct scc_channel * scc)
scc1800drivers/char/scc.cif (scc->tty == NULL)
scc1803drivers/char/scc.cscc->modem.speed = baud_table[scc->tty->termios->c_cflag & CBAUD];
scc1805drivers/char/scc.cif (scc->stat.tx_state == 0)  /* only switch baudrate on rx... ;-) */
scc1806drivers/char/scc.cset_speed(scc);
scc1831drivers/char/scc.cstruct scc_channel * scc = tty->driver_data;
scc1838drivers/char/scc.cif (scc->magic != SCC_MAGIC) 
scc1863drivers/char/scc.cif (!scc->init)
scc1874drivers/char/scc.cmemcpy_fromfs(&scc->modem, (void *) arg, sizeof(struct scc_modem));
scc1878drivers/char/scc.cif (scc->modem.speed < 4800)
scc1880drivers/char/scc.cscc->kiss.txdelay = 36*TPS/100;    /* 360 ms */
scc1881drivers/char/scc.cscc->kiss.persist = 42;            /* 25% persistence */      /* was 25 */
scc1882drivers/char/scc.cscc->kiss.slottime = 16*TPS/100;   /* 160 ms */
scc1883drivers/char/scc.cscc->kiss.tailtime = 4;            /* minimal reasonable value */
scc1884drivers/char/scc.cscc->kiss.fulldup = 0;             /* CSMA */
scc1885drivers/char/scc.cscc->kiss.waittime = 50*TPS/100;   /* 500 ms */
scc1886drivers/char/scc.cscc->kiss.maxkeyup = 10;           /* 10 s */
scc1887drivers/char/scc.cscc->kiss.mintime = 3;             /* 3 s */
scc1888drivers/char/scc.cscc->kiss.idletime = 30;           /* 30 s */
scc1889drivers/char/scc.cscc->kiss.maxdefer = 120;     /* 2 min */
scc1890drivers/char/scc.cscc->kiss.not_slip = 1;       /* KISS mode */
scc1891drivers/char/scc.cscc->kiss.softdcd = 0;       /* hardware dcd */
scc1893drivers/char/scc.cscc->kiss.txdelay = 10*TPS/100;    /* 100 ms */
scc1894drivers/char/scc.cscc->kiss.persist = 64;            /* 25% persistence */      /* was 25 */
scc1895drivers/char/scc.cscc->kiss.slottime = 8*TPS/100;    /* 160 ms */
scc1896drivers/char/scc.cscc->kiss.tailtime = 1;            /* minimal reasonable value */
scc1897drivers/char/scc.cscc->kiss.fulldup = 0;             /* CSMA */
scc1898drivers/char/scc.cscc->kiss.waittime = 50*TPS/100;   /* 500 ms */
scc1899drivers/char/scc.cscc->kiss.maxkeyup = 7;            /* 7 s */
scc1900drivers/char/scc.cscc->kiss.mintime = 3;             /* 3 s */
scc1901drivers/char/scc.cscc->kiss.idletime = 30;           /* 30 s */
scc1902drivers/char/scc.cscc->kiss.maxdefer = 120;     /* 2 min */
scc1903drivers/char/scc.cscc->kiss.not_slip = 1;       /* KISS mode */
scc1904drivers/char/scc.cscc->kiss.softdcd = 0;       /* hardware dcd */
scc1907drivers/char/scc.cscc->init = 1;      
scc1925drivers/char/scc.cresult =  ((scc->wreg[R5] & RTS) ? TIOCM_RTS : 0)
scc1926drivers/char/scc.c| ((scc->wreg[R5] & DTR) ? TIOCM_DTR : 0)
scc1927drivers/char/scc.c| ((InReg(scc->ctrl,R0) & DCD)  ? TIOCM_CAR : 0)
scc1928drivers/char/scc.c| ((InReg(scc->ctrl,R0) & CTS)  ? TIOCM_CTS : 0);
scc1939drivers/char/scc.cscc->wreg[R5] |= DTR;
scc1940drivers/char/scc.cscc->wreg[R5] |= RTS;
scc1943drivers/char/scc.cscc->wreg[R5] &= ~DTR;
scc1944drivers/char/scc.cscc->wreg[R5] &= ~RTS;
scc1950drivers/char/scc.cscc->wreg[R5] |= DTR;
scc1952drivers/char/scc.cscc->wreg[R5] &= ~DTR;
scc1954drivers/char/scc.cscc->wreg[R5] |= RTS;
scc1956drivers/char/scc.cscc->wreg[R5] &= ~RTS;
scc1962drivers/char/scc.cif(scc->stat.tx_state == TXS_IDLE && !Running(t_idle))
scc1963drivers/char/scc.cmaxk_idle_timeout(scc);
scc1976drivers/char/scc.cmemcpy_tofs((void *) arg, scc->tty->termios, sizeof(struct termios));
scc1987drivers/char/scc.cmemcpy_fromfs(scc->tty->termios, (void *) arg, sizeof(struct termios));
scc1988drivers/char/scc.cscc_change_speed(scc);
scc2000drivers/char/scc.cscc->stat.used_buf = scc_count_used_buffers(&scc->stat.rx_alloc, 
scc2001drivers/char/scc.c&scc->stat.tx_alloc);
scc2003drivers/char/scc.cmemcpy_tofs((void *) arg, &scc->stat, sizeof(struct scc_stat));
scc2024drivers/char/scc.ccase PARAM_TXDELAY:  r = CAST(scc->kiss.txdelay*TICKS);  break;
scc2025drivers/char/scc.ccase PARAM_PERSIST:  r = CAST(scc->kiss.persist);     break;
scc2026drivers/char/scc.ccase PARAM_SLOTTIME:  r = CAST(scc->kiss.slottime*TICKS);  break;
scc2027drivers/char/scc.ccase PARAM_TXTAIL:  r = CAST(scc->kiss.tailtime*TICKS);  break;
scc2028drivers/char/scc.ccase PARAM_FULLDUP:  r = CAST(scc->kiss.fulldup);     break;
scc2029drivers/char/scc.ccase PARAM_SOFTDCD:  r = CAST(scc->kiss.softdcd);    break;
scc2030drivers/char/scc.ccase PARAM_DTR:    r = CAST((scc->wreg[R5] & DTR)? 1:0); break;
scc2031drivers/char/scc.ccase PARAM_RTS:    r = CAST((scc->wreg[R5] & RTS)? 1:0); break;
scc2032drivers/char/scc.ccase PARAM_SPEED:  r = CAST(scc->modem.speed);  break;
scc2033drivers/char/scc.ccase PARAM_GROUP:  r = CAST(scc->kiss.group);     break;
scc2034drivers/char/scc.ccase PARAM_IDLE:  r = CAST(scc->kiss.idletime);    break;
scc2035drivers/char/scc.ccase PARAM_MIN:    r = CAST(scc->kiss.mintime);    break;
scc2036drivers/char/scc.ccase PARAM_MAXKEY:  r = CAST(scc->kiss.maxkeyup);    break;
scc2037drivers/char/scc.ccase PARAM_WAIT:  r = CAST(scc->kiss.waittime);    break;
scc2038drivers/char/scc.ccase PARAM_MAXDEFER:  r = CAST(scc->kiss.maxdefer);    break;
scc2039drivers/char/scc.ccase PARAM_TX:    r = CAST(scc->kiss.tx_inhibit);  break;
scc2040drivers/char/scc.ccase PARAM_SLIP:  r = CAST(!scc->kiss.not_slip);    break;
scc2061drivers/char/scc.ccase PARAM_TXDELAY:  scc->kiss.txdelay=VAL;    break;
scc2062drivers/char/scc.ccase PARAM_PERSIST:  scc->kiss.persist=Val;    break;
scc2063drivers/char/scc.ccase PARAM_SLOTTIME:  scc->kiss.slottime=VAL;    break;
scc2064drivers/char/scc.ccase PARAM_TXTAIL:  scc->kiss.tailtime=VAL;    break;
scc2065drivers/char/scc.ccase PARAM_FULLDUP:  scc->kiss.fulldup=Val;    break;
scc2066drivers/char/scc.ccase PARAM_SOFTDCD:  scc->kiss.softdcd=Val;    break;
scc2069drivers/char/scc.ccase PARAM_SPEED:  scc->modem.speed=Val;    break;
scc2070drivers/char/scc.ccase PARAM_GROUP:  scc->kiss.group=Val;    break;
scc2071drivers/char/scc.ccase PARAM_IDLE:  scc->kiss.idletime=Val;    break;
scc2072drivers/char/scc.ccase PARAM_MIN:    scc->kiss.mintime=SVAL;    break;
scc2073drivers/char/scc.ccase PARAM_MAXKEY:  scc->kiss.maxkeyup=SVAL;  break;
scc2074drivers/char/scc.ccase PARAM_WAIT:  scc->kiss.waittime=Val;    break;
scc2075drivers/char/scc.ccase PARAM_MAXDEFER:  scc->kiss.maxdefer=SVAL;  break;
scc2076drivers/char/scc.ccase PARAM_TX:    scc->kiss.tx_inhibit=Val;  break;
scc2077drivers/char/scc.ccase PARAM_SLIP:  scc->kiss.not_slip=!Val;  break;
scc2106drivers/char/scc.cstatic inline void check_tx_queue(register struct scc_channel *scc)
scc2110drivers/char/scc.cif (scc->stat.tx_queued > QUEUE_THRES)
scc2112drivers/char/scc.cif (scc->sndq1 == NULLBUF)
scc2115drivers/char/scc.c" (%d) but queue is empty\n", scc->stat.tx_queued);
scc2117drivers/char/scc.cscc->stat.tx_queued = 0;  /* correct it */
scc2118drivers/char/scc.cscc->stat.nospace = 54321;  /* draw attention to it */
scc2122drivers/char/scc.cbp = scc->sndq1->anext;  /* don't use the one we currently use */
scc2124drivers/char/scc.cwhile (bp && (scc->stat.tx_queued > QUEUE_HYST))
scc2127drivers/char/scc.cscc->stat.tx_queued--;
scc2128drivers/char/scc.cscc->stat.nospace++;
scc2131drivers/char/scc.cscc->sndq1->anext = bp;
scc2142drivers/char/scc.cstruct scc_channel * scc = tty->driver_data;
scc2148drivers/char/scc.cif (scc_paranoia_check(scc, tty->device, "scc_write"))
scc2151drivers/char/scc.cif (scc->kiss.tx_inhibit) return count;
scc2153drivers/char/scc.ccheck_tx_queue(scc);
scc2172drivers/char/scc.cif (kiss_decode(scc, *p++))
scc2174drivers/char/scc.cscc->stat.nospace++;
scc2188drivers/char/scc.cstruct scc_channel *scc = tty->driver_data;
scc2191drivers/char/scc.cif (scc_paranoia_check(scc, tty->device, "scc_put_char"))
scc2200drivers/char/scc.cstruct scc_channel *scc = tty->driver_data;
scc2202drivers/char/scc.cscc_paranoia_check(scc, tty->device, "scc_flush_chars"); /* just to annoy the user... */
scc2211drivers/char/scc.cstruct scc_channel *scc = tty->driver_data;
scc2213drivers/char/scc.cif (scc_paranoia_check(scc, tty->device, "scc_write_room"))
scc2216drivers/char/scc.cif (scc->stat.tx_alloc >= QUEUE_THRES)
scc2227drivers/char/scc.cstruct scc_channel *scc = tty->driver_data;
scc2229drivers/char/scc.cif (scc && scc->sndq2)
scc2230drivers/char/scc.creturn scc->sndq2->cnt;
scc2237drivers/char/scc.cstruct scc_channel *scc = tty->driver_data;
scc2239drivers/char/scc.cif (scc_paranoia_check(scc, tty->device, "scc_flush_buffer"))
scc2242drivers/char/scc.cscc->stat.tx_kiss_state = KISS_IDLE;
scc2252drivers/char/scc.cstruct scc_channel *scc = tty->driver_data;
scc2254drivers/char/scc.cif (scc_paranoia_check(scc, tty->device, "scc_throttle"))
scc2263drivers/char/scc.cstruct scc_channel *scc = tty->driver_data;
scc2265drivers/char/scc.cif (scc_paranoia_check(scc, tty->device, "scc_unthrottle"))
scc2273drivers/char/scc.cstruct scc_channel *scc = tty->driver_data;
scc2275drivers/char/scc.cif (scc_paranoia_check(scc, tty->device, "scc_start"))
scc2284drivers/char/scc.cstruct scc_channel *scc = tty->driver_data;
scc2286drivers/char/scc.cif (scc_paranoia_check(scc, tty->device, "scc_stop"))
scc130include/linux/scc.h#define Running(k) (scc->k != TIMER_STOPPED)
scc131include/linux/scc.h#define Expired(k) (scc->k != TIMER_STOPPED) && (!(scc->k) || (--(scc->k) == 0))
scc132include/linux/scc.h#define Stop_Timer(k) scc->k = TIMER_STOPPED
scc271include/linux/scc.hstruct scc_channel *scc;