Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy: fixed_phy: fix missing initialization of fixed phy link

Original change remove the link initialization from the passed struct
fixed_phy_status, but @status is also passed to __fixed_phy_add(),
where it is saved. Make sure that copy also has link set to 1.

Fixes: 9f07af1d2742 ("net: phy: fixed_phy: initialize the link status as up")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/dab6c10e-725e-4648-9662-39cc821723d0@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Heiner Kallweit and committed by
Jakub Kicinski
bd048f8c 58673d10

+1
+1
drivers/net/phy/fixed_phy.c
··· 124 124 125 125 fp->addr = phy_addr; 126 126 fp->status = *status; 127 + fp->status.link = true; 127 128 128 129 list_add_tail(&fp->node, &fmb_phys); 129 130