On Fri, Jan 11, 2013 at 5:29 PM, Stefan Sperling <s...@openbsd.org> wrote: > I see. So this is happening during pms_probe() which runs before the > protocol is selected. Maybe fix it like this? I think the code should > cope with hardware that returns unrecognizable garbage. But I don't > know very much about PS/2. > > Thanks for pinning down the problem! > > Index: pckbc.c > =================================================================== > RCS file: /cvs/src/sys/dev/ic/pckbc.c,v > retrieving revision 1.31 > diff -u -p -r1.31 pckbc.c > --- pckbc.c 17 Oct 2012 19:16:10 -0000 1.31 > +++ pckbc.c 12 Jan 2013 01:25:41 -0000 > @@ -620,6 +620,11 @@ pckbc_poll_cmd1(struct pckbc_internal *t > #ifdef PCKBCDEBUG > printf("pckbc_cmd: lost 0x%x\n", c); > #endif > + /* Don't retry cmd forever. */ > + if (cmd->retries++ >= 5) { > + cmd->status = EIO; > + return; > + } > } > > while (cmd->responseidx < cmd->responselen) {
That patch works fine. Tested on i386 on nT-i1250. Thanks for pointing me in the right direction!