Patchwork [2/4] lsi: check ssid versus sdid only if ssid is valid

login
register
mail settings
Submitter Hervé Poussineau
Date Sept. 13, 2013, 7:50 p.m.
Message ID <1379101857-27500-3-git-send-email-hpoussin@reactos.org>
Download mbox | patch
Permalink /patch/274861/
State New
Headers show

Comments

Hervé Poussineau - Sept. 13, 2013, 7:50 p.m.
This prevents some (invalid) error messages on console.

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
 hw/scsi/lsi53c895a.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c
index ca01e86..764feaa 100644
--- a/hw/scsi/lsi53c895a.c
+++ b/hw/scsi/lsi53c895a.c
@@ -1705,8 +1705,9 @@  static void lsi_reg_writeb(LSIState *s, int offset, uint8_t val)
         s->sxfer = val;
         break;
     case 0x06: /* SDID */
-        if ((val & 0xf) != (s->ssid & 0xf))
+        if ((s->ssid & 0x80) && (val & 0xf) != (s->ssid & 0xf)) {
             BADF("Destination ID does not match SSID\n");
+        }
         s->sdid = val & 0xf;
         break;
     case 0x07: /* GPREG0 */