[S390] ap: skip device registration on type probe failure
authorHolger Dengler <hd@linux.vnet.ibm.com>
Mon, 23 May 2011 08:24:30 +0000 (10:24 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 23 May 2011 08:24:29 +0000 (10:24 +0200)
The registration of an ap device will be skipped, if the device type
probing fails.
Add names of current crypto adapters to the Kconfig help.

Signed-off-by: Holger Dengler <hd@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/crypto/Kconfig
drivers/s390/crypto/ap_bus.c

index c64c3807f51665a111ae3bb10728d227d1e6581d..e0b25de1e339249773287c13d8f457d1f9e94352 100644 (file)
@@ -74,6 +74,8 @@ config ZCRYPT
          + PCI-X Cryptographic Coprocessor (PCIXCC)
          + Crypto Express2 Coprocessor (CEX2C)
          + Crypto Express2 Accelerator (CEX2A)
+         + Crypto Express3 Coprocessor (CEX3C)
+         + Crypto Express3 Accelerator (CEX3A)
 
 config ZCRYPT_MONOLITHIC
        bool "Monolithic zcrypt module"
index 67302b944ab34e996364c60f849ea3961ad6b81e..16e4a25596e78a03e53adc88d6170008b1ef3f2a 100644 (file)
@@ -1183,8 +1183,12 @@ static void ap_scan_bus(struct work_struct *unused)
                INIT_LIST_HEAD(&ap_dev->list);
                setup_timer(&ap_dev->timeout, ap_request_timeout,
                            (unsigned long) ap_dev);
-               if (device_type == 0)
-                       ap_probe_device_type(ap_dev);
+               if (device_type == 0) {
+                       if (ap_probe_device_type(ap_dev)) {
+                               kfree(ap_dev);
+                               continue;
+                       }
+               }
                else
                        ap_dev->device_type = device_type;