Skip to content

Commit 2419f30

Browse files
Nicolas Saenz Juliennegregkh
authored andcommitted
USB: xhci: fix 'broken_suspend' placement in struct xchi_hcd
As commented in the struct's definition there shouldn't be anything underneath its 'priv[0]' member as it would break some macros. The patch converts the broken_suspend into a bit-field and relocates it next to to the rest of bit-fields. Fixes: a7d57ab ("xhci: workaround CSS timeout on AMD SNPS 3.0 xHC") Reported-by: Oliver Neukum <oneukum@suse.com> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 93a8639 commit 2419f30

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/usb/host/xhci.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,6 +1863,8 @@ struct xhci_hcd {
18631863
unsigned sw_lpm_support:1;
18641864
/* support xHCI 1.0 spec USB2 hardware LPM */
18651865
unsigned hw_lpm_support:1;
1866+
/* Broken Suspend flag for SNPS Suspend resume issue */
1867+
unsigned broken_suspend:1;
18661868
/* cached usb2 extened protocol capabilites */
18671869
u32 *ext_caps;
18681870
unsigned int num_ext_caps;
@@ -1880,8 +1882,6 @@ struct xhci_hcd {
18801882
void *dbc;
18811883
/* platform-specific data -- must come last */
18821884
unsigned long priv[0] __aligned(sizeof(s64));
1883-
/* Broken Suspend flag for SNPS Suspend resume issue */
1884-
u8 broken_suspend;
18851885
};
18861886

18871887
/* Platform specific overrides to generic XHCI hc_driver ops */

0 commit comments

Comments
 (0)