iwlwifi: pcie: don't panic on host commands in iwldvm
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 20 Jan 2014 07:50:29 +0000 (09:50 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 20 Jan 2014 10:32:06 +0000 (12:32 +0200)
commit23e76d1a516eef416fb5c038791e943fc0916b67
tree9100f98cf69af0a6421a0c2c1ce35add0295e703
parentcf38e4f756d6396657c76f72ef42b6f47c523f97
iwlwifi: pcie: don't panic on host commands in iwldvm

None of the devices supported by iwldvm have support for
shadow registers. This means that we wake the NIC
when we increment the write pointer on Tx ring.
This happened even before my bad commit mentionned below.
Since my commit below, we wake up the NIC when we put a
host command on the ring regardless of shadow register
support. This means that in iwldvm (when the NIC doesn't
support shadow register), we wake up the NIC twice:

pcie_enqueue_hcmd:
wake up the NIC
iwl_pcie_txq_inc_wr_ptr:
wake up the NIC - no shadow reg support

Since waking up the NIC means that we need to acquire a
spinlock, this obviously leads to a recursive spinlock
and hence a freeze.

Fixes: b9439491055a ("iwlwifi: pcie: keep the NIC awake when commands are in flight")
Reported-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/pcie/tx.c