aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/specialix.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/specialix.c')
-rw-r--r--drivers/char/specialix.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c
index e72be4190a44..268e17f9ec3f 100644
--- a/drivers/char/specialix.c
+++ b/drivers/char/specialix.c
@@ -87,6 +87,7 @@
87#include <linux/tty_flip.h> 87#include <linux/tty_flip.h>
88#include <linux/mm.h> 88#include <linux/mm.h>
89#include <linux/serial.h> 89#include <linux/serial.h>
90#include <linux/smp_lock.h>
90#include <linux/fcntl.h> 91#include <linux/fcntl.h>
91#include <linux/major.h> 92#include <linux/major.h>
92#include <linux/delay.h> 93#include <linux/delay.h>
@@ -1808,10 +1809,10 @@ static int sx_tiocmset(struct tty_struct *tty, struct file *file,
1808 if (clear & TIOCM_DTR) 1809 if (clear & TIOCM_DTR)
1809 port->MSVR &= ~MSVR_DTR; 1810 port->MSVR &= ~MSVR_DTR;
1810 } 1811 }
1811 spin_lock_irqsave(&bp->lock, flags); 1812 spin_lock(&bp->lock);
1812 sx_out(bp, CD186x_CAR, port_No(port)); 1813 sx_out(bp, CD186x_CAR, port_No(port));
1813 sx_out(bp, CD186x_MSVR, port->MSVR); 1814 sx_out(bp, CD186x_MSVR, port->MSVR);
1814 spin_unlock_irqrestore(&bp->lock, flags); 1815 spin_unlock(&bp->lock);
1815 spin_unlock_irqrestore(&port->lock, flags); 1816 spin_unlock_irqrestore(&port->lock, flags);
1816 func_exit(); 1817 func_exit();
1817 return 0; 1818 return 0;
@@ -1832,11 +1833,11 @@ static int sx_send_break(struct tty_struct *tty, int length)
1832 port->break_length = SPECIALIX_TPS / HZ * length; 1833 port->break_length = SPECIALIX_TPS / HZ * length;
1833 port->COR2 |= COR2_ETC; 1834 port->COR2 |= COR2_ETC;
1834 port->IER |= IER_TXRDY; 1835 port->IER |= IER_TXRDY;
1835 spin_lock_irqsave(&bp->lock, flags); 1836 spin_lock(&bp->lock);
1836 sx_out(bp, CD186x_CAR, port_No(port)); 1837 sx_out(bp, CD186x_CAR, port_No(port));
1837 sx_out(bp, CD186x_COR2, port->COR2); 1838 sx_out(bp, CD186x_COR2, port->COR2);
1838 sx_out(bp, CD186x_IER, port->IER); 1839 sx_out(bp, CD186x_IER, port->IER);
1839 spin_unlock_irqrestore(&bp->lock, flags); 1840 spin_unlock(&bp->lock);
1840 spin_unlock_irqrestore(&port->lock, flags); 1841 spin_unlock_irqrestore(&port->lock, flags);
1841 sx_wait_CCR(bp); 1842 sx_wait_CCR(bp);
1842 spin_lock_irqsave(&bp->lock, flags); 1843 spin_lock_irqsave(&bp->lock, flags);
@@ -2022,9 +2023,9 @@ static void sx_unthrottle(struct tty_struct *tty)
2022 if (sx_crtscts(tty)) 2023 if (sx_crtscts(tty))
2023 port->MSVR |= MSVR_DTR; 2024 port->MSVR |= MSVR_DTR;
2024 /* Else clause: see remark in "sx_throttle"... */ 2025 /* Else clause: see remark in "sx_throttle"... */
2025 spin_lock_irqsave(&bp->lock, flags); 2026 spin_lock(&bp->lock);
2026 sx_out(bp, CD186x_CAR, port_No(port)); 2027 sx_out(bp, CD186x_CAR, port_No(port));
2027 spin_unlock_irqrestore(&bp->lock, flags); 2028 spin_unlock(&bp->lock);
2028 if (I_IXOFF(tty)) { 2029 if (I_IXOFF(tty)) {
2029 spin_unlock_irqrestore(&port->lock, flags); 2030 spin_unlock_irqrestore(&port->lock, flags);
2030 sx_wait_CCR(bp); 2031 sx_wait_CCR(bp);
@@ -2034,9 +2035,9 @@ static void sx_unthrottle(struct tty_struct *tty)
2034 sx_wait_CCR(bp); 2035 sx_wait_CCR(bp);
2035 spin_lock_irqsave(&port->lock, flags); 2036 spin_lock_irqsave(&port->lock, flags);
2036 } 2037 }
2037 spin_lock_irqsave(&bp->lock, flags); 2038 spin_lock(&bp->lock);
2038 sx_out(bp, CD186x_MSVR, port->MSVR); 2039 sx_out(bp, CD186x_MSVR, port->MSVR);
2039 spin_unlock_irqrestore(&bp->lock, flags); 2040 spin_unlock(&bp->lock);
2040 spin_unlock_irqrestore(&port->lock, flags); 2041 spin_unlock_irqrestore(&port->lock, flags);
2041 2042
2042 func_exit(); 2043 func_exit();
@@ -2060,10 +2061,10 @@ static void sx_stop(struct tty_struct *tty)
2060 2061
2061 spin_lock_irqsave(&port->lock, flags); 2062 spin_lock_irqsave(&port->lock, flags);
2062 port->IER &= ~IER_TXRDY; 2063 port->IER &= ~IER_TXRDY;
2063 spin_lock_irqsave(&bp->lock, flags); 2064 spin_lock(&bp->lock);
2064 sx_out(bp, CD186x_CAR, port_No(port)); 2065 sx_out(bp, CD186x_CAR, port_No(port));
2065 sx_out(bp, CD186x_IER, port->IER); 2066 sx_out(bp, CD186x_IER, port->IER);
2066 spin_unlock_irqrestore(&bp->lock, flags); 2067 spin_unlock(&bp->lock);
2067 spin_unlock_irqrestore(&port->lock, flags); 2068 spin_unlock_irqrestore(&port->lock, flags);
2068 2069
2069 func_exit(); 2070 func_exit();
@@ -2088,10 +2089,10 @@ static void sx_start(struct tty_struct *tty)
2088 spin_lock_irqsave(&port->lock, flags); 2089 spin_lock_irqsave(&port->lock, flags);
2089 if (port->xmit_cnt && port->xmit_buf && !(port->IER & IER_TXRDY)) { 2090 if (port->xmit_cnt && port->xmit_buf && !(port->IER & IER_TXRDY)) {
2090 port->IER |= IER_TXRDY; 2091 port->IER |= IER_TXRDY;
2091 spin_lock_irqsave(&bp->lock, flags); 2092 spin_lock(&bp->lock);
2092 sx_out(bp, CD186x_CAR, port_No(port)); 2093 sx_out(bp, CD186x_CAR, port_No(port));
2093 sx_out(bp, CD186x_IER, port->IER); 2094 sx_out(bp, CD186x_IER, port->IER);
2094 spin_unlock_irqrestore(&bp->lock, flags); 2095 spin_unlock(&bp->lock);
2095 } 2096 }
2096 spin_unlock_irqrestore(&port->lock, flags); 2097 spin_unlock_irqrestore(&port->lock, flags);
2097 2098