Date: Fri, 27 Jun 1997 17:31:23 +1000 From: Bruce Evans <bde@zeta.org.au> To: hackers@freebsd.org, mcgovern@spoon.beta.com Subject: Re: XON/XOFF intrusion... Message-ID: <199706270731.RAA16915@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>I'm having a problem with a driver where XON and XOFFs are being introduced >to the data stream, even when I have IXON, IXOFF, and IXANY turned off >in c_iflag. This shouldn't happen. Spurious XONs and XOFFs are only introduced into the output data stream when the line discipline is the default (termios) and IXOFF is set, at least by the machine-independent part of the driver. IXON and IXANY have no effect on the output data stream. >I know (through programming and printf()s) that c_iflag has the above >mentioned bits off, and that ((tp->t_rawq + tp->t_canq) < (TTYHOG / 2)). Perhaps IXOFF is actually set and tp->t_rawq + tp->t_canq grows soon after you look at it. I_HIGH_WATER is too small for some devices. Flow control won't work if the device ever buffers more than about 512 bytes of input. TTYHOG is too small for some devices. Flow control can't work if the device ever buffers more than about TTYHOG (= 1024) bytes of input. Drivers should read from the device often enough to reduce the burst length to <= 256. At 115200 bps, this means that they must read from the device at least once every 22.2 msec. In practice this means reading every clock tick. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706270731.RAA16915>