2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-29 23:53:55 +08:00
linux-next/drivers/net/ethernet/intel/igbvf
Alexander Duyck 3eb1a40f4b igbvf: Make next_to_watch a pointer and adjust memory barriers to avoid races
This change is meant to address several race issues that become possible
because next_to_watch could possibly be set to a value that shows that the
descriptor is done when it is not.  In order to correct that we instead make
next_to_watch a pointer that is set to NULL during cleanup, and set to the
eop_desc after the descriptor rings have been written.

To enforce proper ordering the next_to_watch pointer is not set until after
a wmb writing the values to the last descriptor in a transmit.  In order to
guarantee that the descriptor is not read until after the eop_desc we use the
read_barrier_depends which is only really necessary on the alpha architecture.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-02-15 21:46:51 -08:00
..
defines.h igbvf: work around i350 erratum 2012-11-28 03:57:23 -08:00
ethtool.c igbvf: fix divide by zero 2012-06-30 17:40:45 -07:00
igbvf.h igbvf: Make next_to_watch a pointer and adjust memory barriers to avoid races 2013-02-15 21:46:51 -08:00
Makefile igbvf: change copyright date 2012-02-03 03:07:15 -08:00
mbx.c igbvf: change copyright date 2012-02-03 03:07:15 -08:00
mbx.h igbvf: change copyright date 2012-02-03 03:07:15 -08:00
netdev.c igbvf: Make next_to_watch a pointer and adjust memory barriers to avoid races 2013-02-15 21:46:51 -08:00
regs.h igbvf: change copyright date 2012-02-03 03:07:15 -08:00
vf.c drivers/net/ethernet: Fix (nearly-)kernel-doc comments for various functions 2012-07-10 23:13:46 -07:00
vf.h igbvf: change copyright date 2012-02-03 03:07:15 -08:00