Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
242cf670
Commit
242cf670
authored
Jul 29, 2005
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB: fix up URB_ASYNC_UNLINK usages from the usb-serial drivers
Signed-off-by:
Greg Kroah-Hartman
<
gregkh@suse.de
>
parent
b375a049
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
14 deletions
+2
-14
drivers/usb/serial/keyspan.c
drivers/usb/serial/keyspan.c
+1
-7
drivers/usb/serial/option.c
drivers/usb/serial/option.c
+1
-7
No files found.
drivers/usb/serial/keyspan.c
View file @
242cf670
...
...
@@ -383,11 +383,8 @@ static int keyspan_write(struct usb_serial_port *port,
dbg
(
"%s - endpoint %d flip %d"
,
__FUNCTION__
,
usb_pipeendpoint
(
this_urb
->
pipe
),
flip
);
if
(
this_urb
->
status
==
-
EINPROGRESS
)
{
if
(
this_urb
->
transfer_flags
&
URB_ASYNC_UNLINK
)
break
;
if
(
time_before
(
jiffies
,
p_priv
->
tx_start_time
[
flip
]
+
10
*
HZ
))
break
;
this_urb
->
transfer_flags
|=
URB_ASYNC_UNLINK
;
usb_unlink_urb
(
this_urb
);
break
;
}
...
...
@@ -402,7 +399,6 @@ static int keyspan_write(struct usb_serial_port *port,
/* send the data out the bulk port */
this_urb
->
transfer_buffer_length
=
todo
+
dataOffset
;
this_urb
->
transfer_flags
&=
~
URB_ASYNC_UNLINK
;
this_urb
->
dev
=
port
->
serial
->
dev
;
if
((
err
=
usb_submit_urb
(
this_urb
,
GFP_ATOMIC
))
!=
0
)
{
dbg
(
"usb_submit_urb(write bulk) failed (%d)"
,
err
);
...
...
@@ -1119,10 +1115,8 @@ static int keyspan_open (struct usb_serial_port *port, struct file *filp)
static
inline
void
stop_urb
(
struct
urb
*
urb
)
{
if
(
urb
&&
urb
->
status
==
-
EINPROGRESS
)
{
urb
->
transfer_flags
&=
~
URB_ASYNC_UNLINK
;
if
(
urb
&&
urb
->
status
==
-
EINPROGRESS
)
usb_kill_urb
(
urb
);
}
}
static
void
keyspan_close
(
struct
usb_serial_port
*
port
,
struct
file
*
filp
)
...
...
drivers/usb/serial/option.c
View file @
242cf670
...
...
@@ -273,12 +273,9 @@ static int option_write(struct usb_serial_port *port,
this_urb
=
portdata
->
out_urbs
[
i
];
if
(
this_urb
->
status
==
-
EINPROGRESS
)
{
if
(
this_urb
->
transfer_flags
&
URB_ASYNC_UNLINK
)
continue
;
if
(
time_before
(
jiffies
,
portdata
->
tx_start_time
[
i
]
+
10
*
HZ
))
continue
;
this_urb
->
transfer_flags
|=
URB_ASYNC_UNLINK
;
usb_unlink_urb
(
this_urb
);
continue
;
}
...
...
@@ -293,7 +290,6 @@ static int option_write(struct usb_serial_port *port,
memcpy
(
this_urb
->
transfer_buffer
,
buf
,
todo
);
this_urb
->
transfer_buffer_length
=
todo
;
this_urb
->
transfer_flags
&=
~
URB_ASYNC_UNLINK
;
this_urb
->
dev
=
port
->
serial
->
dev
;
err
=
usb_submit_urb
(
this_urb
,
GFP_ATOMIC
);
if
(
err
)
{
...
...
@@ -513,10 +509,8 @@ static int option_open(struct usb_serial_port *port, struct file *filp)
static
inline
void
stop_urb
(
struct
urb
*
urb
)
{
if
(
urb
&&
urb
->
status
==
-
EINPROGRESS
)
{
urb
->
transfer_flags
&=
~
URB_ASYNC_UNLINK
;
if
(
urb
&&
urb
->
status
==
-
EINPROGRESS
)
usb_kill_urb
(
urb
);
}
}
static
void
option_close
(
struct
usb_serial_port
*
port
,
struct
file
*
filp
)
...
...
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