Enabling and Disabling ethernet driver on i.MX8 from /sys Linux

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Enabling and Disabling ethernet driver on i.MX8 from /sys Linux

1,401 Views
yellapu_anishkh
Contributor IV

Hi NXP,

We are using i.MX8dx processor. We want to disable Ethernet driver after boot in Linux, and re-enable driver after sometime.

We tried to unbind the driver from /sys entries using below command.

echo -n "5b040000.ethernet" > /sys/devices/platform/5b040000.ethernet/driver/unbind

Unable to bind the driver once unbind.

echo -n  "5b040000.ethernet" > /sys/bus/platform/devices/5b040000.ethernet/subsystem/drivers/fec/bind

root@localhost:~#

000.ethernet/subsystem/drivers/fec/bindhernet" > /sys/bus/platform/devices/5b040

[ 4991.258834] fec 5b040000.ethernet: 5b040000.ethernet supply phy not found, using dummy regulator

[ 4991.281057] pps pps0: new PPS source ptp0

[ 4991.333602] fec: probe of 5b040000.ethernet failed with error -2

-sh: echo: write error: No such device

root@localhost:~#

 

Is there any possibility to disable Ethernet hotplug and enable back.

0 Kudos
1 Reply

1,391 Views
igorpadykov
NXP Employee
NXP Employee

Hi yellapu_anishkh

 

I am afraid this is not supported from /sys, in general question also may be posted

on kernel mail list   http://vger.kernel.org/vger-lists.html

also one can consider other alternatives:

https://wiki.archlinux.org/index.php/Network_configuration#Enabling_and_disabling_network_interfaces

 

Best regards
igor

0 Kudos