All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] usb-musb: calls usb_packet_complete() on packets with no owner
Date: Tue, 14 Jun 2011 09:16:36 +0200	[thread overview]
Message-ID: <4DF70AD4.1030409@redhat.com> (raw)
In-Reply-To: <BANLkTi=-U4GwwPMX=NyS-isRae-66zKDaw@mail.gmail.com>

   Hi,

>      usb_packet_complete(s->port.dev,&ep->packey[dir].p);
>
> which will call usb_packet_complete() on packets which did not
> return USB_RET_ASYNC from usb_handle_packet, and so trips this
> assert.

> Any suggestions about what the right way to fix this is?
> (I'm a bit confused about the comment that usb_packet_complete
> is to 'notify the controller' -- usb-musb is the controller...)

The usual work flow is that the usb device (usb-msd.c does this for 
example) kicks the I/O, then returns USB_RET_ASYNC, and when the I/O is 
completed it calls usb_packet_complete().

In case of the musb controller this will call musb_schedule_cb() which 
is hooked into musb_port_ops->complete.  So simply calling 
musb_schedule_cb() directly for non-async packets should work I think.

cheers,
   Gerd

      reply	other threads:[~2011-06-14  7:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-13 11:39 [Qemu-devel] usb-musb: calls usb_packet_complete() on packets with no owner Peter Maydell
2011-06-14  7:16 ` Gerd Hoffmann [this message]

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=4DF70AD4.1030409@redhat.com \
    --to=kraxel@redhat.com \
    --cc=peter.maydell@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.