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
b0af79be
Commit
b0af79be
authored
Apr 04, 2003
by
Oliver Neukum
Committed by
Greg Kroah-Hartman
Apr 04, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB: locking reset/probe
- mutual exclusion between reset() and probe()
parent
7ac1d67a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
drivers/usb/core/hub.c
drivers/usb/core/hub.c
+16
-1
No files found.
drivers/usb/core/hub.c
View file @
b0af79be
...
...
@@ -1175,8 +1175,10 @@ void usb_hub_cleanup(void)
*
* Take a look at proc_resetdevice in devio.c for some sample code to
* do this.
* Use this only from within your probe function, otherwise use
* usb_reset_device() below, which ensure proper locking
*/
int
usb_reset_device
(
struct
usb_device
*
dev
)
int
usb_
physical_
reset_device
(
struct
usb_device
*
dev
)
{
struct
usb_device
*
parent
=
dev
->
parent
;
struct
usb_device_descriptor
*
descriptor
;
...
...
@@ -1306,3 +1308,16 @@ int usb_reset_device(struct usb_device *dev)
return
0
;
}
int
usb_reset_device
(
struct
usb_device
*
udev
)
{
struct
device
*
gdev
=
&
udev
->
dev
;
int
r
;
down_read
(
&
gdev
->
bus
->
subsys
.
rwsem
);
r
=
usb_physical_reset_device
(
udev
);
up_read
(
&
gdev
->
bus
->
subsys
.
rwsem
);
return
r
;
}
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