* Fixed PHYs and link up/down from user space ?
@ 2018-09-08 13:59 Joakim Tjernlund
2018-09-08 18:14 ` Florian Fainelli
0 siblings, 1 reply; 2+ messages in thread
From: Joakim Tjernlund @ 2018-09-08 13:59 UTC (permalink / raw)
To: netdev@vger.kernel.org
I am looking for a way to set physical link state from user space for a Fixed PHY.
Found the /sys/class/net/eth1/carrier I/F but that didn't work and I cannot find something else.
I want to make ifplugd/dhcp function as if there were a real cable there(or not)
Jocke
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Fixed PHYs and link up/down from user space ?
2018-09-08 13:59 Fixed PHYs and link up/down from user space ? Joakim Tjernlund
@ 2018-09-08 18:14 ` Florian Fainelli
0 siblings, 0 replies; 2+ messages in thread
From: Florian Fainelli @ 2018-09-08 18:14 UTC (permalink / raw)
To: Joakim Tjernlund, netdev@vger.kernel.org
On September 8, 2018 6:59:31 AM PDT, Joakim Tjernlund <Joakim.Tjernlund@infinera.com> wrote:
>I am looking for a way to set physical link state from user space for a
>Fixed PHY.
>Found the /sys/class/net/eth1/carrier I/F but that didn't work and I
>cannot find something else.
The carrier sysfs attribute is not writable by default but it can be made so by hooking a ndo_change_carrier() callback to your network device.
Fixed PHYs also offer the ability to poll a GPIO to determine the link state, or register a callback to update the link status based on an event (interrupt handler or otherwise). Note that attempting to change the carrier from user space and the fixed PHY being polled by the PHY state machine will likely both want to force the carrier, so you may have to register a fixed link status callback just to get them to agree.
>
>I want to make ifplugd/dhcp function as if there were a real cable
>there(or not)
>
>
> Jocke
--
Florian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-08 23:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-08 13:59 Fixed PHYs and link up/down from user space ? Joakim Tjernlund
2018-09-08 18:14 ` Florian Fainelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox