Patchwork Endian fix an assertion in usb-msd

login
register
mail settings
Submitter Benjamin Herrenschmidt
Date Jan. 13, 2012, 6:33 a.m.
Message ID <1326436421.26116.3.camel@pasglop>
Download mbox | patch
Permalink /patch/135723/
State New
Headers show

Comments

Benjamin Herrenschmidt - Jan. 13, 2012, 6:33 a.m.
I stumbled across that one while debugging some
other issue... 

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 hw/usb-msd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/hw/usb-msd.c b/hw/usb-msd.c
index e427296..28271fc 100644
--- a/hw/usb-msd.c
+++ b/hw/usb-msd.c
@@ -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));