* [PATCH net] phy: dp83869: fix interrupts issue when using with an optical fiber sfp. to correctly clear the interrupts both status registers must be read.
@ 2025-05-19 14:47 chalianis1
2025-05-19 14:49 ` kernel test robot
2025-05-19 15:01 ` Andrew Lunn
0 siblings, 2 replies; 8+ messages in thread
From: chalianis1 @ 2025-05-19 14:47 UTC (permalink / raw)
To: andrew, hkallweit1, davem, edumazet, kuba, pabeni, linux, netdev,
linux-kernel
Cc: stable, Anis Chali
From: Anis Chali <chalianis1@gmail.com>
from datasheet of dp83869hm
7.3.6 Interrupt
The DP83869HM can be configured to generate an interrupt when changes of internal status occur. The interrupt
allows a MAC to act upon the status in the PHY without polling the PHY registers. The interrupt source can be
selected through the interrupt registers, MICR (12h) and FIBER_INT_EN (C18h). The interrupt status can be
read from ISR (13h) and FIBER_INT_STTS (C19h) registers. Some interrupts are enabled by default and can
be disabled through register access. Both the interrupt status registers must be read in order to clear pending
interrupts. Until the pending interrupts are cleared, new interrupts may not be routed to the interrupt pin.
Fixes: interrupts issue when using with an optical fiber sfp.
Signed-off-by: Anis Chali <chalianis1@gmail.com>
---
drivers/net/phy/dp83869.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/phy/dp83869.c b/drivers/net/phy/dp83869.c
index a62cd838a9ea..1e8c20f387b8 100644
--- a/drivers/net/phy/dp83869.c
+++ b/drivers/net/phy/dp83869.c
@@ -41,6 +41,7 @@
#define DP83869_IO_MUX_CFG 0x0170
#define DP83869_OP_MODE 0x01df
#define DP83869_FX_CTRL 0x0c00
+#define DP83869_FX_INT_STS 0x0c19
#define DP83869_SW_RESET BIT(15)
#define DP83869_SW_RESTART BIT(14)
@@ -195,6 +196,12 @@ static int dp83869_ack_interrupt(struct phy_device *phydev)
if (err < 0)
return err;
+ if (linkmode_test_bit(ETHTOOL_LINK_MODE_FIBRE_BIT, phydev->supported)) {
+ err = phy_read_mmd(phydev, DP83869_DEVADDR, DP83869_FX_INT_STS);
+ if (err < 0)
+ return err;
+ }
+
return 0;
}
--
2.49.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH net] phy: dp83869: fix interrupts issue when using with an optical fiber sfp. to correctly clear the interrupts both status registers must be read.
2025-05-19 14:47 [PATCH net] phy: dp83869: fix interrupts issue when using with an optical fiber sfp. to correctly clear the interrupts both status registers must be read chalianis1
@ 2025-05-19 14:49 ` kernel test robot
2025-05-19 15:01 ` Andrew Lunn
1 sibling, 0 replies; 8+ messages in thread
From: kernel test robot @ 2025-05-19 14:49 UTC (permalink / raw)
To: chalianis1; +Cc: stable, oe-kbuild-all
Hi,
Thanks for your patch.
FYI: kernel test robot notices the stable kernel rule is not satisfied.
The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-1
Rule: add the tag "Cc: stable@vger.kernel.org" in the sign-off area to have the patch automatically included in the stable tree.
Subject: [PATCH net] phy: dp83869: fix interrupts issue when using with an optical fiber sfp. to correctly clear the interrupts both status registers must be read.
Link: https://lore.kernel.org/stable/20250519144701.92264-1-chalianis1%40gmail.com
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net] phy: dp83869: fix interrupts issue when using with an optical fiber sfp. to correctly clear the interrupts both status registers must be read.
2025-05-19 14:47 [PATCH net] phy: dp83869: fix interrupts issue when using with an optical fiber sfp. to correctly clear the interrupts both status registers must be read chalianis1
2025-05-19 14:49 ` kernel test robot
@ 2025-05-19 15:01 ` Andrew Lunn
1 sibling, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2025-05-19 15:01 UTC (permalink / raw)
To: chalianis1
Cc: hkallweit1, davem, edumazet, kuba, pabeni, linux, netdev,
linux-kernel, stable
On Mon, May 19, 2025 at 10:47:01AM -0400, chalianis1@gmail.com wrote:
> From: Anis Chali <chalianis1@gmail.com>
>
> from datasheet of dp83869hm
> 7.3.6 Interrupt
> The DP83869HM can be configured to generate an interrupt when changes of internal status occur. The interrupt
> allows a MAC to act upon the status in the PHY without polling the PHY registers. The interrupt source can be
> selected through the interrupt registers, MICR (12h) and FIBER_INT_EN (C18h). The interrupt status can be
> read from ISR (13h) and FIBER_INT_STTS (C19h) registers. Some interrupts are enabled by default and can
> be disabled through register access. Both the interrupt status registers must be read in order to clear pending
> interrupts. Until the pending interrupts are cleared, new interrupts may not be routed to the interrupt pin.
> Fixes: interrupts issue when using with an optical fiber sfp.
The subject is now correct, but the Fixes: tag is supposed to be a git
hash for when the problem was introduced:
https://docs.kernel.org/process/submitting-patches.html#describe-your-changes
Andrew
---
pw-bot: cr
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH net] phy: dp83869: fix interrupts issue when using with an optical fiber sfp. to correctly clear the interrupts both status registers must be read.
@ 2025-07-26 0:09 chalianis1
0 siblings, 0 replies; 8+ messages in thread
From: chalianis1 @ 2025-07-26 0:09 UTC (permalink / raw)
To: andrew
Cc: hkallweit1, edumazet, kuba, pabeni, linux, netdev, linux-kernel,
stable, Anis Chali
From: Anis Chali <chalianis1@gmail.com>
from datasheet of dp83869hm
7.3.6 Interrupt
The DP83869HM can be configured to generate an interrupt when changes of internal status occur. The interrupt
allows a MAC to act upon the status in the PHY without polling the PHY registers. The interrupt source can be
selected through the interrupt registers, MICR (12h) and FIBER_INT_EN (C18h). The interrupt status can be
read from ISR (13h) and FIBER_INT_STTS (C19h) registers. Some interrupts are enabled by default and can
be disabled through register access. Both the interrupt status registers must be read in order to clear pending
interrupts. Until the pending interrupts are cleared, new interrupts may not be routed to the interrupt pin.
Fixes: 0eaf8ccf2047 ("net: phy: dp83869: Set opmode from straps")
Cc: stable@vger.kernel.org
Signed-off-by: Anis Chali <chalianis1@gmail.com>
---
drivers/net/phy/dp83869.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/phy/dp83869.c b/drivers/net/phy/dp83869.c
index a62cd838a9ea..1e8c20f387b8 100644
--- a/drivers/net/phy/dp83869.c
+++ b/drivers/net/phy/dp83869.c
@@ -41,6 +41,7 @@
#define DP83869_IO_MUX_CFG 0x0170
#define DP83869_OP_MODE 0x01df
#define DP83869_FX_CTRL 0x0c00
+#define DP83869_FX_INT_STS 0x0c19
#define DP83869_SW_RESET BIT(15)
#define DP83869_SW_RESTART BIT(14)
@@ -195,6 +196,12 @@ static int dp83869_ack_interrupt(struct phy_device *phydev)
if (err < 0)
return err;
+ if (linkmode_test_bit(ETHTOOL_LINK_MODE_FIBRE_BIT, phydev->supported)) {
+ err = phy_read_mmd(phydev, DP83869_DEVADDR, DP83869_FX_INT_STS);
+ if (err < 0)
+ return err;
+ }
+
return 0;
}
--
2.49.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net] phy: dp83869: fix interrupts issue when using with an optical fiber sfp. to correctly clear the interrupts both status registers must be read.
@ 2025-07-26 0:10 chalianis1
2025-07-26 0:14 ` Jakub Kicinski
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: chalianis1 @ 2025-07-26 0:10 UTC (permalink / raw)
To: andrew
Cc: hkallweit1, edumazet, kuba, pabeni, linux, netdev, linux-kernel,
stable, Anis Chali
From: Anis Chali <chalianis1@gmail.com>
from datasheet of dp83869hm
7.3.6 Interrupt
The DP83869HM can be configured to generate an interrupt when changes of internal status occur. The interrupt
allows a MAC to act upon the status in the PHY without polling the PHY registers. The interrupt source can be
selected through the interrupt registers, MICR (12h) and FIBER_INT_EN (C18h). The interrupt status can be
read from ISR (13h) and FIBER_INT_STTS (C19h) registers. Some interrupts are enabled by default and can
be disabled through register access. Both the interrupt status registers must be read in order to clear pending
interrupts. Until the pending interrupts are cleared, new interrupts may not be routed to the interrupt pin.
Fixes: 01db923e8377 ("net: phy: dp83869: Add TI dp83869 phy")
Cc: stable@vger.kernel.org
Signed-off-by: Anis Chali <chalianis1@gmail.com>
---
drivers/net/phy/dp83869.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/phy/dp83869.c b/drivers/net/phy/dp83869.c
index a62cd838a9ea..1e8c20f387b8 100644
--- a/drivers/net/phy/dp83869.c
+++ b/drivers/net/phy/dp83869.c
@@ -41,6 +41,7 @@
#define DP83869_IO_MUX_CFG 0x0170
#define DP83869_OP_MODE 0x01df
#define DP83869_FX_CTRL 0x0c00
+#define DP83869_FX_INT_STS 0x0c19
#define DP83869_SW_RESET BIT(15)
#define DP83869_SW_RESTART BIT(14)
@@ -195,6 +196,12 @@ static int dp83869_ack_interrupt(struct phy_device *phydev)
if (err < 0)
return err;
+ if (linkmode_test_bit(ETHTOOL_LINK_MODE_FIBRE_BIT, phydev->supported)) {
+ err = phy_read_mmd(phydev, DP83869_DEVADDR, DP83869_FX_INT_STS);
+ if (err < 0)
+ return err;
+ }
+
return 0;
}
--
2.49.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH net] phy: dp83869: fix interrupts issue when using with an optical fiber sfp. to correctly clear the interrupts both status registers must be read.
2025-07-26 0:10 chalianis1
@ 2025-07-26 0:14 ` Jakub Kicinski
2025-07-26 15:14 ` Andrew Lunn
2025-07-26 20:05 ` Simon Horman
2 siblings, 0 replies; 8+ messages in thread
From: Jakub Kicinski @ 2025-07-26 0:14 UTC (permalink / raw)
To: chalianis1
Cc: andrew, hkallweit1, edumazet, pabeni, linux, netdev, linux-kernel,
stable
First of all, please read:
https://www.kernel.org/doc/html/next/process/maintainer-netdev.html
> Subject: [PATCH net] phy: dp83869: fix interrupts issue when using with an optical fiber sfp. to correctly clear the interrupts both status registers must be read.
The first line of the commit message becomes the subject, it should
be a very short summary of the patch (100 chars max)
On Fri, 25 Jul 2025 20:10:34 -0400 chalianis1@gmail.com wrote:
> From: Anis Chali <chalianis1@gmail.com>
>
> from datasheet of dp83869hm
> 7.3.6 Interrupt
> The DP83869HM can be configured to generate an interrupt when changes of internal status occur. The interrupt
> allows a MAC to act upon the status in the PHY without polling the PHY registers. The interrupt source can be
> selected through the interrupt registers, MICR (12h) and FIBER_INT_EN (C18h). The interrupt status can be
> read from ISR (13h) and FIBER_INT_STTS (C19h) registers. Some interrupts are enabled by default and can
> be disabled through register access. Both the interrupt status registers must be read in order to clear pending
> interrupts. Until the pending interrupts are cleared, new interrupts may not be routed to the interrupt pin.
This needs to be line wrapped at 70-ish characters.
> Fixes: 01db923e8377 ("net: phy: dp83869: Add TI dp83869 phy")
>
no empty lines between tags, please
> Cc: stable@vger.kernel.org
> Signed-off-by: Anis Chali <chalianis1@gmail.com>
--
pw-bot: cr
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net] phy: dp83869: fix interrupts issue when using with an optical fiber sfp. to correctly clear the interrupts both status registers must be read.
2025-07-26 0:10 chalianis1
2025-07-26 0:14 ` Jakub Kicinski
@ 2025-07-26 15:14 ` Andrew Lunn
2025-07-26 20:05 ` Simon Horman
2 siblings, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2025-07-26 15:14 UTC (permalink / raw)
To: chalianis1
Cc: hkallweit1, edumazet, kuba, pabeni, linux, netdev, linux-kernel,
stable
On Fri, Jul 25, 2025 at 08:10:34PM -0400, chalianis1@gmail.com wrote:
> From: Anis Chali <chalianis1@gmail.com>
>
> from datasheet of dp83869hm
> 7.3.6 Interrupt
> The DP83869HM can be configured to generate an interrupt when changes of internal status occur. The interrupt
> allows a MAC to act upon the status in the PHY without polling the PHY registers. The interrupt source can be
> selected through the interrupt registers, MICR (12h) and FIBER_INT_EN (C18h). The interrupt status can be
> read from ISR (13h) and FIBER_INT_STTS (C19h) registers.
Reading this description, it sounds like the fibre interrupt it not
cascaded into the micr? There are two completely different sets of
registers.
So i seems like you should be reading this register in
dp83869_handle_interrupt() same as the MICR.
Andrew
---
pw-bot: cr
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net] phy: dp83869: fix interrupts issue when using with an optical fiber sfp. to correctly clear the interrupts both status registers must be read.
2025-07-26 0:10 chalianis1
2025-07-26 0:14 ` Jakub Kicinski
2025-07-26 15:14 ` Andrew Lunn
@ 2025-07-26 20:05 ` Simon Horman
2 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2025-07-26 20:05 UTC (permalink / raw)
To: chalianis1
Cc: andrew, hkallweit1, edumazet, kuba, pabeni, linux, netdev,
linux-kernel, stable
On Fri, Jul 25, 2025 at 08:10:34PM -0400, chalianis1@gmail.com wrote:
> From: Anis Chali <chalianis1@gmail.com>
>
> from datasheet of dp83869hm
> 7.3.6 Interrupt
> The DP83869HM can be configured to generate an interrupt when changes of internal status occur. The interrupt
> allows a MAC to act upon the status in the PHY without polling the PHY registers. The interrupt source can be
> selected through the interrupt registers, MICR (12h) and FIBER_INT_EN (C18h). The interrupt status can be
> read from ISR (13h) and FIBER_INT_STTS (C19h) registers. Some interrupts are enabled by default and can
> be disabled through register access. Both the interrupt status registers must be read in order to clear pending
> interrupts. Until the pending interrupts are cleared, new interrupts may not be routed to the interrupt pin.
>
> Fixes: 01db923e8377 ("net: phy: dp83869: Add TI dp83869 phy")
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Anis Chali <chalianis1@gmail.com>
> ---
> drivers/net/phy/dp83869.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/phy/dp83869.c b/drivers/net/phy/dp83869.c
> index a62cd838a9ea..1e8c20f387b8 100644
> --- a/drivers/net/phy/dp83869.c
> +++ b/drivers/net/phy/dp83869.c
> @@ -41,6 +41,7 @@
> #define DP83869_IO_MUX_CFG 0x0170
> #define DP83869_OP_MODE 0x01df
> #define DP83869_FX_CTRL 0x0c00
> +#define DP83869_FX_INT_STS 0x0c19
>
> #define DP83869_SW_RESET BIT(15)
> #define DP83869_SW_RESTART BIT(14)
> @@ -195,6 +196,12 @@ static int dp83869_ack_interrupt(struct phy_device *phydev)
> if (err < 0)
> return err;
>
> + if (linkmode_test_bit(ETHTOOL_LINK_MODE_FIBRE_BIT, phydev->supported)) {
> + err = phy_read_mmd(phydev, DP83869_DEVADDR, DP83869_FX_INT_STS);
> + if (err < 0)
> + return err;
Hi Anis,
Its invisible, of course, but the line above has trailing whitespace.
Flagged by checkpatch.
> + }
> +
> return 0;
> }
>
> --
> 2.49.0
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-07-26 20:05 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-19 14:47 [PATCH net] phy: dp83869: fix interrupts issue when using with an optical fiber sfp. to correctly clear the interrupts both status registers must be read chalianis1
2025-05-19 14:49 ` kernel test robot
2025-05-19 15:01 ` Andrew Lunn
-- strict thread matches above, loose matches on Subject: below --
2025-07-26 0:09 chalianis1
2025-07-26 0:10 chalianis1
2025-07-26 0:14 ` Jakub Kicinski
2025-07-26 15:14 ` Andrew Lunn
2025-07-26 20:05 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox