hw/char/sh_serial: fix break detection flag

sh_serial_receive_break() set bit 4 of the status register (sr) instead
of SH_SERIAL_FLAG_BRK (bit 3) in the flags field. The read path checks
flags, not sr, so break events were never visible to the guest.

Fixes: 63242a007a ("SH4: Serial controller improvement")
Reported-by: Pavee Hui <phui@google.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Yoshinori Sato <yoshinori.sato@nifty.com>
Message-ID: <20261004-issue-4560-v1-38-ccbef537cbeb@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
This commit is contained in:
Marc-André Lureau authored and Philippe Mathieu-Daudé committed 2026-10-28 09:25:46 +01:00
1 parent 863c33a3c0
commit e4ee8ec002
1 file changed
+1 -1
+1 -1
View File
@@ -322,7 +322,7 @@ static int sh_serial_can_receive(SHSerialState *s)
static void sh_serial_receive_break(SHSerialState *s)
{
if (s->feat & SH_SERIAL_FEAT_SCIF) {
s->sr |= (1 << 4);
s->flags |= SH_SERIAL_FLAG_BRK;
}
}