mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 09:42:19 +03:00
nvethernet: enable GPSLCE
Enable Gaint Packet Size Limit Control when MTU size is greater than 9000 Bug 200561709 Change-Id: Ied21e03e0cc5dddd9a2a8d47ffbaccd542937fb5 Signed-off-by: narayanr <narayanr@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2303740 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
405a6ed9ed
commit
9980e3e524
@@ -2259,6 +2259,13 @@ static int ether_change_mtu(struct net_device *ndev, int new_mtu)
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
if (new_mtu > OSI_MTU_SIZE_9000 && osi_dma->num_dma_chans != 1U) {
|
||||
netdev_err(pdata->ndev,
|
||||
"MTU greater than %d is valid only in single channel configuration\n"
|
||||
, OSI_MTU_SIZE_9000);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ndev->mtu = new_mtu;
|
||||
osi_core->mtu = new_mtu;
|
||||
osi_dma->mtu = new_mtu;
|
||||
@@ -3383,14 +3390,14 @@ static int ether_parse_dt(struct ether_priv_data *pdata)
|
||||
&pdata->max_platform_mtu);
|
||||
if (ret < 0) {
|
||||
dev_info(dev, "max-platform-mtu DT entry missing, setting default %d\n",
|
||||
ETHER_DEFAULT_PLATFORM_MTU);
|
||||
pdata->max_platform_mtu = ETHER_DEFAULT_PLATFORM_MTU;
|
||||
OSI_DFLT_MTU_SIZE);
|
||||
pdata->max_platform_mtu = OSI_DFLT_MTU_SIZE;
|
||||
} else {
|
||||
if (pdata->max_platform_mtu > ETHER_MAX_HW_MTU ||
|
||||
if (pdata->max_platform_mtu > OSI_MAX_MTU_SIZE ||
|
||||
pdata->max_platform_mtu < ETH_MIN_MTU) {
|
||||
dev_info(dev, "Invalid max-platform-mtu, setting default %d\n",
|
||||
ETHER_DEFAULT_PLATFORM_MTU);
|
||||
pdata->max_platform_mtu = ETHER_DEFAULT_PLATFORM_MTU;
|
||||
OSI_DFLT_MTU_SIZE);
|
||||
pdata->max_platform_mtu = OSI_DFLT_MTU_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user