Page MenuHomeFreeBSD

D37942.id115254.diff
No OneTemporary

D37942.id115254.diff

diff --git a/share/man/man4/usb_quirk.4 b/share/man/man4/usb_quirk.4
--- a/share/man/man4/usb_quirk.4
+++ b/share/man/man4/usb_quirk.4
@@ -100,6 +100,8 @@
select configuration index 0 by default
.It UQ_ASSUME_CM_OVER_DATA
assume cm over data feature
+.It UQ_IGNORE_CDC_CM
+ignore cm descriptor
.It UQ_WMT_IGNORE
device should be ignored by wmt driver
.El
diff --git a/sys/dev/usb/quirk/usb_quirk.h b/sys/dev/usb/quirk/usb_quirk.h
--- a/sys/dev/usb/quirk/usb_quirk.h
+++ b/sys/dev/usb/quirk/usb_quirk.h
@@ -66,6 +66,7 @@
UQ_CFG_INDEX_4, /* select configuration index 4 by default */
UQ_CFG_INDEX_0, /* select configuration index 0 by default */
UQ_ASSUME_CM_OVER_DATA, /* assume cm over data feature */
+ UQ_IGNORE_CDC_CM, /* ignore cm descriptor */
/*
* USB Mass Storage Quirks. See "storage/umass.c" for a
diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c
--- a/sys/dev/usb/quirk/usb_quirk.c
+++ b/sys/dev/usb/quirk/usb_quirk.c
@@ -662,6 +662,7 @@
[UQ_CFG_INDEX_4] = "UQ_CFG_INDEX_4",
[UQ_CFG_INDEX_0] = "UQ_CFG_INDEX_0",
[UQ_ASSUME_CM_OVER_DATA] = "UQ_ASSUME_CM_OVER_DATA",
+ [UQ_IGNORE_CDC_CM] = "UQ_IGNORE_CDC_CM",
[UQ_MSC_NO_TEST_UNIT_READY] = "UQ_MSC_NO_TEST_UNIT_READY",
[UQ_MSC_NO_RS_CLEAR_UA] = "UQ_MSC_NO_RS_CLEAR_UA",
[UQ_MSC_NO_START_STOP] = "UQ_MSC_NO_START_STOP",
diff --git a/sys/dev/usb/serial/umodem.c b/sys/dev/usb/serial/umodem.c
--- a/sys/dev/usb/serial/umodem.c
+++ b/sys/dev/usb/serial/umodem.c
@@ -359,7 +359,9 @@
/* get the data interface number */
- cmd = umodem_get_desc(uaa, UDESC_CS_INTERFACE, UDESCSUB_CDC_CM);
+ cmd = NULL;
+ if (!usb_test_quirk(uaa, UQ_IGNORE_CDC_CM))
+ cmd = umodem_get_desc(uaa, UDESC_CS_INTERFACE, UDESCSUB_CDC_CM);
if ((cmd == NULL) || (cmd->bLength < sizeof(*cmd))) {
cud = usbd_find_descriptor(uaa->device, NULL,

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 22, 9:19 PM (4 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28943815
Default Alt Text
D37942.id115254.diff (1 KB)

Event Timeline