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 @@ -188,6 +188,7 @@ USB_QUIRK(CURITEL, UM150, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(CURITEL, UM175, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(VERTEX, VW110L, 0x0000, 0xffff, UQ_ASSUME_CM_OVER_DATA), + USB_QUIRK(BALTECH, SMARTCARDREADER, 0x0000, 0xffff, UQ_IGNORE_CDC_CM), /* USB Mass Storage Class Quirks */ USB_QUIRK_VP(USB_VENDOR_ASAHIOPTICAL, 0, UQ_MSC_NO_RS_CLEAR_UA, @@ -662,6 +663,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, diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1337,6 +1337,7 @@ /* Baltech products */ product BALTECH CARDREADER 0x9999 Card reader +product BALTECH SMARTCARDREADER 0xf019 SmartCard reader /* Bayer products */ product BAYER CONTOUR_CABLE 0x6001 FTDI compatible adapter