mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 17:55:05 +03:00
nvethernet: update speed and mode in fixed link
Issue: in caseof interface down and up the speed and mode values are incorrect incase of fixed link Fix: In case of fixed link restore speed and mode values based on the iface mode Bug 3359851 Bug 200765222 Change-Id: Iacd1cb2212c0783bb5e361205cbf62f64b197325 Signed-off-by: Narayan Reddy <narayanr@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2584629 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
f415855538
commit
36d784d40e
@@ -867,6 +867,16 @@ static void ether_adjust_link(struct net_device *dev)
|
||||
}
|
||||
}
|
||||
|
||||
if (pdata->fixed_link == OSI_ENABLE) {
|
||||
if (pdata->osi_core->mac == OSI_MAC_HW_MGBE) {
|
||||
if (iface_mode == OSI_XFI_MODE_10G) {
|
||||
phydev->speed = OSI_SPEED_10000;
|
||||
} else if (iface_mode == OSI_XFI_MODE_5G) {
|
||||
phydev->speed = OSI_SPEED_5000;
|
||||
}
|
||||
phydev->duplex = OSI_FULL_DUPLEX;
|
||||
}
|
||||
}
|
||||
if (phydev->duplex != pdata->oldduplex) {
|
||||
new_state = 1;
|
||||
ioctl_data.cmd = OSI_CMD_SET_MODE;
|
||||
@@ -5144,6 +5154,7 @@ static int ether_parse_phy_dt(struct ether_priv_data *pdata,
|
||||
if ((pdata->phy_node == NULL) && of_phy_is_fixed_link(node)) {
|
||||
if ((of_phy_register_fixed_link(node) < 0))
|
||||
return -ENODEV;
|
||||
pdata->fixed_link = OSI_ENABLE;
|
||||
pdata->phy_node = of_node_get(node);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user