Netdev List
 help / color / mirror / Atom feed
* [patch 2.6.13] e1000: whitespace cleanup in e1000_ethtool_ops
From: John W. Linville @ 2005-09-12 14:49 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: jgarzik, john.ronciak, ganesh.venkatesan, cramerj

Fix-up some whitespace inconsistencies in e1000_ethtool_ops.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---

 drivers/net/e1000/e1000_ethtool.c |   44 +++++++++++++++++++-------------------
 1 files changed, 22 insertions(+), 22 deletions(-)

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
@@ -1705,22 +1705,22 @@ e1000_get_strings(struct net_device *net
 }
 
 struct ethtool_ops e1000_ethtool_ops = {
-	.get_settings           = e1000_get_settings,
-	.set_settings           = e1000_set_settings,
-	.get_drvinfo            = e1000_get_drvinfo,
-	.get_regs_len           = e1000_get_regs_len,
-	.get_regs               = e1000_get_regs,
-	.get_wol                = e1000_get_wol,
-	.set_wol                = e1000_set_wol,
-	.get_msglevel	        = e1000_get_msglevel,
-	.set_msglevel	        = e1000_set_msglevel,
-	.nway_reset             = e1000_nway_reset,
-	.get_link               = ethtool_op_get_link,
-	.get_eeprom_len         = e1000_get_eeprom_len,
-	.get_eeprom             = e1000_get_eeprom,
-	.set_eeprom             = e1000_set_eeprom,
-	.get_ringparam          = e1000_get_ringparam,
-	.set_ringparam          = e1000_set_ringparam,
+	.get_settings		= e1000_get_settings,
+	.set_settings		= e1000_set_settings,
+	.get_drvinfo		= e1000_get_drvinfo,
+	.get_regs_len		= e1000_get_regs_len,
+	.get_regs		= e1000_get_regs,
+	.get_wol		= e1000_get_wol,
+	.set_wol		= e1000_set_wol,
+	.get_msglevel		= e1000_get_msglevel,
+	.set_msglevel		= e1000_set_msglevel,
+	.nway_reset		= e1000_nway_reset,
+	.get_link		= ethtool_op_get_link,
+	.get_eeprom_len		= e1000_get_eeprom_len,
+	.get_eeprom		= e1000_get_eeprom,
+	.set_eeprom		= e1000_set_eeprom,
+	.get_ringparam		= e1000_get_ringparam,
+	.set_ringparam		= e1000_set_ringparam,
 	.get_pauseparam		= e1000_get_pauseparam,
 	.set_pauseparam		= e1000_set_pauseparam,
 	.get_rx_csum		= e1000_get_rx_csum,
@@ -1733,12 +1733,12 @@ struct ethtool_ops e1000_ethtool_ops = {
 	.get_tso		= ethtool_op_get_tso,
 	.set_tso		= e1000_set_tso,
 #endif
-	.self_test_count        = e1000_diag_test_count,
-	.self_test              = e1000_diag_test,
-	.get_strings            = e1000_get_strings,
-	.phys_id                = e1000_phys_id,
-	.get_stats_count        = e1000_get_stats_count,
-	.get_ethtool_stats      = e1000_get_ethtool_stats,
+	.self_test_count	= e1000_diag_test_count,
+	.self_test		= e1000_diag_test,
+	.get_strings		= e1000_get_strings,
+	.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,
 };
 

^ permalink raw reply

* [patch 2.6.13 4/5] ixgb: correct rx_dropped counting
From: John W. Linville @ 2005-09-12 14:49 UTC (permalink / raw)
  To: linux-kernel, netdev
  Cc: john.ronciak, ganesh.venkatesan, ayyappan.veeraiyan, jgarzik
In-Reply-To: <09122005104859.522@bilbo.tuxdriver.com>

Do not count frames dropped by the hardware as part of rx_dropped.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---

 drivers/net/ixgb/ixgb_main.c |    2 --
 1 files changed, 2 deletions(-)

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
@@ -1616,8 +1616,6 @@ ixgb_update_stats(struct ixgb_adapter *a
 	    adapter->stats.icbc +
 	    adapter->stats.ecbc + adapter->stats.mpc;
 
-	adapter->net_stats.rx_dropped = adapter->stats.mpc;
-
 	/* see above
 	 * adapter->net_stats.rx_length_errors = adapter->stats.rlec;
 	 */

^ permalink raw reply

* [patch 2.6.13 5/5] tg3: correct rx_dropped and add rx_missed_errors
From: John W. Linville @ 2005-09-12 14:49 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: mchan, davem, jgarzik
In-Reply-To: <09122005104900.585@bilbo.tuxdriver.com>

Do not count non-error frames dropped by the hardware as
rx_errors. Instead, count them as part of rx_missed_errors.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---

 drivers/net/tg3.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -6893,8 +6893,7 @@ static struct net_device_stats *tg3_get_
 		get_stat64(&hw_stats->tx_octets);
 
 	stats->rx_errors = old_stats->rx_errors +
-		get_stat64(&hw_stats->rx_errors) +
-		get_stat64(&hw_stats->rx_discards);
+		get_stat64(&hw_stats->rx_errors);
 	stats->tx_errors = old_stats->tx_errors +
 		get_stat64(&hw_stats->tx_errors) +
 		get_stat64(&hw_stats->tx_mac_errors) +
@@ -6922,6 +6921,9 @@ static struct net_device_stats *tg3_get_
 	stats->rx_crc_errors = old_stats->rx_crc_errors +
 		calc_crc_errors(tp);
 
+	stats->rx_missed_errors = old_stats->rx_missed_errors +
+		get_stat64(&hw_stats->rx_discards);
+
 	return stats;
 }
 

^ permalink raw reply

* [patch 2.6.13 3/5] e100: correct rx_dropped and add rx_missed_errors
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
  To: linux-kernel, netdev
  Cc: john.ronciak, ganesh.venkatesan, jesse.brandeburg, jgarzik
In-Reply-To: <09122005104859.453@bilbo.tuxdriver.com>

Do not count non-error frames dropped by the hardware as
part of rx_dropped. Instead, count those frames dropped as
rx_missed_errors. Also, do not count other error frames as part of
rx_dropped. Finally, do not count oversized frames in rx_dropped
(since they are counted as part of rx_length_errors).

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---

 drivers/net/e100.c |    4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/e100.c b/drivers/net/e100.c
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -1387,13 +1387,13 @@ static void e100_update_stats(struct nic
 		ns->collisions += nic->tx_collisions;
 		ns->tx_errors += le32_to_cpu(s->tx_max_collisions) +
 			le32_to_cpu(s->tx_lost_crs);
-		ns->rx_dropped += le32_to_cpu(s->rx_resource_errors);
 		ns->rx_length_errors += le32_to_cpu(s->rx_short_frame_errors) +
 			nic->rx_over_length_errors;
 		ns->rx_crc_errors += le32_to_cpu(s->rx_crc_errors);
 		ns->rx_frame_errors += le32_to_cpu(s->rx_alignment_errors);
 		ns->rx_over_errors += le32_to_cpu(s->rx_overrun_errors);
 		ns->rx_fifo_errors += le32_to_cpu(s->rx_overrun_errors);
+		ns->rx_missed_errors += le32_to_cpu(s->rx_resource_errors);
 		ns->rx_errors += le32_to_cpu(s->rx_crc_errors) +
 			le32_to_cpu(s->rx_alignment_errors) +
 			le32_to_cpu(s->rx_short_frame_errors) +
@@ -1727,12 +1727,10 @@ static inline int e100_rx_indicate(struc
 
 	if(unlikely(!(rfd_status & cb_ok))) {
 		/* Don't indicate if hardware indicates errors */
-		nic->net_stats.rx_dropped++;
 		dev_kfree_skb_any(skb);
 	} else if(actual_size > ETH_DATA_LEN + VLAN_ETH_HLEN) {
 		/* Don't indicate oversized frames */
 		nic->rx_over_length_errors++;
-		nic->net_stats.rx_dropped++;
 		dev_kfree_skb_any(skb);
 	} else {
 		nic->net_stats.rx_packets++;

^ permalink raw reply

* [patch 2.6.13 1/5] 3c59x: correct rx_dropped counting
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: akpm, jgarzik
In-Reply-To: <09122005104858.332@bilbo.tuxdriver.com>

Only increment rx_dropped in case of lack of resources (i.e. not for
frames with errors).

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---

 drivers/net/3c59x.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -2598,8 +2598,8 @@ static int vortex_rx(struct net_device *
 			} else if (vortex_debug > 0)
 				printk(KERN_NOTICE "%s: No memory to allocate a sk_buff of "
 					   "size %d.\n", dev->name, pkt_len);
+			vp->stats.rx_dropped++;
 		}
-		vp->stats.rx_dropped++;
 		issue_and_wait(dev, RxDiscard);
 	}
 

^ permalink raw reply

* [patch 2.6.13 2/5] e1000: correct rx_dropped counting
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: john.ronciak, ganesh.venkatesan, cramerj, jgarzik
In-Reply-To: <09122005104859.389@bilbo.tuxdriver.com>

Do not count frames dropped by the hardware as part of rx_dropped.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---

 drivers/net/e1000/e1000_main.c |    1 -
 1 files changed, 1 deletion(-)

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
@@ -2544,7 +2544,6 @@ e1000_update_stats(struct e1000_adapter 
 		adapter->stats.crcerrs + adapter->stats.algnerrc +
 		adapter->stats.rlec + adapter->stats.mpc + 
 		adapter->stats.cexterr;
-	adapter->net_stats.rx_dropped = adapter->stats.mpc;
 	adapter->net_stats.rx_length_errors = adapter->stats.rlec;
 	adapter->net_stats.rx_crc_errors = adapter->stats.crcerrs;
 	adapter->net_stats.rx_frame_errors = adapter->stats.algnerrc;

^ permalink raw reply

* [patch 2.6.13 16/16] via-rhine: support ETHTOOL_GPERMADDR
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: rl, jgarzik, Jon_Wetzel
In-Reply-To: <09122005104858.32669@bilbo.tuxdriver.com>

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

* [patch 2.6.13 15/16] tg3: support ETHTOOL_GPERMADDR
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: mchan, davem, jgarzik, Jon_Wetzel
In-Reply-To: <09122005104858.32604@bilbo.tuxdriver.com>

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

* [patch 2.6.13 0/5] normalize calculations of rx_dropped
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
  To: linux-kernel, netdev
  Cc: jgarzik, akpm, john.ronciak, ganesh.venkatesan, cramerj,
	jesse.brandeburg, ayyappan.veeraiyan, mchan, davem
In-Reply-To: <20050822181726.GJ2736@tuxdriver.com>

Some fixes to normalize how rx_dropped is calculated.  This is the
product of a discussion on netdev on or about 18 August 2005 w/
the subject '[RFC] stats: how to count "good" packets dropped by
hardware?'

Patches for 3c59x, e1000, e100, ixgb, and tg3 to follow.

^ permalink raw reply

* [patch 2.6.13 14/16] sundance: support ETHTOOL_GPERMADDR
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: jgarzik, Jon_Wetzel
In-Reply-To: <09122005104857.32541@bilbo.tuxdriver.com>

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

* [patch 2.6.13 10/16] ne2k-pci: support ETHTOOL_GPERMADDR
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: p_gortmaker, jgarzik, Jon_Wetzel
In-Reply-To: <09122005104856.32285@bilbo.tuxdriver.com>

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

* [patch 2.6.13 11/16] pcnet32: support ETHTOOL_GPERMADDR
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: tsbogend, jgarzik, Jon_Wetzel
In-Reply-To: <09122005104857.32349@bilbo.tuxdriver.com>

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

* [patch 2.6.13 13/16] skge: support ETHTOOL_GPERMADDR
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: shemminger, jgarzik, Jon_Wetzel
In-Reply-To: <09122005104857.32477@bilbo.tuxdriver.com>

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

* [patch 2.6.13 12/16] r8169: support ETHTOOL_GPERMADDR
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: romieu, jgarzik, Jon_Wetzel
In-Reply-To: <09122005104857.32412@bilbo.tuxdriver.com>

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

* [patch 2.6.13 8/16] forcedeth: support ETHTOOL_GPERMADDR
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: jgarzik, Jon_Wetzel
In-Reply-To: <09122005104856.32157@bilbo.tuxdriver.com>

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

* [patch 2.6.13 9/16] ixgb: support ETHTOOL_GPERMADDR
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
In-Reply-To: <09122005104856.32220@bilbo.tuxdriver.com>

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

* [patch 2.6.13 7/16] e100: support ETHTOOL_GPERMADDR
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
In-Reply-To: <09122005104855.32092@bilbo.tuxdriver.com>

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

* [patch 2.6.13 4/16] b44: support ETHTOOL_GPERMADDR
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: jgarzik, Jon_Wetzel
In-Reply-To: <09122005104855.31900@bilbo.tuxdriver.com>

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

* [patch 2.6.13 5/16] bnx2: support ETHTOOL_GPERMADDR
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: mchan, jgarzik, Jon_Wetzel
In-Reply-To: <09122005104855.31965@bilbo.tuxdriver.com>

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

* [patch 2.6.13 6/16] e1000: support ETHTOOL_GPERMADDR
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
In-Reply-To: <09122005104855.32029@bilbo.tuxdriver.com>

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

* [patch 2.6.13 3/16] 8139too: support ETHTOOL_GPERMADDR
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: jgarzik, Jon_Wetzel
In-Reply-To: <09122005104854.31837@bilbo.tuxdriver.com>

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

* [patch 2.6.13 1/16] 3c59x: support ETHTOOL_GPERMADDR
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: akpm, jgarzik, Jon_Wetzel
In-Reply-To: <09122005104853.31717@bilbo.tuxdriver.com>

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

* [patch 2.6.13 2/16] 8139cp: support ETHTOOL_GPERMADDR
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: jgarzik, Jon_Wetzel
In-Reply-To: <09122005104854.31772@bilbo.tuxdriver.com>

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

* [patch 2.6.13 2/3] 3c59x: cleanup init of module parameter arrays
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: akpm, jgarzik
In-Reply-To: <09122005104852.31525@bilbo.tuxdriver.com>

Beautify the array initilizations for the module parameters.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---

 drivers/net/3c59x.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -903,12 +903,12 @@ static void set_8021q_mode(struct net_de
 /* This driver uses 'options' to pass the media type, full-duplex flag, etc. */
 /* Option count limit only -- unlimited interfaces are supported. */
 #define MAX_UNITS 8
-static int options[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1,};
-static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
-static int hw_checksums[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
-static int flow_ctrl[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
-static int enable_wol[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
-static int use_mmio[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
+static int options[MAX_UNITS] = { [0 ... MAX_UNITS-1] = -1 };
+static int full_duplex[MAX_UNITS] = { [0 ... MAX_UNITS-1] = -1 };
+static int hw_checksums[MAX_UNITS] = { [0 ... MAX_UNITS-1] = -1 };
+static int flow_ctrl[MAX_UNITS] = { [0 ... MAX_UNITS-1] = -1 };
+static int enable_wol[MAX_UNITS] = { [0 ... MAX_UNITS-1] = -1 };
+static int use_mmio[MAX_UNITS] = { [0 ... MAX_UNITS-1] = -1 };
 static int global_options = -1;
 static int global_full_duplex = -1;
 static int global_enable_wol = -1;

^ permalink raw reply

* [patch 2.6.13 3/3] 3c59x: fix some grammar in module parameter descriptions
From: John W. Linville @ 2005-09-12 14:48 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: akpm, jgarzik
In-Reply-To: <09122005104853.31588@bilbo.tuxdriver.com>

Correct several (apparently cut & paste) grammatical typos in module
parameter descriptions. They seem to have originated as copies of
the description for "global_options".

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---

 drivers/net/3c59x.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -943,18 +943,18 @@ MODULE_PARM_DESC(debug, "3c59x debug lev
 MODULE_PARM_DESC(options, "3c59x: Bits 0-3: media type, bit 4: bus mastering, bit 9: full duplex");
 MODULE_PARM_DESC(global_options, "3c59x: same as options, but applies to all NICs if options is unset");
 MODULE_PARM_DESC(full_duplex, "3c59x full duplex setting(s) (1)");
-MODULE_PARM_DESC(global_full_duplex, "3c59x: same as full_duplex, but applies to all NICs if options is unset");
+MODULE_PARM_DESC(global_full_duplex, "3c59x: same as full_duplex, but applies to all NICs if full_duplex is unset");
 MODULE_PARM_DESC(hw_checksums, "3c59x Hardware checksum checking by adapter(s) (0-1)");
 MODULE_PARM_DESC(flow_ctrl, "3c59x 802.3x flow control usage (PAUSE only) (0-1)");
 MODULE_PARM_DESC(enable_wol, "3c59x: Turn on Wake-on-LAN for adapter(s) (0-1)");
-MODULE_PARM_DESC(global_enable_wol, "3c59x: same as enable_wol, but applies to all NICs if options is unset");
+MODULE_PARM_DESC(global_enable_wol, "3c59x: same as enable_wol, but applies to all NICs if enable_wol is unset");
 MODULE_PARM_DESC(rx_copybreak, "3c59x copy breakpoint for copy-only-tiny-frames");
 MODULE_PARM_DESC(max_interrupt_work, "3c59x maximum events handled per interrupt");
 MODULE_PARM_DESC(compaq_ioaddr, "3c59x PCI I/O base address (Compaq BIOS problem workaround)");
 MODULE_PARM_DESC(compaq_irq, "3c59x PCI IRQ number (Compaq BIOS problem workaround)");
 MODULE_PARM_DESC(compaq_device_id, "3c59x PCI device ID (Compaq BIOS problem workaround)");
 MODULE_PARM_DESC(watchdog, "3c59x transmit timeout in milliseconds");
-MODULE_PARM_DESC(global_use_mmio, "3c59x: same as use_mmio, but applies to all NICs if options is unset");
+MODULE_PARM_DESC(global_use_mmio, "3c59x: same as use_mmio, but applies to all NICs if use_mmio is unset");
 MODULE_PARM_DESC(use_mmio, "3c59x: use memory-mapped PCI I/O resource (0-1)");
 
 #ifdef CONFIG_NET_POLL_CONTROLLER

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox