qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Inti Gonzalez-Herrera <inti.glez@gmail.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] IRQ number used by virtio-net-device in vexpress-a15
Date: Thu, 14 Apr 2016 14:19:44 +0100	[thread overview]
Message-ID: <CAFEAcA-8i-cwnt5gEbMOzM19ra_1v5gLMzkJvUUiXYUNJ5icgQ@mail.gmail.com> (raw)
In-Reply-To: <570F93E9.1050204@gmail.com>

On 14 April 2016 at 13:58, Inti Gonzalez-Herrera <inti.glez@gmail.com> wrote:
> I have some problems using virtio-net-device. In particular, th system is
> not receiving an interrupt when it transmits a package. However, I can see
> how the buffer descriptors are moved to the used ring. I was thinking that
> maybe the problem is related to the fact that I don't know what is the exact
> IRQ number.
>
> In other words, let's say that I have a function enable_irq(int, handler)
> that enables a given interrupt in the GIC. What is the number n that I
> should used as parameter in this platform?
>
> Right now, I'm using the value (40 + k), where k is the index of the
> specific transporter where the network device is attached (from 0 to 3). It
> is not working.
> I get that information from file hw/arm/vexpress.c, functions
> vexpress_common_init  and vexpress_modify_dtb (this one is not executed)

Problems with interrupt numbers are almost always related to confusion
about whether the interrupt number starts with the 0 as the first
external interrupt, or 0 as the first internal interrupt (where 0..31
are SGIs and PPIs, and the first external (SPI) interrupt is 32).
The '40 + k' in the vexpress.c source code is an external interrupt
number (in which numbering scheme the PL011 UARTs are interrupts 5 to 8,
and the sp804 timer is interrupt 48, if that helps you cross-check
against some other devices in your OS which do have working interrupts).

thanks
-- PMM

  reply	other threads:[~2016-04-14 13:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-14 12:58 [Qemu-devel] IRQ number used by virtio-net-device in vexpress-a15 Inti Gonzalez-Herrera
2016-04-14 13:19 ` Peter Maydell [this message]
2016-04-14 13:30   ` Inti Gonzalez-Herrera

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=CAFEAcA-8i-cwnt5gEbMOzM19ra_1v5gLMzkJvUUiXYUNJ5icgQ@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=inti.glez@gmail.com \
    --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).