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
1c5233b2
Commit
1c5233b2
authored
Apr 08, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
USB: fix pl2303 handling of status bits.
Patch originally from Kevin Watkins <kw@cmu.edu>
parent
7b0c8bb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
drivers/usb/serial/pl2303.c
drivers/usb/serial/pl2303.c
+6
-1
No files found.
drivers/usb/serial/pl2303.c
View file @
1c5233b2
...
...
@@ -116,6 +116,7 @@ static struct usb_driver pl2303_driver = {
#define VENDOR_READ_REQUEST 0x01
#define UART_STATE 0x08
#define UART_STATE_TRANSIENT_MASK 0x74
#define UART_DCD 0x01
#define UART_DSR 0x02
#define UART_BREAK_ERROR 0x04
...
...
@@ -662,6 +663,7 @@ static void pl2303_read_int_callback (struct urb *urb, struct pt_regs *regs)
unsigned
char
*
data
=
urb
->
transfer_buffer
;
unsigned
long
flags
;
int
status
;
u8
uart_state
;
dbg
(
"%s (%d)"
,
__FUNCTION__
,
port
->
number
);
...
...
@@ -690,8 +692,10 @@ static void pl2303_read_int_callback (struct urb *urb, struct pt_regs *regs)
goto
exit
;
/* Save off the uart status for others to look at */
uart_state
=
data
[
UART_STATE
];
spin_lock_irqsave
(
&
priv
->
lock
,
flags
);
priv
->
line_status
=
data
[
UART_STATE
];
uart_state
|=
(
priv
->
line_status
&
UART_STATE_TRANSIENT_MASK
);
priv
->
line_status
=
uart_state
;
spin_unlock_irqrestore
(
&
priv
->
lock
,
flags
);
exit:
...
...
@@ -752,6 +756,7 @@ static void pl2303_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
spin_lock_irqsave
(
&
priv
->
lock
,
flags
);
status
=
priv
->
line_status
;
priv
->
line_status
&=
~
UART_STATE_TRANSIENT_MASK
;
spin_unlock_irqrestore
(
&
priv
->
lock
,
flags
);
wake_up_interruptible
(
&
priv
->
delta_msr_wait
);
...
...
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