Received: by 2002:a05:6512:3d0e:0:0:0:0 with SMTP id d14csp40553lfv; Tue, 12 Apr 2022 16:25:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnYYQX0LJSv4Tc4DSBRjRRRiKAjjHRnjPUVFk79R/yydJHCs/dhY3f3/+4MH1kVMTTxAOd X-Received: by 2002:a17:90b:38d1:b0:1c9:ba10:353b with SMTP id nn17-20020a17090b38d100b001c9ba10353bmr7542652pjb.9.1649805938782; Tue, 12 Apr 2022 16:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649805938; cv=none; d=google.com; s=arc-20160816; b=Ym9ISQtPVdksoaF8NAVvmem8+wVslLZxIdxXKY+JLhzGh1Hv8ychcTVdF6ORrqkONa 6sVerSQRVii/CX2cqBkk1W92ZeFGxQjctPAh/xUtwHDZa+XPPxBqmYqPDjPPvt8h2xoq z91xAFaMnrB2gzCb1dGBfMOw8MsFacyujeOkyD9ekVfh+AHrmDYrXtN5FlT8MfEiDxe4 d9ltVNMxVPmK5sLIOESg+sJh3tk30iUvlTaOczCt0ygGHFq4g7mLgr74aKWlh30g+42X AIjDoak8vLCmrVqjeTfgNjqiBeAxZLFyyxLEnV/oAqYCb77FzkYrGnA6uCulnhzXx7G6 1PQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=C9d0Zr89FIpqKmadO1Obz82CL9gMg0ky7pKQ5wBXs30=; b=aZaZ9VIg3XA/kjG+H9XqEKFqNyMRyOP4bSmcwIug7MKxOKCCBce/m+YhL8uP3H74Ox 2E1evobQ4TydGTm7rLiRUCQ/yviD2A6kc1rSB4rJ+WjMZmMq1PWTaxsX/BH2mV7b+804 didIZKhTf83Gludbgx7KUa8yUm0ei3Ilvawqzo6B/wfYYztbnOuieCNPrb4+30MxepIs H7i1voetv01XAF5Hs4xtY1ydQIB7eFqmPzUbxD6aiZSaCJFr1o+3FhsJHOjFcVYFuBNk 4rztM2f4O4JiQq7is7cVZ7ks0d8cGuc9PNKxHWvSBOB417NFgkhhqRCwbKhkLz5/pc1v 3DQg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 5-20020a630205000000b00382918eae51si4135850pgc.290.2022.04.12.16.25.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 16:25:38 -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; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4ADA91A775F; Tue, 12 Apr 2022 14:17:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354569AbiDLNbI (ORCPT + 99 others); Tue, 12 Apr 2022 09:31:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351097AbiDLNbC (ORCPT ); Tue, 12 Apr 2022 09:31:02 -0400 Received: from mx1.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0F8D1092; Tue, 12 Apr 2022 06:28:17 -0700 (PDT) Received: from [141.14.220.45] (g45.guest.molgen.mpg.de [141.14.220.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id AA5E961EA1923; Tue, 12 Apr 2022 15:28:14 +0200 (CEST) Message-ID: Date: Tue, 12 Apr 2022 15:28:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [Intel-wired-lan] [PATCH] ice: wait for EMP reset after firmware flash Content-Language: en-US To: Petr Oros Cc: Jacob Keller , ivecera@redhat.com, intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com, davem@davemloft.net, netdev@vger.kernel.org, regressions@lists.linux.dev References: <20220412102753.670867-1-poros@redhat.com> From: Paul Menzel In-Reply-To: <20220412102753.670867-1-poros@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 [Cc: +Jakob, +regressions@lists.linux.dev] Dear Petr, Thank you for your patch for the regression. #regzbot ^introduced 399e27dbbd9e94 Am 12.04.22 um 12:27 schrieb Petr Oros: Please mention the time in the commit message summary: ice: Wait 5 s for EMP reset after firmware flash > We need to wait for EMP reset after firmware flash. > Code was extracted from OOT driver and without this wait fw_activate let Which OOT driver exactly? > card in inconsistent state recoverable only by second flash/activate Please reflow for 75 characters per line, and add a dot/period to the end of sentences. > Reproducer: > [root@host ~]# devlink dev flash pci/0000:ca:00.0 file E810_XXVDA4_FH_O_SEC_FW_1p6p1p9_NVM_3p10_PLDMoMCTP_0.11_8000AD7B.bin > Preparing to flash > [fw.mgmt] Erasing > [fw.mgmt] Erasing done > [fw.mgmt] Flashing 100% > [fw.mgmt] Flashing done 100% > [fw.undi] Erasing > [fw.undi] Erasing done > [fw.undi] Flashing 100% > [fw.undi] Flashing done 100% > [fw.netlist] Erasing > [fw.netlist] Erasing done > [fw.netlist] Flashing 100% > [fw.netlist] Flashing done 100% > Activate new firmware by devlink reload > [root@host ~]# devlink dev reload pci/0000:ca:00.0 action fw_activate > reload_actions_performed: > fw_activate > [root@host ~]# ip link show ens7f0 > 71: ens7f0: mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000 > link/ether b4:96:91:dc:72:e0 brd ff:ff:ff:ff:ff:ff > altname enp202s0f0 > > dmesg after flash: > [ 55.120788] ice: Copyright (c) 2018, Intel Corporation. > [ 55.274734] ice 0000:ca:00.0: Get PHY capabilities failed status = -5, continuing anyway > [ 55.569797] ice 0000:ca:00.0: The DDP package was successfully loaded: ICE OS Default Package version 1.3.28.0 > [ 55.603629] ice 0000:ca:00.0: Get PHY capability failed. > [ 55.608951] ice 0000:ca:00.0: ice_init_nvm_phy_type failed: -5 > [ 55.647348] ice 0000:ca:00.0: PTP init successful > [ 55.675536] ice 0000:ca:00.0: DCB is enabled in the hardware, max number of TCs supported on this port are 8 > [ 55.685365] ice 0000:ca:00.0: FW LLDP is disabled, DCBx/LLDP in SW mode. > [ 55.692179] ice 0000:ca:00.0: Commit DCB Configuration to the hardware > [ 55.701382] ice 0000:ca:00.0: 126.024 Gb/s available PCIe bandwidth, limited by 16.0 GT/s PCIe x8 link at 0000:c9:02.0 (capable of 252.048 Gb/s with 16.0 GT/s PCIe x16 link) So, what is the error? `Get PHY capabilities failed status = -5`? What firmware version did the network card have before and after the update? > Reboot don't help, only second flash/activate with OOT or patched driver put card back in consistent state s/don't/doesn’t/ > After patch: > [root@host ~]# devlink dev flash pci/0000:ca:00.0 file E810_XXVDA4_FH_O_SEC_FW_1p6p1p9_NVM_3p10_PLDMoMCTP_0.11_8000AD7B.bin > Preparing to flash > [fw.mgmt] Erasing > [fw.mgmt] Erasing done > [fw.mgmt] Flashing 100% > [fw.mgmt] Flashing done 100% > [fw.undi] Erasing > [fw.undi] Erasing done > [fw.undi] Flashing 100% > [fw.undi] Flashing done 100% > [fw.netlist] Erasing > [fw.netlist] Erasing done > [fw.netlist] Flashing 100% > [fw.netlist] Flashing done 100% > Activate new firmware by devlink reload > [root@host ~]# devlink dev reload pci/0000:ca:00.0 action fw_activate > reload_actions_performed: > fw_activate > [root@host ~]# ip link show ens7f0 > 19: ens7f0: mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 > link/ether b4:96:91:dc:72:e0 brd ff:ff:ff:ff:ff:ff > altname enp202s0f0 Did you try anything less than five seconds? i40e uses one second, cf. commit 9b13bd53134c (i40e: Increase delay to 1 s after global EMP reset). > Fixes: 399e27dbbd9e94 ("ice: support immediate firmware activation via devlink reload") > Signed-off-by: Petr Oros > --- > drivers/net/ethernet/intel/ice/ice_main.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c > index d768925785ca79..90ea2203cdc763 100644 > --- a/drivers/net/ethernet/intel/ice/ice_main.c > +++ b/drivers/net/ethernet/intel/ice/ice_main.c > @@ -6931,12 +6931,15 @@ static void ice_rebuild(struct ice_pf *pf, enum ice_reset_req reset_type) > > dev_dbg(dev, "rebuilding PF after reset_type=%d\n", reset_type); > > +#define ICE_EMP_RESET_SLEEP 5000 Please append the unit to the macro name. > if (reset_type == ICE_RESET_EMPR) { > /* If an EMP reset has occurred, any previously pending flash > * update will have completed. We no longer know whether or > * not the NVM update EMP reset is restricted. > */ > pf->fw_emp_reset_disabled = false; > + > + msleep(ICE_EMP_RESET_SLEEP); > } > > err = ice_init_all_ctrlq(hw); Kind regards, Paul