diff options
author | David S. Miller <davem@davemloft.net> | 2011-05-05 17:59:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-05 17:59:02 -0400 |
commit | 7143b7d41218d4fc2ea33e6056c73609527ae687 (patch) | |
tree | 9a842daee1deb57a2c8084bc5d300f6d8428fe34 /drivers/net/usb | |
parent | 90864fbc7639d7a2300c67a18c9fb9fbcf7d51d2 (diff) | |
parent | 87e9af6cc67d842cd92b52b81f3f14e665e7ab05 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/tg3.c
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/cdc_ether.c | 14 | ||||
-rw-r--r-- | drivers/net/usb/smsc95xx.c | 2 | ||||
-rw-r--r-- | drivers/net/usb/usbnet.c | 18 |
3 files changed, 28 insertions, 6 deletions
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 341f7056a800..a301479ecc60 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
@@ -460,7 +460,7 @@ static const struct driver_info cdc_info = { | |||
460 | .manage_power = cdc_manage_power, | 460 | .manage_power = cdc_manage_power, |
461 | }; | 461 | }; |
462 | 462 | ||
463 | static const struct driver_info mbm_info = { | 463 | static const struct driver_info wwan_info = { |
464 | .description = "Mobile Broadband Network Device", | 464 | .description = "Mobile Broadband Network Device", |
465 | .flags = FLAG_WWAN, | 465 | .flags = FLAG_WWAN, |
466 | .bind = usbnet_cdc_bind, | 466 | .bind = usbnet_cdc_bind, |
@@ -471,6 +471,7 @@ static const struct driver_info mbm_info = { | |||
471 | 471 | ||
472 | /*-------------------------------------------------------------------------*/ | 472 | /*-------------------------------------------------------------------------*/ |
473 | 473 | ||
474 | #define HUAWEI_VENDOR_ID 0x12D1 | ||
474 | 475 | ||
475 | static const struct usb_device_id products [] = { | 476 | static const struct usb_device_id products [] = { |
476 | /* | 477 | /* |
@@ -587,8 +588,17 @@ static const struct usb_device_id products [] = { | |||
587 | }, { | 588 | }, { |
588 | USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM, | 589 | USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MDLM, |
589 | USB_CDC_PROTO_NONE), | 590 | USB_CDC_PROTO_NONE), |
590 | .driver_info = (unsigned long)&mbm_info, | 591 | .driver_info = (unsigned long)&wwan_info, |
591 | 592 | ||
593 | }, { | ||
594 | /* Various Huawei modems with a network port like the UMG1831 */ | ||
595 | .match_flags = USB_DEVICE_ID_MATCH_VENDOR | ||
596 | | USB_DEVICE_ID_MATCH_INT_INFO, | ||
597 | .idVendor = HUAWEI_VENDOR_ID, | ||
598 | .bInterfaceClass = USB_CLASS_COMM, | ||
599 | .bInterfaceSubClass = USB_CDC_SUBCLASS_ETHERNET, | ||
600 | .bInterfaceProtocol = 255, | ||
601 | .driver_info = (unsigned long)&wwan_info, | ||
592 | }, | 602 | }, |
593 | { }, // END | 603 | { }, // END |
594 | }; | 604 | }; |
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index b374a9997908..f74f3ce71526 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c | |||
@@ -690,7 +690,7 @@ static int smsc95xx_phy_initialize(struct usbnet *dev) | |||
690 | msleep(10); | 690 | msleep(10); |
691 | bmcr = smsc95xx_mdio_read(dev->net, dev->mii.phy_id, MII_BMCR); | 691 | bmcr = smsc95xx_mdio_read(dev->net, dev->mii.phy_id, MII_BMCR); |
692 | timeout++; | 692 | timeout++; |
693 | } while ((bmcr & MII_BMCR) && (timeout < 100)); | 693 | } while ((bmcr & BMCR_RESET) && (timeout < 100)); |
694 | 694 | ||
695 | if (timeout >= 100) { | 695 | if (timeout >= 100) { |
696 | netdev_warn(dev->net, "timeout on PHY Reset"); | 696 | netdev_warn(dev->net, "timeout on PHY Reset"); |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 7bc9852bd57c..e6dd24466965 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -645,6 +645,7 @@ int usbnet_stop (struct net_device *net) | |||
645 | struct driver_info *info = dev->driver_info; | 645 | struct driver_info *info = dev->driver_info; |
646 | int retval; | 646 | int retval; |
647 | 647 | ||
648 | clear_bit(EVENT_DEV_OPEN, &dev->flags); | ||
648 | netif_stop_queue (net); | 649 | netif_stop_queue (net); |
649 | 650 | ||
650 | netif_info(dev, ifdown, dev->net, | 651 | netif_info(dev, ifdown, dev->net, |
@@ -736,6 +737,7 @@ int usbnet_open (struct net_device *net) | |||
736 | } | 737 | } |
737 | } | 738 | } |
738 | 739 | ||
740 | set_bit(EVENT_DEV_OPEN, &dev->flags); | ||
739 | netif_start_queue (net); | 741 | netif_start_queue (net); |
740 | netif_info(dev, ifup, dev->net, | 742 | netif_info(dev, ifup, dev->net, |
741 | "open: enable queueing (rx %d, tx %d) mtu %d %s framing\n", | 743 | "open: enable queueing (rx %d, tx %d) mtu %d %s framing\n", |
@@ -1259,6 +1261,9 @@ void usbnet_disconnect (struct usb_interface *intf) | |||
1259 | if (dev->driver_info->unbind) | 1261 | if (dev->driver_info->unbind) |
1260 | dev->driver_info->unbind (dev, intf); | 1262 | dev->driver_info->unbind (dev, intf); |
1261 | 1263 | ||
1264 | usb_kill_urb(dev->interrupt); | ||
1265 | usb_free_urb(dev->interrupt); | ||
1266 | |||
1262 | free_netdev(net); | 1267 | free_netdev(net); |
1263 | usb_put_dev (xdev); | 1268 | usb_put_dev (xdev); |
1264 | } | 1269 | } |
@@ -1498,6 +1503,10 @@ int usbnet_resume (struct usb_interface *intf) | |||
1498 | int retval; | 1503 | int retval; |
1499 | 1504 | ||
1500 | if (!--dev->suspend_count) { | 1505 | if (!--dev->suspend_count) { |
1506 | /* resume interrupt URBs */ | ||
1507 | if (dev->interrupt && test_bit(EVENT_DEV_OPEN, &dev->flags)) | ||
1508 | usb_submit_urb(dev->interrupt, GFP_NOIO); | ||
1509 | |||
1501 | spin_lock_irq(&dev->txq.lock); | 1510 | spin_lock_irq(&dev->txq.lock); |
1502 | while ((res = usb_get_from_anchor(&dev->deferred))) { | 1511 | while ((res = usb_get_from_anchor(&dev->deferred))) { |
1503 | 1512 | ||
@@ -1516,9 +1525,12 @@ int usbnet_resume (struct usb_interface *intf) | |||
1516 | smp_mb(); | 1525 | smp_mb(); |
1517 | clear_bit(EVENT_DEV_ASLEEP, &dev->flags); | 1526 | clear_bit(EVENT_DEV_ASLEEP, &dev->flags); |
1518 | spin_unlock_irq(&dev->txq.lock); | 1527 | spin_unlock_irq(&dev->txq.lock); |
1519 | if (!(dev->txq.qlen >= TX_QLEN(dev))) | 1528 | |
1520 | netif_start_queue(dev->net); | 1529 | if (test_bit(EVENT_DEV_OPEN, &dev->flags)) { |
1521 | tasklet_schedule (&dev->bh); | 1530 | if (!(dev->txq.qlen >= TX_QLEN(dev))) |
1531 | netif_start_queue(dev->net); | ||
1532 | tasklet_schedule (&dev->bh); | ||
1533 | } | ||
1522 | } | 1534 | } |
1523 | return 0; | 1535 | return 0; |
1524 | } | 1536 | } |