diff options
Diffstat (limited to 'drivers/net/usb/hso.c')
-rw-r--r-- | drivers/net/usb/hso.c | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 8e90891f0e42..198ce3cf378a 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -417,6 +417,11 @@ static const struct usb_device_id hso_ids[] = { | |||
417 | {USB_DEVICE(0x0af0, 0x7401)}, /* GI 0401 */ | 417 | {USB_DEVICE(0x0af0, 0x7401)}, /* GI 0401 */ |
418 | {USB_DEVICE(0x0af0, 0x7501)}, /* GTM 382 */ | 418 | {USB_DEVICE(0x0af0, 0x7501)}, /* GTM 382 */ |
419 | {USB_DEVICE(0x0af0, 0x7601)}, /* GE40x */ | 419 | {USB_DEVICE(0x0af0, 0x7601)}, /* GE40x */ |
420 | {USB_DEVICE(0x0af0, 0x7701)}, | ||
421 | {USB_DEVICE(0x0af0, 0x7801)}, | ||
422 | {USB_DEVICE(0x0af0, 0x7901)}, | ||
423 | {USB_DEVICE(0x0af0, 0x7361)}, | ||
424 | {icon321_port_device(0x0af0, 0xd051)}, | ||
420 | {} | 425 | {} |
421 | }; | 426 | }; |
422 | MODULE_DEVICE_TABLE(usb, hso_ids); | 427 | MODULE_DEVICE_TABLE(usb, hso_ids); |
@@ -658,10 +663,9 @@ static int hso_net_open(struct net_device *net) | |||
658 | odev->rx_buf_missing = sizeof(struct iphdr); | 663 | odev->rx_buf_missing = sizeof(struct iphdr); |
659 | spin_unlock_irqrestore(&odev->net_lock, flags); | 664 | spin_unlock_irqrestore(&odev->net_lock, flags); |
660 | 665 | ||
661 | hso_start_net_device(odev->parent); | ||
662 | |||
663 | /* We are up and running. */ | 666 | /* We are up and running. */ |
664 | set_bit(HSO_NET_RUNNING, &odev->flags); | 667 | set_bit(HSO_NET_RUNNING, &odev->flags); |
668 | hso_start_net_device(odev->parent); | ||
665 | 669 | ||
666 | /* Tell the kernel we are ready to start receiving from it */ | 670 | /* Tell the kernel we are ready to start receiving from it */ |
667 | netif_start_queue(net); | 671 | netif_start_queue(net); |
@@ -2750,18 +2754,21 @@ static int hso_resume(struct usb_interface *iface) | |||
2750 | if (network_table[i] && | 2754 | if (network_table[i] && |
2751 | (network_table[i]->interface == iface)) { | 2755 | (network_table[i]->interface == iface)) { |
2752 | hso_net = dev2net(network_table[i]); | 2756 | hso_net = dev2net(network_table[i]); |
2753 | /* First transmit any lingering data, then restart the | 2757 | if (hso_net->flags & IFF_UP) { |
2754 | * device. */ | 2758 | /* First transmit any lingering data, |
2755 | if (hso_net->skb_tx_buf) { | 2759 | then restart the device. */ |
2756 | dev_dbg(&iface->dev, | 2760 | if (hso_net->skb_tx_buf) { |
2757 | "Transmitting lingering data\n"); | 2761 | dev_dbg(&iface->dev, |
2758 | hso_net_start_xmit(hso_net->skb_tx_buf, | 2762 | "Transmitting" |
2759 | hso_net->net); | 2763 | " lingering data\n"); |
2760 | hso_net->skb_tx_buf = NULL; | 2764 | hso_net_start_xmit(hso_net->skb_tx_buf, |
2765 | hso_net->net); | ||
2766 | hso_net->skb_tx_buf = NULL; | ||
2767 | } | ||
2768 | result = hso_start_net_device(network_table[i]); | ||
2769 | if (result) | ||
2770 | goto out; | ||
2761 | } | 2771 | } |
2762 | result = hso_start_net_device(network_table[i]); | ||
2763 | if (result) | ||
2764 | goto out; | ||
2765 | } | 2772 | } |
2766 | } | 2773 | } |
2767 | 2774 | ||
@@ -2894,6 +2901,7 @@ static struct usb_driver hso_driver = { | |||
2894 | .id_table = hso_ids, | 2901 | .id_table = hso_ids, |
2895 | .suspend = hso_suspend, | 2902 | .suspend = hso_suspend, |
2896 | .resume = hso_resume, | 2903 | .resume = hso_resume, |
2904 | .reset_resume = hso_resume, | ||
2897 | .supports_autosuspend = 1, | 2905 | .supports_autosuspend = 1, |
2898 | }; | 2906 | }; |
2899 | 2907 | ||