[PATCH] s390: dasd set online failure
dasd driver changes: - The feature check in dasd_generic_online returns an error if the devmap entry for the device is not yet available. Check for the feature after the device has been created. - Do symmetric registration/deregistration of cdev->handler. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
53b21689ba
commit
59afda786a
|
@ -7,7 +7,7 @@
|
||||||
* Bugreports.to..: <Linux390@de.ibm.com>
|
* Bugreports.to..: <Linux390@de.ibm.com>
|
||||||
* (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001
|
* (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001
|
||||||
*
|
*
|
||||||
* $Revision: 1.161 $
|
* $Revision: 1.164 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/config.h>
|
#include <linux/config.h>
|
||||||
|
@ -1766,10 +1766,10 @@ dasd_generic_probe (struct ccw_device *cdev,
|
||||||
printk(KERN_WARNING
|
printk(KERN_WARNING
|
||||||
"dasd_generic_probe: could not add sysfs entries "
|
"dasd_generic_probe: could not add sysfs entries "
|
||||||
"for %s\n", cdev->dev.bus_id);
|
"for %s\n", cdev->dev.bus_id);
|
||||||
|
} else {
|
||||||
|
cdev->handler = &dasd_int_handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
cdev->handler = &dasd_int_handler;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1780,6 +1780,8 @@ dasd_generic_remove (struct ccw_device *cdev)
|
||||||
{
|
{
|
||||||
struct dasd_device *device;
|
struct dasd_device *device;
|
||||||
|
|
||||||
|
cdev->handler = NULL;
|
||||||
|
|
||||||
dasd_remove_sysfs_files(cdev);
|
dasd_remove_sysfs_files(cdev);
|
||||||
device = dasd_device_from_cdev(cdev);
|
device = dasd_device_from_cdev(cdev);
|
||||||
if (IS_ERR(device))
|
if (IS_ERR(device))
|
||||||
|
@ -1810,14 +1812,14 @@ dasd_generic_set_online (struct ccw_device *cdev,
|
||||||
struct dasd_device *device;
|
struct dasd_device *device;
|
||||||
int feature_diag, rc;
|
int feature_diag, rc;
|
||||||
|
|
||||||
feature_diag = dasd_get_feature(cdev, DASD_FEATURE_USEDIAG);
|
|
||||||
if (feature_diag < 0)
|
|
||||||
return feature_diag;
|
|
||||||
|
|
||||||
device = dasd_create_device(cdev);
|
device = dasd_create_device(cdev);
|
||||||
if (IS_ERR(device))
|
if (IS_ERR(device))
|
||||||
return PTR_ERR(device);
|
return PTR_ERR(device);
|
||||||
|
|
||||||
|
feature_diag = dasd_get_feature(cdev, DASD_FEATURE_USEDIAG);
|
||||||
|
if (feature_diag < 0)
|
||||||
|
return feature_diag;
|
||||||
|
|
||||||
if (feature_diag) {
|
if (feature_diag) {
|
||||||
if (!dasd_diag_discipline_pointer) {
|
if (!dasd_diag_discipline_pointer) {
|
||||||
printk (KERN_WARNING
|
printk (KERN_WARNING
|
||||||
|
|
Loading…
Reference in New Issue