summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hw/usb/dev-storage.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index 6ffaf70..bdbe7bd 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -193,9 +193,9 @@ static void usb_msd_send_status(MSDState *s, USBPacket *p)
int len;
DPRINTF("Command status %d tag 0x%x, len %zd\n",
- s->csw.status, s->csw.tag, p->iov.size);
+ s->csw.status, le32_to_cpu(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));
@@ -233,7 +233,7 @@ static void usb_msd_command_complete(SCSIRequest *req, uint32_t status, size_t r
s->csw.sig = cpu_to_le32(0x53425355);
s->csw.tag = cpu_to_le32(req->tag);
- s->csw.residue = s->residue;
+ s->csw.residue = cpu_to_le32(s->residue);
s->csw.status = status != 0;
if (s->packet) {
OpenPOWER on IntegriCloud