Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'usb-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
"Here are a number of USB fixes for 3.15-rc3. The majority are gadget
fixes, as we didn't get any of those in for 3.15-rc2. The others are
all over the place, and there's a number of new device id addtions as
well."

* tag 'usb-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (35 commits)
usb: option: add and update a number of CMOTech devices
usb: option: add Alcatel L800MA
usb: option: add Olivetti Olicard 500
usb: qcserial: add Sierra Wireless MC7305/MC7355
usb: qcserial: add Sierra Wireless MC73xx
usb: qcserial: add Sierra Wireless EM7355
USB: io_ti: fix firmware download on big-endian machines
usb/xhci: fix compilation warning when !CONFIG_PCI && !CONFIG_PM
xhci: extend quirk for Renesas cards
xhci: Switch Intel Lynx Point ports to EHCI on shutdown.
usb: xhci: Prefer endpoint context dequeue pointer over stopped_trb
phy: core: make NULL a valid phy reference if !CONFIG_GENERIC_PHY
phy: fix kernel oops in phy_lookup()
phy: restore OMAP_CONTROL_PHY dependencies
phy: exynos: fix building as a module
USB: serial: fix sysfs-attribute removal deadlock
usb: wusbcore: fix panic in wusbhc_chid_set
usb: wusbcore: convert nested lock to use spin_lock instead of spin_lock_irq
uwb: don't call spin_unlock_irq in a USB completion handler
usb: chipidea: coordinate usb phy initialization for different phy type
...

