Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3384622pxb; Mon, 17 Jan 2022 19:14:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJxIhTf4iQFwxFneYBehrj3qP/eL3eQdEvs9QZYA7d+f5+ZBlUcd1xQPLYbszq8FxcGqLgvA X-Received: by 2002:a17:902:c64b:b0:14a:2206:9a87 with SMTP id s11-20020a170902c64b00b0014a22069a87mr25339315pls.165.1642475676244; Mon, 17 Jan 2022 19:14:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642475676; cv=none; d=google.com; s=arc-20160816; b=nTQ/344lD99UWP3ikuish6DJPIENATDEz4Uth995w0OE5cw2yrCu5uXRAySchBQKnM oA4IyMppeaOEWGYmcpDzNWiQzVEeYcOb7cdWLquBJOdXp8oiix+B14XCHZiWbMtObslf uNeYGaRJFZzg/SAW68Td/j07cSwocVd+m0/DXsF75kgphRzIhfKtf3dx0yDlnlmmlhOM bPhImHmVc/W7psPEUuv9x5xIQQ9xZvC9FMchLHkWUNSRglsuRLh5DiSN/dN3d5QA5K4b +z2WIujSUcx0t7a2wFZpOvtUYMlhIKwCJkK/Qn40pg0zGKqWNaAhEe/Iu/oXBjMAsiGL Q20Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hpY8TNGXrSBReV9rOFlnFZzGwDGzJBAYiSoOfMQyV90=; b=D3KFn1hPayUfAbcK25yId3ora1Kj4otW/FJ+NmrNSyCYCc4bzsnAnDl1JMna3UQazV 0lqsN0dvD7DkQgpzsDD5dAIcBHlK7jHZB+lFByZMxJTmJqm2LEys7nHyfyFlq+hcCjHd 3QfPgikEUZSDlWCRS6SsQd8zPYY7c+4nZUtUk+N+gM/Xlrqq+1D14KXf45Tr2Yvr3eh2 Fc5jp+KX4CNcM2CC/x68f0YXE1xXn1LJ6dit0Ilf+/CEKvphjFGnNW2kEyjxaEO+tedX u45WAN05/W12rvERboammp1Ro0n3qWpLYhitxtQ2fAbHaDRdwpZnC3qsvqN7PQMKvNM/ aoeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OfAr8+9t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j18si16517987pgj.30.2022.01.17.19.14.11; Mon, 17 Jan 2022 19:14:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OfAr8+9t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244860AbiARCW2 (ORCPT + 99 others); Mon, 17 Jan 2022 21:22:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244954AbiARCWN (ORCPT ); Mon, 17 Jan 2022 21:22:13 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54EF5C061747; Mon, 17 Jan 2022 18:22:13 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id E773A61163; Tue, 18 Jan 2022 02:22:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7F5DC36AE3; Tue, 18 Jan 2022 02:22:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642472532; bh=hYeI/RffiKpdM6X+dBkRzZja9+0y5/A2IGZkn+XN/zY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OfAr8+9tq6Z5IyPazNv8mbHTP3V0Q3FZ7gxJ8VgirzO6flrG3YK+rWX719q999bGN 7PDKKiJihBHMLWOivO0nQ3w5Wiky7Tims34Xejqh5fSRcaUPyh9qMF71DK4x7vcJUl RLGfYqiJYswxLGHTytWylNNAWvHKqtsQ1VwrLw4YpV+GVUIyA06lRtIjSImD2SKg7e E44Kfn0VcnipfSztRAOyj5tnA9d0T9Ex9mKOLFMixr75UWXE7Aga3eGVZCZ+2sXgLl kI6O51b40kf4axt6p6MRdyT1YGJPq+suFgu6tOzKV1wmxkUk7VrboBY+uaqYWAaiG9 F13LxQvgPiAug== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jakub Kicinski , "David S . Miller" , Sasha Levin , arnd@arndb.de, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.16 043/217] 8390: wd: use eth_hw_addr_set() Date: Mon, 17 Jan 2022 21:16:46 -0500 Message-Id: <20220118021940.1942199-43-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220118021940.1942199-1-sashal@kernel.org> References: <20220118021940.1942199-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jakub Kicinski [ Upstream commit f95f8e890a2aa576425402fea44bfa657e8ccaa6 ] IO reads, so save to an array then eth_hw_addr_set(). Fixes build on x86 (32bit). Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/8390/wd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/8390/wd.c b/drivers/net/ethernet/8390/wd.c index 263a942d81fad..5b00c452bede6 100644 --- a/drivers/net/ethernet/8390/wd.c +++ b/drivers/net/ethernet/8390/wd.c @@ -168,6 +168,7 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr) int checksum = 0; int ancient = 0; /* An old card without config registers. */ int word16 = 0; /* 0 = 8 bit, 1 = 16 bit */ + u8 addr[ETH_ALEN]; const char *model_name; static unsigned version_printed; struct ei_device *ei_local = netdev_priv(dev); @@ -191,7 +192,8 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr) netdev_info(dev, version); for (i = 0; i < 6; i++) - dev->dev_addr[i] = inb(ioaddr + 8 + i); + addr[i] = inb(ioaddr + 8 + i); + eth_hw_addr_set(dev, addr); netdev_info(dev, "WD80x3 at %#3x, %pM", ioaddr, dev->dev_addr); -- 2.34.1