enic: Bug Fix: Fix hardware descriptor reads
The last bit written to a completion descriptor by hardware is the color bit. Driver must read all other descriptor fields only after reading the color bit to avoid reading stale descriptor fields. There is a rmb() after reading the color bit to avoid any compiler/cpu reordering of the reads. The color bit is the generation bit that toggles each pass through the completion descriptor ring. Signed-off-by: NScott Feldman <scofeldm@cisco.com> Signed-off-by: NVasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: NRoopa Prabhu <roprabhu@cisco.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Showing
想要评论请 注册 或 登录