diff options
author | Steve Lin <stlin@nvidia.com> | 2011-11-28 14:30:42 -0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:50:27 -0800 |
commit | c206ede61b50e88f5fec1862cd83243c482f0a60 (patch) | |
tree | e17e1a45df5c49e97f8c53523616df41dbd17a65 /drivers/usb/class/cdc-acm.c | |
parent | a8f355002ab5ede378f7c3b755ff85f4b8d451f9 (diff) |
usb: cdc-acm: remove tty_hangup in acm_reset_resume
Do not call tty_hangup in acm_reset_resume for certain modems.
Bug 889308
Reviewed-on: http://git-master/r/59177
(cherry picked from commit d57d67f6f563aa8f6c21c544f02cac3002103d21)
Change-Id: If10a09fdbb130e5734dba54b0e98c6cc6959c5d3
Reviewed-on: http://git-master/r/66987
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R4e6d948d1e5f05ec2aaaba8560f0bbdae9ea87df
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 14 |
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) }, |