diff options
author | Holger Dengler <hd@linux.vnet.ibm.com> | 2012-08-28 10:48:29 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-09-26 09:44:56 -0400 |
commit | 1e2076f4527b5b0854d0ebe60102b6710a9ba64c (patch) | |
tree | 66b42d73944010bbbffe9cfd0b0470ffe8ce8c44 /drivers/s390/crypto/ap_bus.c | |
parent | 5e55a488c87aa6cc269b04bfec99e835f03b2c2d (diff) |
s390/zcrypt: Add support for CEX4 crypto card
New zcrypt module supports IBM CryptoExpress 4 cards.
Signed-off-by: Holger Dengler <hd@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/ap_bus.c')
-rw-r--r-- | drivers/s390/crypto/ap_bus.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index f0b53ee6802f..39e5eb263e4b 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c | |||
@@ -1340,30 +1340,22 @@ static void ap_scan_bus(struct work_struct *unused) | |||
1340 | (unsigned long) ap_dev); | 1340 | (unsigned long) ap_dev); |
1341 | switch (device_type) { | 1341 | switch (device_type) { |
1342 | case 0: | 1342 | case 0: |
1343 | /* device type probing for old cards */ | ||
1343 | if (ap_probe_device_type(ap_dev)) { | 1344 | if (ap_probe_device_type(ap_dev)) { |
1344 | kfree(ap_dev); | 1345 | kfree(ap_dev); |
1345 | continue; | 1346 | continue; |
1346 | } | 1347 | } |
1347 | break; | 1348 | break; |
1348 | case 10: | ||
1349 | if (ap_query_functions(qid, &device_functions)) { | ||
1350 | kfree(ap_dev); | ||
1351 | continue; | ||
1352 | } | ||
1353 | ap_dev->functions = device_functions; | ||
1354 | if (ap_test_bit(&device_functions, 3)) | ||
1355 | ap_dev->device_type = AP_DEVICE_TYPE_CEX3C; | ||
1356 | else if (ap_test_bit(&device_functions, 4)) | ||
1357 | ap_dev->device_type = AP_DEVICE_TYPE_CEX3A; | ||
1358 | else { | ||
1359 | kfree(ap_dev); | ||
1360 | continue; | ||
1361 | } | ||
1362 | break; | ||
1363 | default: | 1349 | default: |
1364 | ap_dev->device_type = device_type; | 1350 | ap_dev->device_type = device_type; |
1365 | } | 1351 | } |
1366 | 1352 | ||
1353 | rc = ap_query_functions(qid, &device_functions); | ||
1354 | if (!rc) | ||
1355 | ap_dev->functions = device_functions; | ||
1356 | else | ||
1357 | ap_dev->functions = 0u; | ||
1358 | |||
1367 | ap_dev->device.bus = &ap_bus_type; | 1359 | ap_dev->device.bus = &ap_bus_type; |
1368 | ap_dev->device.parent = ap_root_device; | 1360 | ap_dev->device.parent = ap_root_device; |
1369 | if (dev_set_name(&ap_dev->device, "card%02x", | 1361 | if (dev_set_name(&ap_dev->device, "card%02x", |