2 * File...........: linux/drivers/s390/block/dasd_devmap.c
3 * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4 * Horst Hummel <Horst.Hummel@de.ibm.com>
5 * Carsten Otte <Cotte@de.ibm.com>
6 * Martin Schwidefsky <schwidefsky@de.ibm.com>
7 * Bugreports.to..: <Linux390@de.ibm.com>
8 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001
10 * Device mapping and dasd= parameter parsing functions. All devmap
11 * functions may not be called from interrupt context. In particular
12 * dasd_get_device is a no-no from interrupt context.
16 #include <linux/config.h>
17 #include <linux/ctype.h>
18 #include <linux/init.h>
19 #include <linux/module.h>
21 #include <asm/debug.h>
22 #include <asm/uaccess.h>
25 #define PRINTK_HEADER "dasd_devmap:"
29 kmem_cache_t *dasd_page_cache;
30 EXPORT_SYMBOL_GPL(dasd_page_cache);
33 * dasd_devmap_t is used to store the features and the relation
34 * between device number and device index. To find a dasd_devmap_t
35 * that corresponds to a device number of a device index each
36 * dasd_devmap_t is added to two linked lists, one to search by
37 * the device number and one to search by the device index. As
38 * soon as big minor numbers are available the device index list
39 * can be removed since the device number will then be identical
40 * to the device index.
43 struct list_head list;
44 char bus_id[BUS_ID_SIZE];
45 unsigned int devindex;
46 unsigned short features;
47 struct dasd_device *device;
52 * dasd_servermap is used to store the server_id of all storage servers
53 * accessed by DASD device driver.
55 struct dasd_servermap {
56 struct list_head list;
63 static struct list_head dasd_serverlist;
66 * Parameter parsing functions for dasd= parameter. The syntax is:
67 * <devno> : (0x)?[0-9a-fA-F]+
68 * <busid> : [0-0a-f]\.[0-9a-f]\.(0x)?[0-9a-fA-F]+
70 * <feature_list> : \(<feature>(:<feature>)*\)
71 * <devno-range> : <devno>(-<devno>)?<feature_list>?
72 * <busid-range> : <busid>(-<busid>)?<feature_list>?
73 * <devices> : <devno-range>|<busid-range>
74 * <dasd_module> : dasd_diag_mod|dasd_eckd_mod|dasd_fba_mod
76 * <dasd> : autodetect|probeonly|<devices>(,<devices>)*
79 int dasd_probeonly = 0; /* is true, when probeonly mode is active */
80 int dasd_autodetect = 0; /* is true, when autodetection is active */
81 int dasd_nopav = 0; /* is true, when PAV is disabled */
82 EXPORT_SYMBOL_GPL(dasd_nopav);
85 * char *dasd[] is intended to hold the ranges supplied by the dasd= statement
86 * it is named 'dasd' to directly be filled by insmod with the comma separated
87 * strings when running as a module.
89 static char *dasd[256];
90 module_param_array(dasd, charp, NULL, 0);
93 * Single spinlock to protect devmap structures and lists.
95 static DEFINE_SPINLOCK(dasd_devmap_lock);
98 * Hash lists for devmap structures.
100 static struct list_head dasd_hashlists[256];
101 int dasd_max_devindex;
103 static struct dasd_devmap *dasd_add_busid(char *, int);
106 dasd_hash_busid(char *bus_id)
111 for (i = 0; (i < BUS_ID_SIZE) && *bus_id; i++, bus_id++)
118 * The parameter parsing functions for builtin-drivers are called
119 * before kmalloc works. Store the pointers to the parameters strings
120 * into dasd[] for later processing.
123 dasd_call_setup(char *str)
125 static int count = 0;
132 __setup ("dasd=", dasd_call_setup);
133 #endif /* #ifndef MODULE */
136 * Read a device busid/devno from a string.
139 dasd_busid(char **str, int *id0, int *id1, int *devno)
143 /* check for leading '0x' */
145 if ((*str)[0] == '0' && (*str)[1] == 'x') {
149 if (!isxdigit((*str)[0])) /* We require at least one hex digit */
151 val = simple_strtoul(*str, str, 16);
152 if (old_style || (*str)[0] != '.') {
154 if (val < 0 || val > 0xffff)
159 /* New style x.y.z busid */
160 if (val < 0 || val > 0xff)
164 if (!isxdigit((*str)[0])) /* We require at least one hex digit */
166 val = simple_strtoul(*str, str, 16);
167 if (val < 0 || val > 0xff || (*str)++[0] != '.')
170 if (!isxdigit((*str)[0])) /* We require at least one hex digit */
172 val = simple_strtoul(*str, str, 16);
173 if (val < 0 || val > 0xffff)
180 * Read colon separated list of dasd features. Currently there is
181 * only one: "ro" for read-only devices. The default feature set
182 * is empty (value 0).
185 dasd_feature_list(char *str, char **endp)
187 int features, len, rc;
192 return DASD_FEATURE_DEFAULT;
199 str[len] && str[len] != ':' && str[len] != ')'; len++);
200 if (len == 2 && !strncmp(str, "ro", 2))
201 features |= DASD_FEATURE_READONLY;
202 else if (len == 4 && !strncmp(str, "diag", 4))
203 features |= DASD_FEATURE_USEDIAG;
205 MESSAGE(KERN_WARNING,
206 "unsupported feature: %*s, "
207 "ignoring setting", len, str);
216 MESSAGE(KERN_WARNING, "%s",
217 "missing ')' in dasd parameter string\n");
228 * Try to match the first element on the comma separated parse string
229 * with one of the known keywords. If a keyword is found, take the approprate
230 * action and return a pointer to the residual string. If the first element
231 * could not be matched to any keyword then return an error code.
234 dasd_parse_keyword( char *parsestring ) {
236 char *nextcomma, *residual_str;
239 nextcomma = strchr(parsestring,',');
241 length = nextcomma - parsestring;
242 residual_str = nextcomma + 1;
244 length = strlen(parsestring);
245 residual_str = parsestring + length;
247 if (strncmp("autodetect", parsestring, length) == 0) {
249 MESSAGE (KERN_INFO, "%s",
250 "turning to autodetection mode");
253 if (strncmp("probeonly", parsestring, length) == 0) {
255 MESSAGE(KERN_INFO, "%s",
256 "turning to probeonly mode");
259 if (strncmp("nopav", parsestring, length) == 0) {
261 MESSAGE(KERN_INFO, "%s", "disable PAV mode");
264 if (strncmp("fixedbuffers", parsestring, length) == 0) {
268 kmem_cache_create("dasd_page_cache", PAGE_SIZE, 0,
269 SLAB_CACHE_DMA, NULL, NULL );
270 if (!dasd_page_cache)
271 MESSAGE(KERN_WARNING, "%s", "Failed to create slab, "
272 "fixed buffer mode disabled.");
274 MESSAGE (KERN_INFO, "%s",
275 "turning on fixed buffer mode");
278 return ERR_PTR(-EINVAL);
282 * Try to interprete the first element on the comma separated parse string
283 * as a device number or a range of devices. If the interpretation is
284 * successfull, create the matching dasd_devmap entries and return a pointer
285 * to the residual string.
286 * If interpretation fails or in case of an error, return an error code.
289 dasd_parse_range( char *parsestring ) {
291 struct dasd_devmap *devmap;
292 int from, from_id0, from_id1;
293 int to, to_id0, to_id1;
295 char bus_id[BUS_ID_SIZE+1], *str;
298 rc = dasd_busid(&str, &from_id0, &from_id1, &from);
305 rc = dasd_busid(&str, &to_id0, &to_id1, &to);
309 (from_id0 != to_id0 || from_id1 != to_id1 || from > to))
312 MESSAGE(KERN_ERR, "Invalid device range %s", parsestring);
315 features = dasd_feature_list(str, &str);
317 return ERR_PTR(-EINVAL);
318 /* each device in dasd= parameter should be set initially online */
319 features |= DASD_FEATURE_INITIAL_ONLINE;
321 sprintf(bus_id, "%01x.%01x.%04x",
322 from_id0, from_id1, from++);
323 devmap = dasd_add_busid(bus_id, features);
325 return (char *)devmap;
331 MESSAGE(KERN_WARNING,
332 "junk at end of dasd parameter string: %s\n", str);
333 return ERR_PTR(-EINVAL);
337 dasd_parse_next_element( char *parsestring ) {
339 residual_str = dasd_parse_keyword(parsestring);
340 if (!IS_ERR(residual_str))
342 residual_str = dasd_parse_range(parsestring);
347 * Parse parameters stored in dasd[]
348 * The 'dasd=...' parameter allows to specify a comma separated list of
349 * keywords and device ranges. When the dasd driver is build into the kernel,
350 * the complete list will be stored as one element of the dasd[] array.
351 * When the dasd driver is build as a module, then the list is broken into
352 * it's elements and each dasd[] entry contains one element.
361 for (i = 0; i < 256; i++) {
364 parsestring = dasd[i];
365 /* loop over the comma separated list in the parsestring */
366 while (*parsestring) {
367 parsestring = dasd_parse_next_element(parsestring);
368 if(IS_ERR(parsestring)) {
369 rc = PTR_ERR(parsestring);
374 DBF_EVENT(DBF_ALERT, "%s", "invalid range found");
382 * Add a devmap for the device specified by busid. It is possible that
383 * the devmap already exists (dasd= parameter). The order of the devices
384 * added through this function will define the kdevs for the individual
387 static struct dasd_devmap *
388 dasd_add_busid(char *bus_id, int features)
390 struct dasd_devmap *devmap, *new, *tmp;
393 new = (struct dasd_devmap *)
394 kzalloc(sizeof(struct dasd_devmap), GFP_KERNEL);
396 return ERR_PTR(-ENOMEM);
397 spin_lock(&dasd_devmap_lock);
399 hash = dasd_hash_busid(bus_id);
400 list_for_each_entry(tmp, &dasd_hashlists[hash], list)
401 if (strncmp(tmp->bus_id, bus_id, BUS_ID_SIZE) == 0) {
406 /* This bus_id is new. */
407 new->devindex = dasd_max_devindex++;
408 strncpy(new->bus_id, bus_id, BUS_ID_SIZE);
409 new->features = features;
411 list_add(&new->list, &dasd_hashlists[hash]);
415 spin_unlock(&dasd_devmap_lock);
421 * Find devmap for device with given bus_id.
423 static struct dasd_devmap *
424 dasd_find_busid(char *bus_id)
426 struct dasd_devmap *devmap, *tmp;
429 spin_lock(&dasd_devmap_lock);
430 devmap = ERR_PTR(-ENODEV);
431 hash = dasd_hash_busid(bus_id);
432 list_for_each_entry(tmp, &dasd_hashlists[hash], list) {
433 if (strncmp(tmp->bus_id, bus_id, BUS_ID_SIZE) == 0) {
438 spin_unlock(&dasd_devmap_lock);
443 * Check if busid has been added to the list of dasd ranges.
446 dasd_busid_known(char *bus_id)
448 return IS_ERR(dasd_find_busid(bus_id)) ? -ENOENT : 0;
452 * Forget all about the device numbers added so far.
453 * This may only be called at module unload or system shutdown.
456 dasd_forget_ranges(void)
458 struct dasd_devmap *devmap, *n;
461 spin_lock(&dasd_devmap_lock);
462 for (i = 0; i < 256; i++) {
463 list_for_each_entry_safe(devmap, n, &dasd_hashlists[i], list) {
464 BUG_ON(devmap->device != NULL);
465 list_del(&devmap->list);
469 spin_unlock(&dasd_devmap_lock);
473 * Find the device struct by its device index.
476 dasd_device_from_devindex(int devindex)
478 struct dasd_devmap *devmap, *tmp;
479 struct dasd_device *device;
482 spin_lock(&dasd_devmap_lock);
484 for (i = 0; (i < 256) && !devmap; i++)
485 list_for_each_entry(tmp, &dasd_hashlists[i], list)
486 if (tmp->devindex == devindex) {
487 /* Found the devmap for the device. */
491 if (devmap && devmap->device) {
492 device = devmap->device;
493 dasd_get_device(device);
495 device = ERR_PTR(-ENODEV);
496 spin_unlock(&dasd_devmap_lock);
501 * Return devmap for cdev. If no devmap exists yet, create one and
502 * connect it to the cdev.
504 static struct dasd_devmap *
505 dasd_devmap_from_cdev(struct ccw_device *cdev)
507 struct dasd_devmap *devmap;
509 devmap = dasd_find_busid(cdev->dev.bus_id);
511 devmap = dasd_add_busid(cdev->dev.bus_id,
512 DASD_FEATURE_DEFAULT);
517 * Create a dasd device structure for cdev.
520 dasd_create_device(struct ccw_device *cdev)
522 struct dasd_devmap *devmap;
523 struct dasd_device *device;
526 devmap = dasd_devmap_from_cdev(cdev);
528 return (void *) devmap;
529 cdev->dev.driver_data = devmap;
531 device = dasd_alloc_device();
534 atomic_set(&device->ref_count, 2);
536 spin_lock(&dasd_devmap_lock);
537 if (!devmap->device) {
538 devmap->device = device;
539 device->devindex = devmap->devindex;
540 device->features = devmap->features;
541 get_device(&cdev->dev);
545 /* Someone else was faster. */
547 spin_unlock(&dasd_devmap_lock);
550 dasd_free_device(device);
557 * Wait queue for dasd_delete_device waits.
559 static DECLARE_WAIT_QUEUE_HEAD(dasd_delete_wq);
562 * Remove a dasd device structure. The passed referenced
566 dasd_delete_device(struct dasd_device *device)
568 struct ccw_device *cdev;
569 struct dasd_devmap *devmap;
571 /* First remove device pointer from devmap. */
572 devmap = dasd_find_busid(device->cdev->dev.bus_id);
573 BUG_ON(IS_ERR(devmap));
574 spin_lock(&dasd_devmap_lock);
575 if (devmap->device != device) {
576 spin_unlock(&dasd_devmap_lock);
577 dasd_put_device(device);
580 devmap->device = NULL;
581 spin_unlock(&dasd_devmap_lock);
583 /* Drop ref_count by 2, one for the devmap reference and
584 * one for the passed reference. */
585 atomic_sub(2, &device->ref_count);
587 /* Wait for reference counter to drop to zero. */
588 wait_event(dasd_delete_wq, atomic_read(&device->ref_count) == 0);
590 /* Disconnect dasd_device structure from ccw_device structure. */
594 /* Disconnect dasd_devmap structure from ccw_device structure. */
595 cdev->dev.driver_data = NULL;
597 /* Put ccw_device structure. */
598 put_device(&cdev->dev);
600 /* Now the device structure can be freed. */
601 dasd_free_device(device);
605 * Reference counter dropped to zero. Wake up waiter
606 * in dasd_delete_device.
609 dasd_put_device_wake(struct dasd_device *device)
611 wake_up(&dasd_delete_wq);
615 * Return dasd_device structure associated with cdev.
618 dasd_device_from_cdev(struct ccw_device *cdev)
620 struct dasd_devmap *devmap;
621 struct dasd_device *device;
623 device = ERR_PTR(-ENODEV);
624 spin_lock(&dasd_devmap_lock);
625 devmap = cdev->dev.driver_data;
626 if (devmap && devmap->device) {
627 device = devmap->device;
628 dasd_get_device(device);
630 spin_unlock(&dasd_devmap_lock);
635 * SECTION: files in sysfs
639 * readonly controls the readonly status of a dasd
642 dasd_ro_show(struct device *dev, struct device_attribute *attr, char *buf)
644 struct dasd_devmap *devmap;
647 devmap = dasd_find_busid(dev->bus_id);
649 ro_flag = (devmap->features & DASD_FEATURE_READONLY) != 0;
651 ro_flag = (DASD_FEATURE_DEFAULT & DASD_FEATURE_READONLY) != 0;
652 return snprintf(buf, PAGE_SIZE, ro_flag ? "1\n" : "0\n");
656 dasd_ro_store(struct device *dev, struct device_attribute *attr,
657 const char *buf, size_t count)
659 struct dasd_devmap *devmap;
662 devmap = dasd_devmap_from_cdev(to_ccwdev(dev));
664 return PTR_ERR(devmap);
665 ro_flag = buf[0] == '1';
666 spin_lock(&dasd_devmap_lock);
668 devmap->features |= DASD_FEATURE_READONLY;
670 devmap->features &= ~DASD_FEATURE_READONLY;
672 devmap->device->features = devmap->features;
673 if (devmap->device && devmap->device->gdp)
674 set_disk_ro(devmap->device->gdp, ro_flag);
675 spin_unlock(&dasd_devmap_lock);
679 static DEVICE_ATTR(readonly, 0644, dasd_ro_show, dasd_ro_store);
682 * use_diag controls whether the driver should use diag rather than ssch
683 * to talk to the device
686 dasd_use_diag_show(struct device *dev, struct device_attribute *attr, char *buf)
688 struct dasd_devmap *devmap;
691 devmap = dasd_find_busid(dev->bus_id);
693 use_diag = (devmap->features & DASD_FEATURE_USEDIAG) != 0;
695 use_diag = (DASD_FEATURE_DEFAULT & DASD_FEATURE_USEDIAG) != 0;
696 return sprintf(buf, use_diag ? "1\n" : "0\n");
700 dasd_use_diag_store(struct device *dev, struct device_attribute *attr,
701 const char *buf, size_t count)
703 struct dasd_devmap *devmap;
707 devmap = dasd_devmap_from_cdev(to_ccwdev(dev));
709 return PTR_ERR(devmap);
710 use_diag = buf[0] == '1';
711 spin_lock(&dasd_devmap_lock);
712 /* Changing diag discipline flag is only allowed in offline state. */
714 if (!devmap->device) {
716 devmap->features |= DASD_FEATURE_USEDIAG;
718 devmap->features &= ~DASD_FEATURE_USEDIAG;
721 spin_unlock(&dasd_devmap_lock);
725 static DEVICE_ATTR(use_diag, 0644, dasd_use_diag_show, dasd_use_diag_store);
728 dasd_discipline_show(struct device *dev, struct device_attribute *attr,
731 struct dasd_devmap *devmap;
734 spin_lock(&dasd_devmap_lock);
736 devmap = dev->driver_data;
737 if (devmap && devmap->device && devmap->device->discipline)
738 dname = devmap->device->discipline->name;
739 spin_unlock(&dasd_devmap_lock);
740 return snprintf(buf, PAGE_SIZE, "%s\n", dname);
743 static DEVICE_ATTR(discipline, 0444, dasd_discipline_show, NULL);
746 dasd_alias_show(struct device *dev, struct device_attribute *attr, char *buf)
748 struct dasd_devmap *devmap;
751 devmap = dasd_find_busid(dev->bus_id);
752 spin_lock(&dasd_devmap_lock);
754 alias = devmap->uid.alias;
757 spin_unlock(&dasd_devmap_lock);
759 return sprintf(buf, alias ? "1\n" : "0\n");
762 static DEVICE_ATTR(alias, 0444, dasd_alias_show, NULL);
765 dasd_vendor_show(struct device *dev, struct device_attribute *attr, char *buf)
767 struct dasd_devmap *devmap;
770 devmap = dasd_find_busid(dev->bus_id);
771 spin_lock(&dasd_devmap_lock);
772 if (!IS_ERR(devmap) && strlen(devmap->uid.vendor) > 0)
773 vendor = devmap->uid.vendor;
776 spin_unlock(&dasd_devmap_lock);
778 return snprintf(buf, PAGE_SIZE, "%s\n", vendor);
781 static DEVICE_ATTR(vendor, 0444, dasd_vendor_show, NULL);
783 #define UID_STRLEN ( /* vendor */ 3 + 1 + /* serial */ 14 + 1 +\
784 /* SSID */ 4 + 1 + /* unit addr */ 2 + 1)
787 dasd_uid_show(struct device *dev, struct device_attribute *attr, char *buf)
789 struct dasd_devmap *devmap;
790 char uid[UID_STRLEN];
792 devmap = dasd_find_busid(dev->bus_id);
793 spin_lock(&dasd_devmap_lock);
794 if (!IS_ERR(devmap) && strlen(devmap->uid.vendor) > 0)
795 snprintf(uid, sizeof(uid), "%s.%s.%04x.%02x",
796 devmap->uid.vendor, devmap->uid.serial,
797 devmap->uid.ssid, devmap->uid.unit_addr);
800 spin_unlock(&dasd_devmap_lock);
802 return snprintf(buf, PAGE_SIZE, "%s\n", uid);
805 static DEVICE_ATTR(uid, 0444, dasd_uid_show, NULL);
808 * extended error-reporting
811 dasd_eer_show(struct device *dev, struct device_attribute *attr, char *buf)
813 struct dasd_devmap *devmap;
816 devmap = dasd_find_busid(dev->bus_id);
817 if (!IS_ERR(devmap) && devmap->device)
818 eer_flag = dasd_eer_enabled(devmap->device);
821 return snprintf(buf, PAGE_SIZE, eer_flag ? "1\n" : "0\n");
825 dasd_eer_store(struct device *dev, struct device_attribute *attr,
826 const char *buf, size_t count)
828 struct dasd_devmap *devmap;
831 devmap = dasd_devmap_from_cdev(to_ccwdev(dev));
833 return PTR_ERR(devmap);
837 rc = dasd_eer_enable(devmap->device);
841 dasd_eer_disable(devmap->device);
845 static DEVICE_ATTR(eer_enabled, 0644, dasd_eer_show, dasd_eer_store);
847 static struct attribute * dasd_attrs[] = {
848 &dev_attr_readonly.attr,
849 &dev_attr_discipline.attr,
850 &dev_attr_alias.attr,
851 &dev_attr_vendor.attr,
853 &dev_attr_use_diag.attr,
854 &dev_attr_eer_enabled.attr,
858 static struct attribute_group dasd_attr_group = {
863 * Check if the related storage server is already contained in the
864 * dasd_serverlist. If server is not contained, create new entry.
865 * Return 0 if server was already in serverlist,
866 * 1 if the server was added successfully
867 * <0 in case of error.
870 dasd_add_server(struct dasd_uid *uid)
872 struct dasd_servermap *new, *tmp;
874 /* check if server is already contained */
875 list_for_each_entry(tmp, &dasd_serverlist, list)
877 if (strncmp(tmp->sid.vendor, uid->vendor,
878 sizeof(tmp->sid.vendor)) == 0
879 && strncmp(tmp->sid.serial, uid->serial,
880 sizeof(tmp->sid.serial)) == 0)
883 new = (struct dasd_servermap *)
884 kzalloc(sizeof(struct dasd_servermap), GFP_KERNEL);
888 strncpy(new->sid.vendor, uid->vendor, sizeof(new->sid.vendor));
889 strncpy(new->sid.serial, uid->serial, sizeof(new->sid.serial));
890 list_add(&new->list, &dasd_serverlist);
896 * Return copy of the device unique identifier.
899 dasd_get_uid(struct ccw_device *cdev, struct dasd_uid *uid)
901 struct dasd_devmap *devmap;
903 devmap = dasd_find_busid(cdev->dev.bus_id);
905 return PTR_ERR(devmap);
906 spin_lock(&dasd_devmap_lock);
908 spin_unlock(&dasd_devmap_lock);
913 * Register the given device unique identifier into devmap struct.
914 * Return 0 if server was already in serverlist,
915 * 1 if the server was added successful
916 * <0 in case of error.
919 dasd_set_uid(struct ccw_device *cdev, struct dasd_uid *uid)
921 struct dasd_devmap *devmap;
924 devmap = dasd_find_busid(cdev->dev.bus_id);
926 return PTR_ERR(devmap);
927 spin_lock(&dasd_devmap_lock);
929 rc = dasd_add_server(uid);
930 spin_unlock(&dasd_devmap_lock);
933 EXPORT_SYMBOL_GPL(dasd_set_uid);
936 * Return value of the specified feature.
939 dasd_get_feature(struct ccw_device *cdev, int feature)
941 struct dasd_devmap *devmap;
943 devmap = dasd_find_busid(cdev->dev.bus_id);
945 return PTR_ERR(devmap);
947 return ((devmap->features & feature) != 0);
951 * Set / reset given feature.
952 * Flag indicates wether to set (!=0) or the reset (=0) the feature.
955 dasd_set_feature(struct ccw_device *cdev, int feature, int flag)
957 struct dasd_devmap *devmap;
959 devmap = dasd_find_busid(cdev->dev.bus_id);
961 return PTR_ERR(devmap);
963 spin_lock(&dasd_devmap_lock);
965 devmap->features |= feature;
967 devmap->features &= ~feature;
969 devmap->device->features = devmap->features;
970 spin_unlock(&dasd_devmap_lock);
976 dasd_add_sysfs_files(struct ccw_device *cdev)
978 return sysfs_create_group(&cdev->dev.kobj, &dasd_attr_group);
982 dasd_remove_sysfs_files(struct ccw_device *cdev)
984 sysfs_remove_group(&cdev->dev.kobj, &dasd_attr_group);
989 dasd_devmap_init(void)
993 /* Initialize devmap structures. */
994 dasd_max_devindex = 0;
995 for (i = 0; i < 256; i++)
996 INIT_LIST_HEAD(&dasd_hashlists[i]);
998 /* Initialize servermap structure. */
999 INIT_LIST_HEAD(&dasd_serverlist);
1004 dasd_devmap_exit(void)
1006 dasd_forget_ranges();