aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sis/sis190.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-18 07:29:29 -0700
committerDavid S. Miller <davem@davemloft.net>2021-10-19 12:41:48 +0100
commitf60e8b06e0cc00c03c775a6b6f186782c5c8df8a (patch)
treebfc43a65afc4041cfc0b24673f44ad927457a68d /drivers/net/ethernet/sis/sis190.c
parentethernet: sxgbe: use eth_hw_addr_set() (diff)
downloadlinux-f60e8b06e0cc00c03c775a6b6f186782c5c8df8a.tar.xz
linux-f60e8b06e0cc00c03c775a6b6f186782c5c8df8a.zip
ethernet: sis190: use eth_hw_addr_set()
Commit 406f42fa0d3c ("net-next: When a bond have a massive amount of VLANs...") introduced a rbtree for faster Ethernet address look up. To maintain netdev->dev_addr in this tree we need to make all the writes to it got through appropriate helpers. Read the address into an array on the stack, then call eth_hw_addr_set(). Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sis/sis190.c')
-rw-r--r--drivers/net/ethernet/sis/sis190.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sis/sis190.c b/drivers/net/ethernet/sis/sis190.c
index 5e66e3f3aafc..216bb2d34d7c 100644
--- a/drivers/net/ethernet/sis/sis190.c
+++ b/drivers/net/ethernet/sis/sis190.c
@@ -1631,6 +1631,7 @@ static int sis190_get_mac_addr_from_apc(struct pci_dev *pdev,
static const u16 ids[] = { 0x0965, 0x0966, 0x0968 };
struct sis190_private *tp = netdev_priv(dev);
struct pci_dev *isa_bridge;
+ u8 addr[ETH_ALEN];
u8 reg, tmp8;
unsigned int i;
@@ -1659,8 +1660,9 @@ static int sis190_get_mac_addr_from_apc(struct pci_dev *pdev,
for (i = 0; i < ETH_ALEN; i++) {
outb(0x9 + i, 0x78);
- dev->dev_addr[i] = inb(0x79);
+ addr[i] = inb(0x79);
}
+ eth_hw_addr_set(dev, addr);
outb(0x12, 0x78);
reg = inb(0x79);