Skip to content

Commit

Permalink
igb: Add MII write support
Browse files Browse the repository at this point in the history
To facilitate running PHY parametric tests, add support for the SIOCSMIIREG
ioctl. This allows a userspace application to write to the PHY registers
to enable the test modes.

Signed-off-by: Jackie Jone <jackie.jone@alliedtelesis.co.nz>
Acked-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20240618213330.982046-1-anthony.l.nguyen@intel.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Jackie Jone authored and Paolo Abeni committed Jun 20, 2024
1 parent e351199 commit a012f9a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/intel/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -9139,6 +9139,10 @@ static int igb_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
return -EIO;
break;
case SIOCSMIIREG:
if (igb_write_phy_reg(&adapter->hw, data->reg_num & 0x1F,
data->val_in))
return -EIO;
break;
default:
return -EOPNOTSUPP;
}
Expand Down

0 comments on commit a012f9a

Please sign in to comment.