* [patch 2.6.13 0/16] implement ETHTOOL_GPERMADDR support for a number of drivers
@ 2005-09-12 14:48 John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 1/16] 3c59x: support ETHTOOL_GPERMADDR John W. Linville
0 siblings, 1 reply; 17+ messages in thread
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
To: linux-kernel, netdev
Cc: jgarzik, Jon_Wetzel, john.ronciak, ganesh.venkatesan, cramerj,
jesse.brandeburg, ayyappan.veeraiyan, mchan, davem, p_gortmaker,
tsbogend, romieu, shemminger, rl
A collection of patches which add support for ETHTOOL_GPERMADDR to
the following drivers: 3c59x, 8139cp, 8139too, b44, bnx2, e1000,
e100, forcedeth, ixgb, ne2k-pci, pcnet32, r8169, skge, sundance,
tg3, via-rhine.
I apologize for all the small patches, but I wanted to trim the cc:
lists appropriately for each driver.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [patch 2.6.13 2/16] 8139cp: support ETHTOOL_GPERMADDR
2005-09-12 14:48 ` [patch 2.6.13 1/16] 3c59x: support ETHTOOL_GPERMADDR John W. Linville
@ 2005-09-12 14:48 ` John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 3/16] 8139too: " John W. Linville
0 siblings, 1 reply; 17+ messages in thread
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: jgarzik, Jon_Wetzel
Add support for ETHTOOL_GPERMADDR to 8139cp.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/8139cp.c | 2 ++
1 files changed, 2 insertions(+)
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -1575,6 +1575,7 @@ static struct ethtool_ops cp_ethtool_ops
.set_wol = cp_set_wol,
.get_strings = cp_get_strings,
.get_ethtool_stats = cp_get_ethtool_stats,
+ .get_perm_addr = ethtool_op_get_perm_addr,
};
static int cp_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
@@ -1773,6 +1774,7 @@ static int cp_init_one (struct pci_dev *
for (i = 0; i < 3; i++)
((u16 *) (dev->dev_addr))[i] =
le16_to_cpu (read_eeprom (regs, i + 7, addr_len));
+ memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
dev->open = cp_open;
dev->stop = cp_close;
^ permalink raw reply [flat|nested] 17+ messages in thread
* [patch 2.6.13 1/16] 3c59x: support ETHTOOL_GPERMADDR
2005-09-12 14:48 [patch 2.6.13 0/16] implement ETHTOOL_GPERMADDR support for a number of drivers John W. Linville
@ 2005-09-12 14:48 ` John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 2/16] 8139cp: " John W. Linville
0 siblings, 1 reply; 17+ messages in thread
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: akpm, jgarzik, Jon_Wetzel
Add support for ETHTOOL_GPERMADDR to 3c59x.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/3c59x.c | 2 ++
1 files changed, 2 insertions(+)
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -1338,6 +1338,7 @@ static int __devinit vortex_probe1(struc
printk(" ***INVALID CHECKSUM %4.4x*** ", checksum);
for (i = 0; i < 3; i++)
((u16 *)dev->dev_addr)[i] = htons(eeprom[i + 10]);
+ memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
if (print_info) {
for (i = 0; i < 6; i++)
printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]);
@@ -3047,6 +3048,7 @@ static struct ethtool_ops vortex_ethtool
.set_settings = vortex_set_settings,
.get_link = vortex_get_link,
.nway_reset = vortex_nway_reset,
+ .get_perm_addr = ethtool_op_get_perm_addr,
};
#ifdef CONFIG_PCI
^ permalink raw reply [flat|nested] 17+ messages in thread
* [patch 2.6.13 3/16] 8139too: support ETHTOOL_GPERMADDR
2005-09-12 14:48 ` [patch 2.6.13 2/16] 8139cp: " John W. Linville
@ 2005-09-12 14:48 ` John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 4/16] b44: " John W. Linville
0 siblings, 1 reply; 17+ messages in thread
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: jgarzik, Jon_Wetzel
Add support for ETHTOOL_GPERMADDR to 8139too.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/8139too.c | 2 ++
1 files changed, 2 insertions(+)
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -970,6 +970,7 @@ static int __devinit rtl8139_init_one (s
for (i = 0; i < 3; i++)
((u16 *) (dev->dev_addr))[i] =
le16_to_cpu (read_eeprom (ioaddr, i + 7, addr_len));
+ memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
/* The Rtl8139-specific entries in the device structure. */
dev->open = rtl8139_open;
@@ -2465,6 +2466,7 @@ static struct ethtool_ops rtl8139_ethtoo
.get_strings = rtl8139_get_strings,
.get_stats_count = rtl8139_get_stats_count,
.get_ethtool_stats = rtl8139_get_ethtool_stats,
+ .get_perm_addr = ethtool_op_get_perm_addr,
};
static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [patch 2.6.13 6/16] e1000: support ETHTOOL_GPERMADDR
2005-09-12 14:48 ` [patch 2.6.13 5/16] bnx2: " John W. Linville
@ 2005-09-12 14:48 ` John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 7/16] e100: " John W. Linville
0 siblings, 1 reply; 17+ messages in thread
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
To: linux-kernel, netdev
Cc: john.ronciak, ganesh.venkatesan, cramerj, jgarzik, Jon_Wetzel
Add support for ETHTOOL_GPERMADDR to e1000.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/e1000/e1000_ethtool.c | 1 +
drivers/net/e1000/e1000_main.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -1739,6 +1739,7 @@ struct ethtool_ops e1000_ethtool_ops = {
.phys_id = e1000_phys_id,
.get_stats_count = e1000_get_stats_count,
.get_ethtool_stats = e1000_get_ethtool_stats,
+ .get_perm_addr = ethtool_op_get_perm_addr,
};
void e1000_set_ethtool_ops(struct net_device *netdev)
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -614,8 +614,9 @@ e1000_probe(struct pci_dev *pdev,
if(e1000_read_mac_addr(&adapter->hw))
DPRINTK(PROBE, ERR, "EEPROM Read Error\n");
memcpy(netdev->dev_addr, adapter->hw.mac_addr, netdev->addr_len);
+ memcpy(netdev->perm_addr, adapter->hw.mac_addr, netdev->addr_len);
- if(!is_valid_ether_addr(netdev->dev_addr)) {
+ if(!is_valid_ether_addr(netdev->perm_addr)) {
DPRINTK(PROBE, ERR, "Invalid MAC Address\n");
err = -EIO;
goto err_eeprom;
^ permalink raw reply [flat|nested] 17+ messages in thread
* [patch 2.6.13 5/16] bnx2: support ETHTOOL_GPERMADDR
2005-09-12 14:48 ` [patch 2.6.13 4/16] b44: " John W. Linville
@ 2005-09-12 14:48 ` John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 6/16] e1000: " John W. Linville
0 siblings, 1 reply; 17+ messages in thread
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: mchan, jgarzik, Jon_Wetzel
Add support for ETHTOOL_GPERMADDR to bnx2.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/bnx2.c | 2 ++
1 files changed, 2 insertions(+)
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -5015,6 +5015,7 @@ static struct ethtool_ops bnx2_ethtool_o
.phys_id = bnx2_phys_id,
.get_stats_count = bnx2_get_stats_count,
.get_ethtool_stats = bnx2_get_ethtool_stats,
+ .get_perm_addr = ethtool_op_get_perm_addr,
};
/* Called with rtnl_lock */
@@ -5442,6 +5443,7 @@ bnx2_init_one(struct pci_dev *pdev, cons
pci_set_drvdata(pdev, dev);
memcpy(dev->dev_addr, bp->mac_addr, 6);
+ memcpy(dev->perm_addr, bp->mac_addr, 6);
bp->name = board_info[ent->driver_data].name,
printk(KERN_INFO "%s: %s (%c%d) PCI%s %s %dMHz found at mem %lx, "
"IRQ %d, ",
^ permalink raw reply [flat|nested] 17+ messages in thread
* [patch 2.6.13 4/16] b44: support ETHTOOL_GPERMADDR
2005-09-12 14:48 ` [patch 2.6.13 3/16] 8139too: " John W. Linville
@ 2005-09-12 14:48 ` John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 5/16] bnx2: " John W. Linville
0 siblings, 1 reply; 17+ messages in thread
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: jgarzik, Jon_Wetzel
Add support for ETHTOOL_GPERMADDR to b44.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/b44.c | 2 ++
1 files changed, 2 insertions(+)
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -1676,6 +1676,7 @@ static struct ethtool_ops b44_ethtool_op
.set_pauseparam = b44_set_pauseparam,
.get_msglevel = b44_get_msglevel,
.set_msglevel = b44_set_msglevel,
+ .get_perm_addr = ethtool_op_get_perm_addr,
};
static int b44_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
@@ -1718,6 +1719,7 @@ static int __devinit b44_get_invariants(
bp->dev->dev_addr[3] = eeprom[80];
bp->dev->dev_addr[4] = eeprom[83];
bp->dev->dev_addr[5] = eeprom[82];
+ memcpy(bp->dev->perm_addr, bp->dev->dev_addr, bp->dev->addr_len);
bp->phy_addr = eeprom[90] & 0x1f;
^ permalink raw reply [flat|nested] 17+ messages in thread
* [patch 2.6.13 7/16] e100: support ETHTOOL_GPERMADDR
2005-09-12 14:48 ` [patch 2.6.13 6/16] e1000: " John W. Linville
@ 2005-09-12 14:48 ` John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 8/16] forcedeth: " John W. Linville
0 siblings, 1 reply; 17+ messages in thread
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
To: linux-kernel, netdev
Cc: john.ronciak, ganesh.venkatesan, jesse.brandeburg, jgarzik,
Jon_Wetzel
Add support for ETHTOOL_GPERMADDR to e100.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/e100.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2391,6 +2391,7 @@ static struct ethtool_ops e100_ethtool_o
.phys_id = e100_phys_id,
.get_stats_count = e100_get_stats_count,
.get_ethtool_stats = e100_get_ethtool_stats,
+ .get_perm_addr = ethtool_op_get_perm_addr,
};
static int e100_do_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
@@ -2541,7 +2542,8 @@ static int __devinit e100_probe(struct p
e100_phy_init(nic);
memcpy(netdev->dev_addr, nic->eeprom, ETH_ALEN);
- if(!is_valid_ether_addr(netdev->dev_addr)) {
+ memcpy(netdev->perm_addr, nic->eeprom, ETH_ALEN);
+ if(!is_valid_ether_addr(netdev->perm_addr)) {
DPRINTK(PROBE, ERR, "Invalid MAC address from "
"EEPROM, aborting.\n");
err = -EAGAIN;
^ permalink raw reply [flat|nested] 17+ messages in thread
* [patch 2.6.13 9/16] ixgb: support ETHTOOL_GPERMADDR
2005-09-12 14:48 ` [patch 2.6.13 8/16] forcedeth: " John W. Linville
@ 2005-09-12 14:48 ` John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 10/16] ne2k-pci: " John W. Linville
0 siblings, 1 reply; 17+ messages in thread
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
To: linux-kernel, netdev
Cc: john.ronciak, ganesh.venkatesan, ayyappan.veeraiyan, jgarzik,
Jon_Wetzel
Add support for ETHTOOL_GPERMADDR to ixgb.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/ixgb/ixgb_ethtool.c | 1 +
drivers/net/ixgb/ixgb_main.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c
--- a/drivers/net/ixgb/ixgb_ethtool.c
+++ b/drivers/net/ixgb/ixgb_ethtool.c
@@ -723,6 +723,7 @@ struct ethtool_ops ixgb_ethtool_ops = {
.phys_id = ixgb_phys_id,
.get_stats_count = ixgb_get_stats_count,
.get_ethtool_stats = ixgb_get_ethtool_stats,
+ .get_perm_addr = ethtool_op_get_perm_addr,
};
void ixgb_set_ethtool_ops(struct net_device *netdev)
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -460,8 +460,9 @@ ixgb_probe(struct pci_dev *pdev,
}
ixgb_get_ee_mac_addr(&adapter->hw, netdev->dev_addr);
+ memcpy(netdev->perm_addr, netdev->dev_addr, netdev->addr_len);
- if(!is_valid_ether_addr(netdev->dev_addr)) {
+ if(!is_valid_ether_addr(netdev->perm_addr)) {
err = -EIO;
goto err_eeprom;
}
^ permalink raw reply [flat|nested] 17+ messages in thread
* [patch 2.6.13 8/16] forcedeth: support ETHTOOL_GPERMADDR
2005-09-12 14:48 ` [patch 2.6.13 7/16] e100: " John W. Linville
@ 2005-09-12 14:48 ` John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 9/16] ixgb: " John W. Linville
0 siblings, 1 reply; 17+ messages in thread
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: jgarzik, Jon_Wetzel
Add support for ETHTOOL_GPERMADDR to forcedeth.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/forcedeth.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -2065,6 +2065,7 @@ static struct ethtool_ops ops = {
.get_regs_len = nv_get_regs_len,
.get_regs = nv_get_regs,
.nway_reset = nv_nway_reset,
+ .get_perm_addr = ethtool_op_get_perm_addr,
};
static int nv_open(struct net_device *dev)
@@ -2377,8 +2378,9 @@ static int __devinit nv_probe(struct pci
dev->dev_addr[3] = (np->orig_mac[0] >> 16) & 0xff;
dev->dev_addr[4] = (np->orig_mac[0] >> 8) & 0xff;
dev->dev_addr[5] = (np->orig_mac[0] >> 0) & 0xff;
+ memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
- if (!is_valid_ether_addr(dev->dev_addr)) {
+ if (!is_valid_ether_addr(dev->perm_addr)) {
/*
* Bad mac address. At least one bios sets the mac address
* to 01:23:45:67:89:ab
^ permalink raw reply [flat|nested] 17+ messages in thread
* [patch 2.6.13 12/16] r8169: support ETHTOOL_GPERMADDR
2005-09-12 14:48 ` [patch 2.6.13 11/16] pcnet32: " John W. Linville
@ 2005-09-12 14:48 ` John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 13/16] skge: " John W. Linville
0 siblings, 1 reply; 17+ messages in thread
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: romieu, jgarzik, Jon_Wetzel
Add support for ETHTOOL_GPERMADDR to r8169.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/r8169.c | 2 ++
1 files changed, 2 insertions(+)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1028,6 +1028,7 @@ static struct ethtool_ops rtl8169_ethtoo
.get_strings = rtl8169_get_strings,
.get_stats_count = rtl8169_get_stats_count,
.get_ethtool_stats = rtl8169_get_ethtool_stats,
+ .get_perm_addr = ethtool_op_get_perm_addr,
};
static void rtl8169_write_gmii_reg_bit(void __iomem *ioaddr, int reg, int bitnum,
@@ -1512,6 +1513,7 @@ rtl8169_init_one(struct pci_dev *pdev, c
/* Get MAC address. FIXME: read EEPROM */
for (i = 0; i < MAC_ADDR_LEN; i++)
dev->dev_addr[i] = RTL_R8(MAC0 + i);
+ memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
dev->open = rtl8169_open;
dev->hard_start_xmit = rtl8169_start_xmit;
^ permalink raw reply [flat|nested] 17+ messages in thread
* [patch 2.6.13 13/16] skge: support ETHTOOL_GPERMADDR
2005-09-12 14:48 ` [patch 2.6.13 12/16] r8169: " John W. Linville
@ 2005-09-12 14:48 ` John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 14/16] sundance: " John W. Linville
0 siblings, 1 reply; 17+ messages in thread
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: shemminger, jgarzik, Jon_Wetzel
Add support for ETHTOOL_GPERMADDR to skge.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/skge.c | 2 ++
1 files changed, 2 insertions(+)
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -743,6 +743,7 @@ static struct ethtool_ops skge_ethtool_o
.phys_id = skge_phys_id,
.get_stats_count = skge_get_stats_count,
.get_ethtool_stats = skge_get_ethtool_stats,
+ .get_perm_addr = ethtool_op_get_perm_addr,
};
/*
@@ -3080,6 +3081,7 @@ static struct net_device *skge_devinit(s
/* read the mac address */
memcpy_fromio(dev->dev_addr, hw->regs + B2_MAC_1 + port*8, ETH_ALEN);
+ memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
/* device is off until link detection */
netif_carrier_off(dev);
^ permalink raw reply [flat|nested] 17+ messages in thread
* [patch 2.6.13 11/16] pcnet32: support ETHTOOL_GPERMADDR
2005-09-12 14:48 ` [patch 2.6.13 10/16] ne2k-pci: " John W. Linville
@ 2005-09-12 14:48 ` John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 12/16] r8169: " John W. Linville
0 siblings, 1 reply; 17+ messages in thread
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: tsbogend, jgarzik, Jon_Wetzel
Add support for ETHTOOL_GPERMADDR to pcnet32.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/pcnet32.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -957,6 +957,7 @@ static struct ethtool_ops pcnet32_ethtoo
.phys_id = pcnet32_phys_id,
.get_regs_len = pcnet32_get_regs_len,
.get_regs = pcnet32_get_regs,
+ .get_perm_addr = ethtool_op_get_perm_addr,
};
/* only probes for non-PCI devices, the rest are handled by
@@ -1185,9 +1186,10 @@ pcnet32_probe1(unsigned long ioaddr, int
memcpy(dev->dev_addr, promaddr, 6);
}
}
+ memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
/* if the ethernet address is not valid, force to 00:00:00:00:00:00 */
- if (!is_valid_ether_addr(dev->dev_addr))
+ if (!is_valid_ether_addr(dev->perm_addr))
memset(dev->dev_addr, 0, sizeof(dev->dev_addr));
if (pcnet32_debug & NETIF_MSG_PROBE) {
^ permalink raw reply [flat|nested] 17+ messages in thread
* [patch 2.6.13 10/16] ne2k-pci: support ETHTOOL_GPERMADDR
2005-09-12 14:48 ` [patch 2.6.13 9/16] ixgb: " John W. Linville
@ 2005-09-12 14:48 ` John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 11/16] pcnet32: " John W. Linville
0 siblings, 1 reply; 17+ messages in thread
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: p_gortmaker, jgarzik, Jon_Wetzel
Add support for ETHTOOL_GPERMADDR to ne2k-pci.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/ne2k-pci.c | 2 ++
1 files changed, 2 insertions(+)
diff --git a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c
--- a/drivers/net/ne2k-pci.c
+++ b/drivers/net/ne2k-pci.c
@@ -372,6 +372,7 @@ static int __devinit ne2k_pci_init_one (
printk("%2.2X%s", SA_prom[i], i == 5 ? ".\n": ":");
dev->dev_addr[i] = SA_prom[i];
}
+ memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
return 0;
@@ -637,6 +638,7 @@ static struct ethtool_ops ne2k_pci_ethto
.get_drvinfo = ne2k_pci_get_drvinfo,
.get_tx_csum = ethtool_op_get_tx_csum,
.get_sg = ethtool_op_get_sg,
+ .get_perm_addr = ethtool_op_get_perm_addr,
};
static void __devexit ne2k_pci_remove_one (struct pci_dev *pdev)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [patch 2.6.13 14/16] sundance: support ETHTOOL_GPERMADDR
2005-09-12 14:48 ` [patch 2.6.13 13/16] skge: " John W. Linville
@ 2005-09-12 14:48 ` John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 15/16] tg3: " John W. Linville
0 siblings, 1 reply; 17+ messages in thread
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: jgarzik, Jon_Wetzel
Add support for ETHTOOL_GPERMADDR to sundance.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/sundance.c | 2 ++
1 files changed, 2 insertions(+)
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -549,6 +549,7 @@ static int __devinit sundance_probe1 (st
for (i = 0; i < 3; i++)
((u16 *)dev->dev_addr)[i] =
le16_to_cpu(eeprom_read(ioaddr, i + EEPROM_SA_OFFSET));
+ memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
dev->base_addr = (unsigned long)ioaddr;
dev->irq = irq;
@@ -1619,6 +1620,7 @@ static struct ethtool_ops ethtool_ops =
.get_link = get_link,
.get_msglevel = get_msglevel,
.set_msglevel = set_msglevel,
+ .get_perm_addr = ethtool_op_get_perm_addr,
};
static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [patch 2.6.13 15/16] tg3: support ETHTOOL_GPERMADDR
2005-09-12 14:48 ` [patch 2.6.13 14/16] sundance: " John W. Linville
@ 2005-09-12 14:48 ` John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 16/16] via-rhine: " John W. Linville
0 siblings, 1 reply; 17+ messages in thread
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: mchan, davem, jgarzik, Jon_Wetzel
Add support for ETHTOOL_GPERMADDR to tg3.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/tg3.c | 4 ++++
1 files changed, 4 insertions(+)
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -8303,6 +8303,7 @@ static struct ethtool_ops tg3_ethtool_op
.get_ethtool_stats = tg3_get_ethtool_stats,
.get_coalesce = tg3_get_coalesce,
.set_coalesce = tg3_set_coalesce,
+ .get_perm_addr = ethtool_op_get_perm_addr,
};
static void __devinit tg3_get_eeprom_size(struct tg3 *tp)
@@ -9781,6 +9782,7 @@ static int __devinit tg3_get_macaddr_spa
if (prom_getproplen(node, "local-mac-address") == 6) {
prom_getproperty(node, "local-mac-address",
dev->dev_addr, 6);
+ memcpy(dev->perm_addr, dev->dev_addr, 6);
return 0;
}
}
@@ -9792,6 +9794,7 @@ static int __devinit tg3_get_default_mac
struct net_device *dev = tp->dev;
memcpy(dev->dev_addr, idprom->id_ethaddr, 6);
+ memcpy(dev->perm_addr, idprom->id_ethaddr, 6);
return 0;
}
#endif
@@ -9861,6 +9864,7 @@ static int __devinit tg3_get_device_addr
#endif
return -EINVAL;
}
+ memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
return 0;
}
^ permalink raw reply [flat|nested] 17+ messages in thread
* [patch 2.6.13 16/16] via-rhine: support ETHTOOL_GPERMADDR
2005-09-12 14:48 ` [patch 2.6.13 15/16] tg3: " John W. Linville
@ 2005-09-12 14:48 ` John W. Linville
0 siblings, 0 replies; 17+ messages in thread
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: rl, jgarzik, Jon_Wetzel
Add support for ETHTOOL_GPERMADDR to via-rhine.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/via-rhine.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
--- a/drivers/net/via-rhine.c
+++ b/drivers/net/via-rhine.c
@@ -814,8 +814,9 @@ static int __devinit rhine_init_one(stru
for (i = 0; i < 6; i++)
dev->dev_addr[i] = ioread8(ioaddr + StationAddr + i);
+ memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
- if (!is_valid_ether_addr(dev->dev_addr)) {
+ if (!is_valid_ether_addr(dev->perm_addr)) {
rc = -EIO;
printk(KERN_ERR "Invalid MAC address\n");
goto err_out_unmap;
@@ -1829,6 +1830,7 @@ static struct ethtool_ops netdev_ethtool
.set_wol = rhine_set_wol,
.get_sg = ethtool_op_get_sg,
.get_tx_csum = ethtool_op_get_tx_csum,
+ .get_perm_addr = ethtool_op_get_perm_addr,
};
static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2005-09-12 14:48 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-12 14:48 [patch 2.6.13 0/16] implement ETHTOOL_GPERMADDR support for a number of drivers John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 1/16] 3c59x: support ETHTOOL_GPERMADDR John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 2/16] 8139cp: " John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 3/16] 8139too: " John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 4/16] b44: " John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 5/16] bnx2: " John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 6/16] e1000: " John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 7/16] e100: " John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 8/16] forcedeth: " John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 9/16] ixgb: " John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 10/16] ne2k-pci: " John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 11/16] pcnet32: " John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 12/16] r8169: " John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 13/16] skge: " John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 14/16] sundance: " John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 15/16] tg3: " John W. Linville
2005-09-12 14:48 ` [patch 2.6.13 16/16] via-rhine: " John W. Linville
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).