diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/block/dasd_diag.c | 10 | ||||
-rw-r--r-- | drivers/s390/block/dasd_ioctl.c | 4 | ||||
-rw-r--r-- | drivers/s390/char/raw3270.c | 5 | ||||
-rw-r--r-- | drivers/s390/cio/device_ops.c | 11 |
4 files changed, 23 insertions, 7 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 | ||
55 | struct dasd_diag_req { | 56 | struct 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); |
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index 758cfb542865..672eb0a3dd0b 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c | |||
@@ -255,6 +255,7 @@ dasd_ioctl_information(struct dasd_device *device, | |||
255 | unsigned long flags; | 255 | unsigned long flags; |
256 | int rc; | 256 | int rc; |
257 | struct ccw_device *cdev; | 257 | struct ccw_device *cdev; |
258 | struct ccw_dev_id dev_id; | ||
258 | 259 | ||
259 | if (!device->discipline->fill_info) | 260 | if (!device->discipline->fill_info) |
260 | return -EINVAL; | 261 | return -EINVAL; |
@@ -270,8 +271,9 @@ dasd_ioctl_information(struct dasd_device *device, | |||
270 | } | 271 | } |
271 | 272 | ||
272 | cdev = device->cdev; | 273 | cdev = device->cdev; |
274 | ccw_device_get_id(cdev, &dev_id); | ||
273 | 275 | ||
274 | dasd_info->devno = _ccw_device_get_device_number(device->cdev); | 276 | dasd_info->devno = dev_id.devno; |
275 | dasd_info->schid = _ccw_device_get_subchannel_number(device->cdev); | 277 | dasd_info->schid = _ccw_device_get_subchannel_number(device->cdev); |
276 | dasd_info->cu_type = cdev->id.cu_type; | 278 | dasd_info->cu_type = cdev->id.cu_type; |
277 | dasd_info->cu_model = cdev->id.cu_model; | 279 | dasd_info->cu_model = cdev->id.cu_model; |
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c index 8facd14adb7c..f6ef90ee3e7d 100644 --- a/drivers/s390/char/raw3270.c +++ b/drivers/s390/char/raw3270.c | |||
@@ -589,9 +589,10 @@ static int | |||
589 | __raw3270_size_device_vm(struct raw3270 *rp) | 589 | __raw3270_size_device_vm(struct raw3270 *rp) |
590 | { | 590 | { |
591 | int rc, model; | 591 | int rc, model; |
592 | struct ccw_dev_id dev_id; | ||
592 | 593 | ||
593 | raw3270_init_diag210.vrdcdvno = | 594 | ccw_device_get_id(rp->cdev, &dev_id); |
594 | _ccw_device_get_device_number(rp->cdev); | 595 | raw3270_init_diag210.vrdcdvno = dev_id.devno; |
595 | raw3270_init_diag210.vrdclen = sizeof(struct diag210); | 596 | raw3270_init_diag210.vrdclen = sizeof(struct diag210); |
596 | rc = diag210(&raw3270_init_diag210); | 597 | rc = diag210(&raw3270_init_diag210); |
597 | if (rc) | 598 | if (rc) |
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index 16f59fcb66b1..a5d263fb55ae 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c | |||
@@ -616,6 +616,17 @@ ccw_device_get_chp_desc(struct ccw_device *cdev, int chp_no) | |||
616 | return chp_get_chp_desc(chpid); | 616 | return chp_get_chp_desc(chpid); |
617 | } | 617 | } |
618 | 618 | ||
619 | /** | ||
620 | * ccw_device_get_id - obtain a ccw device id | ||
621 | * @cdev: device to obtain the id for | ||
622 | * @dev_id: where to fill in the values | ||
623 | */ | ||
624 | void ccw_device_get_id(struct ccw_device *cdev, struct ccw_dev_id *dev_id) | ||
625 | { | ||
626 | *dev_id = cdev->private->dev_id; | ||
627 | } | ||
628 | EXPORT_SYMBOL(ccw_device_get_id); | ||
629 | |||
619 | // FIXME: these have to go: | 630 | // FIXME: these have to go: |
620 | 631 | ||
621 | int | 632 | int |