aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd.c
diff options
context:
space:
mode:
authorHorst Hummel <horst.hummel@de.ibm.com>2005-05-17 00:53:39 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-17 10:59:17 -0400
commit59afda786a58f2e8f74a48f2af90534d76d5338d (patch)
tree24095750e7bbb68675573af6649c814e6f69c4b4 /drivers/s390/block/dasd.c
parent53b21689ba567ad437e4d7917dd9da54a8d6fd5c (diff)
[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>
Diffstat (limited to 'drivers/s390/block/dasd.c')
-rw-r--r--drivers/s390/block/dasd.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 02cfe244e069..ceeb3cf64a16 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -7,7 +7,7 @@
7 * Bugreports.to..: <Linux390@de.ibm.com> 7 * Bugreports.to..: <Linux390@de.ibm.com>
8 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001 8 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001
9 * 9 *
10 * $Revision: 1.161 $ 10 * $Revision: 1.164 $
11 */ 11 */
12 12
13#include <linux/config.h> 13#include <linux/config.h>
@@ -1766,10 +1766,10 @@ dasd_generic_probe (struct ccw_device *cdev,
1766 printk(KERN_WARNING 1766 printk(KERN_WARNING
1767 "dasd_generic_probe: could not add sysfs entries " 1767 "dasd_generic_probe: could not add sysfs entries "
1768 "for %s\n", cdev->dev.bus_id); 1768 "for %s\n", cdev->dev.bus_id);
1769 } else {
1770 cdev->handler = &dasd_int_handler;
1769 } 1771 }
1770 1772
1771 cdev->handler = &dasd_int_handler;
1772
1773 return ret; 1773 return ret;
1774} 1774}
1775 1775
@@ -1780,6 +1780,8 @@ dasd_generic_remove (struct ccw_device *cdev)
1780{ 1780{
1781 struct dasd_device *device; 1781 struct dasd_device *device;
1782 1782
1783 cdev->handler = NULL;
1784
1783 dasd_remove_sysfs_files(cdev); 1785 dasd_remove_sysfs_files(cdev);
1784 device = dasd_device_from_cdev(cdev); 1786 device = dasd_device_from_cdev(cdev);
1785 if (IS_ERR(device)) 1787 if (IS_ERR(device))
@@ -1810,14 +1812,14 @@ dasd_generic_set_online (struct ccw_device *cdev,
1810 struct dasd_device *device; 1812 struct dasd_device *device;
1811 int feature_diag, rc; 1813 int feature_diag, rc;
1812 1814
1813 feature_diag = dasd_get_feature(cdev, DASD_FEATURE_USEDIAG);
1814 if (feature_diag < 0)
1815 return feature_diag;
1816
1817 device = dasd_create_device(cdev); 1815 device = dasd_create_device(cdev);
1818 if (IS_ERR(device)) 1816 if (IS_ERR(device))
1819 return PTR_ERR(device); 1817 return PTR_ERR(device);
1820 1818
1819 feature_diag = dasd_get_feature(cdev, DASD_FEATURE_USEDIAG);
1820 if (feature_diag < 0)
1821 return feature_diag;
1822
1821 if (feature_diag) { 1823 if (feature_diag) {
1822 if (!dasd_diag_discipline_pointer) { 1824 if (!dasd_diag_discipline_pointer) {
1823 printk (KERN_WARNING 1825 printk (KERN_WARNING