From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9AAC34FC8D8 for ; Mon, 5 Oct 2026 17:17:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791220646; cv=none; b=tKiYk5j2Fg63dU2YRhC0HUQ/DQ72nNvrEZKdpZdiOfZvsCnnU6my8szZ+1Vrel9FQxkiQSeBEyVMT/HXqOfLwEX2I5OSAHbRl45Y3lKr7bTKQv6tbN050AkYZXNnw6xSiizUila67EQ5/PxUUnkArQ//mb2rtCq59EU258cIIkg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791220646; c=relaxed/simple; bh=xyUDIyANmTvQbTsplVhQAeV/xZo5zHYog80BkVEBFUY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OpCUUP4j9STRkOx9kuMbPiaFTyxEJWmZqaS7sCvz1/rcJuIDcOJd2iCQTL2jHFlMc7bFd1ETBmgAPPE3uBz/TN6Z1JdVlcUjZl+CIl96dKi08ac3JilITog4GcbXega/5rC4cysBM86tNGhNIbViXcHYGcvuVguGW+DRp5TsFBc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dNNvqFyb; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dNNvqFyb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 852A11F0089D; Mon, 5 Oct 2026 17:17:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1791220645; bh=PfO9r4rZk0R3S5ZUKTTqdJ3jn91F787yNBdSD+lQfXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=dNNvqFyb4oCGMVvn6HAU55q6by3X9fegRj+lp2MskWTtvBGxqzsQ/JdtyQ6Qo44Ap JN4VhAfqOwBuH7x5rpAwRuzgy/vuYFYSDP0udOB5EcoIZ5aNO9fQPxl2+N8KLJdezF uYznP63vMNID///1VljZGzW4KxTofX+bx+sK83oJpHKZaaFKUbkXTQWTu3nNJ51CFZ nX67lyGaVdtNiKmWutYdyZsUf/PMkvxS7+zL9IpIxDziJM87d/S1jG6dQa+8Ofaef/ XzPumvETe0VYpvnXwpv8sjOpDF0xFUl9n2TelaD6K82aVkuRsIGsAS5719dB8O4LEE FCIAIO0g9z9UQ== From: Sasha Levin To: stable@vger.kernel.org Cc: Pannarat Wiriyaarritham , stable , Heikki Krogerus , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH 6.12.y] usb: typec: ucsi: acpi: Assume UCSI 1.2 on Acer Nitro ANV15-41 Date: Mon, 5 Oct 2026 13:17:20 -0400 Message-ID: <20261005171425.3125820-1-sashal@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <2026100551-overtime-asparagus-3287@gregkh> References: <2026100551-overtime-asparagus-3287@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Pannarat Wiriyaarritham [ Upstream commit 8c51ea651d043c786c37668c51624bd6b338a0ef ] The Acer Nitro ANV15-41 exposes a functional UCSI ACPI PPM but reports a UCSI VERSION value of zero. ucsi_register() rejects a zero version with -ENODEV, leaving the system without registered USB Type-C connectors. The PPM works correctly when using the UCSI 1.2 layout. With UCSI 1.2 assumed, both Type-C connectors register correctly and USB Power Delivery negotiation works. Add a DMI-specific UCSI operation for the Acer Nitro ANV15-41 that substitutes UCSI 1.2 only when firmware reports a zero version. Preserve any valid non-zero firmware version. Tested on an Acer Nitro ANV15-41 with BIOS V1.51. Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface") Cc: stable Assisted-by: LLM Signed-off-by: Pannarat Wiriyaarritham Reviewed-by: Heikki Krogerus Link: https://patch.msgid.link/20260910023338.31816-1-pannarat.wiriyaarritham@danielcorp.dev Signed-off-by: Greg Kroah-Hartman [ sashal: Omitted the .write_message_out initializer because the older ucsi_operations interface lacks that member. ] Signed-off-by: Sasha Levin --- drivers/usb/typec/ucsi/ucsi_acpi.c | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/drivers/usb/typec/ucsi/ucsi_acpi.c b/drivers/usb/typec/ucsi/ucsi_acpi.c index db882d44be49c..8c6793361b004 100644 --- a/drivers/usb/typec/ucsi/ucsi_acpi.c +++ b/drivers/usb/typec/ucsi/ucsi_acpi.c @@ -105,6 +105,32 @@ static const struct ucsi_operations ucsi_acpi_ops = { .async_control = ucsi_acpi_async_control }; +static int ucsi_acer_read_version(struct ucsi *ucsi, u16 *version) +{ + struct ucsi_acpi *ua = ucsi_get_drvdata(ucsi); + int ret; + + ret = ucsi_acpi_read_version(ucsi, version); + if (ret) + return ret; + + if (!*version) { + dev_warn(ua->dev, "UCSI version is zero, assuming 1.2\n"); + *version = UCSI_VERSION_1_2; + } + + return 0; +} + +static const struct ucsi_operations ucsi_acer_ops = { + .read_version = ucsi_acer_read_version, + .read_cci = ucsi_acpi_read_cci, + .poll_cci = ucsi_acpi_poll_cci, + .read_message_in = ucsi_acpi_read_message_in, + .sync_control = ucsi_sync_control_common, + .async_control = ucsi_acpi_async_control +}; + static int ucsi_gram_read_message_in(struct ucsi *ucsi, void *val, size_t val_len) { u16 bogus_change = UCSI_CONSTAT_POWER_LEVEL_CHANGE | @@ -158,6 +184,13 @@ static const struct ucsi_operations ucsi_gram_ops = { }; static const struct dmi_system_id ucsi_acpi_quirks[] = { + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Nitro ANV15-41"), + }, + .driver_data = (void *)&ucsi_acer_ops, + }, { .matches = { DMI_MATCH(DMI_SYS_VENDOR, "LG Electronics"), -- 2.53.0