[S390] zcrypt: add support for cex3 device types
authorFelix Beck <felix.beck@de.ibm.com>
Mon, 7 Dec 2009 11:51:56 +0000 (12:51 +0100)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Mon, 7 Dec 2009 11:51:35 +0000 (12:51 +0100)
This patch renames the CEX2C2 and CEX2A2 types to CEX3 device types.

Signed-off-by: Felix Beck <felix.beck@de.ibm.com>
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/crypto/ap_bus.h
drivers/s390/crypto/zcrypt_api.c
drivers/s390/crypto/zcrypt_cex2a.c
drivers/s390/crypto/zcrypt_pcixcc.c

index c37466713b32596e0778a0eeac3ed483dfcd8543..4785d07cd447511b673a5085eb0cc7849ffeb3f1 100644 (file)
@@ -97,8 +97,8 @@ struct ap_queue_status {
 #define AP_DEVICE_TYPE_PCIXCC  5
 #define AP_DEVICE_TYPE_CEX2A   6
 #define AP_DEVICE_TYPE_CEX2C   7
-#define AP_DEVICE_TYPE_CEX2A2  8
-#define AP_DEVICE_TYPE_CEX2C2  9
+#define AP_DEVICE_TYPE_CEX3A   8
+#define AP_DEVICE_TYPE_CEX3C   9
 
 /*
  * AP reset flag states
index 65b6a96afe6b10d336d3d95e7b7de026f88547ab..fe214770f2e7e5f4603c4ff681e8f61b7178e880 100644 (file)
@@ -1009,6 +1009,10 @@ static int zcrypt_status_read(char *resp_buff, char **start, off_t offset,
                       zcrypt_count_type(ZCRYPT_CEX2C));
        len += sprintf(resp_buff + len, "CEX2A count: %d\n",
                       zcrypt_count_type(ZCRYPT_CEX2A));
+       len += sprintf(resp_buff + len, "CEX3C count: %d\n",
+                      zcrypt_count_type(ZCRYPT_CEX3C));
+       len += sprintf(resp_buff + len, "CEX3A count: %d\n",
+                      zcrypt_count_type(ZCRYPT_CEX3A));
        len += sprintf(resp_buff + len, "requestq count: %d\n",
                       zcrypt_requestq_count());
        len += sprintf(resp_buff + len, "pendingq count: %d\n",
@@ -1017,7 +1021,7 @@ static int zcrypt_status_read(char *resp_buff, char **start, off_t offset,
                       atomic_read(&zcrypt_open_count));
        zcrypt_status_mask(workarea);
        len += sprinthx("Online devices: 1=PCICA 2=PCICC 3=PCIXCC(MCL2) "
-                       "4=PCIXCC(MCL3) 5=CEX2C 6=CEX2A",
+                       "4=PCIXCC(MCL3) 5=CEX2C 6=CEX2A 7=CEX3C 8=CEX3A",
                        resp_buff+len, workarea, AP_DEVICES);
        zcrypt_qdepth_mask(workarea);
        len += sprinthx("Waiting work element counts",
@@ -1095,8 +1099,9 @@ static int zcrypt_status_write(struct file *file, const char __user *buffer,
                 * '0' for no device, '1' for PCICA, '2' for PCICC,
                 * '3' for PCIXCC_MCL2, '4' for PCIXCC_MCL3,
                 * '5' for CEX2C and '6' for CEX2A'
+                * '7' for CEX3C and '8' for CEX3A
                 */
-               if (*ptr >= '0' && *ptr <= '6')
+               if (*ptr >= '0' && *ptr <= '8')
                        j++;
                else if (*ptr == 'd' || *ptr == 'D')
                        zcrypt_disable_card(j++);
index ad61a6a59374a8acee09a74fdc1bc03d50cbaa20..d25b6dfed2e06426474216bada0f8c7c5e0056e1 100644 (file)
@@ -49,7 +49,7 @@
 
 static struct ap_device_id zcrypt_cex2a_ids[] = {
        { AP_DEVICE(AP_DEVICE_TYPE_CEX2A) },
-       { AP_DEVICE(AP_DEVICE_TYPE_CEX2A2) },
+       { AP_DEVICE(AP_DEVICE_TYPE_CEX3A) },
        { /* end of list */ },
 };
 
index addaaddaf9942e86cbbd57817ed50a66154f6ab9..cdaa401f20cd1a7ae866d8181c38e19392074e12 100644 (file)
@@ -72,7 +72,7 @@ struct response_type {
 static struct ap_device_id zcrypt_pcixcc_ids[] = {
        { AP_DEVICE(AP_DEVICE_TYPE_PCIXCC) },
        { AP_DEVICE(AP_DEVICE_TYPE_CEX2C) },
-       { AP_DEVICE(AP_DEVICE_TYPE_CEX2C2) },
+       { AP_DEVICE(AP_DEVICE_TYPE_CEX3C) },
        { /* end of list */ },
 };