From 0b6fadd02e54ca877261e5e7276c4687031ae024 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 18 Mar 2021 18:23:32 +0100 Subject: [PATCH] ANDROID: GKI: USB: XHCI: add Android ABI padding to lots of xhci structures Given that the xhci driver seems to be one of the more "modified" by vendors, and that the xhci core is going to be built into the kernel in the GKI 2 Android kernel, the xhci "platform" api is now a stable boundry. Try to handle any future changes in this api by adding some kabi padding fields to allow for room to grow and change over the next 5+ years as needed. Bug: 151154716 Bug: 182336717 Signed-off-by: Greg Kroah-Hartman Change-Id: I55c8cad8c8c51330fc2d72df41a1f04229a22e98 --- drivers/usb/host/xhci.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index a8b890a0dd73..9d72017f5b93 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -17,6 +17,7 @@ #include #include #include +#include /* Code sharing between pci-quirks and xhci hcd */ #include "xhci-ext-caps.h" @@ -809,6 +810,9 @@ struct xhci_command { struct completion *completion; union xhci_trb *command_trb; struct list_head cmd_list; + + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); }; /* drop context bitmasks */ @@ -1533,6 +1537,8 @@ struct xhci_segment { void *bounce_buf; unsigned int bounce_offs; unsigned int bounce_len; + + ANDROID_KABI_RESERVE(1); }; enum xhci_cancelled_td_status { @@ -1622,6 +1628,9 @@ struct xhci_ring { enum xhci_ring_type type; bool last_td_was_short; struct radix_tree_root *trb_address_map; + + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); }; struct xhci_erst_entry { @@ -1639,6 +1648,8 @@ struct xhci_erst { dma_addr_t erst_dma_addr; /* Num entries the ERST can contain */ unsigned int erst_size; + + ANDROID_KABI_RESERVE(1); }; struct xhci_scratchpad { @@ -1916,6 +1927,12 @@ struct xhci_hcd { struct list_head regset_list; void *dbc; + + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); + ANDROID_KABI_RESERVE(3); + ANDROID_KABI_RESERVE(4); + /* platform-specific data -- must come last */ unsigned long priv[] __aligned(sizeof(s64)); };