]> git.baikalelectronics.ru Git - kernel.git/commit
drivers: net: cpsw: fix suspend when all ethX devices are down
authorGrygorii Strashko <grygorii.strashko@ti.com>
Fri, 24 Jun 2016 18:23:41 +0000 (21:23 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Jun 2016 12:57:18 +0000 (08:57 -0400)
commit8709359bdf0541df782afdf5f5ffbd9377ad4c62
tree48c7050d7aed4c7879ae8c5231a06087376d4c10
parent558ee3ae7fe449c3066bbe87181b5c4802daee07
drivers: net: cpsw: fix suspend when all ethX devices are down

The cpsw_suspend() could trigger L3 error and CPSW will stop
functioning if System enters suspend when all ethX net-devices are
down - in this case CPSW could be already suspended by PM runtime, but
cpsw_suspend() will try to call soft_reset_slave() unconditionally
and access CPSW registers.

Hence, fix it by moving soft_reset_slave() from cpsw_suspend() to
cpsw_slave_stop(). This way slave ports will be reset when CPSW is
active and will be in proper state during Suspend.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw.c