summaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/device.c
diff options
context:
space:
mode:
authorVineeth Vijayan <vneethv@linux.ibm.com>2020-10-08 15:13:29 +0200
committerJens Axboe <axboe@kernel.dk>2020-11-16 16:14:38 +0100
commit32ef938815c1fb42d65212aac860ab153a64de1a (patch)
treed2a33b82087475559e37e649ec3fc461fa43d56f /drivers/s390/cio/device.c
parents390/cio: Provide Endpoint-Security Mode per CU (diff)
downloadlinux-32ef938815c1fb42d65212aac860ab153a64de1a.tar.xz
linux-32ef938815c1fb42d65212aac860ab153a64de1a.zip
s390/cio: Add support for FCES status notification
Fibre Channel Endpoint-Security event is received as an sei:nt0 type in the CIO layer. This information needs to be shared with the CCW device drivers using the path_events callback. Co-developed-by: Sebastian Ott <sebott@linux.ibm.com> Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.ibm.com> Signed-off-by: Stefan Haberland <sth@linux.ibm.com> Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com> Acked-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/s390/cio/device.c')
-rw-r--r--drivers/s390/cio/device.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index b29fe8d50baf..aab13c78db9f 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -1170,7 +1170,8 @@ static int io_subchannel_chp_event(struct subchannel *sch,
struct chp_link *link, int event)
{
struct ccw_device *cdev = sch_get_cdev(sch);
- int mask;
+ int mask, chpid, valid_bit;
+ int path_event[8];
mask = chp_ssd_get_mask(&sch->ssd_info, link);
if (!mask)
@@ -1205,6 +1206,18 @@ static int io_subchannel_chp_event(struct subchannel *sch,
cdev->private->path_new_mask |= mask;
io_subchannel_verify(sch);
break;
+ case CHP_FCES_EVENT:
+ /* Forward Endpoint Security event */
+ for (chpid = 0, valid_bit = 0x80; chpid < 8; chpid++,
+ valid_bit >>= 1) {
+ if (mask & valid_bit)
+ path_event[chpid] = PE_PATH_FCES_EVENT;
+ else
+ path_event[chpid] = PE_NONE;
+ }
+ if (cdev)
+ cdev->drv->path_event(cdev, path_event);
+ break;
}
return 0;
}