diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2024-12-04 16:40:29 +0100 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-12-19 19:36:38 +0100 |
| commit | ac096b0bef98a79fafb1254fef121a175c9b73fc (patch) | |
| tree | 38d72ef36a372842407f004cfc213a6d49a1b734 | |
| parent | ffb0945140fde217507c5a56c3ab2fcb47ba94fa (diff) | |
| download | focaccia-qemu-ac096b0bef98a79fafb1254fef121a175c9b73fc.tar.gz focaccia-qemu-ac096b0bef98a79fafb1254fef121a175c9b73fc.zip | |
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>
| -rw-r--r-- | rust/hw/char/pl011/src/device.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/device.rs index e85d13c5a2..960ee38ed6 100644 --- a/rust/hw/char/pl011/src/device.rs +++ b/rust/hw/char/pl011/src/device.rs @@ -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); } } |