[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1674cec4-4270-43e9-ba32-07d058a79b56@redhat.com>
Date: Tue, 21 Oct 2025 11:16:36 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Fan Gong <gongfan1@...wei.com>, Zhu Yikai <zhuyikai1@...artners.com>,
netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Simon Horman <horms@...nel.org>, Andrew Lunn <andrew+netdev@...n.ch>,
Markus.Elfring@....de, pavan.chebbi@...adcom.com
Cc: linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
luosifu <luosifu@...wei.com>, Xin Guo <guoxin09@...wei.com>,
Shen Chenyang <shenchenyang1@...ilicon.com>,
Zhou Shuai <zhoushuai28@...wei.com>, Wu Like <wulike1@...wei.com>,
Shi Jing <shijing34@...wei.com>, Luo Yang <luoyang82@...artners.com>,
Meny Yossefi <meny.yossefi@...wei.com>, Gur Stavi <gur.stavi@...wei.com>
Subject: Re: [PATCH net-next v02 1/6] hinic3: Add PF framework
On 10/17/25 10:30 AM, Fan Gong wrote:
> @@ -431,11 +436,40 @@ static int hinic3_init_comm_ch(struct hinic3_hwdev *hwdev)
>
> static void hinic3_uninit_comm_ch(struct hinic3_hwdev *hwdev)
> {
> + hinic3_set_pf_status(hwdev->hwif, HINIC3_PF_STATUS_INIT);
> hinic3_free_cmdqs_channel(hwdev);
> hinic3_set_func_svc_used_state(hwdev, COMM_FUNC_SVC_T_COMM, 0);
> free_base_mgmt_channel(hwdev);
> }
>
> +static void hinic3_auto_sync_time_work(struct work_struct *work)
> +{
> + struct delayed_work *delay = to_delayed_work(work);
> + struct hinic3_hwdev *hwdev;
> +
> + hwdev = container_of(delay, struct hinic3_hwdev, sync_time_task);
> + queue_delayed_work(hwdev->workq, &hwdev->sync_time_task,
> + msecs_to_jiffies(HINIC3_SYNFW_TIME_PERIOD));
It looks like the above unconditionally reschedule itself (also
apparently it's not sync-ing anything?!?)...
> +}
> +
> +static void hinic3_init_ppf_work(struct hinic3_hwdev *hwdev)
> +{
> + if (hinic3_ppf_idx(hwdev) != hinic3_global_func_id(hwdev))
> + return;
> +
> + INIT_DELAYED_WORK(&hwdev->sync_time_task, hinic3_auto_sync_time_work);
> + queue_delayed_work(hwdev->workq, &hwdev->sync_time_task,
> + msecs_to_jiffies(HINIC3_SYNFW_TIME_PERIOD));
> +}
> +
> +static void hinic3_free_ppf_work(struct hinic3_hwdev *hwdev)
> +{
> + if (hinic3_ppf_idx(hwdev) != hinic3_global_func_id(hwdev))
> + return;
> +
> + cancel_delayed_work_sync(&hwdev->sync_time_task);
So here disable_delayed_work_sync() should be used.
> +}
> +
> static DEFINE_IDA(hinic3_adev_ida);
>
> static int hinic3_adev_idx_alloc(void)
> @@ -498,15 +532,19 @@ int hinic3_init_hwdev(struct pci_dev *pdev)
> goto err_uninit_comm_ch;
> }
>
> + hinic3_init_ppf_work(hwdev);
> +
> err = hinic3_set_comm_features(hwdev, hwdev->features,
> COMM_MAX_FEATURE_QWORD);
> if (err) {
> dev_err(hwdev->dev, "Failed to set comm features\n");
> - goto err_uninit_comm_ch;
> + goto err_free_ppf_work;
> }
>
> return 0;
>
> +err_free_ppf_work:
> + hinic3_free_ppf_work(hwdev);
I don't see a similar call in the device cleanup?!?
/P
Powered by blists - more mailing lists