Skip to content

Commit 3140075

Browse files
Hariprasad Kelamdavem330
authored andcommitted
octeontx2-pf: Fix ethtool support for SDP representors
The hardware supports multiple MAC types, including RPM, SDP, and LBK. However, features such as link settings and pause frames are only available on RPM MAC, and not supported on SDP or LBK. This patch updates the ethtool operations logic accordingly to reflect this behavior. Fixes: 2f7f33a ("octeontx2-pf: Add representors for sdp MAC") Signed-off-by: Hariprasad Kelam <hkelam@marvell.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 9d8a99c commit 3140075

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ static void otx2_get_pauseparam(struct net_device *netdev,
315315
struct otx2_nic *pfvf = netdev_priv(netdev);
316316
struct cgx_pause_frm_cfg *req, *rsp;
317317

318-
if (is_otx2_lbkvf(pfvf->pdev))
318+
if (is_otx2_lbkvf(pfvf->pdev) || is_otx2_sdp_rep(pfvf->pdev))
319319
return;
320320

321321
mutex_lock(&pfvf->mbox.lock);
@@ -347,7 +347,7 @@ static int otx2_set_pauseparam(struct net_device *netdev,
347347
if (pause->autoneg)
348348
return -EOPNOTSUPP;
349349

350-
if (is_otx2_lbkvf(pfvf->pdev))
350+
if (is_otx2_lbkvf(pfvf->pdev) || is_otx2_sdp_rep(pfvf->pdev))
351351
return -EOPNOTSUPP;
352352

353353
if (pause->rx_pause)
@@ -941,8 +941,8 @@ static u32 otx2_get_link(struct net_device *netdev)
941941
{
942942
struct otx2_nic *pfvf = netdev_priv(netdev);
943943

944-
/* LBK link is internal and always UP */
945-
if (is_otx2_lbkvf(pfvf->pdev))
944+
/* LBK and SDP links are internal and always UP */
945+
if (is_otx2_lbkvf(pfvf->pdev) || is_otx2_sdp_rep(pfvf->pdev))
946946
return 1;
947947
return pfvf->linfo.link_up;
948948
}
@@ -1413,7 +1413,7 @@ static int otx2vf_get_link_ksettings(struct net_device *netdev,
14131413
{
14141414
struct otx2_nic *pfvf = netdev_priv(netdev);
14151415

1416-
if (is_otx2_lbkvf(pfvf->pdev)) {
1416+
if (is_otx2_lbkvf(pfvf->pdev) || is_otx2_sdp_rep(pfvf->pdev)) {
14171417
cmd->base.duplex = DUPLEX_FULL;
14181418
cmd->base.speed = SPEED_100000;
14191419
} else {

0 commit comments

Comments
 (0)