mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-25 10:42:21 +03:00
nvethernet: macsec: Do not enable car in virt case
Issue: Clocks and resets would be taken care by server if enabled Fix: Skip enabling macsec clocks and resets if virtualization is enabled Bug 3743615 Change-Id: I0ed13d7ba52279652619b5cac406c2b2ffd503a5 Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2755780 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Mahesh Patil <maheshp@nvidia.com> Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
617b7327a9
commit
f502700729
@@ -342,9 +342,11 @@ int macsec_resume(struct macsec_priv_data *macsec_pdata)
|
||||
{
|
||||
struct ether_priv_data *pdata = macsec_pdata->ether_pdata;
|
||||
struct device *dev = pdata->dev;
|
||||
struct osi_core_priv_data *osi_core = pdata->osi_core;
|
||||
int ret = 0;
|
||||
|
||||
if (macsec_pdata->ns_rst) {
|
||||
if ((osi_core->use_virtualization == OSI_DISABLE) &&
|
||||
(macsec_pdata->ns_rst)) {
|
||||
ret = reset_control_reset(macsec_pdata->ns_rst);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to reset macsec\n");
|
||||
@@ -1601,10 +1603,12 @@ int macsec_probe(struct ether_priv_data *pdata)
|
||||
}
|
||||
|
||||
/* Enable CAR */
|
||||
ret = macsec_enable_car(macsec_pdata);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "Unable to enable macsec clks & reset\n");
|
||||
goto car_err;
|
||||
if (osi_core->use_virtualization == OSI_DISABLE) {
|
||||
ret = macsec_enable_car(macsec_pdata);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "Unable to enable macsec clks & reset\n");
|
||||
goto car_err;
|
||||
}
|
||||
}
|
||||
|
||||
/* Register macsec generic netlink ops */
|
||||
@@ -1638,7 +1642,9 @@ int macsec_probe(struct ether_priv_data *pdata)
|
||||
PRINT_EXIT();
|
||||
return ret;
|
||||
genl_err:
|
||||
macsec_disable_car(macsec_pdata);
|
||||
if (osi_core->use_virtualization == OSI_DISABLE) {
|
||||
macsec_disable_car(macsec_pdata);
|
||||
}
|
||||
car_err:
|
||||
macsec_release_platform_res(macsec_pdata);
|
||||
init_err:
|
||||
|
||||
Reference in New Issue
Block a user