@@ -423,6 +423,34 @@ int bcm_phy_28nm_a0b0_afe_config_init(struct phy_device *phydev)
}
EXPORT_SYMBOL_GPL(bcm_phy_28nm_a0b0_afe_config_init);
+int bcm_phy_enable_jumbo(struct phy_device *phydev)
+{
+ int val = 0, ret = 0;
+
+ ret = phy_write(phydev, MII_BCM54XX_AUX_CTL,
+ MII_BCM54XX_AUXCTL_SHDWSEL_MISC);
+ if (ret < 0)
+ return ret;
+
+ val = phy_read(phydev, MII_BCM54XX_AUX_CTL);
+
+ /* Enable extended length packet reception */
+ val |= MII_BCM54XX_AUXCTL_ACTL_EXT_PKT_LEN;
+ ret = phy_write(phydev, MII_BCM54XX_AUX_CTL, val);
+
+ if (ret < 0)
+ return ret;
+
+ val = phy_read(phydev, MII_BCM54XX_ECR);
+
+ /* Enable 10K byte packet length reception */
+ val |= BIT(0);
+ ret = phy_write(phydev, MII_BCM54XX_ECR, val);
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(bcm_phy_enable_jumbo);
+
MODULE_DESCRIPTION("Broadcom PHY Library");
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Broadcom Corporation");
@@ -65,5 +65,6 @@ void bcm_phy_get_stats(struct phy_device *phydev, u64 *shadow,
struct ethtool_stats *stats, u64 *data);
void bcm_phy_r_rc_cal_reset(struct phy_device *phydev);
int bcm_phy_28nm_a0b0_afe_config_init(struct phy_device *phydev);
+int bcm_phy_enable_jumbo(struct phy_device *phydev);
#endif /* _LINUX_BCM_PHY_LIB_H */
@@ -178,6 +178,10 @@ static int bcm7xxx_28nm_config_init(struct phy_device *phydev)
break;
}
+ if (ret)
+ return ret;
+
+ ret = bcm_phy_enable_jumbo(phydev);
if (ret)
return ret;
@@ -119,6 +119,7 @@
#define MII_BCM54XX_AUXCTL_SHDWSEL_AUXCTL 0x00
#define MII_BCM54XX_AUXCTL_ACTL_TX_6DB 0x0400
#define MII_BCM54XX_AUXCTL_ACTL_SMDSP_ENA 0x0800
+#define MII_BCM54XX_AUXCTL_ACTL_EXT_PKT_LEN 0x4000
#define MII_BCM54XX_AUXCTL_SHDWSEL_MISC 0x07
#define MII_BCM54XX_AUXCTL_SHDWSEL_MISC_WIRESPEED_EN 0x0010