diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-07-26 16:06:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-07-26 16:06:39 -0400 |
commit | 592d32cc4156ee512e55c5bc052fdece215f52b2 (patch) | |
tree | d2b91b44bfb1d491639db1a5603e66cee4a2e353 /drivers/usb/host | |
parent | 4afb93b4211b3f65ebd8ea0d9018426dd9e8693e (diff) | |
parent | 2b795ea00c2bbb077a1199a4d729c8ac03a6bded (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
USB: musb: tusb6010: fix compile error with n8x0_defconfig
USB: FTDI: Add support for the RT System VX-7 radio programming cable
USB: add quirk for Broadcom BT dongle
USB: usb-storage: fix initializations of urb fields
USB: xhci: Set Mult field in endpoint context correctly.
USB: sisusbvga: Fix for USB 3.0
USB: adds Artisman USB dongle to list of quirky devices
USB: xhci: Set EP0 dequeue ptr after reset of configured device.
USB: Fix USB3.0 Port Speed Downgrade after port reset
USB: xHCI: Fix another bug in link TRB activation change.
USB: option: Add support for AMOI Skypephone S2
USB: New PIDs for Qualcomm gobi 2000 (qcserial)
USB: ftdi_sio: support for Signalyzer tools based on FTDI chips
USB: s3c2410_udc: be aware of connected gadget driver
USB: Expose vendor-specific ACM channel on Nokia 5230
USB: Add PID for Sierra 250U to drivers/usb/serial/sierra.c
USB: option: add support for 1da5:4518
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/xhci-mem.c | 26 | ||||
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 11 | ||||
-rw-r--r-- | drivers/usb/host/xhci.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/xhci.h | 2 |
4 files changed, 35 insertions, 6 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index fd9e03afd91c..2eb658d26394 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -835,6 +835,27 @@ fail: | |||
835 | return 0; | 835 | return 0; |
836 | } | 836 | } |
837 | 837 | ||
838 | void xhci_copy_ep0_dequeue_into_input_ctx(struct xhci_hcd *xhci, | ||
839 | struct usb_device *udev) | ||
840 | { | ||
841 | struct xhci_virt_device *virt_dev; | ||
842 | struct xhci_ep_ctx *ep0_ctx; | ||
843 | struct xhci_ring *ep_ring; | ||
844 | |||
845 | virt_dev = xhci->devs[udev->slot_id]; | ||
846 | ep0_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, 0); | ||
847 | ep_ring = virt_dev->eps[0].ring; | ||
848 | /* | ||
849 | * FIXME we don't keep track of the dequeue pointer very well after a | ||
850 | * Set TR dequeue pointer, so we're setting the dequeue pointer of the | ||
851 | * host to our enqueue pointer. This should only be called after a | ||
852 | * configured device has reset, so all control transfers should have | ||
853 | * been completed or cancelled before the reset. | ||
854 | */ | ||
855 | ep0_ctx->deq = xhci_trb_virt_to_dma(ep_ring->enq_seg, ep_ring->enqueue); | ||
856 | ep0_ctx->deq |= ep_ring->cycle_state; | ||
857 | } | ||
858 | |||
838 | /* Setup an xHCI virtual device for a Set Address command */ | 859 | /* Setup an xHCI virtual device for a Set Address command */ |
839 | int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *udev) | 860 | int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *udev) |
840 | { | 861 | { |
@@ -1002,7 +1023,7 @@ static inline unsigned int xhci_get_endpoint_interval(struct usb_device *udev, | |||
1002 | return EP_INTERVAL(interval); | 1023 | return EP_INTERVAL(interval); |
1003 | } | 1024 | } |
1004 | 1025 | ||
1005 | /* The "Mult" field in the endpoint context is only set for SuperSpeed devices. | 1026 | /* The "Mult" field in the endpoint context is only set for SuperSpeed isoc eps. |
1006 | * High speed endpoint descriptors can define "the number of additional | 1027 | * High speed endpoint descriptors can define "the number of additional |
1007 | * transaction opportunities per microframe", but that goes in the Max Burst | 1028 | * transaction opportunities per microframe", but that goes in the Max Burst |
1008 | * endpoint context field. | 1029 | * endpoint context field. |
@@ -1010,7 +1031,8 @@ static inline unsigned int xhci_get_endpoint_interval(struct usb_device *udev, | |||
1010 | static inline u32 xhci_get_endpoint_mult(struct usb_device *udev, | 1031 | static inline u32 xhci_get_endpoint_mult(struct usb_device *udev, |
1011 | struct usb_host_endpoint *ep) | 1032 | struct usb_host_endpoint *ep) |
1012 | { | 1033 | { |
1013 | if (udev->speed != USB_SPEED_SUPER) | 1034 | if (udev->speed != USB_SPEED_SUPER || |
1035 | !usb_endpoint_xfer_isoc(&ep->desc)) | ||
1014 | return 0; | 1036 | return 0; |
1015 | return ep->ss_ep_comp.bmAttributes; | 1037 | return ep->ss_ep_comp.bmAttributes; |
1016 | } | 1038 | } |
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 94e6934edb09..bfc99a939455 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -2380,16 +2380,19 @@ static int queue_command(struct xhci_hcd *xhci, u32 field1, u32 field2, | |||
2380 | u32 field3, u32 field4, bool command_must_succeed) | 2380 | u32 field3, u32 field4, bool command_must_succeed) |
2381 | { | 2381 | { |
2382 | int reserved_trbs = xhci->cmd_ring_reserved_trbs; | 2382 | int reserved_trbs = xhci->cmd_ring_reserved_trbs; |
2383 | int ret; | ||
2384 | |||
2383 | if (!command_must_succeed) | 2385 | if (!command_must_succeed) |
2384 | reserved_trbs++; | 2386 | reserved_trbs++; |
2385 | 2387 | ||
2386 | if (!room_on_ring(xhci, xhci->cmd_ring, reserved_trbs)) { | 2388 | ret = prepare_ring(xhci, xhci->cmd_ring, EP_STATE_RUNNING, |
2387 | if (!in_interrupt()) | 2389 | reserved_trbs, GFP_ATOMIC); |
2388 | xhci_err(xhci, "ERR: No room for command on command ring\n"); | 2390 | if (ret < 0) { |
2391 | xhci_err(xhci, "ERR: No room for command on command ring\n"); | ||
2389 | if (command_must_succeed) | 2392 | if (command_must_succeed) |
2390 | xhci_err(xhci, "ERR: Reserved TRB counting for " | 2393 | xhci_err(xhci, "ERR: Reserved TRB counting for " |
2391 | "unfailable commands failed.\n"); | 2394 | "unfailable commands failed.\n"); |
2392 | return -ENOMEM; | 2395 | return ret; |
2393 | } | 2396 | } |
2394 | queue_trb(xhci, xhci->cmd_ring, false, false, field1, field2, field3, | 2397 | queue_trb(xhci, xhci->cmd_ring, false, false, field1, field2, field3, |
2395 | field4 | xhci->cmd_ring->cycle_state); | 2398 | field4 | xhci->cmd_ring->cycle_state); |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 27345cd04da0..3998f72cd0c4 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -2134,6 +2134,8 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev) | |||
2134 | /* If this is a Set Address to an unconfigured device, setup ep 0 */ | 2134 | /* If this is a Set Address to an unconfigured device, setup ep 0 */ |
2135 | if (!udev->config) | 2135 | if (!udev->config) |
2136 | xhci_setup_addressable_virt_dev(xhci, udev); | 2136 | xhci_setup_addressable_virt_dev(xhci, udev); |
2137 | else | ||
2138 | xhci_copy_ep0_dequeue_into_input_ctx(xhci, udev); | ||
2137 | /* Otherwise, assume the core has the device configured how it wants */ | 2139 | /* Otherwise, assume the core has the device configured how it wants */ |
2138 | xhci_dbg(xhci, "Slot ID %d Input Context:\n", udev->slot_id); | 2140 | xhci_dbg(xhci, "Slot ID %d Input Context:\n", udev->slot_id); |
2139 | xhci_dbg_ctx(xhci, virt_dev->in_ctx, 2); | 2141 | xhci_dbg_ctx(xhci, virt_dev->in_ctx, 2); |
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 8b4b7d39f79c..6c7e3430ec93 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
@@ -1292,6 +1292,8 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags); | |||
1292 | void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id); | 1292 | void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id); |
1293 | int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id, struct usb_device *udev, gfp_t flags); | 1293 | int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id, struct usb_device *udev, gfp_t flags); |
1294 | int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *udev); | 1294 | int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *udev); |
1295 | void xhci_copy_ep0_dequeue_into_input_ctx(struct xhci_hcd *xhci, | ||
1296 | struct usb_device *udev); | ||
1295 | unsigned int xhci_get_endpoint_index(struct usb_endpoint_descriptor *desc); | 1297 | unsigned int xhci_get_endpoint_index(struct usb_endpoint_descriptor *desc); |
1296 | unsigned int xhci_get_endpoint_flag(struct usb_endpoint_descriptor *desc); | 1298 | unsigned int xhci_get_endpoint_flag(struct usb_endpoint_descriptor *desc); |
1297 | unsigned int xhci_get_endpoint_flag_from_index(unsigned int ep_index); | 1299 | unsigned int xhci_get_endpoint_flag_from_index(unsigned int ep_index); |