* [PATCH] net: phy: the NC-SI phy device do not require mdio bus
@ 2024-01-15 10:34 Jacky Chou
2024-01-15 10:45 ` Marek Vasut
2024-03-28 15:09 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Jacky Chou @ 2024-01-15 10:34 UTC (permalink / raw
To: joe.hershberger, rfried.dev, marek.vasut+renesas, michal.simek,
u-boot
Cc: BMC-SW
As with fixed-link phy device, the NC-SI phy devive does not
require an mdio bus. So, a condition is added to check the
NC-SI phy id to avoid accessing the bus pointer that is NULL.
Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
---
drivers/net/phy/phy.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 63b3e46f10..9991d86037 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -566,7 +566,8 @@ struct phy_device *phy_device_create(struct mii_dev *bus, int addr,
return NULL;
}
- if (addr >= 0 && addr < PHY_MAX_ADDR && phy_id != PHY_FIXED_ID)
+ if (addr >= 0 && addr < PHY_MAX_ADDR && phy_id != PHY_FIXED_ID &&
+ phy_id != PHY_NCSI_ID)
bus->phymap[addr] = dev;
return dev;
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: phy: the NC-SI phy device do not require mdio bus
2024-01-15 10:34 [PATCH] net: phy: the NC-SI phy device do not require mdio bus Jacky Chou
@ 2024-01-15 10:45 ` Marek Vasut
2024-03-28 15:09 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2024-01-15 10:45 UTC (permalink / raw
To: Jacky Chou, joe.hershberger, rfried.dev, marek.vasut+renesas,
michal.simek, u-boot
Cc: BMC-SW
On 1/15/24 11:34, Jacky Chou wrote:
> As with fixed-link phy device, the NC-SI phy devive does not
> require an mdio bus. So, a condition is added to check the
> NC-SI phy id to avoid accessing the bus pointer that is NULL.
>
> Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Thanks !
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: phy: the NC-SI phy device do not require mdio bus
2024-01-15 10:34 [PATCH] net: phy: the NC-SI phy device do not require mdio bus Jacky Chou
2024-01-15 10:45 ` Marek Vasut
@ 2024-03-28 15:09 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2024-03-28 15:09 UTC (permalink / raw
To: Jacky Chou
Cc: joe.hershberger, rfried.dev, marek.vasut+renesas, michal.simek,
u-boot, BMC-SW
[-- Attachment #1: Type: text/plain, Size: 362 bytes --]
On Mon, Jan 15, 2024 at 06:34:47PM +0800, Jacky Chou wrote:
> As with fixed-link phy device, the NC-SI phy devive does not
> require an mdio bus. So, a condition is added to check the
> NC-SI phy id to avoid accessing the bus pointer that is NULL.
>
> Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
Applied to u-boot/next, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-28 15:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-15 10:34 [PATCH] net: phy: the NC-SI phy device do not require mdio bus Jacky Chou
2024-01-15 10:45 ` Marek Vasut
2024-03-28 15:09 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.