Searched hist:"6571 ebce112a21ec9be68ef2f53b96fcd41fd81b" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/net/ethernet/altera/ |
H A D | altera_msgdma.c | diff 6571ebce112a21ec9be68ef2f53b96fcd41fd81b Thu Jan 24 20:02:22 CST 2019 Tomonori Sakita <tomonori.sakita@sord.co.jp> net: altera_tse: fix msgdma_tx_completion on non-zero fill_level case
If fill_level was not zero and status was not BUSY, result of "tx_prod - tx_cons - inuse" might be zero. Subtracting 1 unconditionally results invalid negative return value on this case. Make sure not to return an negative value.
Signed-off-by: Tomonori Sakita <tomonori.sakita@sord.co.jp> Signed-off-by: Atsushi Nemoto <atsushi.nemoto@sord.co.jp> Reviewed-by: Dalon L Westergreen <dalon.westergreen@linux.intel.com> Acked-by: Thor Thayer <thor.thayer@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|