Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3384312pxb; Mon, 17 Jan 2022 19:13:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzrw9Oxh23OHVPsvKT4B4f3NJzES6GjAy9v6a1kYMJ7Sa9Iir+xpkZ/bz2jsN1l8I/UeT9J X-Received: by 2002:a17:90b:3905:: with SMTP id ob5mr9962348pjb.179.1642475637942; Mon, 17 Jan 2022 19:13:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642475637; cv=none; d=google.com; s=arc-20160816; b=FotoFm1oSURaW3ZBGHgt5xOhVmWVGw2k3h6Z/vnAVG07Ni23lAT9MtW447qQqSELFb dl969KjjXgNOvnMnZ0EmEkFYPq9BcNPw1DuFJ10s+Ki4k/iNYD70yTSx3IfIK7kXznfP U/IPGCDVwa/s7PFvNvT+kuEC2sPz/spV/eOCWG1qJH5J9s3EF6GvcfDP7CrYsPa5cZVF 7hs2+PDn4n9h7lfuAgkPN6ArtD6J2iv6o2MxJSaUEdpZCwJ/E738qOdknLGWWF+hH1MV baRHOMTk+NQNHRTMkJ3aaJWrc1XiSTybO4LIWHWl6bogvhoYy37zlAR0Q3gQTw7Iumkn Muew== 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=Hd5SvtKr5GB8WSPCGF5dhrbnMZKln0yG/LuQ/cVNw74=; b=PrPUKjQEw92nHsSEm9H2mBLejfCf9HUC6SyV8NxcOBCMgQk77MRC9q4HnfnjmhQjIL 2PQMBVOIExioq71PsSbhlwLqG3MWGRn6APiBxzaV5I/U/1760lw22nya1YmoN0HfhgKD N1uvbGfXUiIQo1fVHUY7FtzBgk/c5sZ1rRssqAsSjfZUG5vhrIK2QQZDspNXviDJVzt+ iPOEwdLWW+b8dT2sjtgazrqdm567pYsHtMjKbbZHcxrVbUq7WSKJkZTNyCMt3nROXYis WuDlsiQRpSQxA68DHq9z7nzHsVdUA+YPfH2+1SMYFWwaDEyYijcXpo7JESdRNGVPaKRh 0cdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="koZafB/O"; 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 b5si16160728plz.298.2022.01.17.19.13.46; Mon, 17 Jan 2022 19:13:57 -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="koZafB/O"; 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 S244947AbiARCWj (ORCPT + 99 others); Mon, 17 Jan 2022 21:22:39 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:36166 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244930AbiARCWE (ORCPT ); Mon, 17 Jan 2022 21:22:04 -0500 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 ams.source.kernel.org (Postfix) with ESMTPS id 7C6EAB81238; Tue, 18 Jan 2022 02:22:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64580C36AEB; Tue, 18 Jan 2022 02:22:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642472522; bh=NuiIAk9+6AutmDT+wY0fXkJUI9tIu3M/c9EfX1hpyp8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=koZafB/O+uub+J6LdGF5h4+pX7PXVzSAakAqaXQw1uo9V3TOusmZitfLg79VxXhuT MVmlm9AOOw8OHNxrTNBoBxKd2Ql6SgdIRYJy8mNBkV3UR1kZ3bPcqHfNXjt1/EfKvO LP2lGVsr04vJkMCydvZkBCpprcTW9Ot+udl0knR0vBHN/G3Cvat7kDM7erJwFfkDNk jPulZM1x7W87G7grCK/Ok7E77M8VaTNdfLI0pBBg/Pkc96yrzwtGHReRAQ6YPOGI9c rLZjWM/uJUlj/SKic1GLz9LJbjt3/xO20Iz2GsQ7EAv3UyR/B+c6fqczqwVNusKOac 98k1GUCFrKKwg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jakub Kicinski , "David S . Miller" , Sasha Levin , arnd@arndb.de, tanghui20@huawei.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.16 040/217] 8390: smc-ultra: use eth_hw_addr_set() Date: Mon, 17 Jan 2022 21:16:43 -0500 Message-Id: <20220118021940.1942199-40-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 5114ddf8dd881f9059147d3f130e9415ce94125e ] IO reads, so save to an array then eth_hw_addr_set(). Fixes build on Alpha. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/8390/smc-ultra.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/8390/smc-ultra.c b/drivers/net/ethernet/8390/smc-ultra.c index 0890fa493f70f..6e62c37c94005 100644 --- a/drivers/net/ethernet/8390/smc-ultra.c +++ b/drivers/net/ethernet/8390/smc-ultra.c @@ -204,6 +204,7 @@ static int __init ultra_probe1(struct net_device *dev, int ioaddr) { int i, retval; int checksum = 0; + u8 macaddr[ETH_ALEN]; const char *model_name; unsigned char eeprom_irq = 0; static unsigned version_printed; @@ -239,7 +240,8 @@ static int __init ultra_probe1(struct net_device *dev, int ioaddr) model_name = (idreg & 0xF0) == 0x20 ? "SMC Ultra" : "SMC EtherEZ"; for (i = 0; i < 6; i++) - dev->dev_addr[i] = inb(ioaddr + 8 + i); + macaddr[i] = inb(ioaddr + 8 + i); + eth_hw_addr_set(dev, macaddr); netdev_info(dev, "%s at %#3x, %pM", model_name, ioaddr, dev->dev_addr); -- 2.34.1