Good morning,

 

I am using the bonding driver on a SoC with an embedded Ethernet controller (Freescale’s FEC). The driver enables the controller’s clock on open and releases it on close. When using the bonding driver the system freezes as it closes the device (hence disabling the clock) before setting the MAC address which needs the clock enabled for register access.

 

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/net/bonding/bond_main.c#n1808

 

I understand the FEC driver disabling the clock on close to save power. Why does the bonding driver close the interface before setting the MAC address? is this required?

 

Thanks,

Alex