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.14-rc3' 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.14-rc3. Most of these are xhci
reverts, fixing a bunch of reported issues with USB 3 host controller
issues that loads of people have been hitting (with the exception of
kernel developers, all of our machines seem to be working fine, which
is why these took so long to get resolved...)

There are some other minor fixes and new device ids, as ususal. All
have been in linux-next successfully"

* tag 'usb-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (22 commits)
usb: option: blacklist ZTE MF667 net interface
Revert "usb: xhci: Link TRB must not occur within a USB payload burst"
Revert "xhci: Avoid infinite loop when sg urb requires too many trbs"
Revert "xhci: Set scatter-gather limit to avoid failed block writes."
xhci 1.0: Limit arbitrarily-aligned scatter gather.
Modpost: fixed USB alias generation for ranges including 0x9 and 0xA
usb: core: Fix potential memory leak adding dyn USBdevice IDs
USB: ftdi_sio: add Tagsys RFID Reader IDs
usb: qcserial: add Netgear Aircard 340U
usb-storage: enable multi-LUN scanning when needed
USB: simple: add Dynastream ANT USB-m Stick device support
usb-storage: add unusual-devs entry for BlackBerry 9000
usb-storage: restrict bcdDevice range for Super Top in Cypress ATACB
usb: phy: move some error messages to debug
usb: ftdi_sio: add Mindstorms EV3 console adapter
usb: dwc2: fix memory corruption in dwc2 driver
usb: dwc2: fix role switch breakage
usb: dwc2: bail out early when booting with "nousb"
Revert "xhci: replace xhci_read_64() with readq()"
Revert "xhci: replace xhci_write_64() with writeq()"
...

