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
47ad4279
Commit
47ad4279
authored
May 06, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] PCI Hotplug: fix up the compaq driver to work properly again.
parent
bf4adf9d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
drivers/hotplug/cpqphp_pci.c
drivers/hotplug/cpqphp_pci.c
+8
-8
No files found.
drivers/hotplug/cpqphp_pci.c
View file @
47ad4279
...
@@ -85,19 +85,20 @@ int cpqhp_configure_device (struct controller* ctrl, struct pci_func* func)
...
@@ -85,19 +85,20 @@ int cpqhp_configure_device (struct controller* ctrl, struct pci_func* func)
{
{
unsigned
char
bus
;
unsigned
char
bus
;
struct
pci_bus
*
child
;
struct
pci_bus
*
child
;
int
rc
=
0
;
int
num
;
if
(
func
->
pci_dev
==
NULL
)
if
(
func
->
pci_dev
==
NULL
)
func
->
pci_dev
=
pci_find_slot
(
func
->
bus
,
(
func
->
device
<<
3
)
|
(
func
->
function
&
0x7
));
func
->
pci_dev
=
pci_find_slot
(
func
->
bus
,
PCI_DEVFN
(
func
->
device
,
func
->
function
));
/
/Still NULL ? Well then scan for it !
/
* No pci device, we need to create it then */
if
(
func
->
pci_dev
==
NULL
)
{
if
(
func
->
pci_dev
==
NULL
)
{
dbg
(
"INFO: pci_dev still null
\n
"
);
dbg
(
"INFO: pci_dev still null
\n
"
);
//this will generate pci_dev structures for all functions, but we will only call this case when lookup fails
num
=
pci_scan_slot
(
ctrl
->
pci_dev
->
bus
,
PCI_DEVFN
(
func
->
device
,
func
->
function
));
func
->
pci_dev
=
pci_scan_slot
(
ctrl
->
pci_dev
->
bus
,
if
(
num
)
(
func
->
device
<<
3
)
+
(
func
->
function
&
0x7
)
);
pci_bus_add_devices
(
ctrl
->
pci_dev
->
bus
);
func
->
pci_dev
=
pci_find_slot
(
func
->
bus
,
PCI_DEVFN
(
func
->
device
,
func
->
function
));
if
(
func
->
pci_dev
==
NULL
)
{
if
(
func
->
pci_dev
==
NULL
)
{
dbg
(
"ERROR: pci_dev still null
\n
"
);
dbg
(
"ERROR: pci_dev still null
\n
"
);
return
0
;
return
0
;
...
@@ -108,10 +109,9 @@ int cpqhp_configure_device (struct controller* ctrl, struct pci_func* func)
...
@@ -108,10 +109,9 @@ int cpqhp_configure_device (struct controller* ctrl, struct pci_func* func)
pci_read_config_byte
(
func
->
pci_dev
,
PCI_SECONDARY_BUS
,
&
bus
);
pci_read_config_byte
(
func
->
pci_dev
,
PCI_SECONDARY_BUS
,
&
bus
);
child
=
(
struct
pci_bus
*
)
pci_add_new_bus
(
func
->
pci_dev
->
bus
,
(
func
->
pci_dev
),
bus
);
child
=
(
struct
pci_bus
*
)
pci_add_new_bus
(
func
->
pci_dev
->
bus
,
(
func
->
pci_dev
),
bus
);
pci_do_scan_bus
(
child
);
pci_do_scan_bus
(
child
);
}
}
return
rc
;
return
0
;
}
}
...
...
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