Zero is a valid value for ch_tcor and ch_rcor, so be a bit more conservative
when deciding if the baud-rate should be changed. (Spotted by Bruce Martin) Also fix the mask used when setting the Rx FIFO threshold to zero. I don't yet understand how the Rx side worked with the code as it was. ;-}
This commit is contained in:
parent
de6b762004
commit
3981e235b7
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: clmpcc.c,v 1.7 1999/09/18 09:45:05 scw Exp $ */
|
||||
/* $NetBSD: clmpcc.c,v 1.8 1999/11/11 09:38:43 scw Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -965,7 +965,7 @@ clmpcc_set_params(ch)
|
||||
u_char r1;
|
||||
u_char r2;
|
||||
|
||||
if ( ch->ch_tcor && ch->ch_tbpr ) {
|
||||
if ( ch->ch_tcor || ch->ch_tbpr ) {
|
||||
r1 = clmpcc_rdreg(sc, CLMPCC_REG_TCOR);
|
||||
r2 = clmpcc_rdreg(sc, CLMPCC_REG_TBPR);
|
||||
/* Only write Tx rate if it really has changed */
|
||||
@ -975,7 +975,7 @@ clmpcc_set_params(ch)
|
||||
}
|
||||
}
|
||||
|
||||
if ( ch->ch_rcor && ch->ch_rbpr ) {
|
||||
if ( ch->ch_rcor || ch->ch_rbpr ) {
|
||||
r1 = clmpcc_rdreg(sc, CLMPCC_REG_RCOR);
|
||||
r2 = clmpcc_rdreg(sc, CLMPCC_REG_RBPR);
|
||||
/* Only write Rx rate if it really has changed */
|
||||
@ -1114,7 +1114,7 @@ clmpcc_rxintr(arg)
|
||||
* further receive timeout interrupts.
|
||||
*/
|
||||
reg = clmpcc_rdreg(sc, CLMPCC_REG_COR4);
|
||||
clmpcc_wrreg(sc, CLMPCC_REG_COR4, reg & CLMPCC_COR4_FIFO_MASK);
|
||||
clmpcc_wrreg(sc, CLMPCC_REG_COR4, reg & ~CLMPCC_COR4_FIFO_MASK);
|
||||
reg = clmpcc_rdreg(sc, CLMPCC_REG_IER);
|
||||
clmpcc_wrreg(sc, CLMPCC_REG_IER, reg & ~CLMPCC_IER_RET);
|
||||
clmpcc_wrreg(sc, CLMPCC_REG_REOIR, CLMPCC_REOIR_NO_TRANS);
|
||||
|
Loading…
Reference in New Issue
Block a user