include/linux/poison.h: remove not-used poison pointer macros
[firefly-linux-kernel-4.4.55.git] / include / linux / phy.h
index a26c3f84b8ddc6c15e2abbecf47a588419534b11..962387a192f1570211db2eb1d8e5e1c1c9031a60 100644 (file)
@@ -330,6 +330,7 @@ struct phy_c45_device_ids {
  * c45_ids: 802.3-c45 Device Identifers if is_c45.
  * is_c45:  Set to true if this phy uses clause 45 addressing.
  * is_internal: Set to true if this phy is internal to a MAC.
+ * is_pseudo_fixed_link: Set to true if this phy is an Ethernet switch, etc.
  * has_fixups: Set to true if this phy has fixups/quirks.
  * suspended: Set to true if this phy has been suspended successfully.
  * state: state of the PHY for management purposes
@@ -368,6 +369,7 @@ struct phy_device {
        struct phy_c45_device_ids c45_ids;
        bool is_c45;
        bool is_internal;
+       bool is_pseudo_fixed_link;
        bool has_fixups;
        bool suspended;
 
@@ -424,6 +426,8 @@ struct phy_device {
 
        struct net_device *attached_dev;
 
+       u8 mdix;
+
        void (*adjust_link)(struct net_device *dev);
 };
 #define to_phy_device(d) container_of(d, struct phy_device, dev)
@@ -686,6 +690,16 @@ static inline bool phy_interface_is_rgmii(struct phy_device *phydev)
 {
        return phydev->interface >= PHY_INTERFACE_MODE_RGMII &&
                phydev->interface <= PHY_INTERFACE_MODE_RGMII_TXID;
+};
+
+/*
+ * phy_is_pseudo_fixed_link - Convenience function for testing if this
+ * PHY is the CPU port facing side of an Ethernet switch, or similar.
+ * @phydev: the phy_device struct
+ */
+static inline bool phy_is_pseudo_fixed_link(struct phy_device *phydev)
+{
+       return phydev->is_pseudo_fixed_link;
 }
 
 /**