diff options
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/ehci-ls1x.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-xls.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/pci-quirks.c | 9 | ||||
-rw-r--r-- | drivers/usb/host/xhci-dbg.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/xhci-hub.c | 9 | ||||
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 11 | ||||
-rw-r--r-- | drivers/usb/host/xhci.c | 8 |
7 files changed, 31 insertions, 12 deletions
diff --git a/drivers/usb/host/ehci-ls1x.c b/drivers/usb/host/ehci-ls1x.c index ca759652626b..aa0f328922df 100644 --- a/drivers/usb/host/ehci-ls1x.c +++ b/drivers/usb/host/ehci-ls1x.c | |||
@@ -113,7 +113,7 @@ static int ehci_hcd_ls1x_probe(struct platform_device *pdev) | |||
113 | goto err_put_hcd; | 113 | goto err_put_hcd; |
114 | } | 114 | } |
115 | 115 | ||
116 | ret = usb_add_hcd(hcd, irq, IRQF_SHARED); | 116 | ret = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED); |
117 | if (ret) | 117 | if (ret) |
118 | goto err_put_hcd; | 118 | goto err_put_hcd; |
119 | 119 | ||
diff --git a/drivers/usb/host/ohci-xls.c b/drivers/usb/host/ohci-xls.c index 84201cd1a472..41e378f17c66 100644 --- a/drivers/usb/host/ohci-xls.c +++ b/drivers/usb/host/ohci-xls.c | |||
@@ -56,7 +56,7 @@ static int ohci_xls_probe_internal(const struct hc_driver *driver, | |||
56 | goto err3; | 56 | goto err3; |
57 | } | 57 | } |
58 | 58 | ||
59 | retval = usb_add_hcd(hcd, irq, IRQF_SHARED); | 59 | retval = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED); |
60 | if (retval != 0) | 60 | if (retval != 0) |
61 | goto err4; | 61 | goto err4; |
62 | return retval; | 62 | return retval; |
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index 966d1484ee79..39f9e4a9a2d3 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c | |||
@@ -545,7 +545,14 @@ static const struct dmi_system_id __devinitconst ehci_dmi_nohandoff_table[] = { | |||
545 | /* Pegatron Lucid (Ordissimo AIRIS) */ | 545 | /* Pegatron Lucid (Ordissimo AIRIS) */ |
546 | .matches = { | 546 | .matches = { |
547 | DMI_MATCH(DMI_BOARD_NAME, "M11JB"), | 547 | DMI_MATCH(DMI_BOARD_NAME, "M11JB"), |
548 | DMI_MATCH(DMI_BIOS_VERSION, "Lucid-GE-133"), | 548 | DMI_MATCH(DMI_BIOS_VERSION, "Lucid-"), |
549 | }, | ||
550 | }, | ||
551 | { | ||
552 | /* Pegatron Lucid (Ordissimo) */ | ||
553 | .matches = { | ||
554 | DMI_MATCH(DMI_BOARD_NAME, "Ordissimo"), | ||
555 | DMI_MATCH(DMI_BIOS_VERSION, "Lucid-"), | ||
549 | }, | 556 | }, |
550 | }, | 557 | }, |
551 | { } | 558 | { } |
diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c index 4b436f5a4171..5f3a7c74aa8d 100644 --- a/drivers/usb/host/xhci-dbg.c +++ b/drivers/usb/host/xhci-dbg.c | |||
@@ -544,7 +544,6 @@ void xhci_dbg_ctx(struct xhci_hcd *xhci, | |||
544 | int i; | 544 | int i; |
545 | /* Fields are 32 bits wide, DMA addresses are in bytes */ | 545 | /* Fields are 32 bits wide, DMA addresses are in bytes */ |
546 | int field_size = 32 / 8; | 546 | int field_size = 32 / 8; |
547 | struct xhci_slot_ctx *slot_ctx; | ||
548 | dma_addr_t dma = ctx->dma; | 547 | dma_addr_t dma = ctx->dma; |
549 | int csz = HCC_64BYTE_CONTEXT(xhci->hcc_params); | 548 | int csz = HCC_64BYTE_CONTEXT(xhci->hcc_params); |
550 | 549 | ||
@@ -570,7 +569,6 @@ void xhci_dbg_ctx(struct xhci_hcd *xhci, | |||
570 | dbg_rsvd64(xhci, (u64 *)ctrl_ctx, dma); | 569 | dbg_rsvd64(xhci, (u64 *)ctrl_ctx, dma); |
571 | } | 570 | } |
572 | 571 | ||
573 | slot_ctx = xhci_get_slot_ctx(xhci, ctx); | ||
574 | xhci_dbg_slot_ctx(xhci, ctx); | 572 | xhci_dbg_slot_ctx(xhci, ctx); |
575 | xhci_dbg_ep_ctx(xhci, ctx, last_ep); | 573 | xhci_dbg_ep_ctx(xhci, ctx, last_ep); |
576 | } | 574 | } |
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index aa90ad4d4fd5..a686cf4905bb 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c | |||
@@ -151,9 +151,8 @@ static void xhci_usb3_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci, | |||
151 | if (portsc & PORT_DEV_REMOVE) | 151 | if (portsc & PORT_DEV_REMOVE) |
152 | port_removable |= 1 << (i + 1); | 152 | port_removable |= 1 << (i + 1); |
153 | } | 153 | } |
154 | memset(&desc->u.ss.DeviceRemovable, | 154 | |
155 | (__force __u16) cpu_to_le16(port_removable), | 155 | desc->u.ss.DeviceRemovable = cpu_to_le16(port_removable); |
156 | sizeof(__u16)); | ||
157 | } | 156 | } |
158 | 157 | ||
159 | static void xhci_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci, | 158 | static void xhci_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci, |
@@ -809,11 +808,13 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, | |||
809 | temp = xhci_readl(xhci, port_array[wIndex]); | 808 | temp = xhci_readl(xhci, port_array[wIndex]); |
810 | xhci_dbg(xhci, "set port power, actual port %d status = 0x%x\n", wIndex, temp); | 809 | xhci_dbg(xhci, "set port power, actual port %d status = 0x%x\n", wIndex, temp); |
811 | 810 | ||
811 | spin_unlock_irqrestore(&xhci->lock, flags); | ||
812 | temp = usb_acpi_power_manageable(hcd->self.root_hub, | 812 | temp = usb_acpi_power_manageable(hcd->self.root_hub, |
813 | wIndex); | 813 | wIndex); |
814 | if (temp) | 814 | if (temp) |
815 | usb_acpi_set_power_state(hcd->self.root_hub, | 815 | usb_acpi_set_power_state(hcd->self.root_hub, |
816 | wIndex, true); | 816 | wIndex, true); |
817 | spin_lock_irqsave(&xhci->lock, flags); | ||
817 | break; | 818 | break; |
818 | case USB_PORT_FEAT_RESET: | 819 | case USB_PORT_FEAT_RESET: |
819 | temp = (temp | PORT_RESET); | 820 | temp = (temp | PORT_RESET); |
@@ -917,11 +918,13 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, | |||
917 | xhci_writel(xhci, temp & ~PORT_POWER, | 918 | xhci_writel(xhci, temp & ~PORT_POWER, |
918 | port_array[wIndex]); | 919 | port_array[wIndex]); |
919 | 920 | ||
921 | spin_unlock_irqrestore(&xhci->lock, flags); | ||
920 | temp = usb_acpi_power_manageable(hcd->self.root_hub, | 922 | temp = usb_acpi_power_manageable(hcd->self.root_hub, |
921 | wIndex); | 923 | wIndex); |
922 | if (temp) | 924 | if (temp) |
923 | usb_acpi_set_power_state(hcd->self.root_hub, | 925 | usb_acpi_set_power_state(hcd->self.root_hub, |
924 | wIndex, false); | 926 | wIndex, false); |
927 | spin_lock_irqsave(&xhci->lock, flags); | ||
925 | break; | 928 | break; |
926 | default: | 929 | default: |
927 | goto error; | 930 | goto error; |
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index c6ebb176dc4f..4e1a8946b8d1 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -1228,6 +1228,17 @@ static void xhci_cmd_to_noop(struct xhci_hcd *xhci, struct xhci_cd *cur_cd) | |||
1228 | cur_seg = find_trb_seg(xhci->cmd_ring->first_seg, | 1228 | cur_seg = find_trb_seg(xhci->cmd_ring->first_seg, |
1229 | xhci->cmd_ring->dequeue, &cycle_state); | 1229 | xhci->cmd_ring->dequeue, &cycle_state); |
1230 | 1230 | ||
1231 | if (!cur_seg) { | ||
1232 | xhci_warn(xhci, "Command ring mismatch, dequeue = %p %llx (dma)\n", | ||
1233 | xhci->cmd_ring->dequeue, | ||
1234 | (unsigned long long) | ||
1235 | xhci_trb_virt_to_dma(xhci->cmd_ring->deq_seg, | ||
1236 | xhci->cmd_ring->dequeue)); | ||
1237 | xhci_debug_ring(xhci, xhci->cmd_ring); | ||
1238 | xhci_dbg_ring_ptrs(xhci, xhci->cmd_ring); | ||
1239 | return; | ||
1240 | } | ||
1241 | |||
1231 | /* find the command trb matched by cd from command ring */ | 1242 | /* find the command trb matched by cd from command ring */ |
1232 | for (cmd_trb = xhci->cmd_ring->dequeue; | 1243 | for (cmd_trb = xhci->cmd_ring->dequeue; |
1233 | cmd_trb != xhci->cmd_ring->enqueue; | 1244 | cmd_trb != xhci->cmd_ring->enqueue; |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 7d462bf20092..c9e419f29b74 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -1627,7 +1627,6 @@ int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev, | |||
1627 | struct xhci_hcd *xhci; | 1627 | struct xhci_hcd *xhci; |
1628 | struct xhci_container_ctx *in_ctx, *out_ctx; | 1628 | struct xhci_container_ctx *in_ctx, *out_ctx; |
1629 | unsigned int ep_index; | 1629 | unsigned int ep_index; |
1630 | struct xhci_ep_ctx *ep_ctx; | ||
1631 | struct xhci_slot_ctx *slot_ctx; | 1630 | struct xhci_slot_ctx *slot_ctx; |
1632 | struct xhci_input_control_ctx *ctrl_ctx; | 1631 | struct xhci_input_control_ctx *ctrl_ctx; |
1633 | u32 added_ctxs; | 1632 | u32 added_ctxs; |
@@ -1663,7 +1662,6 @@ int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev, | |||
1663 | out_ctx = virt_dev->out_ctx; | 1662 | out_ctx = virt_dev->out_ctx; |
1664 | ctrl_ctx = xhci_get_input_control_ctx(xhci, in_ctx); | 1663 | ctrl_ctx = xhci_get_input_control_ctx(xhci, in_ctx); |
1665 | ep_index = xhci_get_endpoint_index(&ep->desc); | 1664 | ep_index = xhci_get_endpoint_index(&ep->desc); |
1666 | ep_ctx = xhci_get_ep_ctx(xhci, out_ctx, ep_index); | ||
1667 | 1665 | ||
1668 | /* If this endpoint is already in use, and the upper layers are trying | 1666 | /* If this endpoint is already in use, and the upper layers are trying |
1669 | * to add it again without dropping it, reject the addition. | 1667 | * to add it again without dropping it, reject the addition. |
@@ -1817,6 +1815,8 @@ static int xhci_evaluate_context_result(struct xhci_hcd *xhci, | |||
1817 | case COMP_EBADSLT: | 1815 | case COMP_EBADSLT: |
1818 | dev_warn(&udev->dev, "WARN: slot not enabled for" | 1816 | dev_warn(&udev->dev, "WARN: slot not enabled for" |
1819 | "evaluate context command.\n"); | 1817 | "evaluate context command.\n"); |
1818 | ret = -EINVAL; | ||
1819 | break; | ||
1820 | case COMP_CTX_STATE: | 1820 | case COMP_CTX_STATE: |
1821 | dev_warn(&udev->dev, "WARN: invalid context state for " | 1821 | dev_warn(&udev->dev, "WARN: invalid context state for " |
1822 | "evaluate context command.\n"); | 1822 | "evaluate context command.\n"); |
@@ -4021,7 +4021,7 @@ int xhci_update_device(struct usb_hcd *hcd, struct usb_device *udev) | |||
4021 | static unsigned long long xhci_service_interval_to_ns( | 4021 | static unsigned long long xhci_service_interval_to_ns( |
4022 | struct usb_endpoint_descriptor *desc) | 4022 | struct usb_endpoint_descriptor *desc) |
4023 | { | 4023 | { |
4024 | return (1 << (desc->bInterval - 1)) * 125 * 1000; | 4024 | return (1ULL << (desc->bInterval - 1)) * 125 * 1000; |
4025 | } | 4025 | } |
4026 | 4026 | ||
4027 | static u16 xhci_get_timeout_no_hub_lpm(struct usb_device *udev, | 4027 | static u16 xhci_get_timeout_no_hub_lpm(struct usb_device *udev, |
@@ -4142,7 +4142,7 @@ static u16 xhci_calculate_intel_u2_timeout(struct usb_device *udev, | |||
4142 | (xhci_service_interval_to_ns(desc) > timeout_ns)) | 4142 | (xhci_service_interval_to_ns(desc) > timeout_ns)) |
4143 | timeout_ns = xhci_service_interval_to_ns(desc); | 4143 | timeout_ns = xhci_service_interval_to_ns(desc); |
4144 | 4144 | ||
4145 | u2_del_ns = udev->bos->ss_cap->bU2DevExitLat * 1000; | 4145 | u2_del_ns = le16_to_cpu(udev->bos->ss_cap->bU2DevExitLat) * 1000ULL; |
4146 | if (u2_del_ns > timeout_ns) | 4146 | if (u2_del_ns > timeout_ns) |
4147 | timeout_ns = u2_del_ns; | 4147 | timeout_ns = u2_del_ns; |
4148 | 4148 | ||