Commit a012f9a7 authored by Jackie Jone's avatar Jackie Jone Committed by Paolo Abeni
Browse files

igb: Add MII write support



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: default avatarJackie Jone <jackie.jone@alliedtelesis.co.nz>
Acked-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20240618213330.982046-1-anthony.l.nguyen@intel.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent e3511997
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;
	}