e1000e: fix locking issue with e1000e_disable_aspm
authorYanir Lubetkin <yanirx.lubetkin@intel.com>
Tue, 9 Jun 2015 22:15:05 +0000 (01:15 +0300)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 26 Jun 2015 09:38:28 +0000 (02:38 -0700)
commitbeb0a1520bec17cfaf0c3c77bbdd56cbf942883a
treea19acf66153d6745906588bf748e843e69f04a5d
parent73cd63598dcbc95f51d5becf548e0643aa7a49fa
e1000e: fix locking issue with e1000e_disable_aspm

e1000e_disable_aspm called pci_disable_link_state_locked which requires
pci_bus_sem to be held, but is also called from places where this semaphore
was not previously acquired. This patch implements two flavors of
disable_aspm, one that acquires the lock, and the other (_locked) which
should be called when the semaphore is already acquired.

Signed-off-by: Yanir Lubetkin <yanirx.lubetkin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/e1000e/netdev.c