mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-14 12:49:08 +00:00
net:phy:dp83640: Move all HW initialization to dp83640_config_init
phy_init_hw not does a full PHY reset after the driver probe has finished, so any hw initialization done in the probe will be lost. Part of the timestamping functionality of the dp83640 is set up in the probe and with that lost, enabling timestamping will cause a PHY lockup, requiring a hard reset / power cycle to recover. This patch moves all the HW initialization in dp83640_probe to dp83640_config_init. Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0d961b3b52
commit
602b109942
@ -1006,11 +1006,6 @@ static int dp83640_probe(struct phy_device *phydev)
|
||||
} else
|
||||
list_add_tail(&dp83640->list, &clock->phylist);
|
||||
|
||||
if (clock->chosen && !list_empty(&clock->phylist))
|
||||
recalibrate(clock);
|
||||
else
|
||||
enable_broadcast(dp83640->phydev, clock->page, 1);
|
||||
|
||||
dp83640_clock_put(clock);
|
||||
return 0;
|
||||
|
||||
@ -1063,6 +1058,14 @@ static void dp83640_remove(struct phy_device *phydev)
|
||||
|
||||
static int dp83640_config_init(struct phy_device *phydev)
|
||||
{
|
||||
struct dp83640_private *dp83640 = phydev->priv;
|
||||
struct dp83640_clock *clock = dp83640->clock;
|
||||
|
||||
if (clock->chosen && !list_empty(&clock->phylist))
|
||||
recalibrate(clock);
|
||||
else
|
||||
enable_broadcast(phydev, clock->page, 1);
|
||||
|
||||
enable_status_frames(phydev, true);
|
||||
ext_write(0, phydev, PAGE4, PTP_CTL, PTP_ENABLE);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user