+ char-mxser_new-reverse-if-else-paths-patch.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     Char: mxser_new, reverse if-else-paths patch

has been added to the -mm tree.  Its filename is

     char-mxser_new-reverse-if-else-paths-patch.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: Char: mxser_new, reverse if-else-paths patch
From: Jiri Slaby <jirislaby@xxxxxxxxx>

This patch was intorduced in mxser to 1.9.1 conversion, but causes endless
sleep in tcdrain userspace call.

Thanks to Sergei Organov <osv@xxxxxxxxx> for testing and pointing this out.

Signed-off-by: Jiri Slaby <jirislaby@xxxxxxxxx>
Cc: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/char/mxser_new.c |   27 +++++++--------------------
 1 file changed, 7 insertions(+), 20 deletions(-)

diff -puN drivers/char/mxser_new.c~char-mxser_new-reverse-if-else-paths-patch drivers/char/mxser_new.c
--- a/drivers/char/mxser_new.c~char-mxser_new-reverse-if-else-paths-patch
+++ a/drivers/char/mxser_new.c
@@ -1218,12 +1218,7 @@ static int mxser_write_room(struct tty_s
 static int mxser_chars_in_buffer(struct tty_struct *tty)
 {
 	struct mxser_port *info = tty->driver_data;
-	int len = info->xmit_cnt;
-
-	if (!(inb(info->ioaddr + UART_LSR) & UART_LSR_THRE))
-		len++;
-
-	return len;
+	return info->xmit_cnt;
 }
 
 static void mxser_flush_buffer(struct tty_struct *tty)
@@ -1953,7 +1948,7 @@ static void mxser_stoprx(struct tty_stru
 		if (info->board->chip_flag) {
 			info->IER &= ~MOXA_MUST_RECV_ISR;
 			outb(info->IER, info->ioaddr + UART_IER);
-		} else if (!(info->flags & ASYNC_CLOSING)) {
+		} else {
 			info->x_char = STOP_CHAR(tty);
 			outb(0, info->ioaddr + UART_IER);
 			info->IER |= UART_IER_THRI;
@@ -1990,7 +1985,7 @@ static void mxser_unthrottle(struct tty_
 			if (info->board->chip_flag) {
 				info->IER |= MOXA_MUST_RECV_ISR;
 				outb(info->IER, info->ioaddr + UART_IER);
-			} else if (!(info->flags & ASYNC_CLOSING)) {
+			} else {
 				info->x_char = START_CHAR(tty);
 				outb(0, info->ioaddr + UART_IER);
 				info->IER |= UART_IER_THRI;
@@ -2265,10 +2260,8 @@ static void mxser_receive_chars(struct m
 					flag = TTY_OVERRUN;
 /* added by casper 1/11/2000 */
 					port->icount.overrun++;
-				} else
-					flags = TTY_BREAK;
-			} else
-				flags = 0;
+				}
+			}
 			tty_insert_flip_char(tty, ch, flag);
 			cnt++;
 			if (cnt >= recv_room) {
@@ -2324,14 +2317,8 @@ static void mxser_transmit_chars(struct 
 	if (port->xmit_buf == 0)
 		goto unlock;
 
-	if (port->xmit_cnt == 0) {
-		if (port->xmit_cnt < WAKEUP_CHARS) { /* XXX what's this for?? */
-			set_bit(MXSER_EVENT_TXLOW, &port->event);
-			schedule_work(&port->tqueue);
-		}
-		goto unlock;
-	}
-	if (port->tty->stopped || (port->tty->hw_stopped &&
+	if ((port->xmit_cnt <= 0) || port->tty->stopped ||
+			(port->tty->hw_stopped &&
 			(port->type != PORT_16550A) &&
 			(!port->board->chip_flag))) {
 		port->IER &= ~UART_IER_THRI;
_

Patches currently in -mm which might be from jirislaby@xxxxxxxxx are

char-nozomi-use-tty_wakeup.patch
pci-mxser-pci-refcounts.patch
mxser-make-an-experimental-clone.patch
char-mxser_new-correct-include-file.patch
char-mxser_new-upgrade-to-191.patch
char-mxser_new-rework-to-allow-dynamic-structs.patch
char-mxser_new-use-__devinit-macros.patch
char-mxser_new-pci_request_region-for-pci-regions.patch
char-mxser_new-check-request_region-retvals.patch
char-mxser_new-kill-unneeded-memsets.patch
char-mxser_new-revert-spin_lock-changes.patch
char-mxser_new-remove-request-for-testers-line.patch
char-mxser_new-debug-printk-dependent-on-debug.patch
char-mxser_new-alter-license-terms.patch
char-mxser_new-code-upside-down.patch
char-mxser_new-cmspar-is-defined.patch
char-remove-unneded-termbits-redefinitions-mxser_new.patch
char-mxser_new-eliminate-tty-ldisc-deref.patch
char-mxser_new-testbit-for-bit-testing.patch
char-mxser_new-correct-fail-paths.patch
char-mxser_new-dont-check-tty_unregister-retval.patch
char-mxser_new-compress-isa-finding.patch
char-mxser_new-register-tty-devices-on-the-fly.patch
char-mxser_new-compact-structures-round2.patch
char-mxser_new-reverse-if-else-paths-patch.patch
char-mxser_new-comments-cleanup.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux