Skip to content

Commit 3e88449

Browse files
Timur Tabidavem330
authored andcommitted
net: qcom/emac: configure the external phy to allow pause frames
Pause frames are used to enable flow control. A MAC can send and receive pause frames in order to throttle traffic. However, the PHY must be configured to allow those frames to pass through. Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: Timur Tabi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent cdb26d3 commit 3e88449

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/net/ethernet/qualcomm/emac/emac-mac.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,12 @@ int emac_mac_up(struct emac_adapter *adpt)
10031003
writel((u32)~DIS_INT, adpt->base + EMAC_INT_STATUS);
10041004
writel(adpt->irq.mask, adpt->base + EMAC_INT_MASK);
10051005

1006+
/* Enable pause frames. Without this feature, the EMAC has been shown
1007+
* to receive (and drop) frames with FCS errors at gigabit connections.
1008+
*/
1009+
adpt->phydev->supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause;
1010+
adpt->phydev->advertising |= SUPPORTED_Pause | SUPPORTED_Asym_Pause;
1011+
10061012
adpt->phydev->irq = PHY_IGNORE_INTERRUPT;
10071013
phy_start(adpt->phydev);
10081014

0 commit comments

Comments
 (0)