aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorLinas Vepstas <linas@austin.ibm.com>2006-09-15 19:56:35 -0400
committerPaul Mackerras <paulus@samba.org>2006-09-21 08:59:10 -0400
commitcb5b562444c27cf53f5d297bd7a89807ea614cf3 (patch)
tree462b0ed5aad52c2595dc6f906eaf6e82919bd0da /arch/powerpc
parentaf525592187951a595c73de11b48969a13b5d5a3 (diff)
[POWERPC] EEH: code comment cleanup
Clean up subroutine documentation; mostly formatting changes, with some new content. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c19
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c27
2 files changed, 35 insertions, 11 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index 5a23ce5e16ff..fb91842fc819 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -449,7 +449,11 @@ EXPORT_SYMBOL(eeh_check_failure);
449/* ------------------------------------------------------------- */ 449/* ------------------------------------------------------------- */
450/* The code below deals with error recovery */ 450/* The code below deals with error recovery */
451 451
452/** Return negative value if a permanent error, else return 452/**
453 * eeh_slot_availability - returns error status of slot
454 * @pdn pci device node
455 *
456 * Return negative value if a permanent error, else return
453 * a number of milliseconds to wait until the PCI slot is 457 * a number of milliseconds to wait until the PCI slot is
454 * ready to be used. 458 * ready to be used.
455 */ 459 */
@@ -477,8 +481,10 @@ eeh_slot_availability(struct pci_dn *pdn)
477 return -1; 481 return -1;
478} 482}
479 483
480/** rtas_pci_slot_reset raises/lowers the pci #RST line 484/**
481 * state: 1/0 to raise/lower the #RST 485 * rtas_pci_slot_reset - raises/lowers the pci #RST line
486 * @pdn pci device node
487 * @state: 1/0 to raise/lower the #RST
482 * 488 *
483 * Clear the EEH-frozen condition on a slot. This routine 489 * Clear the EEH-frozen condition on a slot. This routine
484 * asserts the PCI #RST line if the 'state' argument is '1', 490 * asserts the PCI #RST line if the 'state' argument is '1',
@@ -518,8 +524,9 @@ rtas_pci_slot_reset(struct pci_dn *pdn, int state)
518 } 524 }
519} 525}
520 526
521/** rtas_set_slot_reset -- assert the pci #RST line for 1/4 second 527/**
522 * dn -- device node to be reset. 528 * rtas_set_slot_reset -- assert the pci #RST line for 1/4 second
529 * @pdn: pci device node to be reset.
523 * 530 *
524 * Return 0 if success, else a non-zero value. 531 * Return 0 if success, else a non-zero value.
525 */ 532 */
@@ -582,6 +589,8 @@ rtas_set_slot_reset(struct pci_dn *pdn)
582 589
583/** 590/**
584 * __restore_bars - Restore the Base Address Registers 591 * __restore_bars - Restore the Base Address Registers
592 * @pdn: pci device node
593 *
585 * Loads the PCI configuration space base address registers, 594 * Loads the PCI configuration space base address registers,
586 * the expansion ROM base address, the latency timer, and etc. 595 * the expansion ROM base address, the latency timer, and etc.
587 * from the saved values in the device node. 596 * from the saved values in the device node.
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index 3269d2cd428b..045cd7a37339 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -77,8 +77,12 @@ static int irq_in_use(unsigned int irq)
77} 77}
78 78
79/* ------------------------------------------------------- */ 79/* ------------------------------------------------------- */
80/** eeh_report_error - report an EEH error to each device, 80/**
81 * collect up and merge the device responses. 81 * eeh_report_error - report pci error to each device driver
82 *
83 * Report an EEH error to each device driver, collect up and
84 * merge the device driver responses. Cumulative response
85 * passed back in "userdata".
82 */ 86 */
83 87
84static void eeh_report_error(struct pci_dev *dev, void *userdata) 88static void eeh_report_error(struct pci_dev *dev, void *userdata)
@@ -108,8 +112,8 @@ static void eeh_report_error(struct pci_dev *dev, void *userdata)
108 rc == PCI_ERS_RESULT_NEED_RESET) *res = rc; 112 rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
109} 113}
110 114
111/** eeh_report_reset -- tell this device that the pci slot 115/**
112 * has been reset. 116 * eeh_report_reset - tell device that slot has been reset
113 */ 117 */
114 118
115static void eeh_report_reset(struct pci_dev *dev, void *userdata) 119static void eeh_report_reset(struct pci_dev *dev, void *userdata)
@@ -132,6 +136,10 @@ static void eeh_report_reset(struct pci_dev *dev, void *userdata)
132 driver->err_handler->slot_reset(dev); 136 driver->err_handler->slot_reset(dev);
133} 137}
134 138
139/**
140 * eeh_report_resume - tell device to resume normal operations
141 */
142
135static void eeh_report_resume(struct pci_dev *dev, void *userdata) 143static void eeh_report_resume(struct pci_dev *dev, void *userdata)
136{ 144{
137 struct pci_driver *driver = dev->driver; 145 struct pci_driver *driver = dev->driver;
@@ -148,6 +156,13 @@ static void eeh_report_resume(struct pci_dev *dev, void *userdata)
148 driver->err_handler->resume(dev); 156 driver->err_handler->resume(dev);
149} 157}
150 158
159/**
160 * eeh_report_failure - tell device driver that device is dead.
161 *
162 * This informs the device driver that the device is permanently
163 * dead, and that no further recovery attempts will be made on it.
164 */
165
151static void eeh_report_failure(struct pci_dev *dev, void *userdata) 166static void eeh_report_failure(struct pci_dev *dev, void *userdata)
152{ 167{
153 struct pci_driver *driver = dev->driver; 168 struct pci_driver *driver = dev->driver;
@@ -190,11 +205,11 @@ static void eeh_report_failure(struct pci_dev *dev, void *userdata)
190 205
191/** 206/**
192 * eeh_reset_device() -- perform actual reset of a pci slot 207 * eeh_reset_device() -- perform actual reset of a pci slot
193 * Args: bus: pointer to the pci bus structure corresponding 208 * @bus: pointer to the pci bus structure corresponding
194 * to the isolated slot. A non-null value will 209 * to the isolated slot. A non-null value will
195 * cause all devices under the bus to be removed 210 * cause all devices under the bus to be removed
196 * and then re-added. 211 * and then re-added.
197 * pe_dn: pointer to a "Partionable Endpoint" device node. 212 * @pe_dn: pointer to a "Partionable Endpoint" device node.
198 * This is the top-level structure on which pci 213 * This is the top-level structure on which pci
199 * bus resets can be performed. 214 * bus resets can be performed.
200 */ 215 */