From nobody Mon Nov 25 20:38:35 2024 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B41571D4153; Fri, 25 Oct 2024 09:36:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.255 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729848989; cv=none; b=kxmpbd6/ghodubP7v00Zp/eSEzqVfzu1Sa0S0RyKyHc4W+/2uuPlu0Vkbb7W1Bxe4pVawHdgpD81gfiQMnUqcVOrCzjzwqclECDak4Ehy7U50fg23f/ZML5D3uA0P12oGOBZAUoJ0LJXeKYSW5PI7FYCpgBK8tonC+qOGkPJUXo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729848989; c=relaxed/simple; bh=KcCR2hzH0Uq0xUZD3RpWJkr7AgTcbWt+Z3Nw0lA76V8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SMOyLmucUYa7ysQTY5V0hMn6I4p6cR0Yt0YRCm3Bp3IEJAEX+07BkQtptZCgCiA/TYClkNvnZQHv/WTd3D5y7j6PJWFQMExsI4MbeMvqA5cfZvfZseNbo2mGVExHwCWc4fvrgKWZUPSj/IpMLwQgp9D2c8qSSDUyiaCxiWoGaIQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.255 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.105]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4XZd0D1bSNz1T904; Fri, 25 Oct 2024 17:34:20 +0800 (CST) Received: from kwepemm000007.china.huawei.com (unknown [7.193.23.189]) by mail.maildlp.com (Postfix) with ESMTPS id 6A8781401F3; Fri, 25 Oct 2024 17:36:24 +0800 (CST) Received: from localhost.localdomain (10.90.30.45) by kwepemm000007.china.huawei.com (7.193.23.189) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 25 Oct 2024 17:36:23 +0800 From: Jijie Shao To: , , , , , CC: , , , , , , , Subject: [PATCH V3 net 7/9] net: hns3: initialize reset_timer before hclgevf_misc_irq_init() Date: Fri, 25 Oct 2024 17:29:36 +0800 Message-ID: <20241025092938.2912958-8-shaojijie@huawei.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20241025092938.2912958-1-shaojijie@huawei.com> References: <20241025092938.2912958-1-shaojijie@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemm000007.china.huawei.com (7.193.23.189) Content-Type: text/plain; charset="utf-8" From: Jian Shen 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 Signed-off-by: Jijie Shao --- 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/dr= ivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c index ab54e6155e93..896f1eb172d3 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c @@ -2315,6 +2315,7 @@ static void hclgevf_state_init(struct hclgevf_dev *hd= ev) clear_bit(HCLGEVF_STATE_RST_FAIL, &hdev->state); =20 INIT_DELAYED_WORK(&hdev->service_task, hclgevf_service_task); + timer_setup(&hdev->reset_timer, hclgevf_reset_timer, 0); =20 mutex_init(&hdev->mbx_resp.mbx_mutex); sema_init(&hdev->reset_sem, 1); @@ -3014,7 +3015,6 @@ static int hclgevf_init_hdev(struct hclgevf_dev *hdev) HCLGEVF_DRIVER_NAME); =20 hclgevf_task_schedule(hdev, round_jiffies_relative(HZ)); - timer_setup(&hdev->reset_timer, hclgevf_reset_timer, 0); =20 return 0; =20 --=20 2.33.0