+138 -135
+17 -7
drivers/usb/core/driver.c
··· 63 63 dynid->id.idProduct = idProduct; 64 64 dynid->id.match_flags = USB_DEVICE_ID_MATCH_DEVICE; 65 65 if (fields > 2 && bInterfaceClass) { 66 - if (bInterfaceClass > 255) 67 - return -EINVAL; 66 + if (bInterfaceClass > 255) { 67 + retval = -EINVAL; 68 + goto fail; 69 + } 68 70 69 71 dynid->id.bInterfaceClass = (u8)bInterfaceClass; 70 72 dynid->id.match_flags |= USB_DEVICE_ID_MATCH_INT_CLASS; ··· 75 73 if (fields > 4) { 76 74 const struct usb_device_id *id = id_table; 77 75 78 - if (!id) 79 - return -ENODEV; 76 + if (!id) { 77 + retval = -ENODEV; 78 + goto fail; 79 + } 80 80 81 81 for (; id->match_flags; id++) 82 82 if (id->idVendor == refVendor && id->idProduct == refProduct) 83 83 break; 84 84 85 - if (id->match_flags) 85 + if (id->match_flags) { 86 86 dynid->id.driver_info = id->driver_info; 87 - else 88 - return -ENODEV; 87 + } else { 88 + retval = -ENODEV; 89 + goto fail; 90 + } 89 91 } 90 92 91 93 spin_lock(&dynids->lock); ··· 101 95 if (retval) 102 96 return retval; 103 97 return count; 98 + 99 + fail: 100 + kfree(dynid); 101 + return retval; 104 102 } 105 103 EXPORT_SYMBOL_GPL(usb_store_new_id); 106 104
-1
drivers/usb/core/hcd.c
··· 1032 1032 dev_name(&usb_dev->dev), retval); 1033 1033 return retval; 1034 1034 } 1035 - usb_dev->lpm_capable = usb_device_supports_lpm(usb_dev); 1036 1035 } 1037 1036 1038 1037 retval = usb_new_device (usb_dev);
+1 -6
drivers/usb/core/hub.c
··· 128 128 return usb_get_intfdata(hdev->actconfig->interface[0]); 129 129 } 130 130 131 - int usb_device_supports_lpm(struct usb_device *udev) 131 + static int usb_device_supports_lpm(struct usb_device *udev) 132 132 { 133 133 /* USB 2.1 (and greater) devices indicate LPM support through 134 134 * their USB 2.0 Extended Capabilities BOS descriptor. ··· 149 149 "Power management will be impacted.\n"); 150 150 return 0; 151 151 } 152 - 153 - /* udev is root hub */ 154 - if (!udev->parent) 155 - return 1; 156 - 157 152 if (udev->parent->lpm_capable) 158 153 return 1; 159 154
-1
drivers/usb/core/usb.h
··· 35 35 unsigned int size); 36 36 extern int usb_get_bos_descriptor(struct usb_device *dev); 37 37 extern void usb_release_bos_descriptor(struct usb_device *dev); 38 - extern int usb_device_supports_lpm(struct usb_device *udev); 39 38 extern char *usb_cache_string(struct usb_device *udev, int index); 40 39 extern int usb_set_configuration(struct usb_device *dev, int configuration); 41 40 extern int usb_choose_configuration(struct usb_device *udev);
+1 -1
drivers/usb/dwc2/core.c
··· 216 216 int retval = 0; 217 217 218 218 if (!select_phy) 219 - return -ENODEV; 219 + return 0; 220 220 221 221 usbcfg = readl(hsotg->regs + GUSBCFG); 222 222
-11
drivers/usb/dwc2/hcd.c
··· 2565 2565 struct usb_host_endpoint *ep) 2566 2566 { 2567 2567 struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); 2568 - int is_control = usb_endpoint_xfer_control(&ep->desc); 2569 - int is_out = usb_endpoint_dir_out(&ep->desc); 2570 - int epnum = usb_endpoint_num(&ep->desc); 2571 - struct usb_device *udev; 2572 2568 unsigned long flags; 2573 2569 2574 2570 dev_dbg(hsotg->dev, 2575 2571 "DWC OTG HCD EP RESET: bEndpointAddress=0x%02x\n", 2576 2572 ep->desc.bEndpointAddress); 2577 2573 2578 - udev = to_usb_device(hsotg->dev); 2579 - 2580 2574 spin_lock_irqsave(&hsotg->lock, flags); 2581 - 2582 - usb_settoggle(udev, epnum, is_out, 0); 2583 - if (is_control) 2584 - usb_settoggle(udev, epnum, !is_out, 0); 2585 2575 dwc2_hcd_endpoint_reset(hsotg, ep); 2586 - 2587 2576 spin_unlock_irqrestore(&hsotg->lock, flags); 2588 2577 } 2589 2578
+3
drivers/usb/dwc2/platform.c
··· 124 124 int retval; 125 125 int irq; 126 126 127 + if (usb_disabled()) 128 + return -ENODEV; 129 + 127 130 match = of_match_device(dwc2_of_match_table, &dev->dev); 128 131 if (match && match->data) { 129 132 params = match->data;
+3 -3
drivers/usb/host/xhci-dbg.c
··· 203 203 addr, (unsigned int)temp); 204 204 205 205 addr = &ir_set->erst_base; 206 - temp_64 = readq(addr); 206 + temp_64 = xhci_read_64(xhci, addr); 207 207 xhci_dbg(xhci, " %p: ir_set.erst_base = @%08llx\n", 208 208 addr, temp_64); 209 209 210 210 addr = &ir_set->erst_dequeue; 211 - temp_64 = readq(addr); 211 + temp_64 = xhci_read_64(xhci, addr); 212 212 xhci_dbg(xhci, " %p: ir_set.erst_dequeue = @%08llx\n", 213 213 addr, temp_64); 214 214 } ··· 412 412 { 413 413 u64 val; 414 414 415 - val = readq(&xhci->op_regs->cmd_ring); 415 + val = xhci_read_64(xhci, &xhci->op_regs->cmd_ring); 416 416 xhci_dbg(xhci, "// xHC command ring deq ptr low bits + flags = @%08x\n", 417 417 lower_32_bits(val)); 418 418 xhci_dbg(xhci, "// xHC command ring deq ptr high bits = @%08x\n",
+7 -7
drivers/usb/host/xhci-mem.c
··· 1958 1958 xhci_warn(xhci, "WARN something wrong with SW event ring " 1959 1959 "dequeue ptr.\n"); 1960 1960 /* Update HC event ring dequeue pointer */ 1961 - temp = readq(&xhci->ir_set->erst_dequeue); 1961 + temp = xhci_read_64(xhci, &xhci->ir_set->erst_dequeue); 1962 1962 temp &= ERST_PTR_MASK; 1963 1963 /* Don't clear the EHB bit (which is RW1C) because 1964 1964 * there might be more events to service. ··· 1967 1967 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 1968 1968 "// Write event ring dequeue pointer, " 1969 1969 "preserving EHB bit"); 1970 - writeq(((u64) deq & (u64) ~ERST_PTR_MASK) | temp, 1970 + xhci_write_64(xhci, ((u64) deq & (u64) ~ERST_PTR_MASK) | temp, 1971 1971 &xhci->ir_set->erst_dequeue); 1972 1972 } 1973 1973 ··· 2269 2269 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 2270 2270 "// Device context base array address = 0x%llx (DMA), %p (virt)", 2271 2271 (unsigned long long)xhci->dcbaa->dma, xhci->dcbaa); 2272 - writeq(dma, &xhci->op_regs->dcbaa_ptr); 2272 + xhci_write_64(xhci, dma, &xhci->op_regs->dcbaa_ptr); 2273 2273 2274 2274 /* 2275 2275 * Initialize the ring segment pool. The ring must be a contiguous ··· 2312 2312 (unsigned long long)xhci->cmd_ring->first_seg->dma); 2313 2313 2314 2314 /* Set the address in the Command Ring Control register */ 2315 - val_64 = readq(&xhci->op_regs->cmd_ring); 2315 + val_64 = xhci_read_64(xhci, &xhci->op_regs->cmd_ring); 2316 2316 val_64 = (val_64 & (u64) CMD_RING_RSVD_BITS) | 2317 2317 (xhci->cmd_ring->first_seg->dma & (u64) ~CMD_RING_RSVD_BITS) | 2318 2318 xhci->cmd_ring->cycle_state; 2319 2319 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 2320 2320 "// Setting command ring address to 0x%x", val); 2321 - writeq(val_64, &xhci->op_regs->cmd_ring); 2321 + xhci_write_64(xhci, val_64, &xhci->op_regs->cmd_ring); 2322 2322 xhci_dbg_cmd_ptrs(xhci); 2323 2323 2324 2324 xhci->lpm_command = xhci_alloc_command(xhci, true, true, flags); ··· 2396 2396 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 2397 2397 "// Set ERST base address for ir_set 0 = 0x%llx", 2398 2398 (unsigned long long)xhci->erst.erst_dma_addr); 2399 - val_64 = readq(&xhci->ir_set->erst_base); 2399 + val_64 = xhci_read_64(xhci, &xhci->ir_set->erst_base); 2400 2400 val_64 &= ERST_PTR_MASK; 2401 2401 val_64 |= (xhci->erst.erst_dma_addr & (u64) ~ERST_PTR_MASK); 2402 - writeq(val_64, &xhci->ir_set->erst_base); 2402 + xhci_write_64(xhci, val_64, &xhci->ir_set->erst_base); 2403 2403 2404 2404 /* Set the event ring dequeue address */ 2405 2405 xhci_set_hc_event_deq(xhci);
+5
drivers/usb/host/xhci-pci.c
··· 142 142 "QUIRK: Resetting on resume"); 143 143 xhci->quirks |= XHCI_TRUST_TX_LENGTH; 144 144 } 145 + if (pdev->vendor == PCI_VENDOR_ID_RENESAS && 146 + pdev->device == 0x0015 && 147 + pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG && 148 + pdev->subsystem_device == 0xc0cd) 149 + xhci->quirks |= XHCI_RESET_ON_RESUME; 145 150 if (pdev->vendor == PCI_VENDOR_ID_VIA) 146 151 xhci->quirks |= XHCI_RESET_ON_RESUME; 147 152 }
+10 -58
drivers/usb/host/xhci-ring.c
··· 307 307 return 0; 308 308 } 309 309 310 - temp_64 = readq(&xhci->op_regs->cmd_ring); 310 + temp_64 = xhci_read_64(xhci, &xhci->op_regs->cmd_ring); 311 311 if (!(temp_64 & CMD_RING_RUNNING)) { 312 312 xhci_dbg(xhci, "Command ring had been stopped\n"); 313 313 return 0; 314 314 } 315 315 xhci->cmd_ring_state = CMD_RING_STATE_ABORTED; 316 - writeq(temp_64 | CMD_RING_ABORT, &xhci->op_regs->cmd_ring); 316 + xhci_write_64(xhci, temp_64 | CMD_RING_ABORT, 317 + &xhci->op_regs->cmd_ring); 317 318 318 319 /* Section 4.6.1.2 of xHCI 1.0 spec says software should 319 320 * time the completion od all xHCI commands, including ··· 2865 2864 /* Clear the event handler busy flag (RW1C); 2866 2865 * the event ring should be empty. 2867 2866 */ 2868 - temp_64 = readq(&xhci->ir_set->erst_dequeue); 2869 - writeq(temp_64 | ERST_EHB, &xhci->ir_set->erst_dequeue); 2867 + temp_64 = xhci_read_64(xhci, &xhci->ir_set->erst_dequeue); 2868 + xhci_write_64(xhci, temp_64 | ERST_EHB, 2869 + &xhci->ir_set->erst_dequeue); 2870 2870 spin_unlock(&xhci->lock); 2871 2871 2872 2872 return IRQ_HANDLED; ··· 2879 2877 */ 2880 2878 while (xhci_handle_event(xhci) > 0) {} 2881 2879 2882 - temp_64 = readq(&xhci->ir_set->erst_dequeue); 2880 + temp_64 = xhci_read_64(xhci, &xhci->ir_set->erst_dequeue); 2883 2881 /* If necessary, update the HW's version of the event ring deq ptr. */ 2884 2882 if (event_ring_deq != xhci->event_ring->dequeue) { 2885 2883 deq = xhci_trb_virt_to_dma(xhci->event_ring->deq_seg, ··· 2894 2892 2895 2893 /* Clear the event handler busy flag (RW1C); event ring is empty. */ 2896 2894 temp_64 |= ERST_EHB; 2897 - writeq(temp_64, &xhci->ir_set->erst_dequeue); 2895 + xhci_write_64(xhci, temp_64, &xhci->ir_set->erst_dequeue); 2898 2896 2899 2897 spin_unlock(&xhci->lock); 2900 2898 ··· 2967 2965 } 2968 2966 2969 2967 while (1) { 2970 - if (room_on_ring(xhci, ep_ring, num_trbs)) { 2971 - union xhci_trb *trb = ep_ring->enqueue; 2972 - unsigned int usable = ep_ring->enq_seg->trbs + 2973 - TRBS_PER_SEGMENT - 1 - trb; 2974 - u32 nop_cmd; 2975 - 2976 - /* 2977 - * Section 4.11.7.1 TD Fragments states that a link 2978 - * TRB must only occur at the boundary between 2979 - * data bursts (eg 512 bytes for 480M). 2980 - * While it is possible to split a large fragment 2981 - * we don't know the size yet. 2982 - * Simplest solution is to fill the trb before the 2983 - * LINK with nop commands. 2984 - */ 2985 - if (num_trbs == 1 || num_trbs <= usable || usable == 0) 2986 - break; 2987 - 2988 - if (ep_ring->type != TYPE_BULK) 2989 - /* 2990 - * While isoc transfers might have a buffer that 2991 - * crosses a 64k boundary it is unlikely. 2992 - * Since we can't add NOPs without generating 2993 - * gaps in the traffic just hope it never 2994 - * happens at the end of the ring. 2995 - * This could be fixed by writing a LINK TRB 2996 - * instead of the first NOP - however the 2997 - * TRB_TYPE_LINK_LE32() calls would all need 2998 - * changing to check the ring length. 2999 - */ 3000 - break; 3001 - 3002 - if (num_trbs >= TRBS_PER_SEGMENT) { 3003 - xhci_err(xhci, "Too many fragments %d, max %d\n", 3004 - num_trbs, TRBS_PER_SEGMENT - 1); 3005 - return -EINVAL; 3006 - } 3007 - 3008 - nop_cmd = cpu_to_le32(TRB_TYPE(TRB_TR_NOOP) | 3009 - ep_ring->cycle_state); 3010 - ep_ring->num_trbs_free -= usable; 3011 - do { 3012 - trb->generic.field[0] = 0; 3013 - trb->generic.field[1] = 0; 3014 - trb->generic.field[2] = 0; 3015 - trb->generic.field[3] = nop_cmd; 3016 - trb++; 3017 - } while (--usable); 3018 - ep_ring->enqueue = trb; 3019 - if (room_on_ring(xhci, ep_ring, num_trbs)) 3020 - break; 3021 - } 2968 + if (room_on_ring(xhci, ep_ring, num_trbs)) 2969 + break; 3022 2970 3023 2971 if (ep_ring == xhci->cmd_ring) { 3024 2972 xhci_err(xhci, "Do not support expand command ring\n");
+23 -15
drivers/usb/host/xhci.c
··· 611 611 xhci_dbg(xhci, "Event ring:\n"); 612 612 xhci_debug_ring(xhci, xhci->event_ring); 613 613 xhci_dbg_ring_ptrs(xhci, xhci->event_ring); 614 - temp_64 = readq(&xhci->ir_set->erst_dequeue); 614 + temp_64 = xhci_read_64(xhci, &xhci->ir_set->erst_dequeue); 615 615 temp_64 &= ~ERST_PTR_MASK; 616 616 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 617 617 "ERST deq = 64'h%0lx", (long unsigned int) temp_64); ··· 756 756 { 757 757 xhci->s3.command = readl(&xhci->op_regs->command); 758 758 xhci->s3.dev_nt = readl(&xhci->op_regs->dev_notification); 759 - xhci->s3.dcbaa_ptr = readq(&xhci->op_regs->dcbaa_ptr); 759 + xhci->s3.dcbaa_ptr = xhci_read_64(xhci, &xhci->op_regs->dcbaa_ptr); 760 760 xhci->s3.config_reg = readl(&xhci->op_regs->config_reg); 761 761 xhci->s3.erst_size = readl(&xhci->ir_set->erst_size); 762 - xhci->s3.erst_base = readq(&xhci->ir_set->erst_base); 763 - xhci->s3.erst_dequeue = readq(&xhci->ir_set->erst_dequeue); 762 + xhci->s3.erst_base = xhci_read_64(xhci, &xhci->ir_set->erst_base); 763 + xhci->s3.erst_dequeue = xhci_read_64(xhci, &xhci->ir_set->erst_dequeue); 764 764 xhci->s3.irq_pending = readl(&xhci->ir_set->irq_pending); 765 765 xhci->s3.irq_control = readl(&xhci->ir_set->irq_control); 766 766 } ··· 769 769 { 770 770 writel(xhci->s3.command, &xhci->op_regs->command); 771 771 writel(xhci->s3.dev_nt, &xhci->op_regs->dev_notification); 772 - writeq(xhci->s3.dcbaa_ptr, &xhci->op_regs->dcbaa_ptr); 772 + xhci_write_64(xhci, xhci->s3.dcbaa_ptr, &xhci->op_regs->dcbaa_ptr); 773 773 writel(xhci->s3.config_reg, &xhci->op_regs->config_reg); 774 774 writel(xhci->s3.erst_size, &xhci->ir_set->erst_size); 775 - writeq(xhci->s3.erst_base, &xhci->ir_set->erst_base); 776 - writeq(xhci->s3.erst_dequeue, &xhci->ir_set->erst_dequeue); 775 + xhci_write_64(xhci, xhci->s3.erst_base, &xhci->ir_set->erst_base); 776 + xhci_write_64(xhci, xhci->s3.erst_dequeue, &xhci->ir_set->erst_dequeue); 777 777 writel(xhci->s3.irq_pending, &xhci->ir_set->irq_pending); 778 778 writel(xhci->s3.irq_control, &xhci->ir_set->irq_control); 779 779 } ··· 783 783 u64 val_64; 784 784 785 785 /* step 2: initialize command ring buffer */ 786 - val_64 = readq(&xhci->op_regs->cmd_ring); 786 + val_64 = xhci_read_64(xhci, &xhci->op_regs->cmd_ring); 787 787 val_64 = (val_64 & (u64) CMD_RING_RSVD_BITS) | 788 788 (xhci_trb_virt_to_dma(xhci->cmd_ring->deq_seg, 789 789 xhci->cmd_ring->dequeue) & ··· 792 792 xhci_dbg_trace(xhci, trace_xhci_dbg_init, 793 793 "// Setting command ring address to 0x%llx", 794 794 (long unsigned long) val_64); 795 - writeq(val_64, &xhci->op_regs->cmd_ring); 795 + xhci_write_64(xhci, val_64, &xhci->op_regs->cmd_ring); 796 796 } 797 797 798 798 /* ··· 3842 3842 if (ret) { 3843 3843 return ret; 3844 3844 } 3845 - temp_64 = readq(&xhci->op_regs->dcbaa_ptr); 3845 + temp_64 = xhci_read_64(xhci, &xhci->op_regs->dcbaa_ptr); 3846 3846 xhci_dbg_trace(xhci, trace_xhci_dbg_address, 3847 3847 "Op regs DCBAA ptr = %#016llx", temp_64); 3848 3848 xhci_dbg_trace(xhci, trace_xhci_dbg_address, ··· 4730 4730 struct device *dev = hcd->self.controller; 4731 4731 int retval; 4732 4732 4733 - /* Limit the block layer scatter-gather lists to half a segment. */ 4734 - hcd->self.sg_tablesize = TRBS_PER_SEGMENT / 2; 4735 - 4736 - /* support to build packet from discontinuous buffers */ 4737 - hcd->self.no_sg_constraint = 1; 4733 + /* Accept arbitrarily long scatter-gather lists */ 4734 + hcd->self.sg_tablesize = ~0; 4738 4735 4739 4736 /* XHCI controllers don't stop the ep queue on short packets :| */ 4740 4737 hcd->self.no_stop_on_short = 1; ··· 4757 4760 /* xHCI private pointer was set in xhci_pci_probe for the second 4758 4761 * registered roothub. 4759 4762 */ 4763 + xhci = hcd_to_xhci(hcd); 4764 + /* 4765 + * Support arbitrarily aligned sg-list entries on hosts without 4766 + * TD fragment rules (which are currently unsupported). 4767 + */ 4768 + if (xhci->hci_version < 0x100) 4769 + hcd->self.no_sg_constraint = 1; 4770 + 4760 4771 return 0; 4761 4772 } 4762 4773 ··· 4792 4787 */ 4793 4788 if (xhci->hci_version > 0x96) 4794 4789 xhci->quirks |= XHCI_SPURIOUS_SUCCESS; 4790 + 4791 + if (xhci->hci_version < 0x100) 4792 + hcd->self.no_sg_constraint = 1; 4795 4793 4796 4794 /* Make sure the HC is halted. */ 4797 4795 retval = xhci_halt(xhci);
+29 -12
drivers/usb/host/xhci.h
··· 28 28 #include <linux/kernel.h> 29 29 #include <linux/usb/hcd.h> 30 30 31 - /* 32 - * Registers should always be accessed with double word or quad word accesses. 33 - * 34 - * Some xHCI implementations may support 64-bit address pointers. Registers 35 - * with 64-bit address pointers should be written to with dword accesses by 36 - * writing the low dword first (ptr[0]), then the high dword (ptr[1]) second. 37 - * xHCI implementations that do not support 64-bit address pointers will ignore 38 - * the high dword, and write order is irrelevant. 39 - */ 40 - #include <asm-generic/io-64-nonatomic-lo-hi.h> 41 - 42 31 /* Code sharing between pci-quirks and xhci hcd */ 43 32 #include "xhci-ext-caps.h" 44 33 #include "pci-quirks.h" ··· 1268 1279 * since the command ring is 64-byte aligned. 1269 1280 * It must also be greater than 16. 1270 1281 */ 1271 - #define TRBS_PER_SEGMENT 256 1282 + #define TRBS_PER_SEGMENT 64 1272 1283 /* Allow two commands + a link TRB, along with any reserved command TRBs */ 1273 1284 #define MAX_RSVD_CMD_TRBS (TRBS_PER_SEGMENT - 3) 1274 1285 #define TRB_SEGMENT_SIZE (TRBS_PER_SEGMENT*16) ··· 1602 1613 dev_warn(xhci_to_hcd(xhci)->self.controller , fmt , ## args) 1603 1614 #define xhci_warn_ratelimited(xhci, fmt, args...) \ 1604 1615 dev_warn_ratelimited(xhci_to_hcd(xhci)->self.controller , fmt , ## args) 1616 + 1617 + /* 1618 + * Registers should always be accessed with double word or quad word accesses. 1619 + * 1620 + * Some xHCI implementations may support 64-bit address pointers. Registers 1621 + * with 64-bit address pointers should be written to with dword accesses by 1622 + * writing the low dword first (ptr[0]), then the high dword (ptr[1]) second. 1623 + * xHCI implementations that do not support 64-bit address pointers will ignore 1624 + * the high dword, and write order is irrelevant. 1625 + */ 1626 + static inline u64 xhci_read_64(const struct xhci_hcd *xhci, 1627 + __le64 __iomem *regs) 1628 + { 1629 + __u32 __iomem *ptr = (__u32 __iomem *) regs; 1630 + u64 val_lo = readl(ptr); 1631 + u64 val_hi = readl(ptr + 1); 1632 + return val_lo + (val_hi << 32); 1633 + } 1634 + static inline void xhci_write_64(struct xhci_hcd *xhci, 1635 + const u64 val, __le64 __iomem *regs) 1636 + { 1637 + __u32 __iomem *ptr = (__u32 __iomem *) regs; 1638 + u32 val_lo = lower_32_bits(val); 1639 + u32 val_hi = upper_32_bits(val); 1640 + 1641 + writel(val_lo, ptr); 1642 + writel(val_hi, ptr + 1); 1643 + } 1605 1644 1606 1645 static inline int xhci_link_trb_quirk(struct xhci_hcd *xhci) 1607 1646 {
+3 -5
drivers/usb/phy/phy.c
··· 130 130 131 131 phy = __usb_find_phy(&phy_list, type); 132 132 if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) { 133 - pr_err("unable to find transceiver of type %s\n", 133 + pr_debug("PHY: unable to find transceiver of type %s\n", 134 134 usb_phy_type_string(type)); 135 135 goto err0; 136 136 } ··· 228 228 229 229 phy = __usb_find_phy_dev(dev, &phy_bind_list, index); 230 230 if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) { 231 - pr_err("unable to find transceiver\n"); 231 + dev_dbg(dev, "unable to find transceiver\n"); 232 232 goto err0; 233 233 } 234 234 ··· 424 424 unsigned long flags; 425 425 426 426 phy_bind = kzalloc(sizeof(*phy_bind), GFP_KERNEL); 427 - if (!phy_bind) { 428 - pr_err("phy_bind(): No memory for phy_bind"); 427 + if (!phy_bind) 429 428 return -ENOMEM; 430 - } 431 429 432 430 phy_bind->dev_name = dev_name; 433 431 phy_bind->phy_dev_name = phy_dev_name;
+3
drivers/usb/serial/ftdi_sio.c
··· 152 152 { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) }, 153 153 { USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) }, 154 154 { USB_DEVICE(FTDI_VID, FTDI_NXTCAM_PID) }, 155 + { USB_DEVICE(FTDI_VID, FTDI_EV3CON_PID) }, 155 156 { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_0_PID) }, 156 157 { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_1_PID) }, 157 158 { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_2_PID) }, ··· 192 191 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, 193 192 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) }, 194 193 { USB_DEVICE(FTDI_VID, FTDI_SPROG_II) }, 194 + { USB_DEVICE(FTDI_VID, FTDI_TAGSYS_LP101_PID) }, 195 + { USB_DEVICE(FTDI_VID, FTDI_TAGSYS_P200X_PID) }, 195 196 { USB_DEVICE(FTDI_VID, FTDI_LENZ_LIUSB_PID) }, 196 197 { USB_DEVICE(FTDI_VID, FTDI_XF_632_PID) }, 197 198 { USB_DEVICE(FTDI_VID, FTDI_XF_634_PID) },
+7
drivers/usb/serial/ftdi_sio_ids.h
··· 50 50 #define TI_XDS100V2_PID 0xa6d0 51 51 52 52 #define FTDI_NXTCAM_PID 0xABB8 /* NXTCam for Mindstorms NXT */ 53 + #define FTDI_EV3CON_PID 0xABB9 /* Mindstorms EV3 Console Adapter */ 53 54 54 55 /* US Interface Navigator (http://www.usinterface.com/) */ 55 56 #define FTDI_USINT_CAT_PID 0xb810 /* Navigator CAT and 2nd PTT lines */ ··· 363 362 364 363 /* Sprog II (Andrew Crosland's SprogII DCC interface) */ 365 364 #define FTDI_SPROG_II 0xF0C8 365 + 366 + /* 367 + * Two of the Tagsys RFID Readers 368 + */ 369 + #define FTDI_TAGSYS_LP101_PID 0xF0E9 /* Tagsys L-P101 RFID*/ 370 + #define FTDI_TAGSYS_P200X_PID 0xF0EE /* Tagsys Medio P200x RFID*/ 366 371 367 372 /* an infrared receiver for user access control with IR tags */ 368 373 #define FTDI_PIEGROUP_PID 0xF208 /* Product Id */
+2 -1
drivers/usb/serial/option.c
··· 1362 1362 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1267, 0xff, 0xff, 0xff) }, 1363 1363 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1268, 0xff, 0xff, 0xff) }, 1364 1364 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1269, 0xff, 0xff, 0xff) }, 1365 - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1270, 0xff, 0xff, 0xff) }, 1365 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1270, 0xff, 0xff, 0xff), 1366 + .driver_info = (kernel_ulong_t)&net_intf5_blacklist }, 1366 1367 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1271, 0xff, 0xff, 0xff) }, 1367 1368 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1272, 0xff, 0xff, 0xff) }, 1368 1369 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1273, 0xff, 0xff, 0xff) },
+3
drivers/usb/serial/qcserial.c
··· 139 139 {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901c, 0)}, /* Sierra Wireless EM7700 Device Management */ 140 140 {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901c, 2)}, /* Sierra Wireless EM7700 NMEA */ 141 141 {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x901c, 3)}, /* Sierra Wireless EM7700 Modem */ 142 + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 0)}, /* Netgear AirCard 340U Device Management */ 143 + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 2)}, /* Netgear AirCard 340U NMEA */ 144 + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 3)}, /* Netgear AirCard 340U Modem */ 142 145 143 146 { } /* Terminating entry */ 144 147 };
+2 -1
drivers/usb/serial/usb-serial-simple.c
··· 71 71 72 72 /* Suunto ANT+ USB Driver */ 73 73 #define SUUNTO_IDS() \ 74 - { USB_DEVICE(0x0fcf, 0x1008) } 74 + { USB_DEVICE(0x0fcf, 0x1008) }, \ 75 + { USB_DEVICE(0x0fcf, 0x1009) } /* Dynastream ANT USB-m Stick */ 75 76 DEVICE(suunto, SUUNTO_IDS); 76 77 77 78 /* Siemens USB/MPI adapter */
+3 -1
drivers/usb/storage/Kconfig
··· 18 18 19 19 This option depends on 'SCSI' support being enabled, but you 20 20 probably also need 'SCSI device support: SCSI disk support' 21 - (BLK_DEV_SD) for most USB storage devices. 21 + (BLK_DEV_SD) for most USB storage devices. Some devices also 22 + will require 'Probe all LUNs on each SCSI device' 23 + (SCSI_MULTI_LUN). 22 24 23 25 To compile this driver as a module, choose M here: the 24 26 module will be called usb-storage.
+6
drivers/usb/storage/scsiglue.c
··· 78 78 79 79 static int slave_alloc (struct scsi_device *sdev) 80 80 { 81 + struct us_data *us = host_to_us(sdev->host); 82 + 81 83 /* 82 84 * Set the INQUIRY transfer length to 36. We don't use any of 83 85 * the extra data and many devices choke if asked for more or ··· 103 101 * will require changes to the block layer. 104 102 */ 105 103 blk_queue_update_dma_alignment(sdev->request_queue, (512 - 1)); 104 + 105 + /* Tell the SCSI layer if we know there is more than one LUN */ 106 + if (us->protocol == USB_PR_BULK && us->max_lun > 0) 107 + sdev->sdev_bflags |= BLIST_FORCELUN; 106 108 107 109 return 0; 108 110 }
+1 -1
drivers/usb/storage/unusual_cypress.h
··· 31 31 "Cypress ISD-300LP", 32 32 USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0), 33 33 34 - UNUSUAL_DEV( 0x14cd, 0x6116, 0x0000, 0x0219, 34 + UNUSUAL_DEV( 0x14cd, 0x6116, 0x0160, 0x0160, 35 35 "Super Top", 36 36 "USB 2.0 SATA BRIDGE", 37 37 USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0),
+7
drivers/usb/storage/unusual_devs.h
··· 1455 1455 USB_SC_DEVICE, USB_PR_DEVICE, NULL, 1456 1456 US_FL_FIX_CAPACITY ), 1457 1457 1458 + /* Reported by Moritz Moeller-Herrmann <moritz-kernel@moeller-herrmann.de> */ 1459 + UNUSUAL_DEV( 0x0fca, 0x8004, 0x0201, 0x0201, 1460 + "Research In Motion", 1461 + "BlackBerry Bold 9000", 1462 + USB_SC_DEVICE, USB_PR_DEVICE, NULL, 1463 + US_FL_MAX_SECTORS_64 ), 1464 + 1458 1465 /* Reported by Michael Stattmann <michael@stattmann.com> */ 1459 1466 UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000, 1460 1467 "Sony Ericsson",
-2
include/linux/usb.h
··· 1265 1265 * @sg: scatter gather buffer list, the buffer size of each element in 1266 1266 * the list (except the last) must be divisible by the endpoint's 1267 1267 * max packet size if no_sg_constraint isn't set in 'struct usb_bus' 1268 - * (FIXME: scatter-gather under xHCI is broken for periodic transfers. 1269 - * Do not use urb->sg for interrupt endpoints for now, only bulk.) 1270 1268 * @num_mapped_sgs: (internal) number of mapped sg entries 1271 1269 * @num_sgs: number of entries in the sg list 1272 1270 * @transfer_buffer_length: How big is transfer_buffer. The transfer may
+2 -2
scripts/mod/file2alias.c
··· 210 210 range_lo < 0x9 ? "[%X-9" : "[%X", 211 211 range_lo); 212 212 sprintf(alias + strlen(alias), 213 - range_hi > 0xA ? "a-%X]" : "%X]", 214 - range_lo); 213 + range_hi > 0xA ? "A-%X]" : "%X]", 214 + range_hi); 215 215 } 216 216 } 217 217 if (bcdDevice_initial_digits < (sizeof(bcdDevice_lo) * 2 - 1))