summaryrefslogtreecommitdiff
path: root/drivers/usb/early/xhci-dbc.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-27 10:32:30 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-27 10:32:30 +0300
commitf6402eb4a2b3192bdf23fa39ef8e85fd3691cca9 (patch)
treeda8d55cd97d59cfe689fe447d98637204f2218e3 /drivers/usb/early/xhci-dbc.h
parent992a60ed0d5e312ce9a485c9e12097ac82ae4b3e (diff)
parent6a8b55ed4056ea5559ebe4f6a4b247f627870d4c (diff)
downloadlinux-f6402eb4a2b3192bdf23fa39ef8e85fd3691cca9.tar.xz
Merge 5.7-rc3 into usb-next
We need the USB fixes in here too. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/early/xhci-dbc.h')
-rw-r--r--drivers/usb/early/xhci-dbc.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/usb/early/xhci-dbc.h b/drivers/usb/early/xhci-dbc.h
index 9fb6a9f2548a..8b4d71de45fc 100644
--- a/drivers/usb/early/xhci-dbc.h
+++ b/drivers/usb/early/xhci-dbc.h
@@ -120,8 +120,22 @@ struct xdbc_ring {
u32 cycle_state;
};
-#define XDBC_EPID_OUT 2
-#define XDBC_EPID_IN 3
+/*
+ * These are the "Endpoint ID" (also known as "Context Index") values for the
+ * OUT Transfer Ring and the IN Transfer Ring of a Debug Capability Context data
+ * structure.
+ * According to the "eXtensible Host Controller Interface for Universal Serial
+ * Bus (xHCI)" specification, section "7.6.3.2 Endpoint Contexts and Transfer
+ * Rings", these should be 0 and 1, and those are the values AMD machines give
+ * you; but Intel machines seem to use the formula from section "4.5.1 Device
+ * Context Index", which is supposed to be used for the Device Context only.
+ * Luckily the values from Intel don't overlap with those from AMD, so we can
+ * just test for both.
+ */
+#define XDBC_EPID_OUT 0
+#define XDBC_EPID_IN 1
+#define XDBC_EPID_OUT_INTEL 2
+#define XDBC_EPID_IN_INTEL 3
struct xdbc_state {
u16 vendor;