Index: sys/arch/evbarm/dev/plcom.c =================================================================== RCS file: /cvsroot/src/sys/arch/evbarm/dev/plcom.c,v retrieving revision 1.56 diff -u -p -r1.56 plcom.c --- sys/arch/evbarm/dev/plcom.c 23 Oct 2018 09:15:36 -0000 1.56 +++ sys/arch/evbarm/dev/plcom.c 23 Jul 2019 12:06:49 -0000 @@ -2275,7 +2275,7 @@ int plcom_common_getc(dev_t dev, struct plcom_instance *pi) { int s = splserial(); - u_char stat, c; + u_char /*stat, */c; /* got a character from reading things earlier */ if (plcom_readaheadcount > 0) { @@ -2290,10 +2290,15 @@ plcom_common_getc(dev_t dev, struct plco return c; } + if (ISSET(PREAD1(pi, PL01XCOM_FR), PL01X_FR_RXFE)) { + splx(s); + return -1; + } +#if 0 /* block until a character becomes available */ while (ISSET(stat = PREAD1(pi, PL01XCOM_FR), PL01X_FR_RXFE)) ; - +#endif c = PREAD1(pi, PL01XCOM_DR); { int cn_trapped __unused = 0; @@ -2520,7 +2525,7 @@ plcom_is_console(bus_space_tag_t iot, bu #ifdef KGDB else if (!plcom_kgdb_attached && bus_space_is_equal(iot, plcomkgdb_info.pi_iot) && - iobase == plcomkgdb_info.pi_iobase) + iobase == plcomkgdb_info.pi_iobase) help = plcomkgdb_info.pi_ioh; #endif else