[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH v2 01/15] imx_fec: Do not link to netdev
From: |
Andrey Smirnov |
Subject: |
[Qemu-arm] [PATCH v2 01/15] imx_fec: Do not link to netdev |
Date: |
Thu, 14 Dec 2017 06:52:41 -0800 |
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 <address@hidden>
Cc: Jason Wang <address@hidden>
Cc: Philippe Mathieu-Daudé <address@hidden>
Cc: address@hidden
Cc: address@hidden
Cc: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Andrey Smirnov <address@hidden>
---
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 26fd214004..2ed7146c52 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
- [Qemu-arm] [PATCH v2 00/15] i.MX FEC and SD changes, Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 02/15] imx_fec: Refactor imx_eth_enable_rx(), Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 01/15] imx_fec: Do not link to netdev,
Andrey Smirnov <=
- [Qemu-arm] [PATCH v2 03/15] imx_fec: Change queue flushing heuristics, Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 04/15] imx_fec: Move Tx frame buffer away from the stack, Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 05/15] imx_fec: Use ENET_FTRL to determine truncation length, Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 06/15] imx_fec: Use MIN instead of explicit ternary operator, Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 07/15] imx_fec: Emulate SHIFT16 in ENETx_RACC, Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 08/15] imx_fec: Add support for multiple Tx DMA rings, Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 10/15] imx_fec: Fix a typo in imx_enet_receive(), Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 09/15] imx_fec: Use correct length for packet size, Andrey Smirnov, 2017/12/14