diff options
author | Joe Perches <joe@perches.com> | 2014-11-11 17:44:57 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-12 13:56:41 -0500 |
commit | 955a9d202f470019f42979f0d1caec98843e39ce (patch) | |
tree | fff6124b339bc33e3b5c67668bfcc13098be865c /net/irda/ircomm/ircomm_tty.c | |
parent | 8d326d818a2a8fc80c7df85dd88cb214804d1499 (diff) |
irda: Convert IRDA_DEBUG to pr_debug
Use the normal kernel debugging mechanism which also
enables dynamic_debug at the same time.
Other miscellanea:
o Remove sysctl for irda_debug
o Remove function tracing like uses (use ftrace instead)
o Coalesce formats
o Realign arguments
o Remove unnecessary OOM messages
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda/ircomm/ircomm_tty.c')
-rw-r--r-- | net/irda/ircomm/ircomm_tty.c | 95 |
1 files changed, 30 insertions, 65 deletions
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c index 11b0a5ed0252..40695b9751c1 100644 --- a/net/irda/ircomm/ircomm_tty.c +++ b/net/irda/ircomm/ircomm_tty.c | |||
@@ -174,8 +174,6 @@ static int __init ircomm_tty_init(void) | |||
174 | 174 | ||
175 | static void __exit __ircomm_tty_cleanup(struct ircomm_tty_cb *self) | 175 | static void __exit __ircomm_tty_cleanup(struct ircomm_tty_cb *self) |
176 | { | 176 | { |
177 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
178 | |||
179 | IRDA_ASSERT(self != NULL, return;); | 177 | IRDA_ASSERT(self != NULL, return;); |
180 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 178 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
181 | 179 | ||
@@ -196,8 +194,6 @@ static void __exit ircomm_tty_cleanup(void) | |||
196 | { | 194 | { |
197 | int ret; | 195 | int ret; |
198 | 196 | ||
199 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
200 | |||
201 | ret = tty_unregister_driver(driver); | 197 | ret = tty_unregister_driver(driver); |
202 | if (ret) { | 198 | if (ret) { |
203 | net_err_ratelimited("%s(), failed to unregister driver\n", | 199 | net_err_ratelimited("%s(), failed to unregister driver\n", |
@@ -220,14 +216,12 @@ static int ircomm_tty_startup(struct ircomm_tty_cb *self) | |||
220 | notify_t notify; | 216 | notify_t notify; |
221 | int ret = -ENODEV; | 217 | int ret = -ENODEV; |
222 | 218 | ||
223 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
224 | |||
225 | IRDA_ASSERT(self != NULL, return -1;); | 219 | IRDA_ASSERT(self != NULL, return -1;); |
226 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); | 220 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); |
227 | 221 | ||
228 | /* Check if already open */ | 222 | /* Check if already open */ |
229 | if (test_and_set_bit(ASYNCB_INITIALIZED, &self->port.flags)) { | 223 | if (test_and_set_bit(ASYNCB_INITIALIZED, &self->port.flags)) { |
230 | IRDA_DEBUG(2, "%s(), already open so break out!\n", __func__ ); | 224 | pr_debug("%s(), already open so break out!\n", __func__); |
231 | return 0; | 225 | return 0; |
232 | } | 226 | } |
233 | 227 | ||
@@ -282,8 +276,6 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self, | |||
282 | int do_clocal = 0; | 276 | int do_clocal = 0; |
283 | unsigned long flags; | 277 | unsigned long flags; |
284 | 278 | ||
285 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
286 | |||
287 | /* | 279 | /* |
288 | * If non-blocking mode is set, or the port is not enabled, | 280 | * If non-blocking mode is set, or the port is not enabled, |
289 | * then make the check up front and then exit. | 281 | * then make the check up front and then exit. |
@@ -298,12 +290,12 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self, | |||
298 | if (tty->termios.c_cflag & CBAUD) | 290 | if (tty->termios.c_cflag & CBAUD) |
299 | tty_port_raise_dtr_rts(port); | 291 | tty_port_raise_dtr_rts(port); |
300 | port->flags |= ASYNC_NORMAL_ACTIVE; | 292 | port->flags |= ASYNC_NORMAL_ACTIVE; |
301 | IRDA_DEBUG(1, "%s(), O_NONBLOCK requested!\n", __func__ ); | 293 | pr_debug("%s(), O_NONBLOCK requested!\n", __func__); |
302 | return 0; | 294 | return 0; |
303 | } | 295 | } |
304 | 296 | ||
305 | if (tty->termios.c_cflag & CLOCAL) { | 297 | if (tty->termios.c_cflag & CLOCAL) { |
306 | IRDA_DEBUG(1, "%s(), doing CLOCAL!\n", __func__ ); | 298 | pr_debug("%s(), doing CLOCAL!\n", __func__); |
307 | do_clocal = 1; | 299 | do_clocal = 1; |
308 | } | 300 | } |
309 | 301 | ||
@@ -317,8 +309,8 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self, | |||
317 | retval = 0; | 309 | retval = 0; |
318 | add_wait_queue(&port->open_wait, &wait); | 310 | add_wait_queue(&port->open_wait, &wait); |
319 | 311 | ||
320 | IRDA_DEBUG(2, "%s(%d):block_til_ready before block on %s open_count=%d\n", | 312 | pr_debug("%s(%d):block_til_ready before block on %s open_count=%d\n", |
321 | __FILE__, __LINE__, tty->driver->name, port->count); | 313 | __FILE__, __LINE__, tty->driver->name, port->count); |
322 | 314 | ||
323 | spin_lock_irqsave(&port->lock, flags); | 315 | spin_lock_irqsave(&port->lock, flags); |
324 | port->count--; | 316 | port->count--; |
@@ -355,8 +347,8 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self, | |||
355 | break; | 347 | break; |
356 | } | 348 | } |
357 | 349 | ||
358 | IRDA_DEBUG(1, "%s(%d):block_til_ready blocking on %s open_count=%d\n", | 350 | pr_debug("%s(%d):block_til_ready blocking on %s open_count=%d\n", |
359 | __FILE__, __LINE__, tty->driver->name, port->count); | 351 | __FILE__, __LINE__, tty->driver->name, port->count); |
360 | 352 | ||
361 | schedule(); | 353 | schedule(); |
362 | } | 354 | } |
@@ -370,8 +362,8 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self, | |||
370 | port->blocked_open--; | 362 | port->blocked_open--; |
371 | spin_unlock_irqrestore(&port->lock, flags); | 363 | spin_unlock_irqrestore(&port->lock, flags); |
372 | 364 | ||
373 | IRDA_DEBUG(1, "%s(%d):block_til_ready after blocking on %s open_count=%d\n", | 365 | pr_debug("%s(%d):block_til_ready after blocking on %s open_count=%d\n", |
374 | __FILE__, __LINE__, tty->driver->name, port->count); | 366 | __FILE__, __LINE__, tty->driver->name, port->count); |
375 | 367 | ||
376 | if (!retval) | 368 | if (!retval) |
377 | port->flags |= ASYNC_NORMAL_ACTIVE; | 369 | port->flags |= ASYNC_NORMAL_ACTIVE; |
@@ -439,16 +431,14 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) | |||
439 | unsigned long flags; | 431 | unsigned long flags; |
440 | int ret; | 432 | int ret; |
441 | 433 | ||
442 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
443 | |||
444 | /* ++ is not atomic, so this should be protected - Jean II */ | 434 | /* ++ is not atomic, so this should be protected - Jean II */ |
445 | spin_lock_irqsave(&self->port.lock, flags); | 435 | spin_lock_irqsave(&self->port.lock, flags); |
446 | self->port.count++; | 436 | self->port.count++; |
447 | spin_unlock_irqrestore(&self->port.lock, flags); | 437 | spin_unlock_irqrestore(&self->port.lock, flags); |
448 | tty_port_tty_set(&self->port, tty); | 438 | tty_port_tty_set(&self->port, tty); |
449 | 439 | ||
450 | IRDA_DEBUG(1, "%s(), %s%d, count = %d\n", __func__ , tty->driver->name, | 440 | pr_debug("%s(), %s%d, count = %d\n", __func__ , tty->driver->name, |
451 | self->line, self->port.count); | 441 | self->line, self->port.count); |
452 | 442 | ||
453 | /* Not really used by us, but lets do it anyway */ | 443 | /* Not really used by us, but lets do it anyway */ |
454 | self->port.low_latency = (self->port.flags & ASYNC_LOW_LATENCY) ? 1 : 0; | 444 | self->port.low_latency = (self->port.flags & ASYNC_LOW_LATENCY) ? 1 : 0; |
@@ -487,9 +477,9 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) | |||
487 | self->settings.service_type = IRCOMM_9_WIRE; /* 9 wire as default */ | 477 | self->settings.service_type = IRCOMM_9_WIRE; /* 9 wire as default */ |
488 | /* Jan Kiszka -> add DSR/RI -> Conform to IrCOMM spec */ | 478 | /* Jan Kiszka -> add DSR/RI -> Conform to IrCOMM spec */ |
489 | self->settings.dce = IRCOMM_CTS | IRCOMM_CD | IRCOMM_DSR | IRCOMM_RI; /* Default line settings */ | 479 | self->settings.dce = IRCOMM_CTS | IRCOMM_CD | IRCOMM_DSR | IRCOMM_RI; /* Default line settings */ |
490 | IRDA_DEBUG(2, "%s(), IrCOMM device\n", __func__ ); | 480 | pr_debug("%s(), IrCOMM device\n", __func__); |
491 | } else { | 481 | } else { |
492 | IRDA_DEBUG(2, "%s(), IrLPT device\n", __func__ ); | 482 | pr_debug("%s(), IrLPT device\n", __func__); |
493 | self->service_type = IRCOMM_3_WIRE_RAW; | 483 | self->service_type = IRCOMM_3_WIRE_RAW; |
494 | self->settings.service_type = IRCOMM_3_WIRE_RAW; /* Default */ | 484 | self->settings.service_type = IRCOMM_3_WIRE_RAW; /* Default */ |
495 | } | 485 | } |
@@ -500,9 +490,8 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) | |||
500 | 490 | ||
501 | ret = ircomm_tty_block_til_ready(self, tty, filp); | 491 | ret = ircomm_tty_block_til_ready(self, tty, filp); |
502 | if (ret) { | 492 | if (ret) { |
503 | IRDA_DEBUG(2, | 493 | pr_debug("%s(), returning after block_til_ready with %d\n", |
504 | "%s(), returning after block_til_ready with %d\n", __func__ , | 494 | __func__, ret); |
505 | ret); | ||
506 | 495 | ||
507 | return ret; | 496 | return ret; |
508 | } | 497 | } |
@@ -520,8 +509,6 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp) | |||
520 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; | 509 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; |
521 | struct tty_port *port = &self->port; | 510 | struct tty_port *port = &self->port; |
522 | 511 | ||
523 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
524 | |||
525 | IRDA_ASSERT(self != NULL, return;); | 512 | IRDA_ASSERT(self != NULL, return;); |
526 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 513 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
527 | 514 | ||
@@ -571,8 +558,6 @@ static void ircomm_tty_do_softint(struct work_struct *work) | |||
571 | unsigned long flags; | 558 | unsigned long flags; |
572 | struct sk_buff *skb, *ctrl_skb; | 559 | struct sk_buff *skb, *ctrl_skb; |
573 | 560 | ||
574 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
575 | |||
576 | if (!self || self->magic != IRCOMM_TTY_MAGIC) | 561 | if (!self || self->magic != IRCOMM_TTY_MAGIC) |
577 | return; | 562 | return; |
578 | 563 | ||
@@ -638,8 +623,8 @@ static int ircomm_tty_write(struct tty_struct *tty, | |||
638 | int len = 0; | 623 | int len = 0; |
639 | int size; | 624 | int size; |
640 | 625 | ||
641 | IRDA_DEBUG(2, "%s(), count=%d, hw_stopped=%d\n", __func__ , count, | 626 | pr_debug("%s(), count=%d, hw_stopped=%d\n", __func__ , count, |
642 | tty->hw_stopped); | 627 | tty->hw_stopped); |
643 | 628 | ||
644 | IRDA_ASSERT(self != NULL, return -1;); | 629 | IRDA_ASSERT(self != NULL, return -1;); |
645 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); | 630 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); |
@@ -661,7 +646,7 @@ static int ircomm_tty_write(struct tty_struct *tty, | |||
661 | * we don't mess up the original "safe skb" (see tx_data_size). | 646 | * we don't mess up the original "safe skb" (see tx_data_size). |
662 | * Jean II */ | 647 | * Jean II */ |
663 | if (self->max_header_size == IRCOMM_TTY_HDR_UNINITIALISED) { | 648 | if (self->max_header_size == IRCOMM_TTY_HDR_UNINITIALISED) { |
664 | IRDA_DEBUG(1, "%s() : not initialised\n", __func__); | 649 | pr_debug("%s() : not initialised\n", __func__); |
665 | #ifdef IRCOMM_NO_TX_BEFORE_INIT | 650 | #ifdef IRCOMM_NO_TX_BEFORE_INIT |
666 | /* We didn't consume anything, TTY will retry */ | 651 | /* We didn't consume anything, TTY will retry */ |
667 | return 0; | 652 | return 0; |
@@ -790,7 +775,7 @@ static int ircomm_tty_write_room(struct tty_struct *tty) | |||
790 | ret = self->max_data_size; | 775 | ret = self->max_data_size; |
791 | spin_unlock_irqrestore(&self->spinlock, flags); | 776 | spin_unlock_irqrestore(&self->spinlock, flags); |
792 | } | 777 | } |
793 | IRDA_DEBUG(2, "%s(), ret=%d\n", __func__ , ret); | 778 | pr_debug("%s(), ret=%d\n", __func__ , ret); |
794 | 779 | ||
795 | return ret; | 780 | return ret; |
796 | } | 781 | } |
@@ -807,8 +792,6 @@ static void ircomm_tty_wait_until_sent(struct tty_struct *tty, int timeout) | |||
807 | unsigned long orig_jiffies, poll_time; | 792 | unsigned long orig_jiffies, poll_time; |
808 | unsigned long flags; | 793 | unsigned long flags; |
809 | 794 | ||
810 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
811 | |||
812 | IRDA_ASSERT(self != NULL, return;); | 795 | IRDA_ASSERT(self != NULL, return;); |
813 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 796 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
814 | 797 | ||
@@ -842,8 +825,6 @@ static void ircomm_tty_throttle(struct tty_struct *tty) | |||
842 | { | 825 | { |
843 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; | 826 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; |
844 | 827 | ||
845 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
846 | |||
847 | IRDA_ASSERT(self != NULL, return;); | 828 | IRDA_ASSERT(self != NULL, return;); |
848 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 829 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
849 | 830 | ||
@@ -873,8 +854,6 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty) | |||
873 | { | 854 | { |
874 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; | 855 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; |
875 | 856 | ||
876 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
877 | |||
878 | IRDA_ASSERT(self != NULL, return;); | 857 | IRDA_ASSERT(self != NULL, return;); |
879 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 858 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
880 | 859 | ||
@@ -888,7 +867,7 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty) | |||
888 | self->settings.dte |= (IRCOMM_RTS|IRCOMM_DELTA_RTS); | 867 | self->settings.dte |= (IRCOMM_RTS|IRCOMM_DELTA_RTS); |
889 | 868 | ||
890 | ircomm_param_request(self, IRCOMM_DTE, TRUE); | 869 | ircomm_param_request(self, IRCOMM_DTE, TRUE); |
891 | IRDA_DEBUG(1, "%s(), FLOW_START\n", __func__ ); | 870 | pr_debug("%s(), FLOW_START\n", __func__); |
892 | } | 871 | } |
893 | ircomm_flow_request(self->ircomm, FLOW_START); | 872 | ircomm_flow_request(self->ircomm, FLOW_START); |
894 | } | 873 | } |
@@ -925,8 +904,6 @@ static void ircomm_tty_shutdown(struct ircomm_tty_cb *self) | |||
925 | IRDA_ASSERT(self != NULL, return;); | 904 | IRDA_ASSERT(self != NULL, return;); |
926 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 905 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
927 | 906 | ||
928 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
929 | |||
930 | if (!test_and_clear_bit(ASYNCB_INITIALIZED, &self->port.flags)) | 907 | if (!test_and_clear_bit(ASYNCB_INITIALIZED, &self->port.flags)) |
931 | return; | 908 | return; |
932 | 909 | ||
@@ -969,8 +946,6 @@ static void ircomm_tty_hangup(struct tty_struct *tty) | |||
969 | struct tty_port *port = &self->port; | 946 | struct tty_port *port = &self->port; |
970 | unsigned long flags; | 947 | unsigned long flags; |
971 | 948 | ||
972 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
973 | |||
974 | IRDA_ASSERT(self != NULL, return;); | 949 | IRDA_ASSERT(self != NULL, return;); |
975 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 950 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
976 | 951 | ||
@@ -998,7 +973,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty) | |||
998 | */ | 973 | */ |
999 | static void ircomm_tty_send_xchar(struct tty_struct *tty, char ch) | 974 | static void ircomm_tty_send_xchar(struct tty_struct *tty, char ch) |
1000 | { | 975 | { |
1001 | IRDA_DEBUG(0, "%s(), not impl\n", __func__ ); | 976 | pr_debug("%s(), not impl\n", __func__); |
1002 | } | 977 | } |
1003 | 978 | ||
1004 | /* | 979 | /* |
@@ -1042,8 +1017,6 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self) | |||
1042 | struct tty_struct *tty; | 1017 | struct tty_struct *tty; |
1043 | int status; | 1018 | int status; |
1044 | 1019 | ||
1045 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
1046 | |||
1047 | IRDA_ASSERT(self != NULL, return;); | 1020 | IRDA_ASSERT(self != NULL, return;); |
1048 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 1021 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
1049 | 1022 | ||
@@ -1055,15 +1028,13 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self) | |||
1055 | /*wake_up_interruptible(&self->delta_msr_wait);*/ | 1028 | /*wake_up_interruptible(&self->delta_msr_wait);*/ |
1056 | } | 1029 | } |
1057 | if ((self->port.flags & ASYNC_CHECK_CD) && (status & IRCOMM_DELTA_CD)) { | 1030 | if ((self->port.flags & ASYNC_CHECK_CD) && (status & IRCOMM_DELTA_CD)) { |
1058 | IRDA_DEBUG(2, | 1031 | pr_debug("%s(), ircomm%d CD now %s...\n", __func__ , self->line, |
1059 | "%s(), ircomm%d CD now %s...\n", __func__ , self->line, | 1032 | (status & IRCOMM_CD) ? "on" : "off"); |
1060 | (status & IRCOMM_CD) ? "on" : "off"); | ||
1061 | 1033 | ||
1062 | if (status & IRCOMM_CD) { | 1034 | if (status & IRCOMM_CD) { |
1063 | wake_up_interruptible(&self->port.open_wait); | 1035 | wake_up_interruptible(&self->port.open_wait); |
1064 | } else { | 1036 | } else { |
1065 | IRDA_DEBUG(2, | 1037 | pr_debug("%s(), Doing serial hangup..\n", __func__); |
1066 | "%s(), Doing serial hangup..\n", __func__ ); | ||
1067 | if (tty) | 1038 | if (tty) |
1068 | tty_hangup(tty); | 1039 | tty_hangup(tty); |
1069 | 1040 | ||
@@ -1074,8 +1045,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self) | |||
1074 | if (tty && tty_port_cts_enabled(&self->port)) { | 1045 | if (tty && tty_port_cts_enabled(&self->port)) { |
1075 | if (tty->hw_stopped) { | 1046 | if (tty->hw_stopped) { |
1076 | if (status & IRCOMM_CTS) { | 1047 | if (status & IRCOMM_CTS) { |
1077 | IRDA_DEBUG(2, | 1048 | pr_debug("%s(), CTS tx start...\n", __func__); |
1078 | "%s(), CTS tx start...\n", __func__ ); | ||
1079 | tty->hw_stopped = 0; | 1049 | tty->hw_stopped = 0; |
1080 | 1050 | ||
1081 | /* Wake up processes blocked on open */ | 1051 | /* Wake up processes blocked on open */ |
@@ -1086,8 +1056,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self) | |||
1086 | } | 1056 | } |
1087 | } else { | 1057 | } else { |
1088 | if (!(status & IRCOMM_CTS)) { | 1058 | if (!(status & IRCOMM_CTS)) { |
1089 | IRDA_DEBUG(2, | 1059 | pr_debug("%s(), CTS tx stop...\n", __func__); |
1090 | "%s(), CTS tx stop...\n", __func__ ); | ||
1091 | tty->hw_stopped = 1; | 1060 | tty->hw_stopped = 1; |
1092 | } | 1061 | } |
1093 | } | 1062 | } |
@@ -1108,15 +1077,13 @@ static int ircomm_tty_data_indication(void *instance, void *sap, | |||
1108 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; | 1077 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; |
1109 | struct tty_struct *tty; | 1078 | struct tty_struct *tty; |
1110 | 1079 | ||
1111 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
1112 | |||
1113 | IRDA_ASSERT(self != NULL, return -1;); | 1080 | IRDA_ASSERT(self != NULL, return -1;); |
1114 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); | 1081 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); |
1115 | IRDA_ASSERT(skb != NULL, return -1;); | 1082 | IRDA_ASSERT(skb != NULL, return -1;); |
1116 | 1083 | ||
1117 | tty = tty_port_tty_get(&self->port); | 1084 | tty = tty_port_tty_get(&self->port); |
1118 | if (!tty) { | 1085 | if (!tty) { |
1119 | IRDA_DEBUG(0, "%s(), no tty!\n", __func__ ); | 1086 | pr_debug("%s(), no tty!\n", __func__); |
1120 | return 0; | 1087 | return 0; |
1121 | } | 1088 | } |
1122 | 1089 | ||
@@ -1127,7 +1094,7 @@ static int ircomm_tty_data_indication(void *instance, void *sap, | |||
1127 | * params, we can just as well declare the hardware for running. | 1094 | * params, we can just as well declare the hardware for running. |
1128 | */ | 1095 | */ |
1129 | if (tty->hw_stopped && (self->flow == FLOW_START)) { | 1096 | if (tty->hw_stopped && (self->flow == FLOW_START)) { |
1130 | IRDA_DEBUG(0, "%s(), polling for line settings!\n", __func__ ); | 1097 | pr_debug("%s(), polling for line settings!\n", __func__); |
1131 | ircomm_param_request(self, IRCOMM_POLL, TRUE); | 1098 | ircomm_param_request(self, IRCOMM_POLL, TRUE); |
1132 | 1099 | ||
1133 | /* We can just as well declare the hardware for running */ | 1100 | /* We can just as well declare the hardware for running */ |
@@ -1160,8 +1127,6 @@ static int ircomm_tty_control_indication(void *instance, void *sap, | |||
1160 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; | 1127 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; |
1161 | int clen; | 1128 | int clen; |
1162 | 1129 | ||
1163 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
1164 | |||
1165 | IRDA_ASSERT(self != NULL, return -1;); | 1130 | IRDA_ASSERT(self != NULL, return -1;); |
1166 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); | 1131 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); |
1167 | IRDA_ASSERT(skb != NULL, return -1;); | 1132 | IRDA_ASSERT(skb != NULL, return -1;); |
@@ -1196,7 +1161,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap, | |||
1196 | 1161 | ||
1197 | switch (cmd) { | 1162 | switch (cmd) { |
1198 | case FLOW_START: | 1163 | case FLOW_START: |
1199 | IRDA_DEBUG(2, "%s(), hw start!\n", __func__ ); | 1164 | pr_debug("%s(), hw start!\n", __func__); |
1200 | if (tty) | 1165 | if (tty) |
1201 | tty->hw_stopped = 0; | 1166 | tty->hw_stopped = 0; |
1202 | 1167 | ||
@@ -1205,7 +1170,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap, | |||
1205 | break; | 1170 | break; |
1206 | default: /* If we get here, something is very wrong, better stop */ | 1171 | default: /* If we get here, something is very wrong, better stop */ |
1207 | case FLOW_STOP: | 1172 | case FLOW_STOP: |
1208 | IRDA_DEBUG(2, "%s(), hw stopped!\n", __func__ ); | 1173 | pr_debug("%s(), hw stopped!\n", __func__); |
1209 | if (tty) | 1174 | if (tty) |
1210 | tty->hw_stopped = 1; | 1175 | tty->hw_stopped = 1; |
1211 | break; | 1176 | break; |