Fix nic lock usages around iwm_{read,write}_prph().
authorstsp <stsp@openbsd.org>
Fri, 21 Apr 2017 16:39:52 +0000 (16:39 +0000)
committerstsp <stsp@openbsd.org>
Fri, 21 Apr 2017 16:39:52 +0000 (16:39 +0000)
commitfad36d64201af4b0326dbb5840e25248dd85d967
tree6e4cf39b733b18891dc0dd9949296993b4e998b6
parent21e32f741c6e047cf3097186ec1e0588841b7013
Fix nic lock usages around iwm_{read,write}_prph().

The iwm_{read,write}_prph() calls don't grab the nic lock themselves
so make sure to acquire it where necessary.
The iwm_{set,clear}_bits_prph() on the other hand acquire/release the
nic lock themselves. Since the nic lock doesn't do recursive locking
we need to be careful to avoid accidentally releasing the nic lock
too early that way.

Patch by Imre Vadasz.
sys/dev/pci/if_iwm.c