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
6b5561f4
Commit
6b5561f4
authored
Feb 06, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] PCI Hotplug: change pci_hp_change_slot_info() to take a hotplug_slot and not a string.
parent
d7ef941b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
12 deletions
+8
-12
drivers/hotplug/cpci_hotplug_core.c
drivers/hotplug/cpci_hotplug_core.c
+2
-2
drivers/hotplug/cpqphp_ctrl.c
drivers/hotplug/cpqphp_ctrl.c
+1
-3
drivers/hotplug/ibmphp_core.c
drivers/hotplug/ibmphp_core.c
+1
-3
drivers/hotplug/pci_hotplug.h
drivers/hotplug/pci_hotplug.h
+1
-1
drivers/hotplug/pci_hotplug_core.c
drivers/hotplug/pci_hotplug_core.c
+3
-3
No files found.
drivers/hotplug/cpci_hotplug_core.c
View file @
6b5561f4
...
@@ -130,7 +130,7 @@ update_latch_status(struct hotplug_slot *hotplug_slot, u8 value)
...
@@ -130,7 +130,7 @@ update_latch_status(struct hotplug_slot *hotplug_slot, u8 value)
return
-
EINVAL
;
return
-
EINVAL
;
memcpy
(
&
info
,
hotplug_slot
->
info
,
sizeof
(
struct
hotplug_slot_info
));
memcpy
(
&
info
,
hotplug_slot
->
info
,
sizeof
(
struct
hotplug_slot_info
));
info
.
latch_status
=
value
;
info
.
latch_status
=
value
;
return
pci_hp_change_slot_info
(
hotplug_slot
->
name
,
&
info
);
return
pci_hp_change_slot_info
(
hotplug_slot
,
&
info
);
}
}
static
int
static
int
...
@@ -142,7 +142,7 @@ update_adapter_status(struct hotplug_slot *hotplug_slot, u8 value)
...
@@ -142,7 +142,7 @@ update_adapter_status(struct hotplug_slot *hotplug_slot, u8 value)
return
-
EINVAL
;
return
-
EINVAL
;
memcpy
(
&
info
,
hotplug_slot
->
info
,
sizeof
(
struct
hotplug_slot_info
));
memcpy
(
&
info
,
hotplug_slot
->
info
,
sizeof
(
struct
hotplug_slot_info
));
info
.
adapter_status
=
value
;
info
.
adapter_status
=
value
;
return
pci_hp_change_slot_info
(
hotplug_slot
->
name
,
&
info
);
return
pci_hp_change_slot_info
(
hotplug_slot
,
&
info
);
}
}
static
int
static
int
...
...
drivers/hotplug/cpqphp_ctrl.c
View file @
6b5561f4
...
@@ -1767,19 +1767,17 @@ void cpqhp_event_stop_thread (void)
...
@@ -1767,19 +1767,17 @@ void cpqhp_event_stop_thread (void)
static
int
update_slot_info
(
struct
controller
*
ctrl
,
struct
slot
*
slot
)
static
int
update_slot_info
(
struct
controller
*
ctrl
,
struct
slot
*
slot
)
{
{
struct
hotplug_slot_info
*
info
;
struct
hotplug_slot_info
*
info
;
char
buffer
[
SLOT_NAME_SIZE
];
int
result
;
int
result
;
info
=
kmalloc
(
sizeof
(
struct
hotplug_slot_info
),
GFP_KERNEL
);
info
=
kmalloc
(
sizeof
(
struct
hotplug_slot_info
),
GFP_KERNEL
);
if
(
!
info
)
if
(
!
info
)
return
-
ENOMEM
;
return
-
ENOMEM
;
make_slot_name
(
&
buffer
[
0
],
SLOT_NAME_SIZE
,
slot
);
info
->
power_status
=
get_slot_enabled
(
ctrl
,
slot
);
info
->
power_status
=
get_slot_enabled
(
ctrl
,
slot
);
info
->
attention_status
=
cpq_get_attention_status
(
ctrl
,
slot
);
info
->
attention_status
=
cpq_get_attention_status
(
ctrl
,
slot
);
info
->
latch_status
=
cpq_get_latch_status
(
ctrl
,
slot
);
info
->
latch_status
=
cpq_get_latch_status
(
ctrl
,
slot
);
info
->
adapter_status
=
get_presence_status
(
ctrl
,
slot
);
info
->
adapter_status
=
get_presence_status
(
ctrl
,
slot
);
result
=
pci_hp_change_slot_info
(
buffer
,
info
);
result
=
pci_hp_change_slot_info
(
slot
->
hotplug_slot
,
info
);
kfree
(
info
);
kfree
(
info
);
return
result
;
return
result
;
}
}
...
...
drivers/hotplug/ibmphp_core.c
View file @
6b5561f4
...
@@ -686,7 +686,6 @@ static int validate (struct slot *slot_cur, int opn)
...
@@ -686,7 +686,6 @@ static int validate (struct slot *slot_cur, int opn)
int
ibmphp_update_slot_info
(
struct
slot
*
slot_cur
)
int
ibmphp_update_slot_info
(
struct
slot
*
slot_cur
)
{
{
struct
hotplug_slot_info
*
info
;
struct
hotplug_slot_info
*
info
;
char
buffer
[
30
];
int
rc
;
int
rc
;
u8
bus_speed
;
u8
bus_speed
;
u8
mode
;
u8
mode
;
...
@@ -697,7 +696,6 @@ int ibmphp_update_slot_info (struct slot *slot_cur)
...
@@ -697,7 +696,6 @@ int ibmphp_update_slot_info (struct slot *slot_cur)
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
strncpy
(
buffer
,
slot_cur
->
hotplug_slot
->
name
,
30
);
info
->
power_status
=
SLOT_PWRGD
(
slot_cur
->
status
);
info
->
power_status
=
SLOT_PWRGD
(
slot_cur
->
status
);
info
->
attention_status
=
SLOT_ATTN
(
slot_cur
->
status
,
slot_cur
->
ext_status
);
info
->
attention_status
=
SLOT_ATTN
(
slot_cur
->
status
,
slot_cur
->
ext_status
);
info
->
latch_status
=
SLOT_LATCH
(
slot_cur
->
status
);
info
->
latch_status
=
SLOT_LATCH
(
slot_cur
->
status
);
...
@@ -735,7 +733,7 @@ int ibmphp_update_slot_info (struct slot *slot_cur)
...
@@ -735,7 +733,7 @@ int ibmphp_update_slot_info (struct slot *slot_cur)
info
->
max_bus_speed
=
slot_cur
->
hotplug_slot
->
info
->
max_bus_speed
;
info
->
max_bus_speed
=
slot_cur
->
hotplug_slot
->
info
->
max_bus_speed
;
// To do: bus_names
// To do: bus_names
rc
=
pci_hp_change_slot_info
(
buffer
,
info
);
rc
=
pci_hp_change_slot_info
(
slot_cur
->
hotplug_slot
,
info
);
kfree
(
info
);
kfree
(
info
);
return
rc
;
return
rc
;
}
}
...
...
drivers/hotplug/pci_hotplug.h
View file @
6b5561f4
...
@@ -139,7 +139,7 @@ struct hotplug_slot {
...
@@ -139,7 +139,7 @@ struct hotplug_slot {
extern
int
pci_hp_register
(
struct
hotplug_slot
*
slot
);
extern
int
pci_hp_register
(
struct
hotplug_slot
*
slot
);
extern
int
pci_hp_deregister
(
struct
hotplug_slot
*
slot
);
extern
int
pci_hp_deregister
(
struct
hotplug_slot
*
slot
);
extern
int
pci_hp_change_slot_info
(
const
char
*
name
,
extern
int
pci_hp_change_slot_info
(
struct
hotplug_slot
*
slot
,
struct
hotplug_slot_info
*
info
);
struct
hotplug_slot_info
*
info
);
struct
pci_dev_wrapped
{
struct
pci_dev_wrapped
{
...
...
drivers/hotplug/pci_hotplug_core.c
View file @
6b5561f4
...
@@ -529,16 +529,16 @@ int pci_hp_deregister (struct hotplug_slot *slot)
...
@@ -529,16 +529,16 @@ int pci_hp_deregister (struct hotplug_slot *slot)
/**
/**
* pci_hp_change_slot_info - changes the slot's information structure in the core
* pci_hp_change_slot_info - changes the slot's information structure in the core
* @
name: the name of
the slot whose info has changed
* @
slot: pointer to
the slot whose info has changed
* @info: pointer to the info copy into the slot's info structure
* @info: pointer to the info copy into the slot's info structure
*
*
*
A slot with @name
must have been registered with the pci
*
@slot
must have been registered with the pci
* hotplug subsystem previously with a call to pci_hp_register().
* hotplug subsystem previously with a call to pci_hp_register().
*
*
* Returns 0 if successful, anything else for an error.
* Returns 0 if successful, anything else for an error.
* Not supported by sysfs now.
* Not supported by sysfs now.
*/
*/
int
pci_hp_change_slot_info
(
const
char
*
name
,
struct
hotplug_slot_info
*
info
)
int
pci_hp_change_slot_info
(
struct
hotplug_slot
*
slot
,
struct
hotplug_slot_info
*
info
)
{
{
return
0
;
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