提交 a1f5d1f0 编写于 作者: A Antoine Tenart 提交者: David S. Miller

net: phy: sfp: warn the user when no tx_disable pin is available

In case no Tx disable pin is available the SFP modules will always be
emitting. This could be an issue when using modules using laser as their
light source as we would have no way to disable it when the fiber is
removed. This patch adds a warning when registering an SFP cage which do
not have its tx_disable pin wired or available.
Signed-off-by: NAntoine Tenart <antoine.tenart@bootlin.com>
Acked-by: NRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 47de868b
......@@ -1065,6 +1065,15 @@ static int sfp_probe(struct platform_device *pdev)
if (poll)
mod_delayed_work(system_wq, &sfp->poll, poll_jiffies);
/* We could have an issue in cases no Tx disable pin is available or
* wired as modules using a laser as their light source will continue to
* be active when the fiber is removed. This could be a safety issue and
* we should at least warn the user about that.
*/
if (!sfp->gpio[GPIO_TX_DISABLE])
dev_warn(sfp->dev,
"No tx_disable pin: SFP modules will always be emitting.\n");
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册