Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp292901rwb; Thu, 1 Dec 2022 02:11:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Zs6vGVxnexTvnhjbhIZGqqJvKINArYzPbZGNIwq6HQzV+GB11bj1wzsv8/HSwKnK9ScNK X-Received: by 2002:a17:906:5a71:b0:7c0:b882:7ea with SMTP id my49-20020a1709065a7100b007c0b88207eamr211131ejc.768.1669889505439; Thu, 01 Dec 2022 02:11:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669889505; cv=none; d=google.com; s=arc-20160816; b=GXfSMuleuzyVAWgSJnwKeZlg/gmJtzRXUyUGcCLxUJXrgS+kRvNj94daBokuHvd+ry +Gmpa1X3Z3050fJFU4n1M0UIaGV6v1Ratj0c3a7nTa6YTJvQXZy/CSMYLLUn8hIHzmvJ zDRY+4EQkL0OVyHdKRI2yQYoCDGxRDTYc/RJbXhmm+k11mJ1+PvFRtEECkMu/S25VJJe hnIQ71WWkMDD9K1n5OTpY3qlsuiUfO7MfruiL2BG2lmM88xpaQdSjhDVEnAJyEnOzRlK k5QGuyDJFmGY78Ne5I8lwojiw0uKcNC2eUS6HTvXWbDx52230SojdCnGvHYjRRWYjFm9 /o0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=gEi5WooIzymVJWTmisumqALsHWCs8mFJrm8lGYU0gwg=; b=CwVKYAB0nxNppm/rVv34+UJjZ7LTNbf3xOfW/SjWKCwJ34eOW1mD8lXL4nBWlQ/F+t yykhIxAikPCjxDdL9P8vHqU6wZ6pXYWzBCml/OFrXL9IbXCLr0rEL/GRsBgL67Ba23cW UgbAq0d1ENM7aYmMV1L8E5WAV9iOrRbjVg3g2NhUq1adOMB/r3HLN6dDSiuYRZanIjpL Ntthi/HbPqdQBBT4wI992i1RLHrh3LX6rK6WAOY9eo5hkF018z2FbesO5ds6JV6mlG46 AVB9TDEnKttfog7XBVreB+tiqIw7kxaBLkuRm8I+zviWJcoh7yudVC4PIR62pwciot7v f9AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@daynix-com.20210112.gappssmtp.com header.s=20210112 header.b=lhsxbXMp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q1-20020aa7d441000000b0046bce131279si2450438edr.13.2022.12.01.02.11.22; Thu, 01 Dec 2022 02:11:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@daynix-com.20210112.gappssmtp.com header.s=20210112 header.b=lhsxbXMp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230128AbiLAJ45 (ORCPT + 83 others); Thu, 1 Dec 2022 04:56:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230077AbiLAJ4u (ORCPT ); Thu, 1 Dec 2022 04:56:50 -0500 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 174D289ADA for ; Thu, 1 Dec 2022 01:56:49 -0800 (PST) Received: by mail-pg1-x534.google.com with SMTP id f9so1218952pgf.7 for ; Thu, 01 Dec 2022 01:56:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=gEi5WooIzymVJWTmisumqALsHWCs8mFJrm8lGYU0gwg=; b=lhsxbXMptzbThlto8/s9mq8gvOTeQm71kwyFost1kp4jJfu3FfEwyfW7FlEez3IAT0 2fpaIR9O13gitkUK3SPHjae1AzvyxVIAVkabSih35tKaIDAGUMUm0wzJ6dJshVtcmLGN UpsJ3vovMBypF8U1dbftpieUXFgFcq8RJOA9LmWv/WXOeluYInOfunSYysa7LLP0wzBf GdmgMnyDkgtaTPv79HlDRjeNoUy4sNAp36s12S0c68a5NbhupNNDVJpM/TePN/8y1L0y i8ASwM+6bdRVyao00W2CiX68Ztw1DWhQ4sba2Ps1x+4kwu7L3JDWCJH/65H3Cyf8DYi7 A4zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gEi5WooIzymVJWTmisumqALsHWCs8mFJrm8lGYU0gwg=; b=7dzjhdh31E5LUiy+M2DNlDpNl+irHLP1Lht6QfYhrU41/aJS+CWHbVcSHuCWWBTyph jw4Mzyl7RPwgTLFw6aLJSHVA53kA/LMcEWIPps3DhzAf3bpnOzkHY1hqoKwSoCKYy/ed K15BUCXBKsVnxK/DaZ7w0iq8UulwqG4z7W6S8pLXLfOnUJKL0adHYux20Ztphx0RH65h ZbqESbrg4nHPEmj6gAcChL7LHXp9yKk5lSRsBsbc7+gBS3ylPauCuplKN6OD4gpP0C6i os22dUx/A3Yyhk1pwB6bv9KuQVrmgQ5xxx50Nse1ingO2SCJEIefv1QyUKr6zhhnnZMG gMtQ== X-Gm-Message-State: ANoB5pnuQwKAo+VHr6fqD8QFoMUfLVLWlNvMV6RmOjbnHjLd7XWgqHSV gtC3ypbQwpTERqDUN4X06+8SgfkdsNESiKGp X-Received: by 2002:a62:5844:0:b0:563:1231:1da with SMTP id m65-20020a625844000000b00563123101damr50373568pfb.5.1669888608459; Thu, 01 Dec 2022 01:56:48 -0800 (PST) Received: from alarm.flets-east.jp ([2400:4050:c360:8200:7b99:f7c3:d084:f1e2]) by smtp.gmail.com with ESMTPSA id j3-20020a170902da8300b001714e7608fdsm3146244plx.256.2022.12.01.01.56.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Dec 2022 01:56:48 -0800 (PST) From: Akihiko Odaki Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, Paul Menzel , Jesse Brandeburg , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Yan Vugenfirer , Yuri Benditovich , Tony Nguyen , Akihiko Odaki Subject: [PATCH net v3 RESEND] igbvf: Regard vf reset nack as success Date: Thu, 1 Dec 2022 18:56:38 +0900 Message-Id: <20221201095638.63652-1-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org vf reset nack actually represents the reset operation itself is performed but no address is assigned. Therefore, e1000_reset_hw_vf should fill the "perm_addr" with the zero address and return success on such an occasion. This prevents its callers in netdev.c from saying PF still resetting, and instead allows them to correctly report that no address is assigned. Fixes: 6ddbc4cf1f4d ("igb: Indicate failure on vf reset for empty mac address") Signed-off-by: Akihiko Odaki --- Resending as I forgot to CC Tony Nguyen. Sorry for messing your mailbox. V2 -> V3: Added Fixes: tag drivers/net/ethernet/intel/igbvf/vf.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/igbvf/vf.c b/drivers/net/ethernet/intel/igbvf/vf.c index b8ba3f94c363..2691ae2a8002 100644 --- a/drivers/net/ethernet/intel/igbvf/vf.c +++ b/drivers/net/ethernet/intel/igbvf/vf.c @@ -1,6 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2009 - 2018 Intel Corporation. */ +#include + #include "vf.h" static s32 e1000_check_for_link_vf(struct e1000_hw *hw); @@ -131,11 +133,18 @@ static s32 e1000_reset_hw_vf(struct e1000_hw *hw) /* set our "perm_addr" based on info provided by PF */ ret_val = mbx->ops.read_posted(hw, msgbuf, 3); if (!ret_val) { - if (msgbuf[0] == (E1000_VF_RESET | - E1000_VT_MSGTYPE_ACK)) + switch (msgbuf[0]) { + case E1000_VF_RESET | E1000_VT_MSGTYPE_ACK: memcpy(hw->mac.perm_addr, addr, ETH_ALEN); - else + break; + + case E1000_VF_RESET | E1000_VT_MSGTYPE_NACK: + eth_zero_addr(hw->mac.perm_addr); + break; + + default: ret_val = -E1000_ERR_MAC_INIT; + } } } -- 2.38.1