Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp54336rdb; Tue, 16 Jan 2024 14:54:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IGiv71mj9oqAaCkRBKVq4cpHbO/sFlOOoR3G0ZIuia/aXn6o36wcxBnotWnnqZ7wQBSh9dX X-Received: by 2002:a05:6830:2059:b0:6dd:e014:cf68 with SMTP id f25-20020a056830205900b006dde014cf68mr9301083otp.41.1705445659206; Tue, 16 Jan 2024 14:54:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705445659; cv=pass; d=google.com; s=arc-20160816; b=Yodm5wXvMsqorMF8J/3rbwbCpqzfKZ/9w/9Nd6VANM0a0bjK4fDSYFWix3DdxHP4rS pooP+zQHKjGhx7dCFyQ7euTjDjPrwQ4F0Zfss0lIFrTkc+UagDjOFgEnCIQyU07rJyfu o4saRB/oe+S20OHqZc1KzKR8XzbUlmJ35SHs6vOX4DJL1iWrDUj//BlDl2lGwXpT9KNK zAfLkIeKQ6B68USS34Wnq2JaESDX3q3PyFNJBM2w7ci1YNHFydOyJkcqFbmPwDon0ldL HHC5qq1V7VO5t+komjKlThC8Hj9g2B39sWMW0F0ciXlW9ZGz4Ng8JwF+aRGGkNZbGtnn IMbg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=8Rnc6e6k4nloUdK7o9Nm7jpDJmCx2aAPnEGv9ZWo3lI=; fh=PBT+T+L/Wk7fQyAuF/ivTwxWqTQzcP6BniPDJctp9Xs=; b=x7SE5Mqyu8W0qw7WZerYAdprJ13JRuTcduaYkld+UQZHarrCvyYOkjevzZXXAIDOlB MvXo4tySifEPRcwLjvhSXcRkvGC0C9CCqe8JHIpUUa83U79GLcRjbvI+JwsSB/vZsAxA nuZ3MUf2jMp8mQLuCNqxUVYFfUbwbjjbYg8jkFl7kyBm1MicDKFNNug/hzHZhocRe/6m DKCfXsT+XRpL0QpPElbAuGZ8MzRZeMz1FamQcNRUiCDaIDTw1hNuYNmAY49wNZh1187U Ms+gVLaCBOhA+7J3ooLf6jKrgycW96GDIEslwKfy30e4OrfBVxGJZ2JDzJsQYXNdCWvN 2hhw== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=c--e.de); spf=pass (google.com: domain of linux-kernel+bounces-28358-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28358-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q9-20020a63e209000000b005ce04743535si12639784pgh.303.2024.01.16.14.54.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 14:54:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28358-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=c--e.de); spf=pass (google.com: domain of linux-kernel+bounces-28358-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28358-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 474D0291D30 for ; Tue, 16 Jan 2024 22:46:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CA5F91B97E; Tue, 16 Jan 2024 22:41:13 +0000 (UTC) Received: from cae.in-ulm.de (cae.in-ulm.de [217.10.14.231]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1DDC71BF31; Tue, 16 Jan 2024 22:41:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.10.14.231 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705444873; cv=none; b=oAGlZSl8OZwUwEvzfgWCxF7xJ8oq0xakaryoVADLvtykmjvZr0i2z7i92+4Fx0rGHXENXddvyx9QaqFMJYE2YpCRUe1cAGiizRfi6C6INhPLVacvnjt7oX3x29/vi3Is196ucF2xwZwWL4wRF4J0xbyqKPgs2ayQIYSOT0YtPCc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705444873; c=relaxed/simple; bh=IDDgqgMqyw2E7Xgg9/KdO7AkOipyHB3yv3BBjx3WNQU=; h=Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer:MIME-Version: Content-Transfer-Encoding; b=OEU16+wNnS+8ZzLmhp/FPjM5Rs6jpCrGUssjz63LCZTRaGSZYuTTkiePmLbd6TzHhhZ8pEmQvqjtQ5rI/lz7yvm36kCWW0B4YoSfBV3o+Ec635IgxrE1SwZlqYc/+8C6S9WgZl9cOFt32wXLDtLm4nNVHFAs1NNDTvYmPVPXH9Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=c--e.de; spf=pass smtp.mailfrom=c--e.de; arc=none smtp.client-ip=217.10.14.231 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=c--e.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=c--e.de Received: by cae.in-ulm.de (Postfix, from userid 1000) id 3EA3514033C; Tue, 16 Jan 2024 23:41:02 +0100 (CET) From: "Christian A. Ehrhardt" To: Heikki Krogerus , linux-usb@vger.kernel.org Cc: "Christian A. Ehrhardt" , Dell.Client.Kernel@dell.com, Greg Kroah-Hartman , Neil Armstrong , Hans de Goede , Jack Pham , Fabrice Gasnier , =?UTF-8?q?Samuel=20=C4=8Cavoj?= , linux-kernel@vger.kernel.org Subject: [PATCH 0/3] UCSI fixes Date: Tue, 16 Jan 2024 23:40:38 +0100 Message-Id: <20240116224041.220740-1-lk@c--e.de> X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This small series contains two general bugfixes to ucsi_acpi and a quirk to make the UCSI controller on various Dell laptops work. The changes can be applied idependantly but all three are required to fix the Dell issues. For details on the general bugfixes please refer to the individual commit messages. The UCSI interface on a Dell Latitude 5431 stops working after the first async event with: GET_CONNECTOR_STATUS failed (-110) The core problem is that when sending the ACK_CC_CI command to clear the connector status changed condition the PPM expects us to send anothr ack for the command completion condition. However, the UCSI spec states that no ack for the command completion is required when the command is ACK_CC_CI (or PPM_RESET). There are various reports that suggest that several Dell laptops are affected by this problem. E.g. the kernel bugzilla has this report which is most likely an instance of this bug: https://bugzilla.kernel.org/show_bug.cgi?id=216426 This led me to the somewhat bold conclusion that the quirk should probably be applied to on Dell systems. To mitigate potential problems from this dell quirk includes a probe mechanism that detect the need for the quirk once and we only deviate from the UCSI spec if the quirk is actually required. Changes in v2 from v1: - Add a second general bugfix. - Remove module parmater and generic quirk infrastructure. - Implement quirk directly in ucsi_acpi.c - Add probe logic to reliably detect the need for the quirk Christian A. Ehrhardt (3): usb: ucsi: Add missing ppm_lock usb: ucsi_acpi: Fix command completion handling usb: ucsi_acpi: Quirk to ack a connector change ack cmd drivers/usb/typec/ucsi/ucsi.c | 2 + drivers/usb/typec/ucsi/ucsi_acpi.c | 86 +++++++++++++++++++++++++++--- 2 files changed, 81 insertions(+), 7 deletions(-) -- 2.40.1