qed: Fix reading wrong value in loop condition
authorDenis Bolotin <denis.bolotin@cavium.com>
Mon, 12 Nov 2018 10:50:23 +0000 (12:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Dec 2018 08:18:47 +0000 (09:18 +0100)
commit93663e617b8fdcaceb6f407af6e494df2d5c7067
tree86e75e1c6915f346fd53d9a10c433ba1f9d6f4ec
parent0f1c847db352a87f9974aa1869ca3e6f26b621f7
qed: Fix reading wrong value in loop condition

[ Upstream commit ed4eac20dcffdad47709422e0cb925981b056668 ]

The value of "sb_index" is written by the hardware. Reading its value and
writing it to "index" must finish before checking the loop condition.

Signed-off-by: Denis Bolotin <denis.bolotin@cavium.com>
Signed-off-by: Michal Kalderon <michal.kalderon@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/qlogic/qed/qed_int.c