Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 316757 Details for
Bug 462352
[RHEL-5.2] e1000e module doesn't implement SIOETHTOOL ETHTOOL_GPERMADDR
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
proposed patch
rhel5-generic-get_perm_addr.patch (text/plain), 13.79 KB, created by
Flavio Leitner
on 2008-09-15 16:19:42 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Flavio Leitner
Created:
2008-09-15 16:19:42 UTC
Size:
13.79 KB
patch
obsolete
> >bz#462352: e1000e module doesn't implement SIOETHTOOL ETHTOOL_GPERMADDR >This patch fixes it backporting the upstream commit below. > >Please review and ACK. > >Flavio > >commit 313674afa8fdced2fe79f50f38e1c387b63d8790 >Author: Matthew Wilcox <matthew@wil.cx> >Date: Tue Jul 31 14:00:29 2007 -0700 > > [NET]: ethtool_perm_addr only has one implementation > > All drivers implement ethtool get_perm_addr the same way -- by calling > the generic function. So we can inline the generic function into the > caller and avoid going through the drivers. > > Signed-off-by: Matthew Wilcox <matthew@wil.cx> > Signed-off-by: David S. Miller <davem@davemloft.net> > >Index: linux-2.6.18.i686/drivers/net/3c59x.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/3c59x.c >+++ linux-2.6.18.i686/drivers/net/3c59x.c >@@ -2884,7 +2884,6 @@ static struct ethtool_ops vortex_ethtool > .set_settings = vortex_set_settings, > .get_link = ethtool_op_get_link, > .nway_reset = vortex_nway_reset, >- .get_perm_addr = ethtool_op_get_perm_addr, > }; > > #ifdef CONFIG_PCI >Index: linux-2.6.18.i686/drivers/net/8139cp.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/8139cp.c >+++ linux-2.6.18.i686/drivers/net/8139cp.c >@@ -1580,7 +1580,6 @@ 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, > .get_eeprom_len = cp_get_eeprom_len, > .get_eeprom = cp_get_eeprom, > .set_eeprom = cp_set_eeprom, >Index: linux-2.6.18.i686/drivers/net/8139too.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/8139too.c >+++ linux-2.6.18.i686/drivers/net/8139too.c >@@ -2461,7 +2461,6 @@ 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) >Index: linux-2.6.18.i686/drivers/net/b44.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/b44.c >+++ linux-2.6.18.i686/drivers/net/b44.c >@@ -2039,7 +2039,6 @@ static struct ethtool_ops b44_ethtool_op > .get_strings = b44_get_strings, > .get_stats_count = b44_get_stats_count, > .get_ethtool_stats = b44_get_ethtool_stats, >- .get_perm_addr = ethtool_op_get_perm_addr, > }; > > static int b44_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) >Index: linux-2.6.18.i686/drivers/net/bnx2.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/bnx2.c >+++ linux-2.6.18.i686/drivers/net/bnx2.c >@@ -7129,7 +7129,6 @@ 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 */ >Index: linux-2.6.18.i686/drivers/net/cxgb3/cxgb3_main.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/cxgb3/cxgb3_main.c >+++ linux-2.6.18.i686/drivers/net/cxgb3/cxgb3_main.c >@@ -1790,7 +1790,6 @@ static struct ethtool_ops cxgb_ethtool_o > .get_wol = get_wol, > .get_tso = ethtool_op_get_tso, > .set_tso = ethtool_op_set_tso, >- .get_perm_addr = ethtool_op_get_perm_addr > }; > > static int in_range(int val, int lo, int hi) >Index: linux-2.6.18.i686/drivers/net/e100.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/e100.c >+++ linux-2.6.18.i686/drivers/net/e100.c >@@ -2505,7 +2505,6 @@ 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) >Index: linux-2.6.18.i686/drivers/net/e1000/e1000_ethtool.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/e1000/e1000_ethtool.c >+++ linux-2.6.18.i686/drivers/net/e1000/e1000_ethtool.c >@@ -1997,7 +1997,6 @@ static struct ethtool_ops e1000_ethtool_ > .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) >Index: linux-2.6.18.i686/drivers/net/forcedeth.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/forcedeth.c >+++ linux-2.6.18.i686/drivers/net/forcedeth.c >@@ -4525,7 +4525,6 @@ 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, > .get_tso = ethtool_op_get_tso, > .set_tso = nv_set_tso, > .get_ringparam = nv_get_ringparam, >Index: linux-2.6.18.i686/drivers/net/ixgb/ixgb_ethtool.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/ixgb/ixgb_ethtool.c >+++ linux-2.6.18.i686/drivers/net/ixgb/ixgb_ethtool.c >@@ -712,7 +712,6 @@ static struct ethtool_ops ixgb_ethtool_o > .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) >Index: linux-2.6.18.i686/drivers/net/ne2k-pci.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/ne2k-pci.c >+++ linux-2.6.18.i686/drivers/net/ne2k-pci.c >@@ -639,7 +639,6 @@ 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) >Index: linux-2.6.18.i686/drivers/net/pcnet32.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/pcnet32.c >+++ linux-2.6.18.i686/drivers/net/pcnet32.c >@@ -1216,7 +1216,6 @@ 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 >Index: linux-2.6.18.i686/drivers/net/qla3xxx.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/qla3xxx.c >+++ linux-2.6.18.i686/drivers/net/qla3xxx.c >@@ -1919,7 +1919,6 @@ static void ql_get_pauseparam(struct net > static struct ethtool_ops ql3xxx_ethtool_ops = { > .get_settings = ql_get_settings, > .get_drvinfo = ql_get_drvinfo, >- .get_perm_addr = ethtool_op_get_perm_addr, > .get_link = ethtool_op_get_link, > .get_msglevel = ql_get_msglevel, > .set_msglevel = ql_set_msglevel, >Index: linux-2.6.18.i686/drivers/net/r8169.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/r8169.c >+++ linux-2.6.18.i686/drivers/net/r8169.c >@@ -1199,7 +1199,6 @@ static const struct ethtool_ops rtl8169_ > .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, >Index: linux-2.6.18.i686/drivers/net/skge.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/skge.c >+++ linux-2.6.18.i686/drivers/net/skge.c >@@ -718,7 +718,6 @@ 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, > }; > > /* >Index: linux-2.6.18.i686/drivers/net/sky2.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/sky2.c >+++ linux-2.6.18.i686/drivers/net/sky2.c >@@ -3400,7 +3400,6 @@ static struct ethtool_ops sky2_ethtool_o > .phys_id = sky2_phys_id, > .get_stats_count = sky2_get_stats_count, > .get_ethtool_stats = sky2_get_ethtool_stats, >- .get_perm_addr = ethtool_op_get_perm_addr, > }; > > /* Initialize network device */ >Index: linux-2.6.18.i686/drivers/net/sundance.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/sundance.c >+++ linux-2.6.18.i686/drivers/net/sundance.c >@@ -1583,7 +1583,6 @@ 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) >Index: linux-2.6.18.i686/drivers/net/tg3.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/tg3.c >+++ linux-2.6.18.i686/drivers/net/tg3.c >@@ -10344,7 +10344,6 @@ 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) >Index: linux-2.6.18.i686/drivers/net/via-rhine.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/via-rhine.c >+++ linux-2.6.18.i686/drivers/net/via-rhine.c >@@ -1811,7 +1811,6 @@ 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) >Index: linux-2.6.18.i686/include/linux/ethtool.h >=================================================================== >--- linux-2.6.18.i686.orig/include/linux/ethtool.h >+++ linux-2.6.18.i686/include/linux/ethtool.h >@@ -269,8 +269,6 @@ u32 ethtool_op_get_sg(struct net_device > int ethtool_op_set_sg(struct net_device *dev, u32 data); > u32 ethtool_op_get_tso(struct net_device *dev); > int ethtool_op_set_tso(struct net_device *dev, u32 data); >-int ethtool_op_get_perm_addr(struct net_device *dev, >- struct ethtool_perm_addr *addr, u8 *data); > u32 ethtool_op_get_ufo(struct net_device *dev); > int ethtool_op_set_ufo(struct net_device *dev, u32 data); > >@@ -308,7 +306,6 @@ int ethtool_op_set_ufo(struct net_device > * get_strings: Return a set of strings that describe the requested objects > * phys_id: Identify the device > * get_stats: Return statistics about the device >- * get_perm_addr: Gets the permanent hardware address > * > * Description: > * >@@ -367,7 +364,6 @@ struct ethtool_ops { > int (*phys_id)(struct net_device *, u32); > int (*get_stats_count)(struct net_device *); > void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *); >- int (*get_perm_addr)(struct net_device *, struct ethtool_perm_addr *, u8 *); > int (*begin)(struct net_device *); > void (*complete)(struct net_device *); > u32 (*get_ufo)(struct net_device *); >Index: linux-2.6.18.i686/net/core/ethtool.c >=================================================================== >--- linux-2.6.18.i686.orig/net/core/ethtool.c >+++ linux-2.6.18.i686/net/core/ethtool.c >@@ -82,18 +82,6 @@ int ethtool_op_set_tso(struct net_device > return 0; > } > >-int ethtool_op_get_perm_addr(struct net_device *dev, struct ethtool_perm_addr *addr, u8 *data) >-{ >- unsigned char len = dev->addr_len; >- if ( addr->size < len ) >- return -ETOOSMALL; >- >- addr->size = len; >- memcpy(data, dev->perm_addr, len); >- return 0; >-} >- >- > u32 ethtool_op_get_ufo(struct net_device *dev) > { > return (dev->features & NETIF_F_UFO) != 0; >@@ -766,34 +754,20 @@ static int ethtool_get_stats(struct net_ > static int ethtool_get_perm_addr(struct net_device *dev, void __user *useraddr) > { > struct ethtool_perm_addr epaddr; >- u8 *data; >- int ret; >- >- if (!dev->ethtool_ops->get_perm_addr) >- return -EOPNOTSUPP; > >- if (copy_from_user(&epaddr,useraddr,sizeof(epaddr))) >+ if (copy_from_user(&epaddr, useraddr, sizeof(epaddr))) > return -EFAULT; > >- data = kmalloc(epaddr.size, GFP_USER); >- if (!data) >- return -ENOMEM; >- >- ret = dev->ethtool_ops->get_perm_addr(dev,&epaddr,data); >- if (ret) >- return ret; >+ if (epaddr.size < dev->addr_len) >+ return -ETOOSMALL; >+ epaddr.size = dev->addr_len; > >- ret = -EFAULT; > if (copy_to_user(useraddr, &epaddr, sizeof(epaddr))) >- goto out; >+ return -EFAULT; > useraddr += sizeof(epaddr); >- if (copy_to_user(useraddr, data, epaddr.size)) >- goto out; >- ret = 0; >- >- out: >- kfree(data); >- return ret; >+ if (copy_to_user(useraddr, dev->perm_addr, epaddr.size)) >+ return -EFAULT; >+ return 0; > } > > /* The main entry point in this file. Called from net/core/dev.c */ >@@ -954,7 +928,6 @@ int dev_ethtool(struct ifreq *ifr) > > EXPORT_SYMBOL(dev_ethtool); > EXPORT_SYMBOL(ethtool_op_get_link); >-EXPORT_SYMBOL_GPL(ethtool_op_get_perm_addr); > EXPORT_SYMBOL(ethtool_op_get_sg); > EXPORT_SYMBOL(ethtool_op_get_tso); > EXPORT_SYMBOL(ethtool_op_get_tx_csum); >Index: linux-2.6.18.i686/drivers/net/sk98lin/skethtool.c >=================================================================== >--- linux-2.6.18.i686.orig/drivers/net/sk98lin/skethtool.c >+++ linux-2.6.18.i686/drivers/net/sk98lin/skethtool.c >@@ -592,7 +592,6 @@ struct ethtool_ops SkGeEthtoolOps = { > .get_pauseparam = getPauseParams, > .set_pauseparam = setPauseParams, > .get_link = ethtool_op_get_link, >- .get_perm_addr = ethtool_op_get_perm_addr, > .get_sg = ethtool_op_get_sg, > .set_sg = setScatterGather, > .get_tx_csum = ethtool_op_get_tx_csum,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 462352
:
316756
|
316757