Skip to contentSkip to conversation

net: phy: microchip_t1: Interrupt support for lan887x

PATCH Superseded Divya Koppera 4 participants 7 messages Sep 30, 2024 – Oct 1, 2024

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: phy: microchip_t1: Interrupt support for lan887x

Add support for link up and link down interrupts in lan887x.

---
 drivers/net/phy/microchip_t1.c | 63 ++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)
drivers/net/phy/microchip_t1.c +63 -0
index a5ef8fe50704..383050a5b0ed 100644
@@ -226,6 +226,18 @@
 #define MICROCHIP_CABLE_MAX_TIME_DIFF	\
 	(MICROCHIP_CABLE_MIN_TIME_DIFF + MICROCHIP_CABLE_TIME_MARGIN)
 
+#define LAN887X_INT_STS				0xf000
+#define LAN887X_INT_MSK				0xf001
+#define LAN887X_INT_MSK_T1_PHY_INT_MSK		BIT(2)
+#define LAN887X_INT_MSK_LINK_UP_MSK		BIT(1)
+#define LAN887X_INT_MSK_LINK_DOWN_MSK		BIT(0)
+
+#define LAN887X_MX_CHIP_TOP_LINK_MSK	(LAN887X_INT_MSK_LINK_UP_MSK |\
+					 LAN887X_INT_MSK_LINK_DOWN_MSK)
+
+#define LAN887X_MX_CHIP_TOP_ALL_MSK	(LAN887X_INT_MSK_T1_PHY_INT_MSK |\
+					 LAN887X_MX_CHIP_TOP_LINK_MSK)
+
 #define DRIVER_AUTHOR	"Nisar Sayed <[email protected]>"
 #define DRIVER_DESC	"Microchip LAN87XX/LAN937x/LAN887x T1 PHY driver"
 
@@ -1474,6 +1486,7 @@ static void lan887x_get_strings(struct phy_device *phydev, u8 *data)
 		ethtool_puts(&data, lan887x_hw_stats[i].string);
 }
 
+static int lan887x_config_intr(struct phy_device *phydev);
 static int lan887x_cd_reset(struct phy_device *phydev,
 			    enum cable_diag_state cd_done)
 {
@@ -1504,6 +1517,10 @@ static int lan887x_cd_reset(struct phy_device *phydev,
 		if (rc < 0)
 			return rc;
 
+		rc = lan887x_config_intr(phydev);
+		if (rc < 0)
+			return rc;
+
 		rc = lan887x_phy_reconfig(phydev);
 		if (rc < 0)
 			return rc;
@@ -1830,6 +1847,50 @@ static int lan887x_cable_test_get_status(struct phy_device *phydev,
 	return lan887x_cable_test_report(phydev);
 }
 
+static int lan887x_config_intr(struct phy_device *phydev)
+{
+	int ret;
+
+	if (phydev->interrupts == PHY_INTERRUPT_ENABLED) {
+		/* Clear the interrupt status before enabling interrupts */
+		ret = phy_read_mmd(phydev, MDIO_MMD_VEND1, LAN887X_INT_STS);
+		if (ret < 0)
+			return ret;
+
+		/* Unmask for enabling interrupt */
+		ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, LAN887X_INT_MSK,
+				    (u16)~LAN887X_MX_CHIP_TOP_ALL_MSK);
+	} else {
+		ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, LAN887X_INT_MSK,
+				    GENMASK(15, 0));
+		if (ret < 0)
+			return ret;
+
+		ret = phy_read_mmd(phydev, MDIO_MMD_VEND1, LAN887X_INT_STS);
+	}
+
+	return ret < 0 ? ret : 0;
+}
+
+static irqreturn_t lan887x_handle_interrupt(struct phy_device *phydev)
+{
+	int ret = IRQ_NONE;
+	int irq_status;
+
+	irq_status = phy_read_mmd(phydev, MDIO_MMD_VEND1, LAN887X_INT_STS);
+	if (irq_status < 0) {
+		phy_error(phydev);
+		return IRQ_NONE;
+	}
+
+	if (irq_status & LAN887X_MX_CHIP_TOP_LINK_MSK) {
+		phy_trigger_machine(phydev);
+		ret = IRQ_HANDLED;
+	}
+
+	return ret;
+}
+
 static struct phy_driver microchip_t1_phy_driver[] = {
 	{
 		PHY_ID_MATCH_MODEL(PHY_ID_LAN87XX),
@@ -1881,6 +1942,8 @@ static struct phy_driver microchip_t1_phy_driver[] = {
 		.read_status	= genphy_c45_read_status,
 		.cable_test_start = lan887x_cable_test_start,
 		.cable_test_get_status = lan887x_cable_test_get_status,
+		.config_intr    = lan887x_config_intr,
+		.handle_interrupt = lan887x_handle_interrupt,
 	}
 };
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 32 lines · Divya Koppera

Add support for link up and link down interrupts in lan887x.

---
 drivers/net/phy/microchip_t1.c | 63 ++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)
drivers/net/phy/microchip_t1.c +12 -0
index a5ef8fe50704..383050a5b0ed 100644
@@ -226,6 +226,18 @@
 #define MICROCHIP_CABLE_MAX_TIME_DIFF  \
        (MICROCHIP_CABLE_MIN_TIME_DIFF + MICROCHIP_CABLE_TIME_MARGIN)
 
+#define LAN887X_INT_STS                                0xf000
+#define LAN887X_INT_MSK                                0xf001
+#define LAN887X_INT_MSK_T1_PHY_INT_MSK         BIT(2)
+#define LAN887X_INT_MSK_LINK_UP_MSK            BIT(1)
+#define LAN887X_INT_MSK_LINK_DOWN_MSK          BIT(0)
+
+#define LAN887X_MX_CHIP_TOP_LINK_MSK   (LAN887X_INT_MSK_LINK_UP_MSK |\
+                                        LAN887X_INT_MSK_LINK_DOWN_MSK)
+
+#define LAN887X_MX_CHIP_TOP_ALL_MSK    (LAN887X_INT_MSK_T1_PHY_INT_MSK |\
+                                        LAN887X_MX_CHIP_TOP_LINK_MSK)
+
 #define DRIVER_AUTHOR  "Nisar Sayed <[email protected]>"
 #define DRIVER_DESC    "Microchip LAN87XX/LAN937x/LAN887x T1 PHY driver"
 

drivers/net/phy/microchip_t1.c static void lan887x_get_strings(struct phy_device *phydev, u8 *data) · line 1489

Quoted 4 lines
drivers/net/phy/microchip_t1.c +1 -0
@@ -1474,6 +1486,7 @@ static void lan887x_get_strings(struct phy_device *phydev, u8 *data)
                ethtool_puts(&data, lan887x_hw_stats[i].string);
 }
 
+static int lan887x_config_intr(struct phy_device *phydev);

[Kalesh] I would suggest you to avoid this forward declaration by moving the function definition here.

Quoted 78 lines
drivers/net/phy/microchip_t1.c +50 -1
 static int lan887x_cd_reset(struct phy_device *phydev,
                            enum cable_diag_state cd_done)
 {
@@ -1504,6 +1517,10 @@ static int lan887x_cd_reset(struct phy_device *phydev,
                if (rc < 0)
                        return rc;
 
+               rc = lan887x_config_intr(phydev);
+               if (rc < 0)
+                       return rc;
+
                rc = lan887x_phy_reconfig(phydev);
                if (rc < 0)
                        return rc;
@@ -1830,6 +1847,50 @@ static int lan887x_cable_test_get_status(struct phy_device *phydev,
        return lan887x_cable_test_report(phydev);
 }
 
+static int lan887x_config_intr(struct phy_device *phydev)
+{
+       int ret;
+
+       if (phydev->interrupts == PHY_INTERRUPT_ENABLED) {
+               /* Clear the interrupt status before enabling interrupts */
+               ret = phy_read_mmd(phydev, MDIO_MMD_VEND1, LAN887X_INT_STS);
+               if (ret < 0)
+                       return ret;
+
+               /* Unmask for enabling interrupt */
+               ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, LAN887X_INT_MSK,
+                                   (u16)~LAN887X_MX_CHIP_TOP_ALL_MSK);
+       } else {
+               ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, LAN887X_INT_MSK,
+                                   GENMASK(15, 0));
+               if (ret < 0)
+                       return ret;
+
+               ret = phy_read_mmd(phydev, MDIO_MMD_VEND1, LAN887X_INT_STS);
+       }
+
+       return ret < 0 ? ret : 0;
+}
+
+static irqreturn_t lan887x_handle_interrupt(struct phy_device *phydev)
+{
+       int ret = IRQ_NONE;
+       int irq_status;
+
+       irq_status = phy_read_mmd(phydev, MDIO_MMD_VEND1, LAN887X_INT_STS);
+       if (irq_status < 0) {
+               phy_error(phydev);
+               return IRQ_NONE;
+       }
+
+       if (irq_status & LAN887X_MX_CHIP_TOP_LINK_MSK) {
+               phy_trigger_machine(phydev);
+               ret = IRQ_HANDLED;
+       }
+
+       return ret;
+}
+
 static struct phy_driver microchip_t1_phy_driver[] = {
        {
                PHY_ID_MATCH_MODEL(PHY_ID_LAN87XX),
@@ -1881,6 +1942,8 @@ static struct phy_driver microchip_t1_phy_driver[] = {
                .read_status    = genphy_c45_read_status,
                .cable_test_start = lan887x_cable_test_start,
                .cable_test_get_status = lan887x_cable_test_get_status,
+               .config_intr    = lan887x_config_intr,
+               .handle_interrupt = lan887x_handle_interrupt,
        }
 };
 
--

2.17.1

Signature · 2 lines
Regards,
Kalesh A P
#2 lore raw

Hi @Kalesh Anakkur Purayil,

Thanks for the review comments, I will apply it in next revision.

/Divya

Quoted 14 lines

-----Original Message-----
From: Kalesh Anakkur Purayil <[email protected]>
Sent: Monday, September 30, 2024 9:49 PM
To: Divya Koppera - I30481 <[email protected]>
Cc: Arun Ramadoss - I17769 <[email protected]>; UNGLinuxDriver <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH net-next] net: phy: microchip_t1: Interrupt support for lan887x

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

maintainer
#3 lore raw
In reply to Divya Koppera

drivers/net/phy/microchip_t1.c static int lan887x_cable_test_get_status(struct phy_device *phydev, · line 1852

Quoted 3 lines
drivers/net/phy/microchip_t1.c +3 -0
+static int lan887x_config_intr(struct phy_device *phydev)
+{
+	int ret;

This driver consistently uses rc, not ret. It would be good to keep with the existing convention.

Andrew

---
pw-bot: cr

#4 lore raw

Hi Andrew,

Thanks for the review comments, I will apply it in next revision.

/Divya

Quoted 25 lines

-----Original Message-----
From: Andrew Lunn <[email protected]>
Sent: Monday, September 30, 2024 10:14 PM
To: Divya Koppera - I30481 <[email protected]>
Cc: Arun Ramadoss - I17769 <[email protected]>; UNGLinuxDriver <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH net-next] net: phy: microchip_t1: Interrupt support for lan887x

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Review

Quoted 2 lines
(quoted diff) +2 -0
+static int lan887x_config_intr(struct phy_device *phydev) {
+     int ret;

This driver consistently uses rc, not ret. It would be good to keep with the existing convention.

Andrew

---
pw-bot: cr

#5 lore raw
In reply to Divya Koppera

Hi,

Quoted 71 lines · Divya Koppera

Add support for link up and link down interrupts in lan887x.

---
  drivers/net/phy/microchip_t1.c | 63 ++++++++++++++++++++++++++++++++++
  1 file changed, 63 insertions(+)
drivers/net/phy/microchip_t1.c +35 -0
index a5ef8fe50704..383050a5b0ed 100644
@@ -226,6 +226,18 @@
  #define MICROCHIP_CABLE_MAX_TIME_DIFF	\
  	(MICROCHIP_CABLE_MIN_TIME_DIFF + MICROCHIP_CABLE_TIME_MARGIN)
 
+#define LAN887X_INT_STS				0xf000
+#define LAN887X_INT_MSK				0xf001
+#define LAN887X_INT_MSK_T1_PHY_INT_MSK		BIT(2)
+#define LAN887X_INT_MSK_LINK_UP_MSK		BIT(1)
+#define LAN887X_INT_MSK_LINK_DOWN_MSK		BIT(0)
+
+#define LAN887X_MX_CHIP_TOP_LINK_MSK	(LAN887X_INT_MSK_LINK_UP_MSK |\
+					 LAN887X_INT_MSK_LINK_DOWN_MSK)
+
+#define LAN887X_MX_CHIP_TOP_ALL_MSK	(LAN887X_INT_MSK_T1_PHY_INT_MSK |\
+					 LAN887X_MX_CHIP_TOP_LINK_MSK)
+
  #define DRIVER_AUTHOR	"Nisar Sayed <[email protected]>"
  #define DRIVER_DESC	"Microchip LAN87XX/LAN937x/LAN887x T1 PHY driver"
 
