Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp486231rdb; Mon, 15 Jan 2024 04:03:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IExQOQvU8GfIt9dpaBZJGRN2oMUHm5CKX4fonlWQY29aDZcmQZQi18j7J0SezVr68OVWHKN X-Received: by 2002:a05:6a20:958e:b0:19a:fe7a:89cb with SMTP id iu14-20020a056a20958e00b0019afe7a89cbmr738315pzb.20.1705320225720; Mon, 15 Jan 2024 04:03:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705320225; cv=none; d=google.com; s=arc-20160816; b=x4sjPUlM1w0zJ9z/vQpu2coN97JHh95HlY29HR4kgfvyDlZpgd23ip90EdasIuljkJ e7BA1hA7VMKMFJOvFF/IYnJHW2MqX/mpMT5jIXK6vYuxNU/A27PizwHodpx4VFAexi/e G7cKR8bGXxkAKp5gjuoXeiZJ5hgWiHo1+c8rr/OPTWnPGL+3cAlYmZ7w6LPTUu5n1gJE OnHA9LS8Xt7yBqLVVBtqciTF+qHdahcA8xxC2BpD+5T7XKnYUXNDmICkDeS/E6XgaSXQ DWA1E+tJNVhTQt47zulbxhoPJe5o5kctN6VJohaMwRAwwIZCzvwYo1kYMVNd/80bGafo 1Q3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date; bh=l5zK2lGoH2XkWOGkzrLtRGUUezfRImuySXkKki8ywTY=; fh=dHwRkioPH/cHPWJJlo1IzFBx1zn2DwKu5PS7LnS1UBk=; b=0Bk343F1IpSOgYCdiok2iB4GUsr6HC/3aR5kVH1N+I+Y69JuwK/bA7zusibccpNJj0 an1fIQ4X4BEo5YELUNZOTkS6sqA9OFgUlzCMndhU2SIGhFXog1Q8IePBJ5wcRvwEb38X y5WNNf9vgx5w5e46kOW8miMyNAVYMJP8fQ8x+SjL/sSJPqCP9Ts/fzcwKniizq4CGNw2 Hv2MujC3Hp+Ss8ljIK5viHgV/m+gU548O1NhJYN/K2altmuLqkrrpGq+5EmUmIR8vqDz 1s3LFF8+GDBfMnlpMXQPmuQpx1wZNass5mBRZtwML2kRtKJZMe1sjN4xaSJnIT1EMKP6 xxsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-25948-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25948-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id w128-20020a636286000000b005ce03f5c6ddsi8943667pgb.772.2024.01.15.04.03.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 04:03:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25948-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-25948-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25948-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 A626AB21893 for ; Mon, 15 Jan 2024 12:03:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 19F452C6A0; Mon, 15 Jan 2024 12:03:25 +0000 (UTC) Received: from cae.in-ulm.de (cae.in-ulm.de [217.10.14.231]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C7C81E865; Mon, 15 Jan 2024 12:03:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=c--e.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=c--e.de Received: by cae.in-ulm.de (Postfix, from userid 1000) id F0DD414035E; Mon, 15 Jan 2024 12:57:23 +0100 (CET) Date: Mon, 15 Jan 2024 12:57:23 +0100 From: "Christian A. Ehrhardt" To: Heikki Krogerus Cc: linux-usb@vger.kernel.org, Dell.Client.Kernel@dell.com, Greg Kroah-Hartman , Neil Armstrong , Hans de Goede , Jack Pham , Fabrice Gasnier , Samuel =?utf-8?B?xIxhdm9q?= , linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/4] usb: ucsi: Apply UCSI_ACK_CONNECTOR_CHANGE_ACK_CMD to Dell systems Message-ID: References: <20240107001701.130535-1-lk@c--e.de> <20240107001701.130535-5-lk@c--e.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: Hi Heikki, On Mon, Jan 15, 2024 at 11:05:36AM +0200, Heikki Krogerus wrote: > Hi Christian, >=20 > On Sun, Jan 07, 2024 at 01:17:01AM +0100, Christian A. Ehrhardt wrote: > > Apply the UCSI_ACK_CONNECTOR_CHANGE_ACK_CMD to all Dell systems. > >=20 > > There are various reports that ucsi does not work on Dell systems > > with "GET_CONNECTOR_STATUS failed". At least some of these are > > most likely due to the need for this quirk. > >=20 > > If the logic is wrong users can still use the new quirk override > > for the typec_ucsi module to disable the quirk. > >=20 > > Signed-off-by: Christian A. Ehrhardt > > --- > > drivers/usb/typec/ucsi/ucsi_acpi.c | 36 +++++++++++++++++++++++++----- > > 1 file changed, 31 insertions(+), 5 deletions(-) > >=20 > > diff --git a/drivers/usb/typec/ucsi/ucsi_acpi.c b/drivers/usb/typec/ucs= i/ucsi_acpi.c > > index 78a0d13584ad..690d5e55bdc4 100644 > > --- a/drivers/usb/typec/ucsi/ucsi_acpi.c > > +++ b/drivers/usb/typec/ucsi/ucsi_acpi.c > > @@ -27,6 +27,11 @@ struct ucsi_acpi { > > u64 cmd; > > }; > > =20 > > +struct ucsi_acpi_attach_data { > > + const struct ucsi_operations *ops; > > + unsigned int quirks; > > +}; > > + > > static int ucsi_acpi_dsm(struct ucsi_acpi *ua, int func) > > { > > union acpi_object *obj; > > @@ -121,12 +126,30 @@ static const struct ucsi_operations ucsi_zenbook_= ops =3D { > > .async_write =3D ucsi_acpi_async_write > > }; > > =20 > > -static const struct dmi_system_id zenbook_dmi_id[] =3D { > > +static const struct ucsi_acpi_attach_data ucsi_acpi_default_attach_dat= a =3D { > > + .ops =3D &ucsi_acpi_ops, > > + .quirks =3D 0 > > +}; > > + > > +static const struct dmi_system_id ucsi_acpi_quirks[] =3D { > > { > > .matches =3D { > > DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), > > DMI_MATCH(DMI_PRODUCT_NAME, "ZenBook UX325UA_UM325UA"), > > }, > > + .driver_data =3D &(struct ucsi_acpi_attach_data) { > > + .ops =3D &ucsi_zenbook_ops, > > + .quirks =3D 0 > > + }, > > + }, > > + { > > + .matches =3D { > > + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), > > + }, > > + .driver_data =3D &(struct ucsi_acpi_attach_data) { > > + .ops =3D &ucsi_acpi_ops, > > + .quirks =3D UCSI_ACK_CONNECTOR_CHANGE_ACK_CMD >=20 > Please don't add any more quirk flags like that for single user (you > may never have more than the one user for it). Let's just first handle > this with only Dell's like I proposed. >=20 > If there are other platforms that need the same quirk, then we can > start looking at how to share the quirk. Ok, thanks for the feedback. Will do. However, please note that it is not clear if it is all or only some dells that need this. This is the prime reason why I was looking for a way to enable/disable the quirk. regards Christian