Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp330836lqb; Tue, 4 Jun 2024 12:43:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUUmm8z9ozbHQKnYUwqLbEdSQOdG74DAOOo8tOgIzyS+NaX8WHyWxnr5B6dtCcqWOFr3oVA4d4rudgyuB+5fCfXOOhuZMMDP046nbwpJg== X-Google-Smtp-Source: AGHT+IEv5roa/fdsbGS7Hkit7AnGvauaBZ8P5/TgzLMjeANlipxpCcQC5CpsUqbfXTPy+JX1m8Q4 X-Received: by 2002:a05:6e02:1848:b0:374:9c84:c620 with SMTP id e9e14a558f8ab-374b1f56c8cmr2585435ab.27.1717530203434; Tue, 04 Jun 2024 12:43:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717530203; cv=pass; d=google.com; s=arc-20160816; b=GfwIfuM+khbdGV4XpMYbZLmlL0xaS7TJrcxq+0li7F5k+OZUREibZNf+ec4hoL5c13 Zj+AgyIaYZEHW9YxlSus6CuuhnfnVNfGHa17RAHaIl3ZWbIjX+bWL9sjQTE8xv1u492f m+DA8G2obED4S/NFiOj2nbiBbSP2H4UCHyc5Y6qd1JpUpFzPOQM5SyuYhjlHXpAUDH5O 5NLZ/L4gbK9JTPXeNLXJoW99TuTAzxmjNuqglKpq5n34GYC3Zfl0zlwNuPKqm22iMXjg CxMUGxoadLrpFykwUQ+PIj1C4moFhnpPVQ4ZDQ2lzbT8FI8cCqcjjoQvTWkhIJDKhrzl La0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:feedback-id:dkim-signature:dkim-signature; bh=gXKDVPqqf1TGYrQ6LIKhp12gZIkQFmy4CtG/jgGn/o0=; fh=Lm9iuE/RrXWJfy9+u7Dbq/gmmqY9IlrPi4zZmQEqQhE=; b=RXI6g7wxOU0ecgm8z2hL5bNyQ1EA6monEfRD1Ui5GmSxE8Bvv74DjkvjjIXx8YkAOL /oSRWoxa4kvmmYmPR7FH2ZY9XeprxEixeslbqg+DwA2OrasZQVMjSm4uO60KC2DaZo2z 3Jbt8yBJUUq+n+LXzIHNXorGRA2acMgZv2Vs44sa+74XRPtkcQWVLjOQxJKoblhoVuOT 8oSRsAXm+oxNQ/OUl2DtarQ4FtvqXVREYmDm20GSLdq5mxoBq4tVyBohtV1aFZjSA7n9 JnYaJanUzKb5z0+7g+CEuG1XJ0UHHvaxCcJ0Pm5+PtB90P9qlKZV5Og+PYN0LxWTa4BJ 9V/w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@squebb.ca header.s=fm2 header.b=fji6YQ7O; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=UqcUieXZ; arc=pass (i=1 spf=pass spfdomain=squebb.ca dkim=pass dkdomain=squebb.ca dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-201300-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201300-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c3540fb2c9si9028720a12.171.2024.06.04.12.43.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 12:43:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201300-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@squebb.ca header.s=fm2 header.b=fji6YQ7O; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=UqcUieXZ; arc=pass (i=1 spf=pass spfdomain=squebb.ca dkim=pass dkdomain=squebb.ca dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-201300-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201300-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 5F657B21508 for ; Tue, 4 Jun 2024 19:41:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EB0F214B09E; Tue, 4 Jun 2024 19:41:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=squebb.ca header.i=@squebb.ca header.b="fji6YQ7O"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="UqcUieXZ" Received: from fhigh4-smtp.messagingengine.com (fhigh4-smtp.messagingengine.com [103.168.172.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2AB6645C1C; Tue, 4 Jun 2024 19:41:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.155 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717530095; cv=none; b=gwUEydmZmYyrIqMfESK2kD44Yh5kNaNX0JThbtnY50ue8EchyT+7mQpszkp7+IsI7ESp6BGYwYtZNuqafoj04lPpTgIDzaikz06FpVI/KvogDp5LisgeOiJAisk9hhje56q387BLVZQBmDpazJYdNYdRE7GTcB6hlzAT/LAMuWA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717530095; c=relaxed/simple; bh=cpBzf0bOW6D3PuiqMtlHVXbUX0LGNrVMf6maz1q6McM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pFWskTt+jwfh60BkPetGsyofm+zhfsdIDX4r1oGJxL24/KuGz/QfT6eCfN1vrlfWgnJACdQnrxapUEUT4Ie+ja92eREQMQzbFOhX7LbQ88VshgDn85H8mFdBt4xSToAXndDcpOn5Ph7ZvJ4hVWzYJGQgTB49veDnCbuWGsbDi+c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=squebb.ca; spf=pass smtp.mailfrom=squebb.ca; dkim=pass (2048-bit key) header.d=squebb.ca header.i=@squebb.ca header.b=fji6YQ7O; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=UqcUieXZ; arc=none smtp.client-ip=103.168.172.155 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=squebb.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=squebb.ca Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 2D6BF114011F; Tue, 4 Jun 2024 15:41:31 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 04 Jun 2024 15:41:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=squebb.ca; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm2; t=1717530091; x= 1717616491; bh=gXKDVPqqf1TGYrQ6LIKhp12gZIkQFmy4CtG/jgGn/o0=; b=f ji6YQ7OIvrOJo/BN503HDWEicjDZ3Vk2jU1mruLa59XllPgSF4VP9P7MjAeCpa+R 7EQEjk76hq3DpFIxGhjrCiLI9uGf2KIUEjMan3XFMYk5J53sJ25ITAdZE9MBVpbf AVfv/wVeA9M2Rhxsp8CyjS8ZdmRFmLCsKNvHF7G86q9AEa0wKSYzBPFysi7dMlwq qHV+CuTu11S894N37UVWH8zrYVfDm7ZVTuwHNQ4tohqhaBNb4CkESEG/3sf+IfiJ iZGfnqbC/joZlRLrp+hK/uS2aTVFcVjNDLa1IrHVtqnRCJ8xzP5+xbDLYl6DLHOP 7cGlaOvhD+Dnci/uzDeZg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1717530091; x= 1717616491; bh=gXKDVPqqf1TGYrQ6LIKhp12gZIkQFmy4CtG/jgGn/o0=; b=U qcUieXZrMpVrorQA669EEDh+S+w5MmqMf74TOft4pqpgQtgv3jS+bEJIbvV6dGCd 9dijEDDcVtqq7FgVAEkPXYmbdxW7wPpfCk6LXd+Tu6CmlCX+ipIxbPYkANrOJK/0 beLfCKWpPlpAsHB80nzWUNYhYfRxsrEsNxC0OtugyUCFtGfqPsDUqjWsYVVZu0hu E7WeeFIsv0Ke2LMc9XeaO4eWq771auKeSQtKxZn8kJdKgpPLN4SiUq2q74npJNhw cbMhJqudSwModWIgPYKiN8L/5XUKi7LYY3D3Bml7kQ6ypFAySZQRDAKpHwEjxZkx I5xnoaGG/cFIloWyUaddw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdelgedgudefhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecuogetfedtuddqtdduucdludehmdenucfjughrpe fhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforghrkhcurfgvrghr shhonhcuoehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggrqeenucggtf frrghtthgvrhhnpeeftddvjeefleffvefhgfejjeehudetteeigeeugfekhffhgeejudeu teehgfdvffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggr X-ME-Proxy: Feedback-ID: ibe194615:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 4 Jun 2024 15:41:30 -0400 (EDT) From: Mark Pearson To: mpearson-lenovo@squebb.ca Cc: heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] usb: typec: ucsi: treat get_pdos not supported condition as info instead of error Date: Tue, 4 Jun 2024 15:40:44 -0400 Message-ID: <20240604194056.16625-1-mpearson-lenovo@squebb.ca> X-Mailer: git-send-email 2.45.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On systems where the UCSI PDOs are not supported, the UCSI driver is giving an error message. This can cause users to believe there is a HW issue with their system when in fact it is working as designed. Downgrade message to dev_info for EOPNOTSUPP condition. Tested on Lenovo L14 G5 AMD and confirmed with Lenovo FW team that PDOs are not supported on this platform. Signed-off-by: Mark Pearson --- drivers/usb/typec/ucsi/ucsi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c index cb52e7b0a2c5..090be87d5485 100644 --- a/drivers/usb/typec/ucsi/ucsi.c +++ b/drivers/usb/typec/ucsi/ucsi.c @@ -632,8 +632,12 @@ static int ucsi_read_pdos(struct ucsi_connector *con, command |= is_source(role) ? UCSI_GET_PDOS_SRC_PDOS : 0; ret = ucsi_send_command(ucsi, command, pdos + offset, num_pdos * sizeof(u32)); - if (ret < 0 && ret != -ETIMEDOUT) - dev_err(ucsi->dev, "UCSI_GET_PDOS failed (%d)\n", ret); + if (ret < 0 && ret != -ETIMEDOUT) { + if (ret == -EOPNOTSUPP) + dev_info(ucsi->dev, "UCSI_GET_PDOS not supported on this hardware\n"); + else + dev_err(ucsi->dev, "UCSI_GET_PDOS failed (%d)\n", ret); + } return ret; } -- 2.45.1