Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
f8a5d3f5
Commit
f8a5d3f5
authored
Jan 22, 2004
by
Ben Collins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SUNZILOG]: Fix locking in cases where UART layer has grabbed the lock already.
parent
18aa7699
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
12 deletions
+2
-12
drivers/serial/sunzilog.c
drivers/serial/sunzilog.c
+2
-12
No files found.
drivers/serial/sunzilog.c
View file @
f8a5d3f5
...
...
@@ -723,36 +723,28 @@ static void sunzilog_start_tx(struct uart_port *port, unsigned int tty_start)
}
}
/* The port lock is
not
held. */
/* The port lock is held. */
static
void
sunzilog_stop_rx
(
struct
uart_port
*
port
)
{
struct
uart_sunzilog_port
*
up
=
UART_ZILOG
(
port
);
struct
zilog_channel
*
channel
;
unsigned
long
flags
;
if
(
ZS_IS_CONS
(
up
))
return
;
spin_lock_irqsave
(
&
port
->
lock
,
flags
);
channel
=
ZILOG_CHANNEL_FROM_PORT
(
port
);
/* Disable all RX interrupts. */
up
->
curregs
[
R1
]
&=
~
RxINT_MASK
;
sunzilog_maybe_update_regs
(
up
,
channel
);
spin_unlock_irqrestore
(
&
port
->
lock
,
flags
);
}
/* The port lock is
not
held. */
/* The port lock is held. */
static
void
sunzilog_enable_ms
(
struct
uart_port
*
port
)
{
struct
uart_sunzilog_port
*
up
=
(
struct
uart_sunzilog_port
*
)
port
;
struct
zilog_channel
*
channel
=
ZILOG_CHANNEL_FROM_PORT
(
port
);
unsigned
char
new_reg
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
port
->
lock
,
flags
);
new_reg
=
up
->
curregs
[
R15
]
|
(
DCDIE
|
SYNCIE
|
CTSIE
);
if
(
new_reg
!=
up
->
curregs
[
R15
])
{
...
...
@@ -761,8 +753,6 @@ static void sunzilog_enable_ms(struct uart_port *port)
/* NOTE: Not subject to 'transmitter active' rule. */
write_zsreg
(
channel
,
R15
,
up
->
curregs
[
R15
]);
}
spin_unlock_irqrestore
(
&
port
->
lock
,
flags
);
}
/* The port lock is not held. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment