]> git.baikalelectronics.ru Git - kernel.git/commit
drivers: net: cpsw: ndev: fix accessing to suspended device
authorGrygorii Strashko <grygorii.strashko@ti.com>
Fri, 24 Jun 2016 18:23:45 +0000 (21:23 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Jun 2016 12:57:18 +0000 (08:57 -0400)
commitb33e9b2337dc51e4f5e9afd4c1575445f4caa265
tree25210124c951e353ab005c0607d5a659b7a1b6f8
parenta3acc48215b7665a6ecf919175794cd51ba7a34a
drivers: net: cpsw: ndev: fix accessing to suspended device

The CPSW might be suspended by RPM if all ethX interfaces are down,
but it still could be accesible through net_device_ops interfce. In
this case net_device_ops operations requiring registers access will
cause L3 errors and CPSW crash.

Hence, fix it by adding RPM get/put calls in net_device_ops callbacks
which need to access CPSW registers: .ndo_set_mac_address(),
.ndo_vlan_rx_add_vid(), .ndo_vlan_rx_kill_vid().

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