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
3783ad83
Commit
3783ad83
authored
Feb 07, 2004
by
Matthew Wilcox
Committed by
David S. Miller
Feb 07, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TG32]: Use pci_get_slot() to find 5704 peers, to handle domains properly.
parent
82b3a0c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
drivers/net/tg3.c
drivers/net/tg3.c
+13
-12
No files found.
drivers/net/tg3.c
View file @
3783ad83
...
...
@@ -7523,23 +7523,24 @@ static char * __devinit tg3_phy_string(struct tg3 *tp)
static
struct
pci_dev
*
__devinit
tg3_find_5704_peer
(
struct
tg3
*
tp
)
{
struct
pci_dev
*
peer
=
NULL
;
unsigned
int
func
;
struct
pci_dev
*
peer
;
unsigned
int
func
,
devnr
=
tp
->
pdev
->
devfn
&
~
7
;
for
(
func
=
0
;
func
<
7
;
func
++
)
{
unsigned
int
devfn
=
tp
->
pdev
->
devfn
;
devfn
&=
~
7
;
devfn
|=
func
;
if
(
devfn
==
tp
->
pdev
->
devfn
)
continue
;
peer
=
pci_find_slot
(
tp
->
pdev
->
bus
->
number
,
devfn
);
if
(
peer
)
for
(
func
=
0
;
func
<
8
;
func
++
)
{
peer
=
pci_get_slot
(
tp
->
pdev
->
bus
,
devnr
|
func
);
if
(
peer
&&
peer
!=
tp
->
pdev
)
break
;
pci_dev_put
(
peer
);
}
if
(
!
peer
||
peer
==
tp
->
pdev
)
BUG
();
/*
* We don't need to keep the refcount elevated; there's no way
* to remove one half of this device without removing the other
*/
pci_dev_put
(
peer
);
return
peer
;
}
...
...
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