diff options
| -rw-r--r-- | drivers/usb/core/config.c | 48 | ||||
| -rw-r--r-- | drivers/usb/host/ehci-orion.c | 2 | ||||
| -rw-r--r-- | drivers/usb/host/ohci-omap.c | 1 | ||||
| -rw-r--r-- | drivers/usb/host/xhci-dbg.c | 199 | ||||
| -rw-r--r-- | drivers/usb/host/xhci-hcd.c | 290 | ||||
| -rw-r--r-- | drivers/usb/host/xhci-mem.c | 300 | ||||
| -rw-r--r-- | drivers/usb/host/xhci-pci.c | 1 | ||||
| -rw-r--r-- | drivers/usb/host/xhci-ring.c | 305 | ||||
| -rw-r--r-- | drivers/usb/host/xhci.h | 148 | ||||
| -rw-r--r-- | drivers/usb/misc/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/usb/musb/musb_core.c | 3 | ||||
| -rw-r--r-- | drivers/usb/musb/musb_gadget_ep0.c | 2 | ||||
| -rw-r--r-- | drivers/usb/musb/musb_regs.h | 1 | ||||
| -rw-r--r-- | drivers/usb/serial/cp210x.c | 3 | ||||
| -rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 1 | ||||
| -rw-r--r-- | drivers/usb/serial/ftdi_sio.h | 7 | ||||
| -rw-r--r-- | drivers/usb/serial/mos7840.c | 9 | ||||
| -rw-r--r-- | drivers/usb/serial/option.c | 133 | ||||
| -rw-r--r-- | drivers/usb/storage/transport.c | 2 |
19 files changed, 1012 insertions, 445 deletions
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index 24dfb33f90cb..a16c538d0132 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c | |||
| @@ -80,38 +80,18 @@ static int usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno, | |||
| 80 | int max_tx; | 80 | int max_tx; |
| 81 | int i; | 81 | int i; |
| 82 | 82 | ||
| 83 | /* Allocate space for the SS endpoint companion descriptor */ | ||
| 84 | ep->ss_ep_comp = kzalloc(sizeof(struct usb_host_ss_ep_comp), | ||
| 85 | GFP_KERNEL); | ||
| 86 | if (!ep->ss_ep_comp) | ||
| 87 | return -ENOMEM; | ||
| 88 | desc = (struct usb_ss_ep_comp_descriptor *) buffer; | 83 | desc = (struct usb_ss_ep_comp_descriptor *) buffer; |
| 89 | if (desc->bDescriptorType != USB_DT_SS_ENDPOINT_COMP) { | 84 | if (desc->bDescriptorType != USB_DT_SS_ENDPOINT_COMP) { |
| 90 | dev_warn(ddev, "No SuperSpeed endpoint companion for config %d " | 85 | dev_warn(ddev, "No SuperSpeed endpoint companion for config %d " |
| 91 | " interface %d altsetting %d ep %d: " | 86 | " interface %d altsetting %d ep %d: " |
| 92 | "using minimum values\n", | 87 | "using minimum values\n", |
| 93 | cfgno, inum, asnum, ep->desc.bEndpointAddress); | 88 | cfgno, inum, asnum, ep->desc.bEndpointAddress); |
| 94 | ep->ss_ep_comp->desc.bLength = USB_DT_SS_EP_COMP_SIZE; | ||
| 95 | ep->ss_ep_comp->desc.bDescriptorType = USB_DT_SS_ENDPOINT_COMP; | ||
| 96 | ep->ss_ep_comp->desc.bMaxBurst = 0; | ||
| 97 | /* | ||
| 98 | * Leave bmAttributes as zero, which will mean no streams for | ||
| 99 | * bulk, and isoc won't support multiple bursts of packets. | ||
| 100 | * With bursts of only one packet, and a Mult of 1, the max | ||
| 101 | * amount of data moved per endpoint service interval is one | ||
| 102 | * packet. | ||
| 103 | */ | ||
| 104 | if (usb_endpoint_xfer_isoc(&ep->desc) || | ||
| 105 | usb_endpoint_xfer_int(&ep->desc)) | ||
| 106 | ep->ss_ep_comp->desc.wBytesPerInterval = | ||
| 107 | ep->desc.wMaxPacketSize; | ||
| 108 | /* | 89 | /* |
| 109 | * The next descriptor is for an Endpoint or Interface, | 90 | * The next descriptor is for an Endpoint or Interface, |
| 110 | * no extra descriptors to copy into the companion structure, | 91 | * no extra descriptors to copy into the companion structure, |
| 111 | * and we didn't eat up any of the buffer. | 92 | * and we didn't eat up any of the buffer. |
| 112 | */ | 93 | */ |
| 113 | retval = 0; | 94 | return 0; |
| 114 | goto valid; | ||
| 115 | } | 95 | } |
| 116 | memcpy(&ep->ss_ep_comp->desc, desc, USB_DT_SS_EP_COMP_SIZE); | 96 | memcpy(&ep->ss_ep_comp->desc, desc, USB_DT_SS_EP_COMP_SIZE); |
| 117 | desc = &ep->ss_ep_comp->desc; | 97 | desc = &ep->ss_ep_comp->desc; |
| @@ -320,6 +300,28 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum, | |||
| 320 | buffer += i; | 300 | buffer += i; |
| 321 | size -= i; | 301 | size -= i; |
| 322 | 302 | ||
| 303 | /* Allocate space for the SS endpoint companion descriptor */ | ||
| 304 | endpoint->ss_ep_comp = kzalloc(sizeof(struct usb_host_ss_ep_comp), | ||
| 305 | GFP_KERNEL); | ||
| 306 | if (!endpoint->ss_ep_comp) | ||
| 307 | return -ENOMEM; | ||
| 308 | |||
| 309 | /* Fill in some default values (may be overwritten later) */ | ||
| 310 | endpoint->ss_ep_comp->desc.bLength = USB_DT_SS_EP_COMP_SIZE; | ||
| 311 | endpoint->ss_ep_comp->desc.bDescriptorType = USB_DT_SS_ENDPOINT_COMP; | ||
| 312 | endpoint->ss_ep_comp->desc.bMaxBurst = 0; | ||
| 313 | /* | ||
| 314 | * Leave bmAttributes as zero, which will mean no streams for | ||
| 315 | * bulk, and isoc won't support multiple bursts of packets. | ||
| 316 | * With bursts of only one packet, and a Mult of 1, the max | ||
| 317 | * amount of data moved per endpoint service interval is one | ||
| 318 | * packet. | ||
| 319 | */ | ||
| 320 | if (usb_endpoint_xfer_isoc(&endpoint->desc) || | ||
| 321 | usb_endpoint_xfer_int(&endpoint->desc)) | ||
| 322 | endpoint->ss_ep_comp->desc.wBytesPerInterval = | ||
| 323 | endpoint->desc.wMaxPacketSize; | ||
| 324 | |||
| 323 | if (size > 0) { | 325 | if (size > 0) { |
| 324 | retval = usb_parse_ss_endpoint_companion(ddev, cfgno, | 326 | retval = usb_parse_ss_endpoint_companion(ddev, cfgno, |
| 325 | inum, asnum, endpoint, num_ep, buffer, | 327 | inum, asnum, endpoint, num_ep, buffer, |
| @@ -329,6 +331,10 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum, | |||
| 329 | retval = buffer - buffer0; | 331 | retval = buffer - buffer0; |
| 330 | } | 332 | } |
| 331 | } else { | 333 | } else { |
| 334 | dev_warn(ddev, "config %d interface %d altsetting %d " | ||
| 335 | "endpoint 0x%X has no " | ||
| 336 | "SuperSpeed companion descriptor\n", | ||
| 337 | cfgno, inum, asnum, d->bEndpointAddress); | ||
| 332 | retval = buffer - buffer0; | 338 | retval = buffer - buffer0; |
| 333 | } | 339 | } |
| 334 | } else { | 340 | } else { |
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c index dc2ac613a9d1..1d283e1b2b8d 100644 --- a/drivers/usb/host/ehci-orion.c +++ b/drivers/usb/host/ehci-orion.c | |||
| @@ -105,6 +105,7 @@ static int ehci_orion_setup(struct usb_hcd *hcd) | |||
| 105 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); | 105 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); |
| 106 | int retval; | 106 | int retval; |
| 107 | 107 | ||
| 108 | ehci_reset(ehci); | ||
| 108 | retval = ehci_halt(ehci); | 109 | retval = ehci_halt(ehci); |
| 109 | if (retval) | 110 | if (retval) |
| 110 | return retval; | 111 | return retval; |
| @@ -118,7 +119,6 @@ static int ehci_orion_setup(struct usb_hcd *hcd) | |||
| 118 | 119 | ||
| 119 | hcd->has_tt = 1; | 120 | hcd->has_tt = 1; |
| 120 | 121 | ||
| 121 | ehci_reset(ehci); | ||
| 122 | ehci_port_power(ehci, 0); | 122 | ehci_port_power(ehci, 0); |
| 123 | 123 | ||
| 124 | return retval; | 124 | return retval; |
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index f3aaba35e912..83cbecd2a1ed 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c | |||
| @@ -282,6 +282,7 @@ static int ohci_omap_init(struct usb_hcd *hcd) | |||
| 282 | static void ohci_omap_stop(struct usb_hcd *hcd) | 282 | static void ohci_omap_stop(struct usb_hcd *hcd) |
| 283 | { | 283 | { |
| 284 | dev_dbg(hcd->self.controller, "stopping USB Controller\n"); | 284 | dev_dbg(hcd->self.controller, "stopping USB Controller\n"); |
| 285 | ohci_stop(hcd); | ||
| 285 | omap_ohci_clock_power(0); | 286 | omap_ohci_clock_power(0); |
| 286 | } | 287 | } |
| 287 | 288 | ||
diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c index 2501c571f855..705e34324156 100644 --- a/drivers/usb/host/xhci-dbg.c +++ b/drivers/usb/host/xhci-dbg.c | |||
| @@ -173,6 +173,7 @@ void xhci_print_ir_set(struct xhci_hcd *xhci, struct xhci_intr_reg *ir_set, int | |||
| 173 | { | 173 | { |
| 174 | void *addr; | 174 | void *addr; |
| 175 | u32 temp; | 175 | u32 temp; |
| 176 | u64 temp_64; | ||
| 176 | 177 | ||
| 177 | addr = &ir_set->irq_pending; | 178 | addr = &ir_set->irq_pending; |
| 178 | temp = xhci_readl(xhci, addr); | 179 | temp = xhci_readl(xhci, addr); |
| @@ -200,25 +201,15 @@ void xhci_print_ir_set(struct xhci_hcd *xhci, struct xhci_intr_reg *ir_set, int | |||
| 200 | xhci_dbg(xhci, " WARN: %p: ir_set.rsvd = 0x%x\n", | 201 | xhci_dbg(xhci, " WARN: %p: ir_set.rsvd = 0x%x\n", |
| 201 | addr, (unsigned int)temp); | 202 | addr, (unsigned int)temp); |
| 202 | 203 | ||
| 203 | addr = &ir_set->erst_base[0]; | 204 | addr = &ir_set->erst_base; |
| 204 | temp = xhci_readl(xhci, addr); | 205 | temp_64 = xhci_read_64(xhci, addr); |
| 205 | xhci_dbg(xhci, " %p: ir_set.erst_base[0] = 0x%x\n", | 206 | xhci_dbg(xhci, " %p: ir_set.erst_base = @%08llx\n", |
| 206 | addr, (unsigned int) temp); | 207 | addr, temp_64); |
| 207 | |||
| 208 | addr = &ir_set->erst_base[1]; | ||
| 209 | temp = xhci_readl(xhci, addr); | ||
| 210 | xhci_dbg(xhci, " %p: ir_set.erst_base[1] = 0x%x\n", | ||
| 211 | addr, (unsigned int) temp); | ||
| 212 | 208 | ||
| 213 | addr = &ir_set->erst_dequeue[0]; | 209 | addr = &ir_set->erst_dequeue; |
| 214 | temp = xhci_readl(xhci, addr); | 210 | temp_64 = xhci_read_64(xhci, addr); |
| 215 | xhci_dbg(xhci, " %p: ir_set.erst_dequeue[0] = 0x%x\n", | 211 | xhci_dbg(xhci, " %p: ir_set.erst_dequeue = @%08llx\n |
