Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3384178pxb; Mon, 17 Jan 2022 19:13:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcZbXPPdrxb54z5BfDnz8Q32Wnm00GAuqix/NcZ7xu0HY1914g/9sr2s/Aw+p2G3x4b/eT X-Received: by 2002:aa7:9e5a:0:b0:4bf:32da:b179 with SMTP id z26-20020aa79e5a000000b004bf32dab179mr23689959pfq.1.1642475622674; Mon, 17 Jan 2022 19:13:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642475622; cv=none; d=google.com; s=arc-20160816; b=vo4Lz5YO2v/yBJE5gP65XUuTvoGtemd4D1gVLJC1Wqto4zXdiujiRExBPfKV96/PtW hn/AMpNCJ4qOgb60YmtwgRNh1SxeUnO1KNxOTvbExCit6S3WkG4V3A9FPz9IK338kefG cRv3B7d0OXBcPfc/9kpe004wJiXdGNBZSmPdQvCnmfhjyTLpT9+TWY3UCjRl+f1j8Mfz Z8gBZDJZ8tgI1mPWDkuB7IbX4Xb9QPCU97ufclnl0c+QKGQ3WJfsT6RC21O24gWaJIf7 bUUMPesvcmx2enMyjocBg3EXeRmlq9rt5hFXDPB97vS9m/f56EOQJiogrRD+dRC0Cgaa KoZg== 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=gntAfwQzO/J/GEvAArb2VAxC18/VgOszfqQh9iQqe2g=; b=URqrcW/cezLO2+nkTvpmia5urEZ9nqzFTsDqv0VdaCfUXDpVfu2LtGoKXGaQHfK8+I A3X5c7rOyaUEd3yZ32DYTReQs/uGHG406e7tnZeQvbMYcmPkAgMq1spMq7k8K3A8xAmL zVswe823tsNXyyjHlniRRyIjaubQgiMHz1GFhaRVvy7Z9YZgdP/90IxEpqPinbFJV97m pEpyP1oTmEAxIo155Lpft/vWrdb5V5p03stOCNGG/F13pgQ289IK6udEkU11kurLM+vS mfYUPiYYT4du4rkQ7q0my7KLJGVBSr4O3+lQ2lULJlW9F9uF2wfbkrbkzbpnKlY0/fZT 6wPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PThZcKV2; 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 206si5728205pgc.552.2022.01.17.19.13.30; Mon, 17 Jan 2022 19:13:42 -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=PThZcKV2; 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 S244841AbiARCWf (ORCPT + 99 others); Mon, 17 Jan 2022 21:22:35 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:38884 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239531AbiARCWR (ORCPT ); Mon, 17 Jan 2022 21:22:17 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 6FF1460010; Tue, 18 Jan 2022 02:22:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18C15C36AE3; Tue, 18 Jan 2022 02:22:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642472535; bh=Eia1I/7kXiGFDysXVFjJwEP3xWDF4EvGMO70qbMvXbQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PThZcKV2sr+/+mb4nbfM7SjAIMd1Kn3oqjJ4QRj/kJPj8XviFw44rY744oADwMfz+ fkJUMbc9USKJpy+RuJxxqbHMgNHpGb3YOb0uomCTwYVFHOJeJnC3qq9K9PdaK8HlpT 9fjpckFsPH3AYMABIbTwPtgkVz4I5zmo5fw3Oa/cB75fX3IQ984x8qyvxczrIQDaZV qRWBUnZ+QRqxw16npP90eVHLssrl3TFJ729NP/g6rWar/x5RoMOErngUdRqsQcu3vs plPfE2TmUEJHXjrORdHG7jisIJ0ssUA9UaCyt8aeQldVrMnIXWYXfgakDoM4AFSH6V H4eZKNRxtpNVA== 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 044/217] smc9194: use eth_hw_addr_set() Date: Mon, 17 Jan 2022 21:16:47 -0500 Message-Id: <20220118021940.1942199-44-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 80db345e7df0c507a83bd12ac7766fb054443804 ] dev_addr is set from IO reads, and broken from a u16 value. Fixes build on Alpha. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/smsc/smc9194.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/smsc/smc9194.c b/drivers/net/ethernet/smsc/smc9194.c index 0ce403fa5f1a4..af661c65ffe2f 100644 --- a/drivers/net/ethernet/smsc/smc9194.c +++ b/drivers/net/ethernet/smsc/smc9194.c @@ -856,6 +856,7 @@ static int __init smc_probe(struct net_device *dev, int ioaddr) word configuration_register; word memory_info_register; word memory_cfg_register; + u8 addr[ETH_ALEN]; /* Grab the region so that no one else tries to probe our ioports. */ if (!request_region(ioaddr, SMC_IO_EXTENT, DRV_NAME)) @@ -924,9 +925,10 @@ static int __init smc_probe(struct net_device *dev, int ioaddr) word address; address = inw( ioaddr + ADDR0 + i ); - dev->dev_addr[ i + 1] = address >> 8; - dev->dev_addr[ i ] = address & 0xFF; + addr[i + 1] = address >> 8; + addr[i] = address & 0xFF; } + eth_hw_addr_set(dev, addr); /* get the memory information */ -- 2.34.1