* [PATCH net v2 0/6] ethernet: fix some esoteric drivers after netdev->dev_addr constification
@ 2022-01-26 0:37 ` Jakub Kicinski
0 siblings, 0 replies; 22+ messages in thread
From: Jakub Kicinski @ 2022-01-26 0:37 UTC (permalink / raw)
To: davem; +Cc: netdev, dave, linux, linux-arm-kernel, Jakub Kicinski
Looking at recent fixes for drivers which don't get included with
allmodconfig builds I thought it's worth grepping for more instances of:
dev->dev_addr\[.*\] =
This set contains the fixes.
v2: add last 3 patches which fix drivers for the RiscPC ARM platform.
Thanks to Arnd Bergmann for explaining how to build test that.
Jakub Kicinski (6):
ethernet: 3com/typhoon: don't write directly to netdev->dev_addr
ethernet: tundra: don't write directly to netdev->dev_addr
ethernet: broadcom/sb1250-mac: don't write directly to
netdev->dev_addr
ethernet: i825xx: don't write directly to netdev->dev_addr
ethernet: 8390/etherh: don't write directly to netdev->dev_addr
ethernet: seeq/ether3: don't write directly to netdev->dev_addr
drivers/net/ethernet/3com/typhoon.c | 6 ++--
drivers/net/ethernet/8390/etherh.c | 6 ++--
drivers/net/ethernet/broadcom/sb1250-mac.c | 4 +--
drivers/net/ethernet/i825xx/ether1.c | 4 ++-
drivers/net/ethernet/seeq/ether3.c | 4 ++-
drivers/net/ethernet/tundra/tsi108_eth.c | 35 +++++++++++-----------
6 files changed, 33 insertions(+), 26 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH net v2 0/6] ethernet: fix some esoteric drivers after netdev->dev_addr constification
@ 2022-01-26 0:37 ` Jakub Kicinski
0 siblings, 0 replies; 22+ messages in thread
From: Jakub Kicinski @ 2022-01-26 0:37 UTC (permalink / raw)
To: davem; +Cc: netdev, dave, linux, linux-arm-kernel, Jakub Kicinski
Looking at recent fixes for drivers which don't get included with
allmodconfig builds I thought it's worth grepping for more instances of:
dev->dev_addr\[.*\] =
This set contains the fixes.
v2: add last 3 patches which fix drivers for the RiscPC ARM platform.
Thanks to Arnd Bergmann for explaining how to build test that.
Jakub Kicinski (6):
ethernet: 3com/typhoon: don't write directly to netdev->dev_addr
ethernet: tundra: don't write directly to netdev->dev_addr
ethernet: broadcom/sb1250-mac: don't write directly to
netdev->dev_addr
ethernet: i825xx: don't write directly to netdev->dev_addr
ethernet: 8390/etherh: don't write directly to netdev->dev_addr
ethernet: seeq/ether3: don't write directly to netdev->dev_addr
drivers/net/ethernet/3com/typhoon.c | 6 ++--
drivers/net/ethernet/8390/etherh.c | 6 ++--
drivers/net/ethernet/broadcom/sb1250-mac.c | 4 +--
drivers/net/ethernet/i825xx/ether1.c | 4 ++-
drivers/net/ethernet/seeq/ether3.c | 4 ++-
drivers/net/ethernet/tundra/tsi108_eth.c | 35 +++++++++++-----------
6 files changed, 33 insertions(+), 26 deletions(-)
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH net v2 1/6] ethernet: 3com/typhoon: don't write directly to netdev->dev_addr
2022-01-26 0:37 ` Jakub Kicinski
@ 2022-01-26 0:37 ` Jakub Kicinski
-1 siblings, 0 replies; 22+ messages in thread
From: Jakub Kicinski @ 2022-01-26 0:37 UTC (permalink / raw)
To: davem; +Cc: netdev, dave, linux, linux-arm-kernel, Jakub Kicinski
This driver casts off the const and writes directly to netdev->dev_addr.
This will result in a MAC address tree corruption and a warning.
Compile tested ppc6xx_defconfig.
Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/3com/typhoon.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/3com/typhoon.c b/drivers/net/ethernet/3com/typhoon.c
index 481f1df3106c..8aec5d9fbfef 100644
--- a/drivers/net/ethernet/3com/typhoon.c
+++ b/drivers/net/ethernet/3com/typhoon.c
@@ -2278,6 +2278,7 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
struct net_device *dev;
struct typhoon *tp;
int card_id = (int) ent->driver_data;
+ u8 addr[ETH_ALEN] __aligned(4);
void __iomem *ioaddr;
void *shared;
dma_addr_t shared_dma;
@@ -2409,8 +2410,9 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
goto error_out_reset;
}
- *(__be16 *)&dev->dev_addr[0] = htons(le16_to_cpu(xp_resp[0].parm1));
- *(__be32 *)&dev->dev_addr[2] = htonl(le32_to_cpu(xp_resp[0].parm2));
+ *(__be16 *)&addr[0] = htons(le16_to_cpu(xp_resp[0].parm1));
+ *(__be32 *)&addr[2] = htonl(le32_to_cpu(xp_resp[0].parm2));
+ eth_hw_addr_set(dev, addr);
if (!is_valid_ether_addr(dev->dev_addr)) {
err_msg = "Could not obtain valid ethernet address, aborting";
--
2.34.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH net v2 1/6] ethernet: 3com/typhoon: don't write directly to netdev->dev_addr
@ 2022-01-26 0:37 ` Jakub Kicinski
0 siblings, 0 replies; 22+ messages in thread
From: Jakub Kicinski @ 2022-01-26 0:37 UTC (permalink / raw)
To: davem; +Cc: netdev, dave, linux, linux-arm-kernel, Jakub Kicinski
This driver casts off the const and writes directly to netdev->dev_addr.
This will result in a MAC address tree corruption and a warning.
Compile tested ppc6xx_defconfig.
Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/3com/typhoon.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/3com/typhoon.c b/drivers/net/ethernet/3com/typhoon.c
index 481f1df3106c..8aec5d9fbfef 100644
--- a/drivers/net/ethernet/3com/typhoon.c
+++ b/drivers/net/ethernet/3com/typhoon.c
@@ -2278,6 +2278,7 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
struct net_device *dev;
struct typhoon *tp;
int card_id = (int) ent->driver_data;
+ u8 addr[ETH_ALEN] __aligned(4);
void __iomem *ioaddr;
void *shared;
dma_addr_t shared_dma;
@@ -2409,8 +2410,9 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
goto error_out_reset;
}
- *(__be16 *)&dev->dev_addr[0] = htons(le16_to_cpu(xp_resp[0].parm1));
- *(__be32 *)&dev->dev_addr[2] = htonl(le32_to_cpu(xp_resp[0].parm2));
+ *(__be16 *)&addr[0] = htons(le16_to_cpu(xp_resp[0].parm1));
+ *(__be32 *)&addr[2] = htonl(le32_to_cpu(xp_resp[0].parm2));
+ eth_hw_addr_set(dev, addr);
if (!is_valid_ether_addr(dev->dev_addr)) {
err_msg = "Could not obtain valid ethernet address, aborting";
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH net v2 2/6] ethernet: tundra: don't write directly to netdev->dev_addr
2022-01-26 0:37 ` Jakub Kicinski
@ 2022-01-26 0:37 ` Jakub Kicinski
-1 siblings, 0 replies; 22+ messages in thread
From: Jakub Kicinski @ 2022-01-26 0:37 UTC (permalink / raw)
To: davem; +Cc: netdev, dave, linux, linux-arm-kernel, Jakub Kicinski
netdev->dev_addr is const now.
Maintain the questionable offsetting in ndo_set_mac_address.
Compile tested holly_defconfig and mpc7448_hpc2_defconfig.
Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/tundra/tsi108_eth.c | 35 ++++++++++++------------
1 file changed, 18 insertions(+), 17 deletions(-)
diff --git a/drivers/net/ethernet/tundra/tsi108_eth.c b/drivers/net/ethernet/tundra/tsi108_eth.c
index cf0917b29e30..5251fc324221 100644
--- a/drivers/net/ethernet/tundra/tsi108_eth.c
+++ b/drivers/net/ethernet/tundra/tsi108_eth.c
@@ -1091,20 +1091,22 @@ static int tsi108_get_mac(struct net_device *dev)
struct tsi108_prv_data *data = netdev_priv(dev);
u32 word1 = TSI_READ(TSI108_MAC_ADDR1);
u32 word2 = TSI_READ(TSI108_MAC_ADDR2);
+ u8 addr[ETH_ALEN];
/* Note that the octets are reversed from what the manual says,
* producing an even weirder ordering...
*/
if (word2 == 0 && word1 == 0) {
- dev->dev_addr[0] = 0x00;
- dev->dev_addr[1] = 0x06;
- dev->dev_addr[2] = 0xd2;
- dev->dev_addr[3] = 0x00;
- dev->dev_addr[4] = 0x00;
+ addr[0] = 0x00;
+ addr[1] = 0x06;
+ addr[2] = 0xd2;
+ addr[3] = 0x00;
+ addr[4] = 0x00;
if (0x8 == data->phy)
- dev->dev_addr[5] = 0x01;
+ addr[5] = 0x01;
else
- dev->dev_addr[5] = 0x02;
+ addr[5] = 0x02;
+ eth_hw_addr_set(dev, addr);
word2 = (dev->dev_addr[0] << 16) | (dev->dev_addr[1] << 24);
@@ -1114,12 +1116,13 @@ static int tsi108_get_mac(struct net_device *dev)
TSI_WRITE(TSI108_MAC_ADDR1, word1);
TSI_WRITE(TSI108_MAC_ADDR2, word2);
} else {
- dev->dev_addr[0] = (word2 >> 16) & 0xff;
- dev->dev_addr[1] = (word2 >> 24) & 0xff;
- dev->dev_addr[2] = (word1 >> 0) & 0xff;
- dev->dev_addr[3] = (word1 >> 8) & 0xff;
- dev->dev_addr[4] = (word1 >> 16) & 0xff;
- dev->dev_addr[5] = (word1 >> 24) & 0xff;
+ addr[0] = (word2 >> 16) & 0xff;
+ addr[1] = (word2 >> 24) & 0xff;
+ addr[2] = (word1 >> 0) & 0xff;
+ addr[3] = (word1 >> 8) & 0xff;
+ addr[4] = (word1 >> 16) & 0xff;
+ addr[5] = (word1 >> 24) & 0xff;
+ eth_hw_addr_set(dev, addr);
}
if (!is_valid_ether_addr(dev->dev_addr)) {
@@ -1136,14 +1139,12 @@ static int tsi108_set_mac(struct net_device *dev, void *addr)
{
struct tsi108_prv_data *data = netdev_priv(dev);
u32 word1, word2;
- int i;
if (!is_valid_ether_addr(addr))
return -EADDRNOTAVAIL;
- for (i = 0; i < 6; i++)
- /* +2 is for the offset of the HW addr type */
- dev->dev_addr[i] = ((unsigned char *)addr)[i + 2];
+ /* +2 is for the offset of the HW addr type */
+ eth_hw_addr_set(dev, ((unsigned char *)addr) + 2);
word2 = (dev->dev_addr[0] << 16) | (dev->dev_addr[1] << 24);
--
2.34.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH net v2 2/6] ethernet: tundra: don't write directly to netdev->dev_addr
@ 2022-01-26 0:37 ` Jakub Kicinski
0 siblings, 0 replies; 22+ messages in thread
From: Jakub Kicinski @ 2022-01-26 0:37 UTC (permalink / raw)
To: davem; +Cc: netdev, dave, linux, linux-arm-kernel, Jakub Kicinski
netdev->dev_addr is const now.
Maintain the questionable offsetting in ndo_set_mac_address.
Compile tested holly_defconfig and mpc7448_hpc2_defconfig.
Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/tundra/tsi108_eth.c | 35 ++++++++++++------------
1 file changed, 18 insertions(+), 17 deletions(-)
diff --git a/drivers/net/ethernet/tundra/tsi108_eth.c b/drivers/net/ethernet/tundra/tsi108_eth.c
index cf0917b29e30..5251fc324221 100644
--- a/drivers/net/ethernet/tundra/tsi108_eth.c
+++ b/drivers/net/ethernet/tundra/tsi108_eth.c
@@ -1091,20 +1091,22 @@ static int tsi108_get_mac(struct net_device *dev)
struct tsi108_prv_data *data = netdev_priv(dev);
u32 word1 = TSI_READ(TSI108_MAC_ADDR1);
u32 word2 = TSI_READ(TSI108_MAC_ADDR2);
+ u8 addr[ETH_ALEN];
/* Note that the octets are reversed from what the manual says,
* producing an even weirder ordering...
*/
if (word2 == 0 && word1 == 0) {
- dev->dev_addr[0] = 0x00;
- dev->dev_addr[1] = 0x06;
- dev->dev_addr[2] = 0xd2;
- dev->dev_addr[3] = 0x00;
- dev->dev_addr[4] = 0x00;
+ addr[0] = 0x00;
+ addr[1] = 0x06;
+ addr[2] = 0xd2;
+ addr[3] = 0x00;
+ addr[4] = 0x00;
if (0x8 == data->phy)
- dev->dev_addr[5] = 0x01;
+ addr[5] = 0x01;
else
- dev->dev_addr[5] = 0x02;
+ addr[5] = 0x02;
+ eth_hw_addr_set(dev, addr);
word2 = (dev->dev_addr[0] << 16) | (dev->dev_addr[1] << 24);
@@ -1114,12 +1116,13 @@ static int tsi108_get_mac(struct net_device *dev)
TSI_WRITE(TSI108_MAC_ADDR1, word1);
TSI_WRITE(TSI108_MAC_ADDR2, word2);
} else {
- dev->dev_addr[0] = (word2 >> 16) & 0xff;
- dev->dev_addr[1] = (word2 >> 24) & 0xff;
- dev->dev_addr[2] = (word1 >> 0) & 0xff;
- dev->dev_addr[3] = (word1 >> 8) & 0xff;
- dev->dev_addr[4] = (word1 >> 16) & 0xff;
- dev->dev_addr[5] = (word1 >> 24) & 0xff;
+ addr[0] = (word2 >> 16) & 0xff;
+ addr[1] = (word2 >> 24) & 0xff;
+ addr[2] = (word1 >> 0) & 0xff;
+ addr[3] = (word1 >> 8) & 0xff;
+ addr[4] = (word1 >> 16) & 0xff;
+ addr[5] = (word1 >> 24) & 0xff;
+ eth_hw_addr_set(dev, addr);
}
if (!is_valid_ether_addr(dev->dev_addr)) {
@@ -1136,14 +1139,12 @@ static int tsi108_set_mac(struct net_device *dev, void *addr)
{
struct tsi108_prv_data *data = netdev_priv(dev);
u32 word1, word2;
- int i;
if (!is_valid_ether_addr(addr))
return -EADDRNOTAVAIL;
- for (i = 0; i < 6; i++)
- /* +2 is for the offset of the HW addr type */
- dev->dev_addr[i] = ((unsigned char *)addr)[i + 2];
+ /* +2 is for the offset of the HW addr type */
+ eth_hw_addr_set(dev, ((unsigned char *)addr) + 2);
word2 = (dev->dev_addr[0] << 16) | (dev->dev_addr[1] << 24);
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH net v2 3/6] ethernet: broadcom/sb1250-mac: don't write directly to netdev->dev_addr
2022-01-26 0:37 ` Jakub Kicinski
@ 2022-01-26 0:37 ` Jakub Kicinski
-1 siblings, 0 replies; 22+ messages in thread
From: Jakub Kicinski @ 2022-01-26 0:37 UTC (permalink / raw)
To: davem; +Cc: netdev, dave, linux, linux-arm-kernel, Jakub Kicinski
netdev->dev_addr is const now.
Compile tested bigsur_defconfig and sb1250_swarm_defconfig.
Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/broadcom/sb1250-mac.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/sb1250-mac.c b/drivers/net/ethernet/broadcom/sb1250-mac.c
index f38f40eb966e..a1a38456c9a3 100644
--- a/drivers/net/ethernet/broadcom/sb1250-mac.c
+++ b/drivers/net/ethernet/broadcom/sb1250-mac.c
@@ -2183,9 +2183,7 @@ static int sbmac_init(struct platform_device *pldev, long long base)
ea_reg >>= 8;
}
- for (i = 0; i < 6; i++) {
- dev->dev_addr[i] = eaddr[i];
- }
+ eth_hw_addr_set(dev, eaddr);
/*
* Initialize context (get pointers to registers and stuff), then
--
2.34.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH net v2 3/6] ethernet: broadcom/sb1250-mac: don't write directly to netdev->dev_addr
@ 2022-01-26 0:37 ` Jakub Kicinski
0 siblings, 0 replies; 22+ messages in thread
From: Jakub Kicinski @ 2022-01-26 0:37 UTC (permalink / raw)
To: davem; +Cc: netdev, dave, linux, linux-arm-kernel, Jakub Kicinski
netdev->dev_addr is const now.
Compile tested bigsur_defconfig and sb1250_swarm_defconfig.
Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/broadcom/sb1250-mac.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/sb1250-mac.c b/drivers/net/ethernet/broadcom/sb1250-mac.c
index f38f40eb966e..a1a38456c9a3 100644
--- a/drivers/net/ethernet/broadcom/sb1250-mac.c
+++ b/drivers/net/ethernet/broadcom/sb1250-mac.c
@@ -2183,9 +2183,7 @@ static int sbmac_init(struct platform_device *pldev, long long base)
ea_reg >>= 8;
}
- for (i = 0; i < 6; i++) {
- dev->dev_addr[i] = eaddr[i];
- }
+ eth_hw_addr_set(dev, eaddr);
/*
* Initialize context (get pointers to registers and stuff), then
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH net v2 4/6] ethernet: i825xx: don't write directly to netdev->dev_addr
2022-01-26 0:37 ` Jakub Kicinski
@ 2022-01-26 0:37 ` Jakub Kicinski
-1 siblings, 0 replies; 22+ messages in thread
From: Jakub Kicinski @ 2022-01-26 0:37 UTC (permalink / raw)
To: davem; +Cc: netdev, dave, linux, linux-arm-kernel, Jakub Kicinski
netdev->dev_addr is const now.
Compile tested rpc_defconfig w/ GCC 8.5.
Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/i825xx/ether1.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/i825xx/ether1.c b/drivers/net/ethernet/i825xx/ether1.c
index c612ef526d16..3e7d7c4bafdc 100644
--- a/drivers/net/ethernet/i825xx/ether1.c
+++ b/drivers/net/ethernet/i825xx/ether1.c
@@ -986,6 +986,7 @@ static int
ether1_probe(struct expansion_card *ec, const struct ecard_id *id)
{
struct net_device *dev;
+ u8 addr[ETH_ALEN];
int i, ret = 0;
ether1_banner();
@@ -1015,7 +1016,8 @@ ether1_probe(struct expansion_card *ec, const struct ecard_id *id)
}
for (i = 0; i < 6; i++)
- dev->dev_addr[i] = readb(IDPROM_ADDRESS + (i << 2));
+ addr[i] = readb(IDPROM_ADDRESS + (i << 2));
+ eth_hw_addr_set(dev, addr);
if (ether1_init_2(dev)) {
ret = -ENODEV;
--
2.34.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH net v2 4/6] ethernet: i825xx: don't write directly to netdev->dev_addr
@ 2022-01-26 0:37 ` Jakub Kicinski
0 siblings, 0 replies; 22+ messages in thread
From: Jakub Kicinski @ 2022-01-26 0:37 UTC (permalink / raw)
To: davem; +Cc: netdev, dave, linux, linux-arm-kernel, Jakub Kicinski
netdev->dev_addr is const now.
Compile tested rpc_defconfig w/ GCC 8.5.
Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/i825xx/ether1.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/i825xx/ether1.c b/drivers/net/ethernet/i825xx/ether1.c
index c612ef526d16..3e7d7c4bafdc 100644
--- a/drivers/net/ethernet/i825xx/ether1.c
+++ b/drivers/net/ethernet/i825xx/ether1.c
@@ -986,6 +986,7 @@ static int
ether1_probe(struct expansion_card *ec, const struct ecard_id *id)
{
struct net_device *dev;
+ u8 addr[ETH_ALEN];
int i, ret = 0;
ether1_banner();
@@ -1015,7 +1016,8 @@ ether1_probe(struct expansion_card *ec, const struct ecard_id *id)
}
for (i = 0; i < 6; i++)
- dev->dev_addr[i] = readb(IDPROM_ADDRESS + (i << 2));
+ addr[i] = readb(IDPROM_ADDRESS + (i << 2));
+ eth_hw_addr_set(dev, addr);
if (ether1_init_2(dev)) {
ret = -ENODEV;
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH net v2 5/6] ethernet: 8390/etherh: don't write directly to netdev->dev_addr
2022-01-26 0:37 ` Jakub Kicinski
@ 2022-01-26 0:38 ` Jakub Kicinski
-1 siblings, 0 replies; 22+ messages in thread
From: Jakub Kicinski @ 2022-01-26 0:38 UTC (permalink / raw)
To: davem; +Cc: netdev, dave, linux, linux-arm-kernel, Jakub Kicinski
netdev->dev_addr is const now.
Compile tested rpc_defconfig w/ GCC 8.5.
Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/8390/etherh.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/8390/etherh.c b/drivers/net/ethernet/8390/etherh.c
index bd22a534b1c0..e7b879123bb1 100644
--- a/drivers/net/ethernet/8390/etherh.c
+++ b/drivers/net/ethernet/8390/etherh.c
@@ -655,6 +655,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
struct ei_device *ei_local;
struct net_device *dev;
struct etherh_priv *eh;
+ u8 addr[ETH_ALEN];
int ret;
ret = ecard_request_resources(ec);
@@ -724,12 +725,13 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
spin_lock_init(&ei_local->page_lock);
if (ec->cid.product == PROD_ANT_ETHERM) {
- etherm_addr(dev->dev_addr);
+ etherm_addr(addr);
ei_local->reg_offset = etherm_regoffsets;
} else {
- etherh_addr(dev->dev_addr, ec);
+ etherh_addr(addr, ec);
ei_local->reg_offset = etherh_regoffsets;
}
+ eth_hw_addr_set(dev, addr);
ei_local->name = dev->name;
ei_local->word16 = 1;
--
2.34.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH net v2 5/6] ethernet: 8390/etherh: don't write directly to netdev->dev_addr
@ 2022-01-26 0:38 ` Jakub Kicinski
0 siblings, 0 replies; 22+ messages in thread
From: Jakub Kicinski @ 2022-01-26 0:38 UTC (permalink / raw)
To: davem; +Cc: netdev, dave, linux, linux-arm-kernel, Jakub Kicinski
netdev->dev_addr is const now.
Compile tested rpc_defconfig w/ GCC 8.5.
Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/8390/etherh.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/8390/etherh.c b/drivers/net/ethernet/8390/etherh.c
index bd22a534b1c0..e7b879123bb1 100644
--- a/drivers/net/ethernet/8390/etherh.c
+++ b/drivers/net/ethernet/8390/etherh.c
@@ -655,6 +655,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
struct ei_device *ei_local;
struct net_device *dev;
struct etherh_priv *eh;
+ u8 addr[ETH_ALEN];
int ret;
ret = ecard_request_resources(ec);
@@ -724,12 +725,13 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
spin_lock_init(&ei_local->page_lock);
if (ec->cid.product == PROD_ANT_ETHERM) {
- etherm_addr(dev->dev_addr);
+ etherm_addr(addr);
ei_local->reg_offset = etherm_regoffsets;
} else {
- etherh_addr(dev->dev_addr, ec);
+ etherh_addr(addr, ec);
ei_local->reg_offset = etherh_regoffsets;
}
+ eth_hw_addr_set(dev, addr);
ei_local->name = dev->name;
ei_local->word16 = 1;
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH net v2 6/6] ethernet: seeq/ether3: don't write directly to netdev->dev_addr
2022-01-26 0:37 ` Jakub Kicinski
@ 2022-01-26 0:38 ` Jakub Kicinski
-1 siblings, 0 replies; 22+ messages in thread
From: Jakub Kicinski @ 2022-01-26 0:38 UTC (permalink / raw)
To: davem; +Cc: netdev, dave, linux, linux-arm-kernel, Jakub Kicinski
netdev->dev_addr is const now.
Compile tested rpc_defconfig w/ GCC 8.5.
Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/seeq/ether3.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/seeq/ether3.c b/drivers/net/ethernet/seeq/ether3.c
index 16a4cbae9326..c672f92d65e9 100644
--- a/drivers/net/ethernet/seeq/ether3.c
+++ b/drivers/net/ethernet/seeq/ether3.c
@@ -749,6 +749,7 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id)
const struct ether3_data *data = id->data;
struct net_device *dev;
int bus_type, ret;
+ u8 addr[ETH_ALEN];
ether3_banner();
@@ -776,7 +777,8 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id)
priv(dev)->seeq = priv(dev)->base + data->base_offset;
dev->irq = ec->irq;
- ether3_addr(dev->dev_addr, ec);
+ ether3_addr(addr, ec);
+ eth_hw_addr_set(dev, addr);
priv(dev)->dev = dev;
timer_setup(&priv(dev)->timer, ether3_ledoff, 0);
--
2.34.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH net v2 6/6] ethernet: seeq/ether3: don't write directly to netdev->dev_addr
@ 2022-01-26 0:38 ` Jakub Kicinski
0 siblings, 0 replies; 22+ messages in thread
From: Jakub Kicinski @ 2022-01-26 0:38 UTC (permalink / raw)
To: davem; +Cc: netdev, dave, linux, linux-arm-kernel, Jakub Kicinski
netdev->dev_addr is const now.
Compile tested rpc_defconfig w/ GCC 8.5.
Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/seeq/ether3.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/seeq/ether3.c b/drivers/net/ethernet/seeq/ether3.c
index 16a4cbae9326..c672f92d65e9 100644
--- a/drivers/net/ethernet/seeq/ether3.c
+++ b/drivers/net/ethernet/seeq/ether3.c
@@ -749,6 +749,7 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id)
const struct ether3_data *data = id->data;
struct net_device *dev;
int bus_type, ret;
+ u8 addr[ETH_ALEN];
ether3_banner();
@@ -776,7 +777,8 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id)
priv(dev)->seeq = priv(dev)->base + data->base_offset;
dev->irq = ec->irq;
- ether3_addr(dev->dev_addr, ec);
+ ether3_addr(addr, ec);
+ eth_hw_addr_set(dev, addr);
priv(dev)->dev = dev;
timer_setup(&priv(dev)->timer, ether3_ledoff, 0);
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH net v2 4/6] ethernet: i825xx: don't write directly to netdev->dev_addr
2022-01-26 0:37 ` Jakub Kicinski
@ 2022-01-26 11:00 ` Russell King (Oracle)
-1 siblings, 0 replies; 22+ messages in thread
From: Russell King (Oracle) @ 2022-01-26 11:00 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, dave, linux-arm-kernel
On Tue, Jan 25, 2022 at 04:37:59PM -0800, Jakub Kicinski wrote:
> netdev->dev_addr is const now.
>
> Compile tested rpc_defconfig w/ GCC 8.5.
>
> Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thanks!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH net v2 4/6] ethernet: i825xx: don't write directly to netdev->dev_addr
@ 2022-01-26 11:00 ` Russell King (Oracle)
0 siblings, 0 replies; 22+ messages in thread
From: Russell King (Oracle) @ 2022-01-26 11:00 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, dave, linux-arm-kernel
On Tue, Jan 25, 2022 at 04:37:59PM -0800, Jakub Kicinski wrote:
> netdev->dev_addr is const now.
>
> Compile tested rpc_defconfig w/ GCC 8.5.
>
> Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thanks!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH net v2 5/6] ethernet: 8390/etherh: don't write directly to netdev->dev_addr
2022-01-26 0:38 ` Jakub Kicinski
@ 2022-01-26 11:01 ` Russell King (Oracle)
-1 siblings, 0 replies; 22+ messages in thread
From: Russell King (Oracle) @ 2022-01-26 11:01 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, dave, linux-arm-kernel
On Tue, Jan 25, 2022 at 04:38:00PM -0800, Jakub Kicinski wrote:
> netdev->dev_addr is const now.
>
> Compile tested rpc_defconfig w/ GCC 8.5.
>
> Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thanks!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH net v2 5/6] ethernet: 8390/etherh: don't write directly to netdev->dev_addr
@ 2022-01-26 11:01 ` Russell King (Oracle)
0 siblings, 0 replies; 22+ messages in thread
From: Russell King (Oracle) @ 2022-01-26 11:01 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, dave, linux-arm-kernel
On Tue, Jan 25, 2022 at 04:38:00PM -0800, Jakub Kicinski wrote:
> netdev->dev_addr is const now.
>
> Compile tested rpc_defconfig w/ GCC 8.5.
>
> Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thanks!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH net v2 6/6] ethernet: seeq/ether3: don't write directly to netdev->dev_addr
2022-01-26 0:38 ` Jakub Kicinski
@ 2022-01-26 11:01 ` Russell King (Oracle)
-1 siblings, 0 replies; 22+ messages in thread
From: Russell King (Oracle) @ 2022-01-26 11:01 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, dave, linux-arm-kernel
On Tue, Jan 25, 2022 at 04:38:01PM -0800, Jakub Kicinski wrote:
> netdev->dev_addr is const now.
>
> Compile tested rpc_defconfig w/ GCC 8.5.
>
> Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thanks!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH net v2 6/6] ethernet: seeq/ether3: don't write directly to netdev->dev_addr
@ 2022-01-26 11:01 ` Russell King (Oracle)
0 siblings, 0 replies; 22+ messages in thread
From: Russell King (Oracle) @ 2022-01-26 11:01 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, dave, linux-arm-kernel
On Tue, Jan 25, 2022 at 04:38:01PM -0800, Jakub Kicinski wrote:
> netdev->dev_addr is const now.
>
> Compile tested rpc_defconfig w/ GCC 8.5.
>
> Fixes: adeef3e32146 ("net: constify netdev->dev_addr")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thanks!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH net v2 0/6] ethernet: fix some esoteric drivers after netdev->dev_addr constification
2022-01-26 0:37 ` Jakub Kicinski
@ 2022-01-26 15:50 ` patchwork-bot+netdevbpf
-1 siblings, 0 replies; 22+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-01-26 15:50 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, dave, linux, linux-arm-kernel
Hello:
This series was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Tue, 25 Jan 2022 16:37:55 -0800 you wrote:
> Looking at recent fixes for drivers which don't get included with
> allmodconfig builds I thought it's worth grepping for more instances of:
>
> dev->dev_addr\[.*\] =
>
> This set contains the fixes.
>
> [...]
Here is the summary with links:
- [net,v2,1/6] ethernet: 3com/typhoon: don't write directly to netdev->dev_addr
https://git.kernel.org/netdev/net/c/007c95120d1b
- [net,v2,2/6] ethernet: tundra: don't write directly to netdev->dev_addr
https://git.kernel.org/netdev/net/c/14ba66a60fbf
- [net,v2,3/6] ethernet: broadcom/sb1250-mac: don't write directly to netdev->dev_addr
https://git.kernel.org/netdev/net/c/7f6ec2b2f01b
- [net,v2,4/6] ethernet: i825xx: don't write directly to netdev->dev_addr
https://git.kernel.org/netdev/net/c/98ef22bbae78
- [net,v2,5/6] ethernet: 8390/etherh: don't write directly to netdev->dev_addr
https://git.kernel.org/netdev/net/c/5518c5246ba6
- [net,v2,6/6] ethernet: seeq/ether3: don't write directly to netdev->dev_addr
https://git.kernel.org/netdev/net/c/8eb86fc2f490
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH net v2 0/6] ethernet: fix some esoteric drivers after netdev->dev_addr constification
@ 2022-01-26 15:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 22+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-01-26 15:50 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, dave, linux, linux-arm-kernel
Hello:
This series was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Tue, 25 Jan 2022 16:37:55 -0800 you wrote:
> Looking at recent fixes for drivers which don't get included with
> allmodconfig builds I thought it's worth grepping for more instances of:
>
> dev->dev_addr\[.*\] =
>
> This set contains the fixes.
>
> [...]
Here is the summary with links:
- [net,v2,1/6] ethernet: 3com/typhoon: don't write directly to netdev->dev_addr
https://git.kernel.org/netdev/net/c/007c95120d1b
- [net,v2,2/6] ethernet: tundra: don't write directly to netdev->dev_addr
https://git.kernel.org/netdev/net/c/14ba66a60fbf
- [net,v2,3/6] ethernet: broadcom/sb1250-mac: don't write directly to netdev->dev_addr
https://git.kernel.org/netdev/net/c/7f6ec2b2f01b
- [net,v2,4/6] ethernet: i825xx: don't write directly to netdev->dev_addr
https://git.kernel.org/netdev/net/c/98ef22bbae78
- [net,v2,5/6] ethernet: 8390/etherh: don't write directly to netdev->dev_addr
https://git.kernel.org/netdev/net/c/5518c5246ba6
- [net,v2,6/6] ethernet: seeq/ether3: don't write directly to netdev->dev_addr
https://git.kernel.org/netdev/net/c/8eb86fc2f490
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2022-01-26 17:06 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-26 0:37 [PATCH net v2 0/6] ethernet: fix some esoteric drivers after netdev->dev_addr constification Jakub Kicinski
2022-01-26 0:37 ` Jakub Kicinski
2022-01-26 0:37 ` [PATCH net v2 1/6] ethernet: 3com/typhoon: don't write directly to netdev->dev_addr Jakub Kicinski
2022-01-26 0:37 ` Jakub Kicinski
2022-01-26 0:37 ` [PATCH net v2 2/6] ethernet: tundra: " Jakub Kicinski
2022-01-26 0:37 ` Jakub Kicinski
2022-01-26 0:37 ` [PATCH net v2 3/6] ethernet: broadcom/sb1250-mac: " Jakub Kicinski
2022-01-26 0:37 ` Jakub Kicinski
2022-01-26 0:37 ` [PATCH net v2 4/6] ethernet: i825xx: " Jakub Kicinski
2022-01-26 0:37 ` Jakub Kicinski
2022-01-26 11:00 ` Russell King (Oracle)
2022-01-26 11:00 ` Russell King (Oracle)
2022-01-26 0:38 ` [PATCH net v2 5/6] ethernet: 8390/etherh: " Jakub Kicinski
2022-01-26 0:38 ` Jakub Kicinski
2022-01-26 11:01 ` Russell King (Oracle)
2022-01-26 11:01 ` Russell King (Oracle)
2022-01-26 0:38 ` [PATCH net v2 6/6] ethernet: seeq/ether3: " Jakub Kicinski
2022-01-26 0:38 ` Jakub Kicinski
2022-01-26 11:01 ` Russell King (Oracle)
2022-01-26 11:01 ` Russell King (Oracle)
2022-01-26 15:50 ` [PATCH net v2 0/6] ethernet: fix some esoteric drivers after netdev->dev_addr constification patchwork-bot+netdevbpf
2022-01-26 15:50 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.