mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
net: sfp: ignore disabled SFP node
commit2148927e6eupstream. Commitce0aa27ff3("sfp: add sfp-bus to bridge between network devices and sfp cages") added code which finds SFP bus DT node even if the node is disabled with status = "disabled". Because of this, when phylink is created, it ends with non-null .sfp_bus member, even though the SFP module is not probed (because the node is disabled). We need to ignore disabled SFP bus node. Fixes:ce0aa27ff3("sfp: add sfp-bus to bridge between network devices and sfp cages") Signed-off-by: Marek Behún <kabel@kernel.org> Cc: stable@vger.kernel.org #2203cbf2c8("net: sfp: move fwnode parsing into sfp-bus layer") Signed-off-by: David S. Miller <davem@davemloft.net> [ backport to 4.19 ] Signed-off-by: Marek Behún <kabel@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e7a56e4d30
commit
f5b894aedb
@@ -554,6 +554,11 @@ static int phylink_register_sfp(struct phylink *pl,
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!fwnode_device_is_available(ref.fwnode)) {
|
||||
fwnode_handle_put(ref.fwnode);
|
||||
return 0;
|
||||
}
|
||||
|
||||
pl->sfp_bus = sfp_register_upstream(ref.fwnode, pl->netdev, pl,
|
||||
&sfp_phylink_ops);
|
||||
if (!pl->sfp_bus)
|
||||
|
||||
Reference in New Issue
Block a user