From: Benjamin Herrenschmidt <[email protected]> This fixes a broken endian assumption in an assertion in usb-msd.
Cc: Gerd Hoffman <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: David Gibson <[email protected]> --- hw/usb-msd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/usb-msd.c b/hw/usb-msd.c index c6f08a0..c18e76d 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)); -- 1.7.9.1
