mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] igb: Add MII write support
@ 2024-06-04  3:10 jackie.jone
  2024-06-05 20:51 ` Jacob Keller
  2024-06-11 11:08 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
  0 siblings, 2 replies; 11+ messages in thread
From: jackie.jone @ 2024-06-04  3:10 UTC (permalink / raw)
  To: davem
  Cc: jesse.brandeburg, anthony.l.nguyen, kuba, intel-wired-lan,
	netdev, linux-kernel, chris.packham, jackie.jone

From: Jackie Jone <jackie.jone@alliedtelesis.co.nz>

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>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 03a4da6a1447..7fbfcf01fbf9 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -8977,6 +8977,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;
 	}

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-06-11 11:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-04  3:10 [PATCH] igb: Add MII write support jackie.jone
2024-06-05 20:51 ` Jacob Keller
2024-06-05 21:10   ` Chris Packham
2024-06-05 21:16     ` Jacob Keller
2024-06-05 21:30       ` Chris Packham
2024-06-06  4:30       ` [Intel-wired-lan] " Loktionov, Aleksandr
2024-06-06 15:41   ` Andrew Lunn
2024-06-06 16:56     ` Jacob Keller
2024-06-06 18:31       ` Andrew Lunn
2024-06-06 18:39         ` Jacob Keller
2024-06-11 11:08 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®