diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2023-04-01 20:58:54 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2023-04-01 22:39:35 +0200 |
commit | fdc857358747fcf0c905779e3f114af66feeab1a (patch) | |
tree | 6a295edbc13c97587f40ea804ced23c1ce9de010 /target/linux/generic/backport-5.15 | |
parent | ed86454578efa1ae9e0ea522c8612e2b7c36b6dd (diff) | |
download | upstream-fdc857358747fcf0c905779e3f114af66feeab1a.tar.gz upstream-fdc857358747fcf0c905779e3f114af66feeab1a.tar.bz2 upstream-fdc857358747fcf0c905779e3f114af66feeab1a.zip |
kernel: backport upstreamed DSA B53 MMAP patch
Move the patch from pending to backport, since it has been accepted upstream:
https://github.com/torvalds/linux/commit/45977e58ce65ed0459edc9a0466d9dfea09463f5
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/generic/backport-5.15')
-rw-r--r-- | target/linux/generic/backport-5.15/743-v6.3-0005-net-dsa-b53-mmap-add-phy-ops.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/target/linux/generic/backport-5.15/743-v6.3-0005-net-dsa-b53-mmap-add-phy-ops.patch b/target/linux/generic/backport-5.15/743-v6.3-0005-net-dsa-b53-mmap-add-phy-ops.patch new file mode 100644 index 0000000000..f35ae2588b --- /dev/null +++ b/target/linux/generic/backport-5.15/743-v6.3-0005-net-dsa-b53-mmap-add-phy-ops.patch @@ -0,0 +1,49 @@ +From 45977e58ce65ed0459edc9a0466d9dfea09463f5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com> +Date: Thu, 23 Mar 2023 20:48:41 +0100 +Subject: [PATCH] net: dsa: b53: mmap: add phy ops +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Implement phy_read16() and phy_write16() ops for B53 MMAP to avoid accessing +B53_PORT_MII_PAGE registers which hangs the device. +This access should be done through the MDIO Mux bus controller. + +Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> +Acked-by: Florian Fainelli <f.fainelli@gmail.com> +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + drivers/net/dsa/b53/b53_mmap.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +--- a/drivers/net/dsa/b53/b53_mmap.c ++++ b/drivers/net/dsa/b53/b53_mmap.c +@@ -216,6 +216,18 @@ static int b53_mmap_write64(struct b53_d + return 0; + } + ++static int b53_mmap_phy_read16(struct b53_device *dev, int addr, int reg, ++ u16 *value) ++{ ++ return -EIO; ++} ++ ++static int b53_mmap_phy_write16(struct b53_device *dev, int addr, int reg, ++ u16 value) ++{ ++ return -EIO; ++} ++ + static const struct b53_io_ops b53_mmap_ops = { + .read8 = b53_mmap_read8, + .read16 = b53_mmap_read16, +@@ -227,6 +239,8 @@ static const struct b53_io_ops b53_mmap_ + .write32 = b53_mmap_write32, + .write48 = b53_mmap_write48, + .write64 = b53_mmap_write64, ++ .phy_read16 = b53_mmap_phy_read16, ++ .phy_write16 = b53_mmap_phy_write16, + }; + + static int b53_mmap_probe_of(struct platform_device *pdev, |