net: bcmgenet: fix off-by-one in incrementing read pointer
Commit b629be5c ("net: bcmgenet: check harder for out of memory conditions") moved the increment of the local read pointer *before* reading from the hardware descriptor using dmadesc_get_length_status(), which creates an off-by-one situation. Fix this by moving again the read_ptr increment after we have read the hardware descriptor to get both the control block and the read pointer back in sync. Fixes: b629be5c ("net: bcmgenet: check harder for out of memory conditions") Signed-off-by: NJaedon Shin <jaedon.shin@gmail.com> Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com> Acked-by: NPetri Gynther <pgynther@google.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Showing
想要评论请 注册 或 登录