qed: Fix blocking/unlimited SPQ entries leak
authorDenis Bolotin <denis.bolotin@cavium.com>
Thu, 8 Nov 2018 14:46:09 +0000 (16:46 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Nov 2018 03:38:18 +0000 (19:38 -0800)
commit2632f22ebd08da249c2017962a199a0cfb2324bf
treecc1007ec2b0413ff2c19d11af593a9cb768f3855
parent39477551df940ddb1339203817de04f5caaacf7a
qed: Fix blocking/unlimited SPQ entries leak

When there are no SPQ entries left in the free_pool, new entries are
allocated and are added to the unlimited list. When an entry in the pool
is available, the content is copied from the original entry, and the new
entry is sent to the device. qed_spq_post() is not aware of that, so the
additional entry is stored in the original entry as p_post_ent, which can
later be returned to the pool.

Signed-off-by: Denis Bolotin <denis.bolotin@cavium.com>
Signed-off-by: Michal Kalderon <michal.kalderon@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_sp.h
drivers/net/ethernet/qlogic/qed/qed_spq.c