Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp458792lql; Mon, 11 Mar 2024 07:45:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU/VIU9gvESc5nnehonmaucGcYXjpOaju0NzEw1Hjs58ICoeNqfPA6Dgpf86471ZC7A+G6T19p4FI9VYrD031ADBRM0DgNJ7GKcLyUjvw== X-Google-Smtp-Source: AGHT+IGQneyUmrz6x22HExtYZBgAEZLTITcCKAIvkGVi+0+qHX1dIk3o/lxrKNQqTjNQKu1It35Y X-Received: by 2002:a17:906:bfe7:b0:a45:f89b:a915 with SMTP id vr7-20020a170906bfe700b00a45f89ba915mr3895682ejb.45.1710168339059; Mon, 11 Mar 2024 07:45:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710168339; cv=pass; d=google.com; s=arc-20160816; b=kzSmazDwtNcwejVP5PX7sR05gA0PaETyU0qWIbUfI3LGgyNKXP0pm08/46RgaGQgIx xFQ1Ks6bdNzOMZ3iCKSiYM5YKoTqhN00fV/hdEzEnvXA0uwNbSCdyKhNZPeguAy7xuri sDOrOZcXnHB93NglSZ8o1pwQIq6u5+LSCCDrKtC16u0KY7oYS7cfUAksEYfFmJL/gc7f 7Ijw10k3BklbSyibSFa2lCy1qonTvzKhqMKML2Pa7lmOSroFGE7oST55j3Q/clN1OPSD 3yGC4M1G3va0N8ftB6C6c72e138ZOY3I1mhYHIcwwFN5EFd+xDo+GoP2xJ82FPQYMzTl mUow== 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=dS0RD4NP4nYM0xX9pXu7CBpa5Z7kk4eKmZrP0C7k8oY=; fh=DHpOBPoPaoDOh4GUP0yMEMBapF4AzQjV2erf1Qxt4GI=; b=BiBrh5cikHzM54+xWudhXhQA61Nq/8NZUAstTo2cVsoW3+nDPDCWvi+XE6ZA96hZyX J3Cs2t5qo7XAyG37mAgAwILIwHEjueartrw4XoL2sFms5KmCugNWTyJvYJGpphUSdcxG bPkzyg+y5+kwE07b4AMud5jrzG2/YC7LHv9Wzk3AIAKrZN1pmZNGYmzULXnkxLJHaPon zAL26/WCHxhwUpU+nFuAVQ7SteE0/xSJo+gok/vQEJzRpNJaOiL3qpnMccsdj94Qqa5Q 7nhtvx8Z5Hxz82KnyxiBVU06vvWzLJoDbZ09AaKg+dQFSqyfzxh+2RSF/7JmkQmwJYL8 HLtA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ZH9tGnJf; arc=pass (i=1 spf=pass spfdomain=flex--kyletso.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-98984-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98984-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 sa33-20020a1709076d2100b00a45c934b6e7si2571621ejc.345.2024.03.11.07.45.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 07:45:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98984-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=ZH9tGnJf; arc=pass (i=1 spf=pass spfdomain=flex--kyletso.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-98984-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98984-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 C58FA1F22F8A for ; Mon, 11 Mar 2024 14:45:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 834C54087A; Mon, 11 Mar 2024 14:45:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ZH9tGnJf" Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (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 479903FB93 for ; Mon, 11 Mar 2024 14:45:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710168326; cv=none; b=Q4bSesve6CLWMi4wsBy50QEbS8BHQNhEqj0/5OxIjPkAU2epGrsI0+hkXAqm+ny7n5U8HjNActHUJSFDCkwtdvNmH9UEWBJX48sY2pnfCF51hnNnbGzTsCw7XyUOp8RadVXI2OzEpV71TOIsD4bY6Nlx1Nkfy74B9/lV5IFmres= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710168326; c=relaxed/simple; bh=i6ug7ibJ0/Kb9CafhzbFo1ueKa9zp2O6WyiYRxRdtrY=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=lID24NRWgpvTY/kd7CEBqKgXYUFptfWsFeF2tKc+yNkoqo16QUZhfKh61HVsDn0cCydnppbMpn90HwaWW5Tp9qbf2Yiw7+60/McBrXESlhro/nfnSbfxgGCj44hFSUw1t5V3QDSLhuVC5XMXdpfCj2k6KHw+8WgwfNbLdZLAZEw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--kyletso.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ZH9tGnJf; arc=none smtp.client-ip=209.85.219.201 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--kyletso.bounces.google.com Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-dc6b26845cdso6660538276.3 for ; Mon, 11 Mar 2024 07:45:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1710168324; x=1710773124; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=dS0RD4NP4nYM0xX9pXu7CBpa5Z7kk4eKmZrP0C7k8oY=; b=ZH9tGnJfUNwiRlzJIKwSIhhnHAcY4Cc5ADBwGH3hKkJlmXODXcILbIEwJ6TGokIAfT Z40R8n1jI35Yu8o2MMea8JiYH4jXW0rBMq22TPb62oZjwUQ/AWXKBLC/MK4hZ7rm6VZe JG6hO3Ltfa0/iRfNjkTsZaWd3+nmIwEEPBknZY9EVXmwHrtuIgKy4aXPA0jrCXCw5xed KTP6jvEkAyWgu0G8DDlQauRV/PxZJNInsxNaYfCr6W8/0pj1tqjyit6sVc6i1YM3FLUI liQ+U7sKXOTH3s9QfqM7/Y2DuZlW//ada4Fp9igEZM+ckAAxi4YbyvHs0fWP5do0w20E jzkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710168324; x=1710773124; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=dS0RD4NP4nYM0xX9pXu7CBpa5Z7kk4eKmZrP0C7k8oY=; b=Ey+CmnXDGzqj3/+DEMCEH/PBkSPRdpi5NNkNE58O6vr1TtcDkNUSo+zn4HR6UAft1C wzzSJiJeNyq8c6MvRGzqTgKrUgZj40fGwXoEFG9l7Fnv7XfoXCbqJ3aDsweqCtE8EyE5 HW3fTNvcMilwHG4z0oitaXJ3BAh5Jo9XjweZDldrXlvL7JPPkdlwHegosVSSDuv0wsXo RF9jgemxjYP5SOY+79maq8EsG8/RqE87aZ5dbQQ3IM6xGJazz+CwXCqEz/CFcBL5et+L Mt+n8hJmgL3UrIOdJRXI8KAM42cv1Et/DXiRSCN7PWGXTg+1sXCWsyjp8h1rWT8q53s2 AdQw== X-Forwarded-Encrypted: i=1; AJvYcCUOlZPLXZbk7D7+THCXwyTbsJCKz+bgFr7UnGaHL0GuxU1BJHQtwBbxHVVyv0Yim+28Rj5XE+KOqq9XNwZJGoyKaxjfGpAbCSlae/Iu X-Gm-Message-State: AOJu0YwItTst35R/nrqVwsS4ku47pET42eWJ/JoRf6ZKsZFL30tR0Te1 1aBvBK1ynmAVooluGeyeHrvwTW9KKkuacAcWq5c3a0JAIiu6JTJsk6GrnxMinPVO8QWhlaQwe8v LsTAhRw== X-Received: from kyletso-p620lin01.ntc.corp.google.com ([2401:fa00:fc:202:a76e:a92b:1d72:6e4b]) (user=kyletso job=sendgmr) by 2002:a05:6902:124c:b0:dc6:d678:371d with SMTP id t12-20020a056902124c00b00dc6d678371dmr1856163ybu.3.1710168324317; Mon, 11 Mar 2024 07:45:24 -0700 (PDT) Date: Mon, 11 Mar 2024 22:45:00 +0800 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.278.ge034bb2e1d-goog Message-ID: <20240311144500.3694849-1-kyletso@google.com> Subject: [PATCH v1] usb: typec: tcpm: Correct port source pdo array in pd_set callback From: Kyle Tso To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org Cc: badhri@google.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Kyle Tso , stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" In tcpm_pd_set, the array of port source capabilities is port->src_pdo, not port->snk_pdo. Fixes: cd099cde4ed2 ("usb: typec: tcpm: Support multiple capabilities") Cc: stable@vger.kernel.org Signed-off-by: Kyle Tso --- drivers/usb/typec/tcpm/tcpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index 3d505614bff1..9485f6373de4 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -6858,7 +6858,7 @@ static int tcpm_pd_set(struct typec_port *p, struct usb_power_delivery *pd) if (data->source_desc.pdo[0]) { for (i = 0; i < PDO_MAX_OBJECTS && data->source_desc.pdo[i]; i++) - port->snk_pdo[i] = data->source_desc.pdo[i]; + port->src_pdo[i] = data->source_desc.pdo[i]; port->nr_src_pdo = i + 1; } -- 2.44.0.278.ge034bb2e1d-goog