]> git.karo-electronics.de Git - karo-tx-linux.git/commit
usb gadget: fix ethernet link reports to ethtool
authorJonathan McDowell <noodles@earth.li>
Fri, 17 Apr 2009 21:20:10 +0000 (21:20 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 2 May 2009 17:56:57 +0000 (10:56 -0700)
commit4e0cccfdf1b0dd88207806b38fa60d9d286a37f8
tree05fa88371536fee3a21e787f34cce780d0a0c7c6
parent3e0562c3d63103c0a8402c09663fb5a7014a8568
usb gadget: fix ethernet link reports to ethtool

upstream commit: 237e75bf1e558f7330f8deb167fa3116405bef2c

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@earth.li>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/usb/gadget/u_ether.c