Lines 1-6
Link Here
|
1 |
--- sys/dev/ltmdm/ltmdmsio.c.orig Tue Mar 12 04:47:31 2002 |
1 |
--- sys/dev/ltmdm/ltmdmsio.c.orig 2002-03-12 10:47:31.000000000 +0900 |
2 |
+++ sys/dev/ltmdm/ltmdmsio.c Tue Apr 3 00:24:20 2007 |
2 |
+++ sys/dev/ltmdm/ltmdmsio.c 2008-07-21 20:24:52.000000000 +0900 |
3 |
@@ -60,7 +60,9 @@ |
3 |
@@ -55,12 +55,17 @@ |
|
|
4 |
#include <sys/param.h> |
5 |
#include <sys/bus.h> |
6 |
#include <sys/systm.h> |
7 |
+#if __FreeBSD_version >= 700000 |
8 |
+#include <sys/priv.h> |
9 |
+#endif |
10 |
#include <sys/malloc.h> |
11 |
#include <sys/tty.h> |
4 |
#include <sys/proc.h> |
12 |
#include <sys/proc.h> |
5 |
#include <sys/module.h> |
13 |
#include <sys/module.h> |
6 |
#include <sys/conf.h> |
14 |
#include <sys/conf.h> |
Lines 10-16
Link Here
|
10 |
#include <sys/fcntl.h> |
18 |
#include <sys/fcntl.h> |
11 |
#include <sys/interrupt.h> |
19 |
#include <sys/interrupt.h> |
12 |
#include <sys/kernel.h> |
20 |
#include <sys/kernel.h> |
13 |
@@ -69,12 +71,21 @@ |
21 |
@@ -69,12 +74,21 @@ |
14 |
#include <machine/bus.h> |
22 |
#include <machine/bus.h> |
15 |
#include <sys/rman.h> |
23 |
#include <sys/rman.h> |
16 |
#if __FreeBSD_version >= 500000 |
24 |
#if __FreeBSD_version >= 500000 |
Lines 32-38
Link Here
|
32 |
|
40 |
|
33 |
#include <machine/clock.h> |
41 |
#include <machine/clock.h> |
34 |
|
42 |
|
35 |
@@ -88,7 +99,9 @@ |
43 |
@@ -88,7 +102,9 @@ |
36 |
|
44 |
|
37 |
#include <machine/resource.h> |
45 |
#include <machine/resource.h> |
38 |
|
46 |
|
Lines 43-49
Link Here
|
43 |
#include <dev/sio/sioreg.h> |
51 |
#include <dev/sio/sioreg.h> |
44 |
#else |
52 |
#else |
45 |
#include <isa/sioreg.h> |
53 |
#include <isa/sioreg.h> |
46 |
@@ -124,10 +137,15 @@ |
54 |
@@ -124,10 +140,15 @@ |
47 |
#endif |
55 |
#endif |
48 |
|
56 |
|
49 |
#if __FreeBSD_version >= 500023 /* >= 20010912 */ |
57 |
#if __FreeBSD_version >= 500023 /* >= 20010912 */ |
Lines 60-66
Link Here
|
60 |
|
68 |
|
61 |
#define LOTS_OF_EVENTS 64 /* helps separate urgent events from input */ |
69 |
#define LOTS_OF_EVENTS 64 /* helps separate urgent events from input */ |
62 |
|
70 |
|
63 |
@@ -230,7 +248,9 @@ |
71 |
@@ -230,7 +251,9 @@ |
64 |
u_char last_modem_status; /* last MSR read by intr handler */ |
72 |
u_char last_modem_status; /* last MSR read by intr handler */ |
65 |
u_char prev_modem_status; /* last MSR handled by high level */ |
73 |
u_char prev_modem_status; /* last MSR handled by high level */ |
66 |
|
74 |
|
Lines 70-76
Link Here
|
70 |
u_char *ibuf; /* start of input buffer */ |
78 |
u_char *ibuf; /* start of input buffer */ |
71 |
u_char *ibufend; /* end of input buffer */ |
79 |
u_char *ibufend; /* end of input buffer */ |
72 |
u_char *ibufold; /* old input buffer, to be freed */ |
80 |
u_char *ibufold; /* old input buffer, to be freed */ |
73 |
@@ -256,7 +276,9 @@ |
81 |
@@ -256,7 +279,9 @@ |
74 |
bool_t do_dcd_timestamp; |
82 |
bool_t do_dcd_timestamp; |
75 |
struct timeval timestamp; |
83 |
struct timeval timestamp; |
76 |
struct timeval dcd_timestamp; |
84 |
struct timeval dcd_timestamp; |
Lines 80-86
Link Here
|
80 |
|
88 |
|
81 |
u_long bytes_in; /* statistics */ |
89 |
u_long bytes_in; /* statistics */ |
82 |
u_long bytes_out; |
90 |
u_long bytes_out; |
83 |
@@ -268,7 +290,11 @@ |
91 |
@@ -268,7 +293,11 @@ |
84 |
struct resource *iores[6]; |
92 |
struct resource *iores[6]; |
85 |
struct resource *irqres; |
93 |
struct resource *irqres; |
86 |
void *cookie; |
94 |
void *cookie; |
Lines 92-98
Link Here
|
92 |
|
100 |
|
93 |
/* |
101 |
/* |
94 |
* Data area for output buffers. Someday we should build the output |
102 |
* Data area for output buffers. Someday we should build the output |
95 |
@@ -352,6 +378,7 @@ |
103 |
@@ -352,6 +381,7 @@ |
96 |
#endif |
104 |
#endif |
97 |
|
105 |
|
98 |
static struct cdevsw sio_cdevsw = { |
106 |
static struct cdevsw sio_cdevsw = { |
Lines 100-106
Link Here
|
100 |
/* open */ sioopen, |
108 |
/* open */ sioopen, |
101 |
/* close */ sioclose, |
109 |
/* close */ sioclose, |
102 |
/* read */ sioread, |
110 |
/* read */ sioread, |
103 |
@@ -361,7 +388,11 @@ |
111 |
@@ -361,7 +391,11 @@ |
104 |
/* mmap */ nommap, |
112 |
/* mmap */ nommap, |
105 |
/* strategy */ nostrategy, |
113 |
/* strategy */ nostrategy, |
106 |
/* name */ driver_name, |
114 |
/* name */ driver_name, |
Lines 112-118
Link Here
|
112 |
/* dump */ nodump, |
120 |
/* dump */ nodump, |
113 |
/* psize */ nopsize, |
121 |
/* psize */ nopsize, |
114 |
#if __FreeBSD_version < 430000 |
122 |
#if __FreeBSD_version < 430000 |
115 |
@@ -373,10 +404,32 @@ |
123 |
@@ -373,10 +407,32 @@ |
116 |
/* bmaj */ -1, |
124 |
/* bmaj */ -1, |
117 |
/* kqfilter */ ttykqfilter, |
125 |
/* kqfilter */ ttykqfilter, |
118 |
#else /* __FreeBSD_version >= 500000 */ |
126 |
#else /* __FreeBSD_version >= 500000 */ |
Lines 146-152
Link Here
|
146 |
}; |
154 |
}; |
147 |
|
155 |
|
148 |
static u_int com_events; /* input chars + weighted output completions */ |
156 |
static u_int com_events; /* input chars + weighted output completions */ |
149 |
@@ -566,8 +619,8 @@ |
157 |
@@ -566,8 +622,8 @@ |
150 |
u_int32_t Get_PCI_BASE_ADDRESS_IO_MASK(void); |
158 |
u_int32_t Get_PCI_BASE_ADDRESS_IO_MASK(void); |
151 |
u_int8_t Get_PCI_BASE_ADDRESS_SPACE_IO(void); |
159 |
u_int8_t Get_PCI_BASE_ADDRESS_SPACE_IO(void); |
152 |
u_int32_t VMODEM_Get_System_Time(void); |
160 |
u_int32_t VMODEM_Get_System_Time(void); |
Lines 157-163
Link Here
|
157 |
u_int16_t inpw(u_int16_t addr); |
165 |
u_int16_t inpw(u_int16_t addr); |
158 |
void outpw(u_int16_t addr, u_int16_t value); |
166 |
void outpw(u_int16_t addr, u_int16_t value); |
159 |
u_int32_t inpd(u_int16_t addr); |
167 |
u_int32_t inpd(u_int16_t addr); |
160 |
@@ -695,7 +748,7 @@ |
168 |
@@ -695,7 +751,7 @@ |
161 |
|
169 |
|
162 |
for (i = 0; i < 6; i++) { |
170 |
for (i = 0; i < 6; i++) { |
163 |
dev_info->BaseAddress[i] |
171 |
dev_info->BaseAddress[i] |
Lines 166-172
Link Here
|
166 |
DPRINTF(1,(" BaseAddress[%d] = 0x%08lx\n", |
174 |
DPRINTF(1,(" BaseAddress[%d] = 0x%08lx\n", |
167 |
i, dev_info->BaseAddress[i])); |
175 |
i, dev_info->BaseAddress[i])); |
168 |
} |
176 |
} |
169 |
@@ -836,12 +889,12 @@ |
177 |
@@ -836,12 +892,12 @@ |
170 |
return t; |
178 |
return t; |
171 |
} |
179 |
} |
172 |
|
180 |
|
Lines 181-187
Link Here
|
181 |
{ |
189 |
{ |
182 |
outb(addr, value); |
190 |
outb(addr, value); |
183 |
} |
191 |
} |
184 |
@@ -968,8 +1021,6 @@ |
192 |
@@ -968,8 +1024,6 @@ |
185 |
{ |
193 |
{ |
186 |
{ SWI_TTY , "SWI_TTY" }, |
194 |
{ SWI_TTY , "SWI_TTY" }, |
187 |
{ SWI_NET , "SWI_NET" }, |
195 |
{ SWI_NET , "SWI_NET" }, |
Lines 190-196
Link Here
|
190 |
{ -1 , NULL } |
198 |
{ -1 , NULL } |
191 |
}; |
199 |
}; |
192 |
|
200 |
|
193 |
@@ -1175,7 +1226,7 @@ |
201 |
@@ -1175,7 +1229,7 @@ |
194 |
|
202 |
|
195 |
found = 0; |
203 |
found = 0; |
196 |
for (i = 0; i < 6; i++) { |
204 |
for (i = 0; i < 6; i++) { |
Lines 199-205
Link Here
|
199 |
data = pci_read_config(dev, com->iorid[i], 4); |
207 |
data = pci_read_config(dev, com->iorid[i], 4); |
200 |
if (((data & 0x01UL) == 0x01) && |
208 |
if (((data & 0x01UL) == 0x01) && |
201 |
((data & ~0x03UL) != 0 )) { |
209 |
((data & ~0x03UL) != 0 )) { |
202 |
@@ -1232,6 +1283,9 @@ |
210 |
@@ -1232,6 +1286,9 @@ |
203 |
|
211 |
|
204 |
if (intr_type & INTR_TYPE_FAST) { |
212 |
if (intr_type & INTR_TYPE_FAST) { |
205 |
ret = bus_setup_intr(dev, com->irqres, intr_type, |
213 |
ret = bus_setup_intr(dev, com->irqres, intr_type, |
Lines 209-215
Link Here
|
209 |
siointr, com, &com->cookie); |
217 |
siointr, com, &com->cookie); |
210 |
if (ret != 0) |
218 |
if (ret != 0) |
211 |
intr_type &= ~INTR_TYPE_FAST; |
219 |
intr_type &= ~INTR_TYPE_FAST; |
212 |
@@ -1240,6 +1294,9 @@ |
220 |
@@ -1240,6 +1297,9 @@ |
213 |
} |
221 |
} |
214 |
if (ret != 0) { |
222 |
if (ret != 0) { |
215 |
ret = bus_setup_intr(dev, com->irqres, intr_type, |
223 |
ret = bus_setup_intr(dev, com->irqres, intr_type, |
Lines 219-225
Link Here
|
219 |
siointr, com, &com->cookie); |
227 |
siointr, com, &com->cookie); |
220 |
if (ret == 0 && (ltmdm_intr_type & INTR_TYPE_FAST)) { |
228 |
if (ret == 0 && (ltmdm_intr_type & INTR_TYPE_FAST)) { |
221 |
device_printf(dev, "could not activate interrupt in fast mode\n"); |
229 |
device_printf(dev, "could not activate interrupt in fast mode\n"); |
222 |
@@ -1295,8 +1352,11 @@ |
230 |
@@ -1295,8 +1355,11 @@ |
223 |
DPRINTF(1,(" x_chip_version = %d\n", x_chip_version)); |
231 |
DPRINTF(1,(" x_chip_version = %d\n", x_chip_version)); |
224 |
|
232 |
|
225 |
com->flags = flags; |
233 |
com->flags = flags; |
Lines 231-237
Link Here
|
231 |
|
239 |
|
232 |
/* |
240 |
/* |
233 |
* initialize the device registers as follows: |
241 |
* initialize the device registers as follows: |
234 |
@@ -1368,11 +1428,16 @@ |
242 |
@@ -1368,11 +1431,16 @@ |
235 |
write_vuart_port(UART_FIFO, 0); |
243 |
write_vuart_port(UART_FIFO, 0); |
236 |
printf("\n"); |
244 |
printf("\n"); |
237 |
|
245 |
|
Lines 249-255
Link Here
|
249 |
#else |
257 |
#else |
250 |
if (!sio_registered) { |
258 |
if (!sio_registered) { |
251 |
register_swi(ltmdm_swi_type, siopoll); |
259 |
register_swi(ltmdm_swi_type, siopoll); |
252 |
@@ -1415,7 +1480,7 @@ |
260 |
@@ -1415,7 +1483,7 @@ |
253 |
return EBUSY; |
261 |
return EBUSY; |
254 |
|
262 |
|
255 |
com->gone = 1; |
263 |
com->gone = 1; |
Lines 258-264
Link Here
|
258 |
if (sio_fast_ih != NULL) { |
266 |
if (sio_fast_ih != NULL) { |
259 |
ithread_remove_handler(sio_fast_ih); |
267 |
ithread_remove_handler(sio_fast_ih); |
260 |
sio_fast_ih = NULL; |
268 |
sio_fast_ih = NULL; |
261 |
@@ -1424,6 +1489,15 @@ |
269 |
@@ -1424,6 +1492,15 @@ |
262 |
ithread_remove_handler(sio_slow_ih); |
270 |
ithread_remove_handler(sio_slow_ih); |
263 |
sio_slow_ih = NULL; |
271 |
sio_slow_ih = NULL; |
264 |
} |
272 |
} |
Lines 274-280
Link Here
|
274 |
#else |
282 |
#else |
275 |
if (sio_registered) { |
283 |
if (sio_registered) { |
276 |
unregister_swi(ltmdm_swi_type, siopoll); |
284 |
unregister_swi(ltmdm_swi_type, siopoll); |
277 |
@@ -1433,11 +1507,19 @@ |
285 |
@@ -1433,11 +1510,19 @@ |
278 |
|
286 |
|
279 |
s = splfunc(); |
287 |
s = splfunc(); |
280 |
if (tp) { |
288 |
if (tp) { |
Lines 294-300
Link Here
|
294 |
} |
302 |
} |
295 |
vxdPortClose(); |
303 |
vxdPortClose(); |
296 |
siosettimeout(); |
304 |
siosettimeout(); |
297 |
@@ -1470,7 +1552,11 @@ |
305 |
@@ -1470,7 +1555,11 @@ |
298 |
} |
306 |
} |
299 |
|
307 |
|
300 |
static int |
308 |
static int |
Lines 306-312
Link Here
|
306 |
{ |
314 |
{ |
307 |
struct com_s *com; |
315 |
struct com_s *com; |
308 |
int error; |
316 |
int error; |
309 |
@@ -1488,7 +1574,11 @@ |
317 |
@@ -1488,7 +1577,11 @@ |
310 |
return (ENXIO); |
318 |
return (ENXIO); |
311 |
if (mynor & CONTROL_MASK) |
319 |
if (mynor & CONTROL_MASK) |
312 |
return (0); |
320 |
return (0); |
Lines 318-324
Link Here
|
318 |
s = splfunc(); |
326 |
s = splfunc(); |
319 |
/* |
327 |
/* |
320 |
* We jump to this label after all non-interrupted sleeps to pick |
328 |
* We jump to this label after all non-interrupted sleeps to pick |
321 |
@@ -1610,7 +1700,11 @@ |
329 |
@@ -1610,7 +1703,11 @@ |
322 |
* the true carrier. |
330 |
* the true carrier. |
323 |
*/ |
331 |
*/ |
324 |
if (com->prev_modem_status & MSR_DCD || mynor & CALLOUT_MASK) |
332 |
if (com->prev_modem_status & MSR_DCD || mynor & CALLOUT_MASK) |
Lines 330-336
Link Here
|
330 |
} |
338 |
} |
331 |
/* |
339 |
/* |
332 |
* Wait for DCD if necessary. |
340 |
* Wait for DCD if necessary. |
333 |
@@ -1626,7 +1720,11 @@ |
341 |
@@ -1626,7 +1723,11 @@ |
334 |
goto out; |
342 |
goto out; |
335 |
goto open_top; |
343 |
goto open_top; |
336 |
} |
344 |
} |
Lines 342-348
Link Here
|
342 |
disc_optim(tp, &tp->t_termios, com); |
350 |
disc_optim(tp, &tp->t_termios, com); |
343 |
if (tp->t_state & TS_ISOPEN && mynor & CALLOUT_MASK) |
351 |
if (tp->t_state & TS_ISOPEN && mynor & CALLOUT_MASK) |
344 |
com->active_out = TRUE; |
352 |
com->active_out = TRUE; |
345 |
@@ -1639,7 +1737,11 @@ |
353 |
@@ -1639,7 +1740,11 @@ |
346 |
} |
354 |
} |
347 |
|
355 |
|
348 |
static int |
356 |
static int |
Lines 354-360
Link Here
|
354 |
{ |
362 |
{ |
355 |
struct com_s *com; |
363 |
struct com_s *com; |
356 |
int mynor; |
364 |
int mynor; |
357 |
@@ -1654,11 +1756,19 @@ |
365 |
@@ -1654,11 +1759,19 @@ |
358 |
return (ENODEV); |
366 |
return (ENODEV); |
359 |
tp = com->tp; |
367 |
tp = com->tp; |
360 |
s = splfunc(); |
368 |
s = splfunc(); |
Lines 374-380
Link Here
|
374 |
siosettimeout(); |
382 |
siosettimeout(); |
375 |
splx(s); |
383 |
splx(s); |
376 |
if (com->gone) { |
384 |
if (com->gone) { |
377 |
@@ -1685,7 +1795,9 @@ |
385 |
@@ -1685,7 +1798,9 @@ |
378 |
s = splfunc(); |
386 |
s = splfunc(); |
379 |
com->do_timestamp = FALSE; |
387 |
com->do_timestamp = FALSE; |
380 |
com->do_dcd_timestamp = FALSE; |
388 |
com->do_dcd_timestamp = FALSE; |
Lines 384-390
Link Here
|
384 |
write_vuart_port(UART_CFCR, com->cfcr_image &= ~CFCR_SBREAK); |
392 |
write_vuart_port(UART_CFCR, com->cfcr_image &= ~CFCR_SBREAK); |
385 |
{ |
393 |
{ |
386 |
write_vuart_port(UART_IER, 0); |
394 |
write_vuart_port(UART_IER, 0); |
387 |
@@ -1724,7 +1836,11 @@ |
395 |
@@ -1724,7 +1839,11 @@ |
388 |
} |
396 |
} |
389 |
|
397 |
|
390 |
static int |
398 |
static int |
Lines 396-402
Link Here
|
396 |
{ |
404 |
{ |
397 |
int mynor; |
405 |
int mynor; |
398 |
struct com_s *com; |
406 |
struct com_s *com; |
399 |
@@ -1735,11 +1851,19 @@ |
407 |
@@ -1735,11 +1854,19 @@ |
400 |
com = com_addr(MINOR_TO_UNIT(mynor)); |
408 |
com = com_addr(MINOR_TO_UNIT(mynor)); |
401 |
if (com == NULL || com->gone) |
409 |
if (com == NULL || com->gone) |
402 |
return (ENODEV); |
410 |
return (ENODEV); |
Lines 416-422
Link Here
|
416 |
{ |
424 |
{ |
417 |
int mynor; |
425 |
int mynor; |
418 |
struct com_s *com; |
426 |
struct com_s *com; |
419 |
@@ -1754,7 +1878,11 @@ |
427 |
@@ -1754,7 +1881,11 @@ |
420 |
if (com == NULL || com->gone) |
428 |
if (com == NULL || com->gone) |
421 |
return (ENODEV); |
429 |
return (ENODEV); |
422 |
|
430 |
|
Lines 428-434
Link Here
|
428 |
} |
436 |
} |
429 |
|
437 |
|
430 |
static void |
438 |
static void |
431 |
@@ -1860,7 +1988,11 @@ |
439 |
@@ -1860,7 +1991,11 @@ |
432 |
if (line_status & LSR_PE) |
440 |
if (line_status & LSR_PE) |
433 |
recv_data |= TTY_PE; |
441 |
recv_data |= TTY_PE; |
434 |
} |
442 |
} |
Lines 440-446
Link Here
|
440 |
lt_disable_intr(); |
448 |
lt_disable_intr(); |
441 |
} while (buf < com->iptr); |
449 |
} while (buf < com->iptr); |
442 |
} |
450 |
} |
443 |
@@ -1894,23 +2026,34 @@ |
451 |
@@ -1894,23 +2029,34 @@ |
444 |
u_char recv_data; |
452 |
u_char recv_data; |
445 |
u_char int_ctl; |
453 |
u_char int_ctl; |
446 |
u_char int_ctl_new; |
454 |
u_char int_ctl_new; |
Lines 475-481
Link Here
|
475 |
line_status = read_vuart_port(UART_LSR); |
483 |
line_status = read_vuart_port(UART_LSR); |
476 |
|
484 |
|
477 |
/* input event? (check first to help avoid overruns) */ |
485 |
/* input event? (check first to help avoid overruns) */ |
478 |
@@ -1948,7 +2091,11 @@ |
486 |
@@ -1948,7 +2094,11 @@ |
479 |
recv_data = 0; |
487 |
recv_data = 0; |
480 |
} |
488 |
} |
481 |
++com->bytes_in; |
489 |
++com->bytes_in; |
Lines 487-493
Link Here
|
487 |
setsofttty(); |
495 |
setsofttty(); |
488 |
ioptr = com->iptr; |
496 |
ioptr = com->iptr; |
489 |
if (ioptr >= com->ibufend) |
497 |
if (ioptr >= com->ibufend) |
490 |
@@ -2053,17 +2200,23 @@ |
498 |
@@ -2053,17 +2203,23 @@ |
491 |
} |
499 |
} |
492 |
|
500 |
|
493 |
static int |
501 |
static int |
Lines 511-517
Link Here
|
511 |
|
519 |
|
512 |
mynor = minor(dev); |
520 |
mynor = minor(dev); |
513 |
com = com_addr(MINOR_TO_UNIT(mynor)); |
521 |
com = com_addr(MINOR_TO_UNIT(mynor)); |
514 |
@@ -2103,6 +2256,7 @@ |
522 |
@@ -2103,6 +2259,7 @@ |
515 |
} |
523 |
} |
516 |
} |
524 |
} |
517 |
tp = com->tp; |
525 |
tp = com->tp; |
Lines 519-525
Link Here
|
519 |
#if defined(COMPAT_43) || defined(COMPAT_SUNOS) |
527 |
#if defined(COMPAT_43) || defined(COMPAT_SUNOS) |
520 |
term = tp->t_termios; |
528 |
term = tp->t_termios; |
521 |
oldcmd = cmd; |
529 |
oldcmd = cmd; |
522 |
@@ -2112,6 +2266,7 @@ |
530 |
@@ -2112,6 +2269,7 @@ |
523 |
if (cmd != oldcmd) |
531 |
if (cmd != oldcmd) |
524 |
data = (caddr_t)&term; |
532 |
data = (caddr_t)&term; |
525 |
#endif |
533 |
#endif |
Lines 527-533
Link Here
|
527 |
if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) { |
535 |
if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) { |
528 |
int cc; |
536 |
int cc; |
529 |
struct termios *dt = (struct termios *)data; |
537 |
struct termios *dt = (struct termios *)data; |
530 |
@@ -2134,7 +2289,11 @@ |
538 |
@@ -2134,7 +2292,11 @@ |
531 |
if (lt->c_ospeed != 0) |
539 |
if (lt->c_ospeed != 0) |
532 |
dt->c_ospeed = tp->t_ospeed; |
540 |
dt->c_ospeed = tp->t_ospeed; |
533 |
} |
541 |
} |
Lines 539-545
Link Here
|
539 |
if (error != ENOIOCTL) |
547 |
if (error != ENOIOCTL) |
540 |
return (error); |
548 |
return (error); |
541 |
s = splfunc(); |
549 |
s = splfunc(); |
542 |
@@ -2189,13 +2348,17 @@ |
550 |
@@ -2189,13 +2351,17 @@ |
543 |
com->do_timestamp = TRUE; |
551 |
com->do_timestamp = TRUE; |
544 |
*(struct timeval *)data = com->timestamp; |
552 |
*(struct timeval *)data = com->timestamp; |
545 |
break; |
553 |
break; |
Lines 557-563
Link Here
|
557 |
if (error == ENODEV) |
565 |
if (error == ENODEV) |
558 |
error = ENOTTY; |
566 |
error = ENOTTY; |
559 |
return (error); |
567 |
return (error); |
560 |
@@ -2257,8 +2420,13 @@ |
568 |
@@ -2257,8 +2423,13 @@ |
561 |
com->state &= ~CS_CHECKMSR; |
569 |
com->state &= ~CS_CHECKMSR; |
562 |
lt_enable_intr(); |
570 |
lt_enable_intr(); |
563 |
if (delta_modem_status & MSR_DCD) |
571 |
if (delta_modem_status & MSR_DCD) |
Lines 571-577
Link Here
|
571 |
} |
579 |
} |
572 |
if (com->state & CS_ODONE) { |
580 |
if (com->state & CS_ODONE) { |
573 |
lt_disable_intr(); |
581 |
lt_disable_intr(); |
574 |
@@ -2270,7 +2438,11 @@ |
582 |
@@ -2270,7 +2441,11 @@ |
575 |
sio_busycheck_handle = timeout(siobusycheck, com, hz / 100); |
583 |
sio_busycheck_handle = timeout(siobusycheck, com, hz / 100); |
576 |
com->extra_state |= CSE_BUSYCHECK; |
584 |
com->extra_state |= CSE_BUSYCHECK; |
577 |
} |
585 |
} |
Lines 583-589
Link Here
|
583 |
} |
591 |
} |
584 |
if (com_events == 0) |
592 |
if (com_events == 0) |
585 |
break; |
593 |
break; |
586 |
@@ -2769,11 +2941,21 @@ |
594 |
@@ -2769,11 +2944,21 @@ |
587 |
&& (!(t->c_iflag & PARMRK) |
595 |
&& (!(t->c_iflag & PARMRK) |
588 |
|| (t->c_iflag & (IGNPAR | IGNBRK)) == (IGNPAR | IGNBRK)) |
596 |
|| (t->c_iflag & (IGNPAR | IGNBRK)) == (IGNPAR | IGNBRK)) |
589 |
&& !(t->c_lflag & (ECHO | ICANON | IEXTEN | ISIG | PENDIN)) |
597 |
&& !(t->c_lflag & (ECHO | ICANON | IEXTEN | ISIG | PENDIN)) |
Lines 605-611
Link Here
|
605 |
} |
613 |
} |
606 |
|
614 |
|
607 |
#ifdef KLD_MODULE |
615 |
#ifdef KLD_MODULE |
608 |
@@ -2796,7 +2978,7 @@ |
616 |
@@ -2796,7 +2981,7 @@ |
609 |
#endif |
617 |
#endif |
610 |
|
618 |
|
611 |
DRIVER_MODULE(ltmdm, pci, ltmdm_pci_driver, ltmdm_devclass, ltmdm_event, 0); |
619 |
DRIVER_MODULE(ltmdm, pci, ltmdm_pci_driver, ltmdm_devclass, ltmdm_event, 0); |