@@ -1474,6 +1486,7 @@ static void lan887x_get_strings(struct phy_device *phydev, u8 *data)
  		ethtool_puts(&data, lan887x_hw_stats[i].string);
  }
 
+static int lan887x_config_intr(struct phy_device *phydev);
  static int lan887x_cd_reset(struct phy_device *phydev,
  			    enum cable_diag_state cd_done)
  {
@@ -1504,6 +1517,10 @@ static int lan887x_cd_reset(struct phy_device *phydev,
  		if (rc < 0)
  			return rc;
 
+		rc = lan887x_config_intr(phydev);
+		if (rc < 0)
+			return rc;
+
  		rc = lan887x_phy_reconfig(phydev);
  		if (rc < 0)
  			return rc;
@@ -1830,6 +1847,50 @@ static int lan887x_cable_test_get_status(struct phy_device *phydev,
  	return lan887x_cable_test_report(phydev);
  }
 
+static int lan887x_config_intr(struct phy_device *phydev)
+{
+	int ret;
+
+	if (phydev->interrupts == PHY_INTERRUPT_ENABLED) {
+		/* Clear the interrupt status before enabling interrupts */
+		ret = phy_read_mmd(phydev, MDIO_MMD_VEND1, LAN887X_INT_STS);
+		if (ret < 0)
+			return ret;
+
+		/* Unmask for enabling interrupt */
+		ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, LAN887X_INT_MSK,
+				    (u16)~LAN887X_MX_CHIP_TOP_ALL_MSK);
+	} else {
+		ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, LAN887X_INT_MSK,
+				    GENMASK(15, 0));
+		if (ret < 0)
+			return ret;

drivers/net/phy/microchip_t1.c static int lan887x_cable_test_get_status(struct phy_device *phydev, · line 1877

Quoted 10 lines
drivers/net/phy/microchip_t1.c +10 -0
+
+		ret = phy_read_mmd(phydev, MDIO_MMD_VEND1, LAN887X_INT_STS);
+	}
+
+	return ret < 0 ? ret : 0;
+}
+
+static irqreturn_t lan887x_handle_interrupt(struct phy_device *phydev)
+{
+	int ret = IRQ_NONE;

I think you can remove 'ret' by simply returning IRQ_HANDLED and IRQ_NONE directly to save one line.

Best regards,
Parthiban V

Quoted 28 lines
drivers/net/phy/microchip_t1.c +18 -0
+	int irq_status;
+
+	irq_status = phy_read_mmd(phydev, MDIO_MMD_VEND1, LAN887X_INT_STS);
+	if (irq_status < 0) {
+		phy_error(phydev);
+		return IRQ_NONE;
+	}
+
+	if (irq_status & LAN887X_MX_CHIP_TOP_LINK_MSK) {
+		phy_trigger_machine(phydev);
+		ret = IRQ_HANDLED;
+	}
+
+	return ret;
+}
+
  static struct phy_driver microchip_t1_phy_driver[] = {
  	{
  		PHY_ID_MATCH_MODEL(PHY_ID_LAN87XX),
@@ -1881,6 +1942,8 @@ static struct phy_driver microchip_t1_phy_driver[] = {
  		.read_status	= genphy_c45_read_status,
  		.cable_test_start = lan887x_cable_test_start,
  		.cable_test_get_status = lan887x_cable_test_get_status,
+		.config_intr    = lan887x_config_intr,
+		.handle_interrupt = lan887x_handle_interrupt,
  	}
  };
 
#6 lore raw

Hi Parthiban,

Thanks for the review comments. Please find my reply inline.

Quoted 113 lines

-----Original Message-----
From: Parthiban Veerasooran - I17164 <[email protected]>
Sent: Tuesday, October 1, 2024 5:28 PM
To: Divya Koppera - I30481 <[email protected]>
Cc: Arun Ramadoss - I17769 <[email protected]>; UNGLinuxDriver <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH net-next] net: phy: microchip_t1: Interrupt support for lan887x

Hi,

Quoted 5 lines · Divya Koppera

Add support for link up and link down interrupts in lan887x.

---
  drivers/net/phy/microchip_t1.c | 63

++++++++++++++++++++++++++++++++++

drivers/net/phy/microchip_t1.c line 227

Quoted 10 lines
  1 file changed, 63 insertions(+)
(quoted diff) +0 -0

b/drivers/net/phy/microchip_t1.c index a5ef8fe50704..383050a5b0ed 100644

drivers/net/phy/microchip_t1.c +0 -0
@@ -226,6 +226,18 @@
  #define MICROCHIP_CABLE_MAX_TIME_DIFF	\
  	(MICROCHIP_CABLE_MIN_TIME_DIFF +

MICROCHIP_CABLE_TIME_MARGIN)

drivers/net/phy/microchip_t1.c

Quoted 8 lines
drivers/net/phy/microchip_t1.c +7 -0
+#define LAN887X_INT_STS				0xf000
+#define LAN887X_INT_MSK				0xf001
+#define LAN887X_INT_MSK_T1_PHY_INT_MSK		BIT(2)
+#define LAN887X_INT_MSK_LINK_UP_MSK		BIT(1)
+#define LAN887X_INT_MSK_LINK_DOWN_MSK		BIT(0)
+
+#define LAN887X_MX_CHIP_TOP_LINK_MSK
	(LAN887X_INT_MSK_LINK_UP_MSK |\

drivers/net/phy/microchip_t1.c line 235

Quoted 1 line
drivers/net/phy/microchip_t1.c +1 -0
+

LAN887X_INT_MSK_LINK_DOWN_MSK)

drivers/net/phy/microchip_t1.c line 237

Quoted 2 lines
drivers/net/phy/microchip_t1.c +2 -0
+
+#define LAN887X_MX_CHIP_TOP_ALL_MSK
	(LAN887X_INT_MSK_T1_PHY_INT_MSK |\

drivers/net/phy/microchip_t1.c

Quoted 4 lines
drivers/net/phy/microchip_t1.c +2 -0
+					 LAN887X_MX_CHIP_TOP_LINK_MSK)
+
  #define DRIVER_AUTHOR	"Nisar Sayed <[email protected]>"
  #define DRIVER_DESC	"Microchip LAN87XX/LAN937x/LAN887x T1

PHY driver"

drivers/net/phy/microchip_t1.c static void lan887x_get_strings(struct phy_device

Quoted 2 lines
drivers/net/phy/microchip_t1.c +0 -0
@@ -1474,6 +1486,7 @@ static void lan887x_get_strings(struct phy_device

*phydev, u8 *data)

drivers/net/phy/microchip_t1.c static int lan887x_cd_reset(struct phy_device

Quoted 8 lines
drivers/net/phy/microchip_t1.c +1 -0
  		ethtool_puts(&data, lan887x_hw_stats[i].string);
  }
 
+static int lan887x_config_intr(struct phy_device *phydev);
  static int lan887x_cd_reset(struct phy_device *phydev,
  			    enum cable_diag_state cd_done)
  {
@@ -1504,6 +1517,10 @@ static int lan887x_cd_reset(struct phy_device

*phydev,

drivers/net/phy/microchip_t1.c static int lan887x_cable_test_get_status(struct

Quoted 11 lines
drivers/net/phy/microchip_t1.c +4 -0
  		if (rc < 0)
  			return rc;
 
+		rc = lan887x_config_intr(phydev);
+		if (rc < 0)
+			return rc;
+
  		rc = lan887x_phy_reconfig(phydev);
  		if (rc < 0)
  			return rc;
@@ -1830,6 +1847,50 @@ static int lan887x_cable_test_get_status(struct

phy_device *phydev,

drivers/net/phy/microchip_t1.c static int lan887x_cable_test_get_status(struct phy_device *phydev,

Quoted 9 lines
drivers/net/phy/microchip_t1.c +6 -0
  	return lan887x_cable_test_report(phydev);
  }
 
+static int lan887x_config_intr(struct phy_device *phydev) {
+	int ret;
+
+	if (phydev->interrupts == PHY_INTERRUPT_ENABLED) {
+		/* Clear the interrupt status before enabling interrupts */
+		ret = phy_read_mmd(phydev, MDIO_MMD_VEND1,

LAN887X_INT_STS);

drivers/net/phy/microchip_t1.c static int lan887x_cable_test_get_status(struct phy_device *phydev,

Quoted 5 lines
drivers/net/phy/microchip_t1.c +5 -0
+		if (ret < 0)
+			return ret;
+
+		/* Unmask for enabling interrupt */
+		ret = phy_write_mmd(phydev, MDIO_MMD_VEND1,

LAN887X_INT_MSK,

drivers/net/phy/microchip_t1.c static int lan887x_cable_test_get_status(struct phy_device *phydev,

Quoted 3 lines
drivers/net/phy/microchip_t1.c +3 -0
+				    (u16)~LAN887X_MX_CHIP_TOP_ALL_MSK);
+	} else {
+		ret = phy_write_mmd(phydev, MDIO_MMD_VEND1,

LAN887X_INT_MSK,

drivers/net/phy/microchip_t1.c static int lan887x_cable_test_get_status(struct phy_device *phydev,

Quoted 5 lines
drivers/net/phy/microchip_t1.c +5 -0
+				    GENMASK(15, 0));
+		if (ret < 0)
+			return ret;
+
+		ret = phy_read_mmd(phydev, MDIO_MMD_VEND1,

LAN887X_INT_STS);

drivers/net/phy/microchip_t1.c static int lan887x_cable_test_get_status(struct phy_device *phydev, · line 1877

Quoted 8 lines
drivers/net/phy/microchip_t1.c +8 -0
+	}
+
+	return ret < 0 ? ret : 0;
+}
+
+static irqreturn_t lan887x_handle_interrupt(struct phy_device
+*phydev) {
+	int ret = IRQ_NONE;

I think you can remove 'ret' by simply returning IRQ_HANDLED and IRQ_NONE directly to save one line.

Quoted 2 lines

Best regards,
Parthiban V

This is declared for future series purpose.
As suggested, I'll remove this variable now and introduce in next series.

/Divya

Quoted 30 lines

drivers/net/phy/microchip_t1.c static int lan887x_cable_test_get_status(struct phy_device *phydev,

Quoted 3 lines
drivers/net/phy/microchip_t1.c +3 -0
+	int irq_status;
+
+	irq_status = phy_read_mmd(phydev, MDIO_MMD_VEND1,

LAN887X_INT_STS);

drivers/net/phy/microchip_t1.c static struct phy_driver microchip_t1_phy_driver[]

Quoted 17 lines
drivers/net/phy/microchip_t1.c +13 -0
+	if (irq_status < 0) {
+		phy_error(phydev);
+		return IRQ_NONE;
+	}
+
+	if (irq_status & LAN887X_MX_CHIP_TOP_LINK_MSK) {
+		phy_trigger_machine(phydev);
+		ret = IRQ_HANDLED;
+	}
+
+	return ret;
+}
+
  static struct phy_driver microchip_t1_phy_driver[] = {
  	{
  		PHY_ID_MATCH_MODEL(PHY_ID_LAN87XX),
@@ -1881,6 +1942,8 @@ static struct phy_driver microchip_t1_phy_driver[]

= {

Quoted 8 lines
drivers/net/phy/microchip_t1.c +2 -0
  		.read_status	= genphy_c45_read_status,
  		.cable_test_start = lan887x_cable_test_start,
  		.cable_test_get_status = lan887x_cable_test_get_status,
+		.config_intr    = lan887x_config_intr,
+		.handle_interrupt = lan887x_handle_interrupt,
  	}
  };