diff options
author | Vineeth Vijayan <vneethv@linux.ibm.com> | 2021-04-25 11:27:59 +0200 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2021-08-18 10:01:27 +0200 |
commit | cec0c58d34f26a8ed7bf7ca8726608edbac7e958 (patch) | |
tree | f41cd28ffc9fd2428b3c52e2f5d11f3b5a5ebcc1 /drivers | |
parent | s390: rename dma section to amode31 (diff) | |
download | linux-cec0c58d34f26a8ed7bf7ca8726608edbac7e958.tar.xz linux-cec0c58d34f26a8ed7bf7ca8726608edbac7e958.zip |
s390/cio: add rescan functionality on channel subsystem
This patch introduces a new rescan sys-interface for channel-subsystem.
The rescan interface allows the user to invoke an evaluation of all
subchannels defined in the I/O configuration.
The new rescan interface can be found at /sys/devices/css0/rescan
and can be triggered by,
echo > /sys/devices/css0/rescan
Writing to this interface triggers subchannel evaluation. The write
request completes only after scan-related work has completed
This user-invoked subchannel evaluation allows manual recovery in error
situations such as:
- restart of device discovery after resolution of temporary device
error
- inconsistent OS view of subchannel state due to missing state-change
interrupts (CRWs)
Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/cio/css.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index a974943c27da..7c54b629026b 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c @@ -886,6 +886,18 @@ static ssize_t real_cssid_show(struct device *dev, struct device_attribute *a, } static DEVICE_ATTR_RO(real_cssid); +static ssize_t rescan_store(struct device *dev, struct device_attribute *a, + const char *buf, size_t count) +{ + CIO_TRACE_EVENT(4, "usr-rescan"); + + css_schedule_eval_all(); + css_complete_work(); + + return count; +} +static DEVICE_ATTR_WO(rescan); + static ssize_t cm_enable_show(struct device *dev, struct device_attribute *a, char *buf) { @@ -932,6 +944,7 @@ static umode_t cm_enable_mode(struct kobject *kobj, struct attribute *attr, static struct attribute *cssdev_attrs[] = { &dev_attr_real_cssid.attr, + &dev_attr_rescan.attr, NULL, }; |