diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2009-04-29 11:57:34 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-29 17:24:17 -0700 |
commit | 1319ebadf185933e6b7ff95211d3cef9004e9754 (patch) | |
tree | 9b52363bc4eb6b97489a4913868dee0064e21249 /drivers/net/usb/Makefile | |
parent | ddc9f824b09d790e93a800ba29ff3462f8fb5d0b (diff) |
mv643xx_eth: OOM handling fixes
Currently, when OOM occurs during rx ring refill, mv643xx_eth will get
into an infinite loop, due to the refill function setting the OOM bit
but not clearing the 'rx refill needed' bit for this queue, while the
calling function (the NAPI poll handler) will call the refill function
in a loop until the 'rx refill needed' bit goes off, without checking
the OOM bit.
This patch fixes this by checking the OOM bit in the NAPI poll handler
before attempting to do rx refill. This means that once OOM occurs,
we won't try to do any memory allocations again until the next invocation
of the poll handler.
While we're at it, change the OOM flag to be a single bit instead of
one bit per receive queue since OOM is a system state rather than a
per-queue state, and cancel the OOM timer on entry to the NAPI poll
handler if it's running to prevent it from firing when we've already
come out of OOM.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Cc: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/Makefile')
0 files changed, 0 insertions, 0 deletions