Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp937187lqb; Fri, 15 Mar 2024 10:19:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXO0rGpJ5TzCS49L12l6zi+rfQOZn+ZryL6sK+FUMjmQK71ymNd0Rak8U8CRjW8yccR9gqt6CGjMYD4HxHOTf284CIvDeMqcwWEKCcGmg== X-Google-Smtp-Source: AGHT+IFlWwx3BMpgrERzOe8zPsfDas4tAzHIn6N1cuEVyQEXBPivolTk+RZrthD7ym/tTxfQ+FQN X-Received: by 2002:a17:902:ce05:b0:1de:5b40:accf with SMTP id k5-20020a170902ce0500b001de5b40accfmr6898191plg.16.1710523148583; Fri, 15 Mar 2024 10:19:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710523148; cv=pass; d=google.com; s=arc-20160816; b=WoGGQGp6PCiu4EGzhjpIby3zqv4ZcEF1/oC8IXzQc7XVZQb/RE/YqjMIcJ4gYiJNMV xMj/V9PVd/Q5AUeLvH0sefFceIDa+RAux1i4tpQiPr0zy/cjNgwEllHVLNrZtkXx7Qfw asqcupQGb1GOHQfS4u8F8EBLh4FrWy5PTJTz4W4kbyUV24apYV8xxtGQvGFkNzPI+RzD 4FsXxAoy3Iug384iiJwsx5fM13kwlJ6RLRDeuWSov9tPahL6yTmGws1sqdwdyahLDVJ1 5e7X0xM4CyUfIF8rVOZ/BQ1Y1ZRUJg6wc67y/iiERYYrNfvqXrA5pqXSZfveqh2JqIYJ 3V7w== 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=K0Lk8HWqnHbQJBQj87+gDEonLU6JMsaf0/RPTOSJjGs=; b=SS6mceP3y/eUoziALs0L+nooHG5Y8+8TWGJkeRwwvXbW7vEBQgWvVVVOP7iN6mpVeg g15jyGJxFgp8+zryrRu1N430Gkwv3wfuM8VAjFU+zY+b9XFhwB7T4sdalEX+FoGok+t3 EPTcZUhb8Zin91jNKBGhuFjWS+n9+/cFUkdkOgwUyCjRtgr8BU0OH6mc4Tfbq3XBEL7q WFBoGFFgHTnxWPhe0juKco2/le5GTRUo/GSHBal3GIqtH9vEgBTKlVhe1sQC8FE+S5qP cnepM0RQCFd6y2O85cBmXKTHA53dmi0vtA9IHr80Jad0bVKOrVpIG8MLPnSAApxGKEP1 cwhg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=m6luGXXi; 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-104703-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104703-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u8-20020a170903124800b001d99f863c65si3902982plh.154.2024.03.15.10.19.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 10:19:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-104703-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=m6luGXXi; 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-104703-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104703-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 312A4283065 for ; Fri, 15 Mar 2024 17:19:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A0C2482C6; Fri, 15 Mar 2024 17:18:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="m6luGXXi" 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 3C8503DBBC for ; Fri, 15 Mar 2024 17:18:56 +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=1710523138; cv=none; b=cQ/qjU6LPsWxkNIGrHbE/8Qgvh49ttSRdEVaPJ5zZPzpMLEPcx33C9nvkVESOWrQ5Kw8rPtT0PW4LDK+kHGHnmxGxyBCk+vs387LP5AqOQ7801QkH/mR8mrXYk82CMGhTTJ1HM07hV6m7gjRKBZlGzfOZ/Gi5LB6s9s4SyJR66o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710523138; c=relaxed/simple; bh=LjdE53DAeCK/DV4IGBzwE6QKkJ7zjfXL42DBeebkQMg=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=bcuUEJ3DouUvCEr96TRNPBAmxaWguH+qEWNxcLCOS1PH7aPrDBhd4QLtAzh9zf5JVdH4G2ufXZXqMtCPg5TcDMk6ss53yMbdOyXmqiF2a1RVRhFwtZTFVWWcUrKKByO+lRxN91b2+FBZjNblckWaFre7avumb/j9PhO+lsWzQ1I= 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=m6luGXXi; 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-60a08eb0956so37128027b3.3 for ; Fri, 15 Mar 2024 10:18:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1710523136; x=1711127936; 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=m6luGXXi0PWusywGR+Lq/xkyw7xDaTzplPCL5M83eLqy8JEnPGZHJa3IRei94ZXlH8 0DF2tBQX2dvSmk3tw0AEZXIRRYpwusZvxB5bOabQcjedOzF2WIngnXQX7HCrIRmtJuOm 1fAAURqN2TgDvGu2lFUJUcoUx+j1cMpl4NNAfuwSbrJvvPv1Xv1f+B9yEuEjj678BrNe P0Sn0Ivseq5S6b+QrCzRPVIiwuycgY08AFb9N0elYfAlqejMwdZmcok0MIV1cV0uMpKe AFfNKUa4yvK2JigmPy5evrzujpIB9B7JmcOs7EBZ5xnT37/tehRB6etaq6Z9QoH2jdP/ zscA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710523136; x=1711127936; 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=fosUW3U1NLzsFdax1cjBLQ/iD8NFdvfO2iSIDVVqpzFGNy2BcTQoB+t7wLuL/WkA2G tgQjSLYBKDrbBANvxqbnX6KUoBt4AXvjovdAVpCfA5JENG9GMaSkz+TwrBirpZ/44ScU XaE67WtZiLOJ5QBwsUmfpYn8al/fA4lCGg/CzVn1JvmJMYS5/qUNVmFi2kKqtWKwmgHZ 9RpeDkfKMxQIMnvjVI7iag7v7dMkhCRyofzCsWSUbiOz1zf8lHuAvr+4IEZh176ru6l2 +FlVTRp8loTFaqYClInMk5T/tK10BUacoR7S0O84Fer5XsP0rHjZbJkRebg5rJZZvWXD Rjsg== X-Forwarded-Encrypted: i=1; AJvYcCVqiALPywsYXBEjVTUCkE6dAPiV+pA/BFUPGqa9swBtF4aEbxw6Z4iJN0VoYCpv/f9spqQoi3SqxRnmTV76G6Rm9SzZ27RlLkxTM88Y X-Gm-Message-State: AOJu0YxaUPamJ6bqNcX3ZDycpfbe8EK4VVxxS3g3epT3VU1oktqShEiB rDxTdPIoavGzMVBgJPnWQ3UwJ7ij7SKw3yO2IVlYH+mDDHoenT331aAmCtI1/E2TVnHX/XoA8AE 2JQ== X-Received: from jthies.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:23db]) (user=jthies job=sendgmr) by 2002:a81:4ed3:0:b0:60a:5d76:a875 with SMTP id c202-20020a814ed3000000b0060a5d76a875mr890098ywb.5.1710523136230; Fri, 15 Mar 2024 10:18:56 -0700 (PDT) Date: Fri, 15 Mar 2024 17:18:34 +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: <20240315171836.343830-1-jthies@google.com> Subject: [PATCH v2 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