All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: oneukum@suse.com, sandeep.singh@amd.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: xhci: fix 'broken_suspend' placement in struct xchi_hcd
Date: Mon, 17 Dec 2018 15:59:28 +0200	[thread overview]
Message-ID: <7ea44e0c-5268-b898-4d27-048921eaab69@linux.intel.com> (raw)

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  <oneukum@suse.com>
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> ---
>   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 {
>   	unsigned		sw_lpm_support:1;
>   	/* support xHCI 1.0 spec USB2 hardware LPM */
>   	unsigned		hw_lpm_support:1;
> +	/* Broken Suspend flag for SNPS Suspend resume issue */
> +	unsigned		broken_suspend:1;
>   	/* cached usb2 extened protocol capabilites */
>   	u32                     *ext_caps;
>   	unsigned int            num_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 <mathias.nyman@linux.intel.com>

Or prefer me to resend it?

-Mathias

WARNING: multiple messages have this Message-ID (diff)
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: oneukum@suse.com, sandeep.singh@amd.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xhci: fix 'broken_suspend' placement in struct xchi_hcd
Date: Mon, 17 Dec 2018 15:59:28 +0200	[thread overview]
Message-ID: <7ea44e0c-5268-b898-4d27-048921eaab69@linux.intel.com> (raw)
In-Reply-To: <20181217133740.5342-1-nsaenzjulienne@suse.de>

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  <oneukum@suse.com>
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> ---
>   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 {
>   	unsigned		sw_lpm_support:1;
>   	/* support xHCI 1.0 spec USB2 hardware LPM */
>   	unsigned		hw_lpm_support:1;
> +	/* Broken Suspend flag for SNPS Suspend resume issue */
> +	unsigned		broken_suspend:1;
>   	/* cached usb2 extened protocol capabilites */
>   	u32                     *ext_caps;
>   	unsigned int            num_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 <mathias.nyman@linux.intel.com>

Or prefer me to resend it?

-Mathias

             reply	other threads:[~2018-12-17 13:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17 13:59 Mathias Nyman [this message]
2018-12-17 13:59 ` [PATCH] xhci: fix 'broken_suspend' placement in struct xchi_hcd Mathias Nyman
  -- strict thread matches above, loose matches on Subject: below --
2018-12-17 14:11 Greg Kroah-Hartman
2018-12-17 14:11 ` [PATCH] " Greg Kroah-Hartman
2018-12-17 13:49 Felipe Balbi
2018-12-17 13:49 ` [PATCH] " Felipe Balbi
2018-12-17 13:37 Nicolas Saenz Julienne
2018-12-17 13:37 ` [PATCH] " Nicolas Saenz Julienne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ea44e0c-5268-b898-4d27-048921eaab69@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=nsaenzjulienne@suse.de \
    --cc=oneukum@suse.com \
    --cc=sandeep.singh@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.