staging: qlge: Refill rx buffers up to multiple of 16
authorBenjamin Poirier <bpoirier@suse.com>
Fri, 27 Sep 2019 10:12:10 +0000 (19:12 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2019 15:17:47 +0000 (17:17 +0200)
commit6e9c52b920974b90c4ca994c5d8c5bc56742017f
treeb72d257b800f01a6ed700582409144a12006c305
parentaec626d2092f2b203f4acec5b57ed7c1e3095802
staging: qlge: Refill rx buffers up to multiple of 16

Reading the {s,l}bq_prod_idx registers on a running device, it appears that
the adapter will only use buffers up to prod_idx & 0xfff0. The driver
currently uses fixed-size guard zones (16 for sbq, 32 for lbq - don't know
why this difference). After the previous patch, this approach no longer
guarantees prod_idx values aligned on multiples of 16. While it appears
that we can write unaligned values to prod_idx without ill effects on
device operation, it makes more sense to change qlge_refill_bq() to refill
up to a limit that corresponds with the device's behavior.

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