Skip to contentSkip to conversation

s390 (3/6): online attribute.

PATCH New Martin Schwidefsky 1 participant 1 message Jul 1, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390 (3/6): online attribute.

Fix online attribute. "echo 1 > online" should enable a device and "echo 0 > online" should disable a device, not the other way round.

diffstat:

 drivers/s390/cio/device.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/s390/cio/device.c +3 -3
diff -urN linux-2.5/drivers/s390/cio/device.c linux-2.5-s390/drivers/s390/cio/device.c
@@ -1,7 +1,7 @@
 /*
  *  drivers/s390/cio/device.c
  *  bus driver for ccw devices
- *   $Revision: 1.57 $
+ *   $Revision: 1.58 $
  *
  *    Copyright (C) 2002 IBM Deutschland Entwicklung GmbH,
  *			 IBM Corporation
@@ -305,9 +305,9 @@
 		return count;
 
 	i = simple_strtoul(buf, &tmp, 16);
-	if (i == 0 && cdev->drv->set_online)
+	if (i == 1 && cdev->drv->set_online)
 		ccw_device_set_online(cdev);
-	else if (i == 1 && cdev->drv->set_offline)
+	else if (i == 0 && cdev->drv->set_offline)
 		ccw_device_set_offline(cdev);
 	else
 		return -EINVAL;