Re: [PATCH] xhci: fix 'broken_suspend' placement in struct xchi_hcd
On Mon, Dec 17, 2018 at 03:59:28PM +0200, Mathias Nyman wrote: > On 17.12.2018 15:37, Nicolas Saenz Julienne wrote: > > As commented in the struct's definition there shouldn't be anything > > underneath it's '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: a7d57abcc8a5 ("xhci: workaround CSS timeout on AMD SNPS 3.0 xHC") > > Reported-by: Oliver Neukum > > Signed-off-by: Nicolas Saenz Julienne > > --- > > drivers/usb/host/xhci.h | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h > > index c3515bad5dbb..011dd45f8718 100644 > > --- a/drivers/usb/host/xhci.h > > +++ b/drivers/usb/host/xhci.h > > @@ -1863,6 +1863,8 @@ struct xhci_hcd { > > unsignedsw_lpm_support:1; > > /* support xHCI 1.0 spec USB2 hardware LPM */ > > unsignedhw_lpm_support:1; > > + /* Broken Suspend flag for SNPS Suspend resume issue */ > > + unsignedbroken_suspend:1; > > /* cached usb2 extened protocol capabilites */ > > u32 *ext_caps; > > unsigned intnum_ext_caps; > > @@ -1880,8 +1882,6 @@ struct xhci_hcd { > > void*dbc; > > /* platform-specific data -- must come last */ > > unsigned long priv[0] __aligned(sizeof(s64)); > > - /* Broken Suspend flag for SNPS Suspend resume issue */ > > - u8 broken_suspend; > > }; > > /* Platform specific overrides to generic XHCI hc_driver ops */ > > > > Thanks, not sure how I missed that. > > Greg, in case you want to pick this simple fix to 4.20 still: > Acked-by: Mathias Nyman I can queue it up, thanks! greg k-h
Re: [PATCH] xhci: fix 'broken_suspend' placement in struct xchi_hcd
On 17.12.2018 15:37, Nicolas Saenz Julienne wrote: As commented in the struct's definition there shouldn't be anything underneath it's '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: a7d57abcc8a5 ("xhci: workaround CSS timeout on AMD SNPS 3.0 xHC") Reported-by: Oliver Neukum Signed-off-by: Nicolas Saenz Julienne --- drivers/usb/host/xhci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index c3515bad5dbb..011dd45f8718 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1863,6 +1863,8 @@ struct xhci_hcd { unsignedsw_lpm_support:1; /* support xHCI 1.0 spec USB2 hardware LPM */ unsignedhw_lpm_support:1; + /* Broken Suspend flag for SNPS Suspend resume issue */ + unsignedbroken_suspend:1; /* cached usb2 extened protocol capabilites */ u32 *ext_caps; unsigned intnum_ext_caps; @@ -1880,8 +1882,6 @@ struct xhci_hcd { void*dbc; /* platform-specific data -- must come last */ unsigned long priv[0] __aligned(sizeof(s64)); - /* Broken Suspend flag for SNPS Suspend resume issue */ - u8 broken_suspend; }; /* Platform specific overrides to generic XHCI hc_driver ops */ Thanks, not sure how I missed that. Greg, in case you want to pick this simple fix to 4.20 still: Acked-by: Mathias Nyman Or prefer me to resend it? -Mathias
Re: [PATCH] xhci: fix 'broken_suspend' placement in struct xchi_hcd
Nicolas Saenz Julienne writes: > As commented in the struct's definition there shouldn't be anything > underneath it's 'priv[0]' member as it would break some macros. its? I guess Mathias can fix when applying. -- balbi signature.asc Description: PGP signature
[PATCH] xhci: fix 'broken_suspend' placement in struct xchi_hcd
As commented in the struct's definition there shouldn't be anything underneath it's '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: a7d57abcc8a5 ("xhci: workaround CSS timeout on AMD SNPS 3.0 xHC") Reported-by: Oliver Neukum Signed-off-by: Nicolas Saenz Julienne --- drivers/usb/host/xhci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index c3515bad5dbb..011dd45f8718 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1863,6 +1863,8 @@ struct xhci_hcd { unsignedsw_lpm_support:1; /* support xHCI 1.0 spec USB2 hardware LPM */ unsignedhw_lpm_support:1; + /* Broken Suspend flag for SNPS Suspend resume issue */ + unsignedbroken_suspend:1; /* cached usb2 extened protocol capabilites */ u32 *ext_caps; unsigned intnum_ext_caps; @@ -1880,8 +1882,6 @@ struct xhci_hcd { void*dbc; /* platform-specific data -- must come last */ unsigned long priv[0] __aligned(sizeof(s64)); - /* Broken Suspend flag for SNPS Suspend resume issue */ - u8 broken_suspend; }; /* Platform specific overrides to generic XHCI hc_driver ops */ -- 2.19.2