ath10k: fix device teardown
authorMichal Kazior <michal.kazior@tieto.com>
Fri, 2 Aug 2013 07:15:47 +0000 (09:15 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Mon, 5 Aug 2013 16:22:16 +0000 (19:22 +0300)
commit32270b61b3fcdce3495c7b746576d49f70587150
tree642f7f8a9c80fa121cfd5a6c27fd60f65a1d8cc2
parent591ecdb8f276925251bb5f5fad7eb064979ecee1
ath10k: fix device teardown

This fixes interrupt-related issue when no
interfaces were running thus the device was
considered powered down.

The power_down() function isn't really powering
down the device. It simply assumed it won't
interrupt. This wasn't true in some cases and
could lead to paging failures upon FW indication
interrupt (i.e. FW crash) because some structures
aren't allocated in that device state.

One reason for that was that ar_pci->started
wasn't reset. The other is interrupts should've
been masked when teardown starts.

The patch reorganized interrupt setup and makes
sure ar_pci->started is reset accordingly.

Reported-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/pci.c