nvethernet: bringup on kernel-5.4

disable chip-id.h APIs on kernel-5.4 since
the file is still not available.

Back compatible with older kernel versions

Bug 200591808

Change-Id: Ib991ad02ba016ac9f186b5c8afdc8608c780d9be
Signed-off-by: Bibhay Ranjan <bibhayr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2304494
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Bibhay Ranjan
2020-02-28 14:27:07 +05:30
committed by Revanth Kumar Uppala
parent e42f49ee42
commit 619f3c7b7d
5 changed files with 65 additions and 21 deletions

View File

@@ -467,8 +467,13 @@ static void ether_get_pauseparam(struct net_device *ndev,
/* return if pause frame is not supported */
if ((pdata->osi_core->pause_frames == OSI_PAUSE_FRAMES_DISABLE) ||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0))
(!linkmode_test_bit(SUPPORTED_Pause, phydev->supported) ||
!linkmode_test_bit(SUPPORTED_Asym_Pause, phydev->supported))) {
#else
(!(phydev->supported & SUPPORTED_Pause) ||
!(phydev->supported & SUPPORTED_Asym_Pause))) {
#endif
dev_err(pdata->dev, "FLOW control not supported\n");
return;
}
@@ -517,8 +522,13 @@ static int ether_set_pauseparam(struct net_device *ndev,
/* return if pause frame is not supported */
if ((pdata->osi_core->pause_frames == OSI_PAUSE_FRAMES_DISABLE) ||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0))
(!linkmode_test_bit(SUPPORTED_Pause, phydev->supported) ||
!linkmode_test_bit(SUPPORTED_Asym_Pause, phydev->supported))) {
#else
(!(phydev->supported & SUPPORTED_Pause) ||
!(phydev->supported & SUPPORTED_Asym_Pause))) {
#endif
dev_err(pdata->dev, "FLOW control not supported\n");
return -EOPNOTSUPP;
}