Revert "USB: xhci - fix unsafe macro definitions"
authorSteve Conklin <sconklin@canonical.com>
Wed, 1 Jun 2011 16:42:58 +0000 (11:42 -0500)
committerSteve Conklin <sconklin@canonical.com>
Thu, 2 Jun 2011 19:23:32 +0000 (14:23 -0500)
This reverts commit 923326deb96954b634b058f41bf6b482e503cb8f.

Due to a reported problem with USB3 after application of three patches
from upstream stable, these patches are being reverted until they can
be tested seperately and a determination made of whether there is a
problem and how bad it is. The reporter has not yet responded to a
request to test kernels with each of the most suspect patches reverted,
so all will be reverted. Testing will proceed using these patches and
hopefully they can be restored soon. The USB3 problem was reported
in LP bug number 769042

drivers/usb/host/xhci.h

index 19040c5..62bc1bc 100644 (file)
@@ -232,7 +232,7 @@ struct xhci_op_regs {
  * notification type that matches a bit set in this bit field.
  */
 #define        DEV_NOTE_MASK           (0xffff)
-#define ENABLE_DEV_NOTE(x)     (1 << (x))
+#define ENABLE_DEV_NOTE(x)     (1 << x)
 /* Most of the device notification types should only be used for debug.
  * SW does need to pay attention to function wake notifications.
  */
@@ -601,11 +601,11 @@ struct xhci_ep_ctx {
 #define EP_STATE_STOPPED       3
 #define EP_STATE_ERROR         4
 /* Mult - Max number of burtst within an interval, in EP companion desc. */
-#define EP_MULT(p)             (((p) & 0x3) << 8)
+#define EP_MULT(p)             ((p & 0x3) << 8)
 /* bits 10:14 are Max Primary Streams */
 /* bit 15 is Linear Stream Array */
 /* Interval - period between requests to an endpoint - 125u increments. */
-#define EP_INTERVAL(p)         (((p) & 0xff) << 16)
+#define EP_INTERVAL(p)         ((p & 0xff) << 16)
 #define EP_INTERVAL_TO_UFRAMES(p)              (1 << (((p) >> 16) & 0xff))
 #define EP_MAXPSTREAMS_MASK    (0x1f << 10)
 #define EP_MAXPSTREAMS(p)      (((p) << 10) & EP_MAXPSTREAMS_MASK)