Make zs_iflush not loop indefinitly. Some Mac PowerBooks lie about having
two SCC channels, and can get stuck in an infinite loop. This change stops after flushing 4 bytes. Might need upping to 8 bytes if we support 85230 ESCC's. Idea bounced off of scottr & gwr
This commit is contained in:
parent
15a8029930
commit
84c6b9dbd7
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: z8530sc.c,v 1.7 1998/02/19 21:26:10 mycroft Exp $ */
|
||||
/* $NetBSD: z8530sc.c,v 1.8 1998/03/05 22:03:34 wrstuden Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Gordon W. Ross
|
||||
|
@ -92,8 +92,13 @@ zs_iflush(cs)
|
|||
struct zs_chanstate *cs;
|
||||
{
|
||||
u_char c, rr0, rr1;
|
||||
int i;
|
||||
|
||||
for (;;) {
|
||||
/*
|
||||
* Count how many times we loop. Some systems, such as some
|
||||
* Apple PowerBooks, claim to have SCC's which they really don't.
|
||||
*/
|
||||
for (i=0; i<4; i++) {
|
||||
/* Is there input available? */
|
||||
rr0 = zs_read_csr(cs);
|
||||
if ((rr0 & ZSRR0_RX_READY) == 0)
|
||||
|
|
Loading…
Reference in New Issue