Re: xHCI: Setting the MULT field in the Endpoint Context Data Structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

Ramya Desai wrote:

Dear Sarah,

We found a small bug in the xhci-mem.c file which is related to the
setting of the MULT field in the Endpoint Context Data Structure. The
existing code sets the MULT field for all the SUPER SPEED endpoints.
However, according to the 6.2.3 section of the xHCI 0.96
specification, the MULT field shall be “0” for all endpoint types
except for SS Isochronous. When we are testing the BULK endpoints with
MaxStreams value set to 5, we encountered this error. However, after
applying the patch, the device is working fine without any issues.

Here is patch which fixes the error in xhci-mem.c file.

diff -urNB drivers/usb/host/xhci-mem.c drivers/usb/host-modified/xhci-mem.c
--- drivers/usb/host/xhci-mem.c              2010-07-08 12:22:48.000000000 +0530
+++ drivers/usb/host-modified/xhci-mem.c       2010-07-14
18:57:51.252160556 +0530
@@ -1006,11 +1006,13 @@
  * High speed endpoint descriptors can define "the number of additional
  * transaction opportunities per microframe", but that goes in the Max Burst
  * endpoint context field.
+ * According to 6.2.3 section of the xHCI_0.96 spec, the mult field (9:8 bits)
+ * shall be "0" for all endpoint types except for SS Isochronous.
  */
 static inline u32 xhci_get_endpoint_mult(struct usb_device *udev,
                                struct usb_host_endpoint *ep)
 {
-              if (udev->speed != USB_SPEED_SUPER)
+             if ((udev->speed != USB_SPEED_SUPER) ||
(!usb_endpoint_xfer_isoc(&ep->desc)))

   Your patch is word-wrapped.

                                return 0;
                return ep->ss_ep_comp.bmAttributes;

   Perhaps it's time to convert spaces to tabs in this function?

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux