All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Bommert <marc@brightwise.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Strange behaviour in network device initialization.
Date: Sun, 19 Mar 2017 14:41:01 +0100 (CET)	[thread overview]
Message-ID: <556061744.76602.1489930862122@communicator.strato.de> (raw)
In-Reply-To: <CAFEAcA-82Hx102VSxxsxD_20RSRCG6BWWtvtxpY4vhWnQTFo-g@mail.gmail.com>

> Peter Maydell <peter.maydell@linaro.org> hat am 18. März 2017 um 23:22 geschrieben:
> 
> This is expected, because you're creating two devices.
> Device 1 is the one that's created by calling
> mydevice_init() here in the board code.
> Device 2 is created because you say "-device mydevice"
> on the command line.

I see. Already played around with omitting it, but I also have sporadic connectivity issues with the tap device, so I thought I would need it to link the device with the NIC on the command line. Oops.
 
> The slightly odd thing is that -device mydevice
> doesn't fail for you -- if you try that for smc91c111 it
> will complain:
>  "Device smc91c111 cannot be dynamically instantiated"
> to let you know that the command line option is wrong.

I suppose this is the output of add_fdt_node() in hw/arm/sysbus-fdt.c, so I'll try to reverse why that succeeds for my platform. That's a good pointer.

> PS: smc91c111 is not a very good model to copy,
> because that device code is very old, and doesn't
> necessarily follow current QEMU coding practices.
> Looking at a device that's been added to QEMU
> more recently may be a better idea.

I'll stick with it for prototyping. Probably I picked versatilepb as a blueprint because it is better understandable and complete, with lesser indirections.

Still, so many opportunities to make errors when you work your way into this stuff.
Thank you for your time, Peter.

- Marc

      reply	other threads:[~2017-03-19 13:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-18 18:15 [Qemu-devel] Error checking and qemu_thread_create Anton Volkov
2017-03-18 21:15 ` [Qemu-devel] Strange behaviour in network device initialization Marc Bommert
2017-03-18 22:22   ` Peter Maydell
2017-03-19 13:41     ` Marc Bommert [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=556061744.76602.1489930862122@communicator.strato.de \
    --to=marc@brightwise.de \
    --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.