From: Alexander Duyck Date: Sat, 28 Sep 2013 06:00:22 +0000 (+0000) Subject: i40e: Do not directly increment Tx next_to_use X-Git-Tag: v3.13-rc1~105^2~194^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc4ac67bc98f1d54ec0ef8bcddf54892ad78e1f9;p=pandora-kernel.git i40e: Do not directly increment Tx next_to_use Avoid directly incrementing next_to_use for multiple reasons. The main reason being that if we directly increment it then it can attain a state where it is equal to the ring count. Technically this is a state it should not be able to reach but the way this is written it now can. This patch pulls the value off into a register and then increments it and writes back either the value or 0 depending on if the value is equal to the ring count. Signed-off-by: Alexander Duyck Signed-off-by: Jesse Brandeburg Tested-by: Kavindya Deegala Signed-off-by: Jeff Kirsher --- Reading git-diff-tree failed