The keyboard controller now correctly processes IBF even if OBF is set, fixes AMIBIOS 6.x machines such as the Supermicro P6SBA.

This commit is contained in:
OBattler
2023-04-07 15:23:09 +02:00
parent e567780fe8
commit 9ea3014c59

View File

@@ -823,7 +823,7 @@ kbd_poll(void *priv)
break;
/* Process commands and/or monitor the attached devices. */
case KBC_STATE_NORMAL:
if (!(dev->status & STAT_OFULL)) {
/* Always process IBF, even if OBF is set. */
if (dev->status & STAT_IFULL) {
dev->status &= ~STAT_IFULL;
if ((dev->status & STAT_CD) || dev->want60)
@@ -836,7 +836,7 @@ kbd_poll(void *priv)
dev->key_dat = dev->ib;
dev->kbc_state = KBC_STATE_KBD;
}
} else {
} else if (!(dev->status & STAT_OFULL)) {
if (key_ctrl_queue_start != key_ctrl_queue_end) {
kbd_log("ATkbc: %02X coming from channel 0\n", dev->out_new & 0xff);
add_to_kbc_queue_front(dev, key_ctrl_queue[key_ctrl_queue_start], 0, 0x00);
@@ -851,7 +851,6 @@ kbd_poll(void *priv)
dev->out_new = -1;
}
}
}
break;
/* Wait for keyboard command response. */
case KBC_STATE_KBD: