]> git.baikalelectronics.ru Git - kernel.git/commit
net: atlantic: check rpc result and wait for rpc address
authorIgor Russkikh <irusskikh@marvell.com>
Fri, 14 Feb 2020 15:44:52 +0000 (18:44 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Feb 2020 03:03:39 +0000 (19:03 -0800)
commite83efe65be480f3b97ffc72ab2ca694306237c0a
tree738695e1b2b35ec1506640fdff5453571a17472d
parent974674df7b01b6b0ad0c6c4d59815ec069a70eee
net: atlantic: check rpc result and wait for rpc address

Artificial HW reliability tests revealed a possible hangup in
the driver. Normally, when device disappears from bus, all
register reads returns 0xFFFFFFFF.

At remote procedure invocation towards FW there is a logic
where result is compared with -1 in a loop.
That caused an infinite loop if hardware due to some issues
disappears from bus.

Add extra result checks to prevent this.

Signed-off-by: Dmitry Bogdanov <dbogdanov@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c