Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ptp: ptp_clockmatrix: fix is_single_shot

is_single_shot should return false for the power_of_2 mask

Fixes: bec67592521e ("ptp: ptp_clockmatrix: Add PTP_CLK_REQ_EXTTS support")
Signed-off-by: Min Li <min.li.xe@renesas.com>
Link: https://lore.kernel.org/r/1653403501-12621-1-git-send-email-min.li.xe@renesas.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Min Li and committed by
Jakub Kicinski
d0bbe032 0b718007

+1 -1
+1 -1
drivers/ptp/ptp_clockmatrix.c
··· 267 267 static bool is_single_shot(u8 mask) 268 268 { 269 269 /* Treat single bit ToD masks as continuous trigger */ 270 - return mask <= 8 && is_power_of_2(mask); 270 + return !(mask <= 8 && is_power_of_2(mask)); 271 271 } 272 272 273 273 static int idtcm_extts_enable(struct idtcm_channel *channel,