Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp632019pxu; Fri, 23 Oct 2020 09:23:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwskxnsNPJglCszrqowzD5putCUhp1/LRa3Qw1TtdD2ufiWQPfj1dIoIJdGmgoQPmXt10cC X-Received: by 2002:aa7:ccc8:: with SMTP id y8mr3051216edt.325.1603470199375; Fri, 23 Oct 2020 09:23:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603470199; cv=none; d=google.com; s=arc-20160816; b=N/u49XQShWDdJ1nhRzl1t4Nvjnd8Bl6M1ERBIYjvUWc2K8LtlxftCud2qZ26ZZarzV pWln2EZXks+MGRt80MSbpMN3A2ufhTVdhVdKOUD0eKALUsY0GktKgWgyMCtOidlHrMtC KRSTYxQ43pAv9xzaADdKgU2yH6Bu8wsxmxC0my9OOMUE/fUyyfnwgI3WTtKn4fx18yF7 6cPh1G9vnZpjBOGWOB2RGXL3R07hVm+pJa2AzxuPXgaJ7SBnv/THZnHiMv3VWNSJru5K hGA1PW2p8k+zCBHNMIRjwAmxziAqsbGE+jtmgIj3nheWKXue2j8EDBhDHxX4x7W6RS4l qdnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:ironport-sdr :ironport-sdr; bh=+NFUc01kjWTWN86qNPJUPrQ9IksBpKwl5DziMZFZsO4=; b=zLMJnQpB6Q/YiYSJPuLjs1yUC7xWE6EJjvIxvNwWuDOh7C5RuE6jakm2ZbwlbAGec+ COz7UmE1AdHHx+PLuUnZnk3h/KwHHM22qxWKRig5hImNtzQ/oEUAoBcdKwtD9OBGWUkO OyPDRbm7pLf+kLIadcG4hKACi10SBCNdfxGbYx191IjRy7YFF+MpIh/4KFdx3mD1X6pr OCNJ6OgNKBND/+MiASvF50qb4rhIJc/V8E3Q9ss538s0gg3DH8plRzzSY/GklrZGdNWQ 8FS3kh1ALn2reXU0mgp9EiVITZ/9wOckNyTh2IIAX8Gmh9VVIYs/5zXd+SvyqrYwRZeI ACHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b12si1060323edz.165.2020.10.23.09.22.57; Fri, 23 Oct 2020 09:23:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S374124AbgJWOVE (ORCPT + 99 others); Fri, 23 Oct 2020 10:21:04 -0400 Received: from mga05.intel.com ([192.55.52.43]:10944 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S373823AbgJWOVE (ORCPT ); Fri, 23 Oct 2020 10:21:04 -0400 IronPort-SDR: 8gxkZ/JEbeRIYgfZr1HqtrUKwnkVIcBsj+gA72Q3/NfjWzUtv1j1ZzTBbV0KzZbfT1iME59r8T 9MkEHs5H6Cgw== X-IronPort-AV: E=McAfee;i="6000,8403,9782"; a="252379920" X-IronPort-AV: E=Sophos;i="5.77,408,1596524400"; d="scan'208";a="252379920" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Oct 2020 07:21:01 -0700 IronPort-SDR: MGZKyQLRBj289A0js6fkWAKaqtHtr3cSTsFhDczinfo1hYeZIYRh8vKzfXW/J2iIVbcSilHEA4 fhj23Pe04DdQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,408,1596524400"; d="scan'208";a="423437822" Received: from kuha.fi.intel.com ([10.237.72.162]) by fmsmga001.fm.intel.com with SMTP; 23 Oct 2020 07:20:58 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Fri, 23 Oct 2020 17:20:57 +0300 Date: Fri, 23 Oct 2020 17:20:57 +0300 From: Heikki Krogerus To: Benjamin Berg Cc: linux-usb@vger.kernel.org, Greg Kroah-Hartman , Guenter Roeck , linux-kernel@vger.kernel.org, Benjamin Berg , Hans de Goede Subject: Re: [PATCH 0/2] UCSI race condition resulting in wrong port state Message-ID: <20201023142057.GC614478@kuha.fi.intel.com> References: <20201009144047.505957-1-benjamin@sipsolutions.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201009144047.505957-1-benjamin@sipsolutions.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 09, 2020 at 04:40:45PM +0200, Benjamin Berg wrote: > From: Benjamin Berg > > Hi all, > > so, I kept running in an issue where the UCSI port information was saying > that power was being delivered (online: 1), while no cable was attached. > > The core of the problem is that there are scenarios where UCSI change > notifications are lost. This happens because querying the changes that > happened is done using the GET_CONNECTOR_STATUS command while clearing the > bitfield happens from the separate ACK command. Any change in between will > be lost. > > Note that the problem may be almost invisible in the UI as e.g. GNOME will > still show the battery as discharging. But some policies like automatic > suspend may be applied incorrectly. > > Cc: Hans de Goede > Cc: Heikki Krogerus Both patches: Acked-by: Heikki Krogerus > Benjamin Berg (2): > usb: typec: ucsi: acpi: Always decode connector change information > usb: typec: ucsi: Work around PPM losing change information > > drivers/usb/typec/ucsi/ucsi.c | 125 ++++++++++++++++++++++++----- > drivers/usb/typec/ucsi/ucsi.h | 2 + > drivers/usb/typec/ucsi/ucsi_acpi.c | 5 +- > 3 files changed, 110 insertions(+), 22 deletions(-) thanks, -- heikki