net/mlx5: Query PPS pin operational status before registering it
authorEran Ben Elisha <eranbe@mellanox.com>
Mon, 20 Jul 2020 15:34:37 +0000 (18:34 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Aug 2020 07:58:42 +0000 (09:58 +0200)
commit7ae12b6ba18aa8466249dda9a8ab2676a835d8bb
tree9e74acd180ac3d59eb2721f861e97ffaadf4e903
parent649b20bcad9209ffce4f7006b068b76d35198e29
net/mlx5: Query PPS pin operational status before registering it

[ Upstream commit ed56d749c366be269d58b29597392e4a0ae71c0a ]

In a special configuration, a ConnectX6-Dx pin pps-out might be activated
when driver is loaded. Fix the driver to always read the operational pin
mode when registering it, and advertise it accordingly.

Fixes: ee7f12205abc ("net/mlx5e: Implement 1PPS support")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c