]> git.baikalelectronics.ru Git - kernel.git/commit
alx: fix alx_poll()
authorEric Dumazet <edumazet@google.com>
Sun, 11 Jan 2015 18:32:18 +0000 (10:32 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Jan 2015 02:45:50 +0000 (21:45 -0500)
commit1e234c75b2bc8c0268c0f429a8b0ef34c43c1149
tree8f2d83bfb307b13055366662fc99d17538a05097
parent6f12bebd3b803b715839df122cdc13c742c4f245
alx: fix alx_poll()

Commit c7f3160ce886 ("net: less interrupt masking in NAPI") uncovered
wrong alx_poll() behavior.

A NAPI poll() handler is supposed to return exactly the budget when/if
napi_complete() has not been called.

It is also supposed to return number of frames that were received, so
that netdev_budget can have a meaning.

Also, in case of TX pressure, we still have to dequeue received
packets : alx_clean_rx_irq() has to be called even if
alx_clean_tx_irq(alx) returns false, otherwise device is half duplex.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Fixes: c7f3160ce886 ("net: less interrupt masking in NAPI")
Reported-by: Oded Gabbay <oded.gabbay@amd.com>
Bisected-by: Oded Gabbay <oded.gabbay@amd.com>
Tested-by: Oded Gabbay <oded.gabbay@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/atheros/alx/main.c