[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/7] rust: pl011: match break logic of C version
From: |
Paolo Bonzini |
Subject: |
[PATCH 2/7] rust: pl011: match break logic of C version |
Date: |
Thu, 12 Dec 2024 18:21:59 +0100 |
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.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
rust/hw/char/pl011/src/device.rs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/device.rs
index 41220c99a83..c6a8dbe1af4 100644
--- a/rust/hw/char/pl011/src/device.rs
+++ b/rust/hw/char/pl011/src/device.rs
@@ -465,9 +465,8 @@ pub fn can_receive(&self) -> bool {
}
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);
}
}
--
2.47.1
- [PATCH 0/7] rust: pl011: bug fixes, Paolo Bonzini, 2024/12/12
- [PATCH 1/7] rust: pl011: fix declaration of LineControl bits, Paolo Bonzini, 2024/12/12
- [PATCH 3/7] rust: pl011: always use reset() method on registers, Paolo Bonzini, 2024/12/12
- [PATCH 4/7] rust: pl011: fix break errors and definition of Data struct, Paolo Bonzini, 2024/12/12
- [PATCH 2/7] rust: pl011: match break logic of C version,
Paolo Bonzini <=
- [PATCH 6/7] rust: pl011: fix migration stream, Paolo Bonzini, 2024/12/12
- [PATCH 5/7] rust: pl011: extend registers to 32 bits, Paolo Bonzini, 2024/12/12
- [PATCH 7/7] rust: pl011: simplify handling of the FIFO enabled bit in LCR, Paolo Bonzini, 2024/12/12