Hello,
AM5728 EVM runnig Linux PSDK 6.03.
Any time I connect or disconnect from an Ethernet interface, I get an update in the terminal indicating that the link was connected or disconnected. What I'd like to know is how that message is getting posted. More specifically, I want to hook into the mechanism that is posting that message so I can run my own script any time an Ethernet connection is connected or disconnected (specifically only on eth0).
Note, I have discovered that I can use ethtool to determine the interface state. And I also found the interface in /sys/class/net/eth0 that will let me query the driver for various status info. But I don't want to poll for interface status.
I want the driver to catch an interrupt (if generated any) or set the GPIO pin (if configured any) as and when Ethernet cable is plugged in or removed. Is any interrupt generated or GPIO pin set corresponding to Ethernet cable plugged in or removed? Is there any other way to take care of this?
Kindly suggest.
Thanks,
Devashish