aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/zcrypt_pcicc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-10 14:46:09 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-10 14:46:09 -0700
commit9f9d76321659b5ebc9939101481f7c3ce228ea6e (patch)
tree7abd21796ad85ba6c606cd2a93e787fb90b3abe6 /drivers/s390/crypto/zcrypt_pcicc.c
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw (diff)
parent[S390] vmlogrdr function annotation. (diff)
downloadlinux-dev-9f9d76321659b5ebc9939101481f7c3ce228ea6e.tar.xz
linux-dev-9f9d76321659b5ebc9939101481f7c3ce228ea6e.zip
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: [S390] vmlogrdr function annotation. [S390] s390: rename CPU_IDLE to S390_CPU_IDLE [S390] cio: Remove prototype for non-existing function cmf_reset(). [S390] zcrypt: fix request timeout handling [S390] system call optimization. [S390] dasd: Avoid compile warnings on !CONFIG_DASD_PROFILE [S390] Remove volatile from atomic_t [S390] Program check in diag 210 under 31 bit [S390] Bogomips calculation for 64 bit. [S390] smp: Merge smp_count_cpus() and smp_get_save_areas(). [S390] zcore: Fix __user annotation. [S390] fixed cdl-format detection. [S390] sclp: Test facility list before executing a service call. [S390] sclp: introduce some new interfaces. [S390] Fixed comment typo. [S390] vmcp cleanup
Diffstat (limited to 'drivers/s390/crypto/zcrypt_pcicc.c')
-rw-r--r--drivers/s390/crypto/zcrypt_pcicc.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/drivers/s390/crypto/zcrypt_pcicc.c b/drivers/s390/crypto/zcrypt_pcicc.c
index f295a403b29a..d6d59bf9ac38 100644
--- a/drivers/s390/crypto/zcrypt_pcicc.c
+++ b/drivers/s390/crypto/zcrypt_pcicc.c
@@ -82,6 +82,7 @@ static struct ap_driver zcrypt_pcicc_driver = {
.remove = zcrypt_pcicc_remove,
.receive = zcrypt_pcicc_receive,
.ids = zcrypt_pcicc_ids,
+ .request_timeout = PCICC_CLEANUP_TIME,
};
/**
@@ -501,18 +502,13 @@ static long zcrypt_pcicc_modexpo(struct zcrypt_device *zdev,
goto out_free;
init_completion(&work);
ap_queue_message(zdev->ap_dev, &ap_msg);
- rc = wait_for_completion_interruptible_timeout(
- &work, PCICC_CLEANUP_TIME);
- if (rc > 0)
+ rc = wait_for_completion_interruptible(&work);
+ if (rc == 0)
rc = convert_response(zdev, &ap_msg, mex->outputdata,
mex->outputdatalength);
- else {
- /* Signal pending or message timed out. */
+ else
+ /* Signal pending. */
ap_cancel_message(zdev->ap_dev, &ap_msg);
- if (rc == 0)
- /* Message timed out. */
- rc = -ETIME;
- }
out_free:
free_page((unsigned long) ap_msg.message);
return rc;
@@ -544,18 +540,13 @@ static long zcrypt_pcicc_modexpo_crt(struct zcrypt_device *zdev,
goto out_free;
init_completion(&work);
ap_queue_message(zdev->ap_dev, &ap_msg);
- rc = wait_for_completion_interruptible_timeout(
- &work, PCICC_CLEANUP_TIME);
- if (rc > 0)
+ rc = wait_for_completion_interruptible(&work);
+ if (rc == 0)
rc = convert_response(zdev, &ap_msg, crt->outputdata,
crt->outputdatalength);
- else {
- /* Signal pending or message timed out. */
+ else
+ /* Signal pending. */
ap_cancel_message(zdev->ap_dev, &ap_msg);
- if (rc == 0)
- /* Message timed out. */
- rc = -ETIME;
- }
out_free:
free_page((unsigned long) ap_msg.message);
return rc;