From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: qemu-arm@nongnu.org
Cc: "Andrey Smirnov" <andrew.smirnov@gmail.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Jason Wang" <jasowang@redhat.com>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
qemu-devel@nongnu.org, yurovsky@gmail.com
Subject: [Qemu-devel] [PATCH v3 01/11] imx_fec: Do not link to netdev
Date: Tue, 2 Jan 2018 11:36:12 -0800 [thread overview]
Message-ID: <20180102193622.27215-2-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <20180102193622.27215-1-andrew.smirnov@gmail.com>
Binding to a particular netdev doesn't seem to belong to this layer
and should probably be done as a part of board or SoC specific code.
Convert all of the users of this IP block to use
qdev_set_nic_properties() instead.
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
Cc: qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org
Cc: yurovsky@gmail.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
hw/arm/fsl-imx6.c | 1 +
hw/net/imx_fec.c | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c
index 59ef33efa9..b0d4088290 100644
--- a/hw/arm/fsl-imx6.c
+++ b/hw/arm/fsl-imx6.c
@@ -385,6 +385,7 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp)
spi_table[i].irq));
}
+ qdev_set_nic_properties(DEVICE(&s->eth), &nd_table[0]);
object_property_set_bool(OBJECT(&s->eth), true, "realized", &err);
if (err) {
error_propagate(errp, err);
diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c
index 90e6ee35ba..88b4b049d7 100644
--- a/hw/net/imx_fec.c
+++ b/hw/net/imx_fec.c
@@ -1171,8 +1171,6 @@ static void imx_eth_realize(DeviceState *dev, Error **errp)
qemu_macaddr_default_if_unset(&s->conf.macaddr);
- s->conf.peers.ncs[0] = nd_table[0].netdev;
-
s->nic = qemu_new_nic(&imx_eth_net_info, &s->conf,
object_get_typename(OBJECT(dev)),
DEVICE(dev)->id, s);
--
2.14.3
next prev parent reply other threads:[~2018-01-02 19:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-02 19:36 [Qemu-devel] [PATCH v3 00/11] i.MX FEC changes Andrey Smirnov
2018-01-02 19:36 ` Andrey Smirnov [this message]
2018-01-02 19:36 ` [Qemu-devel] [PATCH v3 02/11] imx_fec: Refactor imx_eth_enable_rx() Andrey Smirnov
2018-01-02 19:36 ` [Qemu-devel] [PATCH v3 03/11] imx_fec: Change queue flushing heuristics Andrey Smirnov
2018-01-02 19:36 ` [Qemu-devel] [PATCH v3 04/11] imx_fec: Move Tx frame buffer away from the stack Andrey Smirnov
2018-01-08 13:58 ` Peter Maydell
2018-01-02 19:36 ` [Qemu-devel] [PATCH v3 05/11] imx_fec: Use ENET_FTRL to determine truncation length Andrey Smirnov
2018-01-08 14:00 ` Peter Maydell
2018-01-02 19:36 ` [Qemu-devel] [PATCH v3 06/11] imx_fec: Use MIN instead of explicit ternary operator Andrey Smirnov
2018-01-02 19:36 ` [Qemu-devel] [PATCH v3 07/11] imx_fec: Emulate SHIFT16 in ENETx_RACC Andrey Smirnov
2018-01-02 19:36 ` [Qemu-devel] [PATCH v3 08/11] imx_fec: Add support for multiple Tx DMA rings Andrey Smirnov
2018-01-02 19:36 ` [Qemu-devel] [PATCH v3 09/11] imx_fec: Use correct length for packet size Andrey Smirnov
2018-01-02 19:36 ` [Qemu-devel] [PATCH v3 10/11] imx_fec: Fix a typo in imx_enet_receive() Andrey Smirnov
2018-01-02 19:36 ` [Qemu-devel] [PATCH v3 11/11] imx_fec: Reserve full FSL_IMX25_FEC_SIZE page for the register file Andrey Smirnov
2018-01-08 14:26 ` [Qemu-devel] [PATCH v3 00/11] i.MX FEC changes Peter Maydell
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=20180102193622.27215-2-andrew.smirnov@gmail.com \
--to=andrew.smirnov@gmail.com \
--cc=f4bug@amsat.org \
--cc=jasowang@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=yurovsky@gmail.com \
/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).