Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dbab81281d3227af3d8a04aa748c5f41befa5d43
Commit:     dbab81281d3227af3d8a04aa748c5f41befa5d43
Parent:     d4dd1467f2053b31e2fbb58763ff9d1e0399af45
Author:     Maciej W. Rozycki <[EMAIL PROTECTED]>
AuthorDate: Thu Feb 7 00:15:07 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Feb 7 08:42:24 2008 -0800

    dz: always check if it is safe to console_putchar()
    
    Polled transmission is tricky enough with the DZ11 design.  While "loop" is
    set to a high value, conceptually you are not allowed to transmit without
    checking whether the device offers the right transmission line (yes, it is 
the
    device that selects the line -- the driver has no control over it other than
    disabling the transmitter offered if it is the wrong one), so the loop has 
to
    be run at least once.
    
    Well, the '1977 or PDP11 view of how serial lines should be handled...  
Except
    that the serial interface used to be quite an impressive board back then
    rather than chip.
    
    Signed-off-by: Maciej W. Rozycki <[EMAIL PROTECTED]>
    Cc: Jiri Slaby <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/serial/dz.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/dz.c b/drivers/serial/dz.c
index bbae5a2..e1a2e41 100644
--- a/drivers/serial/dz.c
+++ b/drivers/serial/dz.c
@@ -685,7 +685,7 @@ static void dz_console_putchar(struct uart_port *uport, int 
ch)
        iob();
        spin_unlock_irqrestore(&dport->port.lock, flags);
 
-       while (loops--) {
+       do {
                trdy = dz_in(dport, DZ_CSR);
                if (!(trdy & DZ_TRDY))
                        continue;
@@ -696,7 +696,7 @@ static void dz_console_putchar(struct uart_port *uport, int 
ch)
                dz_out(dport, DZ_TCR, mask);
                iob();
                udelay(2);
-       }
+       } while (loops--);
 
        if (loops)                              /* Cannot send otherwise. */
                dz_out(dport, DZ_TDR, ch);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to