ice: Fix return value from NAPI poll
authorDave Ertman <david.m.ertman@intel.com>
Fri, 26 Oct 2018 18:44:43 +0000 (11:44 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Dec 2019 07:51:30 +0000 (08:51 +0100)
commite0cf32be082a6ef5688f6d2d66672898ef3cd993
tree19cc2b4ac2ef6a6145529a62fdb5bea37f1a725d
parentf04eee4042ab74a240fb39daf0e089cf3cee35c5
ice: Fix return value from NAPI poll

[ Upstream commit e0c9fd9b77a7334032ec407d9e14d7c3cac1ac4f ]

ice_napi_poll is hard-coded to return zero when it's done. It should
instead return the work done (if any work was done). The only time it
should return zero is if an interrupt or poll is handled and no work
is performed. So change the return value to be the minimum of work
done or budget-1.

Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/ice/ice_txrx.c