diff options
Diffstat (limited to 'drivers/s390/block/dasd.c')
-rw-r--r-- | drivers/s390/block/dasd.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index ceeb3cf64a16..6527ff6f4706 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -176,7 +176,7 @@ dasd_state_known_to_basic(struct dasd_device * device) | |||
176 | return rc; | 176 | return rc; |
177 | 177 | ||
178 | /* register 'device' debug area, used for all DBF_DEV_XXX calls */ | 178 | /* register 'device' debug area, used for all DBF_DEV_XXX calls */ |
179 | device->debug_area = debug_register(device->cdev->dev.bus_id, 0, 2, | 179 | device->debug_area = debug_register(device->cdev->dev.bus_id, 1, 2, |
180 | 8 * sizeof (long)); | 180 | 8 * sizeof (long)); |
181 | debug_register_view(device->debug_area, &debug_sprintf_view); | 181 | debug_register_view(device->debug_area, &debug_sprintf_view); |
182 | debug_set_level(device->debug_area, DBF_EMERG); | 182 | debug_set_level(device->debug_area, DBF_EMERG); |
@@ -1952,26 +1952,24 @@ dasd_generic_notify(struct ccw_device *cdev, int event) | |||
1952 | * Automatically online either all dasd devices (dasd_autodetect) or | 1952 | * Automatically online either all dasd devices (dasd_autodetect) or |
1953 | * all devices specified with dasd= parameters. | 1953 | * all devices specified with dasd= parameters. |
1954 | */ | 1954 | */ |
1955 | static int | ||
1956 | __dasd_auto_online(struct device *dev, void *data) | ||
1957 | { | ||
1958 | struct ccw_device *cdev; | ||
1959 | |||
1960 | cdev = to_ccwdev(dev); | ||
1961 | if (dasd_autodetect || dasd_busid_known(cdev->dev.bus_id) == 0) | ||
1962 | ccw_device_set_online(cdev); | ||
1963 | return 0; | ||
1964 | } | ||
1965 | |||
1955 | void | 1966 | void |
1956 | dasd_generic_auto_online (struct ccw_driver *dasd_discipline_driver) | 1967 | dasd_generic_auto_online (struct ccw_driver *dasd_discipline_driver) |
1957 | { | 1968 | { |
1958 | struct device_driver *drv; | 1969 | struct device_driver *drv; |
1959 | struct device *d, *dev; | ||
1960 | struct ccw_device *cdev; | ||
1961 | 1970 | ||
1962 | drv = get_driver(&dasd_discipline_driver->driver); | 1971 | drv = get_driver(&dasd_discipline_driver->driver); |
1963 | down_read(&drv->bus->subsys.rwsem); | 1972 | driver_for_each_device(drv, NULL, NULL, __dasd_auto_online); |
1964 | dev = NULL; | ||
1965 | list_for_each_entry(d, &drv->devices, driver_list) { | ||
1966 | dev = get_device(d); | ||
1967 | if (!dev) | ||
1968 | continue; | ||
1969 | cdev = to_ccwdev(dev); | ||
1970 | if (dasd_autodetect || dasd_busid_known(cdev->dev.bus_id) == 0) | ||
1971 | ccw_device_set_online(cdev); | ||
1972 | put_device(dev); | ||
1973 | } | ||
1974 | up_read(&drv->bus->subsys.rwsem); | ||
1975 | put_driver(drv); | 1973 | put_driver(drv); |
1976 | } | 1974 | } |
1977 | 1975 | ||
@@ -1983,7 +1981,7 @@ dasd_init(void) | |||
1983 | init_waitqueue_head(&dasd_init_waitq); | 1981 | init_waitqueue_head(&dasd_init_waitq); |
1984 | 1982 | ||
1985 | /* register 'common' DASD debug area, used for all DBF_XXX calls */ | 1983 | /* register 'common' DASD debug area, used for all DBF_XXX calls */ |
1986 | dasd_debug_area = debug_register("dasd", 0, 2, 8 * sizeof (long)); | 1984 | dasd_debug_area = debug_register("dasd", 1, 2, 8 * sizeof (long)); |
1987 | if (dasd_debug_area == NULL) { | 1985 | if (dasd_debug_area == NULL) { |
1988 | rc = -ENOMEM; | 1986 | rc = -ENOMEM; |
1989 | goto failed; | 1987 | goto failed; |