[openwrt/openwrt] ath25: Remove virt_to_phys() from Ethernet driver
LEDE Commits
lede-commits at lists.infradead.org
Fri May 19 03:00:22 PDT 2023
hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/13656378e94a5f0e148a7726818fdaa4ccb231e0
commit 13656378e94a5f0e148a7726818fdaa4ccb231e0
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Thu May 18 16:17:58 2023 +0200
ath25: Remove virt_to_phys() from Ethernet driver
Instead of defining an own virt_to_phys() use the version from the
generic MIPS arch code which does the same.
This fixes a compile warning.
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
target/linux/ath25/patches-5.15/110-ar2313_ethernet.patch | 4 +---
.../ath25/patches-5.15/220-enet_micrel_workaround.patch | 14 +++++++-------
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/target/linux/ath25/patches-5.15/110-ar2313_ethernet.patch b/target/linux/ath25/patches-5.15/110-ar2313_ethernet.patch
index bd998b1427..fcb6abff7d 100644
--- a/target/linux/ath25/patches-5.15/110-ar2313_ethernet.patch
+++ b/target/linux/ath25/patches-5.15/110-ar2313_ethernet.patch
@@ -33,7 +33,7 @@
+obj-$(CONFIG_NET_AR231X) += ar231x.o
--- /dev/null
+++ b/drivers/net/ethernet/atheros/ar231x/ar231x.c
-@@ -0,0 +1,1119 @@
+@@ -0,0 +1,1117 @@
+/*
+ * ar231x.c: Linux driver for the Atheros AR231x Ethernet device.
+ *
@@ -156,8 +156,6 @@
+MODULE_DESCRIPTION("AR231x Ethernet driver");
+#endif
+
-+#define virt_to_phys(x) ((u32)(x) & 0x1fffffff)
-+
+/* prototypes */
+static void ar231x_halt(struct net_device *dev);
+static void rx_tasklet_func(unsigned long data);
diff --git a/target/linux/ath25/patches-5.15/220-enet_micrel_workaround.patch b/target/linux/ath25/patches-5.15/220-enet_micrel_workaround.patch
index 2bd0815631..b97cb3622f 100644
--- a/target/linux/ath25/patches-5.15/220-enet_micrel_workaround.patch
+++ b/target/linux/ath25/patches-5.15/220-enet_micrel_workaround.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/ethernet/atheros/ar231x/ar231x.c
+++ b/drivers/net/ethernet/atheros/ar231x/ar231x.c
-@@ -135,6 +135,7 @@ static int ar231x_mdiobus_write(struct m
+@@ -133,6 +133,7 @@ static int ar231x_mdiobus_write(struct m
static int ar231x_mdiobus_reset(struct mii_bus *bus);
static int ar231x_mdiobus_probe(struct net_device *dev);
static void ar231x_adjust_link(struct net_device *dev);
@@ -8,7 +8,7 @@
#ifndef ERR
#define ERR(fmt, args...) printk("%s: " fmt, __func__, ##args)
-@@ -166,6 +167,32 @@ static const struct net_device_ops ar231
+@@ -164,6 +165,32 @@ static const struct net_device_ops ar231
#endif
};
@@ -41,7 +41,7 @@
static int ar231x_probe(struct platform_device *pdev)
{
struct net_device *dev;
-@@ -273,6 +300,24 @@ static int ar231x_probe(struct platform_
+@@ -271,6 +298,24 @@ static int ar231x_probe(struct platform_
mdiobus_register(sp->mii_bus);
@@ -66,7 +66,7 @@
if (ar231x_mdiobus_probe(dev) != 0) {
printk(KERN_ERR "%s: mdiobus_probe failed\n", dev->name);
rx_tasklet_cleanup(dev);
-@@ -326,8 +371,10 @@ static int ar231x_remove(struct platform
+@@ -324,8 +369,10 @@ static int ar231x_remove(struct platform
rx_tasklet_cleanup(dev);
ar231x_init_cleanup(dev);
unregister_netdev(dev);
@@ -79,7 +79,7 @@
kfree(dev);
return 0;
}
-@@ -870,7 +917,8 @@ static int ar231x_open(struct net_device
+@@ -868,7 +915,8 @@ static int ar231x_open(struct net_device
sp->eth_regs->mac_control |= MAC_CONTROL_RE;
@@ -89,7 +89,7 @@
return 0;
}
-@@ -951,7 +999,8 @@ static int ar231x_close(struct net_devic
+@@ -949,7 +997,8 @@ static int ar231x_close(struct net_devic
#endif
@@ -99,7 +99,7 @@
return 0;
}
-@@ -995,6 +1044,9 @@ static int ar231x_ioctl(struct net_devic
+@@ -993,6 +1042,9 @@ static int ar231x_ioctl(struct net_devic
{
struct ar231x_private *sp = netdev_priv(dev);
More information about the lede-commits
mailing list