aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/patches-4.19/534-net-mvneta-remove-redundant-check-for.patch
diff options
context:
space:
mode:
authorScott Roberts <ttocsr@gmail.com>2019-09-27 14:19:01 -0600
committerHauke Mehrtens <hauke@hauke-m.de>2019-10-12 23:43:08 +0200
commitd2a1075973728b55231688809b68a0f0b93c9da4 (patch)
treeaa026543b3be26f0e5b71c4596f9e7a4b440e486 /target/linux/mvebu/patches-4.19/534-net-mvneta-remove-redundant-check-for.patch
parente11fc8439c9f7230441408c4d257efc46f372312 (diff)
downloadupstream-d2a1075973728b55231688809b68a0f0b93c9da4.tar.gz
upstream-d2a1075973728b55231688809b68a0f0b93c9da4.tar.bz2
upstream-d2a1075973728b55231688809b68a0f0b93c9da4.zip
mvebu: backport mvneta and comphy from linux 5.x
These patches backport support for the ARMADA 3700 COMPHY driver. Also backported is the mvneta driver. This will allow switching the SGMII speed using SMC calls. To support this you must update the firmware using Marvells 18.12 version (this has now been upstreamed). The mvneta driver allows 2500basex and 2500baset. Signed-off-by: Scott Roberts <ttocsr@gmail.com>
Diffstat (limited to 'target/linux/mvebu/patches-4.19/534-net-mvneta-remove-redundant-check-for.patch')
-rw-r--r--target/linux/mvebu/patches-4.19/534-net-mvneta-remove-redundant-check-for.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-4.19/534-net-mvneta-remove-redundant-check-for.patch b/target/linux/mvebu/patches-4.19/534-net-mvneta-remove-redundant-check-for.patch
new file mode 100644
index 0000000000..005ea6e51e
--- /dev/null
+++ b/target/linux/mvebu/patches-4.19/534-net-mvneta-remove-redundant-check-for.patch
@@ -0,0 +1,30 @@
+From e4a3e9ff5ba9f6b67595ec2768ed4be2054c2aa5 Mon Sep 17 00:00:00 2001
+From: YueHaibing <yuehaibing@huawei.com>
+Date: Thu, 22 Nov 2018 14:42:00 +0800
+Subject: [PATCH] net: mvneta: remove redundant check for
+ eee->tx_lpi_timer < 0
+
+fixes the smatch warning:
+
+drivers/net/ethernet/marvell/mvneta.c:4252 mvneta_ethtool_set_eee() warn:
+ unsigned 'eee->tx_lpi_timer' is never less than zero.
+
+Signed-off-by: YueHaibing <yuehaibing@huawei.com>
+Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/ethernet/marvell/mvneta.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/marvell/mvneta.c
++++ b/drivers/net/ethernet/marvell/mvneta.c
+@@ -4253,8 +4253,7 @@ static int mvneta_ethtool_set_eee(struct
+
+ /* The Armada 37x documents do not give limits for this other than
+ * it being an 8-bit register. */
+- if (eee->tx_lpi_enabled &&
+- (eee->tx_lpi_timer < 0 || eee->tx_lpi_timer > 255))
++ if (eee->tx_lpi_enabled && eee->tx_lpi_timer > 255)
+ return -EINVAL;
+
+ lpi_ctl0 = mvreg_read(pp, MVNETA_LPI_CTRL_0);