Hi Andrew,

On 22/12/2020 15.22, Andrew Lunn wrote:
You're right; a notification isn't what I need. But a way to query the
current state of the module would be nice, i.e. using ethtool.
What do you mean by state? ethtool -m gives you some state
information. ENODEV gives you an idea that there is no module
inserted. Lots of data suggests there is a module. You can decode the
data to get a lot of information.

Using ENODEV would be enough, thanks.

There was also a patchset from Russell King a few weeks ago exposing
some information in debugfs. But since it is debugfs, you cannot rely
on it.

Back to, what is you real use cases here?

Similar to the NO-CARRIER / LOWER_UP flags from network interfaces, a NO_SFP flag can aid when maintaining remote systems. So it's definitely nice-to-have.

// Martin

Reply via email to