diff options
author | Ingo Tuchscherer <ingo.tuchscherer@de.ibm.com> | 2014-10-02 16:48:46 +0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2014-10-09 11:14:05 +0400 |
commit | 42f4dd613fe808676126472bbe1283e452201148 (patch) | |
tree | 0ad7eafe02f39820ad03d6cf717f52f696e5df4b /drivers/s390/crypto/ap_bus.c | |
parent | b5f87f15e20092c060f465b283b07a76af7f2e5f (diff) | |
download | linux-42f4dd613fe808676126472bbe1283e452201148.tar.xz |
s390/zcrypt: Toleration of new crypto hardware
The zcrypt device driver will accept the new crypto adapter
in toleration mode. A new sysfs attribute 'raw_hwtype' will
expose the raw hardware type.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@de.ibm.com>
Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/ap_bus.c')
-rw-r--r-- | drivers/s390/crypto/ap_bus.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index 51e6aa0e2e58..99485415dcc2 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c @@ -664,6 +664,17 @@ static ssize_t ap_hwtype_show(struct device *dev, } static DEVICE_ATTR(hwtype, 0444, ap_hwtype_show, NULL); + +static ssize_t ap_raw_hwtype_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct ap_device *ap_dev = to_ap_dev(dev); + + return snprintf(buf, PAGE_SIZE, "%d\n", ap_dev->raw_hwtype); +} + +static DEVICE_ATTR(raw_hwtype, 0444, ap_raw_hwtype_show, NULL); + static ssize_t ap_depth_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -734,6 +745,7 @@ static DEVICE_ATTR(ap_functions, 0444, ap_functions_show, NULL); static struct attribute *ap_dev_attrs[] = { &dev_attr_hwtype.attr, + &dev_attr_raw_hwtype.attr, &dev_attr_depth.attr, &dev_attr_request_count.attr, &dev_attr_requestq_count.attr, @@ -1417,9 +1429,13 @@ static void ap_scan_bus(struct work_struct *unused) continue; } break; + case 11: + ap_dev->device_type = 10; + break; default: ap_dev->device_type = device_type; } + ap_dev->raw_hwtype = device_type; rc = ap_query_functions(qid, &device_functions); if (!rc) |