staging: qlge: Update buffer queue prod index despite oom
authorBenjamin Poirier <bpoirier@suse.com>
Fri, 27 Sep 2019 10:12:09 +0000 (19:12 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2019 15:17:47 +0000 (17:17 +0200)
commitaec626d2092f2b203f4acec5b57ed7c1e3095802
tree857cf80d3311e878fa2e0d705a697421b6c7d55b
parentc8c1ff5c19021a241afa78d1272c23ef7e7297aa
staging: qlge: Update buffer queue prod index despite oom

Currently, if we repeatedly fail to allocate all of the buffers from the
desired batching budget, we will never update the prod_idx register.
Restructure code to always update prod_idx if new buffers could be
allocated. This eliminates the current two stage process (clean_idx ->
prod_idx) and some associated bookkeeping variables.

Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
Link: https://lore.kernel.org/r/20190927101210.23856-16-bpoirier@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/qlge/qlge.h
drivers/staging/qlge/qlge_dbg.c
drivers/staging/qlge/qlge_main.c