From patchwork Tue Oct 27 13:46:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 289942 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21145C388F9 for ; Tue, 27 Oct 2020 14:49:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C0CFD21556 for ; Tue, 27 Oct 2020 14:49:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810159; bh=DLx0wn6O1IvYMMtGamhATuorYPUG4JQWxkpIRTM9jGU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=S+HKq70UQRxnT83YBSQBPFX4d9ifIERJR5YRiMxVUJ3boFAZ8vtGs6DjBPlAwEC1d T1as3viZkYejxLrGUSsoiKgF8XxurIrwC3/qm/OKIkkAnWWYYkxetxX9vz9PTb+hK8 A46yCpTX3a5uGq6Dwymzelvu1fmIo3gjknSjM07o= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1766565AbgJ0OtS (ORCPT ); Tue, 27 Oct 2020 10:49:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:49352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1766561AbgJ0OtO (ORCPT ); Tue, 27 Oct 2020 10:49:14 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 13069206E5; Tue, 27 Oct 2020 14:49:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810153; bh=DLx0wn6O1IvYMMtGamhATuorYPUG4JQWxkpIRTM9jGU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xGvJbCSk1zPfISQG3hiOzaRASklCXu/W+XZc32hQ4w972UDUQbppcVIsTiEZNPbw3 6YwkQk5dQuGlM8ZfYLHRuf72/ouYYFsBUeTqXR8RrtM9xrSPnxzLCLMnlxgC+0VAlN /aLDuHkl2xblQmnsL2q3WTZJpzCRCNiLabf3JNLM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lijun Pan , Jakub Kicinski Subject: [PATCH 5.8 038/633] ibmvnic: save changed mac address to adapter->mac_addr Date: Tue, 27 Oct 2020 14:46:21 +0100 Message-Id: <20201027135524.478646220@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Lijun Pan [ Upstream commit d9b0e599b2b892422f1cbc5d2658049b895b2b58 ] After mac address change request completes successfully, the new mac address need to be saved to adapter->mac_addr as well as netdev->dev_addr. Otherwise, adapter->mac_addr still holds old data. Fixes: 62740e97881c ("net/ibmvnic: Update MAC address settings after adapter reset") Signed-off-by: Lijun Pan Link: https://lore.kernel.org/r/20201020223919.46106-1-ljp@linux.ibm.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/ibm/ibmvnic.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -4194,8 +4194,13 @@ static int handle_change_mac_rsp(union i dev_err(dev, "Error %ld in CHANGE_MAC_ADDR_RSP\n", rc); goto out; } + /* crq->change_mac_addr.mac_addr is the requested one + * crq->change_mac_addr_rsp.mac_addr is the returned valid one. + */ ether_addr_copy(netdev->dev_addr, &crq->change_mac_addr_rsp.mac_addr[0]); + ether_addr_copy(adapter->mac_addr, + &crq->change_mac_addr_rsp.mac_addr[0]); out: complete(&adapter->fw_done); return rc;