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

Configure Feed

Select the types of activity you want to include in your feed.

ptp: ocp: Fix typo using index 1 instead of i in SMA initialization loop

In ptp_ocp_sma_fb_init(), the code mistakenly used bp->sma[1]
instead of bp->sma[i] inside a for-loop, which caused only SMA[1]
to have its DIRECTION_CAN_CHANGE capability cleared. This led to
inconsistent capability flags across SMA pins.

Fixes: 09eeb3aecc6c ("ptp_ocp: implement DPLL ops")
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/20251021182456.9729-1-jiashengjiangcool@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Jiasheng Jiang and committed by
Jakub Kicinski
a767957e 4c3aa496

+1 -1
+1 -1
drivers/ptp/ptp_ocp.c
··· 2548 2548 for (i = 0; i < OCP_SMA_NUM; i++) { 2549 2549 bp->sma[i].fixed_fcn = true; 2550 2550 bp->sma[i].fixed_dir = true; 2551 - bp->sma[1].dpll_prop.capabilities &= 2551 + bp->sma[i].dpll_prop.capabilities &= 2552 2552 ~DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE; 2553 2553 } 2554 2554 return;