aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2010-07-10 09:48:01 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-07-26 15:00:58 -0400
commitc30c791c946a14a03e87819eced562ed28711961 (patch)
tree522ff719de8a8858e4bc87c3b987d8e43a601089 /drivers/usb
parent20a12f007feee1cfa761b431047271d1141d8031 (diff)
USB: xhci: Set Mult field in endpoint context correctly.
The bmAttributes field of the SuperSpeed Endpoint Companion Descriptor has different meanings, depending on the endpoint type. If the endpoint is isochronous, the bmAttributes field is the maximum number of packets within a service interval that this endpoint supports. If the endpoint is bulk, it's the number of stream IDs this endpoint supports. Only set the Mult field of the xHCI endpoint context using the bmAttributes field if the endpoint is isochronous, and the device is a SuperSpeed device. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/xhci-mem.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 8cc824bbc4ee..2eb658d26394 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1023,7 +1023,7 @@ static inline unsigned int xhci_get_endpoint_interval(struct usb_device *udev,
1023 return EP_INTERVAL(interval); 1023 return EP_INTERVAL(interval);
1024} 1024}
1025 1025
1026/* 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.
1027 * High speed endpoint descriptors can define "the number of additional 1027 * High speed endpoint descriptors can define "the number of additional
1028 * transaction opportunities per microframe", but that goes in the Max Burst 1028 * transaction opportunities per microframe", but that goes in the Max Burst
1029 * endpoint context field. 1029 * endpoint context field.
@@ -1031,7 +1031,8 @@ static inline unsigned int xhci_get_endpoint_interval(struct usb_device *udev,
1031static inline u32 xhci_get_endpoint_mult(struct usb_device *udev, 1031static inline u32 xhci_get_endpoint_mult(struct usb_device *udev,
1032 struct usb_host_endpoint *ep) 1032 struct usb_host_endpoint *ep)
1033{ 1033{
1034 if (udev->speed != USB_SPEED_SUPER) 1034 if (udev->speed != USB_SPEED_SUPER ||
1035 !usb_endpoint_xfer_isoc(&ep->desc))
1035 return 0; 1036 return 0;
1036 return ep->ss_ep_comp.bmAttributes; 1037 return ep->ss_ep_comp.bmAttributes;
1037} 1038}