Print probe result after the LCR is restored. Otherwise, bad

things happen if we are the console.
Restore to the prevoius value (not to hardwired 8N1) because this
could be set by the serial console initialization.
Closed PR kern/4373 (Dave Huang)
This commit is contained in:
drochner 1997-10-29 18:28:07 +00:00
parent 185510c972
commit d52df86460
1 changed files with 8 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: com.c,v 1.118 1997/10/21 01:25:41 fvdl Exp $ */
/* $NetBSD: com.c,v 1.119 1997/10/29 18:28:07 drochner Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1996, 1997
@ -444,22 +444,23 @@ com_attach_subr(sc)
if (bus_space_read_1(iot, ioh, com_efr) == 0) {
CLR(sc->sc_hwflags, COM_HW_FIFO);
sc->sc_fifolen = 0;
printf(": st16650, broken fifo\n");
} else {
SET(sc->sc_hwflags, COM_HW_FLOW);
printf(": st16650a, working fifo\n");
sc->sc_fifolen = 32;
}
} else
#endif
{
printf(": ns16550a, working fifo\n");
sc->sc_fifolen = 16;
}
#ifdef COM16650
bus_space_write_1(iot, ioh, com_lcr, LCR_8BITS);
bus_space_write_1(iot, ioh, com_lcr, lcr);
if (sc->sc_fifolen == 0)
printf(": st16650, broken fifo\n");
else if (sc->sc_fifolen == 32)
printf(": st16650a, working fifo\n");
else
#endif
printf(": ns16550a, working fifo\n");
} else
printf(": ns16550, broken fifo\n");
else