diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/usb/serial/sierra.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/usb/serial/sierra.c')
-rw-r--r-- | drivers/usb/serial/sierra.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index d47b56e9e8ce..d5d136a53b61 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c | |||
@@ -301,6 +301,9 @@ static const struct usb_device_id id_table[] = { | |||
301 | { USB_DEVICE(0x1199, 0x68A3), /* Sierra Wireless Direct IP modems */ | 301 | { USB_DEVICE(0x1199, 0x68A3), /* Sierra Wireless Direct IP modems */ |
302 | .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist | 302 | .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist |
303 | }, | 303 | }, |
304 | { USB_DEVICE(0x0f3d, 0x68A3), /* Airprime/Sierra Wireless Direct IP modems */ | ||
305 | .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist | ||
306 | }, | ||
304 | { USB_DEVICE(0x413C, 0x08133) }, /* Dell Computer Corp. Wireless 5720 VZW Mobile Broadband (EVDO Rev-A) Minicard GPS Port */ | 307 | { USB_DEVICE(0x413C, 0x08133) }, /* Dell Computer Corp. Wireless 5720 VZW Mobile Broadband (EVDO Rev-A) Minicard GPS Port */ |
305 | 308 | ||
306 | { } | 309 | { } |
@@ -373,7 +376,10 @@ static int sierra_send_setup(struct usb_serial_port *port) | |||
373 | if (!do_send) | 376 | if (!do_send) |
374 | return 0; | 377 | return 0; |
375 | 378 | ||
376 | usb_autopm_get_interface(serial->interface); | 379 | retval = usb_autopm_get_interface(serial->interface); |
380 | if (retval < 0) | ||
381 | return retval; | ||
382 | |||
377 | retval = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), | 383 | retval = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), |
378 | 0x22, 0x21, val, interface, NULL, 0, USB_CTRL_SET_TIMEOUT); | 384 | 0x22, 0x21, val, interface, NULL, 0, USB_CTRL_SET_TIMEOUT); |
379 | usb_autopm_put_interface(serial->interface); | 385 | usb_autopm_put_interface(serial->interface); |
@@ -389,7 +395,7 @@ static void sierra_set_termios(struct tty_struct *tty, | |||
389 | sierra_send_setup(port); | 395 | sierra_send_setup(port); |
390 | } | 396 | } |
391 | 397 | ||
392 | static int sierra_tiocmget(struct tty_struct *tty, struct file *file) | 398 | static int sierra_tiocmget(struct tty_struct *tty) |
393 | { | 399 | { |
394 | struct usb_serial_port *port = tty->driver_data; | 400 | struct usb_serial_port *port = tty->driver_data; |
395 | unsigned int value; | 401 | unsigned int value; |
@@ -408,7 +414,7 @@ static int sierra_tiocmget(struct tty_struct *tty, struct file *file) | |||
408 | return value; | 414 | return value; |
409 | } | 415 | } |
410 | 416 | ||
411 | static int sierra_tiocmset(struct tty_struct *tty, struct file *file, | 417 | static int sierra_tiocmset(struct tty_struct *tty, |
412 | unsigned int set, unsigned int clear) | 418 | unsigned int set, unsigned int clear) |
413 | { | 419 | { |
414 | struct usb_serial_port *port = tty->driver_data; | 420 | struct usb_serial_port *port = tty->driver_data; |
@@ -620,8 +626,6 @@ static void sierra_indat_callback(struct urb *urb) | |||
620 | dev_err(&port->dev, "resubmit read urb failed." | 626 | dev_err(&port->dev, "resubmit read urb failed." |
621 | "(%d)\n", err); | 627 | "(%d)\n", err); |
622 | } | 628 | } |
623 | |||
624 | return; | ||
625 | } | 629 | } |
626 | 630 | ||
627 | static void sierra_instat_callback(struct urb *urb) | 631 | static void sierra_instat_callback(struct urb *urb) |
@@ -810,8 +814,12 @@ static void sierra_close(struct usb_serial_port *port) | |||
810 | mutex_lock(&serial->disc_mutex); | 814 | mutex_lock(&serial->disc_mutex); |
811 | if (!serial->disconnected) { | 815 | if (!serial->disconnected) { |
812 | serial->interface->needs_remote_wakeup = 0; | 816 | serial->interface->needs_remote_wakeup = 0; |
813 | usb_autopm_get_interface(serial->interface); | 817 | /* odd error handling due to pm counters */ |
814 | sierra_send_setup(port); | 818 | if (!usb_autopm_get_interface(serial->interface)) |
819 | sierra_send_setup(port); | ||
820 | else | ||
821 | usb_autopm_get_interface_no_resume(serial->interface); | ||
822 | |||
815 | } | 823 | } |
816 | mutex_unlock(&serial->disc_mutex); | 824 | mutex_unlock(&serial->disc_mutex); |
817 | spin_lock_irq(&intfdata->susp_lock); | 825 | spin_lock_irq(&intfdata->susp_lock); |
@@ -864,7 +872,8 @@ static int sierra_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
864 | /* get rid of everything as in close */ | 872 | /* get rid of everything as in close */ |
865 | sierra_close(port); | 873 | sierra_close(port); |
866 | /* restore balance for autopm */ | 874 | /* restore balance for autopm */ |
867 | usb_autopm_put_interface(serial->interface); | 875 | if (!serial->disconnected) |
876 | usb_autopm_put_interface(serial->interface); | ||
868 | return err; | 877 | return err; |
869 | } | 878 | } |
870 | sierra_send_setup(port); | 879 | sierra_send_setup(port); |