X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fusb%2Fgadget%2Fu_ether.c;h=66948b72bb9b06e5c73345322b800af69a9618db;hb=f8d56f1771e4867acc461146764b4feeb5245669;hp=3791e6271903e7384a2a6773281d323c9de4b833;hpb=c44df7413fd711bca818111b94cbd7ce5f3600a9;p=linux-2.6-omap-h63xx.git diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c index 3791e627190..66948b72bb9 100644 --- a/drivers/usb/gadget/u_ether.c +++ b/drivers/usb/gadget/u_ether.c @@ -52,7 +52,7 @@ * this single "physical" link to be used by multiple virtual links.) */ -#define DRIVER_VERSION "29-May-2008" +#define UETH__VERSION "29-May-2008" struct eth_dev { /* lock is held while accessing port_usb @@ -170,7 +170,7 @@ static void eth_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *p) struct eth_dev *dev = netdev_priv(net); strlcpy(p->driver, "g_ether", sizeof p->driver); - strlcpy(p->version, DRIVER_VERSION, sizeof p->version); + strlcpy(p->version, UETH__VERSION, sizeof p->version); strlcpy(p->fw_version, dev->gadget->name, sizeof p->fw_version); strlcpy(p->bus_info, dev_name(&dev->gadget->dev), sizeof p->bus_info); } @@ -873,6 +873,13 @@ struct net_device *gether_connect(struct gether *link) spin_lock(&dev->lock); dev->port_usb = link; link->ioport = dev; + if (netif_running(dev->net)) { + if (link->open) + link->open(link); + } else { + if (link->close) + link->close(link); + } spin_unlock(&dev->lock); netif_carrier_on(dev->net);