Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tty: fix up gigaset a bit

Stephen's fixes reminded me that gigaset is still rather broken so fix it up
a bit

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alan Cox and committed by
Linus Torvalds
ea1afd25 53e86317

+12 -15
+12 -15
drivers/isdn/gigaset/ser-gigaset.c
··· 571 571 } 572 572 573 573 /* prevent other callers from entering ldisc methods */ 574 + /* FIXME: should use the tty state flags */ 574 575 tty->disc_data = NULL; 575 576 576 577 if (!cs->hw.ser) ··· 643 642 return -ENXIO; 644 643 645 644 switch (cmd) { 646 - case TCGETS: 647 - case TCGETA: 648 - /* pass through to underlying serial device */ 649 - rc = n_tty_ioctl_helper(tty, file, cmd, arg); 645 + 646 + case FIONREAD: 647 + /* unused, always return zero */ 648 + val = 0; 649 + rc = put_user(val, p); 650 650 break; 651 651 652 652 case TCFLSH: ··· 661 659 flush_send_queue(cs); 662 660 break; 663 661 } 664 - /* flush the serial port's buffer */ 665 - rc = n_tty_ioctl_helper(tty, file, cmd, arg); 666 - break; 667 - 668 - case FIONREAD: 669 - /* unused, always return zero */ 670 - val = 0; 671 - rc = put_user(val, p); 672 - break; 662 + /* Pass through */ 673 663 674 664 default: 675 - rc = -ENOIOCTLCMD; 665 + /* pass through to underlying serial device */ 666 + rc = n_tty_ioctl_helper(tty, file, cmd, arg); 667 + break; 676 668 } 677 - 678 669 cs_put(cs); 679 670 return rc; 680 671 } ··· 675 680 /* 676 681 * Poll on the tty. 677 682 * Unused, always return zero. 683 + * 684 + * FIXME: should probably return an exception - especially on hangup 678 685 */ 679 686 static unsigned int 680 687 gigaset_tty_poll(struct tty_struct *tty, struct file *file, poll_table *wait)