From patchwork Fri Sep 6 19:29:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Reed X-Patchwork-Id: 1982064 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X0mXF4b21z1y1K for ; Sat, 7 Sep 2024 05:30:04 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1smeeR-0000Rs-HL; Fri, 06 Sep 2024 19:29:47 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1smeeO-0000RI-QQ for kernel-team@lists.ubuntu.com; Fri, 06 Sep 2024 19:29:44 +0000 Received: from mail-oo1-f70.google.com (mail-oo1-f70.google.com [209.85.161.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id A01E23F5B4 for ; Fri, 6 Sep 2024 19:29:44 +0000 (UTC) Received: by mail-oo1-f70.google.com with SMTP id 006d021491bc7-5dfad8e0633so2340923eaf.2 for ; Fri, 06 Sep 2024 12:29:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725650983; x=1726255783; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Wn4zpk39qqdBFMkgA7SR9Lxf8XGnYCK6U5fC7EVB4xU=; b=wIu0TX5gTQuPBydTDu4xLhbpyV7mBfRBv8aIKbni/V4IQrA0nE+H3gEcp7TqhSVO4z 9DogHTJfTwWt+G2urt6IA9wJSVnKuqwvBELR0G3hDka1cPTNzlBiLhLe4TueIBHfBAp9 eov1g5esv7wdo/Y+Ch10gGygWVeJTMyF3awmVe8hMn5BAYqfZ173+7KWGDrM7Vz4hxt/ IDr7IGE637ZJ+1Vvr3MNmJ4zNuvT/qQbKf/Po73EaaeoLgsd8Z7oQlxPuGLyXDlmUHaq dbXSCvljzg5xc9X1xLteh4xgAPV+Aoi9uTa8CLQDbx8Hu/mVaUClL3/TTVZqat6NNJ1N Ahcg== X-Gm-Message-State: AOJu0YyyHO1LrXn8+E3h/EF+ncwXYO7RFjpm6s23VAWUwXDDLfE8ZMNS qnNsH5r28Pj+VkYbwo88N3yweeTWauHj4FMWTrayiySQJpdBCS/+xPCYkaxFe7vs+KRdd7sA0Bp CQ7GWOMQUzzOXZGEEtM+ymkJS2ZTjw6iQMZgOUgNAr67u0+I2QusmzKYZcQrS6zWIUmbHWVbBy3 Joi/FIgAeT6JJ1 X-Received: by 2002:a05:6820:553:b0:5dc:a733:d984 with SMTP id 006d021491bc7-5e1a9bf946dmr3286048eaf.1.1725650983252; Fri, 06 Sep 2024 12:29:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEBVbKIrbLPkm1IHk8kvGgjUF7SS7q1K6iSGtiir4/tddVST3DN5jQpvp1biGFQugUcku1RTg== X-Received: by 2002:a05:6820:553:b0:5dc:a733:d984 with SMTP id 006d021491bc7-5e1a9bf946dmr3286037eaf.1.1725650982823; Fri, 06 Sep 2024 12:29:42 -0700 (PDT) Received: from localhost ([2600:1700:1d0:5e50:6b10:29e8:856e:eb07]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5e1bbd59e7bsm8376eaf.36.2024.09.06.12.29.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 12:29:42 -0700 (PDT) From: Michael Reed To: kernel-team@lists.ubuntu.com Subject: [SRU][N][PATCH 1/1] i40e: fix: remove needless retries of NVM update Date: Fri, 6 Sep 2024 14:29:39 -0500 Message-Id: <20240906192939.26981-2-michael.reed@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240906192939.26981-1-michael.reed@canonical.com> References: <20240906192939.26981-1-michael.reed@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Aleksandr Loktionov BugLink: https://bugs.launchpad.net/bugs/2076675 Remove wrong EIO to EGAIN conversion and pass all errors as is. After commit 230f3d53a547 ("i40e: remove i40e_status"), which should only replace F/W specific error codes with Linux kernel generic, all EIO errors suddenly started to be converted into EAGAIN which leads nvmupdate to retry until it timeouts and sometimes fails after more than 20 minutes in the middle of NVM update, so NVM becomes corrupted. The bug affects users only at the time when they try to update NVM, and only F/W versions that generate errors while nvmupdate. For example, X710DA2 with 0x8000ECB7 F/W is affected, but there are probably more... Command for reproduction is just NVM update: ./nvmupdate64 In the log instead of: i40e_nvmupd_exec_aq err I40E_ERR_ADMIN_QUEUE_ERROR aq_err I40E_AQ_RC_ENOMEM) appears: i40e_nvmupd_exec_aq err -EIO aq_err I40E_AQ_RC_ENOMEM i40e: eeprom check failed (-5), Tx/Rx traffic disabled The problematic code did silently convert EIO into EAGAIN which forced nvmupdate to ignore EAGAIN error and retry the same operation until timeout. That's why NVM update takes 20+ minutes to finish with the fail in the end. Fixes: 230f3d53a547 ("i40e: remove i40e_status") Co-developed-by: Kelvin Kang Signed-off-by: Kelvin Kang Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Aleksandr Loktionov Reviewed-by: Przemek Kitszel Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20240710224455.188502-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski (cherry picked from commit 8b9b59e27aa88ba133fbac85def3f8be67f2d5a8) Signed-off-by: Michael Reed --- drivers/net/ethernet/intel/i40e/i40e_adminq.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.h b/drivers/net/ethernet/intel/i40e/i40e_adminq.h index ee86d2c53079..55b5bb884d73 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_adminq.h +++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.h @@ -109,10 +109,6 @@ static inline int i40e_aq_rc_to_posix(int aq_ret, int aq_rc) -EFBIG, /* I40E_AQ_RC_EFBIG */ }; - /* aq_rc is invalid if AQ timed out */ - if (aq_ret == -EIO) - return -EAGAIN; - if (!((u32)aq_rc < (sizeof(aq_to_posix) / sizeof((aq_to_posix)[0])))) return -ERANGE;