]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commite7b5f97e6574dc4918e375d5f8d24ec31653cd6d
tree738695e1b2b35ec1506640fdff5453571a17472d
parent15beab0a9d797be1b7c67458da007a62269be29a
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