Date: Mon, 2 Dec 1996 23:06:13 +1100 From: Bruce Evans <bde@zeta.org.au> To: bde@zeta.org.au, proff@suburbia.net Cc: hackers@freebsd.org Subject: Re: cyclades PCI driver doesn't detect carrier drop Message-ID: <199612021206.XAA20862@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> It seems to be a hardware problem. >> >> Bruce Oops, that wasn't ready to be mailed. I finally found the problem. In CLOCAL mode, modem status interrupts were completely disabled in CLOCAL mode, so modem status changes were never noticed. This doesn't matter for normal operations, but mgetty and ppp poll the modem status. Polling doesn't fix the problem because it returns a cached status. Polling uses essentially the same code as in sio, and in sio it is important not to read the modem status outside of the interrupt handler because reading it would clear any pending interrupt. This fix leaves polling for changes in CTS, DSR and RI still broken. This will be fixed by enabling interrupts for all the transitions or by reading the hardware when polling. If interrupts for CTS changes are enabled then the driver may as well do all CTS handling itself. Code already exists for this (SOFT_CTS_OFLOW option). --- diff -c2 cy.c~ cy.c *** cy.c~ Thu Nov 14 17:07:44 1996 --- cy.c Mon Dec 2 20:37:02 1996 *************** *** 1914,1927 **** /* - * XXX we probably alway want to track carrier changes, so that - * TS_CARR_ON gives the true carrier. If we don't track them, - * then we should set TS_CARR_ON when CLOCAL drops. - */ - /* * set modem change option register 1 * generate modem interrupts on which 1 -> 0 input transitions * also controls auto-DTR output flow-control, which we don't use */ ! opt = cflag & CLOCAL ? 0 : CD1400_MCOR1_CDzd; #ifdef SOFT_CTS_OFLOW if (cflag & CCTS_OFLOW) --- 1970,1978 ---- /* * set modem change option register 1 * generate modem interrupts on which 1 -> 0 input transitions * also controls auto-DTR output flow-control, which we don't use */ ! opt = CD1400_MCOR1_CDzd; #ifdef SOFT_CTS_OFLOW if (cflag & CCTS_OFLOW) *************** *** 1934,1938 **** * generate modem interrupts on specific 0 -> 1 input transitions */ ! opt = cflag & CLOCAL ? 0 : CD1400_MCOR2_CDod; #ifdef SOFT_CTS_OFLOW if (cflag & CCTS_OFLOW) --- 1985,1989 ---- * generate modem interrupts on specific 0 -> 1 input transitions */ ! opt = CD1400_MCOR2_CDod; #ifdef SOFT_CTS_OFLOW if (cflag & CCTS_OFLOW) --- >Hardware problem as in the driver not understand the hardware, or >hardware as in fried chips hardware? Fried. The failures seemed to be random. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612021206.XAA20862>