+304 -162
+1
drivers/phy/Kconfig
··· 33 33 34 34 config OMAP_CONTROL_PHY 35 35 tristate "OMAP CONTROL PHY Driver" 36 + depends on ARCH_OMAP2PLUS || COMPILE_TEST 36 37 help 37 38 Enable this to add support for the PHY part present in the control 38 39 module. This driver has API to power on the USB2 PHY and to write to
+5 -4
drivers/phy/Makefile
··· 13 13 obj-$(CONFIG_TWL4030_USB) += phy-twl4030-usb.o 14 14 obj-$(CONFIG_PHY_EXYNOS5250_SATA) += phy-exynos5250-sata.o 15 15 obj-$(CONFIG_PHY_SUN4I_USB) += phy-sun4i-usb.o 16 - obj-$(CONFIG_PHY_SAMSUNG_USB2) += phy-samsung-usb2.o 17 - obj-$(CONFIG_PHY_EXYNOS4210_USB2) += phy-exynos4210-usb2.o 18 - obj-$(CONFIG_PHY_EXYNOS4X12_USB2) += phy-exynos4x12-usb2.o 19 - obj-$(CONFIG_PHY_EXYNOS5250_USB2) += phy-exynos5250-usb2.o 16 + obj-$(CONFIG_PHY_SAMSUNG_USB2) += phy-exynos-usb2.o 17 + phy-exynos-usb2-y += phy-samsung-usb2.o 18 + phy-exynos-usb2-$(CONFIG_PHY_EXYNOS4210_USB2) += phy-exynos4210-usb2.o 19 + phy-exynos-usb2-$(CONFIG_PHY_EXYNOS4X12_USB2) += phy-exynos4x12-usb2.o 20 + phy-exynos-usb2-$(CONFIG_PHY_EXYNOS5250_USB2) += phy-exynos5250-usb2.o 20 21 obj-$(CONFIG_PHY_XGENE) += phy-xgene.o
+3
drivers/phy/phy-core.c
··· 64 64 class_dev_iter_init(&iter, phy_class, NULL, NULL); 65 65 while ((dev = class_dev_iter_next(&iter))) { 66 66 phy = to_phy(dev); 67 + 68 + if (!phy->init_data) 69 + continue; 67 70 count = phy->init_data->num_consumers; 68 71 consumers = phy->init_data->consumers; 69 72 while (count--) {
+34 -3
drivers/usb/chipidea/core.c
··· 277 277 } 278 278 279 279 /** 280 + * ci_usb_phy_init: initialize phy according to different phy type 281 + * @ci: the controller 282 + * 283 + * This function returns an error code if usb_phy_init has failed 284 + */ 285 + static int ci_usb_phy_init(struct ci_hdrc *ci) 286 + { 287 + int ret; 288 + 289 + switch (ci->platdata->phy_mode) { 290 + case USBPHY_INTERFACE_MODE_UTMI: 291 + case USBPHY_INTERFACE_MODE_UTMIW: 292 + case USBPHY_INTERFACE_MODE_HSIC: 293 + ret = usb_phy_init(ci->transceiver); 294 + if (ret) 295 + return ret; 296 + hw_phymode_configure(ci); 297 + break; 298 + case USBPHY_INTERFACE_MODE_ULPI: 299 + case USBPHY_INTERFACE_MODE_SERIAL: 300 + hw_phymode_configure(ci); 301 + ret = usb_phy_init(ci->transceiver); 302 + if (ret) 303 + return ret; 304 + break; 305 + default: 306 + ret = usb_phy_init(ci->transceiver); 307 + } 308 + 309 + return ret; 310 + } 311 + 312 + /** 280 313 * hw_device_reset: resets chip (execute without interruption) 281 314 * @ci: the controller 282 315 * ··· 576 543 return -ENODEV; 577 544 } 578 545 579 - hw_phymode_configure(ci); 580 - 581 546 if (ci->platdata->phy) 582 547 ci->transceiver = ci->platdata->phy; 583 548 else ··· 595 564 return -EPROBE_DEFER; 596 565 } 597 566 598 - ret = usb_phy_init(ci->transceiver); 567 + ret = ci_usb_phy_init(ci); 599 568 if (ret) { 600 569 dev_err(dev, "unable to init phy: %d\n", ret); 601 570 return ret;
+1 -1
drivers/usb/dwc3/core.c
··· 821 821 822 822 spin_lock_irqsave(&dwc->lock, flags); 823 823 824 + dwc3_event_buffers_setup(dwc); 824 825 switch (dwc->dr_mode) { 825 826 case USB_DR_MODE_PERIPHERAL: 826 827 case USB_DR_MODE_OTG: ··· 829 828 /* FALLTHROUGH */ 830 829 case USB_DR_MODE_HOST: 831 830 default: 832 - dwc3_event_buffers_setup(dwc); 833 831 break; 834 832 } 835 833
+4 -8
drivers/usb/dwc3/gadget.c
··· 187 187 * improve this algorithm so that we better use the internal 188 188 * FIFO space 189 189 */ 190 - for (num = 0; num < DWC3_ENDPOINTS_NUM; num++) { 191 - struct dwc3_ep *dep = dwc->eps[num]; 192 - int fifo_number = dep->number >> 1; 190 + for (num = 0; num < dwc->num_in_eps; num++) { 191 + /* bit0 indicates direction; 1 means IN ep */ 192 + struct dwc3_ep *dep = dwc->eps[(num << 1) | 1]; 193 193 int mult = 1; 194 194 int tmp; 195 - 196 - if (!(dep->number & 1)) 197 - continue; 198 195 199 196 if (!(dep->flags & DWC3_EP_ENABLED)) 200 197 continue; ··· 221 224 dev_vdbg(dwc->dev, "%s: Fifo Addr %04x Size %d\n", 222 225 dep->name, last_fifo_depth, fifo_size & 0xffff); 223 226 224 - dwc3_writel(dwc->regs, DWC3_GTXFIFOSIZ(fifo_number), 225 - fifo_size); 227 + dwc3_writel(dwc->regs, DWC3_GTXFIFOSIZ(num), fifo_size); 226 228 227 229 last_fifo_depth += (fifo_size & 0xffff); 228 230 }
+7
drivers/usb/gadget/f_fs.c
··· 745 745 */ 746 746 struct usb_gadget *gadget = epfile->ffs->gadget; 747 747 748 + spin_lock_irq(&epfile->ffs->eps_lock); 749 + /* In the meantime, endpoint got disabled or changed. */ 750 + if (epfile->ep != ep) { 751 + spin_unlock_irq(&epfile->ffs->eps_lock); 752 + return -ESHUTDOWN; 753 + } 748 754 /* 749 755 * Controller may require buffer size to be aligned to 750 756 * maxpacketsize of an out endpoint. ··· 758 752 data_len = io_data->read ? 759 753 usb_ep_align_maybe(gadget, ep->ep, io_data->len) : 760 754 io_data->len; 755 + spin_unlock_irq(&epfile->ffs->eps_lock); 761 756 762 757 data = kmalloc(data_len, GFP_KERNEL); 763 758 if (unlikely(!data))
+1 -1
drivers/usb/gadget/f_rndis.c
··· 377 377 if (skb2) 378 378 rndis_add_hdr(skb2); 379 379 380 - dev_kfree_skb_any(skb); 380 + dev_kfree_skb(skb); 381 381 return skb2; 382 382 } 383 383
+5 -1
drivers/usb/gadget/fsl_udc_core.c
··· 1219 1219 struct fsl_udc *udc; 1220 1220 1221 1221 udc = container_of(gadget, struct fsl_udc, gadget); 1222 + 1223 + if (!udc->vbus_active) 1224 + return -EOPNOTSUPP; 1225 + 1222 1226 udc->softconnect = (is_on != 0); 1223 1227 if (can_pullup(udc)) 1224 1228 fsl_writel((fsl_readl(&dr_regs->usbcmd) | USB_CMD_RUN_STOP), ··· 2536 2532 if (!udc_controller) 2537 2533 return -ENODEV; 2538 2534 2539 - usb_del_gadget_udc(&udc_controller->gadget); 2540 2535 udc_controller->done = &done; 2536 + usb_del_gadget_udc(&udc_controller->gadget); 2541 2537 2542 2538 fsl_udc_clk_release(); 2543 2539
+1
drivers/usb/gadget/inode.c
··· 2043 2043 return -ESRCH; 2044 2044 2045 2045 /* fake probe to determine $CHIP */ 2046 + CHIP = NULL; 2046 2047 usb_gadget_probe_driver(&probe_driver); 2047 2048 if (!CHIP) 2048 2049 return -ENODEV;
+1
drivers/usb/gadget/rndis.c
··· 35 35 #include <asm/byteorder.h> 36 36 #include <asm/unaligned.h> 37 37 38 + #include "u_rndis.h" 38 39 39 40 #undef VERBOSE_DEBUG 40 41
+35 -66
drivers/usb/gadget/u_ether.c
··· 48 48 49 49 #define UETH__VERSION "29-May-2008" 50 50 51 - #define GETHER_NAPI_WEIGHT 32 52 - 53 51 struct eth_dev { 54 52 /* lock is held while accessing port_usb 55 53 */ ··· 72 74 struct sk_buff_head *list); 73 75 74 76 struct work_struct work; 75 - struct napi_struct rx_napi; 76 77 77 78 unsigned long todo; 78 79 #define WORK_RX_MEMORY 0 ··· 253 256 DBG(dev, "rx submit --> %d\n", retval); 254 257 if (skb) 255 258 dev_kfree_skb_any(skb); 259 + spin_lock_irqsave(&dev->req_lock, flags); 260 + list_add(&req->list, &dev->rx_reqs); 261 + spin_unlock_irqrestore(&dev->req_lock, flags); 256 262 } 257 263 return retval; 258 264 } 259 265 260 266 static void rx_complete(struct usb_ep *ep, struct usb_request *req) 261 267 { 262 - struct sk_buff *skb = req->context; 268 + struct sk_buff *skb = req->context, *skb2; 263 269 struct eth_dev *dev = ep->driver_data; 264 270 int status = req->status; 265 - bool rx_queue = 0; 266 271 267 272 switch (status) { 268 273 ··· 288 289 } else { 289 290 skb_queue_tail(&dev->rx_frames, skb); 290 291 } 291 - if (!status) 292 - rx_queue = 1; 292 + skb = NULL; 293 + 294 + skb2 = skb_dequeue(&dev->rx_frames); 295 + while (skb2) { 296 + if (status < 0 297 + || ETH_HLEN > skb2->len 298 + || skb2->len > VLAN_ETH_FRAME_LEN) { 299 + dev->net->stats.rx_errors++; 300 + dev->net->stats.rx_length_errors++; 301 + DBG(dev, "rx length %d\n", skb2->len); 302 + dev_kfree_skb_any(skb2); 303 + goto next_frame; 304 + } 305 + skb2->protocol = eth_type_trans(skb2, dev->net); 306 + dev->net->stats.rx_packets++; 307 + dev->net->stats.rx_bytes += skb2->len; 308 + 309 + /* no buffer copies needed, unless hardware can't 310 + * use skb buffers. 311 + */ 312 + status = netif_rx(skb2); 313 + next_frame: 314 + skb2 = skb_dequeue(&dev->rx_frames); 315 + } 293 316 break; 294 317 295 318 /* software-driven interface shutdown */ ··· 334 313 /* FALLTHROUGH */ 335 314 336 315 default: 337 - rx_queue = 1; 338 - dev_kfree_skb_any(skb); 339 316 dev->net->stats.rx_errors++; 340 317 DBG(dev, "rx status %d\n", status); 341 318 break; 342 319 } 343 320 321 + if (skb) 322 + dev_kfree_skb_any(skb); 323 + if (!netif_running(dev->net)) { 344 324 clean: 345 325 spin_lock(&dev->req_lock); 346 326 list_add(&req->list, &dev->rx_reqs); 347 327 spin_unlock(&dev->req_lock); 348 - 349 - if (rx_queue && likely(napi_schedule_prep(&dev->rx_napi))) 350 - __napi_schedule(&dev->rx_napi); 328 + req = NULL; 329 + } 330 + if (req) 331 + rx_submit(dev, req, GFP_ATOMIC); 351 332 } 352 333 353 334 static int prealloc(struct list_head *list, struct usb_ep *ep, unsigned n) ··· 414 391 { 415 392 struct usb_request *req; 416 393 unsigned long flags; 417 - int rx_counts = 0; 418 394 419 395 /* fill unused rxq slots with some skb */ 420 396 spin_lock_irqsave(&dev->req_lock, flags); 421 397 while (!list_empty(&dev->rx_reqs)) { 422 - 423 - if (++rx_counts > qlen(dev->gadget, dev->qmult)) 424 - break; 425 - 426 398 req = container_of(dev->rx_reqs.next, 427 399 struct usb_request, list); 428 400 list_del_init(&req->list); 429 401 spin_unlock_irqrestore(&dev->req_lock, flags); 430 402 431 403 if (rx_submit(dev, req, gfp_flags) < 0) { 432 - spin_lock_irqsave(&dev->req_lock, flags); 433 - list_add(&req->list, &dev->rx_reqs); 434 - spin_unlock_irqrestore(&dev->req_lock, flags); 435 404 defer_kevent(dev, WORK_RX_MEMORY); 436 405 return; 437 406 } ··· 431 416 spin_lock_irqsave(&dev->req_lock, flags); 432 417 } 433 418 spin_unlock_irqrestore(&dev->req_lock, flags); 434 - } 435 - 436 - static int gether_poll(struct napi_struct *napi, int budget) 437 - { 438 - struct eth_dev *dev = container_of(napi, struct eth_dev, rx_napi); 439 - struct sk_buff *skb; 440 - unsigned int work_done = 0; 441 - int status = 0; 442 - 443 - while ((skb = skb_dequeue(&dev->rx_frames))) { 444 - if (status < 0 445 - || ETH_HLEN > skb->len 446 - || skb->len > VLAN_ETH_FRAME_LEN) { 447 - dev->net->stats.rx_errors++; 448 - dev->net->stats.rx_length_errors++; 449 - DBG(dev, "rx length %d\n", skb->len); 450 - dev_kfree_skb_any(skb); 451 - continue; 452 - } 453 - skb->protocol = eth_type_trans(skb, dev->net); 454 - dev->net->stats.rx_packets++; 455 - dev->net->stats.rx_bytes += skb->len; 456 - 457 - status = netif_rx_ni(skb); 458 - } 459 - 460 - if (netif_running(dev->net)) { 461 - rx_fill(dev, GFP_KERNEL); 462 - work_done++; 463 - } 464 - 465 - if (work_done < budget) 466 - napi_complete(&dev->rx_napi); 467 - 468 - return work_done; 469 419 } 470 420 471 421 static void eth_work(struct work_struct *work) ··· 625 645 /* and open the tx floodgates */ 626 646 atomic_set(&dev->tx_qlen, 0); 627 647 netif_wake_queue(dev->net); 628 - napi_enable(&dev->rx_napi); 629 648 } 630 649 631 650 static int eth_open(struct net_device *net) ··· 651 672 unsigned long flags; 652 673 653 674 VDBG(dev, "%s\n", __func__); 654 - napi_disable(&dev->rx_napi); 655 675 netif_stop_queue(net); 656 676 657 677 DBG(dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld\n", ··· 768 790 return ERR_PTR(-ENOMEM); 769 791 770 792 dev = netdev_priv(net); 771 - netif_napi_add(net, &dev->rx_napi, gether_poll, GETHER_NAPI_WEIGHT); 772 793 spin_lock_init(&dev->lock); 773 794 spin_lock_init(&dev->req_lock); 774 795 INIT_WORK(&dev->work, eth_work); ··· 830 853 return ERR_PTR(-ENOMEM); 831 854 832 855 dev = netdev_priv(net); 833 - netif_napi_add(net, &dev->rx_napi, gether_poll, GETHER_NAPI_WEIGHT); 834 856 spin_lock_init(&dev->lock); 835 857 spin_lock_init(&dev->req_lock); 836 858 INIT_WORK(&dev->work, eth_work); ··· 1113 1137 { 1114 1138 struct eth_dev *dev = link->ioport; 1115 1139 struct usb_request *req; 1116 - struct sk_buff *skb; 1117 1140 1118 1141 WARN_ON(!dev); 1119 1142 if (!dev) ··· 1139 1164 spin_lock(&dev->req_lock); 1140 1165 } 1141 1166 spin_unlock(&dev->req_lock); 1142 - 1143 - spin_lock(&dev->rx_frames.lock); 1144 - while ((skb = __skb_dequeue(&dev->rx_frames))) 1145 - dev_kfree_skb_any(skb); 1146 - spin_unlock(&dev->rx_frames.lock); 1147 - 1148 1167 link->in_ep->driver_data = NULL; 1149 1168 link->in_ep->desc = NULL; 1150 1169
+1 -1
drivers/usb/gadget/zero.c
··· 300 300 ss_opts->isoc_interval = gzero_options.isoc_interval; 301 301 ss_opts->isoc_maxpacket = gzero_options.isoc_maxpacket; 302 302 ss_opts->isoc_mult = gzero_options.isoc_mult; 303 - ss_opts->isoc_maxburst = gzero_options.isoc_maxpacket; 303 + ss_opts->isoc_maxburst = gzero_options.isoc_maxburst; 304 304 ss_opts->bulk_buflen = gzero_options.bulk_buflen; 305 305 306 306 func_ss = usb_get_function(func_inst_ss);
+3 -3
drivers/usb/host/xhci-pci.c
··· 134 134 */ 135 135 if (pdev->subsystem_vendor == PCI_VENDOR_ID_HP) 136 136 xhci->quirks |= XHCI_SPURIOUS_WAKEUP; 137 + 138 + xhci->quirks |= XHCI_SPURIOUS_REBOOT; 137 139 } 138 140 if (pdev->vendor == PCI_VENDOR_ID_ETRON && 139 141 pdev->device == PCI_DEVICE_ID_ASROCK_P67) { ··· 145 143 xhci->quirks |= XHCI_TRUST_TX_LENGTH; 146 144 } 147 145 if (pdev->vendor == PCI_VENDOR_ID_RENESAS && 148 - pdev->device == 0x0015 && 149 - pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG && 150 - pdev->subsystem_device == 0xc0cd) 146 + pdev->device == 0x0015) 151 147 xhci->quirks |= XHCI_RESET_ON_RESUME; 152 148 if (pdev->vendor == PCI_VENDOR_ID_VIA) 153 149 xhci->quirks |= XHCI_RESET_ON_RESUME;
+31 -36
drivers/usb/host/xhci-ring.c
··· 550 550 struct xhci_ring *ep_ring; 551 551 struct xhci_generic_trb *trb; 552 552 dma_addr_t addr; 553 + u64 hw_dequeue; 553 554 554 555 ep_ring = xhci_triad_to_transfer_ring(xhci, slot_id, 555 556 ep_index, stream_id); ··· 558 557 xhci_warn(xhci, "WARN can't find new dequeue state " 559 558 "for invalid stream ID %u.\n", 560 559 stream_id); 561 - return; 562 - } 563 - state->new_cycle_state = 0; 564 - xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb, 565 - "Finding segment containing stopped TRB."); 566 - state->new_deq_seg = find_trb_seg(cur_td->start_seg, 567 - dev->eps[ep_index].stopped_trb, 568 - &state->new_cycle_state); 569 - if (!state->new_deq_seg) { 570 - WARN_ON(1); 571 560 return; 572 561 } 573 562 ··· 568 577 if (ep->ep_state & EP_HAS_STREAMS) { 569 578 struct xhci_stream_ctx *ctx = 570 579 &ep->stream_info->stream_ctx_array[stream_id]; 571 - state->new_cycle_state = 0x1 & le64_to_cpu(ctx->stream_ring); 580 + hw_dequeue = le64_to_cpu(ctx->stream_ring); 572 581 } else { 573 582 struct xhci_ep_ctx *ep_ctx 574 583 = xhci_get_ep_ctx(xhci, dev->out_ctx, ep_index); 575 - state->new_cycle_state = 0x1 & le64_to_cpu(ep_ctx->deq); 584 + hw_dequeue = le64_to_cpu(ep_ctx->deq); 576 585 } 586 + 587 + /* Find virtual address and segment of hardware dequeue pointer */ 588 + state->new_deq_seg = ep_ring->deq_seg; 589 + state->new_deq_ptr = ep_ring->dequeue; 590 + while (xhci_trb_virt_to_dma(state->new_deq_seg, state->new_deq_ptr) 591 + != (dma_addr_t)(hw_dequeue & ~0xf)) { 592 + next_trb(xhci, ep_ring, &state->new_deq_seg, 593 + &state->new_deq_ptr); 594 + if (state->new_deq_ptr == ep_ring->dequeue) { 595 + WARN_ON(1); 596 + return; 597 + } 598 + } 599 + /* 600 + * Find cycle state for last_trb, starting at old cycle state of 601 + * hw_dequeue. If there is only one segment ring, find_trb_seg() will 602 + * return immediately and cannot toggle the cycle state if this search 603 + * wraps around, so add one more toggle manually in that case. 604 + */ 605 + state->new_cycle_state = hw_dequeue & 0x1; 606 + if (ep_ring->first_seg == ep_ring->first_seg->next && 607 + cur_td->last_trb < state->new_deq_ptr) 608 + state->new_cycle_state ^= 0x1; 577 609 578 610 state->new_deq_ptr = cur_td->last_trb; 579 611 xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb, 580 612 "Finding segment containing last TRB in TD."); 581 613 state->new_deq_seg = find_trb_seg(state->new_deq_seg, 582 - state->new_deq_ptr, 583 - &state->new_cycle_state); 614 + state->new_deq_ptr, &state->new_cycle_state); 584 615 if (!state->new_deq_seg) { 585 616 WARN_ON(1); 586 617 return; 587 618 } 588 619 620 + /* Increment to find next TRB after last_trb. Cycle if appropriate. */ 589 621 trb = &state->new_deq_ptr->generic; 590 622 if (TRB_TYPE_LINK_LE32(trb->field[3]) && 591 623 (trb->field[3] & cpu_to_le32(LINK_TOGGLE))) 592 624 state->new_cycle_state ^= 0x1; 593 625 next_trb(xhci, ep_ring, &state->new_deq_seg, &state->new_deq_ptr); 594 626 595 - /* 596 - * If there is only one segment in a ring, find_trb_seg()'s while loop 597 - * will not run, and it will return before it has a chance to see if it 598 - * needs to toggle the cycle bit. It can't tell if the stalled transfer 599 - * ended just before the link TRB on a one-segment ring, or if the TD 600 - * wrapped around the top of the ring, because it doesn't have the TD in 601 - * question. Look for the one-segment case where stalled TRB's address 602 - * is greater than the new dequeue pointer address. 603 - */ 604 - if (ep_ring->first_seg == ep_ring->first_seg->next && 605 - state->new_deq_ptr < dev->eps[ep_index].stopped_trb) 606 - state->new_cycle_state ^= 0x1; 627 + /* Don't update the ring cycle state for the producer (us). */ 607 628 xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb, 608 629 "Cycle state = 0x%x", state->new_cycle_state); 609 630 610 - /* Don't update the ring cycle state for the producer (us). */ 611 631 xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb, 612 632 "New dequeue segment = %p (virtual)", 613 633 state->new_deq_seg); ··· 801 799 if (list_empty(&ep->cancelled_td_list)) { 802 800 xhci_stop_watchdog_timer_in_irq(xhci, ep); 803 801 ep->stopped_td = NULL; 804 - ep->stopped_trb = NULL; 805 802 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); 806 803 return; 807 804 } ··· 868 867 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); 869 868 } 870 869 871 - /* Clear stopped_td and stopped_trb if endpoint is not halted */ 872 - if (!(ep->ep_state & EP_HALTED)) { 870 + /* Clear stopped_td if endpoint is not halted */ 871 + if (!(ep->ep_state & EP_HALTED)) 873 872 ep->stopped_td = NULL; 874 - ep->stopped_trb = NULL; 875 - } 876 873 877 874 /* 878 875 * Drop the lock and complete the URBs in the cancelled TD list. ··· 1940 1941 struct xhci_virt_ep *ep = &xhci->devs[slot_id]->eps[ep_index]; 1941 1942 ep->ep_state |= EP_HALTED; 1942 1943 ep->stopped_td = td; 1943 - ep->stopped_trb = event_trb; 1944 1944 ep->stopped_stream = stream_id; 1945 1945 1946 1946 xhci_queue_reset_ep(xhci, slot_id, ep_index); 1947 1947 xhci_cleanup_stalled_ring(xhci, td->urb->dev, ep_index); 1948 1948 1949 1949 ep->stopped_td = NULL; 1950 - ep->stopped_trb = NULL; 1951 1950 ep->stopped_stream = 0; 1952 1951 1953 1952 xhci_ring_cmd_db(xhci); ··· 2027 2030 * the ring dequeue pointer or take this TD off any lists yet. 2028 2031 */ 2029 2032 ep->stopped_td = td; 2030 - ep->stopped_trb = event_trb; 2031 2033 return 0; 2032 2034 } else { 2033 2035 if (trb_comp_code == COMP_STALL) { ··· 2038 2042 * USB class driver clear the stall later. 2039 2043 */ 2040 2044 ep->stopped_td = td; 2041 - ep->stopped_trb = event_trb; 2042 2045 ep->stopped_stream = ep_ring->stream_id; 2043 2046 } else if (xhci_requires_manual_halt_cleanup(xhci, 2044 2047 ep_ctx, trb_comp_code)) {
+3 -4
drivers/usb/host/xhci.c
··· 408 408 409 409 #else 410 410 411 - static int xhci_try_enable_msi(struct usb_hcd *hcd) 411 + static inline int xhci_try_enable_msi(struct usb_hcd *hcd) 412 412 { 413 413 return 0; 414 414 } 415 415 416 - static void xhci_cleanup_msix(struct xhci_hcd *xhci) 416 + static inline void xhci_cleanup_msix(struct xhci_hcd *xhci) 417 417 { 418 418 } 419 419 420 - static void xhci_msix_sync_irqs(struct xhci_hcd *xhci) 420 + static inline void xhci_msix_sync_irqs(struct xhci_hcd *xhci) 421 421 { 422 422 } 423 423 ··· 2954 2954 xhci_ring_cmd_db(xhci); 2955 2955 } 2956 2956 virt_ep->stopped_td = NULL; 2957 - virt_ep->stopped_trb = NULL; 2958 2957 virt_ep->stopped_stream = 0; 2959 2958 spin_unlock_irqrestore(&xhci->lock, flags); 2960 2959
-2
drivers/usb/host/xhci.h
··· 865 865 #define EP_GETTING_NO_STREAMS (1 << 5) 866 866 /* ---- Related to URB cancellation ---- */ 867 867 struct list_head cancelled_td_list; 868 - /* The TRB that was last reported in a stopped endpoint ring */ 869 - union xhci_trb *stopped_trb; 870 868 struct xhci_td *stopped_td; 871 869 unsigned int stopped_stream; 872 870 /* Watchdog timer for stop endpoint command to cancel URBs */
+2 -3
drivers/usb/musb/musb_dsps.c
··· 470 470 struct dsps_glue *glue = dev_get_drvdata(dev->parent); 471 471 472 472 del_timer_sync(&glue->timer); 473 - 474 473 usb_phy_shutdown(musb->xceiv); 474 + debugfs_remove_recursive(glue->dbgfs_root); 475 + 475 476 return 0; 476 477 } 477 478 ··· 708 707 /* disable usbss clocks */ 709 708 pm_runtime_put(&pdev->dev); 710 709 pm_runtime_disable(&pdev->dev); 711 - 712 - debugfs_remove_recursive(glue->dbgfs_root); 713 710 714 711 return 0; 715 712 }
+8
drivers/usb/musb/omap2430.c
··· 316 316 { 317 317 struct omap2430_glue *glue = container_of(mailbox_work, 318 318 struct omap2430_glue, omap_musb_mailbox_work); 319 + struct musb *musb = glue_to_musb(glue); 320 + struct device *dev = musb->controller; 321 + 322 + pm_runtime_get_sync(dev); 319 323 omap_musb_set_mailbox(glue); 324 + pm_runtime_mark_last_busy(dev); 325 + pm_runtime_put_autosuspend(dev); 320 326 } 321 327 322 328 static irqreturn_t omap2430_musb_interrupt(int irq, void *__hci) ··· 422 416 omap_musb_set_mailbox(glue); 423 417 424 418 phy_init(musb->phy); 419 + phy_power_on(musb->phy); 425 420 426 421 pm_runtime_put_noidle(musb->controller); 427 422 return 0; ··· 485 478 del_timer_sync(&musb_idle_timer); 486 479 487 480 omap2430_low_level_exit(musb); 481 + phy_power_off(musb->phy); 488 482 phy_exit(musb->phy); 489 483 490 484 return 0;
+9
drivers/usb/phy/phy-am335x-control.c
··· 3 3 #include <linux/err.h> 4 4 #include <linux/of.h> 5 5 #include <linux/io.h> 6 + #include <linux/delay.h> 6 7 #include "am35x-phy-control.h" 7 8 8 9 struct am335x_control_usb { ··· 87 86 } 88 87 89 88 writel(val, usb_ctrl->phy_reg + reg); 89 + 90 + /* 91 + * Give the PHY ~1ms to complete the power up operation. 92 + * Tests have shown unstable behaviour if other USB PHY related 93 + * registers are written too shortly after such a transition. 94 + */ 95 + if (on) 96 + mdelay(1); 90 97 } 91 98 92 99 static const struct phy_control ctrl_am335x = {
+3
drivers/usb/phy/phy.c
··· 132 132 if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) { 133 133 pr_debug("PHY: unable to find transceiver of type %s\n", 134 134 usb_phy_type_string(type)); 135 + if (!IS_ERR(phy)) 136 + phy = ERR_PTR(-ENODEV); 137 + 135 138 goto err0; 136 139 } 137 140
+33 -17
drivers/usb/serial/io_ti.c
··· 28 28 #include <linux/spinlock.h> 29 29 #include <linux/mutex.h> 30 30 #include <linux/serial.h> 31 + #include <linux/swab.h> 31 32 #include <linux/kfifo.h> 32 33 #include <linux/ioctl.h> 33 34 #include <linux/firmware.h> ··· 281 280 { 282 281 int status = 0; 283 282 __u8 read_length; 284 - __be16 be_start_address; 283 + u16 be_start_address; 285 284 286 285 dev_dbg(&dev->dev, "%s - @ %x for %d\n", __func__, start_address, length); 287 286 ··· 297 296 if (read_length > 1) { 298 297 dev_dbg(&dev->dev, "%s - @ %x for %d\n", __func__, start_address, read_length); 299 298 } 300 - be_start_address = cpu_to_be16(start_address); 299 + /* 300 + * NOTE: Must use swab as wIndex is sent in little-endian 301 + * byte order regardless of host byte order. 302 + */ 303 + be_start_address = swab16((u16)start_address); 301 304 status = ti_vread_sync(dev, UMPC_MEMORY_READ, 302 305 (__u16)address_type, 303 - (__force __u16)be_start_address, 306 + be_start_address, 304 307 buffer, read_length); 305 308 306 309 if (status) { ··· 399 394 struct device *dev = &serial->serial->dev->dev; 400 395 int status = 0; 401 396 int write_length; 402 - __be16 be_start_address; 397 + u16 be_start_address; 403 398 404 399 /* We can only send a maximum of 1 aligned byte page at a time */ 405 400 ··· 414 409 __func__, start_address, write_length); 415 410 usb_serial_debug_data(dev, __func__, write_length, buffer); 416 411 417 - /* Write first page */ 418 - be_start_address = cpu_to_be16(start_address); 412 + /* 413 + * Write first page. 414 + * 415 + * NOTE: Must use swab as wIndex is sent in little-endian byte order 416 + * regardless of host byte order. 417 + */ 418 + be_start_address = swab16((u16)start_address); 419 419 status = ti_vsend_sync(serial->serial->dev, 420 420 UMPC_MEMORY_WRITE, (__u16)address_type, 421 - (__force __u16)be_start_address, 421 + be_start_address, 422 422 buffer, write_length); 423 423 if (status) { 424 424 dev_dbg(dev, "%s - ERROR %d\n", __func__, status); ··· 446 436 __func__, start_address, write_length); 447 437 usb_serial_debug_data(dev, __func__, write_length, buffer); 448 438 449 - /* Write next page */ 450 - be_start_address = cpu_to_be16(start_address); 439 + /* 440 + * Write next page. 441 + * 442 + * NOTE: Must use swab as wIndex is sent in little-endian byte 443 + * order regardless of host byte order. 444 + */ 445 + be_start_address = swab16((u16)start_address); 451 446 status = ti_vsend_sync(serial->serial->dev, UMPC_MEMORY_WRITE, 452 447 (__u16)address_type, 453 - (__force __u16)be_start_address, 448 + be_start_address, 454 449 buffer, write_length); 455 450 if (status) { 456 451 dev_err(dev, "%s - ERROR %d\n", __func__, status); ··· 600 585 if (rom_desc->Type == desc_type) 601 586 return start_address; 602 587 603 - start_address = start_address + sizeof(struct ti_i2c_desc) 604 - + rom_desc->Size; 588 + start_address = start_address + sizeof(struct ti_i2c_desc) + 589 + le16_to_cpu(rom_desc->Size); 605 590 606 591 } while ((start_address < TI_MAX_I2C_SIZE) && rom_desc->Type); 607 592 ··· 614 599 __u16 i; 615 600 __u8 cs = 0; 616 601 617 - for (i = 0; i < rom_desc->Size; i++) 602 + for (i = 0; i < le16_to_cpu(rom_desc->Size); i++) 618 603 cs = (__u8)(cs + buffer[i]); 619 604 620 605 if (cs != rom_desc->CheckSum) { ··· 665 650 break; 666 651 667 652 if ((start_address + sizeof(struct ti_i2c_desc) + 668 - rom_desc->Size) > TI_MAX_I2C_SIZE) { 653 + le16_to_cpu(rom_desc->Size)) > TI_MAX_I2C_SIZE) { 669 654 status = -ENODEV; 670 655 dev_dbg(dev, "%s - structure too big, erroring out.\n", __func__); 671 656 break; ··· 680 665 /* Read the descriptor data */ 681 666 status = read_rom(serial, start_address + 682 667 sizeof(struct ti_i2c_desc), 683 - rom_desc->Size, buffer); 668 + le16_to_cpu(rom_desc->Size), 669 + buffer); 684 670 if (status) 685 671 break; 686 672 ··· 690 674 break; 691 675 } 692 676 start_address = start_address + sizeof(struct ti_i2c_desc) + 693 - rom_desc->Size; 677 + le16_to_cpu(rom_desc->Size); 694 678 695 679 } while ((rom_desc->Type != I2C_DESC_TYPE_ION) && 696 680 (start_address < TI_MAX_I2C_SIZE)); ··· 728 712 729 713 /* Read the descriptor data */ 730 714 status = read_rom(serial, start_address+sizeof(struct ti_i2c_desc), 731 - rom_desc->Size, buffer); 715 + le16_to_cpu(rom_desc->Size), buffer); 732 716 if (status) 733 717 goto exit; 734 718
+77 -4
drivers/usb/serial/option.c
··· 234 234 #define QUALCOMM_VENDOR_ID 0x05C6 235 235 236 236 #define CMOTECH_VENDOR_ID 0x16d8 237 - #define CMOTECH_PRODUCT_6008 0x6008 238 - #define CMOTECH_PRODUCT_6280 0x6280 237 + #define CMOTECH_PRODUCT_6001 0x6001 238 + #define CMOTECH_PRODUCT_CMU_300 0x6002 239 + #define CMOTECH_PRODUCT_6003 0x6003 240 + #define CMOTECH_PRODUCT_6004 0x6004 241 + #define CMOTECH_PRODUCT_6005 0x6005 242 + #define CMOTECH_PRODUCT_CGU_628A 0x6006 243 + #define CMOTECH_PRODUCT_CHE_628S 0x6007 244 + #define CMOTECH_PRODUCT_CMU_301 0x6008 245 + #define CMOTECH_PRODUCT_CHU_628 0x6280 246 + #define CMOTECH_PRODUCT_CHU_628S 0x6281 247 + #define CMOTECH_PRODUCT_CDU_680 0x6803 248 + #define CMOTECH_PRODUCT_CDU_685A 0x6804 249 + #define CMOTECH_PRODUCT_CHU_720S 0x7001 250 + #define CMOTECH_PRODUCT_7002 0x7002 251 + #define CMOTECH_PRODUCT_CHU_629K 0x7003 252 + #define CMOTECH_PRODUCT_7004 0x7004 253 + #define CMOTECH_PRODUCT_7005 0x7005 254 + #define CMOTECH_PRODUCT_CGU_629 0x7006 255 + #define CMOTECH_PRODUCT_CHU_629S 0x700a 256 + #define CMOTECH_PRODUCT_CHU_720I 0x7211 257 + #define CMOTECH_PRODUCT_7212 0x7212 258 + #define CMOTECH_PRODUCT_7213 0x7213 259 + #define CMOTECH_PRODUCT_7251 0x7251 260 + #define CMOTECH_PRODUCT_7252 0x7252 261 + #define CMOTECH_PRODUCT_7253 0x7253 239 262 240 263 #define TELIT_VENDOR_ID 0x1bc7 241 264 #define TELIT_PRODUCT_UC864E 0x1003 ··· 310 287 #define ALCATEL_PRODUCT_X060S_X200 0x0000 311 288 #define ALCATEL_PRODUCT_X220_X500D 0x0017 312 289 #define ALCATEL_PRODUCT_L100V 0x011e 290 + #define ALCATEL_PRODUCT_L800MA 0x0203 313 291 314 292 #define PIRELLI_VENDOR_ID 0x1266 315 293 #define PIRELLI_PRODUCT_C100_1 0x1002 ··· 373 349 #define OLIVETTI_PRODUCT_OLICARD100 0xc000 374 350 #define OLIVETTI_PRODUCT_OLICARD145 0xc003 375 351 #define OLIVETTI_PRODUCT_OLICARD200 0xc005 352 + #define OLIVETTI_PRODUCT_OLICARD500 0xc00b 376 353 377 354 /* Celot products */ 378 355 #define CELOT_VENDOR_ID 0x211f ··· 525 500 526 501 static const struct option_blacklist_info huawei_cdc12_blacklist = { 527 502 .reserved = BIT(1) | BIT(2), 503 + }; 504 + 505 + static const struct option_blacklist_info net_intf0_blacklist = { 506 + .reserved = BIT(0), 528 507 }; 529 508 530 509 static const struct option_blacklist_info net_intf1_blacklist = { ··· 1064 1035 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ 1065 1036 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */ 1066 1037 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */ 1067 - { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */ 1068 - { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6008) }, 1038 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) }, 1039 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) }, 1040 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6003), 1041 + .driver_info = (kernel_ulong_t)&net_intf0_blacklist }, 1042 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6004) }, 1043 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6005) }, 1044 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CGU_628A) }, 1045 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHE_628S), 1046 + .driver_info = (kernel_ulong_t)&net_intf0_blacklist }, 1047 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_301), 1048 + .driver_info = (kernel_ulong_t)&net_intf0_blacklist }, 1049 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_628), 1050 + .driver_info = (kernel_ulong_t)&net_intf0_blacklist }, 1051 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_628S) }, 1052 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CDU_680) }, 1053 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CDU_685A) }, 1054 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_720S), 1055 + .driver_info = (kernel_ulong_t)&net_intf0_blacklist }, 1056 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7002), 1057 + .driver_info = (kernel_ulong_t)&net_intf0_blacklist }, 1058 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_629K), 1059 + .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, 1060 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7004), 1061 + .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, 1062 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7005) }, 1063 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CGU_629), 1064 + .driver_info = (kernel_ulong_t)&net_intf5_blacklist }, 1065 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_629S), 1066 + .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, 1067 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CHU_720I), 1068 + .driver_info = (kernel_ulong_t)&net_intf0_blacklist }, 1069 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7212), 1070 + .driver_info = (kernel_ulong_t)&net_intf0_blacklist }, 1071 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7213), 1072 + .driver_info = (kernel_ulong_t)&net_intf0_blacklist }, 1073 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7251), 1074 + .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, 1075 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7252), 1076 + .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, 1077 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_7253), 1078 + .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, 1069 1079 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) }, 1070 1080 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864G) }, 1071 1081 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_DUAL) }, ··· 1568 1500 .driver_info = (kernel_ulong_t)&net_intf5_blacklist }, 1569 1501 { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_L100V), 1570 1502 .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, 1503 + { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_L800MA), 1504 + .driver_info = (kernel_ulong_t)&net_intf2_blacklist }, 1571 1505 { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, 1572 1506 { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) }, 1573 1507 { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14), ··· 1614 1544 { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD145) }, 1615 1545 { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD200), 1616 1546 .driver_info = (kernel_ulong_t)&net_intf6_blacklist 1547 + }, 1548 + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD500), 1549 + .driver_info = (kernel_ulong_t)&net_intf4_blacklist 1617 1550 }, 1618 1551 { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */ 1619 1552 { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/
+9
drivers/usb/serial/qcserial.c
··· 136 136 {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68a2, 0)}, /* Sierra Wireless MC7710 Device Management */ 137 137 {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68a2, 2)}, /* Sierra Wireless MC7710 NMEA */ 138 138 {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68a2, 3)}, /* Sierra Wireless MC7710 Modem */ 139 + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68c0, 0)}, /* Sierra Wireless MC73xx Device Management */ 140 + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68c0, 2)}, /* Sierra Wireless MC73xx NMEA */ 141 + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x68c0, 3)}, /* Sierra Wireless MC73xx Modem */ 139 142 {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901c, 0)}, /* Sierra Wireless EM7700 Device Management */ 140 143 {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901c, 2)}, /* Sierra Wireless EM7700 NMEA */ 141 144 {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901c, 3)}, /* Sierra Wireless EM7700 Modem */ 145 + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901f, 0)}, /* Sierra Wireless EM7355 Device Management */ 146 + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901f, 2)}, /* Sierra Wireless EM7355 NMEA */ 147 + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901f, 3)}, /* Sierra Wireless EM7355 Modem */ 148 + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9041, 0)}, /* Sierra Wireless MC7305/MC7355 Device Management */ 149 + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9041, 2)}, /* Sierra Wireless MC7305/MC7355 NMEA */ 150 + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9041, 3)}, /* Sierra Wireless MC7305/MC7355 Modem */ 142 151 {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 0)}, /* Netgear AirCard 340U Device Management */ 143 152 {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 2)}, /* Netgear AirCard 340U NMEA */ 144 153 {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 3)}, /* Netgear AirCard 340U Modem */
+3 -1
drivers/usb/serial/usb-serial.c
··· 1347 1347 static void usb_serial_deregister(struct usb_serial_driver *device) 1348 1348 { 1349 1349 pr_info("USB Serial deregistering driver %s\n", device->description); 1350 + 1350 1351 mutex_lock(&table_lock); 1351 1352 list_del(&device->driver_list); 1352 - usb_serial_bus_deregister(device); 1353 1353 mutex_unlock(&table_lock); 1354 + 1355 + usb_serial_bus_deregister(device); 1354 1356 } 1355 1357 1356 1358 /**
+1 -1
drivers/usb/wusbcore/mmc.c
··· 301 301 302 302 if (chid) 303 303 result = uwb_radio_start(&wusbhc->pal); 304 - else 304 + else if (wusbhc->uwb_rc) 305 305 uwb_radio_stop(&wusbhc->pal); 306 306 307 307 return result;
+2 -2
drivers/usb/wusbcore/wa-xfer.c
··· 2390 2390 done) { 2391 2391 2392 2392 dev_info(dev, "Control EP stall. Queue delayed work.\n"); 2393 - spin_lock_irq(&wa->xfer_list_lock); 2393 + spin_lock(&wa->xfer_list_lock); 2394 2394 /* move xfer from xfer_list to xfer_errored_list. */ 2395 2395 list_move_tail(&xfer->list_node, &wa->xfer_errored_list); 2396 - spin_unlock_irq(&wa->xfer_list_lock); 2396 + spin_unlock(&wa->xfer_list_lock); 2397 2397 spin_unlock_irqrestore(&xfer->lock, flags); 2398 2398 queue_work(wusbd, &wa->xfer_error_work); 2399 2399 } else {
+5 -4
drivers/uwb/drp.c
··· 59 59 struct uwb_rceb *reply, ssize_t reply_size) 60 60 { 61 61 struct uwb_rc_evt_set_drp_ie *r = (struct uwb_rc_evt_set_drp_ie *)reply; 62 + unsigned long flags; 62 63 63 64 if (r != NULL) { 64 65 if (r->bResultCode != UWB_RC_RES_SUCCESS) ··· 68 67 } else 69 68 dev_err(&rc->uwb_dev.dev, "SET-DRP-IE: timeout\n"); 70 69 71 - spin_lock_irq(&rc->rsvs_lock); 70 + spin_lock_irqsave(&rc->rsvs_lock, flags); 72 71 if (rc->set_drp_ie_pending > 1) { 73 72 rc->set_drp_ie_pending = 0; 74 - uwb_rsv_queue_update(rc); 73 + uwb_rsv_queue_update(rc); 75 74 } else { 76 - rc->set_drp_ie_pending = 0; 75 + rc->set_drp_ie_pending = 0; 77 76 } 78 - spin_unlock_irq(&rc->rsvs_lock); 77 + spin_unlock_irqrestore(&rc->rsvs_lock, flags); 79 78 } 80 79 81 80 /**
+16
include/linux/phy/phy.h
··· 174 174 #else 175 175 static inline int phy_pm_runtime_get(struct phy *phy) 176 176 { 177 + if (!phy) 178 + return 0; 177 179 return -ENOSYS; 178 180 } 179 181 180 182 static inline int phy_pm_runtime_get_sync(struct phy *phy) 181 183 { 184 + if (!phy) 185 + return 0; 182 186 return -ENOSYS; 183 187 } 184 188 185 189 static inline int phy_pm_runtime_put(struct phy *phy) 186 190 { 191 + if (!phy) 192 + return 0; 187 193 return -ENOSYS; 188 194 } 189 195 190 196 static inline int phy_pm_runtime_put_sync(struct phy *phy) 191 197 { 198 + if (!phy) 199 + return 0; 192 200 return -ENOSYS; 193 201 } 194 202 ··· 212 204 213 205 static inline int phy_init(struct phy *phy) 214 206 { 207 + if (!phy) 208 + return 0; 215 209 return -ENOSYS; 216 210 } 217 211 218 212 static inline int phy_exit(struct phy *phy) 219 213 { 214 + if (!phy) 215 + return 0; 220 216 return -ENOSYS; 221 217 } 222 218 223 219 static inline int phy_power_on(struct phy *phy) 224 220 { 221 + if (!phy) 222 + return 0; 225 223 return -ENOSYS; 226 224 } 227 225 228 226 static inline int phy_power_off(struct phy *phy) 229 227 { 228 + if (!phy) 229 + return 0; 230 230 return -ENOSYS; 231 231 } 232 232