diff options
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/Kconfig | 1 | ||||
-rw-r--r-- | drivers/isdn/capi/Kconfig | 1 | ||||
-rw-r--r-- | drivers/isdn/gigaset/Kconfig | 1 | ||||
-rw-r--r-- | drivers/isdn/gigaset/interface.c | 14 | ||||
-rw-r--r-- | drivers/isdn/hardware/mISDN/Kconfig | 1 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_common.c | 14 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_common.h | 2 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_tty.c | 59 |
8 files changed, 42 insertions, 51 deletions
diff --git a/drivers/isdn/Kconfig b/drivers/isdn/Kconfig index 86cd75a0e84d..ef661acdda17 100644 --- a/drivers/isdn/Kconfig +++ b/drivers/isdn/Kconfig | |||
@@ -22,6 +22,7 @@ if ISDN | |||
22 | 22 | ||
23 | menuconfig ISDN_I4L | 23 | menuconfig ISDN_I4L |
24 | tristate "Old ISDN4Linux (deprecated)" | 24 | tristate "Old ISDN4Linux (deprecated)" |
25 | depends on TTY | ||
25 | ---help--- | 26 | ---help--- |
26 | This driver allows you to use an ISDN adapter for networking | 27 | This driver allows you to use an ISDN adapter for networking |
27 | connections and as dialin/out device. The isdn-tty's have a built | 28 | connections and as dialin/out device. The isdn-tty's have a built |
diff --git a/drivers/isdn/capi/Kconfig b/drivers/isdn/capi/Kconfig index 15c3ffd9d860..f04686580040 100644 --- a/drivers/isdn/capi/Kconfig +++ b/drivers/isdn/capi/Kconfig | |||
@@ -18,6 +18,7 @@ config CAPI_TRACE | |||
18 | 18 | ||
19 | config ISDN_CAPI_MIDDLEWARE | 19 | config ISDN_CAPI_MIDDLEWARE |
20 | bool "CAPI2.0 Middleware support" | 20 | bool "CAPI2.0 Middleware support" |
21 | depends on TTY | ||
21 | help | 22 | help |
22 | This option will enhance the capabilities of the /dev/capi20 | 23 | This option will enhance the capabilities of the /dev/capi20 |
23 | interface. It will provide a means of moving a data connection, | 24 | interface. It will provide a means of moving a data connection, |
diff --git a/drivers/isdn/gigaset/Kconfig b/drivers/isdn/gigaset/Kconfig index b18a92c32184..dde5e09e6267 100644 --- a/drivers/isdn/gigaset/Kconfig +++ b/drivers/isdn/gigaset/Kconfig | |||
@@ -1,5 +1,6 @@ | |||
1 | menuconfig ISDN_DRV_GIGASET | 1 | menuconfig ISDN_DRV_GIGASET |
2 | tristate "Siemens Gigaset support" | 2 | tristate "Siemens Gigaset support" |
3 | depends on TTY | ||
3 | select CRC_CCITT | 4 | select CRC_CCITT |
4 | select BITREVERSE | 5 | select BITREVERSE |
5 | help | 6 | help |
diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c index 20b7e7a1190f..e2b539675b66 100644 --- a/drivers/isdn/gigaset/interface.c +++ b/drivers/isdn/gigaset/interface.c | |||
@@ -134,7 +134,7 @@ static int if_open(struct tty_struct *tty, struct file *filp) | |||
134 | 134 | ||
135 | if (cs->port.count == 1) { | 135 | if (cs->port.count == 1) { |
136 | tty_port_tty_set(&cs->port, tty); | 136 | tty_port_tty_set(&cs->port, tty); |
137 | tty->low_latency = 1; | 137 | cs->port.low_latency = 1; |
138 | } | 138 | } |
139 | 139 | ||
140 | mutex_unlock(&cs->mutex); | 140 | mutex_unlock(&cs->mutex); |
@@ -546,16 +546,8 @@ void gigaset_if_free(struct cardstate *cs) | |||
546 | void gigaset_if_receive(struct cardstate *cs, | 546 | void gigaset_if_receive(struct cardstate *cs, |
547 | unsigned char *buffer, size_t len) | 547 | unsigned char *buffer, size_t len) |
548 | { | 548 | { |
549 | struct tty_struct *tty = tty_port_tty_get(&cs->port); | 549 | tty_insert_flip_string(&cs->port, buffer, len); |
550 | 550 | tty_flip_buffer_push(&cs->port); | |
551 | if (tty == NULL) { | ||
552 | gig_dbg(DEBUG_IF, "receive on closed device"); | ||
553 | return; | ||
554 | } | ||
555 | |||
556 | tty_insert_flip_string(tty, buffer, len); | ||
557 | tty_flip_buffer_push(tty); | ||
558 | tty_kref_put(tty); | ||
559 | } | 551 | } |
560 | EXPORT_SYMBOL_GPL(gigaset_if_receive); | 552 | EXPORT_SYMBOL_GPL(gigaset_if_receive); |
561 | 553 | ||
diff --git a/drivers/isdn/hardware/mISDN/Kconfig b/drivers/isdn/hardware/mISDN/Kconfig index eadc1cd34a20..b8611e3e5e74 100644 --- a/drivers/isdn/hardware/mISDN/Kconfig +++ b/drivers/isdn/hardware/mISDN/Kconfig | |||
@@ -76,6 +76,7 @@ config MISDN_NETJET | |||
76 | tristate "Support for NETJet cards" | 76 | tristate "Support for NETJet cards" |
77 | depends on MISDN | 77 | depends on MISDN |
78 | depends on PCI | 78 | depends on PCI |
79 | depends on TTY | ||
79 | select MISDN_IPAC | 80 | select MISDN_IPAC |
80 | select ISDN_HDLC | 81 | select ISDN_HDLC |
81 | select ISDN_I4L | 82 | select ISDN_I4L |
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index e2a945ee9f05..b87d9e577be2 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c | |||
@@ -876,7 +876,7 @@ isdn_readbchan(int di, int channel, u_char *buf, u_char *fp, int len, wait_queue | |||
876 | * of the mapping (di,ch)<->minor, happen during the sleep? --he | 876 | * of the mapping (di,ch)<->minor, happen during the sleep? --he |
877 | */ | 877 | */ |
878 | int | 878 | int |
879 | isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack) | 879 | isdn_readbchan_tty(int di, int channel, struct tty_port *port, int cisco_hack) |
880 | { | 880 | { |
881 | int count; | 881 | int count; |
882 | int count_pull; | 882 | int count_pull; |
@@ -891,7 +891,7 @@ isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack) | |||
891 | if (skb_queue_empty(&dev->drv[di]->rpqueue[channel])) | 891 | if (skb_queue_empty(&dev->drv[di]->rpqueue[channel])) |
892 | return 0; | 892 | return 0; |
893 | 893 | ||
894 | len = tty_buffer_request_room(tty, dev->drv[di]->rcvcount[channel]); | 894 | len = tty_buffer_request_room(port, dev->drv[di]->rcvcount[channel]); |
895 | if (len == 0) | 895 | if (len == 0) |
896 | return len; | 896 | return len; |
897 | 897 | ||
@@ -912,7 +912,7 @@ isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack) | |||
912 | while ((count_pull < skb->len) && (len > 0)) { | 912 | while ((count_pull < skb->len) && (len > 0)) { |
913 | /* push every character but the last to the tty buffer directly */ | 913 | /* push every character but the last to the tty buffer directly */ |
914 | if (count_put) | 914 | if (count_put) |
915 | tty_insert_flip_char(tty, last, TTY_NORMAL); | 915 | tty_insert_flip_char(port, last, TTY_NORMAL); |
916 | len--; | 916 | len--; |
917 | if (dev->drv[di]->DLEflag & DLEmask) { | 917 | if (dev->drv[di]->DLEflag & DLEmask) { |
918 | last = DLE; | 918 | last = DLE; |
@@ -940,7 +940,7 @@ isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack) | |||
940 | } | 940 | } |
941 | count_put = count_pull; | 941 | count_put = count_pull; |
942 | if (count_put > 1) | 942 | if (count_put > 1) |
943 | tty_insert_flip_string(tty, skb->data, count_put - 1); | 943 | tty_insert_flip_string(port, skb->data, count_put - 1); |
944 | last = skb->data[count_put - 1]; | 944 | last = skb->data[count_put - 1]; |
945 | len -= count_put; | 945 | len -= count_put; |
946 | #ifdef CONFIG_ISDN_AUDIO | 946 | #ifdef CONFIG_ISDN_AUDIO |
@@ -952,16 +952,16 @@ isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack) | |||
952 | * Now we can dequeue it. | 952 | * Now we can dequeue it. |
953 | */ | 953 | */ |
954 | if (cisco_hack) | 954 | if (cisco_hack) |
955 | tty_insert_flip_char(tty, last, 0xFF); | 955 | tty_insert_flip_char(port, last, 0xFF); |
956 | else | 956 | else |
957 | tty_insert_flip_char(tty, last, TTY_NORMAL); | 957 | tty_insert_flip_char(port, last, TTY_NORMAL); |
958 | #ifdef CONFIG_ISDN_AUDIO | 958 | #ifdef CONFIG_ISDN_AUDIO |
959 | ISDN_AUDIO_SKB_LOCK(skb) = 0; | 959 | ISDN_AUDIO_SKB_LOCK(skb) = 0; |
960 | #endif | 960 | #endif |
961 | skb = skb_dequeue(&dev->drv[di]->rpqueue[channel]); | 961 | skb = skb_dequeue(&dev->drv[di]->rpqueue[channel]); |
962 | dev_kfree_skb(skb); | 962 | dev_kfree_skb(skb); |
963 | } else { | 963 | } else { |
964 | tty_insert_flip_char(tty, last, TTY_NORMAL); | 964 | tty_insert_flip_char(port, last, TTY_NORMAL); |
965 | /* Not yet emptied this buff, so it | 965 | /* Not yet emptied this buff, so it |
966 | * must stay in the queue, for further calls | 966 | * must stay in the queue, for further calls |
967 | * but we pull off the data we got until now. | 967 | * but we pull off the data we got until now. |
diff --git a/drivers/isdn/i4l/isdn_common.h b/drivers/isdn/i4l/isdn_common.h index 9a471f62e1d4..2260ef07ab9c 100644 --- a/drivers/isdn/i4l/isdn_common.h +++ b/drivers/isdn/i4l/isdn_common.h | |||
@@ -37,7 +37,7 @@ extern void isdn_timer_ctrl(int tf, int onoff); | |||
37 | extern void isdn_unexclusive_channel(int di, int ch); | 37 | extern void isdn_unexclusive_channel(int di, int ch); |
38 | extern int isdn_getnum(char **); | 38 | extern int isdn_getnum(char **); |
39 | extern int isdn_readbchan(int, int, u_char *, u_char *, int, wait_queue_head_t *); | 39 | extern int isdn_readbchan(int, int, u_char *, u_char *, int, wait_queue_head_t *); |
40 | extern int isdn_readbchan_tty(int, int, struct tty_struct *, int); | 40 | extern int isdn_readbchan_tty(int, int, struct tty_port *, int); |
41 | extern int isdn_get_free_channel(int, int, int, int, int, char *); | 41 | extern int isdn_get_free_channel(int, int, int, int, int, char *); |
42 | extern int isdn_writebuf_skb_stub(int, int, int, struct sk_buff *); | 42 | extern int isdn_writebuf_skb_stub(int, int, int, struct sk_buff *); |
43 | extern int register_isdn(isdn_if *i); | 43 | extern int register_isdn(isdn_if *i); |
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index e09dc8a5e743..d8a7d8323414 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c | |||
@@ -60,18 +60,14 @@ static int si2bit[8] = | |||
60 | static int | 60 | static int |
61 | isdn_tty_try_read(modem_info *info, struct sk_buff *skb) | 61 | isdn_tty_try_read(modem_info *info, struct sk_buff *skb) |
62 | { | 62 | { |
63 | struct tty_port *port = &info->port; | ||
63 | int c; | 64 | int c; |
64 | int len; | 65 | int len; |
65 | struct tty_struct *tty; | ||
66 | char last; | 66 | char last; |
67 | 67 | ||
68 | if (!info->online) | 68 | if (!info->online) |
69 | return 0; | 69 | return 0; |
70 | 70 | ||
71 | tty = info->port.tty; | ||
72 | if (!tty) | ||
73 | return 0; | ||
74 | |||
75 | if (!(info->mcr & UART_MCR_RTS)) | 71 | if (!(info->mcr & UART_MCR_RTS)) |
76 | return 0; | 72 | return 0; |
77 | 73 | ||
@@ -81,7 +77,7 @@ isdn_tty_try_read(modem_info *info, struct sk_buff *skb) | |||
81 | #endif | 77 | #endif |
82 | ; | 78 | ; |
83 | 79 | ||
84 | c = tty_buffer_request_room(tty, len); | 80 | c = tty_buffer_request_room(port, len); |
85 | if (c < len) | 81 | if (c < len) |
86 | return 0; | 82 | return 0; |
87 | 83 | ||
@@ -91,25 +87,25 @@ isdn_tty_try_read(modem_info *info, struct sk_buff *skb) | |||
91 | unsigned char *dp = skb->data; | 87 | unsigned char *dp = skb->data; |
92 | while (--l) { | 88 | while (--l) { |
93 | if (*dp == DLE) | 89 | if (*dp == DLE) |
94 | tty_insert_flip_char(tty, DLE, 0); | 90 | tty_insert_flip_char(port, DLE, 0); |
95 | tty_insert_flip_char(tty, *dp++, 0); | 91 | tty_insert_flip_char(port, *dp++, 0); |
96 | } | 92 | } |
97 | if (*dp == DLE) | 93 | if (*dp == DLE) |
98 | tty_insert_flip_char(tty, DLE, 0); | 94 | tty_insert_flip_char(port, DLE, 0); |
99 | last = *dp; | 95 | last = *dp; |
100 | } else { | 96 | } else { |
101 | #endif | 97 | #endif |
102 | if (len > 1) | 98 | if (len > 1) |
103 | tty_insert_flip_string(tty, skb->data, len - 1); | 99 | tty_insert_flip_string(port, skb->data, len - 1); |
104 | last = skb->data[len - 1]; | 100 | last = skb->data[len - 1]; |
105 | #ifdef CONFIG_ISDN_AUDIO | 101 | #ifdef CONFIG_ISDN_AUDIO |
106 | } | 102 | } |
107 | #endif | 103 | #endif |
108 | if (info->emu.mdmreg[REG_CPPP] & BIT_CPPP) | 104 | if (info->emu.mdmreg[REG_CPPP] & BIT_CPPP) |
109 | tty_insert_flip_char(tty, last, 0xFF); | 105 | tty_insert_flip_char(port, last, 0xFF); |
110 | else | 106 | else |
111 | tty_insert_flip_char(tty, last, TTY_NORMAL); | 107 | tty_insert_flip_char(port, last, TTY_NORMAL); |
112 | tty_flip_buffer_push(tty); | 108 | tty_flip_buffer_push(port); |
113 | kfree_skb(skb); | 109 | kfree_skb(skb); |
114 | 110 | ||
115 | return 1; | 111 | return 1; |
@@ -126,7 +122,6 @@ isdn_tty_readmodem(void) | |||
126 | int midx; | 122 | int midx; |
127 | int i; | 123 | int i; |
128 | int r; | 124 | int r; |
129 | struct tty_struct *tty; | ||
130 | modem_info *info; | 125 | modem_info *info; |
131 | 126 | ||
132 | for (i = 0; i < ISDN_MAX_CHANNELS; i++) { | 127 | for (i = 0; i < ISDN_MAX_CHANNELS; i++) { |
@@ -144,20 +139,21 @@ isdn_tty_readmodem(void) | |||
144 | if ((info->vonline & 1) && (info->emu.vpar[1])) | 139 | if ((info->vonline & 1) && (info->emu.vpar[1])) |
145 | isdn_audio_eval_silence(info); | 140 | isdn_audio_eval_silence(info); |
146 | #endif | 141 | #endif |
147 | tty = info->port.tty; | 142 | if (info->mcr & UART_MCR_RTS) { |
148 | if (tty) { | 143 | /* CISCO AsyncPPP Hack */ |
149 | if (info->mcr & UART_MCR_RTS) { | 144 | if (!(info->emu.mdmreg[REG_CPPP] & BIT_CPPP)) |
150 | /* CISCO AsyncPPP Hack */ | 145 | r = isdn_readbchan_tty(info->isdn_driver, |
151 | if (!(info->emu.mdmreg[REG_CPPP] & BIT_CPPP)) | 146 | info->isdn_channel, |
152 | r = isdn_readbchan_tty(info->isdn_driver, info->isdn_channel, tty, 0); | 147 | &info->port, 0); |
153 | else | 148 | else |
154 | r = isdn_readbchan_tty(info->isdn_driver, info->isdn_channel, tty, 1); | 149 | r = isdn_readbchan_tty(info->isdn_driver, |
155 | if (r) | 150 | info->isdn_channel, |
156 | tty_flip_buffer_push(tty); | 151 | &info->port, 1); |
157 | } else | 152 | if (r) |
158 | r = 1; | 153 | tty_flip_buffer_push(&info->port); |
159 | } else | 154 | } else |
160 | r = 1; | 155 | r = 1; |
156 | |||
161 | if (r) { | 157 | if (r) { |
162 | info->rcvsched = 0; | 158 | info->rcvsched = 0; |
163 | resched = 1; | 159 | resched = 1; |
@@ -2229,7 +2225,7 @@ isdn_tty_stat_callback(int i, isdn_ctrl *c) | |||
2229 | void | 2225 | void |
2230 | isdn_tty_at_cout(char *msg, modem_info *info) | 2226 | isdn_tty_at_cout(char *msg, modem_info *info) |
2231 | { | 2227 | { |
2232 | struct tty_struct *tty; | 2228 | struct tty_port *port = &info->port; |
2233 | atemu *m = &info->emu; | 2229 | atemu *m = &info->emu; |
2234 | char *p; | 2230 | char *p; |
2235 | char c; | 2231 | char c; |
@@ -2246,15 +2242,14 @@ isdn_tty_at_cout(char *msg, modem_info *info) | |||
2246 | l = strlen(msg); | 2242 | l = strlen(msg); |
2247 | 2243 | ||
2248 | spin_lock_irqsave(&info->readlock, flags); | 2244 | spin_lock_irqsave(&info->readlock, flags); |
2249 | tty = info->port.tty; | 2245 | if (port->flags & ASYNC_CLOSING) { |
2250 | if ((info->port.flags & ASYNC_CLOSING) || (!tty)) { | ||
2251 | spin_unlock_irqrestore(&info->readlock, flags); | 2246 | spin_unlock_irqrestore(&info->readlock, flags); |
2252 | return; | 2247 | return; |
2253 | } | 2248 | } |
2254 | 2249 | ||
2255 | /* use queue instead of direct, if online and */ | 2250 | /* use queue instead of direct, if online and */ |
2256 | /* data is in queue or buffer is full */ | 2251 | /* data is in queue or buffer is full */ |
2257 | if (info->online && ((tty_buffer_request_room(tty, l) < l) || | 2252 | if (info->online && ((tty_buffer_request_room(port, l) < l) || |
2258 | !skb_queue_empty(&dev->drv[info->isdn_driver]->rpqueue[info->isdn_channel]))) { | 2253 | !skb_queue_empty(&dev->drv[info->isdn_driver]->rpqueue[info->isdn_channel]))) { |
2259 | skb = alloc_skb(l, GFP_ATOMIC); | 2254 | skb = alloc_skb(l, GFP_ATOMIC); |
2260 | if (!skb) { | 2255 | if (!skb) { |
@@ -2285,7 +2280,7 @@ isdn_tty_at_cout(char *msg, modem_info *info) | |||
2285 | if (skb) { | 2280 | if (skb) { |
2286 | *sp++ = c; | 2281 | *sp++ = c; |
2287 | } else { | 2282 | } else { |
2288 | if (tty_insert_flip_char(tty, c, TTY_NORMAL) == 0) | 2283 | if (tty_insert_flip_char(port, c, TTY_NORMAL) == 0) |
2289 | break; | 2284 | break; |
2290 | } | 2285 | } |
2291 | } | 2286 | } |
@@ -2299,7 +2294,7 @@ isdn_tty_at_cout(char *msg, modem_info *info) | |||
2299 | 2294 | ||
2300 | } else { | 2295 | } else { |
2301 | spin_unlock_irqrestore(&info->readlock, flags); | 2296 | spin_unlock_irqrestore(&info->readlock, flags); |
2302 | tty_flip_buffer_push(tty); | 2297 | tty_flip_buffer_push(port); |
2303 | } | 2298 | } |
2304 | } | 2299 | } |
2305 | 2300 | ||