lsi53c895a: clear tag byte when processing messages
Instead of simply ORing the message byte, clear what was there before. Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini committed
May 15, 2026 at 11:08 UTC
4494dec8c2bfd8a5d9b1eabe4a26ab850a4f6700
1 file changed
+3
hw/scsi/lsi53c895a.c
+3
@@ -1041,16 +1041,19 @@ static void lsi_do_msgout(LSIState *s)
1041
}
1042
break;
1043
case 0x20: /* SIMPLE queue */
1044
+ s->select_tag &= ~0xff;
1045
s->select_tag |= lsi_get_msgbyte(s) | LSI_TAG_VALID;
1046
trace_lsi_do_msgout_simplequeue(s->select_tag & 0xff);
1047
break;
1048
case 0x21: /* HEAD of queue */
1049
qemu_log_mask(LOG_UNIMP, "lsi_scsi: HEAD queue not implemented\n");
1050
+ s->select_tag &= ~0xff;
1051
s->select_tag |= lsi_get_msgbyte(s) | LSI_TAG_VALID;
1052
break;
1053
case 0x22: /* ORDERED queue */
1054
qemu_log_mask(LOG_UNIMP,
1055
"lsi_scsi: ORDERED queue not implemented\n");
1056
+ s->select_tag &= ~0xff;
1057
s->select_tag |= lsi_get_msgbyte(s) | LSI_TAG_VALID;
1058
break;
1059
case 0x0d: