aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/layerscape/patches-5.4/701-net-0376-Revert-mii-Add-helpers-for-parsing-SGMII-auto-negoti.patch
diff options
context:
space:
mode:
authorYangbo Lu <yangbo.lu@nxp.com>2020-04-10 10:47:05 +0800
committerPetr Štetiar <ynezz@true.cz>2020-05-07 12:53:06 +0200
commitcddd4591404fb4c53dc0b3c0b15b942cdbed4356 (patch)
tree392c1179de46b0f804e3789edca19069b64e6b44 /target/linux/layerscape/patches-5.4/701-net-0376-Revert-mii-Add-helpers-for-parsing-SGMII-auto-negoti.patch
parentd1d2c0b5579ea4f69a42246c9318539d61ba1999 (diff)
downloadupstream-cddd4591404fb4c53dc0b3c0b15b942cdbed4356.tar.gz
upstream-cddd4591404fb4c53dc0b3c0b15b942cdbed4356.tar.bz2
upstream-cddd4591404fb4c53dc0b3c0b15b942cdbed4356.zip
layerscape: add patches-5.4
Add patches for linux-5.4. The patches are from NXP LSDK-20.04 release which was tagged LSDK-20.04-V5.4. https://source.codeaurora.org/external/qoriq/qoriq-components/linux/ For boards LS1021A-IOT, and Traverse-LS1043 which are not involved in LSDK, port the dts patches from 4.14. The patches are sorted into the following categories: 301-arch-xxxx 302-dts-xxxx 303-core-xxxx 701-net-xxxx 801-audio-xxxx 802-can-xxxx 803-clock-xxxx 804-crypto-xxxx 805-display-xxxx 806-dma-xxxx 807-gpio-xxxx 808-i2c-xxxx 809-jailhouse-xxxx 810-keys-xxxx 811-kvm-xxxx 812-pcie-xxxx 813-pm-xxxx 814-qe-xxxx 815-sata-xxxx 816-sdhc-xxxx 817-spi-xxxx 818-thermal-xxxx 819-uart-xxxx 820-usb-xxxx 821-vfio-xxxx Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Diffstat (limited to 'target/linux/layerscape/patches-5.4/701-net-0376-Revert-mii-Add-helpers-for-parsing-SGMII-auto-negoti.patch')
-rw-r--r--target/linux/layerscape/patches-5.4/701-net-0376-Revert-mii-Add-helpers-for-parsing-SGMII-auto-negoti.patch110
1 files changed, 110 insertions, 0 deletions
diff --git a/target/linux/layerscape/patches-5.4/701-net-0376-Revert-mii-Add-helpers-for-parsing-SGMII-auto-negoti.patch b/target/linux/layerscape/patches-5.4/701-net-0376-Revert-mii-Add-helpers-for-parsing-SGMII-auto-negoti.patch
new file mode 100644
index 0000000000..3831cac482
--- /dev/null
+++ b/target/linux/layerscape/patches-5.4/701-net-0376-Revert-mii-Add-helpers-for-parsing-SGMII-auto-negoti.patch
@@ -0,0 +1,110 @@
+From c6f9fb78b7534392d3be307e566d10c8525c7c9a Mon Sep 17 00:00:00 2001
+From: Vladimir Oltean <vladimir.oltean@nxp.com>
+Date: Mon, 6 Jan 2020 14:32:06 +0200
+Subject: [PATCH] Revert "mii: Add helpers for parsing SGMII auto-negotiation"
+
+This reverts commit de81e3c1ccbf27eda7584e23c713705a221a57da.
+
+Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
+---
+ include/linux/mii.h | 50 ------------------------------------------------
+ include/uapi/linux/mii.h | 10 ----------
+ 2 files changed, 60 deletions(-)
+
+--- a/include/linux/mii.h
++++ b/include/linux/mii.h
+@@ -373,56 +373,6 @@ static inline u32 mii_lpa_to_ethtool_lpa
+ }
+
+ /**
+- * mii_lpa_mod_linkmode_adv_sgmii
+- * @lp_advertising: pointer to destination link mode.
+- * @lpa: value of the MII_LPA register
+- *
+- * A small helper function that translates MII_LPA bits to
+- * linkmode advertisement settings for SGMII.
+- * Leaves other bits unchanged.
+- */
+-static inline void
+-mii_lpa_mod_linkmode_lpa_sgmii(unsigned long *lp_advertising, u32 lpa)
+-{
+- u32 speed_duplex = lpa & LPA_SGMII_DPX_SPD_MASK;
+-
+- linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT, lp_advertising,
+- speed_duplex == LPA_SGMII_1000HALF);
+-
+- linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT, lp_advertising,
+- speed_duplex == LPA_SGMII_1000FULL);
+-
+- linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT, lp_advertising,
+- speed_duplex == LPA_SGMII_100HALF);
+-
+- linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, lp_advertising,
+- speed_duplex == LPA_SGMII_100FULL);
+-
+- linkmode_mod_bit(ETHTOOL_LINK_MODE_10baseT_Half_BIT, lp_advertising,
+- speed_duplex == LPA_SGMII_10HALF);
+-
+- linkmode_mod_bit(ETHTOOL_LINK_MODE_10baseT_Full_BIT, lp_advertising,
+- speed_duplex == LPA_SGMII_10FULL);
+-}
+-
+-/**
+- * mii_lpa_to_linkmode_adv_sgmii
+- * @advertising: pointer to destination link mode.
+- * @lpa: value of the MII_LPA register
+- *
+- * A small helper function that translates MII_ADVERTISE bits
+- * to linkmode advertisement settings when in SGMII mode.
+- * Clears the old value of advertising.
+- */
+-static inline void mii_lpa_to_linkmode_lpa_sgmii(unsigned long *lp_advertising,
+- u32 lpa)
+-{
+- linkmode_zero(lp_advertising);
+-
+- mii_lpa_mod_linkmode_lpa_sgmii(lp_advertising, lpa);
+-}
+-
+-/**
+ * mii_adv_mod_linkmode_adv_t
+ * @advertising:pointer to destination link mode.
+ * @adv: value of the MII_ADVERTISE register
+--- a/include/uapi/linux/mii.h
++++ b/include/uapi/linux/mii.h
+@@ -71,7 +71,6 @@
+ /* Advertisement control register. */
+ #define ADVERTISE_SLCT 0x001f /* Selector bits */
+ #define ADVERTISE_CSMA 0x0001 /* Only selector supported */
+-#define ADVERTISE_SGMII 0x0001 /* Can do SGMII */
+ #define ADVERTISE_10HALF 0x0020 /* Try for 10mbps half-duplex */
+ #define ADVERTISE_1000XFULL 0x0020 /* Try for 1000BASE-X full-duplex */
+ #define ADVERTISE_10FULL 0x0040 /* Try for 10mbps full-duplex */
+@@ -95,7 +94,6 @@
+
+ /* Link partner ability register. */
+ #define LPA_SLCT 0x001f /* Same as advertise selector */
+-#define LPA_SGMII 0x0001 /* Can do SGMII */
+ #define LPA_10HALF 0x0020 /* Can do 10mbps half-duplex */
+ #define LPA_1000XFULL 0x0020 /* Can do 1000BASE-X full-duplex */
+ #define LPA_10FULL 0x0040 /* Can do 10mbps full-duplex */
+@@ -106,19 +104,11 @@
+ #define LPA_1000XPAUSE_ASYM 0x0100 /* Can do 1000BASE-X pause asym*/
+ #define LPA_100BASE4 0x0200 /* Can do 100mbps 4k packets */
+ #define LPA_PAUSE_CAP 0x0400 /* Can pause */
+-#define LPA_SGMII_DPX_SPD_MASK 0x1C00 /* SGMII duplex and speed bits */
+-#define LPA_SGMII_10HALF 0x0000 /* Can do SGMII 10mbps half-duplex */
+-#define LPA_SGMII_10FULL 0x1000 /* Can do SGMII 10mbps full-duplex */
+-#define LPA_SGMII_100HALF 0x0400 /* Can do SGMII 100mbps half-duplex */
+-#define LPA_SGMII_100FULL 0x1400 /* Can do SGMII 100mbps full-duplex */
+ #define LPA_PAUSE_ASYM 0x0800 /* Can pause asymetrically */
+-#define LPA_SGMII_1000HALF 0x0800 /* Can do SGMII 1000mbps half-duplex */
+-#define LPA_SGMII_1000FULL 0x1800 /* Can do SGMII 1000mbps full-duplex */
+ #define LPA_RESV 0x1000 /* Unused... */
+ #define LPA_RFAULT 0x2000 /* Link partner faulted */
+ #define LPA_LPACK 0x4000 /* Link partner acked us */
+ #define LPA_NPAGE 0x8000 /* Next page bit */
+-#define LPA_SGMII_LINK 0x8000 /* Link partner has link */
+
+ #define LPA_DUPLEX (LPA_10FULL | LPA_100FULL)
+ #define LPA_100 (LPA_100FULL | LPA_100HALF | LPA_100BASE4)