diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2016-01-12 05:01:12 -0500 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2016-01-12 05:01:12 -0500 |
| commit | 1f16f116b01c110db20ab808562c8b8bc3ee3d6e (patch) | |
| tree | 44db563f64cf5f8d62af8f99a61e2b248c44ea3a /drivers/net/usb | |
| parent | 03724ac3d48f8f0e3caf1d30fa134f8fd96c94e2 (diff) | |
| parent | f9eccf24615672896dc13251410c3f2f33a14f95 (diff) | |
Merge branches 'clockevents/4.4-fixes' and 'clockevents/4.5-fixes' of http://git.linaro.org/people/daniel.lezcano/linux into timers/urgent
Pull in fixes from Daniel Lezcano:
- Fix the vt8500 timer leading to a system lock up when dealing with too
small delta (Roman Volkov)
- Select the CLKSRC_MMIO when the fsl_ftm_timer is enabled with COMPILE_TEST
(Daniel Lezcano)
- Prevent to compile timers using the 'iomem' API when the architecture has
not HAS_IOMEM set (Richard Weinberger)
Diffstat (limited to 'drivers/net/usb')
| -rw-r--r-- | drivers/net/usb/cdc_mbim.c | 26 | ||||
| -rw-r--r-- | drivers/net/usb/cdc_ncm.c | 18 | ||||
| -rw-r--r-- | drivers/net/usb/qmi_wwan.c | 1 | ||||
| -rw-r--r-- | drivers/net/usb/r8152.c | 21 |
4 files changed, 42 insertions, 24 deletions
diff --git a/drivers/net/usb/cdc_mbim.c b/drivers/net/usb/cdc_mbim.c index bbde9884ab8a..8973abdec9f6 100644 --- a/drivers/net/usb/cdc_mbim.c +++ b/drivers/net/usb/cdc_mbim.c | |||
| @@ -158,7 +158,7 @@ static int cdc_mbim_bind(struct usbnet *dev, struct usb_interface *intf) | |||
| 158 | if (!cdc_ncm_comm_intf_is_mbim(intf->cur_altsetting)) | 158 | if (!cdc_ncm_comm_intf_is_mbim(intf->cur_altsetting)) |
| 159 | goto err; | 159 | goto err; |
| 160 | 160 | ||
| 161 | ret = cdc_ncm_bind_common(dev, intf, data_altsetting, 0); | 161 | ret = cdc_ncm_bind_common(dev, intf, data_altsetting, dev->driver_info->data); |
| 162 | if (ret) | 162 | if (ret) |
| 163 | goto err; | 163 | goto err; |
| 164 | 164 | ||
| @@ -582,6 +582,26 @@ static const struct driver_info cdc_mbim_info_zlp = { | |||
| 582 | .tx_fixup = cdc_mbim_tx_fixup, | 582 | .tx_fixup = cdc_mbim_tx_fixup, |
| 583 | }; | 583 | }; |
| 584 | 584 | ||
| 585 | /* The spefication explicitly allows NDPs to be placed anywhere in the | ||
| 586 | * frame, but some devices fail unless the NDP is placed after the IP | ||
| 587 | * packets. Using the CDC_NCM_FLAG_NDP_TO_END flags to force this | ||
| 588 | * behaviour. | ||
| 589 | * | ||
| 590 | * Note: The current implementation of this feature restricts each NTB | ||
| 591 | * to a single NDP, implying that multiplexed sessions cannot share an | ||
| 592 | * NTB. This might affect performace for multiplexed sessions. | ||
| 593 | */ | ||
| 594 | static const struct driver_info cdc_mbim_info_ndp_to_end = { | ||
| 595 | .description = "CDC MBIM", | ||
| 596 | .flags = FLAG_NO_SETINT | FLAG_MULTI_PACKET | FLAG_WWAN, | ||
| 597 | .bind = cdc_mbim_bind, | ||
| 598 | .unbind = cdc_mbim_unbind, | ||
| 599 | .manage_power = cdc_mbim_manage_power, | ||
| 600 | .rx_fixup = cdc_mbim_rx_fixup, | ||
| 601 | .tx_fixup = cdc_mbim_tx_fixup, | ||
| 602 | .data = CDC_NCM_FLAG_NDP_TO_END, | ||
| 603 | }; | ||
| 604 | |||
| 585 | static const struct usb_device_id mbim_devs[] = { | 605 | static const struct usb_device_id mbim_devs[] = { |
| 586 | /* This duplicate NCM entry is intentional. MBIM devices can | 606 | /* This duplicate NCM entry is intentional. MBIM devices can |
| 587 | * be disguised as NCM by default, and this is necessary to | 607 | * be disguised as NCM by default, and this is necessary to |
| @@ -597,6 +617,10 @@ static const struct usb_device_id mbim_devs[] = { | |||
| 597 | { USB_VENDOR_AND_INTERFACE_INFO(0x0bdb, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), | 617 | { USB_VENDOR_AND_INTERFACE_INFO(0x0bdb, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), |
| 598 | .driver_info = (unsigned long)&cdc_mbim_info, | 618 | .driver_info = (unsigned long)&cdc_mbim_info, |
| 599 | }, | 619 | }, |
| 620 | /* Huawei E3372 fails unless NDP comes after the IP packets */ | ||
| 621 | { USB_DEVICE_AND_INTERFACE_INFO(0x12d1, 0x157d, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), | ||
| 622 | .driver_info = (unsigned long)&cdc_mbim_info_ndp_to_end, | ||
| 623 | }, | ||
| 600 | /* default entry */ | 624 | /* default entry */ |
| 601 | { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), | 625 | { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), |
| 602 | .driver_info = (unsigned long)&cdc_mbim_info_zlp, | 626 | .driver_info = (unsigned long)&cdc_mbim_info_zlp, |
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index a187f08113ec..1e9843a41168 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c | |||
| @@ -691,7 +691,6 @@ static void cdc_ncm_free(struct cdc_ncm_ctx *ctx) | |||
| 691 | 691 | ||
| 692 | int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_altsetting, int drvflags) | 692 | int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_altsetting, int drvflags) |
| 693 | { | 693 | { |
| 694 | const struct usb_cdc_union_desc *union_desc = NULL; | ||
| 695 | struct cdc_ncm_ctx *ctx; | 694 | struct cdc_ncm_ctx *ctx; |
| 696 | struct usb_driver *driver; | 695 | struct usb_driver *driver; |
| 697 | u8 *buf; | 696 | u8 *buf; |
| @@ -725,15 +724,16 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_ | |||
| 725 | /* parse through descriptors associated with control interface */ | 724 | /* parse through descriptors associated with control interface */ |
| 726 | cdc_parse_cdc_header(&hdr, intf, buf, len); | 725 | cdc_parse_cdc_header(&hdr, intf, buf, len); |
| 727 | 726 | ||
| 728 | ctx->data = usb_ifnum_to_if(dev->udev, | 727 | if (hdr.usb_cdc_union_desc) |
| 729 | hdr.usb_cdc_union_desc->bSlaveInterface0); | 728 | ctx->data = usb_ifnum_to_if(dev->udev, |
| 729 | hdr.usb_cdc_union_desc->bSlaveInterface0); | ||
| 730 | ctx->ether_desc = hdr.usb_cdc_ether_desc; | 730 | ctx->ether_desc = hdr.usb_cdc_ether_desc; |
| 731 | ctx->func_desc = hdr.usb_cdc_ncm_desc; | 731 | ctx->func_desc = hdr.usb_cdc_ncm_desc; |
| 732 | ctx->mbim_desc = hdr.usb_cdc_mbim_desc; | 732 | ctx->mbim_desc = hdr.usb_cdc_mbim_desc; |
| 733 | ctx->mbim_extended_desc = hdr.usb_cdc_mbim_extended_desc; | 733 | ctx->mbim_extended_desc = hdr.usb_cdc_mbim_extended_desc; |
| 734 | 734 | ||
| 735 | /* some buggy devices have an IAD but no CDC Union */ | 735 | /* some buggy devices have an IAD but no CDC Union */ |
| 736 | if (!union_desc && intf->intf_assoc && intf->intf_assoc->bInterfaceCount == 2) { | 736 | if (!hdr.usb_cdc_union_desc && intf->intf_assoc && intf->intf_assoc->bInterfaceCount == 2) { |
| 737 | ctx->data = usb_ifnum_to_if(dev->udev, intf->cur_altsetting->desc.bInterfaceNumber + 1); | 737 | ctx->data = usb_ifnum_to_if(dev->udev, intf->cur_altsetting->desc.bInterfaceNumber + 1); |
| 738 | dev_dbg(&intf->dev, "CDC Union missing - got slave from IAD\n"); | 738 | dev_dbg(&intf->dev, "CDC Union missing - got slave from IAD\n"); |
| 739 | } | 739 | } |
| @@ -955,10 +955,18 @@ static struct usb_cdc_ncm_ndp16 *cdc_ncm_ndp(struct cdc_ncm_ctx *ctx, struct sk_ | |||
| 955 | * NTH16 header as we would normally do. NDP isn't written to the SKB yet, and | 955 | * NTH16 header as we would normally do. NDP isn't written to the SKB yet, and |
| 956 | * the wNdpIndex field in the header is actually not consistent with reality. It will be later. | 956 | * the wNdpIndex field in the header is actually not consistent with reality. It will be later. |
| 957 | */ | 957 | */ |
| 958 | if (ctx->drvflags & CDC_NCM_FLAG_NDP_TO_END) | 958 | if (ctx->drvflags & CDC_NCM_FLAG_NDP_TO_END) { |
| 959 | if (ctx->delayed_ndp16->dwSignature == sign) | 959 | if (ctx->delayed_ndp16->dwSignature == sign) |
| 960 | return ctx->delayed_ndp16; | 960 | return ctx->delayed_ndp16; |
| 961 | 961 | ||
| 962 | /* We can only push a single NDP to the end. Return | ||
| 963 | * NULL to send what we've already got and queue this | ||
| 964 | * skb for later. | ||
| 965 | */ | ||
| 966 | else if (ctx->delayed_ndp16->dwSignature) | ||
| 967 | return NULL; | ||
| 968 | } | ||
| 969 | |||
| 962 | /* follow the chain of NDPs, looking for a match */ | 970 | /* follow the chain of NDPs, looking for a match */ |
| 963 | while (ndpoffset) { | 971 | while (ndpoffset) { |
| 964 | ndp16 = (struct usb_cdc_ncm_ndp16 *)(skb->data + ndpoffset); | 972 | ndp16 = (struct usb_cdc_ncm_ndp16 *)(skb->data + ndpoffset); |
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 34799eaace41..9a5be8b85186 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c | |||
| @@ -725,6 +725,7 @@ static const struct usb_device_id products[] = { | |||
| 725 | {QMI_FIXED_INTF(0x2357, 0x9000, 4)}, /* TP-LINK MA260 */ | 725 | {QMI_FIXED_INTF(0x2357, 0x9000, 4)}, /* TP-LINK MA260 */ |
| 726 | {QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */ | 726 | {QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */ |
| 727 | {QMI_FIXED_INTF(0x1bc7, 0x1201, 2)}, /* Telit LE920 */ | 727 | {QMI_FIXED_INTF(0x1bc7, 0x1201, 2)}, /* Telit LE920 */ |
| 728 | {QMI_FIXED_INTF(0x1c9e, 0x9b01, 3)}, /* XS Stick W100-2 from 4G Systems */ | ||
| 728 | {QMI_FIXED_INTF(0x0b3c, 0xc000, 4)}, /* Olivetti Olicard 100 */ | 729 | {QMI_FIXED_INTF(0x0b3c, 0xc000, 4)}, /* Olivetti Olicard 100 */ |
| 729 | {QMI_FIXED_INTF(0x0b3c, 0xc001, 4)}, /* Olivetti Olicard 120 */ | 730 | {QMI_FIXED_INTF(0x0b3c, 0xc001, 4)}, /* Olivetti Olicard 120 */ |
| 730 | {QMI_FIXED_INTF(0x0b3c, 0xc002, 4)}, /* Olivetti Olicard 140 */ | 731 | {QMI_FIXED_INTF(0x0b3c, 0xc002, 4)}, /* Olivetti Olicard 140 */ |
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index d9427ca3dba7..2e32c41536ae 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c | |||
| @@ -3067,17 +3067,6 @@ static int rtl8152_open(struct net_device *netdev) | |||
| 3067 | 3067 | ||
| 3068 | mutex_lock(&tp->control); | 3068 | mutex_lock(&tp->control); |
| 3069 | 3069 | ||
| 3070 | /* The WORK_ENABLE may be set when autoresume occurs */ | ||
| 3071 | if (test_bit(WORK_ENABLE, &tp->flags)) { | ||
| 3072 | clear_bit(WORK_ENABLE, &tp->flags); | ||
| 3073 | usb_kill_urb(tp->intr_urb); | ||
| 3074 | cancel_delayed_work_sync(&tp->schedule); | ||
| 3075 | |||
| 3076 | /* disable the tx/rx, if the workqueue has enabled them. */ | ||
| 3077 | if (netif_carrier_ok(netdev)) | ||
| 3078 | tp->rtl_ops.disable(tp); | ||
| 3079 | } | ||
| 3080 | |||
| 3081 | tp->rtl_ops.up(tp); | 3070 | tp->rtl_ops.up(tp); |
| 3082 | 3071 | ||
| 3083 | rtl8152_set_speed(tp, AUTONEG_ENABLE, | 3072 | rtl8152_set_speed(tp, AUTONEG_ENABLE, |
| @@ -3124,12 +3113,6 @@ static int rtl8152_close(struct net_device *netdev) | |||
| 3124 | } else { | 3113 | } else { |
| 3125 | mutex_lock(&tp->control); | 3114 | mutex_lock(&tp->control); |
| 3126 | 3115 | ||
| 3127 | /* The autosuspend may have been enabled and wouldn't | ||
| 3128 | * be disable when autoresume occurs, because the | ||
| 3129 | * netif_running() would be false. | ||
| 3130 | */ | ||
| 3131 | rtl_runtime_suspend_enable(tp, false); | ||
| 3132 | |||
| 3133 | tp->rtl_ops.down(tp); | 3116 | tp->rtl_ops.down(tp); |
| 3134 | 3117 | ||
| 3135 | mutex_unlock(&tp->control); | 3118 | mutex_unlock(&tp->control); |
| @@ -3512,7 +3495,7 @@ static int rtl8152_resume(struct usb_interface *intf) | |||
| 3512 | netif_device_attach(tp->netdev); | 3495 | netif_device_attach(tp->netdev); |
| 3513 | } | 3496 | } |
| 3514 | 3497 | ||
| 3515 | if (netif_running(tp->netdev)) { | 3498 | if (netif_running(tp->netdev) && tp->netdev->flags & IFF_UP) { |
| 3516 | if (test_bit(SELECTIVE_SUSPEND, &tp->flags)) { | 3499 | if (test_bit(SELECTIVE_SUSPEND, &tp->flags)) { |
| 3517 | rtl_runtime_suspend_enable(tp, false); | 3500 | rtl_runtime_suspend_enable(tp, false); |
| 3518 | clear_bit(SELECTIVE_SUSPEND, &tp->flags); | 3501 | clear_bit(SELECTIVE_SUSPEND, &tp->flags); |
| @@ -3532,6 +3515,8 @@ static int rtl8152_resume(struct usb_interface *intf) | |||
| 3532 | } | 3515 | } |
| 3533 | usb_submit_urb(tp->intr_urb, GFP_KERNEL); | 3516 | usb_submit_urb(tp->intr_urb, GFP_KERNEL); |
| 3534 | } else if (test_bit(SELECTIVE_SUSPEND, &tp->flags)) { | 3517 | } else if (test_bit(SELECTIVE_SUSPEND, &tp->flags)) { |
| 3518 | if (tp->netdev->flags & IFF_UP) | ||
| 3519 | rtl_runtime_suspend_enable(tp, false); | ||
| 3535 | clear_bit(SELECTIVE_SUSPEND, &tp->flags); | 3520 | clear_bit(SELECTIVE_SUSPEND, &tp->flags); |
| 3536 | } | 3521 | } |
| 3537 | 3522 | ||
