Call DEV_pci_set_irq() only if the IRQ level really changes. The Bochs IRQ
routing code is possibly buggy, since it can make multiple UHCI devices fail in a multi-function device (like EHCI).
This commit is contained in:
parent
2f94f55a82
commit
e19f28dad7
@ -129,6 +129,7 @@ void bx_uhci_core_c::reset_uhci(unsigned type)
|
||||
// reset locals
|
||||
busy = 0;
|
||||
global_reset = 0;
|
||||
hub.irq_level = 0;
|
||||
|
||||
// Put the USB registers into their RESET state
|
||||
hub.usb_command.max_packet_size = 0;
|
||||
@ -221,6 +222,7 @@ void bx_uhci_core_c::register_state(bx_list_c *parent)
|
||||
}
|
||||
register_pci_state(hub1);
|
||||
|
||||
BXRS_PARAM_BOOL(hub1, irq_level, hub.irq_level);
|
||||
BXRS_PARAM_BOOL(list, busy, busy);
|
||||
BXRS_DEC_PARAM_FIELD(list, global_reset, global_reset);
|
||||
}
|
||||
@ -255,7 +257,10 @@ void bx_uhci_core_c::update_irq()
|
||||
} else {
|
||||
level = 0;
|
||||
}
|
||||
DEV_pci_set_irq(hub.devfunc, pci_conf[0x3d], level);
|
||||
if (level != hub.irq_level) {
|
||||
DEV_pci_set_irq(hub.devfunc, pci_conf[0x3d], level);
|
||||
hub.irq_level = level;
|
||||
}
|
||||
}
|
||||
|
||||
// static IO port read callback handler
|
||||
|
@ -149,6 +149,7 @@ typedef struct {
|
||||
} usb_port[USB_UHCI_PORTS];
|
||||
|
||||
Bit8u devfunc;
|
||||
bx_bool irq_level;
|
||||
} bx_uhci_core_t;
|
||||
|
||||
#pragma pack (push, 1)
|
||||
|
Loading…
Reference in New Issue
Block a user