Commit 79600d4bba783147758cdb0e636010fbe02a843f
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
Merge tag 'usb-3.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH: "Here is a bunch of USB fixes for 3.19-rc5. Most of these are gadget driver fixes, along with the xhci driver fix that we both reported having problems with, as well as some new device ids and other tiny fixes. All have been in linux-next with no problems" * tag 'usb-3.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (43 commits) usb: dwc3: gadget: Stop TRB preparation after limit is reached usb: dwc3: gadget: Fix TRB preparation during SG usb: phy: mv-usb: fix usb_phy build errors usb: serial: handle -ENODEV quietly in generic_submit_read_urb usb: serial: silence all non-critical read errors USB: console: fix potential use after free USB: console: fix uninitialised ldisc semaphore usb: gadget: udc: atmel: fix possible oops when unloading module usb: gadget: gadgetfs: fix an oops in ep_write() usb: phy: Fix deferred probing OHCI: add a quirk for ULi M5237 blocking on reset uas: Add US_FL_NO_ATA_1X for 2 more Seagate disk enclosures uas: Do not blacklist ASM1153 disk enclosures usb: gadget: udc: avoid dereference before NULL check in ep_queue usb: host: ehci-tegra: request deferred probe when failing to get phy uas: disable UAS on Apricorn SATA dongles uas: Add US_FL_NO_REPORT_OPCODES for JMicron JMS566 with usb-id 0bc2:a013 uas: Add US_FL_NO_ATA_1X for Seagate devices with usb-id 0bc2:a013 xhci: Add broken-streams quirk for Fresco Logic FL1000G xhci controllers USB: EHCI: adjust error return code ...
Showing 36 changed files Side-by-side Diff
- drivers/phy/phy-miphy28lp.c
- drivers/phy/phy-omap-control.c
- drivers/phy/phy-sun4i-usb.c
- drivers/phy/phy-ti-pipe3.c
- drivers/usb/chipidea/core.c
- drivers/usb/chipidea/host.c
- drivers/usb/dwc2/gadget.c
- drivers/usb/dwc3/dwc3-pci.c
- drivers/usb/dwc3/gadget.c
- drivers/usb/gadget/function/f_hid.c
- drivers/usb/gadget/function/f_midi.c
- drivers/usb/gadget/function/f_uac1.c
- drivers/usb/gadget/legacy/inode.c
- drivers/usb/gadget/udc/atmel_usba_udc.c
- drivers/usb/gadget/udc/bdc/bdc_ep.c
- drivers/usb/host/ehci-sched.c
- drivers/usb/host/ehci-tegra.c
- drivers/usb/host/pci-quirks.c
- drivers/usb/host/xhci-pci.c
- drivers/usb/host/xhci.c
- drivers/usb/musb/Kconfig
- drivers/usb/musb/blackfin.c
- drivers/usb/musb/musb_cppi41.c
- drivers/usb/musb/musb_debugfs.c
- drivers/usb/musb/musb_host.c
- drivers/usb/phy/phy-mv-usb.c
- drivers/usb/phy/phy.c
- drivers/usb/serial/console.c
- drivers/usb/serial/cp210x.c
- drivers/usb/serial/generic.c
- drivers/usb/serial/keyspan.c
- drivers/usb/serial/option.c
- drivers/usb/serial/qcserial.c
- drivers/usb/storage/uas-detect.h
- drivers/usb/storage/unusual_uas.h
- include/linux/phy/omap_control_phy.h
drivers/phy/phy-miphy28lp.c
drivers/phy/phy-omap-control.c
... | ... | @@ -29,10 +29,9 @@ |
29 | 29 | /** |
30 | 30 | * omap_control_pcie_pcs - set the PCS delay count |
31 | 31 | * @dev: the control module device |
32 | - * @id: index of the pcie PHY (should be 1 or 2) | |
33 | 32 | * @delay: 8 bit delay value |
34 | 33 | */ |
35 | -void omap_control_pcie_pcs(struct device *dev, u8 id, u8 delay) | |
34 | +void omap_control_pcie_pcs(struct device *dev, u8 delay) | |
36 | 35 | { |
37 | 36 | u32 val; |
38 | 37 | struct omap_control_phy *control_phy; |
... | ... | @@ -55,8 +54,8 @@ |
55 | 54 | |
56 | 55 | val = readl(control_phy->pcie_pcs); |
57 | 56 | val &= ~(OMAP_CTRL_PCIE_PCS_MASK << |
58 | - (id * OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT)); | |
59 | - val |= delay << (id * OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT); | |
57 | + OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT); | |
58 | + val |= (delay << OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT); | |
60 | 59 | writel(val, control_phy->pcie_pcs); |
61 | 60 | } |
62 | 61 | EXPORT_SYMBOL_GPL(omap_control_pcie_pcs); |
drivers/phy/phy-sun4i-usb.c
... | ... | @@ -244,7 +244,8 @@ |
244 | 244 | else |
245 | 245 | data->num_phys = 3; |
246 | 246 | |
247 | - if (of_device_is_compatible(np, "allwinner,sun4i-a10-usb-phy")) | |
247 | + if (of_device_is_compatible(np, "allwinner,sun4i-a10-usb-phy") || | |
248 | + of_device_is_compatible(np, "allwinner,sun6i-a31-usb-phy")) | |
248 | 249 | data->disc_thresh = 3; |
249 | 250 | else |
250 | 251 | data->disc_thresh = 2; |
drivers/phy/phy-ti-pipe3.c
... | ... | @@ -82,7 +82,6 @@ |
82 | 82 | struct clk *refclk; |
83 | 83 | struct clk *div_clk; |
84 | 84 | struct pipe3_dpll_map *dpll_map; |
85 | - u8 id; | |
86 | 85 | }; |
87 | 86 | |
88 | 87 | static struct pipe3_dpll_map dpll_map_usb[] = { |
89 | 88 | |
... | ... | @@ -217,8 +216,13 @@ |
217 | 216 | u32 val; |
218 | 217 | int ret = 0; |
219 | 218 | |
219 | + /* | |
220 | + * Set pcie_pcs register to 0x96 for proper functioning of phy | |
221 | + * as recommended in AM572x TRM SPRUHZ6, section 18.5.2.2, table | |
222 | + * 18-1804. | |
223 | + */ | |
220 | 224 | if (of_device_is_compatible(phy->dev->of_node, "ti,phy-pipe3-pcie")) { |
221 | - omap_control_pcie_pcs(phy->control_dev, phy->id, 0xF1); | |
225 | + omap_control_pcie_pcs(phy->control_dev, 0x96); | |
222 | 226 | return 0; |
223 | 227 | } |
224 | 228 | |
... | ... | @@ -347,8 +351,6 @@ |
347 | 351 | } |
348 | 352 | |
349 | 353 | if (of_device_is_compatible(node, "ti,phy-pipe3-pcie")) { |
350 | - if (of_property_read_u8(node, "id", &phy->id) < 0) | |
351 | - phy->id = 1; | |
352 | 354 | |
353 | 355 | clk = devm_clk_get(phy->dev, "dpll_ref"); |
354 | 356 | if (IS_ERR(clk)) { |
drivers/usb/chipidea/core.c
... | ... | @@ -669,7 +669,6 @@ |
669 | 669 | if (!ci) |
670 | 670 | return -ENOMEM; |
671 | 671 | |
672 | - platform_set_drvdata(pdev, ci); | |
673 | 672 | ci->dev = dev; |
674 | 673 | ci->platdata = dev_get_platdata(dev); |
675 | 674 | ci->imx28_write_fix = !!(ci->platdata->flags & |
... | ... | @@ -783,6 +782,7 @@ |
783 | 782 | } |
784 | 783 | } |
785 | 784 | |
785 | + platform_set_drvdata(pdev, ci); | |
786 | 786 | ret = devm_request_irq(dev, ci->irq, ci_irq, IRQF_SHARED, |
787 | 787 | ci->platdata->name, ci); |
788 | 788 | if (ret) |
drivers/usb/chipidea/host.c
drivers/usb/dwc2/gadget.c
... | ... | @@ -2567,7 +2567,7 @@ |
2567 | 2567 | * s3c_hsotg_ep_disable - disable given endpoint |
2568 | 2568 | * @ep: The endpoint to disable. |
2569 | 2569 | */ |
2570 | -static int s3c_hsotg_ep_disable(struct usb_ep *ep) | |
2570 | +static int s3c_hsotg_ep_disable_force(struct usb_ep *ep, bool force) | |
2571 | 2571 | { |
2572 | 2572 | struct s3c_hsotg_ep *hs_ep = our_ep(ep); |
2573 | 2573 | struct dwc2_hsotg *hsotg = hs_ep->parent; |
... | ... | @@ -2588,7 +2588,7 @@ |
2588 | 2588 | |
2589 | 2589 | spin_lock_irqsave(&hsotg->lock, flags); |
2590 | 2590 | /* terminate all requests with shutdown */ |
2591 | - kill_all_requests(hsotg, hs_ep, -ESHUTDOWN, false); | |
2591 | + kill_all_requests(hsotg, hs_ep, -ESHUTDOWN, force); | |
2592 | 2592 | |
2593 | 2593 | hsotg->fifo_map &= ~(1<<hs_ep->fifo_index); |
2594 | 2594 | hs_ep->fifo_index = 0; |
... | ... | @@ -2609,6 +2609,10 @@ |
2609 | 2609 | return 0; |
2610 | 2610 | } |
2611 | 2611 | |
2612 | +static int s3c_hsotg_ep_disable(struct usb_ep *ep) | |
2613 | +{ | |
2614 | + return s3c_hsotg_ep_disable_force(ep, false); | |
2615 | +} | |
2612 | 2616 | /** |
2613 | 2617 | * on_list - check request is on the given endpoint |
2614 | 2618 | * @ep: The endpoint to check. |
... | ... | @@ -2924,7 +2928,7 @@ |
2924 | 2928 | |
2925 | 2929 | /* all endpoints should be shutdown */ |
2926 | 2930 | for (ep = 1; ep < hsotg->num_of_eps; ep++) |
2927 | - s3c_hsotg_ep_disable(&hsotg->eps[ep].ep); | |
2931 | + s3c_hsotg_ep_disable_force(&hsotg->eps[ep].ep, true); | |
2928 | 2932 | |
2929 | 2933 | spin_lock_irqsave(&hsotg->lock, flags); |
2930 | 2934 |
drivers/usb/dwc3/dwc3-pci.c
... | ... | @@ -33,6 +33,8 @@ |
33 | 33 | #define PCI_DEVICE_ID_INTEL_BYT 0x0f37 |
34 | 34 | #define PCI_DEVICE_ID_INTEL_MRFLD 0x119e |
35 | 35 | #define PCI_DEVICE_ID_INTEL_BSW 0x22B7 |
36 | +#define PCI_DEVICE_ID_INTEL_SPTLP 0x9d30 | |
37 | +#define PCI_DEVICE_ID_INTEL_SPTH 0xa130 | |
36 | 38 | |
37 | 39 | struct dwc3_pci { |
38 | 40 | struct device *dev; |
... | ... | @@ -219,6 +221,8 @@ |
219 | 221 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BSW), }, |
220 | 222 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BYT), }, |
221 | 223 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MRFLD), }, |
224 | + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SPTLP), }, | |
225 | + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SPTH), }, | |
222 | 226 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_NL_USB), }, |
223 | 227 | { } /* Terminating Entry */ |
224 | 228 | }; |
drivers/usb/dwc3/gadget.c
... | ... | @@ -882,8 +882,7 @@ |
882 | 882 | |
883 | 883 | if (i == (request->num_mapped_sgs - 1) || |
884 | 884 | sg_is_last(s)) { |
885 | - if (list_is_last(&req->list, | |
886 | - &dep->request_list)) | |
885 | + if (list_empty(&dep->request_list)) | |
887 | 886 | last_one = true; |
888 | 887 | chain = false; |
889 | 888 | } |
... | ... | @@ -901,6 +900,9 @@ |
901 | 900 | if (last_one) |
902 | 901 | break; |
903 | 902 | } |
903 | + | |
904 | + if (last_one) | |
905 | + break; | |
904 | 906 | } else { |
905 | 907 | dma = req->request.dma; |
906 | 908 | length = req->request.length; |
drivers/usb/gadget/function/f_hid.c
... | ... | @@ -399,8 +399,9 @@ |
399 | 399 | value = __le16_to_cpu(ctrl->wValue); |
400 | 400 | length = __le16_to_cpu(ctrl->wLength); |
401 | 401 | |
402 | - VDBG(cdev, "hid_setup crtl_request : bRequestType:0x%x bRequest:0x%x " | |
403 | - "Value:0x%x\n", ctrl->bRequestType, ctrl->bRequest, value); | |
402 | + VDBG(cdev, | |
403 | + "%s crtl_request : bRequestType:0x%x bRequest:0x%x Value:0x%x\n", | |
404 | + __func__, ctrl->bRequestType, ctrl->bRequest, value); | |
404 | 405 | |
405 | 406 | switch ((ctrl->bRequestType << 8) | ctrl->bRequest) { |
406 | 407 | case ((USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE) << 8 |
drivers/usb/gadget/function/f_midi.c
drivers/usb/gadget/function/f_uac1.c
... | ... | @@ -897,7 +897,6 @@ |
897 | 897 | struct f_uac1_opts *opts; |
898 | 898 | |
899 | 899 | opts = container_of(f, struct f_uac1_opts, func_inst); |
900 | - gaudio_cleanup(opts->card); | |
901 | 900 | if (opts->fn_play_alloc) |
902 | 901 | kfree(opts->fn_play); |
903 | 902 | if (opts->fn_cap_alloc) |
... | ... | @@ -935,6 +934,7 @@ |
935 | 934 | struct f_audio *audio = func_to_audio(f); |
936 | 935 | struct f_uac1_opts *opts; |
937 | 936 | |
937 | + gaudio_cleanup(&audio->card); | |
938 | 938 | opts = container_of(f->fi, struct f_uac1_opts, func_inst); |
939 | 939 | kfree(audio); |
940 | 940 | mutex_lock(&opts->lock); |
drivers/usb/gadget/legacy/inode.c
... | ... | @@ -441,6 +441,7 @@ |
441 | 441 | kbuf = memdup_user(buf, len); |
442 | 442 | if (IS_ERR(kbuf)) { |
443 | 443 | value = PTR_ERR(kbuf); |
444 | + kbuf = NULL; | |
444 | 445 | goto free1; |
445 | 446 | } |
446 | 447 | |
... | ... | @@ -449,6 +450,7 @@ |
449 | 450 | data->name, len, (int) value); |
450 | 451 | free1: |
451 | 452 | mutex_unlock(&data->lock); |
453 | + kfree (kbuf); | |
452 | 454 | return value; |
453 | 455 | } |
454 | 456 |
drivers/usb/gadget/udc/atmel_usba_udc.c
... | ... | @@ -716,10 +716,10 @@ |
716 | 716 | req->using_dma = 1; |
717 | 717 | req->ctrl = USBA_BF(DMA_BUF_LEN, req->req.length) |
718 | 718 | | USBA_DMA_CH_EN | USBA_DMA_END_BUF_IE |
719 | - | USBA_DMA_END_TR_EN | USBA_DMA_END_TR_IE; | |
719 | + | USBA_DMA_END_BUF_EN; | |
720 | 720 | |
721 | - if (ep->is_in) | |
722 | - req->ctrl |= USBA_DMA_END_BUF_EN; | |
721 | + if (!ep->is_in) | |
722 | + req->ctrl |= USBA_DMA_END_TR_EN | USBA_DMA_END_TR_IE; | |
723 | 723 | |
724 | 724 | /* |
725 | 725 | * Add this request to the queue and submit for DMA if |
... | ... | @@ -828,7 +828,7 @@ |
828 | 828 | { |
829 | 829 | struct usba_ep *ep = to_usba_ep(_ep); |
830 | 830 | struct usba_udc *udc = ep->udc; |
831 | - struct usba_request *req = to_usba_req(_req); | |
831 | + struct usba_request *req; | |
832 | 832 | unsigned long flags; |
833 | 833 | u32 status; |
834 | 834 | |
... | ... | @@ -837,6 +837,16 @@ |
837 | 837 | |
838 | 838 | spin_lock_irqsave(&udc->lock, flags); |
839 | 839 | |
840 | + list_for_each_entry(req, &ep->queue, queue) { | |
841 | + if (&req->req == _req) | |
842 | + break; | |
843 | + } | |
844 | + | |
845 | + if (&req->req != _req) { | |
846 | + spin_unlock_irqrestore(&udc->lock, flags); | |
847 | + return -EINVAL; | |
848 | + } | |
849 | + | |
840 | 850 | if (req->using_dma) { |
841 | 851 | /* |
842 | 852 | * If this request is currently being transferred, |
... | ... | @@ -1563,7 +1573,6 @@ |
1563 | 1573 | if ((epstatus & epctrl) & USBA_RX_BK_RDY) { |
1564 | 1574 | DBG(DBG_BUS, "%s: RX data ready\n", ep->ep.name); |
1565 | 1575 | receive_data(ep); |
1566 | - usba_ep_writel(ep, CLR_STA, USBA_RX_BK_RDY); | |
1567 | 1576 | } |
1568 | 1577 | } |
1569 | 1578 |
drivers/usb/gadget/udc/bdc/bdc_ep.c
drivers/usb/host/ehci-sched.c
... | ... | @@ -1581,6 +1581,10 @@ |
1581 | 1581 | else |
1582 | 1582 | next = (now + 2 + 7) & ~0x07; /* full frame cache */ |
1583 | 1583 | |
1584 | + /* If needed, initialize last_iso_frame so that this URB will be seen */ | |
1585 | + if (ehci->isoc_count == 0) | |
1586 | + ehci->last_iso_frame = now >> 3; | |
1587 | + | |
1584 | 1588 | /* |
1585 | 1589 | * Use ehci->last_iso_frame as the base. There can't be any |
1586 | 1590 | * TDs scheduled for earlier than that. |
1587 | 1591 | |
1588 | 1592 | |
... | ... | @@ -1600,11 +1604,11 @@ |
1600 | 1604 | */ |
1601 | 1605 | now2 = (now - base) & (mod - 1); |
1602 | 1606 | |
1603 | - /* Is the schedule already full? */ | |
1607 | + /* Is the schedule about to wrap around? */ | |
1604 | 1608 | if (unlikely(!empty && start < period)) { |
1605 | - ehci_dbg(ehci, "iso sched full %p (%u-%u < %u mod %u)\n", | |
1609 | + ehci_dbg(ehci, "request %p would overflow (%u-%u < %u mod %u)\n", | |
1606 | 1610 | urb, stream->next_uframe, base, period, mod); |
1607 | - status = -ENOSPC; | |
1611 | + status = -EFBIG; | |
1608 | 1612 | goto fail; |
1609 | 1613 | } |
1610 | 1614 | |
... | ... | @@ -1671,10 +1675,6 @@ |
1671 | 1675 | urb->start_frame = start & (mod - 1); |
1672 | 1676 | if (!stream->highspeed) |
1673 | 1677 | urb->start_frame >>= 3; |
1674 | - | |
1675 | - /* Make sure scan_isoc() sees these */ | |
1676 | - if (ehci->isoc_count == 0) | |
1677 | - ehci->last_iso_frame = now >> 3; | |
1678 | 1678 | return status; |
1679 | 1679 | |
1680 | 1680 | fail: |
drivers/usb/host/ehci-tegra.c
drivers/usb/host/pci-quirks.c
... | ... | @@ -567,7 +567,8 @@ |
567 | 567 | { |
568 | 568 | void __iomem *base; |
569 | 569 | u32 control; |
570 | - u32 fminterval; | |
570 | + u32 fminterval = 0; | |
571 | + bool no_fminterval = false; | |
571 | 572 | int cnt; |
572 | 573 | |
573 | 574 | if (!mmio_resource_enabled(pdev, 0)) |
... | ... | @@ -577,6 +578,13 @@ |
577 | 578 | if (base == NULL) |
578 | 579 | return; |
579 | 580 | |
581 | + /* | |
582 | + * ULi M5237 OHCI controller locks the whole system when accessing | |
583 | + * the OHCI_FMINTERVAL offset. | |
584 | + */ | |
585 | + if (pdev->vendor == PCI_VENDOR_ID_AL && pdev->device == 0x5237) | |
586 | + no_fminterval = true; | |
587 | + | |
580 | 588 | control = readl(base + OHCI_CONTROL); |
581 | 589 | |
582 | 590 | /* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */ |
... | ... | @@ -615,7 +623,9 @@ |
615 | 623 | } |
616 | 624 | |
617 | 625 | /* software reset of the controller, preserving HcFmInterval */ |
618 | - fminterval = readl(base + OHCI_FMINTERVAL); | |
626 | + if (!no_fminterval) | |
627 | + fminterval = readl(base + OHCI_FMINTERVAL); | |
628 | + | |
619 | 629 | writel(OHCI_HCR, base + OHCI_CMDSTATUS); |
620 | 630 | |
621 | 631 | /* reset requires max 10 us delay */ |
... | ... | @@ -624,7 +634,9 @@ |
624 | 634 | break; |
625 | 635 | udelay(1); |
626 | 636 | } |
627 | - writel(fminterval, base + OHCI_FMINTERVAL); | |
637 | + | |
638 | + if (!no_fminterval) | |
639 | + writel(fminterval, base + OHCI_FMINTERVAL); | |
628 | 640 | |
629 | 641 | /* Now the controller is safely in SUSPEND and nothing can wake it up */ |
630 | 642 | iounmap(base); |
drivers/usb/host/xhci-pci.c
... | ... | @@ -82,6 +82,8 @@ |
82 | 82 | "must be suspended extra slowly", |
83 | 83 | pdev->revision); |
84 | 84 | } |
85 | + if (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK) | |
86 | + xhci->quirks |= XHCI_BROKEN_STREAMS; | |
85 | 87 | /* Fresco Logic confirms: all revisions of this chip do not |
86 | 88 | * support MSI, even though some of them claim to in their PCI |
87 | 89 | * capabilities. |
drivers/usb/host/xhci.c
... | ... | @@ -3803,6 +3803,15 @@ |
3803 | 3803 | return -EINVAL; |
3804 | 3804 | } |
3805 | 3805 | |
3806 | + if (setup == SETUP_CONTEXT_ONLY) { | |
3807 | + slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->out_ctx); | |
3808 | + if (GET_SLOT_STATE(le32_to_cpu(slot_ctx->dev_state)) == | |
3809 | + SLOT_STATE_DEFAULT) { | |
3810 | + xhci_dbg(xhci, "Slot already in default state\n"); | |
3811 | + return 0; | |
3812 | + } | |
3813 | + } | |
3814 | + | |
3806 | 3815 | command = xhci_alloc_command(xhci, false, false, GFP_KERNEL); |
3807 | 3816 | if (!command) |
3808 | 3817 | return -ENOMEM; |
drivers/usb/musb/Kconfig
... | ... | @@ -72,6 +72,8 @@ |
72 | 72 | |
73 | 73 | config USB_MUSB_TUSB6010 |
74 | 74 | tristate "TUSB6010" |
75 | + depends on ARCH_OMAP2PLUS || COMPILE_TEST | |
76 | + depends on NOP_USB_XCEIV = USB_MUSB_HDRC # both built-in or both modules | |
75 | 77 | |
76 | 78 | config USB_MUSB_OMAP2PLUS |
77 | 79 | tristate "OMAP2430 and onwards" |
... | ... | @@ -85,6 +87,7 @@ |
85 | 87 | config USB_MUSB_DSPS |
86 | 88 | tristate "TI DSPS platforms" |
87 | 89 | select USB_MUSB_AM335X_CHILD |
90 | + depends on ARCH_OMAP2PLUS || COMPILE_TEST | |
88 | 91 | depends on OF_IRQ |
89 | 92 | |
90 | 93 | config USB_MUSB_BLACKFIN |
... | ... | @@ -93,6 +96,7 @@ |
93 | 96 | |
94 | 97 | config USB_MUSB_UX500 |
95 | 98 | tristate "Ux500 platforms" |
99 | + depends on ARCH_U8500 || COMPILE_TEST | |
96 | 100 | |
97 | 101 | config USB_MUSB_JZ4740 |
98 | 102 | tristate "JZ4740" |
drivers/usb/musb/blackfin.c
drivers/usb/musb/musb_cppi41.c
... | ... | @@ -628,9 +628,9 @@ |
628 | 628 | ret = of_property_read_string_index(np, "dma-names", i, &str); |
629 | 629 | if (ret) |
630 | 630 | goto err; |
631 | - if (!strncmp(str, "tx", 2)) | |
631 | + if (strstarts(str, "tx")) | |
632 | 632 | is_tx = 1; |
633 | - else if (!strncmp(str, "rx", 2)) | |
633 | + else if (strstarts(str, "rx")) | |
634 | 634 | is_tx = 0; |
635 | 635 | else { |
636 | 636 | dev_err(dev, "Wrong dmatype %s\n", str); |
drivers/usb/musb/musb_debugfs.c
... | ... | @@ -59,20 +59,12 @@ |
59 | 59 | { "RxMaxPp", MUSB_RXMAXP, 16 }, |
60 | 60 | { "RxCSR", MUSB_RXCSR, 16 }, |
61 | 61 | { "RxCount", MUSB_RXCOUNT, 16 }, |
62 | - { "ConfigData", MUSB_CONFIGDATA,8 }, | |
63 | 62 | { "IntrRxE", MUSB_INTRRXE, 16 }, |
64 | 63 | { "IntrTxE", MUSB_INTRTXE, 16 }, |
65 | 64 | { "IntrUsbE", MUSB_INTRUSBE, 8 }, |
66 | 65 | { "DevCtl", MUSB_DEVCTL, 8 }, |
67 | - { "BabbleCtl", MUSB_BABBLE_CTL,8 }, | |
68 | - { "TxFIFOsz", MUSB_TXFIFOSZ, 8 }, | |
69 | - { "RxFIFOsz", MUSB_RXFIFOSZ, 8 }, | |
70 | - { "TxFIFOadd", MUSB_TXFIFOADD, 16 }, | |
71 | - { "RxFIFOadd", MUSB_RXFIFOADD, 16 }, | |
72 | 66 | { "VControl", 0x68, 32 }, |
73 | 67 | { "HWVers", 0x69, 16 }, |
74 | - { "EPInfo", MUSB_EPINFO, 8 }, | |
75 | - { "RAMInfo", MUSB_RAMINFO, 8 }, | |
76 | 68 | { "LinkInfo", MUSB_LINKINFO, 8 }, |
77 | 69 | { "VPLen", MUSB_VPLEN, 8 }, |
78 | 70 | { "HS_EOF1", MUSB_HS_EOF1, 8 }, |
... | ... | @@ -103,6 +95,16 @@ |
103 | 95 | { "DMA_CNTLch7", 0x274, 16 }, |
104 | 96 | { "DMA_ADDRch7", 0x278, 32 }, |
105 | 97 | { "DMA_COUNTch7", 0x27C, 32 }, |
98 | +#ifndef CONFIG_BLACKFIN | |
99 | + { "ConfigData", MUSB_CONFIGDATA,8 }, | |
100 | + { "BabbleCtl", MUSB_BABBLE_CTL,8 }, | |
101 | + { "TxFIFOsz", MUSB_TXFIFOSZ, 8 }, | |
102 | + { "RxFIFOsz", MUSB_RXFIFOSZ, 8 }, | |
103 | + { "TxFIFOadd", MUSB_TXFIFOADD, 16 }, | |
104 | + { "RxFIFOadd", MUSB_RXFIFOADD, 16 }, | |
105 | + { "EPInfo", MUSB_EPINFO, 8 }, | |
106 | + { "RAMInfo", MUSB_RAMINFO, 8 }, | |
107 | +#endif | |
106 | 108 | { } /* Terminating Entry */ |
107 | 109 | }; |
108 | 110 | |
109 | 111 | |
110 | 112 | |
111 | 113 | |
112 | 114 | |
113 | 115 | |
114 | 116 | |
115 | 117 | |
... | ... | @@ -197,30 +199,30 @@ |
197 | 199 | if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count))) |
198 | 200 | return -EFAULT; |
199 | 201 | |
200 | - if (!strncmp(buf, "force host", 9)) | |
202 | + if (strstarts(buf, "force host")) | |
201 | 203 | test = MUSB_TEST_FORCE_HOST; |
202 | 204 | |
203 | - if (!strncmp(buf, "fifo access", 11)) | |
205 | + if (strstarts(buf, "fifo access")) | |
204 | 206 | test = MUSB_TEST_FIFO_ACCESS; |
205 | 207 | |
206 | - if (!strncmp(buf, "force full-speed", 15)) | |
208 | + if (strstarts(buf, "force full-speed")) | |
207 | 209 | test = MUSB_TEST_FORCE_FS; |
208 | 210 | |
209 | - if (!strncmp(buf, "force high-speed", 15)) | |
211 | + if (strstarts(buf, "force high-speed")) | |
210 | 212 | test = MUSB_TEST_FORCE_HS; |
211 | 213 | |
212 | - if (!strncmp(buf, "test packet", 10)) { | |
214 | + if (strstarts(buf, "test packet")) { | |
213 | 215 | test = MUSB_TEST_PACKET; |
214 | 216 | musb_load_testpacket(musb); |
215 | 217 | } |
216 | 218 | |
217 | - if (!strncmp(buf, "test K", 6)) | |
219 | + if (strstarts(buf, "test K")) | |
218 | 220 | test = MUSB_TEST_K; |
219 | 221 | |
220 | - if (!strncmp(buf, "test J", 6)) | |
222 | + if (strstarts(buf, "test J")) | |
221 | 223 | test = MUSB_TEST_J; |
222 | 224 | |
223 | - if (!strncmp(buf, "test SE0 NAK", 12)) | |
225 | + if (strstarts(buf, "test SE0 NAK")) | |
224 | 226 | test = MUSB_TEST_SE0_NAK; |
225 | 227 | |
226 | 228 | musb_writeb(musb->mregs, MUSB_TESTMODE, test); |
drivers/usb/musb/musb_host.c
drivers/usb/phy/phy-mv-usb.c
... | ... | @@ -338,7 +338,6 @@ |
338 | 338 | static void mv_otg_update_state(struct mv_otg *mvotg) |
339 | 339 | { |
340 | 340 | struct mv_otg_ctrl *otg_ctrl = &mvotg->otg_ctrl; |
341 | - struct usb_phy *phy = &mvotg->phy; | |
342 | 341 | int old_state = mvotg->phy.otg->state; |
343 | 342 | |
344 | 343 | switch (old_state) { |
345 | 344 | |
... | ... | @@ -858,10 +857,10 @@ |
858 | 857 | { |
859 | 858 | struct mv_otg *mvotg = platform_get_drvdata(pdev); |
860 | 859 | |
861 | - if (mvotg->phy.state != OTG_STATE_B_IDLE) { | |
860 | + if (mvotg->phy.otg->state != OTG_STATE_B_IDLE) { | |
862 | 861 | dev_info(&pdev->dev, |
863 | 862 | "OTG state is not B_IDLE, it is %d!\n", |
864 | - mvotg->phy.state); | |
863 | + mvotg->phy.otg->state); | |
865 | 864 | return -EAGAIN; |
866 | 865 | } |
867 | 866 |
drivers/usb/phy/phy.c
... | ... | @@ -34,7 +34,7 @@ |
34 | 34 | return phy; |
35 | 35 | } |
36 | 36 | |
37 | - return ERR_PTR(-ENODEV); | |
37 | + return ERR_PTR(-EPROBE_DEFER); | |
38 | 38 | } |
39 | 39 | |
40 | 40 | static struct usb_phy *__usb_find_phy_dev(struct device *dev, |
... | ... | @@ -59,6 +59,9 @@ |
59 | 59 | { |
60 | 60 | struct usb_phy *phy; |
61 | 61 | |
62 | + if (!of_device_is_available(node)) | |
63 | + return ERR_PTR(-ENODEV); | |
64 | + | |
62 | 65 | list_for_each_entry(phy, &phy_list, head) { |
63 | 66 | if (node != phy->dev->of_node) |
64 | 67 | continue; |
... | ... | @@ -66,7 +69,7 @@ |
66 | 69 | return phy; |
67 | 70 | } |
68 | 71 | |
69 | - return ERR_PTR(-ENODEV); | |
72 | + return ERR_PTR(-EPROBE_DEFER); | |
70 | 73 | } |
71 | 74 | |
72 | 75 | static void devm_usb_phy_release(struct device *dev, void *res) |
73 | 76 | |
... | ... | @@ -190,10 +193,13 @@ |
190 | 193 | spin_lock_irqsave(&phy_lock, flags); |
191 | 194 | |
192 | 195 | phy = __of_usb_find_phy(node); |
193 | - if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) { | |
194 | - if (!IS_ERR(phy)) | |
195 | - phy = ERR_PTR(-EPROBE_DEFER); | |
196 | + if (IS_ERR(phy)) { | |
197 | + devres_free(ptr); | |
198 | + goto err1; | |
199 | + } | |
196 | 200 | |
201 | + if (!try_module_get(phy->dev->driver->owner)) { | |
202 | + phy = ERR_PTR(-ENODEV); | |
197 | 203 | devres_free(ptr); |
198 | 204 | goto err1; |
199 | 205 | } |
drivers/usb/serial/console.c
... | ... | @@ -46,6 +46,8 @@ |
46 | 46 | * ------------------------------------------------------------ |
47 | 47 | */ |
48 | 48 | |
49 | +static const struct tty_operations usb_console_fake_tty_ops = { | |
50 | +}; | |
49 | 51 | |
50 | 52 | /* |
51 | 53 | * The parsing of the command line works exactly like the |
52 | 54 | |
53 | 55 | |
54 | 56 | |
... | ... | @@ -137,13 +139,17 @@ |
137 | 139 | goto reset_open_count; |
138 | 140 | } |
139 | 141 | kref_init(&tty->kref); |
140 | - tty_port_tty_set(&port->port, tty); | |
141 | 142 | tty->driver = usb_serial_tty_driver; |
142 | 143 | tty->index = co->index; |
144 | + init_ldsem(&tty->ldisc_sem); | |
145 | + INIT_LIST_HEAD(&tty->tty_files); | |
146 | + kref_get(&tty->driver->kref); | |
147 | + tty->ops = &usb_console_fake_tty_ops; | |
143 | 148 | if (tty_init_termios(tty)) { |
144 | 149 | retval = -ENOMEM; |
145 | - goto free_tty; | |
150 | + goto put_tty; | |
146 | 151 | } |
152 | + tty_port_tty_set(&port->port, tty); | |
147 | 153 | } |
148 | 154 | |
149 | 155 | /* only call the device specific open if this |
... | ... | @@ -161,7 +167,7 @@ |
161 | 167 | serial->type->set_termios(tty, port, &dummy); |
162 | 168 | |
163 | 169 | tty_port_tty_set(&port->port, NULL); |
164 | - kfree(tty); | |
170 | + tty_kref_put(tty); | |
165 | 171 | } |
166 | 172 | set_bit(ASYNCB_INITIALIZED, &port->port.flags); |
167 | 173 | } |
... | ... | @@ -177,8 +183,8 @@ |
177 | 183 | |
178 | 184 | fail: |
179 | 185 | tty_port_tty_set(&port->port, NULL); |
180 | - free_tty: | |
181 | - kfree(tty); | |
186 | + put_tty: | |
187 | + tty_kref_put(tty); | |
182 | 188 | reset_open_count: |
183 | 189 | port->port.count = 0; |
184 | 190 | usb_autopm_put_interface(serial->interface); |
drivers/usb/serial/cp210x.c
... | ... | @@ -120,10 +120,12 @@ |
120 | 120 | { USB_DEVICE(0x10C4, 0x85F8) }, /* Virtenio Preon32 */ |
121 | 121 | { USB_DEVICE(0x10C4, 0x8664) }, /* AC-Services CAN-IF */ |
122 | 122 | { USB_DEVICE(0x10C4, 0x8665) }, /* AC-Services OBD-IF */ |
123 | - { USB_DEVICE(0x10C4, 0x8875) }, /* CEL MeshConnect USB Stick */ | |
123 | + { USB_DEVICE(0x10C4, 0x8856) }, /* CEL EM357 ZigBee USB Stick - LR */ | |
124 | + { USB_DEVICE(0x10C4, 0x8857) }, /* CEL EM357 ZigBee USB Stick */ | |
124 | 125 | { USB_DEVICE(0x10C4, 0x88A4) }, /* MMB Networks ZigBee USB Device */ |
125 | 126 | { USB_DEVICE(0x10C4, 0x88A5) }, /* Planet Innovation Ingeni ZigBee USB Device */ |
126 | 127 | { USB_DEVICE(0x10C4, 0x8946) }, /* Ketra N1 Wireless Interface */ |
128 | + { USB_DEVICE(0x10C4, 0x8977) }, /* CEL MeshWorks DevKit Device */ | |
127 | 129 | { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ |
128 | 130 | { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ |
129 | 131 | { USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */ |
drivers/usb/serial/generic.c
... | ... | @@ -286,7 +286,7 @@ |
286 | 286 | |
287 | 287 | res = usb_submit_urb(port->read_urbs[index], mem_flags); |
288 | 288 | if (res) { |
289 | - if (res != -EPERM) { | |
289 | + if (res != -EPERM && res != -ENODEV) { | |
290 | 290 | dev_err(&port->dev, |
291 | 291 | "%s - usb_submit_urb failed: %d\n", |
292 | 292 | __func__, res); |
... | ... | @@ -373,7 +373,7 @@ |
373 | 373 | __func__, urb->status); |
374 | 374 | return; |
375 | 375 | default: |
376 | - dev_err(&port->dev, "%s - nonzero urb status: %d\n", | |
376 | + dev_dbg(&port->dev, "%s - nonzero urb status: %d\n", | |
377 | 377 | __func__, urb->status); |
378 | 378 | goto resubmit; |
379 | 379 | } |
drivers/usb/serial/keyspan.c
... | ... | @@ -410,6 +410,8 @@ |
410 | 410 | } |
411 | 411 | port = serial->port[msg->port]; |
412 | 412 | p_priv = usb_get_serial_port_data(port); |
413 | + if (!p_priv) | |
414 | + goto resubmit; | |
413 | 415 | |
414 | 416 | /* Update handshaking pin state information */ |
415 | 417 | old_dcd_state = p_priv->dcd_state; |
... | ... | @@ -420,7 +422,7 @@ |
420 | 422 | |
421 | 423 | if (old_dcd_state != p_priv->dcd_state) |
422 | 424 | tty_port_tty_hangup(&port->port, true); |
423 | - | |
425 | +resubmit: | |
424 | 426 | /* Resubmit urb so we continue receiving */ |
425 | 427 | err = usb_submit_urb(urb, GFP_ATOMIC); |
426 | 428 | if (err != 0) |
... | ... | @@ -527,6 +529,8 @@ |
527 | 529 | } |
528 | 530 | port = serial->port[msg->port]; |
529 | 531 | p_priv = usb_get_serial_port_data(port); |
532 | + if (!p_priv) | |
533 | + goto resubmit; | |
530 | 534 | |
531 | 535 | /* Update handshaking pin state information */ |
532 | 536 | old_dcd_state = p_priv->dcd_state; |
... | ... | @@ -537,7 +541,7 @@ |
537 | 541 | |
538 | 542 | if (old_dcd_state != p_priv->dcd_state && old_dcd_state) |
539 | 543 | tty_port_tty_hangup(&port->port, true); |
540 | - | |
544 | +resubmit: | |
541 | 545 | /* Resubmit urb so we continue receiving */ |
542 | 546 | err = usb_submit_urb(urb, GFP_ATOMIC); |
543 | 547 | if (err != 0) |
... | ... | @@ -607,6 +611,8 @@ |
607 | 611 | } |
608 | 612 | port = serial->port[msg->portNumber]; |
609 | 613 | p_priv = usb_get_serial_port_data(port); |
614 | + if (!p_priv) | |
615 | + goto resubmit; | |
610 | 616 | |
611 | 617 | /* Update handshaking pin state information */ |
612 | 618 | old_dcd_state = p_priv->dcd_state; |
... | ... | @@ -617,7 +623,7 @@ |
617 | 623 | |
618 | 624 | if (old_dcd_state != p_priv->dcd_state && old_dcd_state) |
619 | 625 | tty_port_tty_hangup(&port->port, true); |
620 | - | |
626 | +resubmit: | |
621 | 627 | /* Resubmit urb so we continue receiving */ |
622 | 628 | err = usb_submit_urb(urb, GFP_ATOMIC); |
623 | 629 | if (err != 0) |
... | ... | @@ -855,6 +861,8 @@ |
855 | 861 | |
856 | 862 | port = serial->port[0]; |
857 | 863 | p_priv = usb_get_serial_port_data(port); |
864 | + if (!p_priv) | |
865 | + goto resubmit; | |
858 | 866 | |
859 | 867 | /* Update handshaking pin state information */ |
860 | 868 | old_dcd_state = p_priv->dcd_state; |
... | ... | @@ -865,7 +873,7 @@ |
865 | 873 | |
866 | 874 | if (old_dcd_state != p_priv->dcd_state && old_dcd_state) |
867 | 875 | tty_port_tty_hangup(&port->port, true); |
868 | - | |
876 | +resubmit: | |
869 | 877 | /* Resubmit urb so we continue receiving */ |
870 | 878 | err = usb_submit_urb(urb, GFP_ATOMIC); |
871 | 879 | if (err != 0) |
... | ... | @@ -926,6 +934,8 @@ |
926 | 934 | |
927 | 935 | port = serial->port[msg->port]; |
928 | 936 | p_priv = usb_get_serial_port_data(port); |
937 | + if (!p_priv) | |
938 | + goto resubmit; | |
929 | 939 | |
930 | 940 | /* Update handshaking pin state information */ |
931 | 941 | old_dcd_state = p_priv->dcd_state; |
... | ... | @@ -934,7 +944,7 @@ |
934 | 944 | |
935 | 945 | if (old_dcd_state != p_priv->dcd_state && old_dcd_state) |
936 | 946 | tty_port_tty_hangup(&port->port, true); |
937 | - | |
947 | +resubmit: | |
938 | 948 | /* Resubmit urb so we continue receiving */ |
939 | 949 | err = usb_submit_urb(urb, GFP_ATOMIC); |
940 | 950 | if (err != 0) |
drivers/usb/serial/option.c
... | ... | @@ -234,6 +234,8 @@ |
234 | 234 | |
235 | 235 | #define QUALCOMM_VENDOR_ID 0x05C6 |
236 | 236 | |
237 | +#define SIERRA_VENDOR_ID 0x1199 | |
238 | + | |
237 | 239 | #define CMOTECH_VENDOR_ID 0x16d8 |
238 | 240 | #define CMOTECH_PRODUCT_6001 0x6001 |
239 | 241 | #define CMOTECH_PRODUCT_CMU_300 0x6002 |
... | ... | @@ -512,7 +514,7 @@ |
512 | 514 | OPTION_BLACKLIST_RESERVED_IF = 2 |
513 | 515 | }; |
514 | 516 | |
515 | -#define MAX_BL_NUM 8 | |
517 | +#define MAX_BL_NUM 11 | |
516 | 518 | struct option_blacklist_info { |
517 | 519 | /* bitfield of interface numbers for OPTION_BLACKLIST_SENDSETUP */ |
518 | 520 | const unsigned long sendsetup; |
... | ... | @@ -601,6 +603,11 @@ |
601 | 603 | .reserved = BIT(1) | BIT(5), |
602 | 604 | }; |
603 | 605 | |
606 | +static const struct option_blacklist_info sierra_mc73xx_blacklist = { | |
607 | + .sendsetup = BIT(0) | BIT(2), | |
608 | + .reserved = BIT(8) | BIT(10) | BIT(11), | |
609 | +}; | |
610 | + | |
604 | 611 | static const struct usb_device_id option_ids[] = { |
605 | 612 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, |
606 | 613 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, |
... | ... | @@ -1098,6 +1105,8 @@ |
1098 | 1105 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ |
1099 | 1106 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */ |
1100 | 1107 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */ |
1108 | + { USB_DEVICE_INTERFACE_CLASS(SIERRA_VENDOR_ID, 0x68c0, 0xff), | |
1109 | + .driver_info = (kernel_ulong_t)&sierra_mc73xx_blacklist }, /* MC73xx */ | |
1101 | 1110 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) }, |
1102 | 1111 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) }, |
1103 | 1112 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6003), |
drivers/usb/serial/qcserial.c
... | ... | @@ -142,7 +142,6 @@ |
142 | 142 | {DEVICE_SWI(0x0f3d, 0x68a2)}, /* Sierra Wireless MC7700 */ |
143 | 143 | {DEVICE_SWI(0x114f, 0x68a2)}, /* Sierra Wireless MC7750 */ |
144 | 144 | {DEVICE_SWI(0x1199, 0x68a2)}, /* Sierra Wireless MC7710 */ |
145 | - {DEVICE_SWI(0x1199, 0x68c0)}, /* Sierra Wireless MC73xx */ | |
146 | 145 | {DEVICE_SWI(0x1199, 0x901c)}, /* Sierra Wireless EM7700 */ |
147 | 146 | {DEVICE_SWI(0x1199, 0x901f)}, /* Sierra Wireless EM7355 */ |
148 | 147 | {DEVICE_SWI(0x1199, 0x9040)}, /* Sierra Wireless Modem */ |
drivers/usb/storage/uas-detect.h
... | ... | @@ -69,16 +69,39 @@ |
69 | 69 | return 0; |
70 | 70 | |
71 | 71 | /* |
72 | - * ASM1051 and older ASM1053 devices have the same usb-id, and UAS is | |
73 | - * broken on the ASM1051, use the number of streams to differentiate. | |
74 | - * New ASM1053-s also support 32 streams, but have a different prod-id. | |
72 | + * ASMedia has a number of usb3 to sata bridge chips, at the time of | |
73 | + * this writing the following versions exist: | |
74 | + * ASM1051 - no uas support version | |
75 | + * ASM1051 - with broken (*) uas support | |
76 | + * ASM1053 - with working uas support | |
77 | + * ASM1153 - with working uas support | |
78 | + * | |
79 | + * Devices with these chips re-use a number of device-ids over the | |
80 | + * entire line, so the device-id is useless to determine if we're | |
81 | + * dealing with an ASM1051 (which we want to avoid). | |
82 | + * | |
83 | + * The ASM1153 can be identified by config.MaxPower == 0, | |
84 | + * where as the ASM105x models have config.MaxPower == 36. | |
85 | + * | |
86 | + * Differentiating between the ASM1053 and ASM1051 is trickier, when | |
87 | + * connected over USB-3 we can look at the number of streams supported, | |
88 | + * ASM1051 supports 32 streams, where as early ASM1053 versions support | |
89 | + * 16 streams, newer ASM1053-s also support 32 streams, but have a | |
90 | + * different prod-id. | |
91 | + * | |
92 | + * (*) ASM1051 chips do work with UAS with some disks (with the | |
93 | + * US_FL_NO_REPORT_OPCODES quirk), but are broken with other disks | |
75 | 94 | */ |
76 | 95 | if (le16_to_cpu(udev->descriptor.idVendor) == 0x174c && |
77 | - le16_to_cpu(udev->descriptor.idProduct) == 0x55aa) { | |
78 | - if (udev->speed < USB_SPEED_SUPER) { | |
96 | + (le16_to_cpu(udev->descriptor.idProduct) == 0x5106 || | |
97 | + le16_to_cpu(udev->descriptor.idProduct) == 0x55aa)) { | |
98 | + if (udev->actconfig->desc.bMaxPower == 0) { | |
99 | + /* ASM1153, do nothing */ | |
100 | + } else if (udev->speed < USB_SPEED_SUPER) { | |
79 | 101 | /* No streams info, assume ASM1051 */ |
80 | 102 | flags |= US_FL_IGNORE_UAS; |
81 | 103 | } else if (usb_ss_max_streams(&eps[1]->ss_ep_comp) == 32) { |
104 | + /* Possibly an ASM1051, disable uas */ | |
82 | 105 | flags |= US_FL_IGNORE_UAS; |
83 | 106 | } |
84 | 107 | } |
drivers/usb/storage/unusual_uas.h
... | ... | @@ -40,6 +40,16 @@ |
40 | 40 | * and don't forget to CC: the USB development list <linux-usb@vger.kernel.org> |
41 | 41 | */ |
42 | 42 | |
43 | +/* | |
44 | + * Apricorn USB3 dongle sometimes returns "USBSUSBSUSBS" in response to SCSI | |
45 | + * commands in UAS mode. Observed with the 1.28 firmware; are there others? | |
46 | + */ | |
47 | +UNUSUAL_DEV(0x0984, 0x0301, 0x0128, 0x0128, | |
48 | + "Apricorn", | |
49 | + "", | |
50 | + USB_SC_DEVICE, USB_PR_DEVICE, NULL, | |
51 | + US_FL_IGNORE_UAS), | |
52 | + | |
43 | 53 | /* https://bugzilla.kernel.org/show_bug.cgi?id=79511 */ |
44 | 54 | UNUSUAL_DEV(0x0bc2, 0x2312, 0x0000, 0x9999, |
45 | 55 | "Seagate", |
... | ... | @@ -68,6 +78,20 @@ |
68 | 78 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
69 | 79 | US_FL_NO_ATA_1X), |
70 | 80 | |
81 | +/* Reported-by: Marcin Zajฤ czkowski <mszpak@wp.pl> */ | |
82 | +UNUSUAL_DEV(0x0bc2, 0xa013, 0x0000, 0x9999, | |
83 | + "Seagate", | |
84 | + "Backup Plus", | |
85 | + USB_SC_DEVICE, USB_PR_DEVICE, NULL, | |
86 | + US_FL_NO_ATA_1X), | |
87 | + | |
88 | +/* Reported-by: Hans de Goede <hdegoede@redhat.com> */ | |
89 | +UNUSUAL_DEV(0x0bc2, 0xa0a4, 0x0000, 0x9999, | |
90 | + "Seagate", | |
91 | + "Backup Plus Desk", | |
92 | + USB_SC_DEVICE, USB_PR_DEVICE, NULL, | |
93 | + US_FL_NO_ATA_1X), | |
94 | + | |
71 | 95 | /* https://bbs.archlinux.org/viewtopic.php?id=183190 */ |
72 | 96 | UNUSUAL_DEV(0x0bc2, 0xab20, 0x0000, 0x9999, |
73 | 97 | "Seagate", |
... | ... | @@ -82,6 +106,13 @@ |
82 | 106 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
83 | 107 | US_FL_NO_ATA_1X), |
84 | 108 | |
109 | +/* Reported-by: G. Richard Bellamy <rbellamy@pteradigm.com> */ | |
110 | +UNUSUAL_DEV(0x0bc2, 0xab2a, 0x0000, 0x9999, | |
111 | + "Seagate", | |
112 | + "BUP Fast HDD", | |
113 | + USB_SC_DEVICE, USB_PR_DEVICE, NULL, | |
114 | + US_FL_NO_ATA_1X), | |
115 | + | |
85 | 116 | /* Reported-by: Claudio Bizzarri <claudio.bizzarri@gmail.com> */ |
86 | 117 | UNUSUAL_DEV(0x152d, 0x0567, 0x0000, 0x9999, |
87 | 118 | "JMicron", |
88 | 119 | |
89 | 120 | |
... | ... | @@ -89,20 +120,19 @@ |
89 | 120 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
90 | 121 | US_FL_NO_REPORT_OPCODES), |
91 | 122 | |
92 | -/* Most ASM1051 based devices have issues with uas, blacklist them all */ | |
93 | 123 | /* Reported-by: Hans de Goede <hdegoede@redhat.com> */ |
94 | -UNUSUAL_DEV(0x174c, 0x5106, 0x0000, 0x9999, | |
95 | - "ASMedia", | |
96 | - "ASM1051", | |
97 | - USB_SC_DEVICE, USB_PR_DEVICE, NULL, | |
98 | - US_FL_IGNORE_UAS), | |
99 | - | |
100 | -/* Reported-by: Hans de Goede <hdegoede@redhat.com> */ | |
101 | 124 | UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999, |
102 | 125 | "VIA", |
103 | 126 | "VL711", |
104 | 127 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
105 | 128 | US_FL_NO_ATA_1X), |
129 | + | |
130 | +/* Reported-by: Takeo Nakayama <javhera@gmx.com> */ | |
131 | +UNUSUAL_DEV(0x357d, 0x7788, 0x0000, 0x9999, | |
132 | + "JMicron", | |
133 | + "JMS566", | |
134 | + USB_SC_DEVICE, USB_PR_DEVICE, NULL, | |
135 | + US_FL_NO_REPORT_OPCODES), | |
106 | 136 | |
107 | 137 | /* Reported-by: Hans de Goede <hdegoede@redhat.com> */ |
108 | 138 | UNUSUAL_DEV(0x4971, 0x1012, 0x0000, 0x9999, |
include/linux/phy/omap_control_phy.h
... | ... | @@ -66,7 +66,7 @@ |
66 | 66 | #define OMAP_CTRL_PIPE3_PHY_TX_RX_POWEROFF 0x0 |
67 | 67 | |
68 | 68 | #define OMAP_CTRL_PCIE_PCS_MASK 0xff |
69 | -#define OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT 0x8 | |
69 | +#define OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT 16 | |
70 | 70 | |
71 | 71 | #define OMAP_CTRL_USB2_PHY_PD BIT(28) |
72 | 72 | |
... | ... | @@ -79,7 +79,7 @@ |
79 | 79 | void omap_control_phy_power(struct device *dev, int on); |
80 | 80 | void omap_control_usb_set_mode(struct device *dev, |
81 | 81 | enum omap_control_usb_mode mode); |
82 | -void omap_control_pcie_pcs(struct device *dev, u8 id, u8 delay); | |
82 | +void omap_control_pcie_pcs(struct device *dev, u8 delay); | |
83 | 83 | #else |
84 | 84 | |
85 | 85 | static inline void omap_control_phy_power(struct device *dev, int on) |
... | ... | @@ -91,7 +91,7 @@ |
91 | 91 | { |
92 | 92 | } |
93 | 93 | |
94 | -static inline void omap_control_pcie_pcs(struct device *dev, u8 id, u8 delay) | |
94 | +static inline void omap_control_pcie_pcs(struct device *dev, u8 delay) | |
95 | 95 | { |
96 | 96 | } |
97 | 97 | #endif |