Re: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 23.06.22 10:55, Chris Ruehl wrote:

> Apply the patch ,
> still no /dev/ttyACM0 comes up.

Hi,

I am a stupid fool who cannot tell apart "&&" and "||"
Plesae test the attached patch.

	Regards
		Oliver
From ccf6a8654bc503d9e1cd75f038f4c4c6154716e3 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum@xxxxxxxx>
Date: Thu, 23 Jun 2022 10:22:47 +0200
Subject: [PATCH] cdc-acm: adding a special case for OMRON device

This device has a collapsed interface with a mysterious
fourth endpoint. We ignore that endpoint.

Signed-off-by: Oliver Neukum <oneukum@xxxxxxxx>
---
 drivers/usb/class/cdc-acm.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index fedf3065670e..149902e301d8 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1215,7 +1215,12 @@ static int acm_probe(struct usb_interface *intf,
 		call_intf_num = cmgmd->bDataInterface;
 
 	if (!union_header) {
-		if (intf->cur_altsetting->desc.bNumEndpoints == 3) {
+		if (intf->cur_altsetting->desc.bNumEndpoints == 3 || 
+				/*
+				 * an odd device from OMRON has a mysterious
+				 * unnecessary fourth endpoint
+				 */
+				intf->cur_altsetting->desc.bNumEndpoints == 4) {
 			dev_dbg(&intf->dev, "No union descriptor, assuming single interface\n");
 			combined_interfaces = 1;
 			control_interface = data_interface = intf;
-- 
2.35.3


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux