Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp855780pxb; Wed, 6 Apr 2022 02:07:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFIA+LH53o18wGCE0NouNwK79yQi4zUYPtyMd2OOJTrR+Ji+3sGdZEYEldv1l2/wQ3FCy4 X-Received: by 2002:a17:902:ba8e:b0:151:ed65:fda4 with SMTP id k14-20020a170902ba8e00b00151ed65fda4mr7688187pls.127.1649236034084; Wed, 06 Apr 2022 02:07:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649236034; cv=none; d=google.com; s=arc-20160816; b=ThkTfB1bK+aDekJi1vVTgr9wXehw37ax68hdZw2rPgmIh0cyPITmlZu2RrO82OC3zn P25t4JVCKsPjp5/nIA2TdKZr+/QWZIsn2O86BIGATFgjd143EjUbkHQd5fEOPKju1LOW mJrsJYMEe9TYMVrVNBj0GcS4igtETgB/Xw5c6txMWNAtwzp98VrSM2qD+fnBo+rp/oq7 gUc6UZfHdijWhcgWSDK+bf1e7G7AHv2r9p4dVZ/CedZ+E2RitirSZZTyIwJUj57oyvke YhwHZtUg0WzzCsVAbPdljoHn1eAXLL5IbIUY/NSPvcGPqQkrU2YBOgd+D0RGRLbwCyIp HimQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NctvcGYDaq+171QrSuX3Bfun6o8Pwlb4MjoDX8g0Pn4=; b=ZnZwArQK+x7hKUCAVK8MlXkt5b6jkJrSa3cfwClvNh/26bM2jKsp7XOcdJaK0gGs7E OxCwiISOd/IuhgaZBqRLZJ9IhHsxOQjL/JNyWZHhfeiyLeOdnIiX5zRF9UiyhOXHbOye UALGNVB+RgcB/0Zknp9xRb6l1tRevv0nuUPlVdoyZkq7kKD2/S5rUwowxMfWyPo+YTtk vN8EoNrW2JZEH5iI/9tVVJpiQ2YiGBxhE14Zgmc7A9taLCsb6TVtH3Q8J8TxJGD3btSL ptof9674fy1wkzENAP29s41K4PArfFBknxPrkQNTGFgSVgw0n/Rjpjkm3dvcLiSHd2aQ /9UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="xaI/pzkO"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id p10-20020a056a000b4a00b004fa3a8dff4fsi16258696pfo.6.2022.04.06.02.07.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 02:07:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="xaI/pzkO"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A62DE2BA3FB; Wed, 6 Apr 2022 00:22:26 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245434AbiDEW03 (ORCPT + 99 others); Tue, 5 Apr 2022 18:26:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348838AbiDEJsk (ORCPT ); Tue, 5 Apr 2022 05:48:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82DBBB6D36; Tue, 5 Apr 2022 02:36:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 37CF9B81B75; Tue, 5 Apr 2022 09:36:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4801C385A2; Tue, 5 Apr 2022 09:36:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151394; bh=rFPWn8GWcpZ9ZSeW4EwQLpAg5z5Z/yGsExAp/xZzGCs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xaI/pzkOM+YPePMkoMqPsb04ttenV26wfGInq6UQsitPrCUcpK2rLyG/gqx7TSF1E 2m1JZz0PmMKJE4bECbbYNgK80nbuE+Ai7iTAbahkGmHHXnvGZWPU3yTxarad6bitJa 51osB584yHbcG/ZOIyu1RMCXyrEpkbPUIS73aq8c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shannon Nelson , "David S. Miller" , Sasha Levin Subject: [PATCH 5.15 398/913] ionic: start watchdog after all is setup Date: Tue, 5 Apr 2022 09:24:20 +0200 Message-Id: <20220405070351.777834914@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shannon Nelson [ Upstream commit 9ad2939a1525962a79a2fd974ec7e3a71455b964 ] The watchdog expects the lif to fully exist when it goes off, so lets not start the watchdog until all is ready in case there is some quirky time dialation that makes probe take multiple seconds. Fixes: 089406bc5ad6 ("ionic: add a watchdog timer to monitor heartbeat") Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 4 +++- drivers/net/ethernet/pensando/ionic/ionic_dev.c | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c index 7e296fa71b36..40fa5bce2ac2 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c @@ -331,6 +331,9 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) goto err_out_deregister_lifs; } + mod_timer(&ionic->watchdog_timer, + round_jiffies(jiffies + ionic->watchdog_period)); + return 0; err_out_deregister_lifs: @@ -348,7 +351,6 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) err_out_reset: ionic_reset(ionic); err_out_teardown: - del_timer_sync(&ionic->watchdog_timer); pci_clear_master(pdev); /* Don't fail the probe for these errors, keep * the hw interface around for inspection diff --git a/drivers/net/ethernet/pensando/ionic/ionic_dev.c b/drivers/net/ethernet/pensando/ionic/ionic_dev.c index 0d6858ab511c..1b7730308d6a 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_dev.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_dev.c @@ -122,9 +122,6 @@ int ionic_dev_setup(struct ionic *ionic) idev->fw_generation = IONIC_FW_STS_F_GENERATION & ioread8(&idev->dev_info_regs->fw_status); - mod_timer(&ionic->watchdog_timer, - round_jiffies(jiffies + ionic->watchdog_period)); - idev->db_pages = bar->vaddr; idev->phy_db_pages = bar->bus_addr; -- 2.34.1