63 lines
2.4 KiB
Diff
63 lines
2.4 KiB
Diff
|
|
From 81c2b665d9ea6670677f35aa1ab2ad68d6e73aa4 Mon Sep 17 00:00:00 2001
|
||
|
|
From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>
|
||
|
|
Date: Mon, 20 Nov 2023 12:51:15 +0100
|
||
|
|
Subject: [PATCH] hw/arm/fsl-imx: Do not ignore Error argument
|
||
|
|
MIME-Version: 1.0
|
||
|
|
Content-Type: text/plain; charset=UTF-8
|
||
|
|
Content-Transfer-Encoding: 8bit
|
||
|
|
|
||
|
|
mainline inclusion
|
||
|
|
commit 0cbb56c236a4a28f5149eed227d74bb737321cfc
|
||
|
|
category: bugfix
|
||
|
|
|
||
|
|
--------------------------------------------------------
|
||
|
|
|
||
|
|
Both i.MX25 and i.MX6 SoC models ignore the Error argument when
|
||
|
|
setting the PHY number. Pick &error_abort which is the error
|
||
|
|
used by the i.MX7 SoC (see commit 1f7197deb0 "ability to change
|
||
|
|
the FEC PHY on i.MX7 processor").
|
||
|
|
|
||
|
|
Fixes: 74c1330582 ("ability to change the FEC PHY on i.MX25 processor")
|
||
|
|
Fixes: a9c167a3c4 ("ability to change the FEC PHY on i.MX6 processor")
|
||
|
|
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
|
||
|
|
Message-id: 20231120115116.76858-1-philmd@linaro.org
|
||
|
|
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
|
||
|
|
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
||
|
|
Signed-off-by: zhujun2 <zhujun2_yewu@cmss.chinamobile.com>
|
||
|
|
---
|
||
|
|
hw/arm/fsl-imx25.c | 3 ++-
|
||
|
|
hw/arm/fsl-imx6.c | 3 ++-
|
||
|
|
2 files changed, 4 insertions(+), 2 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
|
||
|
|
index 24c4374590..9aabbf7f58 100644
|
||
|
|
--- a/hw/arm/fsl-imx25.c
|
||
|
|
+++ b/hw/arm/fsl-imx25.c
|
||
|
|
@@ -169,7 +169,8 @@ static void fsl_imx25_realize(DeviceState *dev, Error **errp)
|
||
|
|
epit_table[i].irq));
|
||
|
|
}
|
||
|
|
|
||
|
|
- object_property_set_uint(OBJECT(&s->fec), "phy-num", s->phy_num, &err);
|
||
|
|
+ object_property_set_uint(OBJECT(&s->fec), "phy-num", s->phy_num,
|
||
|
|
+ &error_abort);
|
||
|
|
qdev_set_nic_properties(DEVICE(&s->fec), &nd_table[0]);
|
||
|
|
|
||
|
|
if (!sysbus_realize(SYS_BUS_DEVICE(&s->fec), errp)) {
|
||
|
|
diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c
|
||
|
|
index 00dafe3f62..c4b95dc7a7 100644
|
||
|
|
--- a/hw/arm/fsl-imx6.c
|
||
|
|
+++ b/hw/arm/fsl-imx6.c
|
||
|
|
@@ -377,7 +377,8 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp)
|
||
|
|
spi_table[i].irq));
|
||
|
|
}
|
||
|
|
|
||
|
|
- object_property_set_uint(OBJECT(&s->eth), "phy-num", s->phy_num, &err);
|
||
|
|
+ object_property_set_uint(OBJECT(&s->eth), "phy-num", s->phy_num,
|
||
|
|
+ &error_abort);
|
||
|
|
qdev_set_nic_properties(DEVICE(&s->eth), &nd_table[0]);
|
||
|
|
if (!sysbus_realize(SYS_BUS_DEVICE(&s->eth), errp)) {
|
||
|
|
return;
|
||
|
|
--
|
||
|
|
2.27.0
|
||
|
|
|