aboutsummaryrefslogtreecommitdiffstats
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.c34
1 files changed, 25 insertions, 9 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 900f7ff805ee..904efb6035b0 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -518,13 +518,16 @@ static int acm_port_activate(struct tty_port *port, struct tty_struct *tty)
518 if (usb_submit_urb(acm->ctrlurb, GFP_KERNEL)) { 518 if (usb_submit_urb(acm->ctrlurb, GFP_KERNEL)) {
519 dev_err(&acm->control->dev, 519 dev_err(&acm->control->dev,
520 "%s - usb_submit_urb(ctrl irq) failed\n", __func__); 520 "%s - usb_submit_urb(ctrl irq) failed\n", __func__);
521 usb_autopm_put_interface(acm->control);
521 goto error_submit_urb; 522 goto error_submit_urb;
522 } 523 }
523 524
524 acm->ctrlout = ACM_CTRL_DTR | ACM_CTRL_RTS; 525 acm->ctrlout = ACM_CTRL_DTR | ACM_CTRL_RTS;
525 if (acm_set_control(acm, acm->ctrlout) < 0 && 526 if (acm_set_control(acm, acm->ctrlout) < 0 &&
526 (acm->ctrl_caps & USB_CDC_CAP_LINE)) 527 (acm->ctrl_caps & USB_CDC_CAP_LINE)) {
528 usb_autopm_put_interface(acm->control);
527 goto error_set_control; 529 goto error_set_control;
530 }
528 531
529 usb_autopm_put_interface(acm->control); 532 usb_autopm_put_interface(acm->control);
530 533
@@ -549,7 +552,6 @@ error_submit_read_urbs:
549error_set_control: 552error_set_control:
550 usb_kill_urb(acm->ctrlurb); 553 usb_kill_urb(acm->ctrlurb);
551error_submit_urb: 554error_submit_urb:
552 usb_autopm_put_interface(acm->control);
553error_get_interface: 555error_get_interface:
554disconnected: 556disconnected:
555 mutex_unlock(&acm->mutex); 557 mutex_unlock(&acm->mutex);
@@ -1652,13 +1654,27 @@ static const struct usb_device_id acm_ids[] = {
1652 }, 1654 },
1653 /* Motorola H24 HSPA module: */ 1655 /* Motorola H24 HSPA module: */
1654 { USB_DEVICE(0x22b8, 0x2d91) }, /* modem */ 1656 { USB_DEVICE(0x22b8, 0x2d91) }, /* modem */
1655 { USB_DEVICE(0x22b8, 0x2d92) }, /* modem + diagnostics */ 1657 { USB_DEVICE(0x22b8, 0x2d92), /* modem + diagnostics */
1656 { USB_DEVICE(0x22b8, 0x2d93) }, /* modem + AT port */ 1658 .driver_info = NO_UNION_NORMAL, /* handle only modem interface */
1657 { USB_DEVICE(0x22b8, 0x2d95) }, /* modem + AT port + diagnostics */ 1659 },
1658 { USB_DEVICE(0x22b8, 0x2d96) }, /* modem + NMEA */ 1660 { USB_DEVICE(0x22b8, 0x2d93), /* modem + AT port */
1659 { USB_DEVICE(0x22b8, 0x2d97) }, /* modem + diagnostics + NMEA */ 1661 .driver_info = NO_UNION_NORMAL, /* handle only modem interface */
1660 { USB_DEVICE(0x22b8, 0x2d99) }, /* modem + AT port + NMEA */ 1662 },
1661 { USB_DEVICE(0x22b8, 0x2d9a) }, /* modem + AT port + diagnostics + NMEA */ 1663 { USB_DEVICE(0x22b8, 0x2d95), /* modem + AT port + diagnostics */
1664 .driver_info = NO_UNION_NORMAL, /* handle only modem interface */
1665 },
1666 { USB_DEVICE(0x22b8, 0x2d96), /* modem + NMEA */
1667 .driver_info = NO_UNION_NORMAL, /* handle only modem interface */
1668 },
1669 { USB_DEVICE(0x22b8, 0x2d97), /* modem + diagnostics + NMEA */
1670 .driver_info = NO_UNION_NORMAL, /* handle only modem interface */
1671 },
1672 { USB_DEVICE(0x22b8, 0x2d99), /* modem + AT port + NMEA */
1673 .driver_info = NO_UNION_NORMAL, /* handle only modem interface */
1674 },
1675 { USB_DEVICE(0x22b8, 0x2d9a), /* modem + AT port + diagnostics + NMEA */
1676 .driver_info = NO_UNION_NORMAL, /* handle only modem interface */
1677 },
1662 1678
1663 { USB_DEVICE(0x0572, 0x1329), /* Hummingbird huc56s (Conexant) */ 1679 { USB_DEVICE(0x0572, 0x1329), /* Hummingbird huc56s (Conexant) */
1664 .driver_info = NO_UNION_NORMAL, /* union descriptor misplaced on 1680 .driver_info = NO_UNION_NORMAL, /* union descriptor misplaced on