* serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
@ 2022-06-17 4:11 Chris Ruehl
2022-06-20 2:44 ` Chris Ruehl
0 siblings, 1 reply; 20+ messages in thread
From: Chris Ruehl @ 2022-06-17 4:11 UTC (permalink / raw)
To: USB list; +Cc: Oliver Neukum
Hi there,
yet an other cdc-acm which not probed and no /dev/ttyACM0 comes up.
[ 539.655588] usb 2-1.4.3: USB disconnect, device number 9
[ 568.792182] usb 2-1.4.3: new high-speed USB device number 10 using ehci-pci
[ 568.890554] usb 2-1.4.3: New USB device found, idVendor=0590, idProduct=00ca,
bcdDevice= 2.00
[ 568.890562] usb 2-1.4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 568.890566] usb 2-1.4.3: Product: OMRON B5L-001011
[ 568.890568] usb 2-1.4.3: Manufacturer: OMRON Corporation
[ 568.890571] usb 2-1.4.3: SerialNumber: 010000366A1
[ 568.945679] cdc_acm 2-1.4.3:1.0: Zero length descriptor references
[ 568.945690] cdc_acm: probe of 2-1.4.3:1.0 failed with error -22
[ 568.946477] usbcore: registered new interface driver cdc_acm
[ 568.946480] cdc_acm: USB Abstract Control Model driver for USB modems and
ISDN adapters
so I set the quirk in the cdc-acm.c
{ USB_DEVICE(0x0590, 0x00ca), /* Omron b5l */
.driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
},
and solved the error.
[ 724.148131] usbcore: deregistering interface driver cdc_acm
[ 725.766219] usb 2-1.4.3: USB disconnect, device number 10
[ 757.467770] usb 2-1.4.3: new high-speed USB device number 11 using ehci-pci
[ 757.566100] usb 2-1.4.3: New USB device found, idVendor=0590, idProduct=00ca,
bcdDevice= 2.00
[ 757.566109] usb 2-1.4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 757.566113] usb 2-1.4.3: Product: OMRON B5L-001011
[ 757.566115] usb 2-1.4.3: Manufacturer: OMRON Corporation
[ 757.566117] usb 2-1.4.3: SerialNumber: 010000366A1
[ 757.622501] usbcore: registered new interface driver cdc_acm
[ 757.622506] cdc_acm: USB Abstract Control Model driver for USB modems and
ISDN adapters
But the kernel does not create the /dev/ttyACM0.
Kernel is vanilla 5.15.47
lsusb -v get me this.
Bus 002 Device 014: ID 0590:00ca Omron Corp. OMRON B5L-001011
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 2 Abstract (modem)
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0590 Omron Corp.
idProduct 0x00ca
bcdDevice 2.00
iManufacturer 1 OMRON Corporation
iProduct 2 OMRON B5L-001011
iSerial 3 010000366A1
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x002e
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 4mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 4
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 16
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 16
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 2 Abstract (modem)
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0001
Self Powered
Anything you have in mind?
Thanks
Chris
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
2022-06-17 4:11 serial: usb: cdc-acm: OMRON B5L ToF, device probe failed Chris Ruehl
@ 2022-06-20 2:44 ` Chris Ruehl
2022-06-20 3:35 ` Lars Melin
0 siblings, 1 reply; 20+ messages in thread
From: Chris Ruehl @ 2022-06-20 2:44 UTC (permalink / raw)
To: USB list; +Cc: Oliver Neukum
On 17/6/2022 12:11 pm, Chris Ruehl wrote:
> Hi there,
>
> yet an other cdc-acm which not probed and no /dev/ttyACM0 comes up.
>
> [ 539.655588] usb 2-1.4.3: USB disconnect, device number 9
> [ 568.792182] usb 2-1.4.3: new high-speed USB device number 10 using ehci-pci
> [ 568.890554] usb 2-1.4.3: New USB device found, idVendor=0590,
> idProduct=00ca, bcdDevice= 2.00
> [ 568.890562] usb 2-1.4.3: New USB device strings: Mfr=1, Product=2,
> SerialNumber=3
> [ 568.890566] usb 2-1.4.3: Product: OMRON B5L-001011
> [ 568.890568] usb 2-1.4.3: Manufacturer: OMRON Corporation
> [ 568.890571] usb 2-1.4.3: SerialNumber: 010000366A1
> [ 568.945679] cdc_acm 2-1.4.3:1.0: Zero length descriptor references
> [ 568.945690] cdc_acm: probe of 2-1.4.3:1.0 failed with error -22
> [ 568.946477] usbcore: registered new interface driver cdc_acm
> [ 568.946480] cdc_acm: USB Abstract Control Model driver for USB modems and
> ISDN adapters
>
> so I set the quirk in the cdc-acm.c
>
> { USB_DEVICE(0x0590, 0x00ca), /* Omron b5l */
> .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
> },
>
> and solved the error.
>
> [ 724.148131] usbcore: deregistering interface driver cdc_acm
> [ 725.766219] usb 2-1.4.3: USB disconnect, device number 10
> [ 757.467770] usb 2-1.4.3: new high-speed USB device number 11 using ehci-pci
> [ 757.566100] usb 2-1.4.3: New USB device found, idVendor=0590,
> idProduct=00ca, bcdDevice= 2.00
> [ 757.566109] usb 2-1.4.3: New USB device strings: Mfr=1, Product=2,
> SerialNumber=3
> [ 757.566113] usb 2-1.4.3: Product: OMRON B5L-001011
> [ 757.566115] usb 2-1.4.3: Manufacturer: OMRON Corporation
> [ 757.566117] usb 2-1.4.3: SerialNumber: 010000366A1
> [ 757.622501] usbcore: registered new interface driver cdc_acm
> [ 757.622506] cdc_acm: USB Abstract Control Model driver for USB modems and
> ISDN adapters
>
>
> But the kernel does not create the /dev/ttyACM0.
>
> Kernel is vanilla 5.15.47
>
> lsusb -v get me this.
>
> Bus 002 Device 014: ID 0590:00ca Omron Corp. OMRON B5L-001011
> Device Descriptor:
> bLength 18
> bDescriptorType 1
> bcdUSB 2.00
> bDeviceClass 2 Communications
> bDeviceSubClass 2 Abstract (modem)
> bDeviceProtocol 0
> bMaxPacketSize0 64
> idVendor 0x0590 Omron Corp.
> idProduct 0x00ca
> bcdDevice 2.00
> iManufacturer 1 OMRON Corporation
> iProduct 2 OMRON B5L-001011
> iSerial 3 010000366A1
> bNumConfigurations 1
> Configuration Descriptor:
> bLength 9
> bDescriptorType 2
> wTotalLength 0x002e
> bNumInterfaces 1
> bConfigurationValue 1
> iConfiguration 0
> bmAttributes 0x80
> (Bus Powered)
> MaxPower 4mA
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 0
> bAlternateSetting 0
> bNumEndpoints 4
> bInterfaceClass 2 Communications
> bInterfaceSubClass 2 Abstract (modem)
> bInterfaceProtocol 0
> iInterface 0
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x01 EP 1 OUT
> bmAttributes 2
> Transfer Type Bulk
> Synch Type None
> Usage Type Data
> wMaxPacketSize 0x0200 1x 512 bytes
> bInterval 0
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x82 EP 2 IN
> bmAttributes 2
> Transfer Type Bulk
> Synch Type None
> Usage Type Data
> wMaxPacketSize 0x0200 1x 512 bytes
> bInterval 0
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x03 EP 3 OUT
> bmAttributes 3
> Transfer Type Interrupt
> Synch Type None
> Usage Type Data
> wMaxPacketSize 0x0040 1x 64 bytes
> bInterval 16
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x84 EP 4 IN
> bmAttributes 3
> Transfer Type Interrupt
> Synch Type None
> Usage Type Data
> wMaxPacketSize 0x0040 1x 64 bytes
> bInterval 16
> Device Qualifier (for other device speed):
> bLength 10
> bDescriptorType 6
> bcdUSB 2.00
> bDeviceClass 2 Communications
> bDeviceSubClass 2 Abstract (modem)
> bDeviceProtocol 0
> bMaxPacketSize0 64
> bNumConfigurations 1
> can't get debug descriptor: Resource temporarily unavailable
> Device Status: 0x0001
> Self Powered
>
>
> Anything you have in mind?
>
> Thanks
> Chris
>
>
Enabled the debugfs and checked /sys/kernel/debug/usb/devices for the B5L
T: Bus=02 Lev=03 Prnt=04 Port=01 Cnt=01 Dev#= 17 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=02(comm.) Sub=02 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0590 ProdID=00ca Rev= 2.00
S: Manufacturer=OMRON Corporation
S: Product=OMRON B5L-001011
S: SerialNumber=010000319A1
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 4mA
I:* If#= 0 Alt= 0 #EPs= 4 Cls=02(comm.) Sub=02 Prot=00 Driver=(none)
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=03(Int.) MxPS= 64 Ivl=4096ms
E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms
Driver is not assigned.
-Chris
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
2022-06-20 2:44 ` Chris Ruehl
@ 2022-06-20 3:35 ` Lars Melin
2022-06-20 6:20 ` Chris Ruehl
2022-07-20 16:24 ` Oliver Neukum
0 siblings, 2 replies; 20+ messages in thread
From: Lars Melin @ 2022-06-20 3:35 UTC (permalink / raw)
To: Chris Ruehl, USB list; +Cc: Oliver Neukum
On 6/20/2022 09:44, Chris Ruehl wrote:
> Enabled the debugfs and checked /sys/kernel/debug/usb/devices for the B5L
>
> T: Bus=02 Lev=03 Prnt=04 Port=01 Cnt=01 Dev#= 17 Spd=480 MxCh= 0
> D: Ver= 2.00 Cls=02(comm.) Sub=02 Prot=00 MxPS=64 #Cfgs= 1
> P: Vendor=0590 ProdID=00ca Rev= 2.00
> S: Manufacturer=OMRON Corporation
> S: Product=OMRON B5L-001011
> S: SerialNumber=010000319A1
> C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 4mA
> I:* If#= 0 Alt= 0 #EPs= 4 Cls=02(comm.) Sub=02 Prot=00 Driver=(none)
> E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=03(O) Atr=03(Int.) MxPS= 64 Ivl=4096ms
> E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms
>
> Driver is not assigned.
There is nothing CDC-ACM in that interface except for the interface
attributes, the interface lacks everything else needed for it to be CDC-ACM.
Check if Omron has an updated firmware fixing the problems or if they
have their own proprietary driver for the device.
/Lars
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
2022-06-20 3:35 ` Lars Melin
@ 2022-06-20 6:20 ` Chris Ruehl
2022-06-21 0:38 ` michael.lee
2022-07-20 16:24 ` Oliver Neukum
1 sibling, 1 reply; 20+ messages in thread
From: Chris Ruehl @ 2022-06-20 6:20 UTC (permalink / raw)
To: Lars Melin, USB list; +Cc: Oliver Neukum
On 20/6/2022 11:35 am, Lars Melin wrote:
> On 6/20/2022 09:44, Chris Ruehl wrote:
>> Enabled the debugfs and checked /sys/kernel/debug/usb/devices for the B5L
>>
>> T: Bus=02 Lev=03 Prnt=04 Port=01 Cnt=01 Dev#= 17 Spd=480 MxCh= 0
>> D: Ver= 2.00 Cls=02(comm.) Sub=02 Prot=00 MxPS=64 #Cfgs= 1
>> P: Vendor=0590 ProdID=00ca Rev= 2.00
>> S: Manufacturer=OMRON Corporation
>> S: Product=OMRON B5L-001011
>> S: SerialNumber=010000319A1
>> C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 4mA
>> I:* If#= 0 Alt= 0 #EPs= 4 Cls=02(comm.) Sub=02 Prot=00 Driver=(none)
>> E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> E: Ad=03(O) Atr=03(Int.) MxPS= 64 Ivl=4096ms
>> E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms
>>
>> Driver is not assigned.
>
>
> There is nothing CDC-ACM in that interface except for the interface
> attributes, the interface lacks everything else needed for it to be CDC-ACM.
> Check if Omron has an updated firmware fixing the problems or if they have
> their own proprietary driver for the device.
>
>
> /Lars
Hi Lars,
that's what I hold the Hk headquarter, they forward the request back to the
developers in Japan.
Thanks
Chris
^ permalink raw reply [flat|nested] 20+ messages in thread
* RE: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
2022-06-20 6:20 ` Chris Ruehl
@ 2022-06-21 0:38 ` michael.lee
2022-06-21 7:16 ` Greg KH
2022-06-21 10:09 ` Oliver Neukum
0 siblings, 2 replies; 20+ messages in thread
From: michael.lee @ 2022-06-21 0:38 UTC (permalink / raw)
To: Chris Ruehl, Lars Melin, USB list; +Cc: Oliver Neukum
Dear Chris,
The below is the reply from Japan.
Dose they do the below commnad after connect B5L to USB?
sudo modprobe usbserial vendor=0x0590 product=0x00ca
sudo chmod o+wr /dev/ttyUSB0
For linux environment ,this commnad is needed to connect B5L to USB.
We preapre the below sh file with c++ sample codes.
connect_tof.sh
https://github.com/omron-devhub/b5l_TOFsensor_Sample_cpp
----------------
ReadMe_E.txt
1. File description & How to build
The following files are included in the Sample Code package.
build.sh [ Linux ] Shell script for compilation
connect_tof.sh [ Linux ] Shell script for connection B5L (Use when ToF_Sample execution does not work)
DetectionCuboid.pdf [ Win/Linux ] Explanatory drawing of Detection Cuboid setting
init_gpio7.sh [RaspberryPi] Shell script for setting GPIO #7 pin as output
ToF_Sample.cpp [ Win/Linux ] Sample Code Main
..........
Best Regards
Michael Lee
-----Original Message-----
From: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Sent: Monday, June 20, 2022 2:21 PM
To: Lars Melin <larsm17@gmail.com>; USB list <linux-usb@vger.kernel.org>
Cc: Oliver Neukum <oneukum@suse.com>
Subject: Re: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
On 20/6/2022 11:35 am, Lars Melin wrote:
> On 6/20/2022 09:44, Chris Ruehl wrote:
>> Enabled the debugfs and checked /sys/kernel/debug/usb/devices for the
>> B5L
>>
>> T: Bus=02 Lev=03 Prnt=04 Port=01 Cnt=01 Dev#= 17 Spd=480 MxCh= 0
>> D: Ver= 2.00 Cls=02(comm.) Sub=02 Prot=00 MxPS=64 #Cfgs= 1
>> P: Vendor=0590 ProdID=00ca Rev= 2.00
>> S: Manufacturer=OMRON Corporation
>> S: Product=OMRON B5L-001011
>> S: SerialNumber=010000319A1
>> C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 4mA
>> I:* If#= 0 Alt= 0 #EPs= 4 Cls=02(comm.) Sub=02 Prot=00 Driver=(none)
>> E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> E: Ad=03(O) Atr=03(Int.) MxPS= 64 Ivl=4096ms
>> E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms
>>
>> Driver is not assigned.
>
>
> There is nothing CDC-ACM in that interface except for the interface
> attributes, the interface lacks everything else needed for it to be CDC-ACM.
> Check if Omron has an updated firmware fixing the problems or if they
> have their own proprietary driver for the device.
>
>
> /Lars
Hi Lars,
that's what I hold the Hk headquarter, they forward the request back to the developers in Japan.
Thanks
Chris
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
2022-06-21 0:38 ` michael.lee
@ 2022-06-21 7:16 ` Greg KH
2022-06-21 10:09 ` Oliver Neukum
1 sibling, 0 replies; 20+ messages in thread
From: Greg KH @ 2022-06-21 7:16 UTC (permalink / raw)
To: michael.lee; +Cc: Chris Ruehl, Lars Melin, USB list, Oliver Neukum
On Tue, Jun 21, 2022 at 12:38:22AM +0000, michael.lee@omron.com wrote:
> Dear Chris,
>
> The below is the reply from Japan.
>
> Dose they do the below commnad after connect B5L to USB?
>
> sudo modprobe usbserial vendor=0x0590 product=0x00ca
So that means this is just a "generic" usb-serial device, not a cdc-acm
one at all. Just add the device id to the generic usb-serial driver and
you should be fine.
BUT, that implies that the interrupt endpoints are useless? Why are
they there? How is flow control handled in this device?
Perhaps ask what the chip is in the device, that might help out here
more.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
2022-06-21 0:38 ` michael.lee
2022-06-21 7:16 ` Greg KH
@ 2022-06-21 10:09 ` Oliver Neukum
2022-06-21 10:44 ` Chris Ruehl
2022-06-23 2:26 ` Chris Ruehl
1 sibling, 2 replies; 20+ messages in thread
From: Oliver Neukum @ 2022-06-21 10:09 UTC (permalink / raw)
To: michael.lee, Chris Ruehl, Lars Melin, USB list; +Cc: Oliver Neukum
[-- Attachment #1: Type: text/plain, Size: 658 bytes --]
On 21.06.22 02:38, michael.lee@omron.com wrote:
> Dear Chris,
>
> The below is the reply from Japan.
>
> Dose they do the below commnad after connect B5L to USB?
>
> sudo modprobe usbserial vendor=0x0590 product=0x00ca
> sudo chmod o+wr /dev/ttyUSB0
>
> For linux environment ,this commnad is needed to connect B5L to USB.
> We preapre the below sh file with c++ sample codes.
> connect_tof.sh
> https://github.com/omron-devhub/b5l_TOFsensor_Sample_cpp
>
Hi,
this is not nice. But in any case this thing is not an ACM
device. This patch should remove it from the driver it is
abusing to where it belongs. Could you please test it?
Regards
Oliver
[-- Attachment #2: 0001-move-OMRON-B5L-from-ACM-to-sgeneric-serial.patch --]
[-- Type: text/x-patch, Size: 2013 bytes --]
From af01a3666104b4a4f5c2b61c1df0d0e094432b67 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum@suse.com>
Date: Tue, 21 Jun 2022 12:05:04 +0200
Subject: [PATCH] move OMRON B5L from ACM to sgeneric serial
This thing is no ACM, whatever the descriptor may say.
Blacklist and add its ID to serial IDs
Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
drivers/usb/class/cdc-acm.c | 4 ++++
drivers/usb/serial/usb-serial-simple.c | 7 +++++++
2 files changed, 11 insertions(+)
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 9b9aea24d58c..1e1b7f104690 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1928,6 +1928,10 @@ static const struct usb_device_id acm_ids[] = {
{ USB_DEVICE(0x058b, 0x0041),
.driver_info = IGNORE_DEVICE,
},
+ /* OMRON B5L ToF */
+ { USB_DEVICE(0x0590, 0x00ca),
+ .driver_info = IGNORE_DEVICE,
+ },
/* Exclude ETAS ES58x */
{ USB_DEVICE(0x108c, 0x0159), /* ES581.4 */
diff --git a/drivers/usb/serial/usb-serial-simple.c b/drivers/usb/serial/usb-serial-simple.c
index 4c6747889a19..5040f84528d7 100644
--- a/drivers/usb/serial/usb-serial-simple.c
+++ b/drivers/usb/serial/usb-serial-simple.c
@@ -96,6 +96,11 @@ DEVICE(motorola_tetra, MOTOROLA_TETRA_IDS);
{ USB_DEVICE(0x0421, 0x069a) } /* Nokia 130 (RM-1035) */
DEVICE(nokia, NOKIA_IDS);
+/* OMRON */
+#define OMRON_IDS() \
+ { USB_DEVICE(0x0590, 0x00ca) } /* OMRON B5L ToF */
+DEVICE(omron, OMRON_IDS);
+
/* Novatel Wireless GPS driver */
#define NOVATEL_IDS() \
{ USB_DEVICE(0x09d7, 0x0100) } /* NovAtel FlexPack GPS */
@@ -130,6 +135,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
&motorola_tetra_device,
&nokia_device,
&novatel_gps_device,
+ &omron_device,
&hp4x_device,
&suunto_device,
&siemens_mpi_device,
@@ -148,6 +154,7 @@ static const struct usb_device_id id_table[] = {
MOTOROLA_TETRA_IDS(),
NOKIA_IDS(),
NOVATEL_IDS(),
+ OMRON_IDS(),
HP4X_IDS(),
SUUNTO_IDS(),
SIEMENS_IDS(),
--
2.35.3
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
2022-06-21 10:09 ` Oliver Neukum
@ 2022-06-21 10:44 ` Chris Ruehl
2022-06-23 2:26 ` Chris Ruehl
1 sibling, 0 replies; 20+ messages in thread
From: Chris Ruehl @ 2022-06-21 10:44 UTC (permalink / raw)
To: Oliver Neukum, michael.lee, Lars Melin, USB list
Oliver,
Thanks for the patch, I will apply it and give a feedback.
-chris
On 21/6/2022 6:09 pm, Oliver Neukum wrote:
>
> On 21.06.22 02:38, michael.lee@omron.com wrote:
>> Dear Chris,
>>
>> The below is the reply from Japan.
>>
>> Dose they do the below commnad after connect B5L to USB?
>>
>> sudo modprobe usbserial vendor=0x0590 product=0x00ca
>> sudo chmod o+wr /dev/ttyUSB0
>>
>> For linux environment ,this commnad is needed to connect B5L to USB.
>> We preapre the below sh file with c++ sample codes.
>> connect_tof.sh
>> https://github.com/omron-devhub/b5l_TOFsensor_Sample_cpp
>>
> Hi,
>
> this is not nice. But in any case this thing is not an ACM
> device. This patch should remove it from the driver it is
> abusing to where it belongs. Could you please test it?
>
> Regards
> Oliver
--
GTSYS Limited RFID Technology
9/F, Unit E, R07, Kwai Shing Industrial Building Phase 2,
42-46 Tai Lin Pai Road, Kwai Chung, N.T., Hong Kong
Tel (852) 9079 9521
Disclaimer: https://www.gtsys.com.hk/email/classified.html
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
2022-06-21 10:09 ` Oliver Neukum
2022-06-21 10:44 ` Chris Ruehl
@ 2022-06-23 2:26 ` Chris Ruehl
2022-06-23 8:28 ` Oliver Neukum
1 sibling, 1 reply; 20+ messages in thread
From: Chris Ruehl @ 2022-06-23 2:26 UTC (permalink / raw)
To: Oliver Neukum, michael.lee, Lars Melin, USB list
On 21/6/2022 6:09 pm, Oliver Neukum wrote:
>
> On 21.06.22 02:38, michael.lee@omron.com wrote:
>> Dear Chris,
>>
>> The below is the reply from Japan.
>>
>> Dose they do the below commnad after connect B5L to USB?
>>
>> sudo modprobe usbserial vendor=0x0590 product=0x00ca
>> sudo chmod o+wr /dev/ttyUSB0
>>
>> For linux environment ,this commnad is needed to connect B5L to USB.
>> We preapre the below sh file with c++ sample codes.
>> connect_tof.sh
>> https://github.com/omron-devhub/b5l_TOFsensor_Sample_cpp
>>
> Hi,
>
> this is not nice. But in any case this thing is not an ACM
> device. This patch should remove it from the driver it is
> abusing to where it belongs. Could you please test it?
>
> Regards
> Oliver
Hi Oliver,
thanks for that patch, I can confirm it works for me. I have the ToF up
and running at B921600 8N1.
But I would wait, not apply to the kernel, because I noticed that the team from
OMRON is working
on the CDC implantation.
So this patch is only a workaround for the moment.
Thank you for your help!
Chris
--
GTSYS Limited RFID Technology
9/F, Unit E, R07, Kwai Shing Industrial Building Phase 2,
42-46 Tai Lin Pai Road, Kwai Chung, N.T., Hong Kong
Tel (852) 9079 9521
Disclaimer: https://www.gtsys.com.hk/email/classified.html
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
2022-06-23 2:26 ` Chris Ruehl
@ 2022-06-23 8:28 ` Oliver Neukum
2022-06-23 8:44 ` Chris Ruehl
0 siblings, 1 reply; 20+ messages in thread
From: Oliver Neukum @ 2022-06-23 8:28 UTC (permalink / raw)
To: Chris Ruehl, Oliver Neukum, michael.lee, Lars Melin, USB list
[-- Attachment #1: Type: text/plain, Size: 848 bytes --]
On 23.06.22 04:26, Chris Ruehl wrote:
Hi,
> thanks for that patch, I can confirm it works for me. I have the ToF up
> and running at B921600 8N1.
> But I would wait, not apply to the kernel, because I noticed that the
> team from OMRON is working
> on the CDC implantation.
> So this patch is only a workaround for the moment.
>
if you absolutely want it to be driven from CDC-ACM, try this
new attached patch.
In your original patch you used NO_UNION_NORMAL. That will allow
a device to work without a union descriptor but with the normal
two interfaces. This devices has what in terms of ACM is a collapsed
interface without a union descriptor.
The driver provides for that but then it checks for the exact
number of required endpoints, which is three. Your device has
four endpoints.
The patch ignores a fourth endpoint.
Regards
Oliver
[-- Attachment #2: 0001-cdc-acm-adding-a-special-case-for-OMRON-device.patch --]
[-- Type: text/x-patch, Size: 1207 bytes --]
From 4be11052c6e43771625af54a64473610ceacdf77 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum@suse.com>
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@suse.com>
---
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 9b9aea24d58c..ee62c13a5533 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
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
2022-06-23 8:28 ` Oliver Neukum
@ 2022-06-23 8:44 ` Chris Ruehl
2022-06-23 8:55 ` Chris Ruehl
0 siblings, 1 reply; 20+ messages in thread
From: Chris Ruehl @ 2022-06-23 8:44 UTC (permalink / raw)
To: Oliver Neukum, michael.lee, Lars Melin, USB list
On 23/6/2022 4:28 pm, Oliver Neukum wrote:
>
> On 23.06.22 04:26, Chris Ruehl wrote:
>
> Hi,
>
>> thanks for that patch, I can confirm it works for me. I have the ToF up
>> and running at B921600 8N1.
>> But I would wait, not apply to the kernel, because I noticed that the
>> team from OMRON is working
>> on the CDC implantation.
>> So this patch is only a workaround for the moment.
>>
> if you absolutely want it to be driven from CDC-ACM, try this
> new attached patch.
> In your original patch you used NO_UNION_NORMAL. That will allow
> a device to work without a union descriptor but with the normal
> two interfaces. This devices has what in terms of ACM is a collapsed
> interface without a union descriptor.
> The driver provides for that but then it checks for the exact
> number of required endpoints, which is three. Your device has
> four endpoints.
> The patch ignores a fourth endpoint.
>
> Regards
> Oliver
Oliver,
I give this patch a try and report how it works.
Thanks
Chris
--
GTSYS Limited RFID Technology
9/F, Unit E, R07, Kwai Shing Industrial Building Phase 2,
42-46 Tai Lin Pai Road, Kwai Chung, N.T., Hong Kong
Tel (852) 9079 9521
Disclaimer: https://www.gtsys.com.hk/email/classified.html
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
2022-06-23 8:44 ` Chris Ruehl
@ 2022-06-23 8:55 ` Chris Ruehl
2022-06-23 9:39 ` Oliver Neukum
2022-07-20 11:12 ` Oliver Neukum
0 siblings, 2 replies; 20+ messages in thread
From: Chris Ruehl @ 2022-06-23 8:55 UTC (permalink / raw)
To: Oliver Neukum, michael.lee, Lars Melin, USB list
On 23/6/2022 4:44 pm, Chris Ruehl wrote:
>
> On 23/6/2022 4:28 pm, Oliver Neukum wrote:
>>
>> On 23.06.22 04:26, Chris Ruehl wrote:
>>
>> Hi,
>>
>>> thanks for that patch, I can confirm it works for me. I have the ToF up
>>> and running at B921600 8N1.
>>> But I would wait, not apply to the kernel, because I noticed that the
>>> team from OMRON is working
>>> on the CDC implantation.
>>> So this patch is only a workaround for the moment.
>>>
>> if you absolutely want it to be driven from CDC-ACM, try this
>> new attached patch.
>> In your original patch you used NO_UNION_NORMAL. That will allow
>> a device to work without a union descriptor but with the normal
>> two interfaces. This devices has what in terms of ACM is a collapsed
>> interface without a union descriptor.
>> The driver provides for that but then it checks for the exact
>> number of required endpoints, which is three. Your device has
>> four endpoints.
>> The patch ignores a fourth endpoint.
>>
>> Regards
>> Oliver
>
> Oliver,
>
> I give this patch a try and report how it works.
>
> Thanks
> Chris
>
Apply the patch ,
still no /dev/ttyACM0 comes up.
Thanks for your effort.
Chris
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
2022-06-23 8:55 ` Chris Ruehl
@ 2022-06-23 9:39 ` Oliver Neukum
2022-06-25 2:35 ` Chris Ruehl
2022-07-20 11:12 ` Oliver Neukum
1 sibling, 1 reply; 20+ messages in thread
From: Oliver Neukum @ 2022-06-23 9:39 UTC (permalink / raw)
To: Chris Ruehl, Oliver Neukum, michael.lee, Lars Melin, USB list
On 23.06.22 10:55, Chris Ruehl wrote:
>
>
> On 23/6/2022 4:44 pm, Chris Ruehl wrote:
>>
>> On 23/6/2022 4:28 pm, Oliver Neukum wrote:
>>> if you absolutely want it to be driven from CDC-ACM, try this
>>> new attached patch.
>>> In your original patch you used NO_UNION_NORMAL. That will allow
>>> a device to work without a union descriptor but with the normal
>>> two interfaces. This devices has what in terms of ACM is a collapsed
>>> interface without a union descriptor.
>>> The driver provides for that but then it checks for the exact
>>> number of required endpoints, which is three. Your device has
>>> four endpoints.
>>> The patch ignores a fourth endpoint.
>>
> Apply the patch ,
> still no /dev/ttyACM0 comes up.
Hi,
please send me dmesg. This should not happen.
Regards
Oliver
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
2022-06-23 9:39 ` Oliver Neukum
@ 2022-06-25 2:35 ` Chris Ruehl
2022-06-25 2:42 ` Chris Ruehl
2022-06-25 7:32 ` Greg KH
0 siblings, 2 replies; 20+ messages in thread
From: Chris Ruehl @ 2022-06-25 2:35 UTC (permalink / raw)
To: Oliver Neukum, michael.lee, Lars Melin, USB list
On 23/6/2022 5:39 pm, Oliver Neukum wrote:
>
> On 23.06.22 10:55, Chris Ruehl wrote:
>>
>> On 23/6/2022 4:44 pm, Chris Ruehl wrote:
>>> On 23/6/2022 4:28 pm, Oliver Neukum wrote:
>>>> if you absolutely want it to be driven from CDC-ACM, try this
>>>> new attached patch.
>>>> In your original patch you used NO_UNION_NORMAL. That will allow
>>>> a device to work without a union descriptor but with the normal
>>>> two interfaces. This devices has what in terms of ACM is a collapsed
>>>> interface without a union descriptor.
>>>> The driver provides for that but then it checks for the exact
>>>> number of required endpoints, which is three. Your device has
>>>> four endpoints.
>>>> The patch ignores a fourth endpoint.
>> Apply the patch ,
>> still no /dev/ttyACM0 comes up.
> Hi,
>
> please send me dmesg. This should not happen.
>
> Regards
> Oliver
>
Hi,
sorry for let you wait but I had a bunch of testing with the b5l to deliver
my solution to the team.
here the dmesg after apply your patch & NO_NORMAL_UNION
[266005.246312] usb 2-1.4.4.1: new high-speed USB device number 19 using ehci-pci
[266005.344658] usb 2-1.4.4.1: New USB device found, idVendor=0590,
idProduct=00ca, bcdDevice= 2.00
[266005.344666] usb 2-1.4.4.1: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[266005.344670] usb 2-1.4.4.1: Product: OMRON B5L-001011
[266005.344673] usb 2-1.4.4.1: Manufacturer: OMRON Corporation
[266005.344675] usb 2-1.4.4.1: SerialNumber: 010000319A1
[266005.458809] usbcore: registered new interface driver cdc_acm
[266005.458814] cdc_acm: USB Abstract Control Model driver for USB modems and
ISDN adapters
T: Bus=02 Lev=04 Prnt=05 Port=00 Cnt=01 Dev#= 19 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=02(comm.) Sub=02 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0590 ProdID=00ca Rev= 2.00
S: Manufacturer=OMRON Corporation
S: Product=OMRON B5L-001011
S: SerialNumber=010000319A1
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 4mA
I:* If#= 0 Alt= 0 #EPs= 4 Cls=02(comm.) Sub=02 Prot=00 Driver=(none)
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=03(Int.) MxPS= 64 Ivl=4096ms
E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms
-Chris
--
GTSYS Limited RFID Technology
9/F, Unit E, R07, Kwai Shing Industrial Building Phase 2,
42-46 Tai Lin Pai Road, Kwai Chung, N.T., Hong Kong
Tel (852) 9079 9521
Disclaimer: https://www.gtsys.com.hk/email/classified.html
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
2022-06-25 2:35 ` Chris Ruehl
@ 2022-06-25 2:42 ` Chris Ruehl
2022-06-25 7:32 ` Greg KH
1 sibling, 0 replies; 20+ messages in thread
From: Chris Ruehl @ 2022-06-25 2:42 UTC (permalink / raw)
To: Oliver Neukum, michael.lee, Lars Melin, USB list
On 25/6/2022 10:35 am, Chris Ruehl wrote:
>
> On 23/6/2022 5:39 pm, Oliver Neukum wrote:
>>
>> On 23.06.22 10:55, Chris Ruehl wrote:
>>>
>>> On 23/6/2022 4:44 pm, Chris Ruehl wrote:
>>>> On 23/6/2022 4:28 pm, Oliver Neukum wrote:
>>>>> if you absolutely want it to be driven from CDC-ACM, try this
>>>>> new attached patch.
>>>>> In your original patch you used NO_UNION_NORMAL. That will allow
>>>>> a device to work without a union descriptor but with the normal
>>>>> two interfaces. This devices has what in terms of ACM is a collapsed
>>>>> interface without a union descriptor.
>>>>> The driver provides for that but then it checks for the exact
>>>>> number of required endpoints, which is three. Your device has
>>>>> four endpoints.
>>>>> The patch ignores a fourth endpoint.
>>> Apply the patch ,
>>> still no /dev/ttyACM0 comes up.
>> Hi,
>>
>> please send me dmesg. This should not happen.
>>
>> Regards
>> Oliver
>>
> Hi,
> sorry for let you wait but I had a bunch of testing with the b5l to deliver
> my solution to the team.
>
> here the dmesg after apply your patch & NO_NORMAL_UNION
>
> [266005.246312] usb 2-1.4.4.1: new high-speed USB device number 19 using ehci-pci
> [266005.344658] usb 2-1.4.4.1: New USB device found, idVendor=0590,
> idProduct=00ca, bcdDevice= 2.00
> [266005.344666] usb 2-1.4.4.1: New USB device strings: Mfr=1, Product=2,
> SerialNumber=3
> [266005.344670] usb 2-1.4.4.1: Product: OMRON B5L-001011
> [266005.344673] usb 2-1.4.4.1: Manufacturer: OMRON Corporation
> [266005.344675] usb 2-1.4.4.1: SerialNumber: 010000319A1
> [266005.458809] usbcore: registered new interface driver cdc_acm
> [266005.458814] cdc_acm: USB Abstract Control Model driver for USB modems and
> ISDN adapters
>
> T: Bus=02 Lev=04 Prnt=05 Port=00 Cnt=01 Dev#= 19 Spd=480 MxCh= 0
> D: Ver= 2.00 Cls=02(comm.) Sub=02 Prot=00 MxPS=64 #Cfgs= 1
> P: Vendor=0590 ProdID=00ca Rev= 2.00
> S: Manufacturer=OMRON Corporation
> S: Product=OMRON B5L-001011
> S: SerialNumber=010000319A1
> C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 4mA
> I:* If#= 0 Alt= 0 #EPs= 4 Cls=02(comm.) Sub=02 Prot=00 Driver=(none)
> E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=03(O) Atr=03(Int.) MxPS= 64 Ivl=4096ms
> E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms
>
> -Chris
>
The Arduino and the I/O of 3 channels with a working interface to compare.
T: Bus=02 Lev=03 Prnt=04 Port=01 Cnt=02 Dev#= 20 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=02(comm.) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=2341 ProdID=0042 Rev= 0.01
S: Manufacturer=Arduino (www.arduino.cc)
S: SerialNumber=850363135303517102C0
C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=cdc_acm
E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=255ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
E: Ad=04(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=83(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
--
GTSYS Limited RFID Technology
9/F, Unit E, R07, Kwai Shing Industrial Building Phase 2,
42-46 Tai Lin Pai Road, Kwai Chung, N.T., Hong Kong
Tel (852) 9079 9521
Disclaimer: https://www.gtsys.com.hk/email/classified.html
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
2022-06-25 2:35 ` Chris Ruehl
2022-06-25 2:42 ` Chris Ruehl
@ 2022-06-25 7:32 ` Greg KH
2022-06-25 7:46 ` Chris Ruehl
1 sibling, 1 reply; 20+ messages in thread
From: Greg KH @ 2022-06-25 7:32 UTC (permalink / raw)
To: Chris Ruehl; +Cc: Oliver Neukum, michael.lee, Lars Melin, USB list
On Sat, Jun 25, 2022 at 10:35:54AM +0800, Chris Ruehl wrote:
> Disclaimer: https://www.gtsys.com.hk/email/classified.html
Now deleted.
Note, this does not work well with kernel development efforts :(
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
2022-06-25 7:32 ` Greg KH
@ 2022-06-25 7:46 ` Chris Ruehl
0 siblings, 0 replies; 20+ messages in thread
From: Chris Ruehl @ 2022-06-25 7:46 UTC (permalink / raw)
To: Greg KH; +Cc: Oliver Neukum, michael.lee, Lars Melin, USB list
On 25/6/2022 3:32 pm, Greg KH wrote:
> On Sat, Jun 25, 2022 at 10:35:54AM +0800, Chris Ruehl wrote:
>> Disclaimer: https://www.gtsys.com.hk/email/classified.html
> Now deleted.
>
> Note, this does not work well with kernel development efforts :(
Sorry,
usually I not sent it with the kernel list.
-Chris
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
2022-06-23 8:55 ` Chris Ruehl
2022-06-23 9:39 ` Oliver Neukum
@ 2022-07-20 11:12 ` Oliver Neukum
1 sibling, 0 replies; 20+ messages in thread
From: Oliver Neukum @ 2022-07-20 11:12 UTC (permalink / raw)
To: Chris Ruehl, Oliver Neukum, michael.lee, Lars Melin, USB list
[-- Attachment #1: Type: text/plain, Size: 207 bytes --]
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
[-- Attachment #2: 0001-cdc-acm-adding-a-special-case-for-OMRON-device.patch --]
[-- Type: text/x-patch, Size: 1208 bytes --]
From ccf6a8654bc503d9e1cd75f038f4c4c6154716e3 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oneukum@suse.com>
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@suse.com>
---
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
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
2022-06-20 3:35 ` Lars Melin
2022-06-20 6:20 ` Chris Ruehl
@ 2022-07-20 16:24 ` Oliver Neukum
1 sibling, 0 replies; 20+ messages in thread
From: Oliver Neukum @ 2022-07-20 16:24 UTC (permalink / raw)
To: Lars Melin, Chris Ruehl, USB list; +Cc: Oliver Neukum
On 20.06.22 05:35, Lars Melin wrote:
> There is nothing CDC-ACM in that interface except for the interface
> attributes, the interface lacks everything else needed for it to be
> CDC-ACM.
> Check if Omron has an updated firmware fixing the problems or if they
> have their own proprietary driver for the device.
Hi,
that is not completely clear. It has the interrupt endpooint
that may or may not be intended for status messages.
Regards
Oliver
^ permalink raw reply [flat|nested] 20+ messages in thread
* serial: usb: cdc-acm: OMRON B5L ToF, device probe failed
@ 2022-06-15 7:25 Chris Ruehl
0 siblings, 0 replies; 20+ messages in thread
From: Chris Ruehl @ 2022-06-15 7:25 UTC (permalink / raw)
To: linux-serial
Hi there,
yet an other cdc-acm which not probed and no /dev/ttyACM0 comes up.
[ 539.655588] usb 2-1.4.3: USB disconnect, device number 9
[ 568.792182] usb 2-1.4.3: new high-speed USB device number 10 using ehci-pci
[ 568.890554] usb 2-1.4.3: New USB device found, idVendor=0590, idProduct=00ca,
bcdDevice= 2.00
[ 568.890562] usb 2-1.4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 568.890566] usb 2-1.4.3: Product: OMRON B5L-001011
[ 568.890568] usb 2-1.4.3: Manufacturer: OMRON Corporation
[ 568.890571] usb 2-1.4.3: SerialNumber: 010000366A1
[ 568.945679] cdc_acm 2-1.4.3:1.0: Zero length descriptor references
[ 568.945690] cdc_acm: probe of 2-1.4.3:1.0 failed with error -22
[ 568.946477] usbcore: registered new interface driver cdc_acm
[ 568.946480] cdc_acm: USB Abstract Control Model driver for USB modems and
ISDN adapters
so I set the quirk in the cdc-acm.c
{ USB_DEVICE(0x0590, 0x00ca), /* Omron b5l */
.driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
},
and solved the error.
[ 724.148131] usbcore: deregistering interface driver cdc_acm
[ 725.766219] usb 2-1.4.3: USB disconnect, device number 10
[ 757.467770] usb 2-1.4.3: new high-speed USB device number 11 using ehci-pci
[ 757.566100] usb 2-1.4.3: New USB device found, idVendor=0590, idProduct=00ca,
bcdDevice= 2.00
[ 757.566109] usb 2-1.4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 757.566113] usb 2-1.4.3: Product: OMRON B5L-001011
[ 757.566115] usb 2-1.4.3: Manufacturer: OMRON Corporation
[ 757.566117] usb 2-1.4.3: SerialNumber: 010000366A1
[ 757.622501] usbcore: registered new interface driver cdc_acm
[ 757.622506] cdc_acm: USB Abstract Control Model driver for USB modems and
ISDN adapters
But the kernel does not create the /dev/ttyACM0.
Kernel is vanilla 5.15.47
lsusb -v get me this.
Bus 002 Device 014: ID 0590:00ca Omron Corp. OMRON B5L-001011
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 2 Abstract (modem)
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0590 Omron Corp.
idProduct 0x00ca
bcdDevice 2.00
iManufacturer 1 OMRON Corporation
iProduct 2 OMRON B5L-001011
iSerial 3 010000366A1
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x002e
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 4mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 4
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 16
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 16
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 2 Abstract (modem)
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0001
Self Powered
Anything you have in mind?
Thanks
Chris
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2022-07-20 16:24 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-17 4:11 serial: usb: cdc-acm: OMRON B5L ToF, device probe failed Chris Ruehl
2022-06-20 2:44 ` Chris Ruehl
2022-06-20 3:35 ` Lars Melin
2022-06-20 6:20 ` Chris Ruehl
2022-06-21 0:38 ` michael.lee
2022-06-21 7:16 ` Greg KH
2022-06-21 10:09 ` Oliver Neukum
2022-06-21 10:44 ` Chris Ruehl
2022-06-23 2:26 ` Chris Ruehl
2022-06-23 8:28 ` Oliver Neukum
2022-06-23 8:44 ` Chris Ruehl
2022-06-23 8:55 ` Chris Ruehl
2022-06-23 9:39 ` Oliver Neukum
2022-06-25 2:35 ` Chris Ruehl
2022-06-25 2:42 ` Chris Ruehl
2022-06-25 7:32 ` Greg KH
2022-06-25 7:46 ` Chris Ruehl
2022-07-20 11:12 ` Oliver Neukum
2022-07-20 16:24 ` Oliver Neukum
-- strict thread matches above, loose matches on Subject: below --
2022-06-15 7:25 Chris Ruehl
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.