Lines Matching +full:ese +full:- +full:present
1 // SPDX-License-Identifier: GPL-2.0
12 * dasd_get_device is a no-no from interrupt context.
54 * <devno> : (0x)?[0-9a-fA-F]+
55 * <busid> : [0-0a-f]\.[0-9a-f]\.(0x)?[0-9a-fA-F]+
58 * <devno-range> : <devno>(-<devno>)?<feature_list>?
59 * <busid-range> : <busid>(-<busid>)?<feature_list>?
60 * <devices> : <devno-range>|<busid-range>
139 return -EINVAL; in dasd_busid()
152 return -EINVAL; in dasd_busid()
160 return -EINVAL; in dasd_busid()
165 return -EINVAL; in dasd_busid()
170 return -EINVAL; in dasd_busid()
205 rc = -EINVAL; in dasd_feature_list()
267 return -EINVAL; in dasd_parse_keyword()
274 * 0.0.1234-0.0.5678(ro:erplog) -> from: 0.0.1234 to: 0.0.5678 features: ro:erplog
275 * 0.0.8765(raw) -> from: 0.0.8765 to: null features: raw
276 * 0x4321 -> from: 0x4321 to: null features: null
284 if (strchr(range, '-')) { in dasd_evaluate_range_param()
285 *from_str = strsep(&range, "-"); in dasd_evaluate_range_param()
295 rc = -EINVAL; in dasd_evaluate_range_param()
321 return -ENOMEM; in dasd_parse_range()
324 rc = -EINVAL; in dasd_parse_range()
329 rc = -EINVAL; in dasd_parse_range()
338 rc = -EINVAL; in dasd_parse_range()
343 rc = -EINVAL; in dasd_parse_range()
350 rc = -EINVAL; in dasd_parse_range()
414 return ERR_PTR(-ENOMEM); in dasd_add_busid()
419 if (strncmp(tmp->bus_id, bus_id, DASD_BUS_ID_SIZE) == 0) { in dasd_add_busid()
425 new->devindex = dasd_max_devindex++; in dasd_add_busid()
426 strscpy(new->bus_id, bus_id, DASD_BUS_ID_SIZE); in dasd_add_busid()
427 new->features = features; in dasd_add_busid()
428 new->device = NULL; in dasd_add_busid()
429 list_add(&new->list, &dasd_hashlists[hash]); in dasd_add_busid()
444 devmap = ERR_PTR(-ENODEV); in dasd_find_busid_locked()
447 if (strncmp(tmp->bus_id, bus_id, DASD_BUS_ID_SIZE) == 0) { in dasd_find_busid_locked()
475 return IS_ERR(dasd_find_busid(bus_id)) ? -ENOENT : 0; in dasd_busid_known()
491 BUG_ON(devmap->device != NULL); in dasd_forget_ranges()
492 list_del(&devmap->list); in dasd_forget_ranges()
513 if (tmp->devindex == devindex) { in dasd_device_from_devindex()
518 if (devmap && devmap->device) { in dasd_device_from_devindex()
519 device = devmap->device; in dasd_device_from_devindex()
522 device = ERR_PTR(-ENODEV); in dasd_device_from_devindex()
536 devmap = dasd_find_busid(dev_name(&cdev->dev)); in dasd_devmap_from_cdev()
538 devmap = dasd_add_busid(dev_name(&cdev->dev), in dasd_devmap_from_cdev()
561 atomic_set(&device->ref_count, 3); in dasd_create_device()
564 if (!devmap->device) { in dasd_create_device()
565 devmap->device = device; in dasd_create_device()
566 device->devindex = devmap->devindex; in dasd_create_device()
567 device->features = devmap->features; in dasd_create_device()
568 get_device(&cdev->dev); in dasd_create_device()
569 device->cdev = cdev; in dasd_create_device()
573 rc = -EBUSY; in dasd_create_device()
582 dev_set_drvdata(&cdev->dev, device); in dasd_create_device()
585 device->paths_info = kset_create_and_add("paths_info", NULL, in dasd_create_device()
586 &device->cdev->dev.kobj); in dasd_create_device()
587 if (!device->paths_info) in dasd_create_device()
588 dev_warn(&cdev->dev, "Could not create paths_info kset\n"); in dasd_create_device()
601 if (!device->discipline || !device->discipline->pprc_status) { in dasd_devmap_get_pprc_status()
602 dev_warn(&device->cdev->dev, "Unable to query copy relation status\n"); in dasd_devmap_get_pprc_status()
603 return -EOPNOTSUPP; in dasd_devmap_get_pprc_status()
607 return -ENOMEM; in dasd_devmap_get_pprc_status()
610 if (device->discipline->pprc_status(device, temp)) { in dasd_devmap_get_pprc_status()
611 dev_warn(&device->cdev->dev, "Error during copy relation status query\n"); in dasd_devmap_get_pprc_status()
613 return -EINVAL; in dasd_devmap_get_pprc_status()
633 if (data->dev_info[i].prim_cu_ssid == uid.ssid && in dasd_devmap_entry_from_pprc_data()
634 data->dev_info[i].primary == uid.real_unit_addr) in dasd_devmap_entry_from_pprc_data()
637 if (data->dev_info[i].sec_cu_ssid == uid.ssid && in dasd_devmap_entry_from_pprc_data()
638 data->dev_info[i].secondary == uid.real_unit_addr) in dasd_devmap_entry_from_pprc_data()
642 return -1; in dasd_devmap_entry_from_pprc_data()
649 * - is the given device part of a copy pair setup
650 * - does the state of the device match the state in the PPRC status data
651 * - does the device UID match with the UID in the PPRC status data
652 * - to prevent misrouted IO check if the given device is present in all
665 if (!device->discipline || !device->discipline->get_uid || in dasd_devmap_check_copy_relation()
666 device->discipline->get_uid(device, &uid)) in dasd_devmap_check_copy_relation()
669 i = dasd_devmap_entry_from_pprc_data(data, uid, entry->primary); in dasd_devmap_check_copy_relation()
671 dev_warn(&device->cdev->dev, "Device not part of a copy relation\n"); in dasd_devmap_check_copy_relation()
676 if (entry->primary) { in dasd_devmap_check_copy_relation()
677 if (data->dev_info[i].flags & 0x80) { in dasd_devmap_check_copy_relation()
678 dev_warn(&device->cdev->dev, "Copy pair secondary is setup as primary\n"); in dasd_devmap_check_copy_relation()
681 if (data->dev_info[i].prim_cu_ssid != uid.ssid || in dasd_devmap_check_copy_relation()
682 data->dev_info[i].primary != uid.real_unit_addr) { in dasd_devmap_check_copy_relation()
683 dev_warn(&device->cdev->dev, in dasd_devmap_check_copy_relation()
685 dev_name(&device->cdev->dev), in dasd_devmap_check_copy_relation()
686 data->dev_info[i].prim_cu_ssid | in dasd_devmap_check_copy_relation()
687 data->dev_info[i].primary); in dasd_devmap_check_copy_relation()
691 if (!(data->dev_info[i].flags & 0x80)) { in dasd_devmap_check_copy_relation()
692 dev_warn(&device->cdev->dev, "Copy pair primary is setup as secondary\n"); in dasd_devmap_check_copy_relation()
695 if (data->dev_info[i].sec_cu_ssid != uid.ssid || in dasd_devmap_check_copy_relation()
696 data->dev_info[i].secondary != uid.real_unit_addr) { in dasd_devmap_check_copy_relation()
697 dev_warn(&device->cdev->dev, in dasd_devmap_check_copy_relation()
699 dev_name(&device->cdev->dev), in dasd_devmap_check_copy_relation()
700 data->dev_info[i].sec_cu_ssid | in dasd_devmap_check_copy_relation()
701 data->dev_info[i].secondary); in dasd_devmap_check_copy_relation()
711 if (entry == ©->entry[j]) in dasd_devmap_check_copy_relation()
714 tmp_dev = copy->entry[j].device; in dasd_devmap_check_copy_relation()
722 if (dasd_devmap_entry_from_pprc_data(tmp_dat, uid, entry->primary) < 0) { in dasd_devmap_check_copy_relation()
723 dev_warn(&tmp_dev->cdev->dev, in dasd_devmap_check_copy_relation()
725 dev_name(&device->cdev->dev)); in dasd_devmap_check_copy_relation()
740 if (!device->copy) in dasd_devmap_delete_copy_relation_device()
743 copy = device->copy; in dasd_devmap_delete_copy_relation_device()
745 if (copy->entry[i].device == device) in dasd_devmap_delete_copy_relation_device()
746 copy->entry[i].device = NULL; in dasd_devmap_delete_copy_relation_device()
749 device->copy = NULL; in dasd_devmap_delete_copy_relation_device()
770 device = devmap->device; in dasd_devmap_set_device_copy_relation()
772 return -ENODEV; in dasd_devmap_set_device_copy_relation()
774 copy = devmap->copy; in dasd_devmap_set_device_copy_relation()
785 dev_err(&cdev->dev, "Copy relation not enabled on storage server\n"); in dasd_devmap_set_device_copy_relation()
786 rc = -EINVAL; in dasd_devmap_set_device_copy_relation()
790 if (!data->dev_info[0].state) { in dasd_devmap_set_device_copy_relation()
791 dev_warn(&device->cdev->dev, "Copy pair setup requested for device not in copy relation\n"); in dasd_devmap_set_device_copy_relation()
792 rc = -EINVAL; in dasd_devmap_set_device_copy_relation()
797 if (copy->entry[i].configured && in dasd_devmap_set_device_copy_relation()
798 strncmp(dev_name(&cdev->dev), in dasd_devmap_set_device_copy_relation()
799 copy->entry[i].busid, DASD_BUS_ID_SIZE) == 0) { in dasd_devmap_set_device_copy_relation()
800 entry = ©->entry[i]; in dasd_devmap_set_device_copy_relation()
805 dev_warn(&device->cdev->dev, "Copy relation entry not found\n"); in dasd_devmap_set_device_copy_relation()
806 rc = -EINVAL; in dasd_devmap_set_device_copy_relation()
811 dev_warn(&device->cdev->dev, "Copy relation faulty\n"); in dasd_devmap_set_device_copy_relation()
812 rc = -EINVAL; in dasd_devmap_set_device_copy_relation()
817 copy->entry[i].device = device; in dasd_devmap_set_device_copy_relation()
818 device->copy = copy; in dasd_devmap_set_device_copy_relation()
842 devmap = dasd_find_busid(dev_name(&device->cdev->dev)); in dasd_delete_device()
845 if (devmap->device != device) { in dasd_delete_device()
850 devmap->device = NULL; in dasd_delete_device()
854 spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); in dasd_delete_device()
855 dev_set_drvdata(&device->cdev->dev, NULL); in dasd_delete_device()
856 spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags); in dasd_delete_device()
864 atomic_sub(3, &device->ref_count); in dasd_delete_device()
867 wait_event(dasd_delete_wq, atomic_read(&device->ref_count) == 0); in dasd_delete_device()
871 kset_unregister(device->paths_info); in dasd_delete_device()
874 cdev = device->cdev; in dasd_delete_device()
875 device->cdev = NULL; in dasd_delete_device()
878 put_device(&cdev->dev); in dasd_delete_device()
903 struct dasd_device *device = dev_get_drvdata(&cdev->dev); in dasd_device_from_cdev_locked()
906 return ERR_PTR(-ENODEV); in dasd_device_from_cdev_locked()
930 devmap = dasd_find_busid(dev_name(&device->cdev->dev)); in dasd_add_link_to_gendisk()
934 gdp->private_data = devmap; in dasd_add_link_to_gendisk()
944 if (!gdp->private_data) in dasd_device_from_gendisk()
948 devmap = gdp->private_data; in dasd_device_from_gendisk()
949 if (devmap && devmap->device) { in dasd_device_from_gendisk()
950 device = devmap->device; in dasd_device_from_gendisk()
972 ff_flag = (devmap->features & DASD_FEATURE_FAILFAST) != 0; in dasd_ff_show()
985 return -EINVAL; in dasd_ff_store()
1008 ro_flag = !!(devmap->features & DASD_FEATURE_READONLY); in dasd_ro_show()
1011 device = devmap->device; in dasd_ro_show()
1013 ro_flag |= test_bit(DASD_FLAG_DEVICE_RO, &device->flags); in dasd_ro_show()
1031 return -EINVAL; in dasd_ro_store()
1042 val = val || test_bit(DASD_FLAG_DEVICE_RO, &device->flags); in dasd_ro_store()
1044 if (!device->block || !device->block->gdp || in dasd_ro_store()
1045 test_bit(DASD_FLAG_OFFLINE, &device->flags)) { in dasd_ro_store()
1050 atomic_inc(&device->block->open_count); in dasd_ro_store()
1053 set_disk_ro(device->block->gdp, val); in dasd_ro_store()
1054 atomic_dec(&device->block->open_count); in dasd_ro_store()
1075 erplog = (devmap->features & DASD_FEATURE_ERPLOG) != 0; in dasd_erplog_show()
1089 return -EINVAL; in dasd_erplog_store()
1110 use_diag = (devmap->features & DASD_FEATURE_USEDIAG) != 0; in dasd_use_diag_show()
1129 return -EINVAL; in dasd_use_diag_store()
1134 if (!devmap->device && !(devmap->features & DASD_FEATURE_USERAW)) { in dasd_use_diag_store()
1136 devmap->features |= DASD_FEATURE_USEDIAG; in dasd_use_diag_store()
1138 devmap->features &= ~DASD_FEATURE_USEDIAG; in dasd_use_diag_store()
1140 rc = -EPERM; in dasd_use_diag_store()
1159 use_raw = (devmap->features & DASD_FEATURE_USERAW) != 0; in dasd_use_raw_show()
1178 return -EINVAL; in dasd_use_raw_store()
1183 if (!devmap->device && !(devmap->features & DASD_FEATURE_USEDIAG)) { in dasd_use_raw_store()
1185 devmap->features |= DASD_FEATURE_USERAW; in dasd_use_raw_store()
1187 devmap->features &= ~DASD_FEATURE_USERAW; in dasd_use_raw_store()
1189 rc = -EPERM; in dasd_use_raw_store()
1214 if (test_bit(DASD_FLAG_OFFLINE, &device->flags) || in dasd_safe_offline_store()
1215 test_bit(DASD_FLAG_SAFE_OFFLINE_RUNNING, &device->flags)) { in dasd_safe_offline_store()
1219 rc = -EBUSY; in dasd_safe_offline_store()
1223 set_bit(DASD_FLAG_SAFE_OFFLINE, &device->flags); in dasd_safe_offline_store()
1247 if (!device->discipline) in dasd_access_show()
1248 count = -ENODEV; in dasd_access_show()
1249 else if (!device->discipline->host_access_count) in dasd_access_show()
1250 count = -EOPNOTSUPP; in dasd_access_show()
1252 count = device->discipline->host_access_count(device); in dasd_access_show()
1273 else if (!device->discipline) { in dasd_discipline_show()
1278 device->discipline->name); in dasd_discipline_show()
1298 switch (device->state) { in dasd_device_status_show()
1339 if (device->discipline && device->discipline->get_uid && in dasd_alias_show()
1340 !device->discipline->get_uid(device, &uid)) { in dasd_alias_show()
1366 if (device->discipline && device->discipline->get_uid && in dasd_vendor_show()
1367 !device->discipline->get_uid(device, &uid)) in dasd_vendor_show()
1390 if (device->discipline && device->discipline->get_uid && in dasd_uid_show()
1391 !device->discipline->get_uid(device, &uid)) { in dasd_uid_show()
1422 * extended error-reporting
1431 if (!IS_ERR(devmap) && devmap->device) in dasd_eer_show()
1432 eer_flag = dasd_eer_enabled(devmap->device); in dasd_eer_show()
1451 return -EINVAL; in dasd_eer_store()
1477 aq_mask = devmap->aq_mask; in dasd_aq_mask_show()
1489 return -EINVAL; in dasd_aq_mask_store()
1496 devmap->aq_mask = val; in dasd_aq_mask_store()
1497 if (devmap->device) in dasd_aq_mask_store()
1498 devmap->device->aq_mask = devmap->aq_mask; in dasd_aq_mask_store()
1518 flag = (devmap->features & DASD_FEATURE_REQUEUEQUIESCE) != 0; in dasd_aqr_show()
1532 return -EINVAL; in dasd_aqr_store()
1554 return -ENODEV; in dasd_aq_timeouts_show()
1555 len = sysfs_emit(buf, "%u\n", device->aq_timeouts); in dasd_aq_timeouts_show()
1569 return -ENODEV; in dasd_aq_timeouts_store()
1574 return -EINVAL; in dasd_aq_timeouts_store()
1578 device->aq_timeouts = val; in dasd_aq_timeouts_store()
1598 return -ENODEV; in dasd_expires_show()
1599 len = sysfs_emit(buf, "%lu\n", device->default_expires); in dasd_expires_show()
1613 return -ENODEV; in dasd_expires_store()
1618 return -EINVAL; in dasd_expires_store()
1622 device->default_expires = val; in dasd_expires_store()
1638 return -ENODEV; in dasd_retries_show()
1639 len = sysfs_emit(buf, "%lu\n", device->default_retries); in dasd_retries_show()
1653 return -ENODEV; in dasd_retries_store()
1658 return -EINVAL; in dasd_retries_store()
1662 device->default_retries = val; in dasd_retries_store()
1679 return -ENODEV; in dasd_timeout_show()
1680 len = sysfs_emit(buf, "%lu\n", device->blk_timeout); in dasd_timeout_show()
1693 if (IS_ERR(device) || !device->block) in dasd_timeout_store()
1694 return -ENODEV; in dasd_timeout_store()
1699 return -EINVAL; in dasd_timeout_store()
1701 if (!device->block->gdp) { in dasd_timeout_store()
1703 return -ENODEV; in dasd_timeout_store()
1706 device->blk_timeout = val; in dasd_timeout_store()
1707 blk_queue_rq_timeout(device->block->gdp->queue, val * HZ); in dasd_timeout_store()
1726 return -ENODEV; in dasd_path_reset_store()
1731 if (device->discipline && device->discipline->reset_path) in dasd_path_reset_store()
1732 device->discipline->reset_path(device, (__u8) val); in dasd_path_reset_store()
1748 return -ENODEV; in dasd_hpf_show()
1749 if (!device->discipline || !device->discipline->hpf_enabled) { in dasd_hpf_show()
1753 hpf = device->discipline->hpf_enabled(device); in dasd_hpf_show()
1772 if (devmap->features & DASD_FEATURE_FAILONSLCK) in dasd_reservation_policy_show()
1793 rc = -EINVAL; in dasd_reservation_policy_store()
1812 if (test_bit(DASD_FLAG_IS_RESERVED, &device->flags)) in dasd_reservation_state_show()
1814 else if (test_bit(DASD_FLAG_LOCK_STOLEN, &device->flags)) in dasd_reservation_state_show()
1831 return -ENODEV; in dasd_reservation_state_store()
1833 clear_bit(DASD_FLAG_LOCK_STOLEN, &device->flags); in dasd_reservation_state_store()
1835 rc = -EINVAL; in dasd_reservation_state_store()
1883 return -ENODEV; in dasd_path_threshold_show()
1884 len = sysfs_emit(buf, "%lu\n", device->path_thrhld); in dasd_path_threshold_show()
1899 return -ENODEV; in dasd_path_threshold_store()
1903 return -EINVAL; in dasd_path_threshold_store()
1906 device->path_thrhld = val; in dasd_path_threshold_store()
1927 flag = (devmap->features & DASD_FEATURE_PATH_AUTODISABLE) != 0; in dasd_path_autodisable_show()
1943 return -EINVAL; in dasd_path_autodisable_store()
1968 return -ENODEV; in dasd_path_interval_show()
1969 len = sysfs_emit(buf, "%lu\n", device->path_interval); in dasd_path_interval_show()
1984 return -ENODEV; in dasd_path_interval_store()
1989 return -EINVAL; in dasd_path_interval_store()
1993 device->path_interval = val; in dasd_path_interval_store()
2012 return -ENODEV; in dasd_device_fcs_show()
2014 if (fc_sec == -EINVAL) in dasd_device_fcs_show()
2028 unsigned int fc_sec = path->fc_security; in dasd_path_fcs_show()
2052 return -ENODEV; in dasd_copy_pair_show()
2054 if (!devmap->copy) in dasd_copy_pair_show()
2055 return -ENODEV; in dasd_copy_pair_show()
2057 copy = devmap->copy; in dasd_copy_pair_show()
2060 if (copy->entry[i].configured && copy->entry[i].primary) { in dasd_copy_pair_show()
2061 strscpy(prim_busid, copy->entry[i].busid, in dasd_copy_pair_show()
2071 if (copy->entry[i].configured && !copy->entry[i].primary) in dasd_copy_pair_show()
2073 copy->entry[i].busid); in dasd_copy_pair_show()
2090 if (copy->entry[i].configured && in dasd_devmap_set_copy_relation()
2091 strncmp(copy->entry[i].busid, busid, DASD_BUS_ID_SIZE) == 0) in dasd_devmap_set_copy_relation()
2094 if (!copy->entry[i].configured) in dasd_devmap_set_copy_relation()
2098 return -EINVAL; in dasd_devmap_set_copy_relation()
2100 copy->entry[i].configured = true; in dasd_devmap_set_copy_relation()
2101 strscpy(copy->entry[i].busid, busid, DASD_BUS_ID_SIZE); in dasd_devmap_set_copy_relation()
2103 copy->active = ©->entry[i]; in dasd_devmap_set_copy_relation()
2104 copy->entry[i].primary = true; in dasd_devmap_set_copy_relation()
2106 if (!devmap->copy) in dasd_devmap_set_copy_relation()
2107 devmap->copy = copy; in dasd_devmap_set_copy_relation()
2120 if (copy->entry[i].configured && in dasd_devmap_del_copy_relation()
2121 strncmp(copy->entry[i].busid, busid, DASD_BUS_ID_SIZE) == 0) in dasd_devmap_del_copy_relation()
2124 if (i == DASD_CP_ENTRIES || !copy->entry[i].configured) { in dasd_devmap_del_copy_relation()
2129 copy->entry[i].configured = false; in dasd_devmap_del_copy_relation()
2130 memset(copy->entry[i].busid, 0, DASD_BUS_ID_SIZE); in dasd_devmap_del_copy_relation()
2131 if (copy->active == ©->entry[i]) { in dasd_devmap_del_copy_relation()
2132 copy->active = NULL; in dasd_devmap_del_copy_relation()
2133 copy->entry[i].primary = false; in dasd_devmap_del_copy_relation()
2149 if (!devmap->copy) in dasd_devmap_clear_copy_relation()
2152 copy = devmap->copy; in dasd_devmap_clear_copy_relation()
2155 if (!copy->entry[i].configured) in dasd_devmap_clear_copy_relation()
2158 if (copy->entry[i].device == copy->active->device) in dasd_devmap_clear_copy_relation()
2161 if (copy->entry[i].device) in dasd_devmap_clear_copy_relation()
2166 if (strlen(copy->entry[i].busid) == 0) in dasd_devmap_clear_copy_relation()
2168 if (copy->entry[i].device) { in dasd_devmap_clear_copy_relation()
2169 dasd_put_device(copy->entry[i].device); in dasd_devmap_clear_copy_relation()
2170 copy->entry[i].device->copy = NULL; in dasd_devmap_clear_copy_relation()
2171 copy->entry[i].device = NULL; in dasd_devmap_clear_copy_relation()
2173 devmap = dasd_find_busid_locked(copy->entry[i].busid); in dasd_devmap_clear_copy_relation()
2174 devmap->copy = NULL; in dasd_devmap_clear_copy_relation()
2175 memset(copy->entry[i].busid, 0, DASD_BUS_ID_SIZE); in dasd_devmap_clear_copy_relation()
2196 return -ENOMEM; in dasd_devmap_parse_busid()
2201 return -EINVAL; in dasd_devmap_parse_busid()
2206 return -EINVAL; in dasd_devmap_parse_busid()
2210 return -EINVAL; in dasd_devmap_parse_busid()
2215 return -EINVAL; in dasd_devmap_parse_busid()
2237 return -EINVAL; in dasd_copy_pair_store()
2247 return -EINVAL; in dasd_copy_pair_store()
2266 if (sec_devmap->device) in dasd_copy_pair_store()
2267 return -EINVAL; in dasd_copy_pair_store()
2269 if (prim_devmap->copy) { in dasd_copy_pair_store()
2270 copy = prim_devmap->copy; in dasd_copy_pair_store()
2271 } else if (sec_devmap->copy) { in dasd_copy_pair_store()
2272 copy = sec_devmap->copy; in dasd_copy_pair_store()
2276 return -ENOMEM; in dasd_copy_pair_store()
2292 if (prim_devmap->device && !prim_devmap->device->copy) { in dasd_copy_pair_store()
2293 device = prim_devmap->device; in dasd_copy_pair_store()
2294 if (device->discipline->pprc_enabled) { in dasd_copy_pair_store()
2295 pprc_enabled = device->discipline->pprc_enabled(device); in dasd_copy_pair_store()
2296 rc = dasd_devmap_set_device_copy_relation(device->cdev, in dasd_copy_pair_store()
2299 rc = -EOPNOTSUPP; in dasd_copy_pair_store()
2323 return -ENODEV; in dasd_copy_role_show()
2325 if (!device->copy) { in dasd_copy_role_show()
2329 copy = device->copy; in dasd_copy_role_show()
2331 if (copy->active->device == device) { in dasd_copy_role_show()
2336 if (copy->entry[i].device == device) { in dasd_copy_role_show()
2358 return -ENODEV; in dasd_device_ping()
2366 if (test_bit(DASD_FLAG_OFFLINE, &device->flags)) { in dasd_device_ping()
2367 rc = -EBUSY; in dasd_device_ping()
2370 if (!device->discipline || !device->discipline->device_ping) { in dasd_device_ping()
2371 rc = -EOPNOTSUPP; in dasd_device_ping()
2374 rc = device->discipline->device_ping(device); in dasd_device_ping()
2393 return -ENODEV; \
2394 if (device->discipline && _func) \
2402 DASD_DEFINE_ATTR(ese, device->discipline->is_ese);
2403 DASD_DEFINE_ATTR(extent_size, device->discipline->ext_size);
2404 DASD_DEFINE_ATTR(pool_id, device->discipline->ext_pool_id);
2405 DASD_DEFINE_ATTR(space_configured, device->discipline->space_configured);
2406 DASD_DEFINE_ATTR(space_allocated, device->discipline->space_allocated);
2407 DASD_DEFINE_ATTR(logical_capacity, device->discipline->logical_capacity);
2408 DASD_DEFINE_ATTR(warn_threshold, device->discipline->ext_pool_warn_thrshld);
2409 DASD_DEFINE_ATTR(cap_at_warnlevel, device->discipline->ext_pool_cap_at_warnlevel);
2410 DASD_DEFINE_ATTR(pool_oos, device->discipline->ext_pool_oos);
2494 devmap = dasd_find_busid(dev_name(&cdev->dev)); in dasd_get_feature()
2498 return ((devmap->features & feature) != 0); in dasd_get_feature()
2516 devmap->features |= feature; in dasd_set_feature()
2518 devmap->features &= ~feature; in dasd_set_feature()
2519 if (devmap->device) in dasd_set_feature()
2520 devmap->device->features = devmap->features; in dasd_set_feature()
2540 device->path[chp].kobj.kset = device->paths_info; in dasd_path_init_kobj()
2541 kobject_init(&device->path[chp].kobj, &path_attr_type); in dasd_path_init_kobj()
2548 if (test_bit(DASD_FLAG_OFFLINE, &device->flags)) in dasd_path_create_kobj()
2550 if (!device->paths_info) { in dasd_path_create_kobj()
2551 dev_warn(&device->cdev->dev, "Unable to create paths objects\n"); in dasd_path_create_kobj()
2554 if (device->path[chp].in_sysfs) in dasd_path_create_kobj()
2556 if (!device->path[chp].conf_data) in dasd_path_create_kobj()
2561 rc = kobject_add(&device->path[chp].kobj, NULL, "%x.%02x", in dasd_path_create_kobj()
2562 device->path[chp].cssid, device->path[chp].chpid); in dasd_path_create_kobj()
2564 kobject_put(&device->path[chp].kobj); in dasd_path_create_kobj()
2565 device->path[chp].in_sysfs = true; in dasd_path_create_kobj()
2584 if (device->path[chp].in_sysfs) { in dasd_path_remove_kobj()
2585 kobject_put(&device->path[chp].kobj); in dasd_path_remove_kobj()
2586 device->path[chp].in_sysfs = false; in dasd_path_remove_kobj()