Lines Matching refs:base
46 struct dasd_device *base; in dasd_ioctl_enable() local
51 base = dasd_device_from_gendisk(bdev->bd_disk); in dasd_ioctl_enable()
52 if (!base) in dasd_ioctl_enable()
55 dasd_enable_device(base); in dasd_ioctl_enable()
59 (loff_t)get_capacity(base->block->gdp) << 9); in dasd_ioctl_enable()
61 dasd_put_device(base); in dasd_ioctl_enable()
72 struct dasd_device *base; in dasd_ioctl_disable() local
77 base = dasd_device_from_gendisk(bdev->bd_disk); in dasd_ioctl_disable()
78 if (!base) in dasd_ioctl_disable()
88 dasd_set_target_state(base, DASD_STATE_BASIC); in dasd_ioctl_disable()
96 dasd_put_device(base); in dasd_ioctl_disable()
106 struct dasd_device *base; in dasd_ioctl_quiesce() local
108 base = block->base; in dasd_ioctl_quiesce()
113 "state\n", dev_name(&base->cdev->dev)); in dasd_ioctl_quiesce()
114 spin_lock_irqsave(get_ccwdev_lock(base->cdev), flags); in dasd_ioctl_quiesce()
115 dasd_device_set_stop_bits(base, DASD_STOPPED_QUIESCE); in dasd_ioctl_quiesce()
116 spin_unlock_irqrestore(get_ccwdev_lock(base->cdev), flags); in dasd_ioctl_quiesce()
127 struct dasd_device *base; in dasd_ioctl_resume() local
129 base = block->base; in dasd_ioctl_resume()
134 "on the DASD\n", dev_name(&base->cdev->dev)); in dasd_ioctl_resume()
135 spin_lock_irqsave(get_ccwdev_lock(base->cdev), flags); in dasd_ioctl_resume()
136 dasd_device_remove_stop_bits(base, DASD_STOPPED_QUIESCE); in dasd_ioctl_resume()
137 spin_unlock_irqrestore(get_ccwdev_lock(base->cdev), flags); in dasd_ioctl_resume()
140 dasd_schedule_device_bh(base); in dasd_ioctl_resume()
150 struct dasd_device *base; in dasd_ioctl_abortio() local
153 base = block->base; in dasd_ioctl_abortio()
157 if (test_and_set_bit(DASD_FLAG_ABORTALL, &base->flags)) in dasd_ioctl_abortio()
159 DBF_DEV_EVENT(DBF_NOTICE, base, "%s", "abortall flag set"); in dasd_ioctl_abortio()
185 struct dasd_device *base; in dasd_ioctl_allowio() local
187 base = block->base; in dasd_ioctl_allowio()
191 if (test_and_clear_bit(DASD_FLAG_ABORTALL, &base->flags)) in dasd_ioctl_allowio()
192 DBF_DEV_EVENT(DBF_NOTICE, base, "%s", "abortall flag unset"); in dasd_ioctl_allowio()
206 struct dasd_device *base; in dasd_format() local
209 base = block->base; in dasd_format()
210 if (base->discipline->format_device == NULL) in dasd_format()
213 if (base->state != DASD_STATE_BASIC) { in dasd_format()
215 dev_name(&base->cdev->dev)); in dasd_format()
219 DBF_DEV_EVENT(DBF_NOTICE, base, in dasd_format()
235 rc = base->discipline->format_device(base, fdata, 1); in dasd_format()
237 rc = base->discipline->format_device(base, fdata, 0); in dasd_format()
245 struct dasd_device *base; in dasd_check_format() local
248 base = block->base; in dasd_check_format()
249 if (!base->discipline->check_device_format) in dasd_check_format()
252 rc = base->discipline->check_device_format(base, cdata, 1); in dasd_check_format()
254 rc = base->discipline->check_device_format(base, cdata, 0); in dasd_check_format()
265 struct dasd_device *base; in dasd_ioctl_format() local
273 base = dasd_device_from_gendisk(bdev->bd_disk); in dasd_ioctl_format()
274 if (!base) in dasd_ioctl_format()
276 if (base->features & DASD_FEATURE_READONLY || in dasd_ioctl_format()
277 test_bit(DASD_FLAG_DEVICE_RO, &base->flags)) { in dasd_ioctl_format()
278 dasd_put_device(base); in dasd_ioctl_format()
282 dasd_put_device(base); in dasd_ioctl_format()
287 dev_name(&base->cdev->dev)); in dasd_ioctl_format()
288 dasd_put_device(base); in dasd_ioctl_format()
291 rc = dasd_format(base->block, &fdata); in dasd_ioctl_format()
292 dasd_put_device(base); in dasd_ioctl_format()
303 struct dasd_device *base; in dasd_ioctl_check_format() local
309 base = dasd_device_from_gendisk(bdev->bd_disk); in dasd_ioctl_check_format()
310 if (!base) in dasd_ioctl_check_format()
314 dev_name(&base->cdev->dev)); in dasd_ioctl_check_format()
324 rc = dasd_check_format(base->block, &cdata); in dasd_ioctl_check_format()
332 dasd_put_device(base); in dasd_ioctl_check_format()
414 struct dasd_device *base; in dasd_ioctl_information() local
419 base = block->base; in dasd_ioctl_information()
420 if (!base->discipline || !base->discipline->fill_info) in dasd_ioctl_information()
427 rc = base->discipline->fill_info(base, dasd_info); in dasd_ioctl_information()
433 cdev = base->cdev; in dasd_ioctl_information()
443 dasd_info->status = base->state; in dasd_ioctl_information()
457 if ((base->state < DASD_STATE_READY) || in dasd_ioctl_information()
462 ((base->features & DASD_FEATURE_READONLY) != 0); in dasd_ioctl_information()
464 memcpy(dasd_info->type, base->discipline->name, 4); in dasd_ioctl_information()
477 spin_lock_irqsave(get_ccwdev_lock(base->cdev), flags); in dasd_ioctl_information()
478 list_for_each(l, &base->ccw_queue) in dasd_ioctl_information()
480 spin_unlock_irqrestore(get_ccwdev_lock(base->cdev), in dasd_ioctl_information()
500 struct dasd_device *base; in dasd_ioctl_set_ro() local
510 base = dasd_device_from_gendisk(bdev->bd_disk); in dasd_ioctl_set_ro()
511 if (!base) in dasd_ioctl_set_ro()
513 if (!intval && test_bit(DASD_FLAG_DEVICE_RO, &base->flags)) { in dasd_ioctl_set_ro()
514 dasd_put_device(base); in dasd_ioctl_set_ro()
518 rc = dasd_set_feature(base->cdev, DASD_FEATURE_READONLY, intval); in dasd_ioctl_set_ro()
519 dasd_put_device(base); in dasd_ioctl_set_ro()
530 ret = cmf_readall(block->base->cdev, &data); in dasd_ioctl_readall_cmb()
540 struct dasd_device *base; in dasd_ioctl() local
554 base = dasd_device_from_gendisk(bdev->bd_disk); in dasd_ioctl()
555 if (!base) in dasd_ioctl()
557 block = base->block; in dasd_ioctl()
603 rc = enable_cmf(base->cdev); in dasd_ioctl()
606 rc = disable_cmf(base->cdev); in dasd_ioctl()
614 if (base->discipline->ioctl) in dasd_ioctl()
615 rc = base->discipline->ioctl(block, cmd, argp); in dasd_ioctl()
617 dasd_put_device(base); in dasd_ioctl()