[pkg-fso-commits] [SCM] linux-2.6-openmoko,	the Linux 2.6 kernel tree from Openmoko branch, andy-tracking,	updated. upstream/20090303.gitb9de904e-140-g23b564c
    Nelson Castillo 
    arhuaco at freaks-unidos.net
       
    Mon Jun  8 17:30:11 UTC 2009
    
    
  
The following commit has been merged in the andy-tracking branch:
commit aded5330d196644b0f16423dfde9bb2344d991d5
Author: Jonathan McDowell <noodles at earth.li>
Date:   Thu Mar 26 00:45:27 2009 -0700
    usb gadget: fix ethernet link reports to ethtool
    
    The g_ether USB gadget driver currently decides whether or not there's a
    link to report back for eth_get_link based on if the USB link speed is
    set. The USB gadget speed is however often set even before the device is
    enumerated. It seems more sensible to only report a "link" if we're
    actually connected to a host that wants to talk to us. The patch below
    does this for me - tested with the PXA27x UDC driver.
    
    Signed-off-by: Jonathan McDowell <noodles at earth.li>
    Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
    Cc: stable <stable at kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c
index 96d65ca..4007770 100644
--- a/drivers/usb/gadget/u_ether.c
+++ b/drivers/usb/gadget/u_ether.c
@@ -175,12 +175,6 @@ static void eth_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *p)
 	strlcpy(p->bus_info, dev_name(&dev->gadget->dev), sizeof p->bus_info);
 }
 
-static u32 eth_get_link(struct net_device *net)
-{
-	struct eth_dev	*dev = netdev_priv(net);
-	return dev->gadget->speed != USB_SPEED_UNKNOWN;
-}
-
 /* REVISIT can also support:
  *   - WOL (by tracking suspends and issuing remote wakeup)
  *   - msglevel (implies updated messaging)
@@ -189,7 +183,7 @@ static u32 eth_get_link(struct net_device *net)
 
 static struct ethtool_ops ops = {
 	.get_drvinfo = eth_get_drvinfo,
-	.get_link = eth_get_link
+	.get_link = ethtool_op_get_link,
 };
 
 static void defer_kevent(struct eth_dev *dev, int flag)
-- 
linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko
    
    
More information about the pkg-fso-commits
mailing list