Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2797717lqz; Wed, 3 Apr 2024 08:54:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWvwtPb2WgqvWr+n3HLzsOaq3UKWTbie9n2TUGuFe+PE3SJ6sby0Lygd8lOgQ5FdvXPAaw9tXQicVBnujEKb076l71fV+RPGuRxTbk7OA== X-Google-Smtp-Source: AGHT+IEMSqrU8FsfLsrC2tmWxe1ce41ddupTNX0Ofhh4WOezzFiaT9M8hrTBTuhS093+jnTPW/pP X-Received: by 2002:a17:906:3397:b0:a46:da57:6ee4 with SMTP id v23-20020a170906339700b00a46da576ee4mr11768325eja.73.1712159651928; Wed, 03 Apr 2024 08:54:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712159651; cv=pass; d=google.com; s=arc-20160816; b=H1yWCjMPV2x/ljug3+wbq/v2bY0CEfElkSBY7pK92H+Gk3J4hAwtYj5CwfszSTLMao N1vnKXoeI/Wj6P0BtOtPeh3piEQYjTPH9BMGnYgE9iF/sl49daHgqZ7q5uDRl8+JupWi Jt/n1ehV8VQAka/7QtLFfQ1/Dv5SiNlbtiaG3itCywL9wyHD2MZrmBFPdJueZcZ9mAf5 UjcHTITaPzD1vOC98wDBwRDVetLcTT0NqDT6rfdUdiemYSNt5XyduobmtRA2UZiJu4bQ mkf4+M+j8CMy7isXiQ0tsCCka8VCJTf2srIYnoGPefTvUgVlyiVZqIb8X10ULkJNcrXO 5iOQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=a2WnwoOOKsM9kX0jgQkBy+Lb7RQoY/o85gLjZ4RuuJs=; fh=wZWg+PVpIxzV+8ztY7SVFUDcz0xd8FSOF5xQE4oUoA0=; b=OknxEfb48BHuJ5xRygAxiykw5uUYJVN6obgE+v+pwop0Z6foqwjNmcOlSmDj7EdrRq RN/LNSbPk47mtc94CREQ0cFjDi489VQVyj/Np5jTGtKWvFveRp2XLFNAQX58rmRluEee J9R2srxf2yW7HVcUxq5XegmFAhJWFBIfZqzUwJcUISqDTJt1soy0vJuupkamBDx9hzLa ThR4d5367YyeZ+Ayf2cOIkYDzVL7zUBTmXJAAAcZMesrO45k+q3eqCqe4ibDU8pg2Pba iqdLyx7tF+s4AwsFqKTgicLk6y36/rYooLbq0S9/qsboFkWfjULWp9tK0LpnyFKDwmHo srYw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="kqv1XO6/"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-129597-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129597-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z21-20020a170906435500b00a4dffdd957fsi6658816ejm.704.2024.04.03.08.54.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 08:54:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-129597-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=@intel.com header.s=Intel header.b="kqv1XO6/"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-129597-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129597-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 26FC61F2FEAB for ; Wed, 3 Apr 2024 10:45:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5EB6A1419B5; Wed, 3 Apr 2024 10:44:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="kqv1XO6/" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (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 51062433AD; Wed, 3 Apr 2024 10:44:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712141045; cv=none; b=QwQkDKjuEpZIjMHB4hFsekh9sDjEm2qDVGS3PGldb+tpyFiLK6me9IQ5nqZYGmN10Tgxi1sYs0U+KUahsZeB2KAstV/H1ET42yiZKdMndfFidGNZ0LodpsqtX6ht8W5ADM1FUEwAJviKfPVnjxbGZY/qtiAqo4OPkyIOsyXIPA8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712141045; c=relaxed/simple; bh=gFVgV8VnIJkjPewJOuua6XWcrrzgQB0ahlVwO9D7s08=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CLZTZEAIiPlG7IFzkF/Thh6LBMffTh4O4w/6/GbaCwgjtJDROVwVSmu2ujYn2/bJ7DW/QqsaHNKn/wxj0VjXkgxYuCPSHxteEAl+KQZCvF6ghWH1iDzleU4dVxsjjsl96KaFqp1kaToNx0j2b0y3/EoaYHu3O8z2UgeNppBHLSU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=kqv1XO6/; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712141044; x=1743677044; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=gFVgV8VnIJkjPewJOuua6XWcrrzgQB0ahlVwO9D7s08=; b=kqv1XO6/jE3QAq96Y1dUPF/V+hncVfDZ0b5boI8aDShPnewRZWYD+NSQ 0R6P+OfMHGq0+PpmhY7B6FJa/VAzGDQrqP97oGyR4KtS76cHg61ipEKMi yq9rj1VkxLJsmE+eycT01nqQ00urIb8h7d5NQ+1trS02hkiYPLALn7p5b msn6htThA84T0RAieeMlX8MERozl6aLrUlunsHjeViIVc8BUD42oyDNCq SPXdR8/3LkH3Zu6II49saTCV2fvwR5d7v86A983dMIiOQOVa+OcQjJz7K u7iPr3rD+EeUx1TApUHYdu/yxlWjUH4lDOzy0LDT24qGkdz4ZGoah4LYs A==; X-CSE-ConnectionGUID: m/gP52CeSF6dal/sMK+SqA== X-CSE-MsgGUID: SLHEopTtS9yYtBrRqcrIog== X-IronPort-AV: E=McAfee;i="6600,9927,11032"; a="10331690" X-IronPort-AV: E=Sophos;i="6.07,177,1708416000"; d="scan'208";a="10331690" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2024 03:40:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11032"; a="937084845" X-IronPort-AV: E=Sophos;i="6.07,177,1708416000"; d="scan'208";a="937084845" Received: from kuha.fi.intel.com ([10.237.72.185]) by fmsmga001.fm.intel.com with SMTP; 03 Apr 2024 03:40:45 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Wed, 03 Apr 2024 13:40:45 +0300 Date: Wed, 3 Apr 2024 13:40:45 +0300 From: Heikki Krogerus To: "Christian A. Ehrhardt" Cc: linux-kernel@vger.kernel.org, Dmitry Baryshkov , Diogo Ivo , Greg Kroah-Hartman , Prashant Malani , Jameson Thies , Abhishek Pandit-Subedi , Neil Armstrong , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Samuel =?utf-8?B?xIxhdm9q?= , linux-usb@vger.kernel.org Subject: Re: [PATCH 3/3] usb: typec: ucsi_acpi: Remove Dell quirk Message-ID: References: <20240327224554.1772525-1-lk@c--e.de> <20240327224554.1772525-4-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 In-Reply-To: <20240327224554.1772525-4-lk@c--e.de> On Wed, Mar 27, 2024 at 11:45:54PM +0100, Christian A. Ehrhardt wrote: > The Dell quirk from ucsi_acpi.c. The quirk is no longer > necessary as we no longer send lone connector change acks. > > Signed-off-by: Christian A. Ehrhardt Reviewed-by: Heikki Krogerus > --- > drivers/usb/typec/ucsi/ucsi_acpi.c | 53 +----------------------------- > 1 file changed, 1 insertion(+), 52 deletions(-) > > diff --git a/drivers/usb/typec/ucsi/ucsi_acpi.c b/drivers/usb/typec/ucsi/ucsi_acpi.c > index cc03a49c589c..8d112c3edae5 100644 > --- a/drivers/usb/typec/ucsi/ucsi_acpi.c > +++ b/drivers/usb/typec/ucsi/ucsi_acpi.c > @@ -23,7 +23,6 @@ struct ucsi_acpi { > void *base; > struct completion complete; > unsigned long flags; > -#define UCSI_ACPI_SUPPRESS_EVENT 0 > #define UCSI_ACPI_COMMAND_PENDING 1 > #define UCSI_ACPI_ACK_PENDING 2 > guid_t guid; > @@ -129,49 +128,6 @@ static const struct ucsi_operations ucsi_zenbook_ops = { > .async_write = ucsi_acpi_async_write > }; > > -/* > - * Some Dell laptops don't like ACK commands with the > - * UCSI_ACK_CONNECTOR_CHANGE but not the UCSI_ACK_COMMAND_COMPLETE > - * bit set. To work around this send a dummy command and bundle the > - * UCSI_ACK_CONNECTOR_CHANGE with the UCSI_ACK_COMMAND_COMPLETE > - * for the dummy command. > - */ > -static int > -ucsi_dell_sync_write(struct ucsi *ucsi, unsigned int offset, > - const void *val, size_t val_len) > -{ > - struct ucsi_acpi *ua = ucsi_get_drvdata(ucsi); > - u64 cmd = *(u64 *)val; > - u64 dummycmd = UCSI_GET_CAPABILITY; > - int ret; > - > - if (cmd == (UCSI_ACK_CC_CI | UCSI_ACK_CONNECTOR_CHANGE)) { > - cmd |= UCSI_ACK_COMMAND_COMPLETE; > - > - /* > - * The UCSI core thinks it is sending a connector change ack > - * and will accept new connector change events. We don't want > - * this to happen for the dummy command as its response will > - * still report the very event that the core is trying to clear. > - */ > - set_bit(UCSI_ACPI_SUPPRESS_EVENT, &ua->flags); > - ret = ucsi_acpi_sync_write(ucsi, UCSI_CONTROL, &dummycmd, > - sizeof(dummycmd)); > - clear_bit(UCSI_ACPI_SUPPRESS_EVENT, &ua->flags); > - > - if (ret < 0) > - return ret; > - } > - > - return ucsi_acpi_sync_write(ucsi, UCSI_CONTROL, &cmd, sizeof(cmd)); > -} > - > -static const struct ucsi_operations ucsi_dell_ops = { > - .read = ucsi_acpi_read, > - .sync_write = ucsi_dell_sync_write, > - .async_write = ucsi_acpi_async_write > -}; > - > static const struct dmi_system_id ucsi_acpi_quirks[] = { > { > .matches = { > @@ -180,12 +136,6 @@ static const struct dmi_system_id ucsi_acpi_quirks[] = { > }, > .driver_data = (void *)&ucsi_zenbook_ops, > }, > - { > - .matches = { > - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), > - }, > - .driver_data = (void *)&ucsi_dell_ops, > - }, > { } > }; > > @@ -199,8 +149,7 @@ static void ucsi_acpi_notify(acpi_handle handle, u32 event, void *data) > if (ret) > return; > > - if (UCSI_CCI_CONNECTOR(cci) && > - !test_bit(UCSI_ACPI_SUPPRESS_EVENT, &ua->flags)) > + if (UCSI_CCI_CONNECTOR(cci)) > ucsi_connector_change(ua->ucsi, UCSI_CCI_CONNECTOR(cci)); > > if (cci & UCSI_CCI_ACK_COMPLETE && > -- > 2.40.1 -- heikki