nvethernet:Move blocking MACSec in PHY to server

Removed the below functionality from Linux OSD as we moved
the same to ethernet server to avoid implementation in QNX OSD

- Restrict enabling MACSec in PHY

Bug 5221921

Change-Id: I0cbdeccfe91a67060a4609b9b8bc2bf842547b99
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3341020
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Sanath Kumar Gampa
2025-04-15 05:15:30 -07:00
committed by Jon Hunter
parent d3e0d8bb36
commit 7fec719a7c
2 changed files with 0 additions and 54 deletions

View File

@@ -2900,26 +2900,6 @@ static int ether_mdio_write(struct mii_bus *bus, int phyaddr, int phyreg,
"%s:No clks available, skipping PHY write\n", __func__);
return -ENODEV;
}
if (pdata->phy_str != NULL) {
// For MV-Q3244 0x401e002a is pointing to 0x407C2780 value pointed by Sau Loh from Mrvl
if (strcmp(pdata->phy_str, "MVQ3244") == 0) {
if ((phyreg == MACSEC_REG_MVQ3244) && ((phydata & OSI_BIT(1)) == 0U)) {
dev_err(pdata->dev,
"restricting access to enable macsec in MVQ3244 PHY \n");
return -ENODEV;
}
// For 88Q2221M dev 0x1F and Register 0xa008 is pointed to 0x401fa008
} else if (strcmp(pdata->phy_str, "88Q2221M") == 0) {
if ((phyaddr == MACSEC_REG_88Q2221M) &&
(((phydata & OSI_BIT(5)) == 0U) || ((phydata & OSI_BIT(6)) == 0U))) {
dev_err(pdata->dev,
"restricting access to enable macsec in 88Q221M PHY \n");
return -ENODEV;
}
} else {
/** Do Nothing for other PHY types */
}
}
return osi_write_phy_reg(pdata->osi_core, (unsigned int)phyaddr,
(unsigned int)phyreg, phydata);
@@ -4371,29 +4351,6 @@ static int ether_handle_priv_wmdio_ioctl(struct ether_priv_data *pdata,
prtad = mdio_phy_id_prtad(mii_data->phy_id);
devad = mdio_phy_id_devad(mii_data->phy_id);
devad = ether_mdio_c45_addr(devad, mii_data->reg_num);
if (pdata->phy_str != NULL) {
// For MV-Q3244 0x401e002a is pointing to 0x407C2780 value pointed by Sau Loh from Mrvl
if (strcmp(pdata->phy_str, "MVQ3244") == 0) {
if ((devad == MACSEC_REG_MVQ3244) &&
((mii_data->val_in & OSI_BIT(1)) == 0U)) {
dev_err(pdata->dev,
"restricting access to enable macsec in MVQ3244 PHY \n");
return -ENODEV;
}
// For 88Q2221M dev 0x1F and Register 0xa008 is pointed to 0x401fa008
} else if (strcmp(pdata->phy_str, "88Q2221M") == 0) {
if ((devad == MACSEC_REG_88Q2221M) &&
(((mii_data->val_in & OSI_BIT(5)) == 0U) ||
((mii_data->val_in & OSI_BIT(6)) == 0U))) {
dev_err(pdata->dev,
"restricting access to enable macsec in 88Q2221M PHY \n");
return -ENODEV;
}
} else {
/** Do Nothing for other PHY types */
}
}
} else {
prtad = mii_data->phy_id;
devad = mii_data->reg_num;
@@ -7482,9 +7439,6 @@ int ether_probe(struct platform_device *pdev)
}
}
/* Read PHY type from DT */
(void)of_property_read_string(pdata->dev->of_node,
"nvidia,phy_type", &pdata->phy_str);
/* Set netdev features based on hw features */
ether_set_ndev_features(ndev, pdata);