aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/block')
-rw-r--r--drivers/s390/block/dasd.c54
-rw-r--r--drivers/s390/block/dasd_3370_erp.c27
-rw-r--r--drivers/s390/block/dasd_3990_erp.c189
-rw-r--r--drivers/s390/block/dasd_9336_erp.c27
-rw-r--r--drivers/s390/block/dasd_9343_erp.c2
-rw-r--r--drivers/s390/block/dasd_devmap.c22
-rw-r--r--drivers/s390/block/dasd_diag.c6
-rw-r--r--drivers/s390/block/dasd_diag.h2
-rw-r--r--drivers/s390/block/dasd_eckd.c52
-rw-r--r--drivers/s390/block/dasd_eckd.h8
-rw-r--r--drivers/s390/block/dasd_erp.c8
-rw-r--r--drivers/s390/block/dasd_fba.c29
-rw-r--r--drivers/s390/block/dasd_fba.h2
-rw-r--r--drivers/s390/block/dasd_int.h37
-rw-r--r--drivers/s390/block/dasd_ioctl.c12
15 files changed, 173 insertions, 304 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index cfb1fff3787c..7e9978ad1445 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -95,7 +95,7 @@ dasd_alloc_device(void)
95 spin_lock_init(&device->mem_lock); 95 spin_lock_init(&device->mem_lock);
96 spin_lock_init(&device->request_queue_lock); 96 spin_lock_init(&device->request_queue_lock);
97 atomic_set (&device->tasklet_scheduled, 0); 97 atomic_set (&device->tasklet_scheduled, 0);
98 tasklet_init(&device->tasklet, 98 tasklet_init(&device->tasklet,
99 (void (*)(unsigned long)) dasd_tasklet, 99 (void (*)(unsigned long)) dasd_tasklet,
100 (unsigned long) device); 100 (unsigned long) device);
101 INIT_LIST_HEAD(&device->ccw_queue); 101 INIT_LIST_HEAD(&device->ccw_queue);
@@ -128,7 +128,7 @@ dasd_state_new_to_known(struct dasd_device *device)
128 int rc; 128 int rc;
129 129
130 /* 130 /*
131 * As long as the device is not in state DASD_STATE_NEW we want to 131 * As long as the device is not in state DASD_STATE_NEW we want to
132 * keep the reference count > 0. 132 * keep the reference count > 0.
133 */ 133 */
134 dasd_get_device(device); 134 dasd_get_device(device);
@@ -336,7 +336,7 @@ dasd_decrease_state(struct dasd_device *device)
336 if (device->state == DASD_STATE_ONLINE && 336 if (device->state == DASD_STATE_ONLINE &&
337 device->target <= DASD_STATE_READY) 337 device->target <= DASD_STATE_READY)
338 dasd_state_online_to_ready(device); 338 dasd_state_online_to_ready(device);
339 339
340 if (device->state == DASD_STATE_READY && 340 if (device->state == DASD_STATE_READY &&
341 device->target <= DASD_STATE_BASIC) 341 device->target <= DASD_STATE_BASIC)
342 dasd_state_ready_to_basic(device); 342 dasd_state_ready_to_basic(device);
@@ -348,7 +348,7 @@ dasd_decrease_state(struct dasd_device *device)
348 if (device->state == DASD_STATE_BASIC && 348 if (device->state == DASD_STATE_BASIC &&
349 device->target <= DASD_STATE_KNOWN) 349 device->target <= DASD_STATE_KNOWN)
350 dasd_state_basic_to_known(device); 350 dasd_state_basic_to_known(device);
351 351
352 if (device->state == DASD_STATE_KNOWN && 352 if (device->state == DASD_STATE_KNOWN &&
353 device->target <= DASD_STATE_NEW) 353 device->target <= DASD_STATE_NEW)
354 dasd_state_known_to_new(device); 354 dasd_state_known_to_new(device);
@@ -994,7 +994,7 @@ dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
994 ((irb->scsw.cstat << 8) | irb->scsw.dstat), cqr); 994 ((irb->scsw.cstat << 8) | irb->scsw.dstat), cqr);
995 995
996 /* Find out the appropriate era_action. */ 996 /* Find out the appropriate era_action. */
997 if (irb->scsw.fctl & SCSW_FCTL_HALT_FUNC) 997 if (irb->scsw.fctl & SCSW_FCTL_HALT_FUNC)
998 era = dasd_era_fatal; 998 era = dasd_era_fatal;
999 else if (irb->scsw.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END) && 999 else if (irb->scsw.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END) &&
1000 irb->scsw.cstat == 0 && 1000 irb->scsw.cstat == 0 &&
@@ -1004,7 +1004,7 @@ dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
1004 era = dasd_era_fatal; /* don't recover this request */ 1004 era = dasd_era_fatal; /* don't recover this request */
1005 else if (irb->esw.esw0.erw.cons) 1005 else if (irb->esw.esw0.erw.cons)
1006 era = device->discipline->examine_error(cqr, irb); 1006 era = device->discipline->examine_error(cqr, irb);
1007 else 1007 else
1008 era = dasd_era_recover; 1008 era = dasd_era_recover;
1009 1009
1010 DBF_DEV_EVENT(DBF_DEBUG, device, "era_code %d", era); 1010 DBF_DEV_EVENT(DBF_DEBUG, device, "era_code %d", era);
@@ -1287,7 +1287,7 @@ __dasd_start_head(struct dasd_device * device)
1287} 1287}
1288 1288
1289/* 1289/*
1290 * Remove requests from the ccw queue. 1290 * Remove requests from the ccw queue.
1291 */ 1291 */
1292static void 1292static void
1293dasd_flush_ccw_queue(struct dasd_device * device, int all) 1293dasd_flush_ccw_queue(struct dasd_device * device, int all)
@@ -1450,23 +1450,23 @@ dasd_sleep_on(struct dasd_ccw_req * cqr)
1450 wait_queue_head_t wait_q; 1450 wait_queue_head_t wait_q;
1451 struct dasd_device *device; 1451 struct dasd_device *device;
1452 int rc; 1452 int rc;
1453 1453
1454 device = cqr->device; 1454 device = cqr->device;
1455 spin_lock_irq(get_ccwdev_lock(device->cdev)); 1455 spin_lock_irq(get_ccwdev_lock(device->cdev));
1456 1456
1457 init_waitqueue_head (&wait_q); 1457 init_waitqueue_head (&wait_q);
1458 cqr->callback = dasd_wakeup_cb; 1458 cqr->callback = dasd_wakeup_cb;
1459 cqr->callback_data = (void *) &wait_q; 1459 cqr->callback_data = (void *) &wait_q;
1460 cqr->status = DASD_CQR_QUEUED; 1460 cqr->status = DASD_CQR_QUEUED;
1461 list_add_tail(&cqr->list, &device->ccw_queue); 1461 list_add_tail(&cqr->list, &device->ccw_queue);
1462 1462
1463 /* let the bh start the request to keep them in order */ 1463 /* let the bh start the request to keep them in order */
1464 dasd_schedule_bh(device); 1464 dasd_schedule_bh(device);
1465 1465
1466 spin_unlock_irq(get_ccwdev_lock(device->cdev)); 1466 spin_unlock_irq(get_ccwdev_lock(device->cdev));
1467 1467
1468 wait_event(wait_q, _wait_for_wakeup(cqr)); 1468 wait_event(wait_q, _wait_for_wakeup(cqr));
1469 1469
1470 /* Request status is either done or failed. */ 1470 /* Request status is either done or failed. */
1471 rc = (cqr->status == DASD_CQR_FAILED) ? -EIO : 0; 1471 rc = (cqr->status == DASD_CQR_FAILED) ? -EIO : 0;
1472 return rc; 1472 return rc;
@@ -1568,7 +1568,7 @@ dasd_sleep_on_immediatly(struct dasd_ccw_req * cqr)
1568 wait_queue_head_t wait_q; 1568 wait_queue_head_t wait_q;
1569 struct dasd_device *device; 1569 struct dasd_device *device;
1570 int rc; 1570 int rc;
1571 1571
1572 device = cqr->device; 1572 device = cqr->device;
1573 spin_lock_irq(get_ccwdev_lock(device->cdev)); 1573 spin_lock_irq(get_ccwdev_lock(device->cdev));
1574 rc = _dasd_term_running_cqr(device); 1574 rc = _dasd_term_running_cqr(device);
@@ -1576,20 +1576,20 @@ dasd_sleep_on_immediatly(struct dasd_ccw_req * cqr)
1576 spin_unlock_irq(get_ccwdev_lock(device->cdev)); 1576 spin_unlock_irq(get_ccwdev_lock(device->cdev));
1577 return rc; 1577 return rc;
1578 } 1578 }
1579 1579
1580 init_waitqueue_head (&wait_q); 1580 init_waitqueue_head (&wait_q);
1581 cqr->callback = dasd_wakeup_cb; 1581 cqr->callback = dasd_wakeup_cb;
1582 cqr->callback_data = (void *) &wait_q; 1582 cqr->callback_data = (void *) &wait_q;
1583 cqr->status = DASD_CQR_QUEUED; 1583 cqr->status = DASD_CQR_QUEUED;
1584 list_add(&cqr->list, &device->ccw_queue); 1584 list_add(&cqr->list, &device->ccw_queue);
1585 1585
1586 /* let the bh start the request to keep them in order */ 1586 /* let the bh start the request to keep them in order */
1587 dasd_schedule_bh(device); 1587 dasd_schedule_bh(device);
1588 1588
1589 spin_unlock_irq(get_ccwdev_lock(device->cdev)); 1589 spin_unlock_irq(get_ccwdev_lock(device->cdev));
1590 1590
1591 wait_event(wait_q, _wait_for_wakeup(cqr)); 1591 wait_event(wait_q, _wait_for_wakeup(cqr));
1592 1592
1593 /* Request status is either done or failed. */ 1593 /* Request status is either done or failed. */
1594 rc = (cqr->status == DASD_CQR_FAILED) ? -EIO : 0; 1594 rc = (cqr->status == DASD_CQR_FAILED) ? -EIO : 0;
1595 return rc; 1595 return rc;
@@ -1725,7 +1725,7 @@ dasd_flush_request_queue(struct dasd_device * device)
1725 1725
1726 if (!device->request_queue) 1726 if (!device->request_queue)
1727 return; 1727 return;
1728 1728
1729 spin_lock_irq(&device->request_queue_lock); 1729 spin_lock_irq(&device->request_queue_lock);
1730 while (!list_empty(&device->request_queue->queue_head)) { 1730 while (!list_empty(&device->request_queue->queue_head)) {
1731 req = elv_next_request(device->request_queue); 1731 req = elv_next_request(device->request_queue);
@@ -2172,21 +2172,3 @@ EXPORT_SYMBOL_GPL(dasd_generic_set_online);
2172EXPORT_SYMBOL_GPL(dasd_generic_set_offline); 2172EXPORT_SYMBOL_GPL(dasd_generic_set_offline);
2173EXPORT_SYMBOL_GPL(dasd_generic_auto_online); 2173EXPORT_SYMBOL_GPL(dasd_generic_auto_online);
2174 2174
2175/*
2176 * Overrides for Emacs so that we follow Linus's tabbing style.
2177 * Emacs will notice this stuff at the end of the file and automatically
2178 * adjust the settings for this buffer only. This must remain at the end
2179 * of the file.
2180 * ---------------------------------------------------------------------------
2181 * Local variables:
2182 * c-indent-level: 4
2183 * c-brace-imaginary-offset: 0
2184 * c-brace-offset: -4
2185 * c-argdecl-indent: 4
2186 * c-label-offset: -4
2187 * c-continued-statement-offset: 4
2188 * c-continued-brace-offset: 0
2189 * indent-tabs-mode: 1
2190 * tab-width: 8
2191 * End:
2192 */
diff --git a/drivers/s390/block/dasd_3370_erp.c b/drivers/s390/block/dasd_3370_erp.c
index 1d11c2a9525d..1ddab8991d92 100644
--- a/drivers/s390/block/dasd_3370_erp.c
+++ b/drivers/s390/block/dasd_3370_erp.c
@@ -1,4 +1,4 @@
1/* 1/*
2 * File...........: linux/drivers/s390/block/dasd_3370_erp.c 2 * File...........: linux/drivers/s390/block/dasd_3370_erp.c
3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> 3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4 * Bugreports.to..: <Linux390@de.ibm.com> 4 * Bugreports.to..: <Linux390@de.ibm.com>
@@ -12,10 +12,10 @@
12 12
13 13
14/* 14/*
15 * DASD_3370_ERP_EXAMINE 15 * DASD_3370_ERP_EXAMINE
16 * 16 *
17 * DESCRIPTION 17 * DESCRIPTION
18 * Checks only for fatal/no/recover error. 18 * Checks only for fatal/no/recover error.
19 * A detailed examination of the sense data is done later outside 19 * A detailed examination of the sense data is done later outside
20 * the interrupt handler. 20 * the interrupt handler.
21 * 21 *
@@ -23,7 +23,7 @@
23 * 'Chapter 7. 3370 Sense Data'. 23 * 'Chapter 7. 3370 Sense Data'.
24 * 24 *
25 * RETURN VALUES 25 * RETURN VALUES
26 * dasd_era_none no error 26 * dasd_era_none no error
27 * dasd_era_fatal for all fatal (unrecoverable errors) 27 * dasd_era_fatal for all fatal (unrecoverable errors)
28 * dasd_era_recover for all others. 28 * dasd_era_recover for all others.
29 */ 29 */
@@ -82,22 +82,3 @@ dasd_3370_erp_examine(struct dasd_ccw_req * cqr, struct irb * irb)
82 return dasd_era_recover; 82 return dasd_era_recover;
83 83
84} /* END dasd_3370_erp_examine */ 84} /* END dasd_3370_erp_examine */
85
86/*
87 * Overrides for Emacs so that we follow Linus's tabbing style.
88 * Emacs will notice this stuff at the end of the file and automatically
89 * adjust the settings for this buffer only. This must remain at the end
90 * of the file.
91 * ---------------------------------------------------------------------------
92 * Local variables:
93 * c-indent-level: 4
94 * c-brace-imaginary-offset: 0
95 * c-brace-offset: -4
96 * c-argdecl-indent: 4
97 * c-label-offset: -4
98 * c-continued-statement-offset: 4
99 * c-continued-brace-offset: 0
100 * indent-tabs-mode: 1
101 * tab-width: 8
102 * End:
103 */
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 */
diff --git a/drivers/s390/block/dasd_9336_erp.c b/drivers/s390/block/dasd_9336_erp.c
index dc861446d056..6e082688475a 100644
--- a/drivers/s390/block/dasd_9336_erp.c
+++ b/drivers/s390/block/dasd_9336_erp.c
@@ -1,4 +1,4 @@
1/* 1/*
2 * File...........: linux/drivers/s390/block/dasd_9336_erp.c 2 * File...........: linux/drivers/s390/block/dasd_9336_erp.c
3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> 3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4 * Bugreports.to..: <Linux390@de.ibm.com> 4 * Bugreports.to..: <Linux390@de.ibm.com>
@@ -12,10 +12,10 @@
12 12
13 13
14/* 14/*
15 * DASD_9336_ERP_EXAMINE 15 * DASD_9336_ERP_EXAMINE
16 * 16 *
17 * DESCRIPTION 17 * DESCRIPTION
18 * Checks only for fatal/no/recover error. 18 * Checks only for fatal/no/recover error.
19 * A detailed examination of the sense data is done later outside 19 * A detailed examination of the sense data is done later outside
20 * the interrupt handler. 20 * the interrupt handler.
21 * 21 *
@@ -23,7 +23,7 @@
23 * 'Chapter 7. 9336 Sense Data'. 23 * 'Chapter 7. 9336 Sense Data'.
24 * 24 *
25 * RETURN VALUES 25 * RETURN VALUES
26 * dasd_era_none no error 26 * dasd_era_none no error
27 * dasd_era_fatal for all fatal (unrecoverable errors) 27 * dasd_era_fatal for all fatal (unrecoverable errors)
28 * dasd_era_recover for all others. 28 * dasd_era_recover for all others.
29 */ 29 */
@@ -39,22 +39,3 @@ dasd_9336_erp_examine(struct dasd_ccw_req * cqr, struct irb * irb)
39 return dasd_era_recover; 39 return dasd_era_recover;
40 40
41} /* END dasd_9336_erp_examine */ 41} /* END dasd_9336_erp_examine */
42
43/*
44 * Overrides for Emacs so that we follow Linus's tabbing style.
45 * Emacs will notice this stuff at the end of the file and automatically
46 * adjust the settings for this buffer only. This must remain at the end
47 * of the file.
48 * ---------------------------------------------------------------------------
49 * Local variables:
50 * c-indent-level: 4
51 * c-brace-imaginary-offset: 0
52 * c-brace-offset: -4
53 * c-argdecl-indent: 4
54 * c-label-offset: -4
55 * c-continued-statement-offset: 4
56 * c-continued-brace-offset: 0
57 * indent-tabs-mode: 1
58 * tab-width: 8
59 * End:
60 */
diff --git a/drivers/s390/block/dasd_9343_erp.c b/drivers/s390/block/dasd_9343_erp.c
index 4a5b79569aaa..ddecb9808ed4 100644
--- a/drivers/s390/block/dasd_9343_erp.c
+++ b/drivers/s390/block/dasd_9343_erp.c
@@ -1,4 +1,4 @@
1/* 1/*
2 * File...........: linux/drivers/s390/block/dasd_9345_erp.c 2 * File...........: linux/drivers/s390/block/dasd_9345_erp.c
3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> 3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4 * Bugreports.to..: <Linux390@de.ibm.com> 4 * Bugreports.to..: <Linux390@de.ibm.com>
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c
index 216bc4fba199..672e50314b12 100644
--- a/drivers/s390/block/dasd_devmap.c
+++ b/drivers/s390/block/dasd_devmap.c
@@ -123,7 +123,7 @@ static inline int
123dasd_busid(char **str, int *id0, int *id1, int *devno) 123dasd_busid(char **str, int *id0, int *id1, int *devno)
124{ 124{
125 int val, old_style; 125 int val, old_style;
126 126
127 /* check for leading '0x' */ 127 /* check for leading '0x' */
128 old_style = 0; 128 old_style = 0;
129 if ((*str)[0] == '0' && (*str)[1] == 'x') { 129 if ((*str)[0] == '0' && (*str)[1] == 'x') {
@@ -179,7 +179,7 @@ dasd_feature_list(char *str, char **endp)
179 features = 0; 179 features = 0;
180 180
181 while (1) { 181 while (1) {
182 for (len = 0; 182 for (len = 0;
183 str[len] && str[len] != ':' && str[len] != ')'; len++); 183 str[len] && str[len] != ':' && str[len] != ')'; len++);
184 if (len == 2 && !strncmp(str, "ro", 2)) 184 if (len == 2 && !strncmp(str, "ro", 2))
185 features |= DASD_FEATURE_READONLY; 185 features |= DASD_FEATURE_READONLY;
@@ -359,7 +359,7 @@ dasd_parse(void)
359 * Add a devmap for the device specified by busid. It is possible that 359 * Add a devmap for the device specified by busid. It is possible that
360 * the devmap already exists (dasd= parameter). The order of the devices 360 * the devmap already exists (dasd= parameter). The order of the devices
361 * added through this function will define the kdevs for the individual 361 * added through this function will define the kdevs for the individual
362 * devices. 362 * devices.
363 */ 363 */
364static struct dasd_devmap * 364static struct dasd_devmap *
365dasd_add_busid(char *bus_id, int features) 365dasd_add_busid(char *bus_id, int features)
@@ -368,7 +368,7 @@ dasd_add_busid(char *bus_id, int features)
368 int hash; 368 int hash;
369 369
370 new = (struct dasd_devmap *) 370 new = (struct dasd_devmap *)
371 kmalloc(sizeof(struct dasd_devmap), GFP_KERNEL); 371 kzalloc(sizeof(struct dasd_devmap), GFP_KERNEL);
372 if (!new) 372 if (!new)
373 return ERR_PTR(-ENOMEM); 373 return ERR_PTR(-ENOMEM);
374 spin_lock(&dasd_devmap_lock); 374 spin_lock(&dasd_devmap_lock);
@@ -630,7 +630,8 @@ dasd_ro_show(struct device *dev, struct device_attribute *attr, char *buf)
630} 630}
631 631
632static ssize_t 632static ssize_t
633dasd_ro_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) 633dasd_ro_store(struct device *dev, struct device_attribute *attr,
634 const char *buf, size_t count)
634{ 635{
635 struct dasd_devmap *devmap; 636 struct dasd_devmap *devmap;
636 int ro_flag; 637 int ro_flag;
@@ -658,7 +659,7 @@ static DEVICE_ATTR(readonly, 0644, dasd_ro_show, dasd_ro_store);
658 * use_diag controls whether the driver should use diag rather than ssch 659 * use_diag controls whether the driver should use diag rather than ssch
659 * to talk to the device 660 * to talk to the device
660 */ 661 */
661static ssize_t 662static ssize_t
662dasd_use_diag_show(struct device *dev, struct device_attribute *attr, char *buf) 663dasd_use_diag_show(struct device *dev, struct device_attribute *attr, char *buf)
663{ 664{
664 struct dasd_devmap *devmap; 665 struct dasd_devmap *devmap;
@@ -673,7 +674,8 @@ dasd_use_diag_show(struct device *dev, struct device_attribute *attr, char *buf)
673} 674}
674 675
675static ssize_t 676static ssize_t
676dasd_use_diag_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) 677dasd_use_diag_store(struct device *dev, struct device_attribute *attr,
678 const char *buf, size_t count)
677{ 679{
678 struct dasd_devmap *devmap; 680 struct dasd_devmap *devmap;
679 ssize_t rc; 681 ssize_t rc;
@@ -697,11 +699,11 @@ dasd_use_diag_store(struct device *dev, struct device_attribute *attr, const cha
697 return rc; 699 return rc;
698} 700}
699 701
700static 702static DEVICE_ATTR(use_diag, 0644, dasd_use_diag_show, dasd_use_diag_store);
701DEVICE_ATTR(use_diag, 0644, dasd_use_diag_show, dasd_use_diag_store);
702 703
703static ssize_t 704static ssize_t
704dasd_discipline_show(struct device *dev, struct device_attribute *attr, char *buf) 705dasd_discipline_show(struct device *dev, struct device_attribute *attr,
706 char *buf)
705{ 707{
706 struct dasd_devmap *devmap; 708 struct dasd_devmap *devmap;
707 char *dname; 709 char *dname;
diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c
index 3f9d704d2657..4002f6c1c1b3 100644
--- a/drivers/s390/block/dasd_diag.c
+++ b/drivers/s390/block/dasd_diag.c
@@ -1,4 +1,4 @@
1/* 1/*
2 * File...........: linux/drivers/s390/block/dasd_diag.c 2 * File...........: linux/drivers/s390/block/dasd_diag.c
3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> 3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4 * Based on.......: linux/drivers/s390/block/mdisk.c 4 * Based on.......: linux/drivers/s390/block/mdisk.c
@@ -336,7 +336,7 @@ dasd_diag_check_device(struct dasd_device *device)
336 336
337 private = (struct dasd_diag_private *) device->private; 337 private = (struct dasd_diag_private *) device->private;
338 if (private == NULL) { 338 if (private == NULL) {
339 private = kmalloc(sizeof(struct dasd_diag_private),GFP_KERNEL); 339 private = kzalloc(sizeof(struct dasd_diag_private),GFP_KERNEL);
340 if (private == NULL) { 340 if (private == NULL) {
341 DEV_MESSAGE(KERN_WARNING, device, "%s", 341 DEV_MESSAGE(KERN_WARNING, device, "%s",
342 "memory allocation failed for private data"); 342 "memory allocation failed for private data");
@@ -527,7 +527,7 @@ dasd_diag_build_cp(struct dasd_device * device, struct request *req)
527 datasize, device); 527 datasize, device);
528 if (IS_ERR(cqr)) 528 if (IS_ERR(cqr))
529 return cqr; 529 return cqr;
530 530
531 dreq = (struct dasd_diag_req *) cqr->data; 531 dreq = (struct dasd_diag_req *) cqr->data;
532 dreq->block_count = count; 532 dreq->block_count = count;
533 dbio = dreq->bio; 533 dbio = dreq->bio;
diff --git a/drivers/s390/block/dasd_diag.h b/drivers/s390/block/dasd_diag.h
index 38a4e55f8953..b8c78267ff3e 100644
--- a/drivers/s390/block/dasd_diag.h
+++ b/drivers/s390/block/dasd_diag.h
@@ -1,4 +1,4 @@
1/* 1/*
2 * File...........: linux/drivers/s390/block/dasd_diag.h 2 * File...........: linux/drivers/s390/block/dasd_diag.h
3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> 3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4 * Based on.......: linux/drivers/s390/block/mdisk.h 4 * Based on.......: linux/drivers/s390/block/mdisk.h
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index 7565d30f8c2f..12257776e79b 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * File...........: linux/drivers/s390/block/dasd_eckd.c 2 * File...........: linux/drivers/s390/block/dasd_eckd.c
3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> 3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4 * Horst Hummel <Horst.Hummel@de.ibm.com> 4 * Horst Hummel <Horst.Hummel@de.ibm.com>
5 * Carsten Otte <Cotte@de.ibm.com> 5 * Carsten Otte <Cotte@de.ibm.com>
6 * Martin Schwidefsky <schwidefsky@de.ibm.com> 6 * Martin Schwidefsky <schwidefsky@de.ibm.com>
7 * Bugreports.to..: <Linux390@de.ibm.com> 7 * Bugreports.to..: <Linux390@de.ibm.com>
@@ -210,14 +210,14 @@ check_XRC (struct ccw1 *de_ccw,
210 210
211 /* switch on System Time Stamp - needed for XRC Support */ 211 /* switch on System Time Stamp - needed for XRC Support */
212 if (private->rdc_data.facilities.XRC_supported) { 212 if (private->rdc_data.facilities.XRC_supported) {
213 213
214 data->ga_extended |= 0x08; /* switch on 'Time Stamp Valid' */ 214 data->ga_extended |= 0x08; /* switch on 'Time Stamp Valid' */
215 data->ga_extended |= 0x02; /* switch on 'Extended Parameter' */ 215 data->ga_extended |= 0x02; /* switch on 'Extended Parameter' */
216 216
217 data->ep_sys_time = get_clock (); 217 data->ep_sys_time = get_clock ();
218 218
219 de_ccw->count = sizeof (struct DE_eckd_data); 219 de_ccw->count = sizeof (struct DE_eckd_data);
220 de_ccw->flags |= CCW_FLAG_SLI; 220 de_ccw->flags |= CCW_FLAG_SLI;
221 } 221 }
222 222
223 return; 223 return;
@@ -296,8 +296,8 @@ define_extent(struct ccw1 * ccw, struct DE_eckd_data * data, int trk,
296 /* check for sequential prestage - enhance cylinder range */ 296 /* check for sequential prestage - enhance cylinder range */
297 if (data->attributes.operation == DASD_SEQ_PRESTAGE || 297 if (data->attributes.operation == DASD_SEQ_PRESTAGE ||
298 data->attributes.operation == DASD_SEQ_ACCESS) { 298 data->attributes.operation == DASD_SEQ_ACCESS) {
299 299
300 if (end.cyl + private->attrib.nr_cyl < geo.cyl) 300 if (end.cyl + private->attrib.nr_cyl < geo.cyl)
301 end.cyl += private->attrib.nr_cyl; 301 end.cyl += private->attrib.nr_cyl;
302 else 302 else
303 end.cyl = (geo.cyl - 1); 303 end.cyl = (geo.cyl - 1);
@@ -317,7 +317,7 @@ locate_record(struct ccw1 *ccw, struct LO_eckd_data *data, int trk,
317 struct dasd_eckd_private *private; 317 struct dasd_eckd_private *private;
318 int sector; 318 int sector;
319 int dn, d; 319 int dn, d;
320 320
321 private = (struct dasd_eckd_private *) device->private; 321 private = (struct dasd_eckd_private *) device->private;
322 322
323 DBF_DEV_EVENT(DBF_INFO, device, 323 DBF_DEV_EVENT(DBF_INFO, device,
@@ -554,7 +554,7 @@ dasd_eckd_check_characteristics(struct dasd_device *device)
554 554
555 private = (struct dasd_eckd_private *) device->private; 555 private = (struct dasd_eckd_private *) device->private;
556 if (private == NULL) { 556 if (private == NULL) {
557 private = kmalloc(sizeof(struct dasd_eckd_private), 557 private = kzalloc(sizeof(struct dasd_eckd_private),
558 GFP_KERNEL | GFP_DMA); 558 GFP_KERNEL | GFP_DMA);
559 if (private == NULL) { 559 if (private == NULL) {
560 DEV_MESSAGE(KERN_WARNING, device, "%s", 560 DEV_MESSAGE(KERN_WARNING, device, "%s",
@@ -562,7 +562,6 @@ dasd_eckd_check_characteristics(struct dasd_device *device)
562 "data"); 562 "data");
563 return -ENOMEM; 563 return -ENOMEM;
564 } 564 }
565 memset(private, 0, sizeof(struct dasd_eckd_private));
566 device->private = (void *) private; 565 device->private = (void *) private;
567 } 566 }
568 /* Invalidate status of initial analysis. */ 567 /* Invalidate status of initial analysis. */
@@ -773,7 +772,7 @@ dasd_eckd_end_analysis(struct dasd_device *device)
773 ((private->rdc_data.no_cyl * 772 ((private->rdc_data.no_cyl *
774 private->rdc_data.trk_per_cyl * 773 private->rdc_data.trk_per_cyl *
775 blk_per_trk * (device->bp_block >> 9)) >> 1), 774 blk_per_trk * (device->bp_block >> 9)) >> 1),
776 ((blk_per_trk * device->bp_block) >> 10), 775 ((blk_per_trk * device->bp_block) >> 10),
777 private->uses_cdl ? 776 private->uses_cdl ?
778 "compatible disk layout" : "linux disk layout"); 777 "compatible disk layout" : "linux disk layout");
779 778
@@ -970,7 +969,7 @@ dasd_eckd_format_device(struct dasd_device * device,
970 if (i < 3) { 969 if (i < 3) {
971 ect->kl = 4; 970 ect->kl = 4;
972 ect->dl = sizes_trk0[i] - 4; 971 ect->dl = sizes_trk0[i] - 4;
973 } 972 }
974 } 973 }
975 if ((fdata->intensity & 0x08) && 974 if ((fdata->intensity & 0x08) &&
976 fdata->start_unit == 1) { 975 fdata->start_unit == 1) {
@@ -1270,7 +1269,7 @@ dasd_eckd_fill_info(struct dasd_device * device,
1270 1269
1271/* 1270/*
1272 * Release device ioctl. 1271 * Release device ioctl.
1273 * Buils a channel programm to releases a prior reserved 1272 * Buils a channel programm to releases a prior reserved
1274 * (see dasd_eckd_reserve) device. 1273 * (see dasd_eckd_reserve) device.
1275 */ 1274 */
1276static int 1275static int
@@ -1310,8 +1309,8 @@ dasd_eckd_release(struct dasd_device *device)
1310/* 1309/*
1311 * Reserve device ioctl. 1310 * Reserve device ioctl.
1312 * Options are set to 'synchronous wait for interrupt' and 1311 * Options are set to 'synchronous wait for interrupt' and
1313 * 'timeout the request'. This leads to a terminate IO if 1312 * 'timeout the request'. This leads to a terminate IO if
1314 * the interrupt is outstanding for a certain time. 1313 * the interrupt is outstanding for a certain time.
1315 */ 1314 */
1316static int 1315static int
1317dasd_eckd_reserve(struct dasd_device *device) 1316dasd_eckd_reserve(struct dasd_device *device)
@@ -1349,7 +1348,7 @@ dasd_eckd_reserve(struct dasd_device *device)
1349 1348
1350/* 1349/*
1351 * Steal lock ioctl - unconditional reserve device. 1350 * Steal lock ioctl - unconditional reserve device.
1352 * Buils a channel programm to break a device's reservation. 1351 * Buils a channel programm to break a device's reservation.
1353 * (unconditional reserve) 1352 * (unconditional reserve)
1354 */ 1353 */
1355static int 1354static int
@@ -1706,22 +1705,3 @@ dasd_eckd_cleanup(void)
1706 1705
1707module_init(dasd_eckd_init); 1706module_init(dasd_eckd_init);
1708module_exit(dasd_eckd_cleanup); 1707module_exit(dasd_eckd_cleanup);
1709
1710/*
1711 * Overrides for Emacs so that we follow Linus's tabbing style.
1712 * Emacs will notice this stuff at the end of the file and automatically
1713 * adjust the settings for this buffer only. This must remain at the end
1714 * of the file.
1715 * ---------------------------------------------------------------------------
1716 * Local variables:
1717 * c-indent-level: 4
1718 * c-brace-imaginary-offset: 0
1719 * c-brace-offset: -4
1720 * c-argdecl-indent: 4
1721 * c-label-offset: -4
1722 * c-continued-statement-offset: 4
1723 * c-continued-brace-offset: 0
1724 * indent-tabs-mode: 1
1725 * tab-width: 8
1726 * End:
1727 */
diff --git a/drivers/s390/block/dasd_eckd.h b/drivers/s390/block/dasd_eckd.h
index d5734e976e1c..9d91c8632569 100644
--- a/drivers/s390/block/dasd_eckd.h
+++ b/drivers/s390/block/dasd_eckd.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * File...........: linux/drivers/s390/block/dasd_eckd.h 2 * File...........: linux/drivers/s390/block/dasd_eckd.h
3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> 3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4 * Horst Hummel <Horst.Hummel@de.ibm.com> 4 * Horst Hummel <Horst.Hummel@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, 1999,2000 6 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
7 * 7 *
@@ -155,7 +155,7 @@ struct dasd_eckd_characteristics {
155 unsigned char reserved2:4; 155 unsigned char reserved2:4;
156 unsigned char reserved3:8; 156 unsigned char reserved3:8;
157 unsigned char defect_wr:1; 157 unsigned char defect_wr:1;
158 unsigned char XRC_supported:1; 158 unsigned char XRC_supported:1;
159 unsigned char reserved4:1; 159 unsigned char reserved4:1;
160 unsigned char striping:1; 160 unsigned char striping:1;
161 unsigned char reserved5:4; 161 unsigned char reserved5:4;
@@ -343,7 +343,7 @@ struct dasd_eckd_path {
343}; 343};
344 344
345/* 345/*
346 * Perform Subsystem Function - Prepare for Read Subsystem Data 346 * Perform Subsystem Function - Prepare for Read Subsystem Data
347 */ 347 */
348struct dasd_psf_prssd_data { 348struct dasd_psf_prssd_data {
349 unsigned char order; 349 unsigned char order;
diff --git a/drivers/s390/block/dasd_erp.c b/drivers/s390/block/dasd_erp.c
index b842377cb0c6..4108d96f6a5a 100644
--- a/drivers/s390/block/dasd_erp.c
+++ b/drivers/s390/block/dasd_erp.c
@@ -90,7 +90,7 @@ dasd_default_erp_action(struct dasd_ccw_req * cqr)
90 90
91 /* just retry - there is nothing to save ... I got no sense data.... */ 91 /* just retry - there is nothing to save ... I got no sense data.... */
92 if (cqr->retries > 0) { 92 if (cqr->retries > 0) {
93 DEV_MESSAGE (KERN_DEBUG, device, 93 DEV_MESSAGE (KERN_DEBUG, device,
94 "default ERP called (%i retries left)", 94 "default ERP called (%i retries left)",
95 cqr->retries); 95 cqr->retries);
96 cqr->lpm = LPM_ANYPATH; 96 cqr->lpm = LPM_ANYPATH;
@@ -155,7 +155,7 @@ dasd_default_erp_postaction(struct dasd_ccw_req * cqr)
155 155
156/* 156/*
157 * Print the hex dump of the memory used by a request. This includes 157 * Print the hex dump of the memory used by a request. This includes
158 * all error recovery ccws that have been chained in from of the 158 * all error recovery ccws that have been chained in from of the
159 * real request. 159 * real request.
160 */ 160 */
161static inline void 161static inline void
@@ -227,12 +227,12 @@ dasd_log_ccw(struct dasd_ccw_req * cqr, int caller, __u32 cpa)
227 /* 227 /*
228 * Log bytes arround failed CCW but only if we did 228 * Log bytes arround failed CCW but only if we did
229 * not log the whole CP of the CCW is outside the 229 * not log the whole CP of the CCW is outside the
230 * logged CP. 230 * logged CP.
231 */ 231 */
232 if (cplength > 40 || 232 if (cplength > 40 ||
233 ((addr_t) cpa < (addr_t) lcqr->cpaddr && 233 ((addr_t) cpa < (addr_t) lcqr->cpaddr &&
234 (addr_t) cpa > (addr_t) (lcqr->cpaddr + cplength + 4))) { 234 (addr_t) cpa > (addr_t) (lcqr->cpaddr + cplength + 4))) {
235 235
236 DEV_MESSAGE(KERN_ERR, device, 236 DEV_MESSAGE(KERN_ERR, device,
237 "Failed CCW (%p) (area):", 237 "Failed CCW (%p) (area):",
238 (void *) (long) cpa); 238 (void *) (long) cpa);
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c
index 91145698f8e9..d331c6e22c59 100644
--- a/drivers/s390/block/dasd_fba.c
+++ b/drivers/s390/block/dasd_fba.c
@@ -1,4 +1,4 @@
1/* 1/*
2 * File...........: linux/drivers/s390/block/dasd_fba.c 2 * File...........: linux/drivers/s390/block/dasd_fba.c
3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> 3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4 * Bugreports.to..: <Linux390@de.ibm.com> 4 * Bugreports.to..: <Linux390@de.ibm.com>
@@ -125,13 +125,13 @@ static int
125dasd_fba_check_characteristics(struct dasd_device *device) 125dasd_fba_check_characteristics(struct dasd_device *device)
126{ 126{
127 struct dasd_fba_private *private; 127 struct dasd_fba_private *private;
128 struct ccw_device *cdev = device->cdev; 128 struct ccw_device *cdev = device->cdev;
129 void *rdc_data; 129 void *rdc_data;
130 int rc; 130 int rc;
131 131
132 private = (struct dasd_fba_private *) device->private; 132 private = (struct dasd_fba_private *) device->private;
133 if (private == NULL) { 133 if (private == NULL) {
134 private = kmalloc(sizeof(struct dasd_fba_private), GFP_KERNEL); 134 private = kzalloc(sizeof(struct dasd_fba_private), GFP_KERNEL);
135 if (private == NULL) { 135 if (private == NULL) {
136 DEV_MESSAGE(KERN_WARNING, device, "%s", 136 DEV_MESSAGE(KERN_WARNING, device, "%s",
137 "memory allocation failed for private " 137 "memory allocation failed for private "
@@ -204,7 +204,7 @@ dasd_fba_examine_error(struct dasd_ccw_req * cqr, struct irb * irb)
204 if (irb->scsw.cstat == 0x00 && 204 if (irb->scsw.cstat == 0x00 &&
205 irb->scsw.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END)) 205 irb->scsw.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END))
206 return dasd_era_none; 206 return dasd_era_none;
207 207
208 cdev = device->cdev; 208 cdev = device->cdev;
209 switch (cdev->id.dev_type) { 209 switch (cdev->id.dev_type) {
210 case 0x3370: 210 case 0x3370:
@@ -539,7 +539,7 @@ dasd_fba_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req,
539 * 8192 bytes (=2 pages). For 64 bit one dasd_mchunkt_t structure has 539 * 8192 bytes (=2 pages). For 64 bit one dasd_mchunkt_t structure has
540 * 24 bytes, the struct dasd_ccw_req has 136 bytes and each block can use 540 * 24 bytes, the struct dasd_ccw_req has 136 bytes and each block can use
541 * up to 16 bytes (8 for the ccw and 8 for the idal pointer). In 541 * up to 16 bytes (8 for the ccw and 8 for the idal pointer). In
542 * addition we have one define extent ccw + 16 bytes of data and a 542 * addition we have one define extent ccw + 16 bytes of data and a
543 * locate record ccw for each block (stupid devices!) + 16 bytes of data. 543 * locate record ccw for each block (stupid devices!) + 16 bytes of data.
544 * That makes: 544 * That makes:
545 * (8192 - 24 - 136 - 8 - 16) / 40 = 200.2 blocks at maximum. 545 * (8192 - 24 - 136 - 8 - 16) / 40 = 200.2 blocks at maximum.
@@ -589,22 +589,3 @@ dasd_fba_cleanup(void)
589 589
590module_init(dasd_fba_init); 590module_init(dasd_fba_init);
591module_exit(dasd_fba_cleanup); 591module_exit(dasd_fba_cleanup);
592
593/*
594 * Overrides for Emacs so that we follow Linus's tabbing style.
595 * Emacs will notice this stuff at the end of the file and automatically
596 * adjust the settings for this buffer only. This must remain at the end
597 * of the file.
598 * ---------------------------------------------------------------------------
599 * Local variables:
600 * c-indent-level: 4
601 * c-brace-imaginary-offset: 0
602 * c-brace-offset: -4
603 * c-argdecl-indent: 4
604 * c-label-offset: -4
605 * c-continued-statement-offset: 4
606 * c-continued-brace-offset: 0
607 * indent-tabs-mode: 1
608 * tab-width: 8
609 * End:
610 */
diff --git a/drivers/s390/block/dasd_fba.h b/drivers/s390/block/dasd_fba.h
index da1fa91fc01d..14c910baa5fe 100644
--- a/drivers/s390/block/dasd_fba.h
+++ b/drivers/s390/block/dasd_fba.h
@@ -1,4 +1,4 @@
1/* 1/*
2 * File...........: linux/drivers/s390/block/dasd_fba.h 2 * File...........: linux/drivers/s390/block/dasd_fba.h
3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> 3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4 * Bugreports.to..: <Linux390@de.ibm.com> 4 * Bugreports.to..: <Linux390@de.ibm.com>
diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h
index d4b13e300a76..2c1fa85a3dad 100644
--- a/drivers/s390/block/dasd_int.h
+++ b/drivers/s390/block/dasd_int.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * File...........: linux/drivers/s390/block/dasd_int.h 2 * File...........: linux/drivers/s390/block/dasd_int.h
3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> 3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4 * Horst Hummel <Horst.Hummel@de.ibm.com> 4 * Horst Hummel <Horst.Hummel@de.ibm.com>
5 * Martin Schwidefsky <schwidefsky@de.ibm.com> 5 * Martin Schwidefsky <schwidefsky@de.ibm.com>
6 * Bugreports.to..: <Linux390@de.ibm.com> 6 * Bugreports.to..: <Linux390@de.ibm.com>
7 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 7 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
@@ -186,7 +186,7 @@ struct dasd_ccw_req {
186 void *callback_data; 186 void *callback_data;
187}; 187};
188 188
189/* 189/*
190 * dasd_ccw_req -> status can be: 190 * dasd_ccw_req -> status can be:
191 */ 191 */
192#define DASD_CQR_FILLED 0x00 /* request is ready to be processed */ 192#define DASD_CQR_FILLED 0x00 /* request is ready to be processed */
@@ -248,7 +248,7 @@ struct dasd_discipline {
248 /* 248 /*
249 * Error recovery functions. examine_error() returns a value that 249 * Error recovery functions. examine_error() returns a value that
250 * indicates what to do for an error condition. If examine_error() 250 * indicates what to do for an error condition. If examine_error()
251 * returns 'dasd_era_recover' erp_action() is called to create a 251 * returns 'dasd_era_recover' erp_action() is called to create a
252 * special error recovery ccw. erp_postaction() is called after 252 * special error recovery ccw. erp_postaction() is called after
253 * an error recovery ccw has finished its execution. dump_sense 253 * an error recovery ccw has finished its execution. dump_sense
254 * is called for every error condition to print the sense data 254 * is called for every error condition to print the sense data
@@ -302,11 +302,11 @@ struct dasd_device {
302 spinlock_t request_queue_lock; 302 spinlock_t request_queue_lock;
303 struct block_device *bdev; 303 struct block_device *bdev;
304 unsigned int devindex; 304 unsigned int devindex;
305 unsigned long blocks; /* size of volume in blocks */ 305 unsigned long blocks; /* size of volume in blocks */
306 unsigned int bp_block; /* bytes per block */ 306 unsigned int bp_block; /* bytes per block */
307 unsigned int s2b_shift; /* log2 (bp_block/512) */ 307 unsigned int s2b_shift; /* log2 (bp_block/512) */
308 unsigned long flags; /* per device flags */ 308 unsigned long flags; /* per device flags */
309 unsigned short features; /* copy of devmap-features (read-only!) */ 309 unsigned short features; /* copy of devmap-features (read-only!) */
310 310
311 /* extended error reporting stuff (eer) */ 311 /* extended error reporting stuff (eer) */
312 struct dasd_ccw_req *eer_cqr; 312 struct dasd_ccw_req *eer_cqr;
@@ -606,22 +606,3 @@ static inline int dasd_eer_enabled(struct dasd_device *device)
606#endif /* __KERNEL__ */ 606#endif /* __KERNEL__ */
607 607
608#endif /* DASD_H */ 608#endif /* DASD_H */
609
610/*
611 * Overrides for Emacs so that we follow Linus's tabbing style.
612 * Emacs will notice this stuff at the end of the file and automatically
613 * adjust the settings for this buffer only. This must remain at the end
614 * of the file.
615 * ---------------------------------------------------------------------------
616 * Local variables:
617 * c-indent-level: 4
618 * c-brace-imaginary-offset: 0
619 * c-brace-offset: -4
620 * c-argdecl-indent: 4
621 * c-label-offset: -4
622 * c-continued-statement-offset: 4
623 * c-continued-brace-offset: 0
624 * indent-tabs-mode: 1
625 * tab-width: 8
626 * End:
627 */
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c
index b8c80d28df41..302bcd0f28be 100644
--- a/drivers/s390/block/dasd_ioctl.c
+++ b/drivers/s390/block/dasd_ioctl.c
@@ -90,10 +90,10 @@ static int
90dasd_ioctl_quiesce(struct dasd_device *device) 90dasd_ioctl_quiesce(struct dasd_device *device)
91{ 91{
92 unsigned long flags; 92 unsigned long flags;
93 93
94 if (!capable (CAP_SYS_ADMIN)) 94 if (!capable (CAP_SYS_ADMIN))
95 return -EACCES; 95 return -EACCES;
96 96
97 DEV_MESSAGE (KERN_DEBUG, device, "%s", 97 DEV_MESSAGE (KERN_DEBUG, device, "%s",
98 "Quiesce IO on device"); 98 "Quiesce IO on device");
99 spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); 99 spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags);
@@ -110,13 +110,13 @@ static int
110dasd_ioctl_resume(struct dasd_device *device) 110dasd_ioctl_resume(struct dasd_device *device)
111{ 111{
112 unsigned long flags; 112 unsigned long flags;
113 113
114 if (!capable (CAP_SYS_ADMIN)) 114 if (!capable (CAP_SYS_ADMIN))
115 return -EACCES; 115 return -EACCES;
116 116
117 DEV_MESSAGE (KERN_DEBUG, device, "%s", 117 DEV_MESSAGE (KERN_DEBUG, device, "%s",
118 "resume IO on device"); 118 "resume IO on device");
119 119
120 spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); 120 spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags);
121 device->stopped &= ~DASD_STOPPED_QUIESCE; 121 device->stopped &= ~DASD_STOPPED_QUIESCE;
122 spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags); 122 spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags);
@@ -287,7 +287,7 @@ dasd_ioctl_information(struct dasd_device *device,
287 dasd_info->open_count = atomic_read(&device->open_count); 287 dasd_info->open_count = atomic_read(&device->open_count);
288 if (!device->bdev) 288 if (!device->bdev)
289 dasd_info->open_count++; 289 dasd_info->open_count++;
290 290
291 /* 291 /*
292 * check if device is really formatted 292 * check if device is really formatted
293 * LDL / CDL was returned by 'fill_info' 293 * LDL / CDL was returned by 'fill_info'