qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	qemu-devel@nongnu.org, Howard Spoelstra <hsp.cat7@gmail.com>
Subject: Re: OHCI/usb pass through
Date: Fri, 1 Oct 2021 14:22:00 +0200	[thread overview]
Message-ID: <20211001122200.wjmzcheu4aunlhq7@sirius.home.kraxel.org> (raw)
In-Reply-To: <81cbbb94-c4dd-dde2-d98a-7487269169cf@eik.bme.hu>

  Hi,

> > > We can get the endpoint from a packet and from ohci so
> > > I wonder if we can get the active packet from ep->queue (and how to do that)
> > 
> > I think ohci never looks beyond the active td so there should never be
> > more than one packet on the list.
> 
> OK, how to get the packet from that QTAILQ list? If there are multiple
> packets is the active one first or last? How to get that? I could try to
> find the answers in the code but I realy did not want to spend much time
> with it just trying to help Howard so I'd like to ask for some help with
> this.

See include/qemu/queue.h, QTAILQ_FIRST() is what you need.  Returns NULL
when the queue is empty.  There is also a separate QLIST_EMPTY() helper.

grepping in hw/usb/*.c should find you code examples in other host
adapters code.

take care,
  Gerd



      reply	other threads:[~2021-10-01 12:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-01  1:31 OHCI/usb pass through BALATON Zoltan
2021-10-01  4:39 ` Gerd Hoffmann
2021-10-01 11:35   ` BALATON Zoltan
2021-10-01 12:22     ` 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=20211001122200.wjmzcheu4aunlhq7@sirius.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=balaton@eik.bme.hu \
    --cc=hsp.cat7@gmail.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --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).