summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2026-01-23 05:27:34 +0300
committerJakub Kicinski <kuba@kernel.org>2026-01-23 05:27:35 +0300
commit3b87882bb399bf6d1900a1c2cc8dde65d336680a (patch)
tree87afe886fb6f8838275c7a00c0b9e00e81808d24 /include
parent31d44a37820f00de8156d1c1960dbf1bf04263c2 (diff)
parentdc6597fab3e3d291da9e0b4c6f7da01a5a863e80 (diff)
downloadlinux-3b87882bb399bf6d1900a1c2cc8dde65d336680a.tar.xz
Merge branch 'net-stmmac-dwmac-enforce-preamble-before-sfd-for-i-mx8mp'
Stefan Eichenberger says: ==================== net: stmmac: dwmac: enforce preamble before SFD for i.MX8MP This series adds a new phy_device flag PHY_F_KEEP_PREAMBLE_BEFORE_SFD that allows a MAC driver to request to keep the preamble bytes before the start frame delimiter (SFD) when receiving frames from the PHY. This flag is set in the stmmac driver for the i.MX8MP SoC due to errata (ERR050694), which causes it to drop frames without a preamble. The Micrel KSZ9131 PHY supports keeping the preamble before SFD by setting an undocumented flag, that was confirmed by NXP and Micrel. This new feature has been added to the Micrel PHY driver for the KSZ9131 PHY. ==================== Link: https://patch.msgid.link/20260120203905.23805-1-eichest@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/phy.h5
-rw-r--r--include/linux/stmmac.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 5972f19af16d..6f9979a26892 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -810,8 +810,9 @@ struct phy_device {
};
/* Generic phy_device::dev_flags */
-#define PHY_F_NO_IRQ 0x80000000
-#define PHY_F_RXC_ALWAYS_ON 0x40000000
+#define PHY_F_NO_IRQ 0x80000000
+#define PHY_F_RXC_ALWAYS_ON 0x40000000
+#define PHY_F_KEEP_PREAMBLE_BEFORE_SFD 0x20000000
#define to_phy_device(__dev) container_of_const(to_mdio_device(__dev), struct phy_device, mdio)
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index f1054b9c2d8a..e308c98c7bd3 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -191,6 +191,7 @@ enum dwmac_core_type {
#define STMMAC_FLAG_EN_TX_LPI_CLOCKGATING BIT(11)
#define STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP BIT(12)
#define STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY BIT(13)
+#define STMMAC_FLAG_KEEP_PREAMBLE_BEFORE_SFD BIT(14)
struct mac_device_info;