Skip to contentSkip to conversation

Endian fix an assertion in usb-msd

PATCH New Benjamin Herrenschmidt 1 participant 1 message Jan 13, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Endian fix an assertion in usb-msd

I stumbled across that one while debugging some
other issue...

---
 hw/usb-msd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/usb-msd.c +1 -1
index e427296..28271fc 100644
@@ -195,7 +195,7 @@ static void usb_msd_send_status(MSDState *s, USBPacket *p)
     DPRINTF("Command status %d tag 0x%x, len %zd\n",
             s->csw.status, s->csw.tag, p->iov.size);
 
-    assert(s->csw.sig == 0x53425355);
+    assert(s->csw.sig == cpu_to_le32(0x53425355));
     len = MIN(sizeof(s->csw), p->iov.size);
     usb_packet_copy(p, &s->csw, len);
     memset(&s->csw, 0, sizeof(s->csw));