s390/zcrypt: Introduce CEX6 toleration
authorSumit Semwal <sumit.semwal@linaro.org>
Sat, 25 Mar 2017 16:18:15 +0000 (21:48 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Mar 2017 07:35:20 +0000 (09:35 +0200)
From: Harald Freudenberger <freude@linux.vnet.ibm.com>

[ Upstream commit b3e8652bcbfa04807e44708d4d0c8cdad39c9215 ]

Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/s390/crypto/ap_bus.c
drivers/s390/crypto/ap_bus.h

index 24ec282e15d8ae436e7dab130a4696708e34be9e..7c3b8d3516e3fa8eb0e9c08c0d5bea4707bbf666 100644 (file)
@@ -1651,6 +1651,9 @@ static void ap_scan_bus(struct work_struct *unused)
                ap_dev->queue_depth = queue_depth;
                ap_dev->raw_hwtype = device_type;
                ap_dev->device_type = device_type;
+               /* CEX6 toleration: map to CEX5 */
+               if (device_type == AP_DEVICE_TYPE_CEX6)
+                       ap_dev->device_type = AP_DEVICE_TYPE_CEX5;
                ap_dev->functions = device_functions;
                spin_lock_init(&ap_dev->lock);
                INIT_LIST_HEAD(&ap_dev->pendingq);
index 6adcbdf225d19754e0ec8e8e468e176428452fe0..cc741e948170a0b957fa0a49611ba2ea2d52ba84 100644 (file)
@@ -105,6 +105,7 @@ static inline int ap_test_bit(unsigned int *ptr, unsigned int nr)
 #define AP_DEVICE_TYPE_CEX3C   9
 #define AP_DEVICE_TYPE_CEX4    10
 #define AP_DEVICE_TYPE_CEX5    11
+#define AP_DEVICE_TYPE_CEX6    12
 
 /*
  * Known function facilities