This series backports the following fixes from 5.10 to 5.4. This backport should also apply to 4.19.
A git conflict was solved involving DP83822_ANEG_COMPLETE_INT_EN which was moved to a conditional in 5.10.
Original commit IDs: c96614eeab663646f57f67aa591e015abd8bd0ba net: dp83822: disable false carrier interrupt 0e597e2affb90d6ea48df6890d882924acf71e19 net: dp83822: disable rx error interrupt
When unplugging an Ethernet cable, false carrier events were produced by the PHY at a very high rate. Once the false carrier counter full, an interrupt was triggered every few clock cycles until the cable was replugged. This resulted in approximately 10k/s interrupts.
Since the false carrier counter (FCSCR) is never used, we can safely disable this interrupt.
In addition to improving performance, this also solved MDIO read timeouts I was randomly encountering with an i.MX8 fec MAC because of the interrupt flood. The interrupt count and MDIO timeout fix were tested on a v5.4.110 kernel.
Fixes: 87461f7a58ab ("net: phy: DP83822 initial driver submission") Signed-off-by: Enguerrand de Ribaucourt enguerrand.de-ribaucourt@savoirfairelinux.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: Jakub Kicinski kuba@kernel.org [backport of 5.10 commit c96614eeab663646f57f67aa591e015abd8bd0ba] --- drivers/net/phy/dp83822.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/drivers/net/phy/dp83822.c b/drivers/net/phy/dp83822.c index ae17d2f9d534..cc1522550f2c 100644 --- a/drivers/net/phy/dp83822.c +++ b/drivers/net/phy/dp83822.c @@ -198,7 +198,6 @@ static int dp83822_config_intr(struct phy_device *phydev) return misr_status;
misr_status |= (DP83822_RX_ERR_HF_INT_EN | - DP83822_FALSE_CARRIER_HF_INT_EN | DP83822_ANEG_COMPLETE_INT_EN | DP83822_DUP_MODE_CHANGE_INT_EN | DP83822_SPEED_CHANGED_INT_EN |
Some RX errors, notably when disconnecting the cable, increase the RCSR register. Once half full (0x7fff), an interrupt flood is generated. I measured ~3k/s interrupts even after the RX errors transfer was stopped.
Since we don't read and clear the RCSR register, we should disable this interrupt.
Fixes: 87461f7a58ab ("net: phy: DP83822 initial driver submission") Signed-off-by: Enguerrand de Ribaucourt enguerrand.de-ribaucourt@savoirfairelinux.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: Jakub Kicinski kuba@kernel.org [backport of 5.10 commit 0e597e2affb90d6ea48df6890d882924acf71e19] --- drivers/net/phy/dp83822.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/phy/dp83822.c b/drivers/net/phy/dp83822.c index cc1522550f2c..da3983352dd4 100644 --- a/drivers/net/phy/dp83822.c +++ b/drivers/net/phy/dp83822.c @@ -197,8 +197,7 @@ static int dp83822_config_intr(struct phy_device *phydev) if (misr_status < 0) return misr_status;
- misr_status |= (DP83822_RX_ERR_HF_INT_EN | - DP83822_ANEG_COMPLETE_INT_EN | + misr_status |= (DP83822_ANEG_COMPLETE_INT_EN | DP83822_DUP_MODE_CHANGE_INT_EN | DP83822_SPEED_CHANGED_INT_EN | DP83822_LINK_STAT_INT_EN |
On Wed, Sep 07, 2022 at 12:45:59PM +0200, Enguerrand de Ribaucourt wrote:
Some RX errors, notably when disconnecting the cable, increase the RCSR register. Once half full (0x7fff), an interrupt flood is generated. I measured ~3k/s interrupts even after the RX errors transfer was stopped.
Since we don't read and clear the RCSR register, we should disable this interrupt.
Fixes: 87461f7a58ab ("net: phy: DP83822 initial driver submission") Signed-off-by: Enguerrand de Ribaucourt enguerrand.de-ribaucourt@savoirfairelinux.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: Jakub Kicinski kuba@kernel.org [backport of 5.10 commit 0e597e2affb90d6ea48df6890d882924acf71e19]
drivers/net/phy/dp83822.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Does not apply to 5.4.y or 4.19.y :(
From: "Greg KH" gregkh@linuxfoundation.org To: "Enguerrand de Ribaucourt" enguerrand.de-ribaucourt@savoirfairelinux.com Cc: stable@vger.kernel.org, "Andrew Lunn" andrew@lunn.ch, "Jakub Kicinski" kuba@kernel.org Sent: Thursday, September 8, 2022 7:09:02 PM Subject: Re: [PATCH v3 2/2] net: dp83822: disable rx error interrupt
On Wed, Sep 07, 2022 at 12:45:59PM +0200, Enguerrand de Ribaucourt wrote:
Some RX errors, notably when disconnecting the cable, increase the RCSR register. Once half full (0x7fff), an interrupt flood is generated. I measured ~3k/s interrupts even after the RX errors transfer was stopped.
Since we don't read and clear the RCSR register, we should disable this interrupt.
Fixes: 87461f7a58ab ("net: phy: DP83822 initial driver submission") Signed-off-by: Enguerrand de Ribaucourt enguerrand.de-ribaucourt@savoirfairelinux.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: Jakub Kicinski kuba@kernel.org [backport of 5.10 commit 0e597e2affb90d6ea48df6890d882924acf71e19]
drivers/net/phy/dp83822.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Does not apply to 5.4.y or 4.19.y :(
I could apply the patch with no problems on those versions. I also could cherry-pick the commit on the branch queue/5.4 from stable/linux-stable-rc.git without conflicts.
I can't reproduce the issue you seem to be facing when applying those patches. Would you mind helping me finding what's wrong with the patch on those branches?
Thanks,
Enguerrand de Ribaucourt
On Mon, Sep 12, 2022 at 06:07:08AM -0400, Enguerrand de Ribaucourt wrote:
From: "Greg KH" gregkh@linuxfoundation.org To: "Enguerrand de Ribaucourt" enguerrand.de-ribaucourt@savoirfairelinux.com Cc: stable@vger.kernel.org, "Andrew Lunn" andrew@lunn.ch, "Jakub Kicinski" kuba@kernel.org Sent: Thursday, September 8, 2022 7:09:02 PM Subject: Re: [PATCH v3 2/2] net: dp83822: disable rx error interrupt
On Wed, Sep 07, 2022 at 12:45:59PM +0200, Enguerrand de Ribaucourt wrote:
Some RX errors, notably when disconnecting the cable, increase the RCSR register. Once half full (0x7fff), an interrupt flood is generated. I measured ~3k/s interrupts even after the RX errors transfer was stopped.
Since we don't read and clear the RCSR register, we should disable this interrupt.
Fixes: 87461f7a58ab ("net: phy: DP83822 initial driver submission") Signed-off-by: Enguerrand de Ribaucourt enguerrand.de-ribaucourt@savoirfairelinux.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: Jakub Kicinski kuba@kernel.org [backport of 5.10 commit 0e597e2affb90d6ea48df6890d882924acf71e19]
drivers/net/phy/dp83822.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Does not apply to 5.4.y or 4.19.y :(
I could apply the patch with no problems on those versions. I also could cherry-pick the commit on the branch queue/5.4 from stable/linux-stable-rc.git without conflicts.
I can't reproduce the issue you seem to be facing when applying those patches. Would you mind helping me finding what's wrong with the patch on those branches?
I no longer have the original in my queue anywhere, can you just resend the missing commits if you think it works properly?
thanks,
greg k-h
Some RX errors, notably when disconnecting the cable, increase the RCSR register. Once half full (0x7fff), an interrupt flood is generated. I measured ~3k/s interrupts even after the RX errors transfer was stopped.
Since we don't read and clear the RCSR register, we should disable this interrupt.
Fixes: 87461f7a58ab ("net: phy: DP83822 initial driver submission") Signed-off-by: Enguerrand de Ribaucourt enguerrand.de-ribaucourt@savoirfairelinux.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: Jakub Kicinski kuba@kernel.org [backport of 5.10 commit 0e597e2affb90d6ea48df6890d882924acf71e19] --- drivers/net/phy/dp83822.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/phy/dp83822.c b/drivers/net/phy/dp83822.c index cc1522550f2c..da3983352dd4 100644 --- a/drivers/net/phy/dp83822.c +++ b/drivers/net/phy/dp83822.c @@ -197,8 +197,7 @@ static int dp83822_config_intr(struct phy_device *phydev) if (misr_status < 0) return misr_status;
- misr_status |= (DP83822_RX_ERR_HF_INT_EN | - DP83822_ANEG_COMPLETE_INT_EN | + misr_status |= (DP83822_ANEG_COMPLETE_INT_EN | DP83822_DUP_MODE_CHANGE_INT_EN | DP83822_SPEED_CHANGED_INT_EN | DP83822_LINK_STAT_INT_EN |
On Tue, Sep 13, 2022 at 10:17:48AM +0200, Enguerrand de Ribaucourt wrote:
Some RX errors, notably when disconnecting the cable, increase the RCSR register. Once half full (0x7fff), an interrupt flood is generated. I measured ~3k/s interrupts even after the RX errors transfer was stopped.
Since we don't read and clear the RCSR register, we should disable this interrupt.
Fixes: 87461f7a58ab ("net: phy: DP83822 initial driver submission") Signed-off-by: Enguerrand de Ribaucourt enguerrand.de-ribaucourt@savoirfairelinux.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: Jakub Kicinski kuba@kernel.org [backport of 5.10 commit 0e597e2affb90d6ea48df6890d882924acf71e19]
Backport to what? This is already in 5.10, where do you want this commit applied to?
thanks,
greg k-h
From: "Greg KH" gregkh@linuxfoundation.org To: "Enguerrand de Ribaucourt" enguerrand.de-ribaucourt@savoirfairelinux.com Cc: "stable" stable@vger.kernel.org, "Andrew Lunn" andrew@lunn.ch, "Jakub Kicinski" kuba@kernel.org Sent: Tuesday, September 13, 2022 1:30:26 PM Subject: Re: [PATCH v3] net: dp83822: disable rx error interrupt
On Tue, Sep 13, 2022 at 10:17:48AM +0200, Enguerrand de Ribaucourt wrote:
Some RX errors, notably when disconnecting the cable, increase the RCSR register. Once half full (0x7fff), an interrupt flood is generated. I measured ~3k/s interrupts even after the RX errors transfer was stopped.
Since we don't read and clear the RCSR register, we should disable this interrupt.
Fixes: 87461f7a58ab ("net: phy: DP83822 initial driver submission") Signed-off-by: Enguerrand de Ribaucourt enguerrand.de-ribaucourt@savoirfairelinux.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: Jakub Kicinski kuba@kernel.org [backport of 5.10 commit 0e597e2affb90d6ea48df6890d882924acf71e19]
Backport to what? This is already in 5.10, where do you want this commit applied to?
thanks,
greg k-h
Hi,
I would like this commit to be applied to 5.4. It should also apply to 4.19.
Thanks, Enguerrand de Ribaucourt
On Wed, Sep 14, 2022 at 03:07:00AM -0400, Enguerrand de Ribaucourt wrote:
From: "Greg KH" gregkh@linuxfoundation.org To: "Enguerrand de Ribaucourt" enguerrand.de-ribaucourt@savoirfairelinux.com Cc: "stable" stable@vger.kernel.org, "Andrew Lunn" andrew@lunn.ch, "Jakub Kicinski" kuba@kernel.org Sent: Tuesday, September 13, 2022 1:30:26 PM Subject: Re: [PATCH v3] net: dp83822: disable rx error interrupt
On Tue, Sep 13, 2022 at 10:17:48AM +0200, Enguerrand de Ribaucourt wrote:
Some RX errors, notably when disconnecting the cable, increase the RCSR register. Once half full (0x7fff), an interrupt flood is generated. I measured ~3k/s interrupts even after the RX errors transfer was stopped.
Since we don't read and clear the RCSR register, we should disable this interrupt.
Fixes: 87461f7a58ab ("net: phy: DP83822 initial driver submission") Signed-off-by: Enguerrand de Ribaucourt enguerrand.de-ribaucourt@savoirfairelinux.com Reviewed-by: Andrew Lunn andrew@lunn.ch Signed-off-by: Jakub Kicinski kuba@kernel.org [backport of 5.10 commit 0e597e2affb90d6ea48df6890d882924acf71e19]
Backport to what? This is already in 5.10, where do you want this commit applied to?
thanks,
greg k-h
Hi,
I would like this commit to be applied to 5.4. It should also apply to 4.19.
Now queued up, thanks.
greg k-h
On Wed, Sep 07, 2022 at 12:45:57PM +0200, Enguerrand de Ribaucourt wrote:
This series backports the following fixes from 5.10 to 5.4. This backport should also apply to 4.19.
A git conflict was solved involving DP83822_ANEG_COMPLETE_INT_EN which was moved to a conditional in 5.10.
Original commit IDs: c96614eeab663646f57f67aa591e015abd8bd0ba net: dp83822: disable false carrier interrupt 0e597e2affb90d6ea48df6890d882924acf71e19 net: dp83822: disable rx error interrupt
These are alread in 5.10.y, they showed up in 5.10.129. Should I just take these into 5.4.y and 4.19.y instead?
thanks,
greg k-h
From: "Greg KH" gregkh@linuxfoundation.org To: "Enguerrand de Ribaucourt" enguerrand.de-ribaucourt@savoirfairelinux.com Cc: stable@vger.kernel.org, "Andrew Lunn" andrew@lunn.ch Sent: Thursday, September 8, 2022 7:07:47 PM Subject: Re: [PATCH v3 0/2] net: dp83822: backport fix interrupt floods
On Wed, Sep 07, 2022 at 12:45:57PM +0200, Enguerrand de Ribaucourt wrote:
This series backports the following fixes from 5.10 to 5.4. This backport should also apply to 4.19.
A git conflict was solved involving DP83822_ANEG_COMPLETE_INT_EN which was moved to a conditional in 5.10.
Original commit IDs: c96614eeab663646f57f67aa591e015abd8bd0ba net: dp83822: disable false carrier interrupt 0e597e2affb90d6ea48df6890d882924acf71e19 net: dp83822: disable rx error interrupt
These are alread in 5.10.y, they showed up in 5.10.129. Should I just take these into 5.4.y and 4.19.y instead?
thanks,
greg k-h
Indeed, I would like these changes to be included in 5.4.y and 4.19.y as I use 5.4.y.
Thank you for processing these patches.
Enguerrand de Ribaucourt
linux-stable-mirror@lists.linaro.org