lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y74bEyUOT3mrAY+I@google.com>
Date:   Tue, 10 Jan 2023 18:12:35 -0800
From:   Benson Leung <bleung@...gle.com>
To:     Prashant Malani <pmalani@...omium.org>
Cc:     linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
        bleung@...omium.org, stable@...r.kernel.org,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Guillaume Ranquet <granquet@...libre.com>,
        Macpaul Lin <macpaul.lin@...iatek.com>,
        Pablo Sun <pablo.sun@...iatek.com>
Subject: Re: [PATCH 2/3] usb: typec: altmodes/displayport: Fix pin assignment
 calculation

On Wed, Jan 11, 2023 at 02:05:42AM +0000, Prashant Malani wrote:
> Commit c1e5c2f0cb8a ("usb: typec: altmodes/displayport: correct pin
> assignment for UFP receptacles") fixed the pin assignment calculation
> to take into account whether the peripheral was a plug or a receptacle.
> 
> But the "pin_assignments" sysfs logic was not updated. Address this by
> using the macros introduced in the aforementioned commit in the sysfs
> logic too.
> 
> Fixes: c1e5c2f0cb8a ("usb: typec: altmodes/displayport: correct pin assignment for UFP receptacles")
> Cc: stable@...r.kernel.org
> Cc: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
> Signed-off-by: Prashant Malani <pmalani@...omium.org>

Reviewed-by: Benson Leung <bleung@...omium.org>


> ---
>  drivers/usb/typec/altmodes/displayport.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c
> index f9d4a7648bc9..c0d65c93cefe 100644
> --- a/drivers/usb/typec/altmodes/displayport.c
> +++ b/drivers/usb/typec/altmodes/displayport.c
> @@ -427,9 +427,9 @@ static const char * const pin_assignments[] = {
>  static u8 get_current_pin_assignments(struct dp_altmode *dp)
>  {
>  	if (DP_CONF_CURRENTLY(dp->data.conf) == DP_CONF_DFP_D)
> -		return DP_CAP_UFP_D_PIN_ASSIGN(dp->alt->vdo);
> +		return DP_CAP_PIN_ASSIGN_DFP_D(dp->alt->vdo);
>  	else
> -		return DP_CAP_DFP_D_PIN_ASSIGN(dp->alt->vdo);
> +		return DP_CAP_PIN_ASSIGN_UFP_D(dp->alt->vdo);
>  }
>  
>  static ssize_t
> -- 
> 2.39.0.314.g84b9a713c41-goog
> 

-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
bleung@...gle.com
Chromium OS Project
bleung@...omium.org

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