aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-28 19:02:50 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-28 19:02:50 -0500
commit34f2c1c35ff014a5d145971e41caa940cd62d563 (patch)
tree041f87086c9b2d2db384a791d460f8f985a0ba5e
parentcae2f9c46d69edb1aee565917735d79aba3a3267 (diff)
parent26e6c66e47fe7f69ef6ddb078e312204a1f17823 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6: pci hotplug: kernel-doc fixes pci-aer: fix kernel-doc mistakes PCI: drivers/pci/pci-sysfs.c: Add missing pci_dev_put PCI: pcie portdriver: initialize returned value
-rw-r--r--drivers/pci/hotplug/acpiphp.h8
-rw-r--r--drivers/pci/hotplug/acpiphp_core.c29
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c36
-rw-r--r--drivers/pci/hotplug/acpiphp_ibm.c47
-rw-r--r--drivers/pci/hotplug/cpqphp_core.c41
-rw-r--r--drivers/pci/hotplug/cpqphp_ctrl.c96
-rw-r--r--drivers/pci/hotplug/fakephp.c14
-rw-r--r--drivers/pci/hotplug/pciehp_ctrl.c16
-rw-r--r--drivers/pci/hotplug/rpadlpar_core.c19
-rw-r--r--drivers/pci/hotplug/rpaphp_core.c15
-rw-r--r--drivers/pci/hotplug/rpaphp_pci.c1
-rw-r--r--drivers/pci/hotplug/shpchp_ctrl.c16
-rw-r--r--drivers/pci/pci-sysfs.c4
-rw-r--r--drivers/pci/pcie/aer/aerdrv_core.c29
-rw-r--r--drivers/pci/pcie/portdrv_pci.c2
15 files changed, 188 insertions, 185 deletions
diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h
index f6cc0c5b5657..1ef417cca2db 100644
--- a/drivers/pci/hotplug/acpiphp.h
+++ b/drivers/pci/hotplug/acpiphp.h
@@ -66,7 +66,7 @@ struct slot {
66 char name[SLOT_NAME_SIZE]; 66 char name[SLOT_NAME_SIZE];
67}; 67};
68 68
69/** 69/*
70 * struct acpiphp_bridge - PCI bridge information 70 * struct acpiphp_bridge - PCI bridge information
71 * 71 *
72 * for each bridge device in ACPI namespace 72 * for each bridge device in ACPI namespace
@@ -97,7 +97,7 @@ struct acpiphp_bridge {
97}; 97};
98 98
99 99
100/** 100/*
101 * struct acpiphp_slot - PCI slot information 101 * struct acpiphp_slot - PCI slot information
102 * 102 *
103 * PCI slot information for each *physical* PCI slot 103 * PCI slot information for each *physical* PCI slot
@@ -118,7 +118,7 @@ struct acpiphp_slot {
118}; 118};
119 119
120 120
121/** 121/*
122 * struct acpiphp_func - PCI function information 122 * struct acpiphp_func - PCI function information
123 * 123 *
124 * PCI function information for each object in ACPI namespace 124 * PCI function information for each object in ACPI namespace
@@ -137,7 +137,7 @@ struct acpiphp_func {
137 u32 flags; /* see below */ 137 u32 flags; /* see below */
138}; 138};
139 139
140/** 140/*
141 * struct acpiphp_attention_info - device specific attention registration 141 * struct acpiphp_attention_info - device specific attention registration
142 * 142 *
143 * ACPI has no generic method of setting/getting attention status 143 * ACPI has no generic method of setting/getting attention status
diff --git a/drivers/pci/hotplug/acpiphp_core.c b/drivers/pci/hotplug/acpiphp_core.c
index a0ca63adad5a..c8c263875c21 100644
--- a/drivers/pci/hotplug/acpiphp_core.c
+++ b/drivers/pci/hotplug/acpiphp_core.c
@@ -91,10 +91,10 @@ static struct hotplug_slot_ops acpi_hotplug_slot_ops = {
91 * acpiphp_register_attention - set attention LED callback 91 * acpiphp_register_attention - set attention LED callback
92 * @info: must be completely filled with LED callbacks 92 * @info: must be completely filled with LED callbacks
93 * 93 *
94 * Description: this is used to register a hardware specific ACPI 94 * Description: This is used to register a hardware specific ACPI
95 * driver that manipulates the attention LED. All the fields in 95 * driver that manipulates the attention LED. All the fields in
96 * info must be set. 96 * info must be set.
97 **/ 97 */
98int acpiphp_register_attention(struct acpiphp_attention_info *info) 98int acpiphp_register_attention(struct acpiphp_attention_info *info)
99{ 99{
100 int retval = -EINVAL; 100 int retval = -EINVAL;
@@ -112,10 +112,10 @@ int acpiphp_register_attention(struct acpiphp_attention_info *info)
112 * acpiphp_unregister_attention - unset attention LED callback 112 * acpiphp_unregister_attention - unset attention LED callback
113 * @info: must match the pointer used to register 113 * @info: must match the pointer used to register
114 * 114 *
115 * Description: this is used to un-register a hardware specific acpi 115 * Description: This is used to un-register a hardware specific acpi
116 * driver that manipulates the attention LED. The pointer to the 116 * driver that manipulates the attention LED. The pointer to the
117 * info struct must be the same as the one used to set it. 117 * info struct must be the same as the one used to set it.
118 **/ 118 */
119int acpiphp_unregister_attention(struct acpiphp_attention_info *info) 119int acpiphp_unregister_attention(struct acpiphp_attention_info *info)
120{ 120{
121 int retval = -EINVAL; 121 int retval = -EINVAL;
@@ -133,7 +133,6 @@ int acpiphp_unregister_attention(struct acpiphp_attention_info *info)
133 * @hotplug_slot: slot to enable 133 * @hotplug_slot: slot to enable
134 * 134 *
135 * Actual tasks are done in acpiphp_enable_slot() 135 * Actual tasks are done in acpiphp_enable_slot()
136 *
137 */ 136 */
138static int enable_slot(struct hotplug_slot *hotplug_slot) 137static int enable_slot(struct hotplug_slot *hotplug_slot)
139{ 138{
@@ -151,7 +150,6 @@ static int enable_slot(struct hotplug_slot *hotplug_slot)
151 * @hotplug_slot: slot to disable 150 * @hotplug_slot: slot to disable
152 * 151 *
153 * Actual tasks are done in acpiphp_disable_slot() 152 * Actual tasks are done in acpiphp_disable_slot()
154 *
155 */ 153 */
156static int disable_slot(struct hotplug_slot *hotplug_slot) 154static int disable_slot(struct hotplug_slot *hotplug_slot)
157{ 155{
@@ -168,15 +166,15 @@ static int disable_slot(struct hotplug_slot *hotplug_slot)
168} 166}
169 167
170 168
171 /** 169/**
172 * set_attention_status - set attention LED 170 * set_attention_status - set attention LED
173 * @hotplug_slot: slot to set attention LED on 171 * @hotplug_slot: slot to set attention LED on
174 * @status: value to set attention LED to (0 or 1) 172 * @status: value to set attention LED to (0 or 1)
175 * 173 *
176 * attention status LED, so we use a callback that 174 * attention status LED, so we use a callback that
177 * was registered with us. This allows hardware specific 175 * was registered with us. This allows hardware specific
178 * ACPI implementations to blink the light for us. 176 * ACPI implementations to blink the light for us.
179 **/ 177 */
180 static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 status) 178 static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 status)
181 { 179 {
182 int retval = -ENODEV; 180 int retval = -ENODEV;
@@ -199,7 +197,6 @@ static int disable_slot(struct hotplug_slot *hotplug_slot)
199 * 197 *
200 * Some platforms may not implement _STA method properly. 198 * Some platforms may not implement _STA method properly.
201 * In that case, the value returned may not be reliable. 199 * In that case, the value returned may not be reliable.
202 *
203 */ 200 */
204static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value) 201static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value)
205{ 202{
@@ -213,7 +210,7 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value)
213} 210}
214 211
215 212
216 /** 213/**
217 * get_attention_status - get attention LED status 214 * get_attention_status - get attention LED status
218 * @hotplug_slot: slot to get status from 215 * @hotplug_slot: slot to get status from
219 * @value: returns with value of attention LED 216 * @value: returns with value of attention LED
@@ -221,8 +218,8 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value)
221 * ACPI doesn't have known method to determine the state 218 * ACPI doesn't have known method to determine the state
222 * of the attention status LED, so we use a callback that 219 * of the attention status LED, so we use a callback that
223 * was registered with us. This allows hardware specific 220 * was registered with us. This allows hardware specific
224 * ACPI implementations to determine its state 221 * ACPI implementations to determine its state.
225 **/ 222 */
226static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value) 223static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value)
227{ 224{
228 int retval = -EINVAL; 225 int retval = -EINVAL;
@@ -244,8 +241,7 @@ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value)
244 * @value: pointer to store status 241 * @value: pointer to store status
245 * 242 *
246 * ACPI doesn't provide any formal means to access latch status. 243 * ACPI doesn't provide any formal means to access latch status.
247 * Instead, we fake latch status from _STA 244 * Instead, we fake latch status from _STA.
248 *
249 */ 245 */
250static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value) 246static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value)
251{ 247{
@@ -265,8 +261,7 @@ static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value)
265 * @value: pointer to store status 261 * @value: pointer to store status
266 * 262 *
267 * ACPI doesn't provide any formal means to access adapter status. 263 * ACPI doesn't provide any formal means to access adapter status.
268 * Instead, we fake adapter status from _STA 264 * Instead, we fake adapter status from _STA.
269 *
270 */ 265 */
271static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value) 266static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value)
272{ 267{
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 1e125b56c9a9..ff1b1c71291a 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -82,7 +82,6 @@ static void handle_hotplug_event_func(acpi_handle handle, u32 type, void *contex
82 * 2. has _PS0 method 82 * 2. has _PS0 method
83 * 3. has _PS3 method 83 * 3. has _PS3 method
84 * 4. .. 84 * 4. ..
85 *
86 */ 85 */
87static int is_ejectable(acpi_handle handle) 86static int is_ejectable(acpi_handle handle)
88{ 87{
@@ -986,10 +985,8 @@ static int power_off_slot(struct acpiphp_slot *slot)
986 985
987 986
988/** 987/**
989 * acpiphp_max_busnr - return the highest reserved bus number under 988 * acpiphp_max_busnr - return the highest reserved bus number under the given bus.
990 * the given bus.
991 * @bus: bus to start search with 989 * @bus: bus to start search with
992 *
993 */ 990 */
994static unsigned char acpiphp_max_busnr(struct pci_bus *bus) 991static unsigned char acpiphp_max_busnr(struct pci_bus *bus)
995{ 992{
@@ -1018,7 +1015,6 @@ static unsigned char acpiphp_max_busnr(struct pci_bus *bus)
1018/** 1015/**
1019 * acpiphp_bus_add - add a new bus to acpi subsystem 1016 * acpiphp_bus_add - add a new bus to acpi subsystem
1020 * @func: acpiphp_func of the bridge 1017 * @func: acpiphp_func of the bridge
1021 *
1022 */ 1018 */
1023static int acpiphp_bus_add(struct acpiphp_func *func) 1019static int acpiphp_bus_add(struct acpiphp_func *func)
1024{ 1020{
@@ -1063,7 +1059,6 @@ acpiphp_bus_add_out:
1063/** 1059/**
1064 * acpiphp_bus_trim - trim a bus from acpi subsystem 1060 * acpiphp_bus_trim - trim a bus from acpi subsystem
1065 * @handle: handle to acpi namespace 1061 * @handle: handle to acpi namespace
1066 *
1067 */ 1062 */
1068static int acpiphp_bus_trim(acpi_handle handle) 1063static int acpiphp_bus_trim(acpi_handle handle)
1069{ 1064{
@@ -1089,7 +1084,6 @@ static int acpiphp_bus_trim(acpi_handle handle)
1089 * 1084 *
1090 * This function should be called per *physical slot*, 1085 * This function should be called per *physical slot*,
1091 * not per each slot object in ACPI namespace. 1086 * not per each slot object in ACPI namespace.
1092 *
1093 */ 1087 */
1094static int enable_device(struct acpiphp_slot *slot) 1088static int enable_device(struct acpiphp_slot *slot)
1095{ 1089{
@@ -1185,6 +1179,7 @@ static void disable_bridges(struct pci_bus *bus)
1185 1179
1186/** 1180/**
1187 * disable_device - disable a slot 1181 * disable_device - disable a slot
1182 * @slot: ACPI PHP slot
1188 */ 1183 */
1189static int disable_device(struct acpiphp_slot *slot) 1184static int disable_device(struct acpiphp_slot *slot)
1190{ 1185{
@@ -1240,14 +1235,15 @@ static int disable_device(struct acpiphp_slot *slot)
1240 1235
1241/** 1236/**
1242 * get_slot_status - get ACPI slot status 1237 * get_slot_status - get ACPI slot status
1238 * @slot: ACPI PHP slot
1243 * 1239 *
1244 * if a slot has _STA for each function and if any one of them 1240 * If a slot has _STA for each function and if any one of them
1245 * returned non-zero status, return it 1241 * returned non-zero status, return it.
1246 * 1242 *
1247 * if a slot doesn't have _STA and if any one of its functions' 1243 * If a slot doesn't have _STA and if any one of its functions'
1248 * configuration space is configured, return 0x0f as a _STA 1244 * configuration space is configured, return 0x0f as a _STA.
1249 * 1245 *
1250 * otherwise return 0 1246 * Otherwise return 0.
1251 */ 1247 */
1252static unsigned int get_slot_status(struct acpiphp_slot *slot) 1248static unsigned int get_slot_status(struct acpiphp_slot *slot)
1253{ 1249{
@@ -1281,6 +1277,7 @@ static unsigned int get_slot_status(struct acpiphp_slot *slot)
1281 1277
1282/** 1278/**
1283 * acpiphp_eject_slot - physically eject the slot 1279 * acpiphp_eject_slot - physically eject the slot
1280 * @slot: ACPI PHP slot
1284 */ 1281 */
1285int acpiphp_eject_slot(struct acpiphp_slot *slot) 1282int acpiphp_eject_slot(struct acpiphp_slot *slot)
1286{ 1283{
@@ -1314,6 +1311,7 @@ int acpiphp_eject_slot(struct acpiphp_slot *slot)
1314 1311
1315/** 1312/**
1316 * acpiphp_check_bridge - re-enumerate devices 1313 * acpiphp_check_bridge - re-enumerate devices
1314 * @bridge: where to begin re-enumeration
1317 * 1315 *
1318 * Iterate over all slots under this bridge and make sure that if a 1316 * Iterate over all slots under this bridge and make sure that if a
1319 * card is present they are enabled, and if not they are disabled. 1317 * card is present they are enabled, and if not they are disabled.
@@ -1538,13 +1536,11 @@ check_sub_bridges(acpi_handle handle, u32 lvl, void *context, void **rv)
1538 1536
1539/** 1537/**
1540 * handle_hotplug_event_bridge - handle ACPI event on bridges 1538 * handle_hotplug_event_bridge - handle ACPI event on bridges
1541 *
1542 * @handle: Notify()'ed acpi_handle 1539 * @handle: Notify()'ed acpi_handle
1543 * @type: Notify code 1540 * @type: Notify code
1544 * @context: pointer to acpiphp_bridge structure 1541 * @context: pointer to acpiphp_bridge structure
1545 * 1542 *
1546 * handles ACPI event notification on {host,p2p} bridges 1543 * Handles ACPI event notification on {host,p2p} bridges.
1547 *
1548 */ 1544 */
1549static void handle_hotplug_event_bridge(acpi_handle handle, u32 type, void *context) 1545static void handle_hotplug_event_bridge(acpi_handle handle, u32 type, void *context)
1550{ 1546{
@@ -1634,13 +1630,11 @@ static void handle_hotplug_event_bridge(acpi_handle handle, u32 type, void *cont
1634 1630
1635/** 1631/**
1636 * handle_hotplug_event_func - handle ACPI event on functions (i.e. slots) 1632 * handle_hotplug_event_func - handle ACPI event on functions (i.e. slots)
1637 *
1638 * @handle: Notify()'ed acpi_handle 1633 * @handle: Notify()'ed acpi_handle
1639 * @type: Notify code 1634 * @type: Notify code
1640 * @context: pointer to acpiphp_func structure 1635 * @context: pointer to acpiphp_func structure
1641 * 1636 *
1642 * handles ACPI event notification on slots 1637 * Handles ACPI event notification on slots.
1643 *
1644 */ 1638 */
1645static void handle_hotplug_event_func(acpi_handle handle, u32 type, void *context) 1639static void handle_hotplug_event_func(acpi_handle handle, u32 type, void *context)
1646{ 1640{
@@ -1705,7 +1699,6 @@ static struct acpi_pci_driver acpi_pci_hp_driver = {
1705 1699
1706/** 1700/**
1707 * acpiphp_glue_init - initializes all PCI hotplug - ACPI glue data structures 1701 * acpiphp_glue_init - initializes all PCI hotplug - ACPI glue data structures
1708 *
1709 */ 1702 */
1710int __init acpiphp_glue_init(void) 1703int __init acpiphp_glue_init(void)
1711{ 1704{
@@ -1726,7 +1719,7 @@ int __init acpiphp_glue_init(void)
1726/** 1719/**
1727 * acpiphp_glue_exit - terminates all PCI hotplug - ACPI glue data structures 1720 * acpiphp_glue_exit - terminates all PCI hotplug - ACPI glue data structures
1728 * 1721 *
1729 * This function frees all data allocated in acpiphp_glue_init() 1722 * This function frees all data allocated in acpiphp_glue_init().
1730 */ 1723 */
1731void acpiphp_glue_exit(void) 1724void acpiphp_glue_exit(void)
1732{ 1725{
@@ -1760,7 +1753,6 @@ int __init acpiphp_get_num_slots(void)
1760 * acpiphp_for_each_slot - call function for each slot 1753 * acpiphp_for_each_slot - call function for each slot
1761 * @fn: callback function 1754 * @fn: callback function
1762 * @data: context to be passed to callback function 1755 * @data: context to be passed to callback function
1763 *
1764 */ 1756 */
1765static int acpiphp_for_each_slot(acpiphp_callback fn, void *data) 1757static int acpiphp_for_each_slot(acpiphp_callback fn, void *data)
1766{ 1758{
@@ -1786,6 +1778,7 @@ static int acpiphp_for_each_slot(acpiphp_callback fn, void *data)
1786 1778
1787/** 1779/**
1788 * acpiphp_enable_slot - power on slot 1780 * acpiphp_enable_slot - power on slot
1781 * @slot: ACPI PHP slot
1789 */ 1782 */
1790int acpiphp_enable_slot(struct acpiphp_slot *slot) 1783int acpiphp_enable_slot(struct acpiphp_slot *slot)
1791{ 1784{
@@ -1815,6 +1808,7 @@ int acpiphp_enable_slot(struct acpiphp_slot *slot)
1815 1808
1816/** 1809/**
1817 * acpiphp_disable_slot - power off slot 1810 * acpiphp_disable_slot - power off slot
1811 * @slot: ACPI PHP slot
1818 */ 1812 */
1819int acpiphp_disable_slot(struct acpiphp_slot *slot) 1813int acpiphp_disable_slot(struct acpiphp_slot *slot)
1820{ 1814{
diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c
index 56829f82be4a..47d26b65e99a 100644
--- a/drivers/pci/hotplug/acpiphp_ibm.c
+++ b/drivers/pci/hotplug/acpiphp_ibm.c
@@ -134,11 +134,11 @@ static struct acpiphp_attention_info ibm_attention_info =
134 * ibm_slot_from_id - workaround for bad ibm hardware 134 * ibm_slot_from_id - workaround for bad ibm hardware
135 * @id: the slot number that linux refers to the slot by 135 * @id: the slot number that linux refers to the slot by
136 * 136 *
137 * Description: this method returns the aCPI slot descriptor 137 * Description: This method returns the aCPI slot descriptor
138 * corresponding to the Linux slot number. This descriptor 138 * corresponding to the Linux slot number. This descriptor
139 * has info about the aPCI slot id and attention status. 139 * has info about the aPCI slot id and attention status.
140 * This descriptor must be freed using kfree when done. 140 * This descriptor must be freed using kfree when done.
141 **/ 141 */
142static union apci_descriptor *ibm_slot_from_id(int id) 142static union apci_descriptor *ibm_slot_from_id(int id)
143{ 143{
144 int ind = 0, size; 144 int ind = 0, size;
@@ -173,9 +173,9 @@ ibm_slot_done:
173 * @slot: the hotplug_slot to work with 173 * @slot: the hotplug_slot to work with
174 * @status: what to set the LED to (0 or 1) 174 * @status: what to set the LED to (0 or 1)
175 * 175 *
176 * Description: this method is registered with the acpiphp module as a 176 * Description: This method is registered with the acpiphp module as a
177 * callback to do the device specific task of setting the LED status 177 * callback to do the device specific task of setting the LED status.
178 **/ 178 */
179static int ibm_set_attention_status(struct hotplug_slot *slot, u8 status) 179static int ibm_set_attention_status(struct hotplug_slot *slot, u8 status)
180{ 180{
181 union acpi_object args[2]; 181 union acpi_object args[2];
@@ -213,13 +213,13 @@ static int ibm_set_attention_status(struct hotplug_slot *slot, u8 status)
213 * @slot: the hotplug_slot to work with 213 * @slot: the hotplug_slot to work with
214 * @status: returns what the LED is set to (0 or 1) 214 * @status: returns what the LED is set to (0 or 1)
215 * 215 *
216 * Description: this method is registered with the acpiphp module as a 216 * Description: This method is registered with the acpiphp module as a
217 * callback to do the device specific task of getting the LED status 217 * callback to do the device specific task of getting the LED status.
218 * 218 *
219 * Because there is no direct method of getting the LED status directly 219 * Because there is no direct method of getting the LED status directly
220 * from an ACPI call, we read the aPCI table and parse out our 220 * from an ACPI call, we read the aPCI table and parse out our
221 * slot descriptor to read the status from that. 221 * slot descriptor to read the status from that.
222 **/ 222 */
223static int ibm_get_attention_status(struct hotplug_slot *slot, u8 *status) 223static int ibm_get_attention_status(struct hotplug_slot *slot, u8 *status)
224{ 224{
225 union apci_descriptor *ibm_slot; 225 union apci_descriptor *ibm_slot;
@@ -245,8 +245,8 @@ static int ibm_get_attention_status(struct hotplug_slot *slot, u8 *status)
245 * @event: the event info (device specific) 245 * @event: the event info (device specific)
246 * @context: passed context (our notification struct) 246 * @context: passed context (our notification struct)
247 * 247 *
248 * Description: this method is registered as a callback with the ACPI 248 * Description: This method is registered as a callback with the ACPI
249 * subsystem it is called when this device has an event to notify the OS of 249 * subsystem it is called when this device has an event to notify the OS of.
250 * 250 *
251 * The events actually come from the device as two events that get 251 * The events actually come from the device as two events that get
252 * synthesized into one event with data by this function. The event 252 * synthesized into one event with data by this function. The event
@@ -256,7 +256,7 @@ static int ibm_get_attention_status(struct hotplug_slot *slot, u8 *status)
256 * From section 5.6.2.2 of the ACPI 2.0 spec, I understand that the OSPM will 256 * From section 5.6.2.2 of the ACPI 2.0 spec, I understand that the OSPM will
257 * only re-enable the interrupt that causes this event AFTER this method 257 * only re-enable the interrupt that causes this event AFTER this method
258 * has returned, thereby enforcing serial access for the notification struct. 258 * has returned, thereby enforcing serial access for the notification struct.
259 **/ 259 */
260static void ibm_handle_events(acpi_handle handle, u32 event, void *context) 260static void ibm_handle_events(acpi_handle handle, u32 event, void *context)
261{ 261{
262 u8 detail = event & 0x0f; 262 u8 detail = event & 0x0f;
@@ -279,16 +279,16 @@ static void ibm_handle_events(acpi_handle handle, u32 event, void *context)
279 * ibm_get_table_from_acpi - reads the APLS buffer from ACPI 279 * ibm_get_table_from_acpi - reads the APLS buffer from ACPI
280 * @bufp: address to pointer to allocate for the table 280 * @bufp: address to pointer to allocate for the table
281 * 281 *
282 * Description: this method reads the APLS buffer in from ACPI and 282 * Description: This method reads the APLS buffer in from ACPI and
283 * stores the "stripped" table into a single buffer 283 * stores the "stripped" table into a single buffer
284 * it allocates and passes the address back in bufp 284 * it allocates and passes the address back in bufp.
285 * 285 *
286 * If NULL is passed in as buffer, this method only calculates 286 * If NULL is passed in as buffer, this method only calculates
287 * the size of the table and returns that without filling 287 * the size of the table and returns that without filling
288 * in the buffer 288 * in the buffer.
289 * 289 *
290 * returns < 0 on error or the size of the table on success 290 * Returns < 0 on error or the size of the table on success.
291 **/ 291 */
292static int ibm_get_table_from_acpi(char **bufp) 292static int ibm_get_table_from_acpi(char **bufp)
293{ 293{
294 union acpi_object *package; 294 union acpi_object *package;
@@ -349,17 +349,18 @@ read_table_done:
349/** 349/**
350 * ibm_read_apci_table - callback for the sysfs apci_table file 350 * ibm_read_apci_table - callback for the sysfs apci_table file
351 * @kobj: the kobject this binary attribute is a part of 351 * @kobj: the kobject this binary attribute is a part of
352 * @bin_attr: struct bin_attribute for this file
352 * @buffer: the kernel space buffer to fill 353 * @buffer: the kernel space buffer to fill
353 * @pos: the offset into the file 354 * @pos: the offset into the file
354 * @size: the number of bytes requested 355 * @size: the number of bytes requested
355 * 356 *
356 * Description: gets registered with sysfs as the reader callback 357 * Description: Gets registered with sysfs as the reader callback
357 * to be executed when /sys/bus/pci/slots/apci_table gets read 358 * to be executed when /sys/bus/pci/slots/apci_table gets read.
358 * 359 *
359 * Since we don't get notified on open and close for this file, 360 * Since we don't get notified on open and close for this file,
360 * things get really tricky here... 361 * things get really tricky here...
361 * our solution is to only allow reading the table in all at once 362 * our solution is to only allow reading the table in all at once.
362 **/ 363 */
363static ssize_t ibm_read_apci_table(struct kobject *kobj, 364static ssize_t ibm_read_apci_table(struct kobject *kobj,
364 struct bin_attribute *bin_attr, 365 struct bin_attribute *bin_attr,
365 char *buffer, loff_t pos, size_t size) 366 char *buffer, loff_t pos, size_t size)
@@ -385,10 +386,10 @@ static ssize_t ibm_read_apci_table(struct kobject *kobj,
385 * @context: a pointer to our handle to fill when we find the device 386 * @context: a pointer to our handle to fill when we find the device
386 * @rv: a return value to fill if desired 387 * @rv: a return value to fill if desired
387 * 388 *
388 * Description: used as a callback when calling acpi_walk_namespace 389 * Description: Used as a callback when calling acpi_walk_namespace
389 * to find our device. When this method returns non-zero 390 * to find our device. When this method returns non-zero
390 * acpi_walk_namespace quits its search and returns our value 391 * acpi_walk_namespace quits its search and returns our value.
391 **/ 392 */
392static acpi_status __init ibm_find_acpi_device(acpi_handle handle, 393static acpi_status __init ibm_find_acpi_device(acpi_handle handle,
393 u32 lvl, void *context, void **rv) 394 u32 lvl, void *context, void **rv)
394{ 395{
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
index a96b739b2d35..74178875b949 100644
--- a/drivers/pci/hotplug/cpqphp_core.c
+++ b/drivers/pci/hotplug/cpqphp_core.c
@@ -117,12 +117,10 @@ static inline int is_slot66mhz(struct slot *slot)
117 117
118/** 118/**
119 * detect_SMBIOS_pointer - find the System Management BIOS Table in mem region. 119 * detect_SMBIOS_pointer - find the System Management BIOS Table in mem region.
120 *
121 * @begin: begin pointer for region to be scanned. 120 * @begin: begin pointer for region to be scanned.
122 * @end: end pointer for region to be scanned. 121 * @end: end pointer for region to be scanned.
123 * 122 *
124 * Returns pointer to the head of the SMBIOS tables (or NULL) 123 * Returns pointer to the head of the SMBIOS tables (or %NULL).
125 *
126 */ 124 */
127static void __iomem * detect_SMBIOS_pointer(void __iomem *begin, void __iomem *end) 125static void __iomem * detect_SMBIOS_pointer(void __iomem *begin, void __iomem *end)
128{ 126{
@@ -157,9 +155,9 @@ static void __iomem * detect_SMBIOS_pointer(void __iomem *begin, void __iomem *e
157 155
158/** 156/**
159 * init_SERR - Initializes the per slot SERR generation. 157 * init_SERR - Initializes the per slot SERR generation.
158 * @ctrl: controller to use
160 * 159 *
161 * For unexpected switch opens 160 * For unexpected switch opens
162 *
163 */ 161 */
164static int init_SERR(struct controller * ctrl) 162static int init_SERR(struct controller * ctrl)
165{ 163{
@@ -224,14 +222,15 @@ static int pci_print_IRQ_route (void)
224 222
225/** 223/**
226 * get_subsequent_smbios_entry: get the next entry from bios table. 224 * get_subsequent_smbios_entry: get the next entry from bios table.
227 * 225 * @smbios_start: where to start in the SMBIOS table
228 * Gets the first entry if previous == NULL 226 * @smbios_table: location of the SMBIOS table
229 * Otherwise, returns the next entry
230 * Uses global SMBIOS Table pointer
231 *
232 * @curr: %NULL or pointer to previously returned structure 227 * @curr: %NULL or pointer to previously returned structure
233 * 228 *
234 * returns a pointer to an SMBIOS structure or NULL if none found 229 * Gets the first entry if previous == NULL;
230 * otherwise, returns the next entry.
231 * Uses global SMBIOS Table pointer.
232 *
233 * Returns a pointer to an SMBIOS structure or NULL if none found.
235 */ 234 */
236static void __iomem *get_subsequent_smbios_entry(void __iomem *smbios_start, 235static void __iomem *get_subsequent_smbios_entry(void __iomem *smbios_start,
237 void __iomem *smbios_table, 236 void __iomem *smbios_table,
@@ -272,17 +271,18 @@ static void __iomem *get_subsequent_smbios_entry(void __iomem *smbios_start,
272 271
273 272
274/** 273/**
275 * get_SMBIOS_entry 274 * get_SMBIOS_entry - return the requested SMBIOS entry or %NULL
276 * 275 * @smbios_start: where to start in the SMBIOS table
277 * @type:SMBIOS structure type to be returned 276 * @smbios_table: location of the SMBIOS table
277 * @type: SMBIOS structure type to be returned
278 * @previous: %NULL or pointer to previously returned structure 278 * @previous: %NULL or pointer to previously returned structure
279 * 279 *
280 * Gets the first entry of the specified type if previous == NULL 280 * Gets the first entry of the specified type if previous == %NULL;
281 * Otherwise, returns the next entry of the given type. 281 * Otherwise, returns the next entry of the given type.
282 * Uses global SMBIOS Table pointer 282 * Uses global SMBIOS Table pointer.
283 * Uses get_subsequent_smbios_entry 283 * Uses get_subsequent_smbios_entry.
284 * 284 *
285 * returns a pointer to an SMBIOS structure or %NULL if none found 285 * Returns a pointer to an SMBIOS structure or %NULL if none found.
286 */ 286 */
287static void __iomem *get_SMBIOS_entry(void __iomem *smbios_start, 287static void __iomem *get_SMBIOS_entry(void __iomem *smbios_start,
288 void __iomem *smbios_table, 288 void __iomem *smbios_table,
@@ -581,7 +581,9 @@ get_slot_mapping(struct pci_bus *bus, u8 bus_num, u8 dev_num, u8 *slot)
581 581
582/** 582/**
583 * cpqhp_set_attention_status - Turns the Amber LED for a slot on or off 583 * cpqhp_set_attention_status - Turns the Amber LED for a slot on or off
584 * 584 * @ctrl: struct controller to use
585 * @func: PCI device/function info
586 * @status: LED control flag: 1 = LED on, 0 = LED off
585 */ 587 */
586static int 588static int
587cpqhp_set_attention_status(struct controller *ctrl, struct pci_func *func, 589cpqhp_set_attention_status(struct controller *ctrl, struct pci_func *func,
@@ -621,7 +623,8 @@ cpqhp_set_attention_status(struct controller *ctrl, struct pci_func *func,
621 623
622/** 624/**
623 * set_attention_status - Turns the Amber LED for a slot on or off 625 * set_attention_status - Turns the Amber LED for a slot on or off
624 * 626 * @hotplug_slot: slot to change LED on
627 * @status: LED control flag
625 */ 628 */
626static int set_attention_status (struct hotplug_slot *hotplug_slot, u8 status) 629static int set_attention_status (struct hotplug_slot *hotplug_slot, u8 status)
627{ 630{
diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c
index 856d57b4d604..4018420c6f95 100644
--- a/drivers/pci/hotplug/cpqphp_ctrl.c
+++ b/drivers/pci/hotplug/cpqphp_ctrl.c
@@ -123,7 +123,7 @@ static u8 handle_switch_change(u8 change, struct controller * ctrl)
123} 123}
124 124
125/** 125/**
126 * cpqhp_find_slot: find the struct slot of given device 126 * cpqhp_find_slot - find the struct slot of given device
127 * @ctrl: scan lots of this controller 127 * @ctrl: scan lots of this controller
128 * @device: the device id to find 128 * @device: the device id to find
129 */ 129 */
@@ -305,9 +305,8 @@ static u8 handle_power_fault(u8 change, struct controller * ctrl)
305 305
306 306
307/** 307/**
308 * sort_by_size: sort nodes on the list by their length, smallest first. 308 * sort_by_size - sort nodes on the list by their length, smallest first.
309 * @head: list to sort 309 * @head: list to sort
310 *
311 */ 310 */
312static int sort_by_size(struct pci_resource **head) 311static int sort_by_size(struct pci_resource **head)
313{ 312{
@@ -354,9 +353,8 @@ static int sort_by_size(struct pci_resource **head)
354 353
355 354
356/** 355/**
357 * sort_by_max_size: sort nodes on the list by their length, largest first. 356 * sort_by_max_size - sort nodes on the list by their length, largest first.
358 * @head: list to sort 357 * @head: list to sort
359 *
360 */ 358 */
361static int sort_by_max_size(struct pci_resource **head) 359static int sort_by_max_size(struct pci_resource **head)
362{ 360{
@@ -403,8 +401,10 @@ static int sort_by_max_size(struct pci_resource **head)
403 401
404 402
405/** 403/**
406 * do_pre_bridge_resource_split: find node of resources that are unused 404 * do_pre_bridge_resource_split - find node of resources that are unused
407 * 405 * @head: new list head
406 * @orig_head: original list head
407 * @alignment: max node size (?)
408 */ 408 */
409static struct pci_resource *do_pre_bridge_resource_split(struct pci_resource **head, 409static struct pci_resource *do_pre_bridge_resource_split(struct pci_resource **head,
410 struct pci_resource **orig_head, u32 alignment) 410 struct pci_resource **orig_head, u32 alignment)
@@ -477,8 +477,9 @@ static struct pci_resource *do_pre_bridge_resource_split(struct pci_resource **h
477 477
478 478
479/** 479/**
480 * do_bridge_resource_split: find one node of resources that aren't in use 480 * do_bridge_resource_split - find one node of resources that aren't in use
481 * 481 * @head: list head
482 * @alignment: max node size (?)
482 */ 483 */
483static struct pci_resource *do_bridge_resource_split(struct pci_resource **head, u32 alignment) 484static struct pci_resource *do_bridge_resource_split(struct pci_resource **head, u32 alignment)
484{ 485{
@@ -525,14 +526,13 @@ error:
525 526
526 527
527/** 528/**
528 * get_io_resource: find first node of given size not in ISA aliasing window. 529 * get_io_resource - find first node of given size not in ISA aliasing window.
529 * @head: list to search 530 * @head: list to search
530 * @size: size of node to find, must be a power of two. 531 * @size: size of node to find, must be a power of two.
531 * 532 *
532 * Description: this function sorts the resource list by size and then returns 533 * Description: This function sorts the resource list by size and then returns
533 * returns the first node of "size" length that is not in the ISA aliasing 534 * returns the first node of "size" length that is not in the ISA aliasing
534 * window. If it finds a node larger than "size" it will split it up. 535 * window. If it finds a node larger than "size" it will split it up.
535 *
536 */ 536 */
537static struct pci_resource *get_io_resource(struct pci_resource **head, u32 size) 537static struct pci_resource *get_io_resource(struct pci_resource **head, u32 size)
538{ 538{
@@ -620,7 +620,7 @@ static struct pci_resource *get_io_resource(struct pci_resource **head, u32 size
620 620
621 621
622/** 622/**
623 * get_max_resource: get largest node which has at least the given size. 623 * get_max_resource - get largest node which has at least the given size.
624 * @head: the list to search the node in 624 * @head: the list to search the node in
625 * @size: the minimum size of the node to find 625 * @size: the minimum size of the node to find
626 * 626 *
@@ -712,7 +712,7 @@ static struct pci_resource *get_max_resource(struct pci_resource **head, u32 siz
712 712
713 713
714/** 714/**
715 * get_resource: find resource of given size and split up larger ones. 715 * get_resource - find resource of given size and split up larger ones.
716 * @head: the list to search for resources 716 * @head: the list to search for resources
717 * @size: the size limit to use 717 * @size: the size limit to use
718 * 718 *
@@ -804,14 +804,14 @@ static struct pci_resource *get_resource(struct pci_resource **head, u32 size)
804 804
805 805
806/** 806/**
807 * cpqhp_resource_sort_and_combine: sort nodes by base addresses and clean up. 807 * cpqhp_resource_sort_and_combine - sort nodes by base addresses and clean up
808 * @head: the list to sort and clean up 808 * @head: the list to sort and clean up
809 * 809 *
810 * Description: Sorts all of the nodes in the list in ascending order by 810 * Description: Sorts all of the nodes in the list in ascending order by
811 * their base addresses. Also does garbage collection by 811 * their base addresses. Also does garbage collection by
812 * combining adjacent nodes. 812 * combining adjacent nodes.
813 * 813 *
814 * returns 0 if success 814 * Returns %0 if success.
815 */ 815 */
816int cpqhp_resource_sort_and_combine(struct pci_resource **head) 816int cpqhp_resource_sort_and_combine(struct pci_resource **head)
817{ 817{
@@ -951,9 +951,9 @@ irqreturn_t cpqhp_ctrl_intr(int IRQ, void *data)
951 951
952/** 952/**
953 * cpqhp_slot_create - Creates a node and adds it to the proper bus. 953 * cpqhp_slot_create - Creates a node and adds it to the proper bus.
954 * @busnumber - bus where new node is to be located 954 * @busnumber: bus where new node is to be located
955 * 955 *
956 * Returns pointer to the new node or NULL if unsuccessful 956 * Returns pointer to the new node or %NULL if unsuccessful.
957 */ 957 */
958struct pci_func *cpqhp_slot_create(u8 busnumber) 958struct pci_func *cpqhp_slot_create(u8 busnumber)
959{ 959{
@@ -986,7 +986,7 @@ struct pci_func *cpqhp_slot_create(u8 busnumber)
986 * slot_remove - Removes a node from the linked list of slots. 986 * slot_remove - Removes a node from the linked list of slots.
987 * @old_slot: slot to remove 987 * @old_slot: slot to remove
988 * 988 *
989 * Returns 0 if successful, !0 otherwise. 989 * Returns %0 if successful, !0 otherwise.
990 */ 990 */
991static int slot_remove(struct pci_func * old_slot) 991static int slot_remove(struct pci_func * old_slot)
992{ 992{
@@ -1026,7 +1026,7 @@ static int slot_remove(struct pci_func * old_slot)
1026 * bridge_slot_remove - Removes a node from the linked list of slots. 1026 * bridge_slot_remove - Removes a node from the linked list of slots.
1027 * @bridge: bridge to remove 1027 * @bridge: bridge to remove
1028 * 1028 *
1029 * Returns 0 if successful, !0 otherwise. 1029 * Returns %0 if successful, !0 otherwise.
1030 */ 1030 */
1031static int bridge_slot_remove(struct pci_func *bridge) 1031static int bridge_slot_remove(struct pci_func *bridge)
1032{ 1032{
@@ -1071,7 +1071,7 @@ out:
1071 * cpqhp_slot_find - Looks for a node by bus, and device, multiple functions accessed 1071 * cpqhp_slot_find - Looks for a node by bus, and device, multiple functions accessed
1072 * @bus: bus to find 1072 * @bus: bus to find
1073 * @device: device to find 1073 * @device: device to find
1074 * @index: is 0 for first function found, 1 for the second... 1074 * @index: is %0 for first function found, %1 for the second...
1075 * 1075 *
1076 * Returns pointer to the node if successful, %NULL otherwise. 1076 * Returns pointer to the node if successful, %NULL otherwise.
1077 */ 1077 */
@@ -1115,16 +1115,13 @@ static int is_bridge(struct pci_func * func)
1115 1115
1116 1116
1117/** 1117/**
1118 * set_controller_speed - set the frequency and/or mode of a specific 1118 * set_controller_speed - set the frequency and/or mode of a specific controller segment.
1119 * controller segment.
1120 *
1121 * @ctrl: controller to change frequency/mode for. 1119 * @ctrl: controller to change frequency/mode for.
1122 * @adapter_speed: the speed of the adapter we want to match. 1120 * @adapter_speed: the speed of the adapter we want to match.
1123 * @hp_slot: the slot number where the adapter is installed. 1121 * @hp_slot: the slot number where the adapter is installed.
1124 * 1122 *
1125 * Returns 0 if we successfully change frequency and/or mode to match the 1123 * Returns %0 if we successfully change frequency and/or mode to match the
1126 * adapter speed. 1124 * adapter speed.
1127 *
1128 */ 1125 */
1129static u8 set_controller_speed(struct controller *ctrl, u8 adapter_speed, u8 hp_slot) 1126static u8 set_controller_speed(struct controller *ctrl, u8 adapter_speed, u8 hp_slot)
1130{ 1127{
@@ -1253,13 +1250,14 @@ static u8 set_controller_speed(struct controller *ctrl, u8 adapter_speed, u8 hp_
1253 1250
1254/** 1251/**
1255 * board_replaced - Called after a board has been replaced in the system. 1252 * board_replaced - Called after a board has been replaced in the system.
1253 * @func: PCI device/function information
1254 * @ctrl: hotplug controller
1256 * 1255 *
1257 * This is only used if we don't have resources for hot add 1256 * This is only used if we don't have resources for hot add.
1258 * Turns power on for the board 1257 * Turns power on for the board.
1259 * Checks to see if board is the same 1258 * Checks to see if board is the same.
1260 * If board is same, reconfigures it 1259 * If board is same, reconfigures it.
1261 * If board isn't same, turns it back off. 1260 * If board isn't same, turns it back off.
1262 *
1263 */ 1261 */
1264static u32 board_replaced(struct pci_func *func, struct controller *ctrl) 1262static u32 board_replaced(struct pci_func *func, struct controller *ctrl)
1265{ 1263{
@@ -1403,10 +1401,11 @@ static u32 board_replaced(struct pci_func *func, struct controller *ctrl)
1403 1401
1404/** 1402/**
1405 * board_added - Called after a board has been added to the system. 1403 * board_added - Called after a board has been added to the system.
1404 * @func: PCI device/function info
1405 * @ctrl: hotplug controller
1406 * 1406 *
1407 * Turns power on for the board 1407 * Turns power on for the board.
1408 * Configures board 1408 * Configures board.
1409 *
1410 */ 1409 */
1411static u32 board_added(struct pci_func *func, struct controller *ctrl) 1410static u32 board_added(struct pci_func *func, struct controller *ctrl)
1412{ 1411{
@@ -1607,8 +1606,10 @@ static u32 board_added(struct pci_func *func, struct controller *ctrl)
1607 1606
1608 1607
1609/** 1608/**
1610 * remove_board - Turns off slot and LED's 1609 * remove_board - Turns off slot and LEDs
1611 * 1610 * @func: PCI device/function info
1611 * @replace_flag: whether replacing or adding a new device
1612 * @ctrl: target controller
1612 */ 1613 */
1613static u32 remove_board(struct pci_func * func, u32 replace_flag, struct controller * ctrl) 1614static u32 remove_board(struct pci_func * func, u32 replace_flag, struct controller * ctrl)
1614{ 1615{
@@ -1902,11 +1903,11 @@ static void interrupt_event_handler(struct controller *ctrl)
1902 1903
1903 1904
1904/** 1905/**
1905 * cpqhp_pushbutton_thread 1906 * cpqhp_pushbutton_thread - handle pushbutton events
1907 * @slot: target slot (struct)
1906 * 1908 *
1907 * Scheduled procedure to handle blocking stuff for the pushbuttons 1909 * Scheduled procedure to handle blocking stuff for the pushbuttons.
1908 * Handles all pending events and exits. 1910 * Handles all pending events and exits.
1909 *
1910 */ 1911 */
1911void cpqhp_pushbutton_thread(unsigned long slot) 1912void cpqhp_pushbutton_thread(unsigned long slot)
1912{ 1913{
@@ -2137,9 +2138,10 @@ int cpqhp_process_SS(struct controller *ctrl, struct pci_func *func)
2137} 2138}
2138 2139
2139/** 2140/**
2140 * switch_leds: switch the leds, go from one site to the other. 2141 * switch_leds - switch the leds, go from one site to the other.
2141 * @ctrl: controller to use 2142 * @ctrl: controller to use
2142 * @num_of_slots: number of slots to use 2143 * @num_of_slots: number of slots to use
2144 * @work_LED: LED control value
2143 * @direction: 1 to start from the left side, 0 to start right. 2145 * @direction: 1 to start from the left side, 0 to start right.
2144 */ 2146 */
2145static void switch_leds(struct controller *ctrl, const int num_of_slots, 2147static void switch_leds(struct controller *ctrl, const int num_of_slots,
@@ -2165,11 +2167,11 @@ static void switch_leds(struct controller *ctrl, const int num_of_slots,
2165} 2167}
2166 2168
2167/** 2169/**
2168 * hardware_test - runs hardware tests 2170 * cpqhp_hardware_test - runs hardware tests
2171 * @ctrl: target controller
2172 * @test_num: the number written to the "test" file in sysfs.
2169 * 2173 *
2170 * For hot plug ctrl folks to play with. 2174 * For hot plug ctrl folks to play with.
2171 * test_num is the number written to the "test" file in sysfs
2172 *
2173 */ 2175 */
2174int cpqhp_hardware_test(struct controller *ctrl, int test_num) 2176int cpqhp_hardware_test(struct controller *ctrl, int test_num)
2175{ 2177{
@@ -2249,14 +2251,12 @@ int cpqhp_hardware_test(struct controller *ctrl, int test_num)
2249 2251
2250/** 2252/**
2251 * configure_new_device - Configures the PCI header information of one board. 2253 * configure_new_device - Configures the PCI header information of one board.
2252 *
2253 * @ctrl: pointer to controller structure 2254 * @ctrl: pointer to controller structure
2254 * @func: pointer to function structure 2255 * @func: pointer to function structure
2255 * @behind_bridge: 1 if this is a recursive call, 0 if not 2256 * @behind_bridge: 1 if this is a recursive call, 0 if not
2256 * @resources: pointer to set of resource lists 2257 * @resources: pointer to set of resource lists
2257 * 2258 *
2258 * Returns 0 if success 2259 * Returns 0 if success.
2259 *
2260 */ 2260 */
2261static u32 configure_new_device(struct controller * ctrl, struct pci_func * func, 2261static u32 configure_new_device(struct controller * ctrl, struct pci_func * func,
2262 u8 behind_bridge, struct resource_lists * resources) 2262 u8 behind_bridge, struct resource_lists * resources)
@@ -2346,15 +2346,13 @@ static u32 configure_new_device(struct controller * ctrl, struct pci_func * func
2346 2346
2347/** 2347/**
2348 * configure_new_function - Configures the PCI header information of one device 2348 * configure_new_function - Configures the PCI header information of one device
2349 *
2350 * @ctrl: pointer to controller structure 2349 * @ctrl: pointer to controller structure
2351 * @func: pointer to function structure 2350 * @func: pointer to function structure
2352 * @behind_bridge: 1 if this is a recursive call, 0 if not 2351 * @behind_bridge: 1 if this is a recursive call, 0 if not
2353 * @resources: pointer to set of resource lists 2352 * @resources: pointer to set of resource lists
2354 * 2353 *
2355 * Calls itself recursively for bridged devices. 2354 * Calls itself recursively for bridged devices.
2356 * Returns 0 if success 2355 * Returns 0 if success.
2357 *
2358 */ 2356 */
2359static int configure_new_function(struct controller *ctrl, struct pci_func *func, 2357static int configure_new_function(struct controller *ctrl, struct pci_func *func,
2360 u8 behind_bridge, 2358 u8 behind_bridge,
diff --git a/drivers/pci/hotplug/fakephp.c b/drivers/pci/hotplug/fakephp.c
index 027f6865d7e3..d7a293e3faf5 100644
--- a/drivers/pci/hotplug/fakephp.c
+++ b/drivers/pci/hotplug/fakephp.c
@@ -165,11 +165,11 @@ static void remove_slot(struct dummy_slot *dslot)
165} 165}
166 166
167/** 167/**
168 * Rescan slot. 168 * pci_rescan_slot - Rescan slot
169 * Tries hard not to re-enable already existing devices 169 * @temp: Device template. Should be set: bus and devfn.
170 * also handles scanning of subfunctions
171 * 170 *
172 * @param temp Device template. Should be set: bus and devfn. 171 * Tries hard not to re-enable already existing devices;
172 * also handles scanning of subfunctions.
173 */ 173 */
174static void pci_rescan_slot(struct pci_dev *temp) 174static void pci_rescan_slot(struct pci_dev *temp)
175{ 175{
@@ -229,10 +229,10 @@ static void pci_rescan_slot(struct pci_dev *temp)
229 229
230 230
231/** 231/**
232 * Rescan PCI bus. 232 * pci_rescan_bus - Rescan PCI bus
233 * call pci_rescan_slot for each possible function of the bus 233 * @bus: the PCI bus to rescan
234 * 234 *
235 * @param bus 235 * Call pci_rescan_slot for each possible function of the bus.
236 */ 236 */
237static void pci_rescan_bus(const struct pci_bus *bus) 237static void pci_rescan_bus(const struct pci_bus *bus)
238{ 238{
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c
index c8cb49c5a752..f1e0966cee95 100644
--- a/drivers/pci/hotplug/pciehp_ctrl.c
+++ b/drivers/pci/hotplug/pciehp_ctrl.c
@@ -208,10 +208,10 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot)
208 208
209/** 209/**
210 * board_added - Called after a board has been added to the system. 210 * board_added - Called after a board has been added to the system.
211 * @p_slot: &slot where board is added
211 * 212 *
212 * Turns power on for the board 213 * Turns power on for the board.
213 * Configures board 214 * Configures board.
214 *
215 */ 215 */
216static int board_added(struct slot *p_slot) 216static int board_added(struct slot *p_slot)
217{ 217{
@@ -276,8 +276,8 @@ err_exit:
276} 276}
277 277
278/** 278/**
279 * remove_board - Turns off slot and LED's 279 * remove_board - Turns off slot and LEDs
280 * 280 * @p_slot: slot where board is being removed
281 */ 281 */
282static int remove_board(struct slot *p_slot) 282static int remove_board(struct slot *p_slot)
283{ 283{
@@ -319,11 +319,11 @@ struct power_work_info {
319}; 319};
320 320
321/** 321/**
322 * pciehp_pushbutton_thread 322 * pciehp_power_thread - handle pushbutton events
323 * @work: &struct work_struct describing work to be done
323 * 324 *
324 * Scheduled procedure to handle blocking stuff for the pushbuttons 325 * Scheduled procedure to handle blocking stuff for the pushbuttons.
325 * Handles all pending events and exits. 326 * Handles all pending events and exits.
326 *
327 */ 327 */
328static void pciehp_power_thread(struct work_struct *work) 328static void pciehp_power_thread(struct work_struct *work)
329{ 329{
diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c
index deb6b5e35feb..b169b0e2647f 100644
--- a/drivers/pci/hotplug/rpadlpar_core.c
+++ b/drivers/pci/hotplug/rpadlpar_core.c
@@ -100,6 +100,7 @@ static struct device_node *find_dlpar_node(char *drc_name, int *node_type)
100 100
101/** 101/**
102 * find_php_slot - return hotplug slot structure for device node 102 * find_php_slot - return hotplug slot structure for device node
103 * @dn: target &device_node
103 * 104 *
104 * This routine will return the hotplug slot structure 105 * This routine will return the hotplug slot structure
105 * for a given device node. Note that built-in PCI slots 106 * for a given device node. Note that built-in PCI slots
@@ -293,9 +294,8 @@ static int dlpar_add_vio_slot(char *drc_name, struct device_node *dn)
293 * dlpar_add_slot - DLPAR add an I/O Slot 294 * dlpar_add_slot - DLPAR add an I/O Slot
294 * @drc_name: drc-name of newly added slot 295 * @drc_name: drc-name of newly added slot
295 * 296 *
296 * Make the hotplug module and the kernel aware 297 * Make the hotplug module and the kernel aware of a newly added I/O Slot.
297 * of a newly added I/O Slot. 298 * Return Codes:
298 * Return Codes -
299 * 0 Success 299 * 0 Success
300 * -ENODEV Not a valid drc_name 300 * -ENODEV Not a valid drc_name
301 * -EINVAL Slot already added 301 * -EINVAL Slot already added
@@ -339,9 +339,9 @@ exit:
339/** 339/**
340 * dlpar_remove_vio_slot - DLPAR remove a virtual I/O Slot 340 * dlpar_remove_vio_slot - DLPAR remove a virtual I/O Slot
341 * @drc_name: drc-name of newly added slot 341 * @drc_name: drc-name of newly added slot
342 * @dn: &device_node
342 * 343 *
343 * Remove the kernel and hotplug representations 344 * Remove the kernel and hotplug representations of an I/O Slot.
344 * of an I/O Slot.
345 * Return Codes: 345 * Return Codes:
346 * 0 Success 346 * 0 Success
347 * -EINVAL Vio dev doesn't exist 347 * -EINVAL Vio dev doesn't exist
@@ -359,11 +359,11 @@ static int dlpar_remove_vio_slot(char *drc_name, struct device_node *dn)
359} 359}
360 360
361/** 361/**
362 * dlpar_remove_slot - DLPAR remove a PCI I/O Slot 362 * dlpar_remove_pci_slot - DLPAR remove a PCI I/O Slot
363 * @drc_name: drc-name of newly added slot 363 * @drc_name: drc-name of newly added slot
364 * @dn: &device_node
364 * 365 *
365 * Remove the kernel and hotplug representations 366 * Remove the kernel and hotplug representations of a PCI I/O Slot.
366 * of a PCI I/O Slot.
367 * Return Codes: 367 * Return Codes:
368 * 0 Success 368 * 0 Success
369 * -ENODEV Not a valid drc_name 369 * -ENODEV Not a valid drc_name
@@ -405,8 +405,7 @@ int dlpar_remove_pci_slot(char *drc_name, struct device_node *dn)
405 * dlpar_remove_slot - DLPAR remove an I/O Slot 405 * dlpar_remove_slot - DLPAR remove an I/O Slot
406 * @drc_name: drc-name of newly added slot 406 * @drc_name: drc-name of newly added slot
407 * 407 *
408 * Remove the kernel and hotplug representations 408 * Remove the kernel and hotplug representations of an I/O Slot.
409 * of an I/O Slot.
410 * Return Codes: 409 * Return Codes:
411 * 0 Success 410 * 0 Success
412 * -ENODEV Not a valid drc_name 411 * -ENODEV Not a valid drc_name
diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c
index 458c08ef2654..58f1a9927709 100644
--- a/drivers/pci/hotplug/rpaphp_core.c
+++ b/drivers/pci/hotplug/rpaphp_core.c
@@ -54,10 +54,12 @@ module_param(debug, bool, 0644);
54 54
55/** 55/**
56 * set_attention_status - set attention LED 56 * set_attention_status - set attention LED
57 * @hotplug_slot: target &hotplug_slot
58 * @value: LED control value
59 *
57 * echo 0 > attention -- set LED OFF 60 * echo 0 > attention -- set LED OFF
58 * echo 1 > attention -- set LED ON 61 * echo 1 > attention -- set LED ON
59 * echo 2 > attention -- set LED ID(identify, light is blinking) 62 * echo 2 > attention -- set LED ID(identify, light is blinking)
60 *
61 */ 63 */
62static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 value) 64static int set_attention_status(struct hotplug_slot *hotplug_slot, u8 value)
63{ 65{
@@ -99,6 +101,8 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 * value)
99 101
100/** 102/**
101 * get_attention_status - get attention LED status 103 * get_attention_status - get attention LED status
104 * @hotplug_slot: slot to get status
105 * @value: pointer to store status
102 */ 106 */
103static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 * value) 107static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 * value)
104{ 108{
@@ -254,6 +258,11 @@ static int is_php_type(char *drc_type)
254 258
255/** 259/**
256 * is_php_dn() - return 1 if this is a hotpluggable pci slot, else 0 260 * is_php_dn() - return 1 if this is a hotpluggable pci slot, else 0
261 * @dn: target &device_node
262 * @indexes: passed to get_children_props()
263 * @names: passed to get_children_props()
264 * @types: returned from get_children_props()
265 * @power_domains:
257 * 266 *
258 * This routine will return true only if the device node is 267 * This routine will return true only if the device node is
259 * a hotpluggable slot. This routine will return false 268 * a hotpluggable slot. This routine will return false
@@ -279,7 +288,7 @@ static int is_php_dn(struct device_node *dn, const int **indexes,
279 288
280/** 289/**
281 * rpaphp_add_slot -- declare a hotplug slot to the hotplug subsystem. 290 * rpaphp_add_slot -- declare a hotplug slot to the hotplug subsystem.
282 * @dn device node of slot 291 * @dn: device node of slot
283 * 292 *
284 * This subroutine will register a hotplugable slot with the 293 * This subroutine will register a hotplugable slot with the
285 * PCI hotplug infrastructure. This routine is typicaly called 294 * PCI hotplug infrastructure. This routine is typicaly called
@@ -291,7 +300,7 @@ static int is_php_dn(struct device_node *dn, const int **indexes,
291 * routine will just return without doing anything, since embedded 300 * routine will just return without doing anything, since embedded
292 * slots cannot be hotplugged. 301 * slots cannot be hotplugged.
293 * 302 *
294 * To remove a slot, it suffices to call rpaphp_deregister_slot() 303 * To remove a slot, it suffices to call rpaphp_deregister_slot().
295 */ 304 */
296int rpaphp_add_slot(struct device_node *dn) 305int rpaphp_add_slot(struct device_node *dn)
297{ 306{
diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c
index 54ca8650d511..0de84533cd80 100644
--- a/drivers/pci/hotplug/rpaphp_pci.c
+++ b/drivers/pci/hotplug/rpaphp_pci.c
@@ -79,6 +79,7 @@ static void set_slot_name(struct slot *slot)
79 79
80/** 80/**
81 * rpaphp_enable_slot - record slot state, config pci device 81 * rpaphp_enable_slot - record slot state, config pci device
82 * @slot: target &slot
82 * 83 *
83 * Initialize values in the slot, and the hotplug_slot info 84 * Initialize values in the slot, and the hotplug_slot info
84 * structures to indicate if there is a pci card plugged into 85 * structures to indicate if there is a pci card plugged into
diff --git a/drivers/pci/hotplug/shpchp_ctrl.c b/drivers/pci/hotplug/shpchp_ctrl.c
index d2fc35598cdd..eb5cac6f08ae 100644
--- a/drivers/pci/hotplug/shpchp_ctrl.c
+++ b/drivers/pci/hotplug/shpchp_ctrl.c
@@ -231,10 +231,10 @@ static int fix_bus_speed(struct controller *ctrl, struct slot *pslot,
231 231
232/** 232/**
233 * board_added - Called after a board has been added to the system. 233 * board_added - Called after a board has been added to the system.
234 * @p_slot: target &slot
234 * 235 *
235 * Turns power on for the board 236 * Turns power on for the board.
236 * Configures board 237 * Configures board.
237 *
238 */ 238 */
239static int board_added(struct slot *p_slot) 239static int board_added(struct slot *p_slot)
240{ 240{
@@ -350,8 +350,8 @@ err_exit:
350 350
351 351
352/** 352/**
353 * remove_board - Turns off slot and LED's 353 * remove_board - Turns off slot and LEDs
354 * 354 * @p_slot: target &slot
355 */ 355 */
356static int remove_board(struct slot *p_slot) 356static int remove_board(struct slot *p_slot)
357{ 357{
@@ -397,11 +397,11 @@ struct pushbutton_work_info {
397}; 397};
398 398
399/** 399/**
400 * shpchp_pushbutton_thread 400 * shpchp_pushbutton_thread - handle pushbutton events
401 * @work: &struct work_struct to be handled
401 * 402 *
402 * Scheduled procedure to handle blocking stuff for the pushbuttons 403 * Scheduled procedure to handle blocking stuff for the pushbuttons.
403 * Handles all pending events and exits. 404 * Handles all pending events and exits.
404 *
405 */ 405 */
406static void shpchp_pushbutton_thread(struct work_struct *work) 406static void shpchp_pushbutton_thread(struct work_struct *work)
407{ 407{
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 1b7b2812bf2d..7d1877341aad 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -702,8 +702,10 @@ static int __init pci_sysfs_init(void)
702 sysfs_initialized = 1; 702 sysfs_initialized = 1;
703 for_each_pci_dev(pdev) { 703 for_each_pci_dev(pdev) {
704 retval = pci_create_sysfs_dev_files(pdev); 704 retval = pci_create_sysfs_dev_files(pdev);
705 if (retval) 705 if (retval) {
706 pci_dev_put(pdev);
706 return retval; 707 return retval;
708 }
707 } 709 }
708 710
709 return 0; 711 return 0;
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c
index 92a8469b21ba..3c0d8d138f5a 100644
--- a/drivers/pci/pcie/aer/aerdrv_core.c
+++ b/drivers/pci/pcie/aer/aerdrv_core.c
@@ -168,11 +168,11 @@ static int find_device_iter(struct device *device, void *data)
168 168
169/** 169/**
170 * find_source_device - search through device hierarchy for source device 170 * find_source_device - search through device hierarchy for source device
171 * @p_dev: pointer to Root Port pci_dev data structure 171 * @parent: pointer to Root Port pci_dev data structure
172 * @id: device ID of agent who sends an error message to this Root Port 172 * @id: device ID of agent who sends an error message to this Root Port
173 * 173 *
174 * Invoked when error is detected at the Root Port. 174 * Invoked when error is detected at the Root Port.
175 **/ 175 */
176static struct device* find_source_device(struct pci_dev *parent, u16 id) 176static struct device* find_source_device(struct pci_dev *parent, u16 id)
177{ 177{
178 struct pci_dev *dev = parent; 178 struct pci_dev *dev = parent;
@@ -286,14 +286,15 @@ static void report_resume(struct pci_dev *dev, void *data)
286 286
287/** 287/**
288 * broadcast_error_message - handle message broadcast to downstream drivers 288 * broadcast_error_message - handle message broadcast to downstream drivers
289 * @device: pointer to from where in a hierarchy message is broadcasted down 289 * @dev: pointer to from where in a hierarchy message is broadcasted down
290 * @api: callback to be broadcasted
291 * @state: error state 290 * @state: error state
291 * @error_mesg: message to print
292 * @cb: callback to be broadcasted
292 * 293 *
293 * Invoked during error recovery process. Once being invoked, the content 294 * Invoked during error recovery process. Once being invoked, the content
294 * of error severity will be broadcasted to all downstream drivers in a 295 * of error severity will be broadcasted to all downstream drivers in a
295 * hierarchy in question. 296 * hierarchy in question.
296 **/ 297 */
297static pci_ers_result_t broadcast_error_message(struct pci_dev *dev, 298static pci_ers_result_t broadcast_error_message(struct pci_dev *dev,
298 enum pci_channel_state state, 299 enum pci_channel_state state,
299 char *error_mesg, 300 char *error_mesg,
@@ -428,7 +429,7 @@ static pci_ers_result_t reset_link(struct pcie_device *aerdev,
428 * Invoked when an error is nonfatal/fatal. Once being invoked, broadcast 429 * Invoked when an error is nonfatal/fatal. Once being invoked, broadcast
429 * error detected message to all downstream drivers within a hierarchy in 430 * error detected message to all downstream drivers within a hierarchy in
430 * question and return the returned code. 431 * question and return the returned code.
431 **/ 432 */
432static pci_ers_result_t do_recovery(struct pcie_device *aerdev, 433static pci_ers_result_t do_recovery(struct pcie_device *aerdev,
433 struct pci_dev *dev, 434 struct pci_dev *dev,
434 int severity) 435 int severity)
@@ -488,7 +489,7 @@ static pci_ers_result_t do_recovery(struct pcie_device *aerdev,
488 * @info: comprehensive error information 489 * @info: comprehensive error information
489 * 490 *
490 * Invoked when an error being detected by Root Port. 491 * Invoked when an error being detected by Root Port.
491 **/ 492 */
492static void handle_error_source(struct pcie_device * aerdev, 493static void handle_error_source(struct pcie_device * aerdev,
493 struct pci_dev *dev, 494 struct pci_dev *dev,
494 struct aer_err_info info) 495 struct aer_err_info info)
@@ -521,7 +522,7 @@ static void handle_error_source(struct pcie_device * aerdev,
521 * @rpc: pointer to a Root Port data structure 522 * @rpc: pointer to a Root Port data structure
522 * 523 *
523 * Invoked when PCIE bus loads AER service driver. 524 * Invoked when PCIE bus loads AER service driver.
524 **/ 525 */
525void aer_enable_rootport(struct aer_rpc *rpc) 526void aer_enable_rootport(struct aer_rpc *rpc)
526{ 527{
527 struct pci_dev *pdev = rpc->rpd->port; 528 struct pci_dev *pdev = rpc->rpd->port;
@@ -569,7 +570,7 @@ void aer_enable_rootport(struct aer_rpc *rpc)
569 * @rpc: pointer to a Root Port data structure 570 * @rpc: pointer to a Root Port data structure
570 * 571 *
571 * Invoked when PCIE bus unloads AER service driver. 572 * Invoked when PCIE bus unloads AER service driver.
572 **/ 573 */
573static void disable_root_aer(struct aer_rpc *rpc) 574static void disable_root_aer(struct aer_rpc *rpc)
574{ 575{
575 struct pci_dev *pdev = rpc->rpd->port; 576 struct pci_dev *pdev = rpc->rpd->port;
@@ -590,7 +591,7 @@ static void disable_root_aer(struct aer_rpc *rpc)
590 * @rpc: pointer to the root port which holds an error 591 * @rpc: pointer to the root port which holds an error
591 * 592 *
592 * Invoked by DPC handler to consume an error. 593 * Invoked by DPC handler to consume an error.
593 **/ 594 */
594static struct aer_err_source* get_e_source(struct aer_rpc *rpc) 595static struct aer_err_source* get_e_source(struct aer_rpc *rpc)
595{ 596{
596 struct aer_err_source *e_source; 597 struct aer_err_source *e_source;
@@ -655,7 +656,7 @@ static int get_device_error_info(struct pci_dev *dev, struct aer_err_info *info)
655 * aer_isr_one_error - consume an error detected by root port 656 * aer_isr_one_error - consume an error detected by root port
656 * @p_device: pointer to error root port service device 657 * @p_device: pointer to error root port service device
657 * @e_src: pointer to an error source 658 * @e_src: pointer to an error source
658 **/ 659 */
659static void aer_isr_one_error(struct pcie_device *p_device, 660static void aer_isr_one_error(struct pcie_device *p_device,
660 struct aer_err_source *e_src) 661 struct aer_err_source *e_src)
661{ 662{
@@ -706,7 +707,7 @@ static void aer_isr_one_error(struct pcie_device *p_device,
706 * @work: definition of this work item 707 * @work: definition of this work item
707 * 708 *
708 * Invoked, as DPC, when root port records new detected error 709 * Invoked, as DPC, when root port records new detected error
709 **/ 710 */
710void aer_isr(struct work_struct *work) 711void aer_isr(struct work_struct *work)
711{ 712{
712 struct aer_rpc *rpc = container_of(work, struct aer_rpc, dpc_handler); 713 struct aer_rpc *rpc = container_of(work, struct aer_rpc, dpc_handler);
@@ -729,7 +730,7 @@ void aer_isr(struct work_struct *work)
729 * @rpc: pointer to a root port device being deleted 730 * @rpc: pointer to a root port device being deleted
730 * 731 *
731 * Invoked when AER service unloaded on a specific Root Port 732 * Invoked when AER service unloaded on a specific Root Port
732 **/ 733 */
733void aer_delete_rootport(struct aer_rpc *rpc) 734void aer_delete_rootport(struct aer_rpc *rpc)
734{ 735{
735 /* Disable root port AER itself */ 736 /* Disable root port AER itself */
@@ -743,7 +744,7 @@ void aer_delete_rootport(struct aer_rpc *rpc)
743 * @dev: pointer to AER pcie device 744 * @dev: pointer to AER pcie device
744 * 745 *
745 * Invoked when AER service driver is loaded. 746 * Invoked when AER service driver is loaded.
746 **/ 747 */
747int aer_init(struct pcie_device *dev) 748int aer_init(struct pcie_device *dev)
748{ 749{
749 if (aer_osc_setup(dev) && !forceload) 750 if (aer_osc_setup(dev) && !forceload)
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index df383645e366..26057f98f72e 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -217,7 +217,7 @@ static int slot_reset_iter(struct device *device, void *data)
217 217
218static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) 218static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev)
219{ 219{
220 pci_ers_result_t status; 220 pci_ers_result_t status = PCI_ERS_RESULT_NONE;
221 int retval; 221 int retval;
222 222
223 /* If fatal, restore cfg space for possible link reset at upstream */ 223 /* If fatal, restore cfg space for possible link reset at upstream */