[PATCH] Re: 2.6.0-test4-mm5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adrian Bunk wrote:
It seems gcc is right, there are two .get_link members in this struct:


<-- snip -->


...
static struct ethtool_ops gem_ethtool_ops = {


David, would you look over this patch and apply/modify?

I would prefer to use the generic ethtool_op_get_link, because (a) sungem is already using netif_carrier_xxx, and (b) if ->get_link ever returns an incorrect value, that signals a netif_carrier_xxx bug exists.

As a tangent, gem_pcs_interrupt appears to call netif_carrier_xxx but not set gem->lstate. David/Ben, is that a bug?

Thanks,

Jeff


===== drivers/net/sungem.c 1.44 vs edited =====
--- 1.44/drivers/net/sungem.c	Sun Aug 24 08:58:18 2003
+++ edited/drivers/net/sungem.c	Wed Sep  3 12:28:30 2003
@@ -2416,13 +2416,6 @@
 	return 0;
 }
 
-static u32 gem_get_link(struct net_device *dev)
-{
-	struct gem *gp = dev->priv;
-
-	return (gp->lstate == link_up);
-}
-
 static u32 gem_get_msglevel(struct net_device *dev)
 {
 	struct gem *gp = dev->priv;
@@ -2441,7 +2434,6 @@
 	.get_settings		= gem_get_settings,
 	.set_settings		= gem_set_settings,
 	.nway_reset		= gem_nway_reset,
-	.get_link		= gem_get_link,
 	.get_msglevel		= gem_get_msglevel,
 	.set_msglevel		= gem_set_msglevel,
 };

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux