diff options
author | Jiri Kosina <jkosina@suse.cz> | 2012-10-28 14:28:52 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-10-28 14:29:19 -0400 |
commit | 3bd7bf1f0fe14f591c089ae61bbfa9bd356f178a (patch) | |
tree | 0058693cc9e70b7461dae551f8a19aff2efd13ca /drivers/isdn | |
parent | f16f84937d769c893492160b1a8c3672e3992beb (diff) | |
parent | e657e078d3dfa9f96976db7a2b5fd7d7c9f1f1a6 (diff) |
Merge branch 'master' into for-next
Sync up with Linus' tree to be able to apply Cesar's patch
against newer version of the code.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/capi/capi.c | 3 | ||||
-rw-r--r-- | drivers/isdn/gigaset/bas-gigaset.c | 19 | ||||
-rw-r--r-- | drivers/isdn/gigaset/common.c | 1 | ||||
-rw-r--r-- | drivers/isdn/gigaset/interface.c | 7 | ||||
-rw-r--r-- | drivers/isdn/hisax/Kconfig | 10 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_ppp.c | 2 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_tty.c | 41 | ||||
-rw-r--r-- | drivers/isdn/mISDN/hwchannel.c | 2 |
8 files changed, 53 insertions, 32 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 38c4bd87b2c9..c679867c2ccd 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c | |||
@@ -234,7 +234,8 @@ static struct capiminor *capiminor_alloc(struct capi20_appl *ap, u32 ncci) | |||
234 | 234 | ||
235 | mp->minor = minor; | 235 | mp->minor = minor; |
236 | 236 | ||
237 | dev = tty_register_device(capinc_tty_driver, minor, NULL); | 237 | dev = tty_port_register_device(&mp->port, capinc_tty_driver, minor, |
238 | NULL); | ||
238 | if (IS_ERR(dev)) | 239 | if (IS_ERR(dev)) |
239 | goto err_out2; | 240 | goto err_out2; |
240 | 241 | ||
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index 527588708948..c44950d3eb7b 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c | |||
@@ -617,7 +617,13 @@ static void int_in_work(struct work_struct *work) | |||
617 | if (rc == 0) | 617 | if (rc == 0) |
618 | /* success, resubmit interrupt read URB */ | 618 | /* success, resubmit interrupt read URB */ |
619 | rc = usb_submit_urb(urb, GFP_ATOMIC); | 619 | rc = usb_submit_urb(urb, GFP_ATOMIC); |
620 | if (rc != 0 && rc != -ENODEV) { | 620 | |
621 | switch (rc) { | ||
622 | case 0: /* success */ | ||
623 | case -ENODEV: /* device gone */ | ||
624 | case -EINVAL: /* URB already resubmitted, or terminal badness */ | ||
625 | break; | ||
626 | default: /* failure: try to recover by resetting the device */ | ||
621 | dev_err(cs->dev, "clear halt failed: %s\n", get_usb_rcmsg(rc)); | 627 | dev_err(cs->dev, "clear halt failed: %s\n", get_usb_rcmsg(rc)); |
622 | rc = usb_lock_device_for_reset(ucs->udev, ucs->interface); | 628 | rc = usb_lock_device_for_reset(ucs->udev, ucs->interface); |
623 | if (rc == 0) { | 629 | if (rc == 0) { |
@@ -2442,7 +2448,9 @@ static void gigaset_disconnect(struct usb_interface *interface) | |||
2442 | } | 2448 | } |
2443 | 2449 | ||
2444 | /* gigaset_suspend | 2450 | /* gigaset_suspend |
2445 | * This function is called before the USB connection is suspended. | 2451 | * This function is called before the USB connection is suspended |
2452 | * or before the USB device is reset. | ||
2453 | * In the latter case, message == PMSG_ON. | ||
2446 | */ | 2454 | */ |
2447 | static int gigaset_suspend(struct usb_interface *intf, pm_message_t message) | 2455 | static int gigaset_suspend(struct usb_interface *intf, pm_message_t message) |
2448 | { | 2456 | { |
@@ -2498,7 +2506,12 @@ static int gigaset_suspend(struct usb_interface *intf, pm_message_t message) | |||
2498 | del_timer_sync(&ucs->timer_atrdy); | 2506 | del_timer_sync(&ucs->timer_atrdy); |
2499 | del_timer_sync(&ucs->timer_cmd_in); | 2507 | del_timer_sync(&ucs->timer_cmd_in); |
2500 | del_timer_sync(&ucs->timer_int_in); | 2508 | del_timer_sync(&ucs->timer_int_in); |
2501 | cancel_work_sync(&ucs->int_in_wq); | 2509 | |
2510 | /* don't try to cancel int_in_wq from within reset as it | ||
2511 | * might be the one requesting the reset | ||
2512 | */ | ||
2513 | if (message.event != PM_EVENT_ON) | ||
2514 | cancel_work_sync(&ucs->int_in_wq); | ||
2502 | 2515 | ||
2503 | gig_dbg(DEBUG_SUSPEND, "suspend complete"); | 2516 | gig_dbg(DEBUG_SUSPEND, "suspend complete"); |
2504 | return 0; | 2517 | return 0; |
diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index aa41485bc594..30a6b174fbb0 100644 --- a/drivers/isdn/gigaset/common.c +++ b/drivers/isdn/gigaset/common.c | |||
@@ -1123,7 +1123,6 @@ struct gigaset_driver *gigaset_initdriver(unsigned minor, unsigned minors, | |||
1123 | return drv; | 1123 | return drv; |
1124 | 1124 | ||
1125 | error: | 1125 | error: |
1126 | kfree(drv->cs); | ||
1127 | kfree(drv); | 1126 | kfree(drv); |
1128 | return NULL; | 1127 | return NULL; |
1129 | } | 1128 | } |
diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c index a6d9fd2858f7..67abf3ff45e8 100644 --- a/drivers/isdn/gigaset/interface.c +++ b/drivers/isdn/gigaset/interface.c | |||
@@ -446,8 +446,8 @@ static void if_set_termios(struct tty_struct *tty, struct ktermios *old) | |||
446 | goto out; | 446 | goto out; |
447 | } | 447 | } |
448 | 448 | ||
449 | iflag = tty->termios->c_iflag; | 449 | iflag = tty->termios.c_iflag; |
450 | cflag = tty->termios->c_cflag; | 450 | cflag = tty->termios.c_cflag; |
451 | old_cflag = old ? old->c_cflag : cflag; | 451 | old_cflag = old ? old->c_cflag : cflag; |
452 | gig_dbg(DEBUG_IF, "%u: iflag %x cflag %x old %x", | 452 | gig_dbg(DEBUG_IF, "%u: iflag %x cflag %x old %x", |
453 | cs->minor_index, iflag, cflag, old_cflag); | 453 | cs->minor_index, iflag, cflag, old_cflag); |
@@ -524,7 +524,8 @@ void gigaset_if_init(struct cardstate *cs) | |||
524 | tasklet_init(&cs->if_wake_tasklet, if_wake, (unsigned long) cs); | 524 | tasklet_init(&cs->if_wake_tasklet, if_wake, (unsigned long) cs); |
525 | 525 | ||
526 | mutex_lock(&cs->mutex); | 526 | mutex_lock(&cs->mutex); |
527 | cs->tty_dev = tty_register_device(drv->tty, cs->minor_index, NULL); | 527 | cs->tty_dev = tty_port_register_device(&cs->port, drv->tty, |
528 | cs->minor_index, NULL); | ||
528 | 529 | ||
529 | if (!IS_ERR(cs->tty_dev)) | 530 | if (!IS_ERR(cs->tty_dev)) |
530 | dev_set_drvdata(cs->tty_dev, cs); | 531 | dev_set_drvdata(cs->tty_dev, cs); |
diff --git a/drivers/isdn/hisax/Kconfig b/drivers/isdn/hisax/Kconfig index 452fde9edf86..70ecd0c19500 100644 --- a/drivers/isdn/hisax/Kconfig +++ b/drivers/isdn/hisax/Kconfig | |||
@@ -109,7 +109,7 @@ config HISAX_16_3 | |||
109 | 109 | ||
110 | config HISAX_TELESPCI | 110 | config HISAX_TELESPCI |
111 | bool "Teles PCI" | 111 | bool "Teles PCI" |
112 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) | 112 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN))) |
113 | help | 113 | help |
114 | This enables HiSax support for the Teles PCI. | 114 | This enables HiSax support for the Teles PCI. |
115 | See <file:Documentation/isdn/README.HiSax> on how to configure it. | 115 | See <file:Documentation/isdn/README.HiSax> on how to configure it. |
@@ -237,7 +237,7 @@ config HISAX_MIC | |||
237 | 237 | ||
238 | config HISAX_NETJET | 238 | config HISAX_NETJET |
239 | bool "NETjet card" | 239 | bool "NETjet card" |
240 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) | 240 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN))) |
241 | help | 241 | help |
242 | This enables HiSax support for the NetJet from Traverse | 242 | This enables HiSax support for the NetJet from Traverse |
243 | Technologies. | 243 | Technologies. |
@@ -248,7 +248,7 @@ config HISAX_NETJET | |||
248 | 248 | ||
249 | config HISAX_NETJET_U | 249 | config HISAX_NETJET_U |
250 | bool "NETspider U card" | 250 | bool "NETspider U card" |
251 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) | 251 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN))) |
252 | help | 252 | help |
253 | This enables HiSax support for the Netspider U interface ISDN card | 253 | This enables HiSax support for the Netspider U interface ISDN card |
254 | from Traverse Technologies. | 254 | from Traverse Technologies. |
@@ -316,7 +316,7 @@ config HISAX_GAZEL | |||
316 | 316 | ||
317 | config HISAX_HFC_PCI | 317 | config HISAX_HFC_PCI |
318 | bool "HFC PCI-Bus cards" | 318 | bool "HFC PCI-Bus cards" |
319 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) | 319 | depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN))) |
320 | help | 320 | help |
321 | This enables HiSax support for the HFC-S PCI 2BDS0 based cards. | 321 | This enables HiSax support for the HFC-S PCI 2BDS0 based cards. |
322 | 322 | ||
@@ -341,7 +341,7 @@ config HISAX_HFC_SX | |||
341 | 341 | ||
342 | config HISAX_ENTERNOW_PCI | 342 | config HISAX_ENTERNOW_PCI |
343 | bool "Formula-n enter:now PCI card" | 343 | bool "Formula-n enter:now PCI card" |
344 | depends on HISAX_NETJET && PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) | 344 | depends on HISAX_NETJET && PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN))) |
345 | help | 345 | help |
346 | This enables HiSax support for the Formula-n enter:now PCI | 346 | This enables HiSax support for the Formula-n enter:now PCI |
347 | ISDN card. | 347 | ISDN card. |
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c index a1e760150821..61d78fa03b1a 100644 --- a/drivers/isdn/i4l/isdn_ppp.c +++ b/drivers/isdn/i4l/isdn_ppp.c | |||
@@ -595,7 +595,7 @@ isdn_ppp_ioctl(int min, struct file *file, unsigned int cmd, unsigned long arg) | |||
595 | j = ipc->num / (sizeof(long) * 8); | 595 | j = ipc->num / (sizeof(long) * 8); |
596 | i = ipc->num % (sizeof(long) * 8); | 596 | i = ipc->num % (sizeof(long) * 8); |
597 | if (j < 8) | 597 | if (j < 8) |
598 | protos[j] |= (0x1 << i); | 598 | protos[j] |= (1UL << i); |
599 | ipc = ipc->next; | 599 | ipc = ipc->next; |
600 | } | 600 | } |
601 | if ((r = set_arg(argp, protos, 8 * sizeof(long)))) | 601 | if ((r = set_arg(argp, protos, 8 * sizeof(long)))) |
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index 7bc50670d7d9..b817809f763c 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c | |||
@@ -1009,15 +1009,15 @@ isdn_tty_change_speed(modem_info *info) | |||
1009 | quot; | 1009 | quot; |
1010 | int i; | 1010 | int i; |
1011 | 1011 | ||
1012 | if (!port->tty || !port->tty->termios) | 1012 | if (!port->tty) |
1013 | return; | 1013 | return; |
1014 | cflag = port->tty->termios->c_cflag; | 1014 | cflag = port->tty->termios.c_cflag; |
1015 | 1015 | ||
1016 | quot = i = cflag & CBAUD; | 1016 | quot = i = cflag & CBAUD; |
1017 | if (i & CBAUDEX) { | 1017 | if (i & CBAUDEX) { |
1018 | i &= ~CBAUDEX; | 1018 | i &= ~CBAUDEX; |
1019 | if (i < 1 || i > 2) | 1019 | if (i < 1 || i > 2) |
1020 | port->tty->termios->c_cflag &= ~CBAUDEX; | 1020 | port->tty->termios.c_cflag &= ~CBAUDEX; |
1021 | else | 1021 | else |
1022 | i += 15; | 1022 | i += 15; |
1023 | } | 1023 | } |
@@ -1097,7 +1097,7 @@ isdn_tty_shutdown(modem_info *info) | |||
1097 | #endif | 1097 | #endif |
1098 | isdn_unlock_drivers(); | 1098 | isdn_unlock_drivers(); |
1099 | info->msr &= ~UART_MSR_RI; | 1099 | info->msr &= ~UART_MSR_RI; |
1100 | if (!info->port.tty || (info->port.tty->termios->c_cflag & HUPCL)) { | 1100 | if (!info->port.tty || (info->port.tty->termios.c_cflag & HUPCL)) { |
1101 | info->mcr &= ~(UART_MCR_DTR | UART_MCR_RTS); | 1101 | info->mcr &= ~(UART_MCR_DTR | UART_MCR_RTS); |
1102 | if (info->emu.mdmreg[REG_DTRHUP] & BIT_DTRHUP) { | 1102 | if (info->emu.mdmreg[REG_DTRHUP] & BIT_DTRHUP) { |
1103 | isdn_tty_modem_reset_regs(info, 0); | 1103 | isdn_tty_modem_reset_regs(info, 0); |
@@ -1469,13 +1469,13 @@ isdn_tty_set_termios(struct tty_struct *tty, struct ktermios *old_termios) | |||
1469 | if (!old_termios) | 1469 | if (!old_termios) |
1470 | isdn_tty_change_speed(info); | 1470 | isdn_tty_change_speed(info); |
1471 | else { | 1471 | else { |
1472 | if (tty->termios->c_cflag == old_termios->c_cflag && | 1472 | if (tty->termios.c_cflag == old_termios->c_cflag && |
1473 | tty->termios->c_ispeed == old_termios->c_ispeed && | 1473 | tty->termios.c_ispeed == old_termios->c_ispeed && |
1474 | tty->termios->c_ospeed == old_termios->c_ospeed) | 1474 | tty->termios.c_ospeed == old_termios->c_ospeed) |
1475 | return; | 1475 | return; |
1476 | isdn_tty_change_speed(info); | 1476 | isdn_tty_change_speed(info); |
1477 | if ((old_termios->c_cflag & CRTSCTS) && | 1477 | if ((old_termios->c_cflag & CRTSCTS) && |
1478 | !(tty->termios->c_cflag & CRTSCTS)) | 1478 | !(tty->termios.c_cflag & CRTSCTS)) |
1479 | tty->hw_stopped = 0; | 1479 | tty->hw_stopped = 0; |
1480 | } | 1480 | } |
1481 | } | 1481 | } |
@@ -1486,6 +1486,18 @@ isdn_tty_set_termios(struct tty_struct *tty, struct ktermios *old_termios) | |||
1486 | * ------------------------------------------------------------ | 1486 | * ------------------------------------------------------------ |
1487 | */ | 1487 | */ |
1488 | 1488 | ||
1489 | static int isdn_tty_install(struct tty_driver *driver, struct tty_struct *tty) | ||
1490 | { | ||
1491 | modem_info *info = &dev->mdm.info[tty->index]; | ||
1492 | |||
1493 | if (isdn_tty_paranoia_check(info, tty->name, __func__)) | ||
1494 | return -ENODEV; | ||
1495 | |||
1496 | tty->driver_data = info; | ||
1497 | |||
1498 | return tty_port_install(&info->port, driver, tty); | ||
1499 | } | ||
1500 | |||
1489 | /* | 1501 | /* |
1490 | * This routine is called whenever a serial port is opened. It | 1502 | * This routine is called whenever a serial port is opened. It |
1491 | * enables interrupts for a serial port, linking in its async structure into | 1503 | * enables interrupts for a serial port, linking in its async structure into |
@@ -1495,22 +1507,16 @@ isdn_tty_set_termios(struct tty_struct *tty, struct ktermios *old_termios) | |||
1495 | static int | 1507 | static int |
1496 | isdn_tty_open(struct tty_struct *tty, struct file *filp) | 1508 | isdn_tty_open(struct tty_struct *tty, struct file *filp) |
1497 | { | 1509 | { |
1498 | struct tty_port *port; | 1510 | modem_info *info = tty->driver_data; |
1499 | modem_info *info; | 1511 | struct tty_port *port = &info->port; |
1500 | int retval; | 1512 | int retval; |
1501 | 1513 | ||
1502 | info = &dev->mdm.info[tty->index]; | ||
1503 | if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_open")) | ||
1504 | return -ENODEV; | ||
1505 | port = &info->port; | ||
1506 | #ifdef ISDN_DEBUG_MODEM_OPEN | 1514 | #ifdef ISDN_DEBUG_MODEM_OPEN |
1507 | printk(KERN_DEBUG "isdn_tty_open %s, count = %d\n", tty->name, | 1515 | printk(KERN_DEBUG "isdn_tty_open %s, count = %d\n", tty->name, |
1508 | port->count); | 1516 | port->count); |
1509 | #endif | 1517 | #endif |
1510 | port->count++; | 1518 | port->count++; |
1511 | tty->driver_data = info; | ||
1512 | port->tty = tty; | 1519 | port->tty = tty; |
1513 | tty->port = port; | ||
1514 | /* | 1520 | /* |
1515 | * Start up serial port | 1521 | * Start up serial port |
1516 | */ | 1522 | */ |
@@ -1738,6 +1744,7 @@ modem_write_profile(atemu *m) | |||
1738 | } | 1744 | } |
1739 | 1745 | ||
1740 | static const struct tty_operations modem_ops = { | 1746 | static const struct tty_operations modem_ops = { |
1747 | .install = isdn_tty_install, | ||
1741 | .open = isdn_tty_open, | 1748 | .open = isdn_tty_open, |
1742 | .close = isdn_tty_close, | 1749 | .close = isdn_tty_close, |
1743 | .write = isdn_tty_write, | 1750 | .write = isdn_tty_write, |
@@ -1782,7 +1789,7 @@ isdn_tty_modem_init(void) | |||
1782 | m->tty_modem->subtype = SERIAL_TYPE_NORMAL; | 1789 | m->tty_modem->subtype = SERIAL_TYPE_NORMAL; |
1783 | m->tty_modem->init_termios = tty_std_termios; | 1790 | m->tty_modem->init_termios = tty_std_termios; |
1784 | m->tty_modem->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; | 1791 | m->tty_modem->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; |
1785 | m->tty_modem->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; | 1792 | m->tty_modem->flags = TTY_DRIVER_REAL_RAW; |
1786 | m->tty_modem->driver_name = "isdn_tty"; | 1793 | m->tty_modem->driver_name = "isdn_tty"; |
1787 | tty_set_operations(m->tty_modem, &modem_ops); | 1794 | tty_set_operations(m->tty_modem, &modem_ops); |
1788 | retval = tty_register_driver(m->tty_modem); | 1795 | retval = tty_register_driver(m->tty_modem); |
diff --git a/drivers/isdn/mISDN/hwchannel.c b/drivers/isdn/mISDN/hwchannel.c index 2602be23f341..84b4b0f7eb99 100644 --- a/drivers/isdn/mISDN/hwchannel.c +++ b/drivers/isdn/mISDN/hwchannel.c | |||
@@ -116,7 +116,7 @@ mISDN_freedchannel(struct dchannel *ch) | |||
116 | } | 116 | } |
117 | skb_queue_purge(&ch->squeue); | 117 | skb_queue_purge(&ch->squeue); |
118 | skb_queue_purge(&ch->rqueue); | 118 | skb_queue_purge(&ch->rqueue); |
119 | flush_work_sync(&ch->workq); | 119 | flush_work(&ch->workq); |
120 | return 0; | 120 | return 0; |
121 | } | 121 | } |
122 | EXPORT_SYMBOL(mISDN_freedchannel); | 122 | EXPORT_SYMBOL(mISDN_freedchannel); |