Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp453101lqb; Thu, 14 Mar 2024 16:56:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVMZHQ2vp9BKO05To4Hm9CqKjbSnzS1zb1FrxDiXm+kQ6iO4zziqB2MUSwkgjMtqwjsrxjH0RektUukSEHiw5HcbqEnbeWrEeHlgjNiYQ== X-Google-Smtp-Source: AGHT+IFqh0MRQGVw1UIxQeffLGNehjU7+DQLxqg/WJm0b60GgZmHbBVZjTqwmFc8M5QoNkRf2OGt X-Received: by 2002:a17:906:410b:b0:a46:17dd:33da with SMTP id j11-20020a170906410b00b00a4617dd33damr1587485ejk.29.1710460571369; Thu, 14 Mar 2024 16:56:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710460571; cv=pass; d=google.com; s=arc-20160816; b=MF+bb4GOZJWRX5SqkOQpyP2sEHAvd2uRYXySWJ0ILuxO8E//7bD1njM+C2dc1HC2Gt W489+HpcaCM956WFFzmH8q9d5WDNeyrX4cYEXoRZPri/TIImxVeQhJj4m0SV+AnZCv3r +3rljsGLBCISdej8ipTpA8t9PEGTynOsZB5WcVIewwSX7cPLYlNGBsHi5R0mV4kcPIJA FcujTt3UyXBIXB+UbyeRmAh3wdscG/aCS+rlwTDWnrlPgBWSQmOHwUzvmPIWfWeWN7vj RD6GEsSXAaC7uLEZDaTE5CP4SXHiZDjFDhPCWeyknT8+JLA8QQQ44rh5FLSjEpQ0OAaV 4LeA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=x+U5NBs6WRZY8QHIXBoAKLIZmwg0dfigkJKpGoGlj90=; fh=R8E1QfIlHvcpdVCXH54LUu+PU6AMPE7nmYroWZB5gU4=; b=rYMc1QhOFOHo9dOe9mRt/WtnXSxKPQJWcWPQOoN938ueInctGmOukflbwj/Vrusgtj capQJiwqjD6DL5/B8JCzCWwqTuFd6ZHed/KJ+E+X7m+0g0kqGIjqy9TOuJgQYrboAvPc ysHf8UluGclLa8F8eU1xW2v/2TlTunPt8ukf7KlIfnoodwl7R7MCej9wpSZ4T3YLMf0o czxBwAk4XkhES3xkpewfcJTnqwvb8iDSbR7/y6/Ac/IRY404NrShwFUdrSvq1QwgqNkr WVXUnbjPlkXapZSsDrDNI7bvbGms1MT3wCA0EaUt0Feux82/adJ4tXHE90DOPLpPmEfR zvoA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=QbKckNPn; arc=pass (i=1 spf=pass spfdomain=flex--jthies.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-103925-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103925-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a14-20020a170906244e00b00a457d6347cdsi1153327ejb.1038.2024.03.14.16.56.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 16:56:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-103925-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=QbKckNPn; arc=pass (i=1 spf=pass spfdomain=flex--jthies.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-103925-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103925-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0484A1F217E5 for ; Thu, 14 Mar 2024 23:56:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5126D12E6D; Thu, 14 Mar 2024 23:56:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="QbKckNPn" Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (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 267B41079D for ; Thu, 14 Mar 2024 23:55:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710460560; cv=none; b=WPnFUqqy9LiqceGlfnydJ6R3ZRCy+isTmUCkzDJwayHWV6BQbuZSGU3SeGKKBfgb8BGXnANy1Q2sf8eNAZEt7MNMzDdS6LzBs2pbwYBv3g/GYIL/8gWUGVzhcjd2X82u4g4myzRDS/NSkqcp6dmu4TZSnAOM5SnFiluG0Ny7Wnc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710460560; c=relaxed/simple; bh=LjdE53DAeCK/DV4IGBzwE6QKkJ7zjfXL42DBeebkQMg=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=bQdJABoNal0pTtr6eURD66Y3Je2wMCFyXOO3TYFSotci15DEdes6gS2I8NG+EYrdE5gzIsB/Sbtq7SDu0cssS5SRZSPocekyQoHtXfz/yJX6x8zm/0kH+hcBnEUqKU75J0yT1lPO5giJA2wYrYaU2laTZ0OzHEHege+myoldcCA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jthies.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=QbKckNPn; arc=none smtp.client-ip=209.85.128.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jthies.bounces.google.com Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-60a61b31993so27032957b3.1 for ; Thu, 14 Mar 2024 16:55:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1710460558; x=1711065358; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=x+U5NBs6WRZY8QHIXBoAKLIZmwg0dfigkJKpGoGlj90=; b=QbKckNPncs5Bds0MZI0HXsStr3IYzeYe20eyGQQ1NHhNNTWz9N0J78kQ+B7WiCFcFt qbRXmJqO4NU2XiV+pQiJ1ClIJfqBMvt9Q9d3rdWRR5ZQ5Vsvr7uOII8pCOL4KPTkkU4d Xp3T+9u/o4XNN16g5AY4s8Wew0Vq3Z9RGHmeYedWWAjZairN/SKosl2xPLC/2i6BxysP Eg0BwE6ZKcj4SKyab41UgKqV32wMq3gP3AMYo8z1eo0xlHqavLjVjKsgFIp+C7QC6eyr 4zRrJH9WS/u3tZHvzIsnnd7T3EjkLIEdCaTOvhYX3uAaNC+buCg82eZruRA+Bw+YTyoB +o5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710460558; x=1711065358; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=x+U5NBs6WRZY8QHIXBoAKLIZmwg0dfigkJKpGoGlj90=; b=aT5ogH++r0shHM70Nq1IcSukCUDvWQwZg6fcu+4KNPGHacLd95FN7OP0P7+apiAl71 B/EbYiAGDm3VtGiEcYf6yrKE0Pj7kN/SaDn4FFEM4tQLi2wC5FzhlT8HheKliUa5YLNN YBE5IEivd9z6IGTC3AlqxrLDyeUiMTKTqy0SfN2opazMJgpZZ3R1kLZd+QjYUtswrwoo eE/8OODAcD653Fy3q5HMVnGJE+HwHGbjcZA9StFyRiWN2BKaaRb25W+STQc7gRac7PAG yWTbt46JiulNcof9zH7JgpdDlWhYRk7Lwxp84ywKmjKIlWWua71EejDkrjpzz3PBkPeH Dc3w== X-Forwarded-Encrypted: i=1; AJvYcCUA4ka3GF1nH+1TOiOfPmCcRFOiA+zQZ3TH4DwrmR4yw0RbyW11qWHKuIPPnTnyJVMaVey1TiTkvj0yKkH/S35ngL81MX60Vi+Md6Vd X-Gm-Message-State: AOJu0Yy0gFc+vHFjc7/UPh0gF3dCFNR3GhvWG0QnOxNw52rfTlxLNWTQ dXsz9hm9te0WOGhw3fwfH+mDGZXhRLiHOHEjXz5nYoSrYO1ZSXZHYHlCj1zXVzlNo2Fn2Gt9FgM zYg== X-Received: from jthies.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:23db]) (user=jthies job=sendgmr) by 2002:a0d:d808:0:b0:60b:998c:389f with SMTP id a8-20020a0dd808000000b0060b998c389fmr713940ywe.10.1710460558222; Thu, 14 Mar 2024 16:55:58 -0700 (PDT) Date: Thu, 14 Mar 2024 23:55:53 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.44.0.291.gc1ea87d7ee-goog Message-ID: <20240314235554.90079-1-jthies@google.com> Subject: [PATCH v1 0/1] usb: typec: ucsi: Check capabilities before discovery From: Jameson Thies To: heikki.krogerus@linux.intel.com, linux-usb@vger.kernel.org Cc: jthies@google.com, pmalani@chromium.org, bleung@google.com, abhishekpandit@chromium.org, andersson@kernel.org, dmitry.baryshkov@linaro.org, fabrice.gasnier@foss.st.com, gregkh@linuxfoundation.org, hdegoede@redhat.com, neil.armstrong@linaro.org, rajaram.regupathy@intel.com, saranya.gopal@intel.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Hi Heikki, This patch updates the UCSI driver to better check the appropriate capability bit before sending a UCSI command to discovery cable and identity information. These have been tested on a the usb-testing branch merged with a chromeOS 6.8-rc2 kernel. Let me know if you have any questions. Thanks, Jameson Jameson Thies (1): usb: typec: ucsi: Check capabilities before cable and identity discovery drivers/usb/typec/ucsi/ucsi.c | 34 +++++++++++++++++++++------------- drivers/usb/typec/ucsi/ucsi.h | 5 +++-- 2 files changed, 24 insertions(+), 15 deletions(-) base-commit: d99e42ce6b8341d3f09e22c6706461ec900fe172 -- 2.44.0.291.gc1ea87d7ee-goog