OSDN Git Service

iwlwifi: pcie: move power gating workaround earlier in the flow
authorLuca Coelho <luciano.coelho@intel.com>
Thu, 5 Dec 2019 07:03:54 +0000 (09:03 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 10 Dec 2019 08:39:39 +0000 (10:39 +0200)
commit0df36b90c47d93295b7e393da2d961b2f3b6cde4
tree6ebe081352f4bf6fa4e940ad9eb4bf9ec8f82c22
parentdb5cce1afc8d2475d2c1c37c2a8267dd0e151526
iwlwifi: pcie: move power gating workaround earlier in the flow

We need to reset the NIC after setting the bits to enable power
gating and that cannot be done too late in the flow otherwise it
cleans other registers and things that were already configured,
causing initialization to fail.

In order to fix this, move the function to the common code in trans.c
so it can be called directly from there at an earlier point, just
after the reset we already do during initialization.

Fixes: 9a47cb988338 ("iwlwifi: pcie: add workaround for power gating in integrated 22000")
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=205719
Cc: stable@ver.kernel.org # 5.4+
Reported-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
drivers/net/wireless/intel/iwlwifi/pcie/trans.c