
This commit back ports the DPLL related commits from the upstream kernel that are identified by Intel to provide the expected SyncE/GNSS functionality. There are totally 46 back ported commits included the four commits I added are used to resolve the conflicts during back porting. The 0046 patch is cherry picked from kernel-6.9. The 0031-0045 patches are cherry picked from kernel-6.8. The 0001-0030 patches are cherry picked from kernel-6.7. We also change the in-tree ice driver version to 6.6.40-stx.2 from 6.6.40-stx.1. * To fix the conflict of 91e43ca0090b ("ice: fix linking when CONFIG_PTP_1588_CLOCK=n"), we cherry pick 12a5a28b565b ("ice: remove ICE_F_PTP_EXTTS feature flag") and 89776a6a702e ("ice: check netlist before enabling ICE_F_GNSS"). Adjust 12a5a28b565b because 0d1b22367ec2 ("ice: fix pin assignment for E810-T without SMA control") already included the part code of 12a5a28b565b. https://git.yoctoproject.org/linux-yocto/commit/?id=0d1b22367ec2 * Cherry pick 7049fd5df7 ("netlink: specs: remove redundant type keys from attributes in subsets") to fix the the conflict of c3c6ab95c397 ("dpll: spec: add support for pin-dpll signal phase offset/adjust.") * Cherry pick be16574609f1 ("ice: introduce hw->phy_model for handling PTP PHY differences") to fix the confilict of 6db5f2cd9ebb ("ice: dpll:fix output pin capabilities"). Verification: - Build kernel and out of tree modules success for rt and std. - Install success onto a All-in-One lab with rt kernel. - Boot up successfully in the lab. - interfaces are up and pass packets for rt and std. - Check dmesg to see DDP package is loaded successfully and the version is 1.3.36.0 for rt and std, that is same with the OOT ice-1.14.9 driver. - The SyncE/GNSS functionality tests were done by the network team. Story: 2011056 Task: 50797 Change-Id: I715480681c7c43d53b0a0126b34135562e9d02a0 Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
113 lines
4.6 KiB
Diff
113 lines
4.6 KiB
Diff
From 2f27891def7f2f5cdba668d9eefa6a9652475f23 Mon Sep 17 00:00:00 2001
|
|
From: Michal Schmidt <mschmidt@redhat.com>
|
|
Date: Fri, 1 Mar 2024 14:37:08 +0100
|
|
Subject: [PATCH 45/46] ice: fix uninitialized dplls mutex usage
|
|
|
|
The pf->dplls.lock mutex is initialized too late, after its first use.
|
|
Move it to the top of ice_dpll_init.
|
|
Note that the "err_exit" error path destroys the mutex. And the mutex is
|
|
the last thing destroyed in ice_dpll_deinit.
|
|
This fixes the following warning with CONFIG_DEBUG_MUTEXES:
|
|
|
|
ice 0000:10:00.0: The DDP package was successfully loaded: ICE OS Default Package version 1.3.36.0
|
|
ice 0000:10:00.0: 252.048 Gb/s available PCIe bandwidth (16.0 GT/s PCIe x16 link)
|
|
ice 0000:10:00.0: PTP init successful
|
|
------------[ cut here ]------------
|
|
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
|
|
WARNING: CPU: 0 PID: 410 at kernel/locking/mutex.c:587 __mutex_lock+0x773/0xd40
|
|
Modules linked in: crct10dif_pclmul crc32_pclmul crc32c_intel polyval_clmulni polyval_generic ice(+) nvme nvme_c>
|
|
CPU: 0 PID: 410 Comm: kworker/0:4 Not tainted 6.8.0-rc5+ #3
|
|
Hardware name: HPE ProLiant DL110 Gen10 Plus/ProLiant DL110 Gen10 Plus, BIOS U56 10/19/2023
|
|
Workqueue: events work_for_cpu_fn
|
|
RIP: 0010:__mutex_lock+0x773/0xd40
|
|
Code: c0 0f 84 1d f9 ff ff 44 8b 35 0d 9c 69 01 45 85 f6 0f 85 0d f9 ff ff 48 c7 c6 12 a2 a9 85 48 c7 c7 12 f1 a>
|
|
RSP: 0018:ff7eb1a3417a7ae0 EFLAGS: 00010286
|
|
RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000000
|
|
RDX: 0000000000000002 RSI: ffffffff85ac2bff RDI: 00000000ffffffff
|
|
RBP: ff7eb1a3417a7b80 R08: 0000000000000000 R09: 00000000ffffbfff
|
|
R10: ff7eb1a3417a7978 R11: ff32b80f7fd2e568 R12: 0000000000000000
|
|
R13: 0000000000000000 R14: 0000000000000000 R15: ff32b7f02c50e0d8
|
|
FS: 0000000000000000(0000) GS:ff32b80efe800000(0000) knlGS:0000000000000000
|
|
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
|
|
CR2: 000055b5852cc000 CR3: 000000003c43a004 CR4: 0000000000771ef0
|
|
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
|
|
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
|
|
PKRU: 55555554
|
|
Call Trace:
|
|
<TASK>
|
|
? __warn+0x84/0x170
|
|
? __mutex_lock+0x773/0xd40
|
|
? report_bug+0x1c7/0x1d0
|
|
? prb_read_valid+0x1b/0x30
|
|
? handle_bug+0x42/0x70
|
|
? exc_invalid_op+0x18/0x70
|
|
? asm_exc_invalid_op+0x1a/0x20
|
|
? __mutex_lock+0x773/0xd40
|
|
? rcu_is_watching+0x11/0x50
|
|
? __kmalloc_node_track_caller+0x346/0x490
|
|
? ice_dpll_lock_status_get+0x28/0x50 [ice]
|
|
? __pfx_ice_dpll_lock_status_get+0x10/0x10 [ice]
|
|
? ice_dpll_lock_status_get+0x28/0x50 [ice]
|
|
ice_dpll_lock_status_get+0x28/0x50 [ice]
|
|
dpll_device_get_one+0x14f/0x2e0
|
|
dpll_device_event_send+0x7d/0x150
|
|
dpll_device_register+0x124/0x180
|
|
ice_dpll_init_dpll+0x7b/0xd0 [ice]
|
|
ice_dpll_init+0x224/0xa40 [ice]
|
|
? _dev_info+0x70/0x90
|
|
ice_load+0x468/0x690 [ice]
|
|
ice_probe+0x75b/0xa10 [ice]
|
|
? _raw_spin_unlock_irqrestore+0x4f/0x80
|
|
? process_one_work+0x1a3/0x500
|
|
local_pci_probe+0x47/0xa0
|
|
work_for_cpu_fn+0x17/0x30
|
|
process_one_work+0x20d/0x500
|
|
worker_thread+0x1df/0x3e0
|
|
? __pfx_worker_thread+0x10/0x10
|
|
kthread+0x103/0x140
|
|
? __pfx_kthread+0x10/0x10
|
|
ret_from_fork+0x31/0x50
|
|
? __pfx_kthread+0x10/0x10
|
|
ret_from_fork_asm+0x1b/0x30
|
|
</TASK>
|
|
irq event stamp: 125197
|
|
hardirqs last enabled at (125197): [<ffffffff8416409d>] finish_task_switch.isra.0+0x12d/0x3d0
|
|
hardirqs last disabled at (125196): [<ffffffff85134044>] __schedule+0xea4/0x19f0
|
|
softirqs last enabled at (105334): [<ffffffff84e1e65a>] napi_get_frags_check+0x1a/0x60
|
|
softirqs last disabled at (105332): [<ffffffff84e1e65a>] napi_get_frags_check+0x1a/0x60
|
|
---[ end trace 0000000000000000 ]---
|
|
|
|
Fixes: d7999f5ea64b ("ice: implement dpll interface to control cgu")
|
|
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
|
|
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
|
|
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
|
|
(cherry picked from commit 9224fc86f1776193650a33a275cac628952f80a9)
|
|
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
|
|
---
|
|
drivers/net/ethernet/intel/ice/ice_dpll.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c
|
|
index 2b657d43c769..68b894bb68fe 100644
|
|
--- a/drivers/net/ethernet/intel/ice/ice_dpll.c
|
|
+++ b/drivers/net/ethernet/intel/ice/ice_dpll.c
|
|
@@ -2146,6 +2146,7 @@ void ice_dpll_init(struct ice_pf *pf)
|
|
struct ice_dplls *d = &pf->dplls;
|
|
int err = 0;
|
|
|
|
+ mutex_init(&d->lock);
|
|
err = ice_dpll_init_info(pf, cgu);
|
|
if (err)
|
|
goto err_exit;
|
|
@@ -2158,7 +2159,6 @@ void ice_dpll_init(struct ice_pf *pf)
|
|
err = ice_dpll_init_pins(pf, cgu);
|
|
if (err)
|
|
goto deinit_pps;
|
|
- mutex_init(&d->lock);
|
|
if (cgu) {
|
|
err = ice_dpll_init_worker(pf);
|
|
if (err)
|
|
--
|
|
2.43.0
|
|
|