All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
To: Jijie Shao <shaojijie@huawei.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
	shenjian15@huawei.com, wangpeiyang1@huawei.com,
	liuyonglong@huawei.com, chenhao418@huawei.com,
	jonathan.cameron@huawei.com,
	shameerali.kolothum.thodi@huawei.com, salil.mehta@huawei.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND V2 net 5/7] net: hns3: initialize reset_timer before hclgevf_misc_irq_init()
Date: Wed, 18 Dec 2024 10:20:45 +0100	[thread overview]
Message-ID: <Z2KT7bLfHmx01wSU@mev-dev.igk.intel.com> (raw)
In-Reply-To: <20241217010839.1742227-6-shaojijie@huawei.com>

On Tue, Dec 17, 2024 at 09:08:37AM +0800, Jijie Shao wrote:
> From: Jian Shen <shenjian15@huawei.com>
> 
> Currently the misc irq is initialized before reset_timer setup. But
> it will access the reset_timer in the irq handler. So initialize
> the reset_timer earlier.
> 
> Fixes: ff200099d271 ("net: hns3: remove unnecessary work in hclgevf_main")
> Signed-off-by: Jian Shen <shenjian15@huawei.com>
> Signed-off-by: Jijie Shao <shaojijie@huawei.com>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
>  drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
> index fd0abe37fdd7..8739da317897 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
> @@ -2313,6 +2313,7 @@ static void hclgevf_state_init(struct hclgevf_dev *hdev)
>  	clear_bit(HCLGEVF_STATE_RST_FAIL, &hdev->state);
>  
>  	INIT_DELAYED_WORK(&hdev->service_task, hclgevf_service_task);
Comment here that timer needs to be initialized before misc irq will be
nice, but that is onlu my impression.

Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>

Thanks
> +	timer_setup(&hdev->reset_timer, hclgevf_reset_timer, 0);
>  
>  	mutex_init(&hdev->mbx_resp.mbx_mutex);
>  	sema_init(&hdev->reset_sem, 1);
> @@ -3012,7 +3013,6 @@ static int hclgevf_init_hdev(struct hclgevf_dev *hdev)
>  		 HCLGEVF_DRIVER_NAME);
>  
>  	hclgevf_task_schedule(hdev, round_jiffies_relative(HZ));
> -	timer_setup(&hdev->reset_timer, hclgevf_reset_timer, 0);
>  
>  	return 0;
>  
> -- 
> 2.33.0

  reply	other threads:[~2024-12-18  9:23 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-17  1:08 [PATCH RESEND V2 net 0/7] There are some bugfix for the HNS3 ethernet driver Jijie Shao
2024-12-17  1:08 ` [PATCH RESEND V2 net 1/7] net: hns3: fixed reset failure issues caused by the incorrect reset type Jijie Shao
2024-12-18  9:02   ` Michal Swiatkowski
2024-12-19  9:41     ` Paolo Abeni
2024-12-19 10:11       ` Michal Swiatkowski
2024-12-19 10:43         ` Paolo Abeni
2024-12-19 12:26           ` Jijie Shao
2025-01-06 14:41             ` Jijie Shao
2024-12-19 10:13       ` Michal Swiatkowski
2024-12-19 12:18       ` Jijie Shao
2024-12-17  1:08 ` [PATCH RESEND V2 net 2/7] net: hns3: fix missing features due to dev->features configuration too early Jijie Shao
2024-12-18  9:16   ` Michal Swiatkowski
2024-12-17  1:08 ` [PATCH RESEND V2 net 3/7] net: hns3: Resolved the issue that the debugfs query result is inconsistent Jijie Shao
2024-12-17  1:08 ` [PATCH RESEND V2 net 4/7] net: hns3: don't auto enable misc vector Jijie Shao
2024-12-17  1:08 ` [PATCH RESEND V2 net 5/7] net: hns3: initialize reset_timer before hclgevf_misc_irq_init() Jijie Shao
2024-12-18  9:20   ` Michal Swiatkowski [this message]
2024-12-19 11:48     ` Jijie Shao
2024-12-17  1:08 ` [PATCH RESEND V2 net 6/7] net: hns3: fixed hclge_fetch_pf_reg accesses bar space out of bounds issue Jijie Shao
2024-12-18  9:29   ` Michal Swiatkowski
2024-12-19  9:51     ` Paolo Abeni
2024-12-19 10:23       ` Michal Swiatkowski
2024-12-19 11:52     ` Jijie Shao
2024-12-17  1:08 ` [PATCH RESEND V2 net 7/7] net: hns3: fix kernel crash when 1588 is sent on HIP08 devices Jijie Shao
2024-12-18  9:30   ` Michal Swiatkowski

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=Z2KT7bLfHmx01wSU@mev-dev.igk.intel.com \
    --to=michal.swiatkowski@linux.intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=chenhao418@huawei.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jonathan.cameron@huawei.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuyonglong@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=salil.mehta@huawei.com \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=shaojijie@huawei.com \
    --cc=shenjian15@huawei.com \
    --cc=wangpeiyang1@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.