Skip to content

Commit

Permalink
[S390] ap: skip device registration on type probe failure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Holger Dengler authored and Martin Schwidefsky committed May 23, 2011
1 parent 89db4df commit cf2d007
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions drivers/crypto/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 6 additions & 2 deletions drivers/s390/crypto/ap_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit cf2d007

Please sign in to comment.