]> git.proxmox.com Git - mirror_ubuntu-zesty-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)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 20 Oct 2016 13:06:40 +0000 (08:06 -0500)
commit59ada747ea1c456d5b71ccc4a3f7db41706cf9c2
tree2e9d4e0bb6542eb39003e0ecd71ba75ad4c06687
parent50ce25c3e1ba5d2151fd54edc1e21d67540e5463
drivers: net: cpsw: ndev: fix accessing to suspended device

BugLink: http://bugs.launchpad.net/bugs/1625177
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>
(cherry picked from commit a6c5d14f5136e4919ace42bdbf392d2f6e68d4da)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
drivers/net/ethernet/ti/cpsw.c