net: qede: fix PTP initialization on recovery
authorAlexander Lobakin <alobakin@marvell.com>
Tue, 23 Jun 2020 13:51:34 +0000 (16:51 +0300)
committerSasha Levin <sashal@kernel.org>
Tue, 30 Jun 2020 19:36:08 +0000 (15:36 -0400)
commitd24a3a66b88319ff7d00d8587f3dddf0eb75c0fd
treeb0f9a95db1a740053470e6d9d15fb9f7590b4e8e
parente90e235cb238f8096b442f4dc99cdda46210e6a3
net: qede: fix PTP initialization on recovery

[ Upstream commit 1c85f394c2206ea3835f43534d5675f0574e1b70 ]

Currently PTP cyclecounter and timecounter are initialized only on
the first probing and are cleaned up during removal. This means that
PTP becomes non-functional after device recovery.
Fix this by unconditional PTP initialization on probing and clearing
Tx pending bit on exiting.

Fixes: ccc67ef50b90 ("qede: Error recovery process")
Signed-off-by: Alexander Lobakin <alobakin@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/qlogic/qede/qede_main.c
drivers/net/ethernet/qlogic/qede/qede_ptp.c
drivers/net/ethernet/qlogic/qede/qede_ptp.h