]> git.baikalelectronics.ru Git - kernel.git/commit
enic: increment devcmd2 result ring in case of timeout
authorSandeep Pillai <sanpilla@cisco.com>
Wed, 3 Feb 2016 09:10:44 +0000 (14:40 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Feb 2016 09:48:01 +0000 (04:48 -0500)
commit15708fd2f6e16b2f9a6e7984f13c6d4dd9460e9e
tree2822dad86538faec10e7e7eb5f519eb0117377b8
parentccad3f0d700116fe8f669648047e9228594fae0b
enic: increment devcmd2 result ring in case of timeout

Firmware posts the devcmd result in result ring. In case of timeout, driver
does not increment the current result pointer and firmware could post the
result after timeout has occurred. During next devcmd, driver would be
reading the result of previous devcmd.

Fix this by incrementing result even in case of timeout.

Fixes: 5f0217ec7d71 ("enic: add devcmd2")
Signed-off-by: Sandeep Pillai <sanpilla@cisco.com>
Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cisco/enic/enic.h
drivers/net/ethernet/cisco/enic/vnic_dev.c