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
nexedi
linux
Commits
77ddc744
Commit
77ddc744
authored
Apr 29, 2004
by
John Rose
Committed by
Deepak Saxena
Apr 29, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] PCI Hotplug: RPA DLPAR remove slot, return code fix
parent
b59f07cf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
drivers/pci/hotplug/rpadlpar_core.c
drivers/pci/hotplug/rpadlpar_core.c
+10
-10
No files found.
drivers/pci/hotplug/rpadlpar_core.c
View file @
77ddc744
...
@@ -47,15 +47,13 @@ static struct device_node *find_php_slot_vio_node(char *drc_name)
...
@@ -47,15 +47,13 @@ static struct device_node *find_php_slot_vio_node(char *drc_name)
{
{
struct
device_node
*
child
;
struct
device_node
*
child
;
struct
device_node
*
parent
=
of_find_node_by_name
(
NULL
,
"vdevice"
);
struct
device_node
*
parent
=
of_find_node_by_name
(
NULL
,
"vdevice"
);
char
*
loc_code
;
if
(
!
parent
)
if
(
!
parent
)
return
NULL
;
return
NULL
;
for
(
child
=
of_get_next_child
(
parent
,
NULL
);
for
(
child
=
of_get_next_child
(
parent
,
NULL
);
child
;
child
=
of_get_next_child
(
parent
,
child
))
{
child
;
child
=
of_get_next_child
(
parent
,
child
))
{
char
*
loc_code
;
loc_code
=
get_property
(
child
,
"ibm,loc-code"
,
NULL
);
loc_code
=
get_property
(
child
,
"ibm,loc-code"
,
NULL
);
if
(
loc_code
&&
!
strcmp
(
loc_code
,
drc_name
))
if
(
loc_code
&&
!
strcmp
(
loc_code
,
drc_name
))
return
child
;
return
child
;
...
@@ -309,12 +307,8 @@ int dlpar_remove_vio_slot(struct slot *slot, char *drc_name)
...
@@ -309,12 +307,8 @@ int dlpar_remove_vio_slot(struct slot *slot, char *drc_name)
*/
*/
int
dlpar_remove_pci_slot
(
struct
slot
*
slot
,
char
*
drc_name
)
int
dlpar_remove_pci_slot
(
struct
slot
*
slot
,
char
*
drc_name
)
{
{
struct
device_node
*
dn
=
find_php_slot_pci_node
(
drc_name
);
struct
pci_dev
*
bridge_dev
;
struct
pci_dev
*
bridge_dev
;
if
(
!
dn
)
return
-
ENODEV
;
bridge_dev
=
slot
->
bridge
;
bridge_dev
=
slot
->
bridge
;
if
(
!
bridge_dev
)
{
if
(
!
bridge_dev
)
{
printk
(
KERN_ERR
"%s: unexpected null bridge device
\n
"
,
printk
(
KERN_ERR
"%s: unexpected null bridge device
\n
"
,
...
@@ -359,6 +353,12 @@ int dlpar_remove_slot(char *drc_name)
...
@@ -359,6 +353,12 @@ int dlpar_remove_slot(char *drc_name)
if
(
down_interruptible
(
&
rpadlpar_sem
))
if
(
down_interruptible
(
&
rpadlpar_sem
))
return
-
ERESTARTSYS
;
return
-
ERESTARTSYS
;
if
(
!
find_php_slot_vio_node
(
drc_name
)
&&
!
find_php_slot_pci_node
(
drc_name
))
{
rc
=
-
ENODEV
;
goto
exit
;
}
slot
=
find_slot
(
drc_name
);
slot
=
find_slot
(
drc_name
);
if
(
!
slot
)
{
if
(
!
slot
)
{
rc
=
-
EINVAL
;
rc
=
-
EINVAL
;
...
...
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