mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
rust: pl011: match break logic of C version
Check loopback_enabled(), not fifo_enabled(), like the C code. Also, set_break_error() must not happen until the break is read from the FIFO. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
ffb0945140
commit
ac096b0bef
1 changed files with 1 additions and 2 deletions
|
@ -460,9 +460,8 @@ impl PL011State {
|
|||
}
|
||||
|
||||
pub fn event(&mut self, event: QEMUChrEvent) {
|
||||
if event == bindings::QEMUChrEvent::CHR_EVENT_BREAK && !self.fifo_enabled() {
|
||||
if event == bindings::QEMUChrEvent::CHR_EVENT_BREAK && !self.loopback_enabled() {
|
||||
self.put_fifo(DATA_BREAK);
|
||||
self.receive_status_error_clear.set_break_error(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue