Lines Matching refs:devmap
311 struct dasd_devmap *devmap; in dasd_parse_range() local
360 devmap = dasd_add_busid(bus_id, features); in dasd_parse_range()
361 if (IS_ERR(devmap)) { in dasd_parse_range()
362 rc = PTR_ERR(devmap); in dasd_parse_range()
412 struct dasd_devmap *devmap, *new, *tmp; in dasd_add_busid() local
419 devmap = NULL; in dasd_add_busid()
423 devmap = tmp; in dasd_add_busid()
426 if (!devmap) { in dasd_add_busid()
433 devmap = new; in dasd_add_busid()
438 return devmap; in dasd_add_busid()
447 struct dasd_devmap *devmap, *tmp; in dasd_find_busid() local
451 devmap = ERR_PTR(-ENODEV); in dasd_find_busid()
455 devmap = tmp; in dasd_find_busid()
460 return devmap; in dasd_find_busid()
479 struct dasd_devmap *devmap, *n; in dasd_forget_ranges() local
484 list_for_each_entry_safe(devmap, n, &dasd_hashlists[i], list) { in dasd_forget_ranges()
485 BUG_ON(devmap->device != NULL); in dasd_forget_ranges()
486 list_del(&devmap->list); in dasd_forget_ranges()
487 kfree(devmap); in dasd_forget_ranges()
499 struct dasd_devmap *devmap, *tmp; in dasd_device_from_devindex() local
504 devmap = NULL; in dasd_device_from_devindex()
505 for (i = 0; (i < 256) && !devmap; i++) in dasd_device_from_devindex()
509 devmap = tmp; in dasd_device_from_devindex()
512 if (devmap && devmap->device) { in dasd_device_from_devindex()
513 device = devmap->device; in dasd_device_from_devindex()
528 struct dasd_devmap *devmap; in dasd_devmap_from_cdev() local
530 devmap = dasd_find_busid(dev_name(&cdev->dev)); in dasd_devmap_from_cdev()
531 if (IS_ERR(devmap)) in dasd_devmap_from_cdev()
532 devmap = dasd_add_busid(dev_name(&cdev->dev), in dasd_devmap_from_cdev()
534 return devmap; in dasd_devmap_from_cdev()
543 struct dasd_devmap *devmap; in dasd_create_device() local
548 devmap = dasd_devmap_from_cdev(cdev); in dasd_create_device()
549 if (IS_ERR(devmap)) in dasd_create_device()
550 return (void *) devmap; in dasd_create_device()
558 if (!devmap->device) { in dasd_create_device()
559 devmap->device = device; in dasd_create_device()
560 device->devindex = devmap->devindex; in dasd_create_device()
561 device->features = devmap->features; in dasd_create_device()
595 struct dasd_devmap *devmap; in dasd_delete_device() local
599 devmap = dasd_find_busid(dev_name(&device->cdev->dev)); in dasd_delete_device()
600 BUG_ON(IS_ERR(devmap)); in dasd_delete_device()
602 if (devmap->device != device) { in dasd_delete_device()
607 devmap->device = NULL; in dasd_delete_device()
680 struct dasd_devmap *devmap; in dasd_add_link_to_gendisk() local
682 devmap = dasd_find_busid(dev_name(&device->cdev->dev)); in dasd_add_link_to_gendisk()
683 if (IS_ERR(devmap)) in dasd_add_link_to_gendisk()
686 gdp->private_data = devmap; in dasd_add_link_to_gendisk()
693 struct dasd_devmap *devmap; in dasd_device_from_gendisk() local
699 devmap = gdp->private_data; in dasd_device_from_gendisk()
700 if (devmap && devmap->device) { in dasd_device_from_gendisk()
701 device = devmap->device; in dasd_device_from_gendisk()
718 struct dasd_devmap *devmap; in dasd_ff_show() local
721 devmap = dasd_find_busid(dev_name(dev)); in dasd_ff_show()
722 if (!IS_ERR(devmap)) in dasd_ff_show()
723 ff_flag = (devmap->features & DASD_FEATURE_FAILFAST) != 0; in dasd_ff_show()
751 struct dasd_devmap *devmap; in dasd_ro_show() local
755 devmap = dasd_find_busid(dev_name(dev)); in dasd_ro_show()
756 if (IS_ERR(devmap)) in dasd_ro_show()
759 ro_flag = !!(devmap->features & DASD_FEATURE_READONLY); in dasd_ro_show()
762 device = devmap->device; in dasd_ro_show()
821 struct dasd_devmap *devmap; in dasd_erplog_show() local
824 devmap = dasd_find_busid(dev_name(dev)); in dasd_erplog_show()
825 if (!IS_ERR(devmap)) in dasd_erplog_show()
826 erplog = (devmap->features & DASD_FEATURE_ERPLOG) != 0; in dasd_erplog_show()
856 struct dasd_devmap *devmap; in dasd_use_diag_show() local
859 devmap = dasd_find_busid(dev_name(dev)); in dasd_use_diag_show()
860 if (!IS_ERR(devmap)) in dasd_use_diag_show()
861 use_diag = (devmap->features & DASD_FEATURE_USEDIAG) != 0; in dasd_use_diag_show()
871 struct dasd_devmap *devmap; in dasd_use_diag_store() local
875 devmap = dasd_devmap_from_cdev(to_ccwdev(dev)); in dasd_use_diag_store()
876 if (IS_ERR(devmap)) in dasd_use_diag_store()
877 return PTR_ERR(devmap); in dasd_use_diag_store()
885 if (!devmap->device && !(devmap->features & DASD_FEATURE_USERAW)) { in dasd_use_diag_store()
887 devmap->features |= DASD_FEATURE_USEDIAG; in dasd_use_diag_store()
889 devmap->features &= ~DASD_FEATURE_USEDIAG; in dasd_use_diag_store()
905 struct dasd_devmap *devmap; in dasd_use_raw_show() local
908 devmap = dasd_find_busid(dev_name(dev)); in dasd_use_raw_show()
909 if (!IS_ERR(devmap)) in dasd_use_raw_show()
910 use_raw = (devmap->features & DASD_FEATURE_USERAW) != 0; in dasd_use_raw_show()
920 struct dasd_devmap *devmap; in dasd_use_raw_store() local
924 devmap = dasd_devmap_from_cdev(to_ccwdev(dev)); in dasd_use_raw_store()
925 if (IS_ERR(devmap)) in dasd_use_raw_store()
926 return PTR_ERR(devmap); in dasd_use_raw_store()
934 if (!devmap->device && !(devmap->features & DASD_FEATURE_USEDIAG)) { in dasd_use_raw_store()
936 devmap->features |= DASD_FEATURE_USERAW; in dasd_use_raw_store()
938 devmap->features &= ~DASD_FEATURE_USERAW; in dasd_use_raw_store()
1188 struct dasd_devmap *devmap; in dasd_eer_show() local
1191 devmap = dasd_find_busid(dev_name(dev)); in dasd_eer_show()
1192 if (!IS_ERR(devmap) && devmap->device) in dasd_eer_show()
1193 eer_flag = dasd_eer_enabled(devmap->device); in dasd_eer_show()
1406 struct dasd_devmap *devmap; in dasd_reservation_policy_show() local
1409 devmap = dasd_find_busid(dev_name(dev)); in dasd_reservation_policy_show()
1410 if (IS_ERR(devmap)) { in dasd_reservation_policy_show()
1414 if (devmap->features & DASD_FEATURE_FAILONSLCK) in dasd_reservation_policy_show()
1564 struct dasd_devmap *devmap; in dasd_path_autodisable_show() local
1567 devmap = dasd_find_busid(dev_name(dev)); in dasd_path_autodisable_show()
1568 if (!IS_ERR(devmap)) in dasd_path_autodisable_show()
1569 flag = (devmap->features & DASD_FEATURE_PATH_AUTODISABLE) != 0; in dasd_path_autodisable_show()
1746 struct dasd_devmap *devmap; in dasd_get_feature() local
1748 devmap = dasd_find_busid(dev_name(&cdev->dev)); in dasd_get_feature()
1749 if (IS_ERR(devmap)) in dasd_get_feature()
1750 return PTR_ERR(devmap); in dasd_get_feature()
1752 return ((devmap->features & feature) != 0); in dasd_get_feature()
1762 struct dasd_devmap *devmap; in dasd_set_feature() local
1764 devmap = dasd_devmap_from_cdev(cdev); in dasd_set_feature()
1765 if (IS_ERR(devmap)) in dasd_set_feature()
1766 return PTR_ERR(devmap); in dasd_set_feature()
1770 devmap->features |= feature; in dasd_set_feature()
1772 devmap->features &= ~feature; in dasd_set_feature()
1773 if (devmap->device) in dasd_set_feature()
1774 devmap->device->features = devmap->features; in dasd_set_feature()