Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1075478rdh; Fri, 24 Nov 2023 04:57:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IGsEDsR7Nd/qHZer0zfeniMaEuikKqjE7VZDNDATxxjVdMoKCF7OcdkYGgOLHjv0BaZ6Yzc X-Received: by 2002:a05:6e02:1b0f:b0:35b:41a7:3bc4 with SMTP id i15-20020a056e021b0f00b0035b41a73bc4mr3193251ilv.13.1700830630881; Fri, 24 Nov 2023 04:57:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700830630; cv=none; d=google.com; s=arc-20160816; b=EojtYIUj2ldbUchjvWxAm+8OUZS0vJ1hrYgQ4CUX0EMnda1jcgIU7DRyXAT9rpBsw6 VChe512egWtOfgJ5AIT8JFCy0+Fk/inh1iyH7HW8+PztGN0clGYWkWrfZGWUg+uG7OlR leVR+EUhWcbT/e/xyLUyrJCH11A7OYWiyEa+TeasqCp0H6OYanFi3W9fIJESEIdhQNOM MQogRvz9BR7rTC3MzZaQV3uHEE2AV7HBpDyf/nl38aaBqZucdvbOVpuOXOjc4hkrxHgt 8xu6W5vFYq+hYxOzN6Am6Qp51J13BmN3KLUvB0BT8VMq4+HIDugc1cp4vU3SAZkSuM3K NStg== 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:dkim-signature; bh=hq0MtWPUEQh3rkhn82LNyFx36mqZqO4JIttEzTWgfsY=; fh=+6OIeCl1nFEwhaiJrnAaplqrdaXnW3y/xxHkCydXbLI=; b=DMM7fOF5egDD0hDk3Addm9j2nX4O6F7Fz9tPn21R/AvgGQEmJcgl+DpaIh2PXFzx4E gAl9Aj7Zuq1w9xRfjihkzRwzvNb3Gp6siNs6gmNDDR4x0GyhKk+CTNOdyMspd/WEih+3 PFLWakPPyK3wHPYIbpu2rNB0xS6PzOmd/t1Y7zALnwhA2jW4jGvHkj25jSVoSbDYoiTf NXwadgCUyvo1j9P1VsLYrGJhVcZDMNljx85XB9sZIIqyrT0Eq2CdnQyJZYilmLFUkhHh QlpQyDwLn3npSS32TXfaynXiDwDOaWc+Mcn7SfdtKY0q2B8Uw0jHUXw6QJdnF9sgQlSN isVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XGO9GYcV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id p24-20020a634f58000000b005af21fd2c6fsi3507264pgl.898.2023.11.24.04.57.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 04:57:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XGO9GYcV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 47E308081F74; Fri, 24 Nov 2023 04:56:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230389AbjKXMzr (ORCPT + 99 others); Fri, 24 Nov 2023 07:55:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229742AbjKXMzq (ORCPT ); Fri, 24 Nov 2023 07:55:46 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 682B710E4; Fri, 24 Nov 2023 04:55:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700830553; x=1732366553; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=0CJxRztR8sP9yMA/a6oz2vAEEQEj6uTdKxgPbgOsEUU=; b=XGO9GYcVle02jjOEVNlICY6HYMhVWz1vInqD0ra3Rx8s2A3TvaWnODgm D8vU/m7mVqaZaXkQ4TY3+9WNL3A1veHB93FuBNUS+HfgqK+If/+ITqX1E 4m1gjLaSMKqcS9jxaddrC+57wWZ+RQVVfLsVVTSaapVA5VU1Y4V8otdDK UZ+vt7yIibH4ldFr6tC3X8uAq/OygCO9RJATQtNfkyorSNncTwMgVw8Qi SV2x0zWpWkqIRk7IbUyWf56Nzdbw/DP/OXu0EGzGBZlifY95nwVOGlrtx oyvbbnD+UtjVoxH2XMzlbgefkGXCori8QQwdSAJZppbhfvHdCdC3gSXHI A==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="372582127" X-IronPort-AV: E=Sophos;i="6.04,224,1695711600"; d="scan'208";a="372582127" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 04:55:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="858380941" X-IronPort-AV: E=Sophos;i="6.04,224,1695711600"; d="scan'208";a="858380941" Received: from kuha.fi.intel.com ([10.237.72.185]) by FMSMGA003.fm.intel.com with SMTP; 24 Nov 2023 04:55:50 -0800 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Fri, 24 Nov 2023 14:55:49 +0200 Date: Fri, 24 Nov 2023 14:55:49 +0200 From: Heikki Krogerus To: Paul Menzel Cc: linux-usb@vger.kernel.org, LKML , Hans de Goede Subject: Re: Unplugging USB-C charger cable causes `ucsi_acpi USBC000:00: ucsi_handle_connector_change: ACK failed (-110)` Message-ID: References: <2bfe2311-27a6-46b5-8662-ba3cbb409f81@molgen.mpg.de> <6288389c-59cb-4eb4-bbe6-163413db7b7e@molgen.mpg.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6288389c-59cb-4eb4-bbe6-163413db7b7e@molgen.mpg.de> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 24 Nov 2023 04:56:11 -0800 (PST) Hi, > > Just list what you have in /sys/class/typec/ before and after plugging > > a device to the port: > > > > ls /sys/class/typec/ > > Sorry, here you go: > > With charger: > > $ ls /sys/class/typec/ > port0 port0-partner > > After unplugging the charger: > > $ LANG= ls /sys/class/typec/ > port0 Thanks. The interface does not appear to be completely stuck, which is what I wanted to check. > By the way, Linux logs the ucsi_handle_connector_change line around five > second after unplugging the USB Type-C charger cable. > > Kind regards, > Paul > > PS: In the logs since October 30th, I see the three distinct lines below: > > 1. ucsi_acpi USBC000:00: failed to re-enable notifications (-110) > 2. ucsi_acpi USBC000:00: GET_CONNECTOR_STATUS failed (-110) > 3. ucsi_acpi USBC000:00: ucsi_handle_connector_change: ACK failed (-110) > > Is it documented somewhere what -100 means? That is the error code, and 110 means Timeout. The driver waits 5s, which should be more than enough. If the firmware does not respond within that 5s, it will most likely never respond. Two of those errors mean that the driver has sent a command to the firmware but the firmware never completes the command. The ACK failure means that the driver tries to acknowledge a connector change event (that you get for example when you plug or unplug the cable) indicating that the driver has now processed the event, but the firmware does not react to that acknowledgement like it should. So the firmware is not behaving correctly in all these cases. I could try to see if we can workaround those issues, but I would need to be able reproduce the problems. Unfortunately I do not have XPS 13 9360. But none of those problems are critical if the interface really continues to work. thanks, -- heikki