Received: by 2002:a05:7412:e79e:b0:f3:1519:9f41 with SMTP id o30csp111199rdd; Wed, 22 Nov 2023 10:40:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IGlT/jIrHqD6GWeLLvW7hSanGPHMEwN4GgDp4QaiIiMA/F+mST5D/m6NmSJ9sY44gQmsPCL X-Received: by 2002:a05:6e02:13e5:b0:357:4a63:2ad2 with SMTP id w5-20020a056e0213e500b003574a632ad2mr3019988ilj.21.1700678407068; Wed, 22 Nov 2023 10:40:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700678407; cv=none; d=google.com; s=arc-20160816; b=z/K6DyN8hu0fOFWOojTSmFftc9iWKDeFsYeSesmGjT49lnok75HOPXAZEcs3kxpx7p eAI7eUcGa7/FEJhiQ00UjBjYFGdatFkfj1cnzEkI36cN4OKHJg5XCVQ79HCl7gwgpC3l UsUWK/GV1tzOXMuqCxaFj0oEoCtjjc6PPgcrKufBp+Etz09Z3mfirorXv754JiHr+3rp jPIwBcIINE2LiMK8XaVBpafNqWImPmY5/AsWT1xscn0WPchzWfGEMCPfpDpZqZyvhhbv wTMSUauSJ+Zmf9I/iMv9q/I9Yj+AR725G85JLysV0cZ5u19TQBZW/xX4QVWyzRcqLIzF Wa2A== 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=s3O8uFiU0D8HtqVpFz6uGqne9qyZzBbI3g8fG/jnOhs=; fh=+6OIeCl1nFEwhaiJrnAaplqrdaXnW3y/xxHkCydXbLI=; b=gUlAti07D/7OTPGmSul2ry+XVwUU0qx7bjdnw1gHdHLGxWy7Kt/Bpe5XhVNZxfnqvz flaFjjechdleywJV7HHLL3tJk8MapCqwOWjavXAZd/9itPHjTPAlY1lzQrRY+DqhQmfj yDvvjPbiBGmxVqFifFMGKAsbjCyjZ7X0L0J7Ok5mssYE99eb6k7E6Ev9VqA2vODOZvwT Ov7+IpcuT7se+y7m/ExVNLBNoPEOw928QN9gmH53fOKfSwWMLfbwk0NrYDMR2Pxppor/ yN/6ezkfcIjh4VZBgWX7gw/P+qOjZ18LwSYuAFnClLUd9A4KBjcMkYpfWUXeKZXdg5LE FAvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bV6hj1in; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id h20-20020a056a00219400b006c34752a6e8si96150pfi.81.2023.11.22.10.40.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 10:40:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bV6hj1in; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id BB40B8075026; Wed, 22 Nov 2023 10:40:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235262AbjKVSjp (ORCPT + 99 others); Wed, 22 Nov 2023 13:39:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235243AbjKVSjf (ORCPT ); Wed, 22 Nov 2023 13:39:35 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC24B10D3; Wed, 22 Nov 2023 10:38:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700678336; x=1732214336; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=wIyOP0aG9TPi3lc0G7IvCLuDzn6Yv0SkV0fEgpSBYKo=; b=bV6hj1in5Zb0bFOANItNzeFrYzNN+GnRFFnPvw70icAxK93CKBMHoQJt rhA+vss888F8cU1eiFODPDCFsfvMiWDxJThO/syRt9VAEDnvpxWekRiQQ MWFVvB4wRFGxZ/fxJCcen0+oxfG8gBc8LX59MwgKbrwTKX4tLEpuxyNYT sfPc/QpSdvFFxc6TW/1U3IqC05LKWz5WvWPPv8F1mMIpCcqS3RzqOB1EQ 2A+NuU0QbxekDopafFdXYzz2xu6kofJQWBla2jRjXmMmpd7UZDcLjw4Tf Qzr5cqdIjfJyYLRhV9pZwt+J6Ykhy+8MWOZ447bMyc66dgeJ4QkOiJ1+x A==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="377150106" X-IronPort-AV: E=Sophos;i="6.04,219,1695711600"; d="scan'208";a="377150106" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP; 22 Nov 2023 10:38:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10901"; a="801829392" X-IronPort-AV: E=Sophos;i="6.04,218,1695711600"; d="scan'208";a="801829392" Received: from unknown (HELO kuha.fi.intel.com) ([10.237.72.185]) by orsmga001.jf.intel.com with SMTP; 22 Nov 2023 00:59:47 -0800 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Wed, 22 Nov 2023 10:56:46 +0200 Date: Wed, 22 Nov 2023 10:56:46 +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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2bfe2311-27a6-46b5-8662-ba3cbb409f81@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 groat.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 (groat.vger.email [0.0.0.0]); Wed, 22 Nov 2023 10:40:04 -0800 (PST) On Tue, Nov 21, 2023 at 03:25:59PM +0100, Paul Menzel wrote: > Dear Heikki, > > > Thank you for your prompt reply. > > Am 21.11.23 um 15:08 schrieb Heikki Krogerus: > > On Tue, Nov 21, 2023 at 12:50:43PM +0100, Paul Menzel wrote: > > > > On the Dell XPS 13, BIOS 2.21.0 06/02/2022, with Debian sid/unstable and > > > Linux 6.5.10, when unplugging the (Dell) USB Type-C charger cable, Linux > > > logs the error below: > > > > > > ucsi_acpi USBC000:00: ucsi_handle_connector_change: ACK failed (-110) > > > > > > As this is logged with level error, can this be somehow fixed? > > > > > > drivers/usb/typec/ucsi/ucsi.c: dev_err(ucsi->dev, "%s: ACK failed (%d)", __func__, ret); > > > > > > Please find the output of `dmesg` attached. > > > > Thanks. The firmware not reacting to the ACK command is weird, but I'm > > not sure if it's critical. Does the interface continue working after > > that? Do you see the partner devices appearing under /sys/class/typec/ > > when you plug them, and disappearing when you unplug them? > > ``` > $ LANG= grep . > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000\:001/* > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/current_max:0 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/current_now:0 > grep: /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/device: > Is a directory > grep: /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/hwmon7: > Is a directory > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/online:0 > grep: > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/power: > Is a directory > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/scope:System > grep: /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/subsystem: > Is a directory > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/type:USB > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_NAME=ucsi-source-psy-USBC000:001 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_TYPE=USB > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_USB_TYPE=[C] > PD PD_PPS > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_ONLINE=0 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_VOLTAGE_MIN=5000000 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_VOLTAGE_MAX=5000000 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_VOLTAGE_NOW=5000000 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_CURRENT_MAX=0 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_CURRENT_NOW=0 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_SCOPE=System > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/usb_type:[C] > PD PD_PPS > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/voltage_max:5000000 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/voltage_min:5000000 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/voltage_now:5000000 > grep: /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/wakeup49: > Is a directory > ``` > > Now I unplugged the device, and the error is *not* logged. (I had a USB > Type-C port replicator plugged in during the day before.) > > The directory is still there: > > ``` > $ LANG= grep . > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000\:001/* > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/current_max:0 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/current_now:0 > grep: /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/device: > Is a directory > grep: /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/hwmon7: > Is a directory > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/online:0 > grep: > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/power: > Is a directory > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/scope:System > grep: /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/subsystem: > Is a directory > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/type:USB > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_NAME=ucsi-source-psy-USBC000:001 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_TYPE=USB > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_USB_TYPE=[C] > PD PD_PPS > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_ONLINE=0 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_VOLTAGE_MIN=5000000 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_VOLTAGE_MAX=5000000 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_VOLTAGE_NOW=5000000 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_CURRENT_MAX=0 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_CURRENT_NOW=0 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/uevent:POWER_SUPPLY_SCOPE=System > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/usb_type:[C] > PD PD_PPS > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/voltage_max:5000000 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/voltage_min:5000000 > /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/voltage_now:5000000 > grep: /sys/class/typec/port0/device/power_supply/ucsi-source-psy-USBC000:001/wakeup49: > Is a directory > ``` > > I guess, that is the wrong directory I look at though? > > (I am going to monitor the logs over the next days.) Just list what you have in /sys/class/typec/ before and after plugging a device to the port: ls /sys/class/typec/ thanks, -- heikki