]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: Test memory before ethtool alloc succeeds
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Mon, 18 Apr 2016 18:33:49 +0000 (11:33 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 6 May 2016 06:17:07 +0000 (23:17 -0700)
commitbe1016be815d176dcb6b5aa71160923c42a61f26
tree5eeafe28eb1185c47e571281321a389b2b62ceeb
parent7bde9460cbc60dd302116d4a39089f87581a6341
i40e: Test memory before ethtool alloc succeeds

When testing on systems with very limited amounts of RAM, a bug was
found where, while changing the number of descriptors using ethtool,
the driver didn't test the limits of system memory before permanently
assuming it would be able to get receive buffer memory.

Work around this issue by pre-allocation of the receive buffer
memory, in the "ghost" ring, which is then used during reinit
using the new ring length.

Change-Id: I92d7a5fb59a6c884b2efdd1ec652845f101c3359
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c