Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11d827a9 authored by Yangbo Lu's avatar Yangbo Lu Committed by David S. Miller
Browse files

net: gianfar_ptp: move set_fipers() to spinlock protecting area



set_fipers() calling should be protected by spinlock in
case that any interrupt breaks related registers setting
and the function we expect. This patch is to move set_fipers()
to spinlock protecting area in ptp_gianfar_adjtime().

Signed-off-by: default avatarYangbo Lu <yangbo.lu@nxp.com>
Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
Reviewed-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e5143f86
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -319,11 +319,10 @@ static int ptp_gianfar_adjtime(struct ptp_clock_info *ptp, s64 delta)
	now = tmr_cnt_read(etsects);
	now += delta;
	tmr_cnt_write(etsects, now);
	set_fipers(etsects);

	spin_unlock_irqrestore(&etsects->lock, flags);

	set_fipers(etsects);

	return 0;
}