From: Jakub Kicinski <kuba@kernel.org> Date: 2021-11-19 07:10:43
Fixups for more arch-specific drivers.
With these (and another patch which didn't fit) the build is more or
less clean with all cross-compilers available on kernel.org. I say
more or less because around half of the arches fail to build for
unrelated reasons right now.
Most of the changes here are for m68k, 32bit x86 and alpha.
Jakub Kicinski (15):
amd: lance: use eth_hw_addr_set()
amd: ni65: use eth_hw_addr_set()
amd: a2065/ariadne: use eth_hw_addr_set()
amd: hplance: use eth_hw_addr_set()
amd: atarilance: use eth_hw_addr_set()
amd: mvme147: use eth_hw_addr_set()
8390: smc-ultra: use eth_hw_addr_set()
8390: hydra: use eth_hw_addr_set()
8390: mac8390: use eth_hw_addr_set()
8390: wd: use eth_hw_addr_set()
smc9194: use eth_hw_addr_set()
lasi_82594: use eth_hw_addr_set()
apple: macmace: use eth_hw_addr_set()
cirrus: mac89x0: use eth_hw_addr_set()
natsemi: macsonic: use eth_hw_addr_set()
drivers/net/ethernet/8390/hydra.c | 4 +++-
drivers/net/ethernet/8390/mac8390.c | 4 +++-
drivers/net/ethernet/8390/smc-ultra.c | 4 +++-
drivers/net/ethernet/8390/wd.c | 4 +++-
drivers/net/ethernet/amd/a2065.c | 18 +++++++++-------
drivers/net/ethernet/amd/ariadne.c | 20 ++++++++++--------
drivers/net/ethernet/amd/atarilance.c | 7 ++++--
drivers/net/ethernet/amd/hplance.c | 4 +++-
drivers/net/ethernet/amd/lance.c | 4 +++-
drivers/net/ethernet/amd/mvme147.c | 14 ++++++------
drivers/net/ethernet/amd/ni65.c | 8 ++++---
drivers/net/ethernet/apple/macmace.c | 14 +++++++-----
drivers/net/ethernet/cirrus/mac89x0.c | 7 ++++--
drivers/net/ethernet/i825xx/lasi_82596.c | 6 ++++--
drivers/net/ethernet/natsemi/macsonic.c | 27 +++++++++++++++---------
drivers/net/ethernet/smsc/smc9194.c | 6 ++++--
16 files changed, 96 insertions(+), 55 deletions(-)
--
2.31.1
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-11-19 07:10:44
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/lance.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
@@ -480,6 +480,7 @@ static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, intunsignedlongflags;interr=-ENOMEM;void__iomem*bios;+u8addr[ETH_ALEN];/* First we look for special cases.CheckforHP'son-boardethernetbylookingfor'HP'intheBIOS.
@@ -541,7 +542,8 @@ static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int/* There is a 16 byte station address PROM at the base address.Thefirstsixbytesarethestationaddress.*/for(i=0;i<6;i++)-dev->dev_addr[i]=inb(ioaddr+i);+addr[i]=inb(ioaddr+i);+eth_hw_addr_set(dev,addr);printk("%pM",dev->dev_addr);dev->base_addr=ioaddr;
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-11-19 07:10:44
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(-)
@@ -471,6 +471,7 @@ static unsigned long __init lance_probe1( struct net_device *dev,inti;staticintdid_version;unsignedshortsave1,save2;+u8addr[ETH_ALEN];PROBE_PRINT(("Probing for Lance card at mem %#lx io %#lx\n",(long)memaddr,(long)ioaddr));
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-11-19 07:10:48
IO reads, so save to an array then eth_hw_addr_set().
Fixes build on Alpha.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/8390/smc-ultra.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-11-19 07:10:49
Loop with offsetting to every second byte, so use a temp buffer.
Fixes m68k build.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/8390/hydra.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
@@ -116,6 +116,7 @@ static int hydra_init(struct zorro_dev *z)unsignedlongioaddr=board+HYDRA_NIC_BASE;constcharname[]="NE2000";intstart_page,stop_page;+u8macaddr[ETH_ALEN];intj;interr;
@@ -129,7 +130,8 @@ static int hydra_init(struct zorro_dev *z)return-ENOMEM;for(j=0;j<ETH_ALEN;j++)-dev->dev_addr[j]=*((u8*)(board+HYDRA_ADDRPROM+2*j));+macaddr[j]=*((u8*)(board+HYDRA_ADDRPROM+2*j));+eth_hw_addr_set(dev,macaddr);/* We must set the 8390 for word mode. */z_writeb(0x4b,ioaddr+NE_EN0_DCFG);
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-11-19 07:10:50
Use temp to pass to the reading function, the function is generic
so can't fix there.
Fixes m68k build.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/8390/mac8390.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
@@ -292,6 +292,7 @@ static bool mac8390_rsrc_init(struct net_device *dev,structnubus_direntent;intoffset;volatileunsignedshort*i;+u8addr[ETH_ALEN];dev->irq=SLOT2IRQ(board->slot);/* This is getting to be a habit */
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-11-19 07:10:51
dev_addr is set from IO reads, passed to an arch-specific helper.
Note that the helper never reads it so uninitialized temp is fine.
Fixes build on parisc.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/i825xx/lasi_82596.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
@@ -167,13 +168,14 @@ lan_init_chip(struct parisc_device *dev)netdevice->base_addr=dev->hpa.start;netdevice->irq=dev->irq;-if(pdc_lan_station_id(netdevice->dev_addr,netdevice->base_addr)){+if(pdc_lan_station_id(addr,netdevice->base_addr)){for(i=0;i<6;i++){-netdevice->dev_addr[i]=gsc_readb(LAN_PROM_ADDR+i);+addr[i]=gsc_readb(LAN_PROM_ADDR+i);}printk(KERN_INFO"%s: MAC of HP700 LAN read from EEPROM\n",__FILE__);}+eth_hw_addr_set(netdevice,addr);lp=netdev_priv(netdevice);lp->options=dev->id.sversion==0x72?OPT_SWAP_PORT:0;
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-11-19 07:10:52
dev_addr is set from IO reads, and broken from a u16 value.
Fixes build on Alpha.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/smsc/smc9194.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
@@ -856,6 +856,7 @@ static int __init smc_probe(struct net_device *dev, int ioaddr)wordconfiguration_register;wordmemory_info_register;wordmemory_cfg_register;+u8addr[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)wordaddress;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 */
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-11-19 07:10:53
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/8390/wd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
@@ -168,6 +168,7 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr)intchecksum=0;intancient=0;/* An old card without config registers. */intword16=0;/* 0 = 8 bit, 1 = 16 bit */+u8addr[ETH_ALEN];constchar*model_name;staticunsignedversion_printed;structei_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);
@@ -355,13 +359,16 @@ static int mac_onboard_sonic_probe(struct net_device *dev)staticintmac_sonic_nubus_ethernet_addr(structnet_device*dev,unsignedlongprom_addr,intid){+u8addr[ETH_ALEN];inti;+for(i=0;i<6;i++)-dev->dev_addr[i]=SONIC_READ_PROM(i);+addr[i]=SONIC_READ_PROM(i);/* Some of the addresses are bit-reversed */if(id!=MACSONIC_DAYNA)-bit_reverse_addr(dev->dev_addr);+bit_reverse_addr(addr);+eth_hw_addr_set(dev,addr);return0;}
Hello:
This series was applied to netdev/net-next.git (master)
by David S. Miller [off-list ref]:
On Thu, 18 Nov 2021 23:10:18 -0800 you wrote:
Fixups for more arch-specific drivers.
With these (and another patch which didn't fit) the build is more or
less clean with all cross-compilers available on kernel.org. I say
more or less because around half of the arches fail to build for
unrelated reasons right now.
[...]