Linux Documentation
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Fan Gong <gongfan1@huawei.com>,
	Zhu Yikai <zhuyikai1@h-partners.com>,
	netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Markus.Elfring@web.de, pavan.chebbi@broadcom.com
Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	luosifu <luosifu@huawei.com>, Xin Guo <guoxin09@huawei.com>,
	Shen Chenyang <shenchenyang1@hisilicon.com>,
	Zhou Shuai <zhoushuai28@huawei.com>, Wu Like <wulike1@huawei.com>,
	Shi Jing <shijing34@huawei.com>,
	Luo Yang <luoyang82@h-partners.com>,
	Meny Yossefi <meny.yossefi@huawei.com>,
	Gur Stavi <gur.stavi@huawei.com>
Subject: Re: [PATCH net-next v02 1/6] hinic3: Add PF framework
Date: Tue, 21 Oct 2025 11:16:36 +0200	[thread overview]
Message-ID: <1674cec4-4270-43e9-ba32-07d058a79b56@redhat.com> (raw)
In-Reply-To: <beb30a91e7d26245e3736285fe4ceb52d4f9c418.1760685059.git.zhuyikai1@h-partners.com>

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


  reply	other threads:[~2025-10-21  9:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17  8:30 [PATCH net-next v02 0/6] net: hinic3: PF initialization Fan Gong
2025-10-17  8:30 ` [PATCH net-next v02 1/6] hinic3: Add PF framework Fan Gong
2025-10-21  9:16   ` Paolo Abeni [this message]
2025-10-17  8:30 ` [PATCH net-next v02 2/6] hinic3: Add PF management interfaces Fan Gong
2025-10-21  9:25   ` Paolo Abeni
2025-10-17  8:30 ` [PATCH net-next v02 3/6] hinic3: Add NIC configuration ops Fan Gong
2025-10-21 10:02   ` Paolo Abeni
2025-10-17  8:30 ` [PATCH net-next v02 4/6] hinic3: Add mac filter ops Fan Gong
2025-10-17 11:51   ` Markus Elfring
2025-10-20  1:29     ` Fan Gong
2025-10-21 10:16   ` Paolo Abeni
2025-10-17  8:30 ` [PATCH net-next v02 5/6] hinic3: Add netdev register interfaces Fan Gong
2025-10-17  8:30 ` [PATCH net-next v02 6/6] hinic3: Fix netif_queue_set_napi queue_index parameter passing error Fan Gong
2025-10-21 10:22   ` Paolo Abeni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1674cec4-4270-43e9-ba32-07d058a79b56@redhat.com \
    --to=pabeni@redhat.com \
    --cc=Markus.Elfring@web.de \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gongfan1@huawei.com \
    --cc=guoxin09@huawei.com \
    --cc=gur.stavi@huawei.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luosifu@huawei.com \
    --cc=luoyang82@h-partners.com \
    --cc=meny.yossefi@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=pavan.chebbi@broadcom.com \
    --cc=shenchenyang1@hisilicon.com \
    --cc=shijing34@huawei.com \
    --cc=wulike1@huawei.com \
    --cc=zhoushuai28@huawei.com \
    --cc=zhuyikai1@h-partners.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox