aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-07-15 20:24:45 -0400
committerDavid S. Miller <davem@davemloft.net>2015-07-15 20:24:45 -0400
commit14e4cec80cd05ad585c537db56a705ab61fbaff9 (patch)
treec0fc440922c543073a7ef0dad61b16c6922a184a
parent052cbda41fdc243a8d40cce7ab3a6327b4b2887e (diff)
parent62c13bad39211387afd4354e8e127a535d13e70d (diff)
Merge branch 'isdn-gigaset-fixes'
Tilman Schmidt says: ==================== Fix long-standing regression in ser_gigaset ISDN driver This series fixes a serious regression in the Gigaset M101 driver introduced in kernel release 3.10 and removes some unneeded code. Please also queue up patch 1 of the series for inclusion in the stable/longterm releases 3.10 and later. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/isdn/gigaset/ser-gigaset.c35
1 files changed, 10 insertions, 25 deletions
diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/isdn/gigaset/ser-gigaset.c
index 8c91fd5eb6fd..375be509e95f 100644
--- a/drivers/isdn/gigaset/ser-gigaset.c
+++ b/drivers/isdn/gigaset/ser-gigaset.c
@@ -524,9 +524,18 @@ gigaset_tty_open(struct tty_struct *tty)
524 cs->hw.ser->tty = tty; 524 cs->hw.ser->tty = tty;
525 atomic_set(&cs->hw.ser->refcnt, 1); 525 atomic_set(&cs->hw.ser->refcnt, 1);
526 init_completion(&cs->hw.ser->dead_cmp); 526 init_completion(&cs->hw.ser->dead_cmp);
527
528 tty->disc_data = cs; 527 tty->disc_data = cs;
529 528
529 /* Set the amount of data we're willing to receive per call
530 * from the hardware driver to half of the input buffer size
531 * to leave some reserve.
532 * Note: We don't do flow control towards the hardware driver.
533 * If more data is received than will fit into the input buffer,
534 * it will be dropped and an error will be logged. This should
535 * never happen as the device is slow and the buffer size ample.
536 */
537 tty->receive_room = RBUFSIZE/2;
538
530 /* OK.. Initialization of the datastructures and the HW is done.. Now 539 /* OK.. Initialization of the datastructures and the HW is done.. Now
531 * startup system and notify the LL that we are ready to run 540 * startup system and notify the LL that we are ready to run
532 */ 541 */
@@ -598,28 +607,6 @@ static int gigaset_tty_hangup(struct tty_struct *tty)
598} 607}
599 608
600/* 609/*
601 * Read on the tty.
602 * Unused, received data goes only to the Gigaset driver.
603 */
604static ssize_t
605gigaset_tty_read(struct tty_struct *tty, struct file *file,
606 unsigned char __user *buf, size_t count)
607{
608 return -EAGAIN;
609}
610
611/*
612 * Write on the tty.
613 * Unused, transmit data comes only from the Gigaset driver.
614 */
615static ssize_t
616gigaset_tty_write(struct tty_struct *tty, struct file *file,
617 const unsigned char *buf, size_t count)
618{
619 return -EAGAIN;
620}
621
622/*
623 * Ioctl on the tty. 610 * Ioctl on the tty.
624 * Called in process context only. 611 * Called in process context only.
625 * May be re-entered by multiple ioctl calling threads. 612 * May be re-entered by multiple ioctl calling threads.
@@ -752,8 +739,6 @@ static struct tty_ldisc_ops gigaset_ldisc = {
752 .open = gigaset_tty_open, 739 .open = gigaset_tty_open,
753 .close = gigaset_tty_close, 740 .close = gigaset_tty_close,
754 .hangup = gigaset_tty_hangup, 741 .hangup = gigaset_tty_hangup,
755 .read = gigaset_tty_read,
756 .write = gigaset_tty_write,
757 .ioctl = gigaset_tty_ioctl, 742 .ioctl = gigaset_tty_ioctl,
758 .receive_buf = gigaset_tty_receive, 743 .receive_buf = gigaset_tty_receive,
759 .write_wakeup = gigaset_tty_wakeup, 744 .write_wakeup = gigaset_tty_wakeup,