From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 37852B67E; Wed, 8 Apr 2026 18:17:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775672245; cv=none; b=nLxNcXyrVQobO9Ts/2VjBsY5PY1b8U+y8kjFjZpo7wqrmmaXEJDIAqxxMVkBqCjMMzzaU51GG3aluxOBgig22TKQ/dmZEVmvIIJo4A01y6cYC1KHd6v0/laB6ONvD2S8S7MHKZSACLLDs2aQS6ggA3lSd59izHIoFKdUYV9YyxI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775672245; c=relaxed/simple; bh=KdBDuIGwgOyogiUgapIOUOyaNB0OlyhziZmlqify9Co=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=op5qa6zneIEq2PvqrpGdbqC7LgxKpN2dmcFoP/2nMD/oQg5IghgF8r73VTop+MnwEvzFAgASHapNxbq/Y87higbv6xxj9eoBtQkT+065j/A0GWh+8URgqX7JsXe+67BOOFbgbghiVRupxzr+uf0UnV9mX3pQJUXRgQcWSVyeAkQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=boxlGE54; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="boxlGE54" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A094C19421; Wed, 8 Apr 2026 18:17:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1775672245; bh=KdBDuIGwgOyogiUgapIOUOyaNB0OlyhziZmlqify9Co=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=boxlGE54Q0vJhGaD5Xt5Rqn2cezsml7A12JO1HF52jYBUQH8Skc1vd+hzdYtIf1Ug S055Hh3Y3K2ZxoAlkKD/PY4TjxGb7TXdbsQTtCaV8yCoqzs+EGc9nAI/ilF4jbyLZx u2GrWy3IlZeYvNCN4IkVhh55ZFmQlKXc49X5rLe0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Oliver Neukum , stable Subject: [PATCH 6.1 245/312] cdc-acm: new quirk for EPSON HMD Date: Wed, 8 Apr 2026 20:02:42 +0200 Message-ID: <20260408175942.899385292@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260408175933.715315542@linuxfoundation.org> References: <20260408175933.715315542@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Oliver Neukum commit f97e96c303d689708f7f713d8f3afcc31f1237e9 upstream. This device has a union descriptor that is just garbage and needs a custom descriptor. In principle this could be done with a (conditionally activated) heuristic. That would match more devices without a need for defining a new quirk. However, this always carries the risk that the heuristics does the wrong thing and leads to more breakage. Defining the quirk and telling it exactly what to do is the safe and conservative approach. Signed-off-by: Oliver Neukum Cc: stable Link: https://patch.msgid.link/20260317084139.1461008-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/class/cdc-acm.c | 9 +++++++++ drivers/usb/class/cdc-acm.h | 1 + 2 files changed, 10 insertions(+) --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -1201,6 +1201,12 @@ static int acm_probe(struct usb_interfac if (!data_interface || !control_interface) return -ENODEV; goto skip_normal_probe; + } else if (quirks == NO_UNION_12) { + data_interface = usb_ifnum_to_if(usb_dev, 2); + control_interface = usb_ifnum_to_if(usb_dev, 1); + if (!data_interface || !control_interface) + return -ENODEV; + goto skip_normal_probe; } /* normal probing*/ @@ -1724,6 +1730,9 @@ static const struct usb_device_id acm_id { USB_DEVICE(0x045b, 0x024D), /* Renesas R-Car E3 USB Download mode */ .driver_info = DISABLE_ECHO, /* Don't echo banner */ }, + { USB_DEVICE(0x04b8, 0x0d12), /* EPSON HMD Com&Sens */ + .driver_info = NO_UNION_12, /* union descriptor is garbage */ + }, { USB_DEVICE(0x0e8d, 0x0003), /* FIREFLY, MediaTek Inc; andrey.arapov@gmail.com */ .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ }, --- a/drivers/usb/class/cdc-acm.h +++ b/drivers/usb/class/cdc-acm.h @@ -114,3 +114,4 @@ struct acm { #define SEND_ZERO_PACKET BIT(6) #define DISABLE_ECHO BIT(7) #define MISSING_CAP_BRK BIT(8) +#define NO_UNION_12 BIT(9)