projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[linux-2.6-block.git]
/
drivers
/
scsi
/
scsi_sysfs.c
diff --git
a/drivers/scsi/scsi_sysfs.c
b/drivers/scsi/scsi_sysfs.c
index dbb206c90ecf3c22e68ea8746ecb845ba78a29b1..64c96c7828ee1056042da4a913d9f3f2b9506506 100644
(file)
--- a/
drivers/scsi/scsi_sysfs.c
+++ b/
drivers/scsi/scsi_sysfs.c
@@
-767,8
+767,13
@@
store_state_field(struct device *dev, struct device_attribute *attr,
break;
}
}
- if (!state)
+ switch (state) {
+ case SDEV_RUNNING:
+ case SDEV_OFFLINE:
+ break;
+ default:
return -EINVAL;
+ }
mutex_lock(&sdev->state_mutex);
ret = scsi_device_set_state(sdev, state);