From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 02/15] amd: ni65: use eth_hw_addr_set()
Date: Thu, 18 Nov 2021 23:10:20 -0800 [thread overview]
Message-ID: <20211119071033.3756560-3-kuba@kernel.org> (raw)
In-Reply-To: <20211119071033.3756560-1-kuba@kernel.org>
IO reads, so save to an array then eth_hw_addr_set().
Fixes build on x86 (32bit).
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/amd/ni65.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/amd/ni65.c b/drivers/net/ethernet/amd/ni65.c
index 032e8922b482..8ba579b89b75 100644
--- a/drivers/net/ethernet/amd/ni65.c
+++ b/drivers/net/ethernet/amd/ni65.c
@@ -251,7 +251,7 @@ static void ni65_recv_intr(struct net_device *dev,int);
static void ni65_xmit_intr(struct net_device *dev,int);
static int ni65_open(struct net_device *dev);
static int ni65_lance_reinit(struct net_device *dev);
-static void ni65_init_lance(struct priv *p,unsigned char*,int,int);
+static void ni65_init_lance(struct priv *p,const unsigned char*,int,int);
static netdev_tx_t ni65_send_packet(struct sk_buff *skb,
struct net_device *dev);
static void ni65_timeout(struct net_device *dev, unsigned int txqueue);
@@ -418,6 +418,7 @@ static int __init ni65_probe1(struct net_device *dev,int ioaddr)
{
int i,j;
struct priv *p;
+ u8 addr[ETH_ALEN];
unsigned long flags;
dev->irq = irq;
@@ -444,7 +445,8 @@ static int __init ni65_probe1(struct net_device *dev,int ioaddr)
return -ENODEV;
for(j=0;j<6;j++)
- dev->dev_addr[j] = inb(ioaddr+cards[i].addr_offset+j);
+ addr[j] = inb(ioaddr+cards[i].addr_offset+j);
+ eth_hw_addr_set(dev, addr);
if( (j=ni65_alloc_buffer(dev)) < 0) {
release_region(ioaddr, cards[i].total_size);
@@ -566,7 +568,7 @@ static int __init ni65_probe1(struct net_device *dev,int ioaddr)
/*
* set lance register and trigger init
*/
-static void ni65_init_lance(struct priv *p,unsigned char *daddr,int filter,int mode)
+static void ni65_init_lance(struct priv *p,const unsigned char *daddr,int filter,int mode)
{
int i;
u32 pib;
--
2.31.1
next prev parent reply other threads:[~2021-11-19 7:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-19 7:10 [PATCH net-next 00/15] use eth_hw_addr_set() in arch-specific drivers Jakub Kicinski
2021-11-19 7:10 ` [PATCH net-next 01/15] amd: lance: use eth_hw_addr_set() Jakub Kicinski
2021-11-19 7:10 ` Jakub Kicinski [this message]
2021-11-19 7:10 ` [PATCH net-next 03/15] amd: a2065/ariadne: " Jakub Kicinski
2021-11-19 7:10 ` [PATCH net-next 04/15] amd: hplance: " Jakub Kicinski
2021-11-19 7:10 ` [PATCH net-next 05/15] amd: atarilance: " Jakub Kicinski
2021-11-19 7:10 ` [PATCH net-next 06/15] amd: mvme147: " Jakub Kicinski
2021-11-19 7:10 ` [PATCH net-next 07/15] 8390: smc-ultra: " Jakub Kicinski
2021-11-19 7:10 ` [PATCH net-next 08/15] 8390: hydra: " Jakub Kicinski
2021-11-19 7:10 ` [PATCH net-next 09/15] 8390: mac8390: " Jakub Kicinski
2021-11-19 7:10 ` [PATCH net-next 10/15] 8390: wd: " Jakub Kicinski
2021-11-19 7:10 ` [PATCH net-next 11/15] smc9194: " Jakub Kicinski
2021-11-19 7:10 ` [PATCH net-next 12/15] lasi_82594: " Jakub Kicinski
2021-11-19 7:10 ` [PATCH net-next 13/15] apple: macmace: " Jakub Kicinski
2021-11-19 7:10 ` [PATCH net-next 14/15] cirrus: mac89x0: " Jakub Kicinski
2021-11-19 7:10 ` [PATCH net-next 15/15] natsemi: macsonic: " Jakub Kicinski
2021-11-19 11:20 ` [PATCH net-next 00/15] use eth_hw_addr_set() in arch-specific drivers patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211119071033.3756560-3-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).