]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ENGR00286017: net:fec: fix clock enable/disable usecount mismatch
authorFugang Duan <B38611@freescale.com>
Mon, 4 Nov 2013 03:13:12 +0000 (11:13 +0800)
committerFugang Duan <B38611@freescale.com>
Mon, 4 Nov 2013 04:36:07 +0000 (12:36 +0800)
commit9268001524a9e4b1a43039aef264fd6087052e7f
treef290b08a2a813ee52cc9b4c8e5fa17f442ffb1fe
parent6063e4c5c91662b1ce30e83c36a91ae4f7d8878a
ENGR00286017: net:fec: fix clock enable/disable usecount mismatch

Reproduce:
1. Boot up kernel with DHCP;
2. ifconfig eth0 down;
3. echo mem > /sys/power/state;

There have clock enable/disable usecount mismatch warning dump.

Fix this by checking device's netif_running state is up and then
enable/disable clock.

Signed-off-by: Fugang Duan <B38611@freescale.com>
drivers/net/ethernet/freescale/fec_main.c