diff options
author | Vince Bridgers | 2013-12-20 18:19:34 +0100 |
---|---|---|
committer | David S. Miller | 2013-12-30 04:37:00 +0100 |
commit | 7cd013992335b1c5156059248ee765fb3b14d154 (patch) | |
tree | e6e6743929ab64162ece4ed88f28f958bd035665 /drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | |
parent | phy: IRQ cannot be shared (diff) | |
download | kernel-qcow2-linux-7cd013992335b1c5156059248ee765fb3b14d154.tar.gz kernel-qcow2-linux-7cd013992335b1c5156059248ee765fb3b14d154.tar.xz kernel-qcow2-linux-7cd013992335b1c5156059248ee765fb3b14d154.zip |
stmmac: Fix incorrect spinlock release and PTP cap detection.
This patch corrects a problem in stmmac_ptp.c, functions
stmmac_adjust_time and stmmac_adjust_freq where the incorrect spinlocks
were released. This patch also addresses a problem in stmmac_main,
function stmmac_init_ptp where the capability detection for
advanced timestamping was masked by message masking.
This patch was touch tested using linuxptp, and runs without the previously
observed instabilities. More extensive testing is ongoing.
Vince
Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c index b8b0eeed0f92..7680581ebe12 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c @@ -56,7 +56,7 @@ static int stmmac_adjust_freq(struct ptp_clock_info *ptp, s32 ppb) priv->hw->ptp->config_addend(priv->ioaddr, addend); - spin_unlock_irqrestore(&priv->lock, flags); + spin_unlock_irqrestore(&priv->ptp_lock, flags); return 0; } @@ -91,7 +91,7 @@ static int stmmac_adjust_time(struct ptp_clock_info *ptp, s64 delta) priv->hw->ptp->adjust_systime(priv->ioaddr, sec, nsec, neg_adj); - spin_unlock_irqrestore(&priv->lock, flags); + spin_unlock_irqrestore(&priv->ptp_lock, flags); return 0; } |