Thread View: linux.kernel.netdev
4 messages
4 total messages
Started by Rosen Penev
Tue, 20 Oct 2026 22:27
[PATCH net] net: emac: guard PHY bitmap teardown
Author: Rosen Penev
Date: Tue, 20 Oct 2026 22:27
Date: Tue, 20 Oct 2026 22:27
30 lines
11660 bytes
11660 bytes
PHY-less and fixed-link configurations retain a negative PHY address.
Avoid shifting by that value while removing the device, and serialize the
bitmap update with PHY discovery.
Fixes: d6f144830bdf ("ibm/emac: fix improper cleanup when device is removed to allow re-bind")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/net/ethernet/ibm/emac/core.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c
index 4124a90b18c4..0f534af2f3de 100644
--- a/drivers/net/ethernet/ibm/emac/core.c
+++ b/drivers/net/ethernet/ibm/emac/core.c
@@ -3240,8 +3240,11 @@ static void emac_remove(struct platform_device *ofdev)
if (emac_has_feature(dev, EMAC_FTR_HAS_ZMII))
zmii_detach(dev->zmii_dev, dev->zmii_port);
- busy_phy_map &= ~(1 << dev->phy.address);
+ mutex_lock(&emac_phy_map_lock);
+ if (dev->phy.address >= 0 && dev->phy.address < 32)
+ busy_phy_map &= ~BIT(dev->phy.address);
DBG(dev, "busy_phy_map now %#x" NL, busy_phy_map);
+ mutex_unlock(&emac_phy_map_lock);
mal_unregister_commac(dev->mal, &dev->commac);
emac_put_deps(dev);
--
2.56.0
Re: [PATCH net] net: emac: guard PHY bitmap teardown
Author: netdev-bot+sinfo
Date: Tue, 20 Oct 2026 22:33
Date: Tue, 20 Oct 2026 22:33
26 lines
8856 bytes
8856 bytes
Hi! This is an automated message. This series looks like a fix, but its commit messages seem to be missing some information: - How the issue was discovered, e.g. hit in production, hit during development, syzbot report, manual code inspection, LLM or static analysis tool scan. - Whether the issue was actually triggered, or is only theoretical (e.g. found by code inspection). If it was triggered please include the symptoms, like the stack trace or error messages. - What hardware the change was tested on. For driver fixes please mention the device (and if relevant firmware version) used for testing, or say that the change was not tested on real hardware. Please do not repost the series just to address the above. Instead, reply to this email with the missing information, so that reviewers can take it into account. If the series needs another revision for other reasons, please include the information in the commit messages then. The evaluation is done by an LLM so it may be wrong, if you think that is the case please reply and explain.
Re: [PATCH net] net: emac: guard PHY bitmap teardown
Author: Rosen Penev
Date: Tue, 20 Oct 2026 22:38
Date: Tue, 20 Oct 2026 22:38
30 lines
13194 bytes
13194 bytes
On Tue, Oct 20, 2026 at 3:33 PM <netdev-bot+sinfo@kernel.org> wrote: > > Hi! > > This is an automated message. This series looks like a fix, but its > commit messages seem to be missing some information: > > - How the issue was discovered, e.g. hit in production, hit during > development, syzbot report, manual code inspection, LLM or static > analysis tool scan. LLM > > - Whether the issue was actually triggered, or is only theoretical > (e.g. found by code inspection). If it was triggered please include > the symptoms, like the stack trace or error messages. > > - What hardware the change was tested on. For driver fixes please > mention the device (and if relevant firmware version) used for > testing, or say that the change was not tested on real hardware. > > Please do not repost the series just to address the above. Instead, > reply to this email with the missing information, so that reviewers > can take it into account. If the series needs another revision for > other reasons, please include the information in the commit messages > then. > > The evaluation is done by an LLM so it may be wrong, if you think > that is the case please reply and explain.
Re: [PATCH net] net: emac: guard PHY bitmap teardown
Author: Andrew Lunn
Date: Wed, 21 Oct 2026 00:50
Date: Wed, 21 Oct 2026 00:50
18 lines
8878 bytes
8878 bytes
On Tue, Oct 20, 2026 at 03:27:23PM -0700, Rosen Penev wrote:
> PHY-less and fixed-link configurations retain a negative PHY address.
> Avoid shifting by that value while removing the device, and serialize the
> bitmap update with PHY discovery.
>
> Fixes: d6f144830bdf ("ibm/emac: fix improper cleanup when device is removed to allow re-bind")
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
This is actually two different fixes.
Please split this into two patches, one adding the mutex lock/unlock,
and the second looking for -1.
Since this is a LLM found issues, not one which actually bothers
anybody, please submit to net-next, without the Fixes tag.
Andrew
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads