summaryrefslogtreecommitdiff
path: root/drivers/usb/class/cdc-acm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
-rw-r--r--drivers/usb/class/cdc-acm.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index f0ec26b4a797..65e269f5fa16 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -866,7 +866,7 @@ static int acm_probe(struct usb_interface *intf,
num_rx_buf = (quirks == SINGLE_RX_URB) ? 1 : ACM_NR;
/* not a real CDC ACM device */
- if (quirks == NOT_REAL_ACM)
+ if (quirks & NOT_REAL_ACM)
return -ENODEV;
/* handle quirks deadly to normal probing*/
@@ -1087,6 +1087,8 @@ made_compressed_probe:
acm->is_int_ep = usb_endpoint_xfer_int(epread);
if (acm->is_int_ep)
acm->bInterval = epread->bInterval;
+ if (quirks & NO_HANGUP_IN_RESET_RESUME)
+ acm->no_hangup_in_reset_resume = 1;
tty_port_init(&acm->port);
acm->port.ops = &acm_port_ops;
@@ -1395,7 +1397,8 @@ static int acm_reset_resume(struct usb_interface *intf)
if (acm->port.count) {
tty = tty_port_tty_get(&acm->port);
if (tty) {
- tty_hangup(tty);
+ if (!acm->no_hangup_in_reset_resume)
+ tty_hangup(tty);
tty_kref_put(tty);
}
}
@@ -1476,7 +1479,7 @@ static const struct usb_device_id acm_ids[] = {
.driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
},
{ USB_DEVICE(0x1519, 0x0020),
- .driver_info = NO_UNION_NORMAL, /* has no union descriptor */
+ .driver_info = NO_UNION_NORMAL | NO_HANGUP_IN_RESET_RESUME, /* has no union descriptor */
},
/* Nokia S60 phones expose two ACM channels. The first is
@@ -1563,6 +1566,11 @@ static const struct usb_device_id acm_ids[] = {
.driver_info = NOT_REAL_ACM,
},
+ /* Icera 450 */
+ { USB_DEVICE(0x1983, 0x0321),
+ .driver_info = NO_HANGUP_IN_RESET_RESUME,
+ },
+
/* control interfaces without any protocol set */
{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
USB_CDC_PROTO_NONE) },