On Thu, 8 Oct 2020 15:13:34 +0200
Stefan Haberland <sth@xxxxxxxxxxxxx> wrote:
> From: Jan Höppner <hoeppner@xxxxxxxxxxxxx>
>
> Add a new sysfs attribute (fc_security) per device and per operational
> channel path. The information of the current FC Endpoint Security state
> is received through the CIO layer.
>
> The state of the FC Endpoint Security can be either "Unsupported",
> "Authentication", or "Encryption".
>
> For example:
> $ cat /sys/bus/ccw/devices/0.0.c600/fc_security
> Encryption
>
> If any of the operational paths is in a state different from all
> others, the device sysfs attribute will display the additional state
> "Inconsistent".
>
> The sysfs attributes per paths are organised in a new directory called
> "paths_info" with subdirectories for each path.
>
> /sys/bus/ccw/devices/0.0.c600/paths_info/
> ├── 0.38
> │ └── fc_security
> ├── 0.39
> │ └── fc_security
> ├── 0.3a
> │ └── fc_security
> └── 0.3b
> └── fc_security
>
> Signed-off-by: Jan Höppner <hoeppner@xxxxxxxxxxxxx>
> Reviewed-by: Stefan Haberland <sth@xxxxxxxxxxxxx>
> Signed-off-by: Stefan Haberland <sth@xxxxxxxxxxxxx>
> ---
> drivers/s390/block/dasd_devmap.c | 109 +++++++++++++++++++++++++++++++
> drivers/s390/block/dasd_eckd.c | 30 +++++++++
> drivers/s390/block/dasd_int.h | 68 +++++++++++++++++++
> 3 files changed, 207 insertions(+)
(...)
> +/*
> + * As we keep kobjects for the lifetime of a device, this function must not be
> + * called anywhere but in the context of offlining a device.
> + */
Works for me :)
> +void dasd_path_remove_kobj(struct dasd_device *device, int chp)
> +{
> + if (device->path[chp].in_sysfs) {
> + kobject_put(&device->path[chp].kobj);
> + device->path[chp].in_sysfs = false;
> + }
> +}
> +EXPORT_SYMBOL(dasd_path_remove_kobj);
(...)
Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx>