]> xenbits.xensource.com Git - arm/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2019 20:31:33 +0000 (22:31 +0200)
commit0fbfca57ca700a9d387d749d4ed3bbc3abdc94b9
tree6326bf4e652294c30e8b94166f36dcc0b35b9dea
parent0affcd545d1121b324581efc876db3f89832aed5
iwlwifi: pcie: fix emergency path

[ Upstream commit c6ac9f9fb98851f47b978a9476594fc3c477a34d ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/pcie/rx.c