OSDN Git Service

e1000e: fix the use of magic numbers for buffer overrun issue
authorSasha Neftin <sasha.neftin@intel.com>
Mon, 6 Nov 2017 06:31:59 +0000 (08:31 +0200)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 27 Nov 2017 21:57:10 +0000 (13:57 -0800)
commitc0f4b163a03e73055dd734eaca64b9580e72e7fb
treefaffbb1cee3b49d2823ae4e4142a98f7c36d9c31
parentc30bf8cecebabb119aa1fbb17de84f924a8ab8f7
e1000e: fix the use of magic numbers for buffer overrun issue

This is a follow on to commit b10effb92e27 ("fix buffer overrun while the
 I219 is processing DMA transactions") to address David Laights concerns
about the use of "magic" numbers.  So define masks as well as add
additional code comments to give a better understanding of what needs to
be done to avoid a buffer overrun.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Reviewed-by: Alexander H Duyck <alexander.h.duyck@intel.com>
Reviewed-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
Reviewed-by: Raanan Avargil <raanan.avargil@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/e1000e/ich8lan.h
drivers/net/ethernet/intel/e1000e/netdev.c