Lines Matching refs:zdev
84 static int ICAMEX_msg_to_type4MEX_msg(struct zcrypt_device *zdev, in ICAMEX_msg_to_type4MEX_msg() argument
133 static int ICACRT_msg_to_type4CRT_msg(struct zcrypt_device *zdev, in ICACRT_msg_to_type4CRT_msg() argument
194 static int convert_type84(struct zcrypt_device *zdev, in convert_type84() argument
204 zdev->online = 0; in convert_type84()
206 zdev->ap_dev->qid); in convert_type84()
207 ZCRYPT_DBF_DEV(DBF_ERR, zdev, "dev%04xo%drc%d", in convert_type84()
208 zdev->ap_dev->qid, zdev->online, t84h->code); in convert_type84()
218 static int convert_response(struct zcrypt_device *zdev, in convert_response() argument
227 return convert_error(zdev, reply); in convert_response()
229 return convert_type84(zdev, reply, in convert_response()
232 zdev->online = 0; in convert_response()
234 zdev->ap_dev->qid); in convert_response()
235 ZCRYPT_DBF_DEV(DBF_ERR, zdev, "dev%04xo%dfail", in convert_response()
236 zdev->ap_dev->qid, zdev->online); in convert_response()
284 static long zcrypt_pcica_modexpo(struct zcrypt_device *zdev, in zcrypt_pcica_modexpo() argument
299 rc = ICAMEX_msg_to_type4MEX_msg(zdev, &ap_msg, mex); in zcrypt_pcica_modexpo()
303 ap_queue_message(zdev->ap_dev, &ap_msg); in zcrypt_pcica_modexpo()
306 rc = convert_response(zdev, &ap_msg, mex->outputdata, in zcrypt_pcica_modexpo()
310 ap_cancel_message(zdev->ap_dev, &ap_msg); in zcrypt_pcica_modexpo()
323 static long zcrypt_pcica_modexpo_crt(struct zcrypt_device *zdev, in zcrypt_pcica_modexpo_crt() argument
338 rc = ICACRT_msg_to_type4CRT_msg(zdev, &ap_msg, crt); in zcrypt_pcica_modexpo_crt()
342 ap_queue_message(zdev->ap_dev, &ap_msg); in zcrypt_pcica_modexpo_crt()
345 rc = convert_response(zdev, &ap_msg, crt->outputdata, in zcrypt_pcica_modexpo_crt()
349 ap_cancel_message(zdev->ap_dev, &ap_msg); in zcrypt_pcica_modexpo_crt()
370 struct zcrypt_device *zdev; in zcrypt_pcica_probe() local
373 zdev = zcrypt_device_alloc(PCICA_MAX_RESPONSE_SIZE); in zcrypt_pcica_probe()
374 if (!zdev) in zcrypt_pcica_probe()
376 zdev->ap_dev = ap_dev; in zcrypt_pcica_probe()
377 zdev->ops = &zcrypt_pcica_ops; in zcrypt_pcica_probe()
378 zdev->online = 1; in zcrypt_pcica_probe()
379 zdev->user_space_type = ZCRYPT_PCICA; in zcrypt_pcica_probe()
380 zdev->type_string = "PCICA"; in zcrypt_pcica_probe()
381 zdev->min_mod_size = PCICA_MIN_MOD_SIZE; in zcrypt_pcica_probe()
382 zdev->max_mod_size = PCICA_MAX_MOD_SIZE; in zcrypt_pcica_probe()
383 zdev->speed_rating = PCICA_SPEED_RATING; in zcrypt_pcica_probe()
384 zdev->max_exp_bit_length = PCICA_MAX_MOD_SIZE; in zcrypt_pcica_probe()
385 ap_dev->reply = &zdev->reply; in zcrypt_pcica_probe()
386 ap_dev->private = zdev; in zcrypt_pcica_probe()
387 rc = zcrypt_device_register(zdev); in zcrypt_pcica_probe()
394 zcrypt_device_free(zdev); in zcrypt_pcica_probe()
404 struct zcrypt_device *zdev = ap_dev->private; in zcrypt_pcica_remove() local
406 zcrypt_device_unregister(zdev); in zcrypt_pcica_remove()