Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp294057rdh; Thu, 23 Nov 2023 04:23:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEejJSjnPJSPzZVV8uYL0zA6nnneV9qMBHasU3wIgmb4tgObyNwKpP+0fLmsQwB/zgtKS3w X-Received: by 2002:a05:6a00:1c9c:b0:6cb:b87d:8986 with SMTP id y28-20020a056a001c9c00b006cbb87d8986mr5785110pfw.8.1700742181953; Thu, 23 Nov 2023 04:23:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700742181; cv=none; d=google.com; s=arc-20160816; b=JwXjIJ7+YN4+5qS+pIloIwuatVK/WZ+j1oQPEE3MFTy7mg16basGZfWMzpuV8dW46J inAXq/JvnFG3hio+hMjGOf+5yNKCPKmt4s2MipF6IwsAZvQZAzYystd/ofR+0BirReHM UOpElg91seDngVC/GVnyxKfdfpeiDYgErLi7TwmpnYWKWt6pBbsFRCW8wvY1EKKAFPXW +IkWQ3MZavvcNy8kSox612vd6m2Wm0atjpiBIKHk+0P4IgAfZEqK8jkN3oAhCJ2YyNsK g8Oyc4166XMa65d0rzB9VL6DTbNjzSRpIFu1HGi+uy0YLF4gB5v8CM2RxivGx8LqhwN3 o8gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=xUEbbe885uAhPfveldDzAz4M6z6t/kvfP7rnaWIVgA8=; fh=aKy37ApF98nSfxkr502IKCBIoSaKpoby7vzEL3r1Zrg=; b=bXwvdBbdY9L9lcuuIF5S8JXevut2nv09M/ri5LITKnNMjGsRDW7iiRlPAvqj1a8qWE udARvl+sARdjEhy1f8Nn4LhP1P1EasxZzWshvxqpr1Nc7RCK/1cRL8hBqMOp5tntC3Dt 02VABSxWzMjeqCFf5ucVq8ZAn6OO3qw1ZRZspatMkeoYkkh5PhSsi9vhka3PlBZql9sf TTru1zUl9msX6LsRcUhi1nl/SNERjHSZwZ701n+7k7i+348ZHbKOIXulad4ubwjXzkku Y64bXQI4EP6lFPuKMITubuymoAn/cvMmseDx+o6hqS0HqEDu4a1dDSzX8+zilZUatO+0 G7qg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id o10-20020a056a0015ca00b006cb65cfde7fsi1183989pfu.91.2023.11.23.04.23.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 04:23:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 9467D81EB0D8; Thu, 23 Nov 2023 04:22:59 -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 S1345276AbjKWMWg (ORCPT + 99 others); Thu, 23 Nov 2023 07:22:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345255AbjKWMWe (ORCPT ); Thu, 23 Nov 2023 07:22:34 -0500 Received: from mx3.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16B051BE; Thu, 23 Nov 2023 04:22:39 -0800 (PST) Received: from [10.0.3.168] (unknown [93.240.169.83]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id B520561E5FE04; Thu, 23 Nov 2023 13:22:16 +0100 (CET) Message-ID: <6288389c-59cb-4eb4-bbe6-163413db7b7e@molgen.mpg.de> Date: Thu, 23 Nov 2023 13:22:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Unplugging USB-C charger cable causes `ucsi_acpi USBC000:00: ucsi_handle_connector_change: ACK failed (-110)` Content-Language: en-US To: Heikki Krogerus Cc: linux-usb@vger.kernel.org, LKML , Hans de Goede References: <2bfe2311-27a6-46b5-8662-ba3cbb409f81@molgen.mpg.de> From: Paul Menzel In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=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]); Thu, 23 Nov 2023 04:22:59 -0800 (PST) Dear Heikki, Am 22.11.23 um 09:56 schrieb Heikki Krogerus: > On Tue, Nov 21, 2023 at 03:25:59PM +0100, Paul Menzel wrote: >> 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 […] >> ``` >> >> 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 […] >> ``` >> >> 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/ Sorry, here you go: With charger: $ ls /sys/class/typec/ port0 port0-partner After unplugging the charger: $ LANG= ls /sys/class/typec/ port0 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?