Read back the ack from keyboard controller after sending command and data to set leds - otherwise controller can hang. Reference: /n/sources/patch/applied/setleds-nohang Date: Tue Jun 14 11:40:59 CES 2011 Signed-off-by: miller@hamnavoe.com --- /sys/src/9/pc/kbd.c Tue Jun 14 11:38:40 2011 +++ /sys/src/9/pc/kbd.c Tue Jun 14 11:38:36 2011 @@ -349,8 +349,12 @@ ilock(&i8042lock); outready(); outb(Data, 0xed); /* `reset keyboard lock states' */ + if(inready() == 0) + inb(Data); outready(); outb(Data, leds); + if(inready() == 0) + inb(Data); outready(); iunlock(&i8042lock); }