hvsi.c (92a19f9cec9a80ad93c06e115822deb729e2c6ad) hvsi.c (2e124b4a390ca85325fae75764bef92f0547fa25)
1/*
2 * Copyright (C) 2004 Hollis Blanchard <hollisb@us.ibm.com>, IBM
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 451 unchanged lines hidden (view full) ---

460 pr_debug("%s: handshake\n", __func__);
461 break;
462 }
463 }
464
465 compact_inbuf(hp, packet);
466
467 if (flip)
1/*
2 * Copyright (C) 2004 Hollis Blanchard <hollisb@us.ibm.com>, IBM
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 451 unchanged lines hidden (view full) ---

460 pr_debug("%s: handshake\n", __func__);
461 break;
462 }
463 }
464
465 compact_inbuf(hp, packet);
466
467 if (flip)
468 tty_flip_buffer_push(tty);
468 tty_flip_buffer_push(&hp->port);
469
470 return 1;
471}
472
473static void hvsi_send_overflow(struct hvsi_struct *hp)
474{
475 pr_debug("%s: delivering %i bytes overflow\n", __func__,
476 hp->n_throttle);

--- 29 unchanged lines hidden (view full) ---

506 }
507 }
508
509 spin_lock_irqsave(&hp->lock, flags);
510 if (tty && hp->n_throttle && !test_bit(TTY_THROTTLED, &tty->flags)) {
511 /* we weren't hung up and we weren't throttled, so we can
512 * deliver the rest now */
513 hvsi_send_overflow(hp);
469
470 return 1;
471}
472
473static void hvsi_send_overflow(struct hvsi_struct *hp)
474{
475 pr_debug("%s: delivering %i bytes overflow\n", __func__,
476 hp->n_throttle);

--- 29 unchanged lines hidden (view full) ---

506 }
507 }
508
509 spin_lock_irqsave(&hp->lock, flags);
510 if (tty && hp->n_throttle && !test_bit(TTY_THROTTLED, &tty->flags)) {
511 /* we weren't hung up and we weren't throttled, so we can
512 * deliver the rest now */
513 hvsi_send_overflow(hp);
514 tty_flip_buffer_push(tty);
514 tty_flip_buffer_push(&hp->port);
515 }
516 spin_unlock_irqrestore(&hp->lock, flags);
517
518 tty_kref_put(tty);
519
520 return IRQ_HANDLED;
521}
522

--- 470 unchanged lines hidden (view full) ---

993 struct hvsi_struct *hp = tty->driver_data;
994 unsigned long flags;
995
996 pr_debug("%s\n", __func__);
997
998 spin_lock_irqsave(&hp->lock, flags);
999 if (hp->n_throttle) {
1000 hvsi_send_overflow(hp);
515 }
516 spin_unlock_irqrestore(&hp->lock, flags);
517
518 tty_kref_put(tty);
519
520 return IRQ_HANDLED;
521}
522

--- 470 unchanged lines hidden (view full) ---

993 struct hvsi_struct *hp = tty->driver_data;
994 unsigned long flags;
995
996 pr_debug("%s\n", __func__);
997
998 spin_lock_irqsave(&hp->lock, flags);
999 if (hp->n_throttle) {
1000 hvsi_send_overflow(hp);
1001 tty_flip_buffer_push(tty);
1001 tty_flip_buffer_push(&hp->port);
1002 }
1003 spin_unlock_irqrestore(&hp->lock, flags);
1004
1005
1006 h_vio_signal(hp->vtermno, VIO_IRQ_ENABLE);
1007}
1008
1009static int hvsi_tiocmget(struct tty_struct *tty)

--- 219 unchanged lines hidden ---
1002 }
1003 spin_unlock_irqrestore(&hp->lock, flags);
1004
1005
1006 h_vio_signal(hp->vtermno, VIO_IRQ_ENABLE);
1007}
1008
1009static int hvsi_tiocmget(struct tty_struct *tty)

--- 219 unchanged lines hidden ---