From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, patches@linaro.org
Subject: [Qemu-devel] [PATCH] hw/usb-musb.c: Don't misuse usb_packet_complete()
Date: Tue, 14 Jun 2011 12:24:04 +0100 [thread overview]
Message-ID: <1308050644-4622-1-git-send-email-peter.maydell@linaro.org> (raw)
In musb_packet() handle final processing of non-asynchronous
USB packets by directly calling musb_schedule_cb() rather than
going through usb_packet_complete(). The latter will trigger
an assertion because the packet doesn't belong to a device.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
The fix here is as suggested by Gerd.
hw/usb-musb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/usb-musb.c b/hw/usb-musb.c
index 6037193..3eed855 100644
--- a/hw/usb-musb.c
+++ b/hw/usb-musb.c
@@ -611,7 +611,7 @@ static void musb_packet(MUSBState *s, MUSBEndPoint *ep,
}
ep->status[dir] = ret;
- usb_packet_complete(s->port.dev, &ep->packey[dir].p);
+ musb_schedule_cb(s->port.dev, &ep->packey[dir].p);
}
static void musb_tx_packet_complete(USBPacket *packey, void *opaque)
--
1.7.1
next reply other threads:[~2011-06-14 11:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-14 11:24 Peter Maydell [this message]
2011-06-29 9:43 ` [Qemu-devel] [PATCH] hw/usb-musb.c: Don't misuse usb_packet_complete() Peter Maydell
2011-06-29 9:58 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1308050644-4622-1-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=kraxel@redhat.com \
--cc=patches@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).