]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
iwlwifi: pcie: fix emergency path
authorSara Sharon <sara.sharon@intel.com>
Thu, 13 Dec 2018 12:47:40 +0000 (14:47 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit6b2d6230f7f8af5b1ce1b8ff5dc1c462383af9f9
treeb41106980c599c633c101d6812d2d2a9dc5590a4
parentfbc85178dc24eacd4c424c27573d382f339dc95d
iwlwifi: pcie: fix emergency path

BugLink: https://bugs.launchpad.net/bugs/1838116
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/wireless/intel/iwlwifi/pcie/rx.c