aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_3990_erp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/block/dasd_3990_erp.c')
-rw-r--r--drivers/s390/block/dasd_3990_erp.c189
1 files changed, 85 insertions, 104 deletions
diff --git a/drivers/s390/block/dasd_3990_erp.c b/drivers/s390/block/dasd_3990_erp.c
index 2ed51562319e..669805d4402d 100644
--- a/drivers/s390/block/dasd_3990_erp.c
+++ b/drivers/s390/block/dasd_3990_erp.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * File...........: linux/drivers/s390/block/dasd_3990_erp.c 2 * File...........: linux/drivers/s390/block/dasd_3990_erp.c
3 * Author(s)......: Horst Hummel <Horst.Hummel@de.ibm.com> 3 * Author(s)......: Horst Hummel <Horst.Hummel@de.ibm.com>
4 * Holger Smolinski <Holger.Smolinski@de.ibm.com> 4 * Holger Smolinski <Holger.Smolinski@de.ibm.com>
5 * Bugreports.to..: <Linux390@de.ibm.com> 5 * Bugreports.to..: <Linux390@de.ibm.com>
6 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 2000, 2001 6 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 2000, 2001
@@ -25,23 +25,23 @@ struct DCTL_data {
25} __attribute__ ((packed)); 25} __attribute__ ((packed));
26 26
27/* 27/*
28 ***************************************************************************** 28 *****************************************************************************
29 * SECTION ERP EXAMINATION 29 * SECTION ERP EXAMINATION
30 ***************************************************************************** 30 *****************************************************************************
31 */ 31 */
32 32
33/* 33/*
34 * DASD_3990_ERP_EXAMINE_24 34 * DASD_3990_ERP_EXAMINE_24
35 * 35 *
36 * DESCRIPTION 36 * DESCRIPTION
37 * Checks only for fatal (unrecoverable) error. 37 * Checks only for fatal (unrecoverable) error.
38 * A detailed examination of the sense data is done later outside 38 * A detailed examination of the sense data is done later outside
39 * the interrupt handler. 39 * the interrupt handler.
40 * 40 *
41 * Each bit configuration leading to an action code 2 (Exit with 41 * Each bit configuration leading to an action code 2 (Exit with
42 * programming error or unusual condition indication) 42 * programming error or unusual condition indication)
43 * are handled as fatal errorīs. 43 * are handled as fatal errorīs.
44 * 44 *
45 * All other configurations are handled as recoverable errors. 45 * All other configurations are handled as recoverable errors.
46 * 46 *
47 * RETURN VALUES 47 * RETURN VALUES
@@ -93,15 +93,15 @@ dasd_3990_erp_examine_24(struct dasd_ccw_req * cqr, char *sense)
93} /* END dasd_3990_erp_examine_24 */ 93} /* END dasd_3990_erp_examine_24 */
94 94
95/* 95/*
96 * DASD_3990_ERP_EXAMINE_32 96 * DASD_3990_ERP_EXAMINE_32
97 * 97 *
98 * DESCRIPTION 98 * DESCRIPTION
99 * Checks only for fatal/no/recoverable error. 99 * Checks only for fatal/no/recoverable error.
100 * A detailed examination of the sense data is done later outside 100 * A detailed examination of the sense data is done later outside
101 * the interrupt handler. 101 * the interrupt handler.
102 * 102 *
103 * RETURN VALUES 103 * RETURN VALUES
104 * dasd_era_none no error 104 * dasd_era_none no error
105 * dasd_era_fatal for all fatal (unrecoverable errors) 105 * dasd_era_fatal for all fatal (unrecoverable errors)
106 * dasd_era_recover for recoverable others. 106 * dasd_era_recover for recoverable others.
107 */ 107 */
@@ -128,10 +128,10 @@ dasd_3990_erp_examine_32(struct dasd_ccw_req * cqr, char *sense)
128} /* end dasd_3990_erp_examine_32 */ 128} /* end dasd_3990_erp_examine_32 */
129 129
130/* 130/*
131 * DASD_3990_ERP_EXAMINE 131 * DASD_3990_ERP_EXAMINE
132 * 132 *
133 * DESCRIPTION 133 * DESCRIPTION
134 * Checks only for fatal/no/recover error. 134 * Checks only for fatal/no/recover error.
135 * A detailed examination of the sense data is done later outside 135 * A detailed examination of the sense data is done later outside
136 * the interrupt handler. 136 * the interrupt handler.
137 * 137 *
@@ -139,7 +139,7 @@ dasd_3990_erp_examine_32(struct dasd_ccw_req * cqr, char *sense)
139 * 'Chapter 7. Error Recovery Procedures'. 139 * 'Chapter 7. Error Recovery Procedures'.
140 * 140 *
141 * RETURN VALUES 141 * RETURN VALUES
142 * dasd_era_none no error 142 * dasd_era_none no error
143 * dasd_era_fatal for all fatal (unrecoverable errors) 143 * dasd_era_fatal for all fatal (unrecoverable errors)
144 * dasd_era_recover for all others. 144 * dasd_era_recover for all others.
145 */ 145 */
@@ -178,18 +178,18 @@ dasd_3990_erp_examine(struct dasd_ccw_req * cqr, struct irb * irb)
178} /* END dasd_3990_erp_examine */ 178} /* END dasd_3990_erp_examine */
179 179
180/* 180/*
181 ***************************************************************************** 181 *****************************************************************************
182 * SECTION ERP HANDLING 182 * SECTION ERP HANDLING
183 ***************************************************************************** 183 *****************************************************************************
184 */ 184 */
185/* 185/*
186 ***************************************************************************** 186 *****************************************************************************
187 * 24 and 32 byte sense ERP functions 187 * 24 and 32 byte sense ERP functions
188 ***************************************************************************** 188 *****************************************************************************
189 */ 189 */
190 190
191/* 191/*
192 * DASD_3990_ERP_CLEANUP 192 * DASD_3990_ERP_CLEANUP
193 * 193 *
194 * DESCRIPTION 194 * DESCRIPTION
195 * Removes the already build but not necessary ERP request and sets 195 * Removes the already build but not necessary ERP request and sets
@@ -197,10 +197,10 @@ dasd_3990_erp_examine(struct dasd_ccw_req * cqr, struct irb * irb)
197 * 197 *
198 * PARAMETER 198 * PARAMETER
199 * erp request to be blocked 199 * erp request to be blocked
200 * final_status either DASD_CQR_DONE or DASD_CQR_FAILED 200 * final_status either DASD_CQR_DONE or DASD_CQR_FAILED
201 * 201 *
202 * RETURN VALUES 202 * RETURN VALUES
203 * cqr original cqr 203 * cqr original cqr
204 */ 204 */
205static struct dasd_ccw_req * 205static struct dasd_ccw_req *
206dasd_3990_erp_cleanup(struct dasd_ccw_req * erp, char final_status) 206dasd_3990_erp_cleanup(struct dasd_ccw_req * erp, char final_status)
@@ -214,7 +214,7 @@ dasd_3990_erp_cleanup(struct dasd_ccw_req * erp, char final_status)
214} /* end dasd_3990_erp_cleanup */ 214} /* end dasd_3990_erp_cleanup */
215 215
216/* 216/*
217 * DASD_3990_ERP_BLOCK_QUEUE 217 * DASD_3990_ERP_BLOCK_QUEUE
218 * 218 *
219 * DESCRIPTION 219 * DESCRIPTION
220 * Block the given device request queue to prevent from further 220 * Block the given device request queue to prevent from further
@@ -237,7 +237,7 @@ dasd_3990_erp_block_queue(struct dasd_ccw_req * erp, int expires)
237} 237}
238 238
239/* 239/*
240 * DASD_3990_ERP_INT_REQ 240 * DASD_3990_ERP_INT_REQ
241 * 241 *
242 * DESCRIPTION 242 * DESCRIPTION
243 * Handles 'Intervention Required' error. 243 * Handles 'Intervention Required' error.
@@ -277,7 +277,7 @@ dasd_3990_erp_int_req(struct dasd_ccw_req * erp)
277} /* end dasd_3990_erp_int_req */ 277} /* end dasd_3990_erp_int_req */
278 278
279/* 279/*
280 * DASD_3990_ERP_ALTERNATE_PATH 280 * DASD_3990_ERP_ALTERNATE_PATH
281 * 281 *
282 * DESCRIPTION 282 * DESCRIPTION
283 * Repeat the operation on a different channel path. 283 * Repeat the operation on a different channel path.
@@ -330,15 +330,15 @@ dasd_3990_erp_alternate_path(struct dasd_ccw_req * erp)
330 * DASD_3990_ERP_DCTL 330 * DASD_3990_ERP_DCTL
331 * 331 *
332 * DESCRIPTION 332 * DESCRIPTION
333 * Setup cqr to do the Diagnostic Control (DCTL) command with an 333 * Setup cqr to do the Diagnostic Control (DCTL) command with an
334 * Inhibit Write subcommand (0x20) and the given modifier. 334 * Inhibit Write subcommand (0x20) and the given modifier.
335 * 335 *
336 * PARAMETER 336 * PARAMETER
337 * erp pointer to the current (failed) ERP 337 * erp pointer to the current (failed) ERP
338 * modifier subcommand modifier 338 * modifier subcommand modifier
339 * 339 *
340 * RETURN VALUES 340 * RETURN VALUES
341 * dctl_cqr pointer to NEW dctl_cqr 341 * dctl_cqr pointer to NEW dctl_cqr
342 * 342 *
343 */ 343 */
344static struct dasd_ccw_req * 344static struct dasd_ccw_req *
@@ -386,7 +386,7 @@ dasd_3990_erp_DCTL(struct dasd_ccw_req * erp, char modifier)
386} /* end dasd_3990_erp_DCTL */ 386} /* end dasd_3990_erp_DCTL */
387 387
388/* 388/*
389 * DASD_3990_ERP_ACTION_1 389 * DASD_3990_ERP_ACTION_1
390 * 390 *
391 * DESCRIPTION 391 * DESCRIPTION
392 * Setup ERP to do the ERP action 1 (see Reference manual). 392 * Setup ERP to do the ERP action 1 (see Reference manual).
@@ -415,7 +415,7 @@ dasd_3990_erp_action_1(struct dasd_ccw_req * erp)
415} /* end dasd_3990_erp_action_1 */ 415} /* end dasd_3990_erp_action_1 */
416 416
417/* 417/*
418 * DASD_3990_ERP_ACTION_4 418 * DASD_3990_ERP_ACTION_4
419 * 419 *
420 * DESCRIPTION 420 * DESCRIPTION
421 * Setup ERP to do the ERP action 4 (see Reference manual). 421 * Setup ERP to do the ERP action 4 (see Reference manual).
@@ -453,11 +453,11 @@ dasd_3990_erp_action_4(struct dasd_ccw_req * erp, char *sense)
453 453
454 if (sense[25] == 0x1D) { /* state change pending */ 454 if (sense[25] == 0x1D) { /* state change pending */
455 455
456 DEV_MESSAGE(KERN_INFO, device, 456 DEV_MESSAGE(KERN_INFO, device,
457 "waiting for state change pending " 457 "waiting for state change pending "
458 "interrupt, %d retries left", 458 "interrupt, %d retries left",
459 erp->retries); 459 erp->retries);
460 460
461 dasd_3990_erp_block_queue(erp, 30*HZ); 461 dasd_3990_erp_block_queue(erp, 30*HZ);
462 462
463 } else if (sense[25] == 0x1E) { /* busy */ 463 } else if (sense[25] == 0x1E) { /* busy */
@@ -469,9 +469,9 @@ dasd_3990_erp_action_4(struct dasd_ccw_req * erp, char *sense)
469 } else { 469 } else {
470 470
471 /* no state change pending - retry */ 471 /* no state change pending - retry */
472 DEV_MESSAGE (KERN_INFO, device, 472 DEV_MESSAGE (KERN_INFO, device,
473 "redriving request immediately, " 473 "redriving request immediately, "
474 "%d retries left", 474 "%d retries left",
475 erp->retries); 475 erp->retries);
476 erp->status = DASD_CQR_QUEUED; 476 erp->status = DASD_CQR_QUEUED;
477 } 477 }
@@ -482,13 +482,13 @@ dasd_3990_erp_action_4(struct dasd_ccw_req * erp, char *sense)
482} /* end dasd_3990_erp_action_4 */ 482} /* end dasd_3990_erp_action_4 */
483 483
484/* 484/*
485 ***************************************************************************** 485 *****************************************************************************
486 * 24 byte sense ERP functions (only) 486 * 24 byte sense ERP functions (only)
487 ***************************************************************************** 487 *****************************************************************************
488 */ 488 */
489 489
490/* 490/*
491 * DASD_3990_ERP_ACTION_5 491 * DASD_3990_ERP_ACTION_5
492 * 492 *
493 * DESCRIPTION 493 * DESCRIPTION
494 * Setup ERP to do the ERP action 5 (see Reference manual). 494 * Setup ERP to do the ERP action 5 (see Reference manual).
@@ -523,7 +523,7 @@ dasd_3990_erp_action_5(struct dasd_ccw_req * erp)
523 * 523 *
524 * PARAMETER 524 * PARAMETER
525 * sense current sense data 525 * sense current sense data
526 * 526 *
527 * RETURN VALUES 527 * RETURN VALUES
528 * void 528 * void
529 */ 529 */
@@ -1150,9 +1150,9 @@ dasd_3990_handle_env_data(struct dasd_ccw_req * erp, char *sense)
1150 * PARAMETER 1150 * PARAMETER
1151 * erp current erp_head 1151 * erp current erp_head
1152 * sense current sense data 1152 * sense current sense data
1153 * 1153 *
1154 * RETURN VALUES 1154 * RETURN VALUES
1155 * erp 'new' erp_head - pointer to new ERP 1155 * erp 'new' erp_head - pointer to new ERP
1156 */ 1156 */
1157static struct dasd_ccw_req * 1157static struct dasd_ccw_req *
1158dasd_3990_erp_com_rej(struct dasd_ccw_req * erp, char *sense) 1158dasd_3990_erp_com_rej(struct dasd_ccw_req * erp, char *sense)
@@ -1185,7 +1185,7 @@ dasd_3990_erp_com_rej(struct dasd_ccw_req * erp, char *sense)
1185} /* end dasd_3990_erp_com_rej */ 1185} /* end dasd_3990_erp_com_rej */
1186 1186
1187/* 1187/*
1188 * DASD_3990_ERP_BUS_OUT 1188 * DASD_3990_ERP_BUS_OUT
1189 * 1189 *
1190 * DESCRIPTION 1190 * DESCRIPTION
1191 * Handles 24 byte 'Bus Out Parity Check' error. 1191 * Handles 24 byte 'Bus Out Parity Check' error.
@@ -1483,7 +1483,7 @@ dasd_3990_erp_env_data(struct dasd_ccw_req * erp, char *sense)
1483 * 1483 *
1484 * PARAMETER 1484 * PARAMETER
1485 * erp already added default ERP 1485 * erp already added default ERP
1486 * 1486 *
1487 * RETURN VALUES 1487 * RETURN VALUES
1488 * erp new erp_head - pointer to new ERP 1488 * erp new erp_head - pointer to new ERP
1489 */ 1489 */
@@ -1527,11 +1527,11 @@ dasd_3990_erp_file_prot(struct dasd_ccw_req * erp)
1527} /* end dasd_3990_erp_file_prot */ 1527} /* end dasd_3990_erp_file_prot */
1528 1528
1529/* 1529/*
1530 * DASD_3990_ERP_INSPECT_24 1530 * DASD_3990_ERP_INSPECT_24
1531 * 1531 *
1532 * DESCRIPTION 1532 * DESCRIPTION
1533 * Does a detailed inspection of the 24 byte sense data 1533 * Does a detailed inspection of the 24 byte sense data
1534 * and sets up a related error recovery action. 1534 * and sets up a related error recovery action.
1535 * 1535 *
1536 * PARAMETER 1536 * PARAMETER
1537 * sense sense data of the actual error 1537 * sense sense data of the actual error
@@ -1602,13 +1602,13 @@ dasd_3990_erp_inspect_24(struct dasd_ccw_req * erp, char *sense)
1602} /* END dasd_3990_erp_inspect_24 */ 1602} /* END dasd_3990_erp_inspect_24 */
1603 1603
1604/* 1604/*
1605 ***************************************************************************** 1605 *****************************************************************************
1606 * 32 byte sense ERP functions (only) 1606 * 32 byte sense ERP functions (only)
1607 ***************************************************************************** 1607 *****************************************************************************
1608 */ 1608 */
1609 1609
1610/* 1610/*
1611 * DASD_3990_ERPACTION_10_32 1611 * DASD_3990_ERPACTION_10_32
1612 * 1612 *
1613 * DESCRIPTION 1613 * DESCRIPTION
1614 * Handles 32 byte 'Action 10' of Single Program Action Codes. 1614 * Handles 32 byte 'Action 10' of Single Program Action Codes.
@@ -1616,7 +1616,7 @@ dasd_3990_erp_inspect_24(struct dasd_ccw_req * erp, char *sense)
1616 * 1616 *
1617 * PARAMETER 1617 * PARAMETER
1618 * erp current erp_head 1618 * erp current erp_head
1619 * sense current sense data 1619 * sense current sense data
1620 * RETURN VALUES 1620 * RETURN VALUES
1621 * erp modified erp_head 1621 * erp modified erp_head
1622 */ 1622 */
@@ -1640,18 +1640,18 @@ dasd_3990_erp_action_10_32(struct dasd_ccw_req * erp, char *sense)
1640 * 1640 *
1641 * DESCRIPTION 1641 * DESCRIPTION
1642 * Handles 32 byte 'Action 1B' of Single Program Action Codes. 1642 * Handles 32 byte 'Action 1B' of Single Program Action Codes.
1643 * A write operation could not be finished because of an unexpected 1643 * A write operation could not be finished because of an unexpected
1644 * condition. 1644 * condition.
1645 * The already created 'default erp' is used to get the link to 1645 * The already created 'default erp' is used to get the link to
1646 * the erp chain, but it can not be used for this recovery 1646 * the erp chain, but it can not be used for this recovery
1647 * action because it contains no DE/LO data space. 1647 * action because it contains no DE/LO data space.
1648 * 1648 *
1649 * PARAMETER 1649 * PARAMETER
1650 * default_erp already added default erp. 1650 * default_erp already added default erp.
1651 * sense current sense data 1651 * sense current sense data
1652 * 1652 *
1653 * RETURN VALUES 1653 * RETURN VALUES
1654 * erp new erp or 1654 * erp new erp or
1655 * default_erp in case of imprecise ending or error 1655 * default_erp in case of imprecise ending or error
1656 */ 1656 */
1657static struct dasd_ccw_req * 1657static struct dasd_ccw_req *
@@ -1789,16 +1789,16 @@ dasd_3990_erp_action_1B_32(struct dasd_ccw_req * default_erp, char *sense)
1789 * DASD_3990_UPDATE_1B 1789 * DASD_3990_UPDATE_1B
1790 * 1790 *
1791 * DESCRIPTION 1791 * DESCRIPTION
1792 * Handles the update to the 32 byte 'Action 1B' of Single Program 1792 * Handles the update to the 32 byte 'Action 1B' of Single Program
1793 * Action Codes in case the first action was not successful. 1793 * Action Codes in case the first action was not successful.
1794 * The already created 'previous_erp' is the currently not successful 1794 * The already created 'previous_erp' is the currently not successful
1795 * ERP. 1795 * ERP.
1796 * 1796 *
1797 * PARAMETER 1797 * PARAMETER
1798 * previous_erp already created previous erp. 1798 * previous_erp already created previous erp.
1799 * sense current sense data 1799 * sense current sense data
1800 * RETURN VALUES 1800 * RETURN VALUES
1801 * erp modified erp 1801 * erp modified erp
1802 */ 1802 */
1803static struct dasd_ccw_req * 1803static struct dasd_ccw_req *
1804dasd_3990_update_1B(struct dasd_ccw_req * previous_erp, char *sense) 1804dasd_3990_update_1B(struct dasd_ccw_req * previous_erp, char *sense)
@@ -1897,7 +1897,7 @@ dasd_3990_update_1B(struct dasd_ccw_req * previous_erp, char *sense)
1897} /* end dasd_3990_update_1B */ 1897} /* end dasd_3990_update_1B */
1898 1898
1899/* 1899/*
1900 * DASD_3990_ERP_COMPOUND_RETRY 1900 * DASD_3990_ERP_COMPOUND_RETRY
1901 * 1901 *
1902 * DESCRIPTION 1902 * DESCRIPTION
1903 * Handles the compound ERP action retry code. 1903 * Handles the compound ERP action retry code.
@@ -1943,7 +1943,7 @@ dasd_3990_erp_compound_retry(struct dasd_ccw_req * erp, char *sense)
1943} /* end dasd_3990_erp_compound_retry */ 1943} /* end dasd_3990_erp_compound_retry */
1944 1944
1945/* 1945/*
1946 * DASD_3990_ERP_COMPOUND_PATH 1946 * DASD_3990_ERP_COMPOUND_PATH
1947 * 1947 *
1948 * DESCRIPTION 1948 * DESCRIPTION
1949 * Handles the compound ERP action for retry on alternate 1949 * Handles the compound ERP action for retry on alternate
@@ -1965,7 +1965,7 @@ dasd_3990_erp_compound_path(struct dasd_ccw_req * erp, char *sense)
1965 dasd_3990_erp_alternate_path(erp); 1965 dasd_3990_erp_alternate_path(erp);
1966 1966
1967 if (erp->status == DASD_CQR_FAILED) { 1967 if (erp->status == DASD_CQR_FAILED) {
1968 /* reset the lpm and the status to be able to 1968 /* reset the lpm and the status to be able to
1969 * try further actions. */ 1969 * try further actions. */
1970 1970
1971 erp->lpm = 0; 1971 erp->lpm = 0;
@@ -1980,7 +1980,7 @@ dasd_3990_erp_compound_path(struct dasd_ccw_req * erp, char *sense)
1980} /* end dasd_3990_erp_compound_path */ 1980} /* end dasd_3990_erp_compound_path */
1981 1981
1982/* 1982/*
1983 * DASD_3990_ERP_COMPOUND_CODE 1983 * DASD_3990_ERP_COMPOUND_CODE
1984 * 1984 *
1985 * DESCRIPTION 1985 * DESCRIPTION
1986 * Handles the compound ERP action for retry code. 1986 * Handles the compound ERP action for retry code.
@@ -2001,18 +2001,18 @@ dasd_3990_erp_compound_code(struct dasd_ccw_req * erp, char *sense)
2001 2001
2002 switch (sense[28]) { 2002 switch (sense[28]) {
2003 case 0x17: 2003 case 0x17:
2004 /* issue a Diagnostic Control command with an 2004 /* issue a Diagnostic Control command with an
2005 * Inhibit Write subcommand and controler modifier */ 2005 * Inhibit Write subcommand and controler modifier */
2006 erp = dasd_3990_erp_DCTL(erp, 0x20); 2006 erp = dasd_3990_erp_DCTL(erp, 0x20);
2007 break; 2007 break;
2008 2008
2009 case 0x25: 2009 case 0x25:
2010 /* wait for 5 seconds and retry again */ 2010 /* wait for 5 seconds and retry again */
2011 erp->retries = 1; 2011 erp->retries = 1;
2012 2012
2013 dasd_3990_erp_block_queue (erp, 5*HZ); 2013 dasd_3990_erp_block_queue (erp, 5*HZ);
2014 break; 2014 break;
2015 2015
2016 default: 2016 default:
2017 /* should not happen - continue */ 2017 /* should not happen - continue */
2018 break; 2018 break;
@@ -2026,7 +2026,7 @@ dasd_3990_erp_compound_code(struct dasd_ccw_req * erp, char *sense)
2026} /* end dasd_3990_erp_compound_code */ 2026} /* end dasd_3990_erp_compound_code */
2027 2027
2028/* 2028/*
2029 * DASD_3990_ERP_COMPOUND_CONFIG 2029 * DASD_3990_ERP_COMPOUND_CONFIG
2030 * 2030 *
2031 * DESCRIPTION 2031 * DESCRIPTION
2032 * Handles the compound ERP action for configruation 2032 * Handles the compound ERP action for configruation
@@ -2063,10 +2063,10 @@ dasd_3990_erp_compound_config(struct dasd_ccw_req * erp, char *sense)
2063} /* end dasd_3990_erp_compound_config */ 2063} /* end dasd_3990_erp_compound_config */
2064 2064
2065/* 2065/*
2066 * DASD_3990_ERP_COMPOUND 2066 * DASD_3990_ERP_COMPOUND
2067 * 2067 *
2068 * DESCRIPTION 2068 * DESCRIPTION
2069 * Does the further compound program action if 2069 * Does the further compound program action if
2070 * compound retry was not successful. 2070 * compound retry was not successful.
2071 * 2071 *
2072 * PARAMETER 2072 * PARAMETER
@@ -2110,11 +2110,11 @@ dasd_3990_erp_compound(struct dasd_ccw_req * erp, char *sense)
2110} /* end dasd_3990_erp_compound */ 2110} /* end dasd_3990_erp_compound */
2111 2111
2112/* 2112/*
2113 * DASD_3990_ERP_INSPECT_32 2113 * DASD_3990_ERP_INSPECT_32
2114 * 2114 *
2115 * DESCRIPTION 2115 * DESCRIPTION
2116 * Does a detailed inspection of the 32 byte sense data 2116 * Does a detailed inspection of the 32 byte sense data
2117 * and sets up a related error recovery action. 2117 * and sets up a related error recovery action.
2118 * 2118 *
2119 * PARAMETER 2119 * PARAMETER
2120 * sense sense data of the actual error 2120 * sense sense data of the actual error
@@ -2228,9 +2228,9 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense)
2228} /* end dasd_3990_erp_inspect_32 */ 2228} /* end dasd_3990_erp_inspect_32 */
2229 2229
2230/* 2230/*
2231 ***************************************************************************** 2231 *****************************************************************************
2232 * main ERP control fuctions (24 and 32 byte sense) 2232 * main ERP control fuctions (24 and 32 byte sense)
2233 ***************************************************************************** 2233 *****************************************************************************
2234 */ 2234 */
2235 2235
2236/* 2236/*
@@ -2243,7 +2243,7 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense)
2243 * PARAMETER 2243 * PARAMETER
2244 * erp pointer to the currently created default ERP 2244 * erp pointer to the currently created default ERP
2245 * RETURN VALUES 2245 * RETURN VALUES
2246 * erp_new contens was possibly modified 2246 * erp_new contens was possibly modified
2247 */ 2247 */
2248static struct dasd_ccw_req * 2248static struct dasd_ccw_req *
2249dasd_3990_erp_inspect(struct dasd_ccw_req * erp) 2249dasd_3990_erp_inspect(struct dasd_ccw_req * erp)
@@ -2272,14 +2272,14 @@ dasd_3990_erp_inspect(struct dasd_ccw_req * erp)
2272 2272
2273/* 2273/*
2274 * DASD_3990_ERP_ADD_ERP 2274 * DASD_3990_ERP_ADD_ERP
2275 * 2275 *
2276 * DESCRIPTION 2276 * DESCRIPTION
2277 * This funtion adds an additional request block (ERP) to the head of 2277 * This funtion adds an additional request block (ERP) to the head of
2278 * the given cqr (or erp). 2278 * the given cqr (or erp).
2279 * This erp is initialized as an default erp (retry TIC) 2279 * This erp is initialized as an default erp (retry TIC)
2280 * 2280 *
2281 * PARAMETER 2281 * PARAMETER
2282 * cqr head of the current ERP-chain (or single cqr if 2282 * cqr head of the current ERP-chain (or single cqr if
2283 * first error) 2283 * first error)
2284 * RETURN VALUES 2284 * RETURN VALUES
2285 * erp pointer to new ERP-chain head 2285 * erp pointer to new ERP-chain head
@@ -2332,15 +2332,15 @@ dasd_3990_erp_add_erp(struct dasd_ccw_req * cqr)
2332} 2332}
2333 2333
2334/* 2334/*
2335 * DASD_3990_ERP_ADDITIONAL_ERP 2335 * DASD_3990_ERP_ADDITIONAL_ERP
2336 * 2336 *
2337 * DESCRIPTION 2337 * DESCRIPTION
2338 * An additional ERP is needed to handle the current error. 2338 * An additional ERP is needed to handle the current error.
2339 * Add ERP to the head of the ERP-chain containing the ERP processing 2339 * Add ERP to the head of the ERP-chain containing the ERP processing
2340 * determined based on the sense data. 2340 * determined based on the sense data.
2341 * 2341 *
2342 * PARAMETER 2342 * PARAMETER
2343 * cqr head of the current ERP-chain (or single cqr if 2343 * cqr head of the current ERP-chain (or single cqr if
2344 * first error) 2344 * first error)
2345 * 2345 *
2346 * RETURN VALUES 2346 * RETURN VALUES
@@ -2376,7 +2376,7 @@ dasd_3990_erp_additional_erp(struct dasd_ccw_req * cqr)
2376 * 24 byte sense byte 25 and 27 is set as well. 2376 * 24 byte sense byte 25 and 27 is set as well.
2377 * 2377 *
2378 * PARAMETER 2378 * PARAMETER
2379 * cqr1 first cqr, which will be compared with the 2379 * cqr1 first cqr, which will be compared with the
2380 * cqr2 second cqr. 2380 * cqr2 second cqr.
2381 * 2381 *
2382 * RETURN VALUES 2382 * RETURN VALUES
@@ -2415,7 +2415,7 @@ dasd_3990_erp_error_match(struct dasd_ccw_req *cqr1, struct dasd_ccw_req *cqr2)
2415 * cqr failed cqr (either original cqr or already an erp) 2415 * cqr failed cqr (either original cqr or already an erp)
2416 * 2416 *
2417 * RETURN VALUES 2417 * RETURN VALUES
2418 * erp erp-pointer to the already defined error 2418 * erp erp-pointer to the already defined error
2419 * recovery procedure OR 2419 * recovery procedure OR
2420 * NULL if a 'new' error occurred. 2420 * NULL if a 'new' error occurred.
2421 */ 2421 */
@@ -2451,10 +2451,10 @@ dasd_3990_erp_in_erp(struct dasd_ccw_req *cqr)
2451 * DASD_3990_ERP_FURTHER_ERP (24 & 32 byte sense) 2451 * DASD_3990_ERP_FURTHER_ERP (24 & 32 byte sense)
2452 * 2452 *
2453 * DESCRIPTION 2453 * DESCRIPTION
2454 * No retry is left for the current ERP. Check what has to be done 2454 * No retry is left for the current ERP. Check what has to be done
2455 * with the ERP. 2455 * with the ERP.
2456 * - do further defined ERP action or 2456 * - do further defined ERP action or
2457 * - wait for interrupt or 2457 * - wait for interrupt or
2458 * - exit with permanent error 2458 * - exit with permanent error
2459 * 2459 *
2460 * PARAMETER 2460 * PARAMETER
@@ -2485,7 +2485,7 @@ dasd_3990_erp_further_erp(struct dasd_ccw_req *erp)
2485 2485
2486 if (!(sense[2] & DASD_SENSE_BIT_0)) { 2486 if (!(sense[2] & DASD_SENSE_BIT_0)) {
2487 2487
2488 /* issue a Diagnostic Control command with an 2488 /* issue a Diagnostic Control command with an
2489 * Inhibit Write subcommand */ 2489 * Inhibit Write subcommand */
2490 2490
2491 switch (sense[25]) { 2491 switch (sense[25]) {
@@ -2535,14 +2535,14 @@ dasd_3990_erp_further_erp(struct dasd_ccw_req *erp)
2535} /* end dasd_3990_erp_further_erp */ 2535} /* end dasd_3990_erp_further_erp */
2536 2536
2537/* 2537/*
2538 * DASD_3990_ERP_HANDLE_MATCH_ERP 2538 * DASD_3990_ERP_HANDLE_MATCH_ERP
2539 * 2539 *
2540 * DESCRIPTION 2540 * DESCRIPTION
2541 * An error occurred again and an ERP has been detected which is already 2541 * An error occurred again and an ERP has been detected which is already
2542 * used to handle this error (e.g. retries). 2542 * used to handle this error (e.g. retries).
2543 * All prior ERP's are asumed to be successful and therefore removed 2543 * All prior ERP's are asumed to be successful and therefore removed
2544 * from queue. 2544 * from queue.
2545 * If retry counter of matching erp is already 0, it is checked if further 2545 * If retry counter of matching erp is already 0, it is checked if further
2546 * action is needed (besides retry) or if the ERP has failed. 2546 * action is needed (besides retry) or if the ERP has failed.
2547 * 2547 *
2548 * PARAMETER 2548 * PARAMETER
@@ -2631,7 +2631,7 @@ dasd_3990_erp_handle_match_erp(struct dasd_ccw_req *erp_head,
2631 * erp erp-pointer to the head of the ERP action chain. 2631 * erp erp-pointer to the head of the ERP action chain.
2632 * This means: 2632 * This means:
2633 * - either a ptr to an additional ERP cqr or 2633 * - either a ptr to an additional ERP cqr or
2634 * - the original given cqr (which's status might 2634 * - the original given cqr (which's status might
2635 * be modified) 2635 * be modified)
2636 */ 2636 */
2637struct dasd_ccw_req * 2637struct dasd_ccw_req *
@@ -2723,22 +2723,3 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr)
2723 return erp; 2723 return erp;
2724 2724
2725} /* end dasd_3990_erp_action */ 2725} /* end dasd_3990_erp_action */
2726
2727/*
2728 * Overrides for Emacs so that we follow Linus's tabbing style.
2729 * Emacs will notice this stuff at the end of the file and automatically
2730 * adjust the settings for this buffer only. This must remain at the end
2731 * of the file.
2732 * ---------------------------------------------------------------------------
2733 * Local variables:
2734 * c-indent-level: 4
2735 * c-brace-imaginary-offset: 0
2736 * c-brace-offset: -4
2737 * c-argdecl-indent: 4
2738 * c-label-offset: -4
2739 * c-continued-statement-offset: 4
2740 * c-continued-brace-offset: 0
2741 * indent-tabs-mode: 1
2742 * tab-width: 8
2743 * End:
2744 */