aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_eckd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/block/dasd_eckd.c')
-rw-r--r--drivers/s390/block/dasd_eckd.c52
1 files changed, 16 insertions, 36 deletions
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 */