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
89a5508e
Commit
89a5508e
authored
Jan 28, 2004
by
Ben Collins
Committed by
Ben Collins
Jan 28, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SUNSAB]: Fixup sunsab_receive_chars for when serial console isn't open (no tty)
parent
4b887d8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
drivers/serial/sunsab.c
drivers/serial/sunsab.c
+11
-2
No files found.
drivers/serial/sunsab.c
View file @
89a5508e
...
@@ -101,13 +101,16 @@ static void receive_chars(struct uart_sunsab_port *up,
...
@@ -101,13 +101,16 @@ static void receive_chars(struct uart_sunsab_port *up,
union
sab82532_irq_status
*
stat
,
union
sab82532_irq_status
*
stat
,
struct
pt_regs
*
regs
)
struct
pt_regs
*
regs
)
{
{
struct
tty_struct
*
tty
=
up
->
port
.
info
->
tty
;
struct
tty_struct
*
tty
=
NULL
;
unsigned
char
buf
[
32
];
unsigned
char
buf
[
32
];
int
saw_console_brk
=
0
;
int
saw_console_brk
=
0
;
int
free_fifo
=
0
;
int
free_fifo
=
0
;
int
count
=
0
;
int
count
=
0
;
int
i
;
int
i
;
if
(
up
->
port
.
info
!=
NULL
)
/* Unopened serial console */
tty
=
up
->
port
.
info
->
tty
;
/* Read number of BYTES (Character + Status) available. */
/* Read number of BYTES (Character + Status) available. */
if
(
stat
->
sreg
.
isr0
&
SAB82532_ISR0_RPF
)
{
if
(
stat
->
sreg
.
isr0
&
SAB82532_ISR0_RPF
)
{
count
=
SAB82532_RECV_FIFO_SIZE
;
count
=
SAB82532_RECV_FIFO_SIZE
;
...
@@ -142,6 +145,11 @@ static void receive_chars(struct uart_sunsab_port *up,
...
@@ -142,6 +145,11 @@ static void receive_chars(struct uart_sunsab_port *up,
for
(
i
=
0
;
i
<
count
;
i
++
)
{
for
(
i
=
0
;
i
<
count
;
i
++
)
{
unsigned
char
ch
=
buf
[
i
];
unsigned
char
ch
=
buf
[
i
];
if
(
tty
==
NULL
)
{
uart_handle_sysrq_char
(
&
up
->
port
,
ch
,
regs
);
continue
;
}
if
(
unlikely
(
tty
->
flip
.
count
>=
TTY_FLIPBUF_SIZE
))
{
if
(
unlikely
(
tty
->
flip
.
count
>=
TTY_FLIPBUF_SIZE
))
{
tty
->
flip
.
work
.
func
((
void
*
)
tty
);
tty
->
flip
.
work
.
func
((
void
*
)
tty
);
if
(
tty
->
flip
.
count
>=
TTY_FLIPBUF_SIZE
)
if
(
tty
->
flip
.
count
>=
TTY_FLIPBUF_SIZE
)
...
@@ -217,7 +225,8 @@ static void receive_chars(struct uart_sunsab_port *up,
...
@@ -217,7 +225,8 @@ static void receive_chars(struct uart_sunsab_port *up,
}
}
}
}
tty_flip_buffer_push
(
tty
);
if
(
tty
)
tty_flip_buffer_push
(
tty
);
if
(
saw_console_brk
)
if
(
saw_console_brk
)
sun_do_break
();
sun_do_break
();
...
...
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