]> asedeno.scripts.mit.edu Git - linux.git/commit
iwlwifi: pcie: fix emergency path
authorSara Sharon <sara.sharon@intel.com>
Thu, 13 Dec 2018 12:47:40 +0000 (14:47 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 14 Feb 2019 09:29:42 +0000 (11:29 +0200)
commitc6ac9f9fb98851f47b978a9476594fc3c477a34d
treeba16c5786918d0f98e76602707dc5cb21fb64d91
parentd9b10c6ba969c5360d4aebf18fc5ac8e393fd698
iwlwifi: pcie: fix emergency path

Allocator swaps the pending requests with 0 when it starts
working. This means that relying on it n RX path to decide if
to move to emergency is not always a good idea, since it may
be zero, but there are still a lot of unallocated RBs in the
system. Change allocator to decrement the pending requests on
real time. It is more expensive since it accesses the atomic
variable more times, but it gives the RX path a better idea
of the system's status.

Reported-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Fixes: 868a1e863f95 ("iwlwifi: pcie: avoid empty free RB queue")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/rx.c