Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2af48080e100d66db8f086af70a70713a953a83d
Commit:     2af48080e100d66db8f086af70a70713a953a83d
Parent:     39aa7cf612cc4e7f688c18f04c35afb51c57472e
Author:     Ralph Wuerthner <[EMAIL PROTECTED]>
AuthorDate: Fri Oct 12 16:11:30 2007 +0200
Committer:  Martin Schwidefsky <[EMAIL PROTECTED]>
CommitDate: Fri Oct 12 16:13:05 2007 +0200

    [S390] zcrypt: fix PCIXCC/CEX2C error recovery
    
    Symptom:     zcrypt fails by setting all PCIXCC/CEX2C cards offline for a
                 certain type of invalid keys.
    Problem:     zcrypt does not handle rc=12/rs=769 request responses correctly
    Solution:    modify convert_type86_ica() to handle these error codes 
correctly
    
    Signed-off-by: Ralph Wuerthner <[EMAIL PROTECTED]>
    Signed-off-by: Martin Schwidefsky <[EMAIL PROTECTED]>
---
 drivers/s390/crypto/zcrypt_pcixcc.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/crypto/zcrypt_pcixcc.c 
b/drivers/s390/crypto/zcrypt_pcixcc.c
index c283692..70b9ddc 100644
--- a/drivers/s390/crypto/zcrypt_pcixcc.c
+++ b/drivers/s390/crypto/zcrypt_pcixcc.c
@@ -432,14 +432,17 @@ static int convert_type86_ica(struct zcrypt_device *zdev,
                }
                if (service_rc == 8 && service_rs == 770) {
                        PDEBUG("Invalid key length on PCIXCC/CEX2C\n");
-                       zdev->min_mod_size = PCIXCC_MIN_MOD_SIZE_OLD;
-                       return -EAGAIN;
+                       return -EINVAL;
                }
                if (service_rc == 8 && service_rs == 783) {
                        PDEBUG("Extended bitlengths not enabled on 
PCIXCC/CEX2C\n");
                        zdev->min_mod_size = PCIXCC_MIN_MOD_SIZE_OLD;
                        return -EAGAIN;
                }
+               if (service_rc == 12 && service_rs == 769) {
+                       PDEBUG("Invalid key on PCIXCC/CEX2C\n");
+                       return -EINVAL;
+               }
                PRINTK("Unknown service rc/rs (PCIXCC/CEX2C): %d/%d\n",
                       service_rc, service_rs);
                zdev->online = 0;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to