e1242fc339
A patch was added in kernel 5.4 to support the fiber operation of AR8033 with ramips devices. In kernel 5.18 similar enhancements were added to the kernel. Those patches are required for other fiber based devices but when added, build fails for ramips targets. This commit removes the ramips patch and adds the kernel 5.18 ones. Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de> [ split commit,refresh patch and improve commit message ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
32 lines
1.0 KiB
Diff
32 lines
1.0 KiB
Diff
From 1f0dd412e34e177621769866bef347f0b22364df Mon Sep 17 00:00:00 2001
|
|
From: Wei Yongjun <weiyongjun1@huawei.com>
|
|
Date: Fri, 18 Nov 2022 10:36:35 +0000
|
|
Subject: [PATCH] net: phy: at803x: fix error return code in at803x_probe()
|
|
|
|
Fix to return a negative error code from the ccr read error handling
|
|
case instead of 0, as done elsewhere in this function.
|
|
|
|
Fixes: 3265f4218878 ("net: phy: at803x: add fiber support")
|
|
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
|
|
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
|
Link: https://lore.kernel.org/r/20221118103635.254256-1-weiyongjun@huaweicloud.com
|
|
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
---
|
|
drivers/net/phy/at803x.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/net/phy/at803x.c
|
|
+++ b/drivers/net/phy/at803x.c
|
|
@@ -749,8 +749,10 @@ static int at803x_probe(struct phy_devic
|
|
int ccr = phy_read(phydev, AT803X_REG_CHIP_CONFIG);
|
|
int mode_cfg;
|
|
|
|
- if (ccr < 0)
|
|
+ if (ccr < 0) {
|
|
+ ret = ccr;
|
|
goto err;
|
|
+ }
|
|
mode_cfg = ccr & AT803X_MODE_CFG_MASK;
|
|
|
|
switch (mode_cfg) {
|