rpms/kernel/devel jwltest-3c59x-misc.patch, NONE, 1.1.2.1 jwltest-e1000_ethtool_ops-whitespace.patch, NONE, 1.1.2.1 jwltest-ethtool-perm-addr.patch, NONE, 1.1.2.1 jwltest-rx_dropped.patch, NONE, 1.1.2.1
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Sun Sep 11 20:40:44 UTC 2005
Author: linville
Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv14684
Added Files:
Tag: private-linville-fc5-jwltest-4-branch
jwltest-3c59x-misc.patch
jwltest-e1000_ethtool_ops-whitespace.patch
jwltest-ethtool-perm-addr.patch jwltest-rx_dropped.patch
Log Message:
jwltest-3c59x-misc.patch:
3c59x.c | 33 ++++++++++++++++++---------------
1 files changed, 18 insertions(+), 15 deletions(-)
--- NEW FILE jwltest-3c59x-misc.patch ---
--- linux-2.6.13/drivers/net/3c59x.c.orig 2005-09-11 16:16:39.612186537 -0400
+++ linux-2.6.13/drivers/net/3c59x.c 2005-09-11 16:18:52.538437848 -0400
@@ -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;
@@ -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
@@ -1531,9 +1531,11 @@ static int __devinit vortex_probe1(struc
dev->hard_start_xmit = boomerang_start_xmit;
/* Actually, it still should work with iommu. */
dev->features |= NETIF_F_SG;
- if (((hw_checksums[card_idx] == -1) && (vp->drv_flags & HAS_HWCKSM)) ||
- (hw_checksums[card_idx] == 1)) {
- dev->features |= NETIF_F_IP_CSUM;
+ if ((card_idx < MAX_UNITS) &&
+ (((hw_checksums[card_idx] == -1) &&
+ (vp->drv_flags & HAS_HWCKSM)) ||
+ (hw_checksums[card_idx] == 1))) {
+ dev->features |= NETIF_F_IP_CSUM;
}
} else {
dev->hard_start_xmit = vortex_start_xmit;
@@ -2806,9 +2808,10 @@ vortex_close(struct net_device *dev)
}
#if DO_ZEROCOPY
- if ( vp->rx_csumhits &&
- ((vp->drv_flags & HAS_HWCKSM) == 0) &&
- (hw_checksums[vp->card_idx] == -1)) {
+ if (vp->rx_csumhits &&
+ ((vp->drv_flags & HAS_HWCKSM) == 0) &&
+ ((vp->card_idx >= MAX_UNITS) ||
+ (hw_checksums[vp->card_idx] == -1))) {
printk(KERN_WARNING "%s supports hardware checksums, and we're not using them!\n", dev->name);
}
#endif
jwltest-e1000_ethtool_ops-whitespace.patch:
e1000_ethtool.c | 44 ++++++++++++++++++++++----------------------
1 files changed, 22 insertions(+), 22 deletions(-)
--- NEW FILE jwltest-e1000_ethtool_ops-whitespace.patch ---
--- linux-2.6.13/drivers/net/e1000/e1000_ethtool.c.orig 2005-09-11 16:21:40.869965028 -0400
+++ linux-2.6.13/drivers/net/e1000/e1000_ethtool.c 2005-09-11 16:27:05.886584114 -0400
@@ -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,
};
jwltest-ethtool-perm-addr.patch:
3c59x.c | 2 ++
8139cp.c | 2 ++
8139too.c | 2 ++
b44.c | 2 ++
bnx2.c | 2 ++
e100.c | 4 +++-
e1000/e1000_ethtool.c | 1 +
e1000/e1000_main.c | 3 ++-
forcedeth.c | 4 +++-
ixgb/ixgb_ethtool.c | 1 +
ixgb/ixgb_main.c | 3 ++-
ne2k-pci.c | 2 ++
pcnet32.c | 4 +++-
r8169.c | 2 ++
skge.c | 2 ++
sundance.c | 2 ++
tg3.c | 4 ++++
via-rhine.c | 4 +++-
18 files changed, 40 insertions(+), 6 deletions(-)
--- NEW FILE jwltest-ethtool-perm-addr.patch ---
--- linux-2.6.13/drivers/net/e1000/e1000_main.c.orig 2005-09-11 16:16:35.958674397 -0400
+++ linux-2.6.13/drivers/net/e1000/e1000_main.c 2005-09-11 16:21:40.873964494 -0400
@@ -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;
--- linux-2.6.13/drivers/net/e1000/e1000_ethtool.c.orig 2005-08-28 19:41:01.000000000 -0400
+++ linux-2.6.13/drivers/net/e1000/e1000_ethtool.c 2005-09-11 16:21:40.869965028 -0400
@@ -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)
--- linux-2.6.13/drivers/net/ne2k-pci.c.orig 2005-08-28 19:41:01.000000000 -0400
+++ linux-2.6.13/drivers/net/ne2k-pci.c 2005-09-11 16:21:40.901960757 -0400
@@ -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)
--- linux-2.6.13/drivers/net/skge.c.orig 2005-09-11 16:16:36.080658108 -0400
+++ linux-2.6.13/drivers/net/skge.c 2005-09-11 16:21:40.922957954 -0400
@@ -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);
--- linux-2.6.13/drivers/net/tg3.c.orig 2005-09-11 16:16:39.792162505 -0400
+++ linux-2.6.13/drivers/net/tg3.c 2005-09-11 16:21:40.939955684 -0400
@@ -8304,6 +8304,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)
@@ -9782,6 +9783,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;
}
}
@@ -9793,6 +9795,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
@@ -9862,6 +9865,7 @@ static int __devinit tg3_get_device_addr
#endif
return -EINVAL;
}
+ memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
return 0;
}
--- linux-2.6.13/drivers/net/8139cp.c.orig 2005-08-28 19:41:01.000000000 -0400
+++ linux-2.6.13/drivers/net/8139cp.c 2005-09-11 16:21:40.839969032 -0400
@@ -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;
--- linux-2.6.13/drivers/net/forcedeth.c.orig 2005-09-11 16:16:35.965673462 -0400
+++ linux-2.6.13/drivers/net/forcedeth.c 2005-09-11 16:21:40.885962892 -0400
@@ -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
--- linux-2.6.13/drivers/net/via-rhine.c.orig 2005-08-28 19:41:01.000000000 -0400
+++ linux-2.6.13/drivers/net/via-rhine.c 2005-09-11 16:21:40.954953682 -0400
@@ -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)
--- linux-2.6.13/drivers/net/bnx2.c.orig 2005-09-11 16:16:35.901682007 -0400
+++ linux-2.6.13/drivers/net/bnx2.c 2005-09-11 16:21:40.859966362 -0400
@@ -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, ",
--- linux-2.6.13/drivers/net/3c59x.c.orig 2005-09-11 16:18:52.538437848 -0400
+++ linux-2.6.13/drivers/net/3c59x.c 2005-09-11 16:21:40.819971701 -0400
@@ -1359,6 +1359,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]);
@@ -3075,6 +3076,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
--- linux-2.6.13/drivers/net/sundance.c.orig 2005-09-11 16:16:39.586190008 -0400
+++ linux-2.6.13/drivers/net/sundance.c 2005-09-11 16:21:40.928957153 -0400
@@ -551,6 +551,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;
@@ -1621,6 +1622,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)
--- linux-2.6.13/drivers/net/8139too.c.orig 2005-08-28 19:41:01.000000000 -0400
+++ linux-2.6.13/drivers/net/8139too.c 2005-09-11 16:21:40.846968098 -0400
@@ -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)
--- linux-2.6.13/drivers/net/ixgb/ixgb_main.c.orig 2005-09-11 16:16:36.009667588 -0400
+++ linux-2.6.13/drivers/net/ixgb/ixgb_main.c 2005-09-11 16:21:40.892961958 -0400
@@ -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;
}
--- linux-2.6.13/drivers/net/ixgb/ixgb_ethtool.c.orig 2005-09-11 16:16:36.005668122 -0400
+++ linux-2.6.13/drivers/net/ixgb/ixgb_ethtool.c 2005-09-11 16:21:40.889962358 -0400
@@ -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)
--- linux-2.6.13/drivers/net/b44.c.orig 2005-09-11 16:16:39.781163973 -0400
+++ linux-2.6.13/drivers/net/b44.c 2005-09-11 16:21:40.852967297 -0400
@@ -1789,6 +1789,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)
@@ -1831,6 +1832,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;
--- linux-2.6.13/drivers/net/e100.c.orig 2005-09-11 16:16:35.951675332 -0400
+++ linux-2.6.13/drivers/net/e100.c 2005-09-11 16:21:40.879963693 -0400
@@ -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;
--- linux-2.6.13/drivers/net/pcnet32.c.orig 2005-08-28 19:41:01.000000000 -0400
+++ linux-2.6.13/drivers/net/pcnet32.c 2005-09-11 16:21:40.911959422 -0400
@@ -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) {
--- linux-2.6.13/drivers/net/r8169.c.orig 2005-09-11 16:16:36.046662648 -0400
+++ linux-2.6.13/drivers/net/r8169.c 2005-09-11 16:21:40.916958754 -0400
@@ -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;
jwltest-rx_dropped.patch:
3c59x.c | 2 +-
e100.c | 4 +---
e1000/e1000_main.c | 1 -
ixgb/ixgb_main.c | 2 --
tg3.c | 6 ++++--
5 files changed, 6 insertions(+), 9 deletions(-)
--- NEW FILE jwltest-rx_dropped.patch ---
--- linux-2.6.13/drivers/net/e1000/e1000_main.c.orig 2005-09-11 16:21:40.873964494 -0400
+++ linux-2.6.13/drivers/net/e1000/e1000_main.c 2005-09-11 16:25:30.661292801 -0400
@@ -2545,7 +2545,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;
--- linux-2.6.13/drivers/net/tg3.c.orig 2005-09-11 16:21:40.939955684 -0400
+++ linux-2.6.13/drivers/net/tg3.c 2005-09-11 16:25:30.683289865 -0400
@@ -6894,8 +6894,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) +
@@ -6923,6 +6922,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;
}
--- linux-2.6.13/drivers/net/3c59x.c.orig 2005-09-11 16:21:40.819971701 -0400
+++ linux-2.6.13/drivers/net/3c59x.c 2005-09-11 16:25:30.655293602 -0400
@@ -2624,8 +2624,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);
}
--- linux-2.6.13/drivers/net/ixgb/ixgb_main.c.orig 2005-09-11 16:21:40.892961958 -0400
+++ linux-2.6.13/drivers/net/ixgb/ixgb_main.c 2005-09-11 16:25:30.672291333 -0400
@@ -1617,8 +1617,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;
*/
--- linux-2.6.13/drivers/net/e100.c.orig 2005-09-11 16:21:40.879963693 -0400
+++ linux-2.6.13/drivers/net/e100.c 2005-09-11 16:25:30.667292000 -0400
@@ -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++;
More information about the fedora-cvs-commits
mailing list