From nobody Mon Jun 8 07:24:54 2026 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84BD23BAD88 for ; Mon, 1 Jun 2026 14:28:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780324125; cv=none; b=VJkgcDj6/OXlrBXFQ6xTgFiD2lbj+zUGf1ljoHwH8nPK5HZ6+jADms4Byv0wFQptkBvOmJYByWFGxY1pIGoq45Vqa5Wo5E0jvna3mOaqyLjLzsFGrgp+00uibqqmW2RlBLfZjxk/dBiNWfPQ1KAylpVbX+pDL1ye+4ZbzzaVttc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780324125; c=relaxed/simple; bh=AbXhVcCd73fAAC58JhtFvSP0Bsn1GbJgoYS464W/nkc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=lUqxHB1uVbvcSInQm7IwZELw9UMr8A42ugQxQxv/99aJtj8G7I6NLByvqpSMIKQqyAcvj32uZP9xxyJmlsQVTWmjZZN2Zqd8ScxUR6cru3Su0AXTK5mW2k/Pu+GpwviBOd0BQ2V2z2Dkpni64zrkbD6a98hBPoFh8TWOMgpczRc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=irczHMkU; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="irczHMkU" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-beb1bee8c16so257776666b.0 for ; Mon, 01 Jun 2026 07:28:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1780324122; x=1780928922; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=0qgZZ2KjqH6+dykDseENzBvcCh7IAoqMA3tNRsz9qr8=; b=irczHMkUC7/OCVr5DE8M49rur/I8jbHqOwtkmZgd1/cvfDs/Yk6kdMy7PfyQY8DkFs LubOs+bazsXWZ4rHqI6HVWIWAnt1xXbyCBYkomfvFVA4el32mSyPCW60zFv62L2hgiQl V38XGEZPwNAna64i4x3Fjoae269fcLSeE/uCo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780324122; x=1780928922; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0qgZZ2KjqH6+dykDseENzBvcCh7IAoqMA3tNRsz9qr8=; b=GTTKtfMWjyQZSZs9ZWxDcpxnsSjC3xKMyW9khyTjgiifrfIZ4Is3DE/PpCPW0IJw37 /pyvw8y+zst+dU9SAHoz3GV/iNDdWd2V/FMY1yGZjTwlNtGK9e9x0DWjshik0NV0rof8 7ePZikUsWro4IQVWh7NXtD2nQ7/88puUellyO0GOxOKTHdDhfEaJUV4V5zS/VGQ5elPZ JAc/YFGxCuyPRckwxluL0sPwUYXQcG6NiSJExVxyJKIHeqn+Q+IK0XNELvIdHASIeDLO RCWFb+rn+DEZeFK8XCxx0AcB8Olwks+QAnhvQPYewcZf6xjTyAxg+CMjYIJVhtgxoYNV WkwQ== X-Forwarded-Encrypted: i=1; AFNElJ9WdMS6HdD61hKgKBoCrm5ab7PY/CVGIFH0XZwIvONzYzyyiUd6urePD/cScNO3lijqOtbg4AAlHc3TeHI=@vger.kernel.org X-Gm-Message-State: AOJu0YxblE8JsQ48yhg2sica+fFchGwBmfntw4ih6+6V7nFA8cyxKHUX AUnBU6bhPHZqHzxFvnHSX3NHL8VHy2xqRrGTIdKV9tr8e6IoDJGCrQGvy/5xf3p7GQ== X-Gm-Gg: Acq92OGp5uGCALeeGFRpdze8ZjToHj4HTY5n4TZUZ/tIAEgxWqF9/eJQl+wjyPlJ/XH GIyh79WzA1oTxBkG1ZmFGxSX9kKrWc1yE1X47SewB3QPKqqzPkWQGswATFwbBFYi4/6Ofjj1AWu PAWWvCgYPQ9qcAEC9aEAkk6QgKjE4sajqoNzLDSJDU18JdttfY9wlBvAd6U4FENcUyKDf9QcNRO HDWZi0zUEP7lqRxjqgVB6R5tXNWENFwsaTj/dmqK3RSNHbhImaAIG8rnc8wteiqEQRQW9ArAX9v erTeOQUJNILAUmJJu4zc+VgYLBeWEwWH3MRxPO2gOA6KO+IUg2aZ3iYZ8IGTDp8+zFBMxiC/H4E AVwmuTzm9OsIaKbt2pFj+pfsxWBEqr1ijMVNY6dNgtie4EbSfZyEMOdRcwXoBd8219t90Q8iWte g4Bh4szTzEw4r6nE/3DKnjIr9Y3Tkx2RJu5PDdu6awVP/sW2KCymqYG8UzSBpnKA9VTr5JB2ODI jV0l4Tg+wIJ1ux8p2e4qWlHipndYXA= X-Received: by 2002:a17:907:c16:b0:beb:f357:7755 with SMTP id a640c23a62f3a-bebf3579814mr370481766b.12.1780324121854; Mon, 01 Jun 2026 07:28:41 -0700 (PDT) Received: from akuchynski.c.googlers.com.com (208.220.32.34.bc.googleusercontent.com. [34.32.220.208]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-bee7bdf4438sm46562766b.55.2026.06.01.07.28.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2026 07:28:41 -0700 (PDT) From: Andrei Kuchynski To: Heikki Krogerus Cc: Greg Kroah-Hartman , Pooja Katiyar , Johan Hovold , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Andrei Kuchynski , stable@vger.kernel.org Subject: [PATCH] usb: typec: ucsi: Invert DisplayPort role assignment Date: Mon, 1 Jun 2026 14:28:37 +0000 Message-ID: <20260601142837.3240207-1-akuchynski@chromium.org> X-Mailer: git-send-email 2.54.0.823.g6e5bcc1fc9-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The existing implementation assigned these flags backwards, configuring the partner's DisplayPort role to match the port's role instead of complementing it. This prevents proper configuration during DP altmode activation, often causing `pin_assignment` to remain 0 in `dp_altmode_configure()` and resulting in VDM negotiation failures: [ 583.328246] typec port1.1: VDM 0xff01a150 failed Additionally, the fix ensures that the `pin_assignment` sysfs attribute=20 displays the correct values. Cc: stable@vger.kernel.org Fixes: af8622f6a585 ("usb: typec: ucsi: Support for DisplayPort alt mode") Signed-off-by: Andrei Kuchynski Reviewed-by: Heikki Krogerus --- drivers/usb/typec/ucsi/displayport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/typec/ucsi/displayport.c b/drivers/usb/typec/ucsi/= displayport.c index 8aae80b457d74..669f08013c7ab 100644 --- a/drivers/usb/typec/ucsi/displayport.c +++ b/drivers/usb/typec/ucsi/displayport.c @@ -166,12 +166,12 @@ static int ucsi_displayport_status_update(struct ucsi= _dp *dp) * that Multi-function is preferred. */ if (DP_CAP_CAPABILITY(cap) & DP_CAP_UFP_D) { - dp->data.status |=3D DP_STATUS_CON_UFP_D; + dp->data.status |=3D DP_STATUS_CON_DFP_D; =20 if (DP_CAP_UFP_D_PIN_ASSIGN(cap) & BIT(DP_PIN_ASSIGN_D)) dp->data.status |=3D DP_STATUS_PREFER_MULTI_FUNC; } else { - dp->data.status |=3D DP_STATUS_CON_DFP_D; + dp->data.status |=3D DP_STATUS_CON_UFP_D; =20 if (DP_CAP_DFP_D_PIN_ASSIGN(cap) & BIT(DP_PIN_ASSIGN_D)) dp->data.status |=3D DP_STATUS_PREFER_MULTI_FUNC; --=20 2.54.0.823.g6e5bcc1fc9-goog