aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_diag.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/block/dasd_diag.c')
-rw-r--r--drivers/s390/block/dasd_diag.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c
index e810e4a44ed4..eccac1c3b71b 100644
--- a/drivers/s390/block/dasd_diag.c
+++ b/drivers/s390/block/dasd_diag.c
@@ -50,6 +50,7 @@ struct dasd_diag_private {
50 struct dasd_diag_rw_io iob; 50 struct dasd_diag_rw_io iob;
51 struct dasd_diag_init_io iib; 51 struct dasd_diag_init_io iib;
52 blocknum_t pt_block; 52 blocknum_t pt_block;
53 struct ccw_dev_id dev_id;
53}; 54};
54 55
55struct dasd_diag_req { 56struct dasd_diag_req {
@@ -102,7 +103,7 @@ mdsk_init_io(struct dasd_device *device, unsigned int blocksize,
102 iib = &private->iib; 103 iib = &private->iib;
103 memset(iib, 0, sizeof (struct dasd_diag_init_io)); 104 memset(iib, 0, sizeof (struct dasd_diag_init_io));
104 105
105 iib->dev_nr = _ccw_device_get_device_number(device->cdev); 106 iib->dev_nr = private->dev_id.devno;
106 iib->block_size = blocksize; 107 iib->block_size = blocksize;
107 iib->offset = offset; 108 iib->offset = offset;
108 iib->flaga = DASD_DIAG_FLAGA_DEFAULT; 109 iib->flaga = DASD_DIAG_FLAGA_DEFAULT;
@@ -127,7 +128,7 @@ mdsk_term_io(struct dasd_device * device)
127 private = (struct dasd_diag_private *) device->private; 128 private = (struct dasd_diag_private *) device->private;
128 iib = &private->iib; 129 iib = &private->iib;
129 memset(iib, 0, sizeof (struct dasd_diag_init_io)); 130 memset(iib, 0, sizeof (struct dasd_diag_init_io));
130 iib->dev_nr = _ccw_device_get_device_number(device->cdev); 131 iib->dev_nr = private->dev_id.devno;
131 rc = dia250(iib, TERM_BIO); 132 rc = dia250(iib, TERM_BIO);
132 return rc; 133 return rc;
133} 134}
@@ -166,7 +167,7 @@ dasd_start_diag(struct dasd_ccw_req * cqr)
166 private = (struct dasd_diag_private *) device->private; 167 private = (struct dasd_diag_private *) device->private;
167 dreq = (struct dasd_diag_req *) cqr->data; 168 dreq = (struct dasd_diag_req *) cqr->data;
168 169
169 private->iob.dev_nr = _ccw_device_get_device_number(device->cdev); 170 private->iob.dev_nr = private->dev_id.devno;
170 private->iob.key = 0; 171 private->iob.key = 0;
171 private->iob.flags = DASD_DIAG_RWFLAG_ASYNC; 172 private->iob.flags = DASD_DIAG_RWFLAG_ASYNC;
172 private->iob.block_count = dreq->block_count; 173 private->iob.block_count = dreq->block_count;
@@ -323,11 +324,12 @@ dasd_diag_check_device(struct dasd_device *device)
323 "memory allocation failed for private data"); 324 "memory allocation failed for private data");
324 return -ENOMEM; 325 return -ENOMEM;
325 } 326 }
327 ccw_device_get_id(device->cdev, &private->dev_id);
326 device->private = (void *) private; 328 device->private = (void *) private;
327 } 329 }
328 /* Read Device Characteristics */ 330 /* Read Device Characteristics */
329 rdc_data = (void *) &(private->rdc_data); 331 rdc_data = (void *) &(private->rdc_data);
330 rdc_data->dev_nr = _ccw_device_get_device_number(device->cdev); 332 rdc_data->dev_nr = private->dev_id.devno;
331 rdc_data->rdc_len = sizeof (struct dasd_diag_characteristics); 333 rdc_data->rdc_len = sizeof (struct dasd_diag_characteristics);
332 334
333 rc = diag210((struct diag210 *) rdc_data); 335 rc = diag210((struct diag210 *) rdc_data);