Lines Matching refs:zdev
154 static int ICAMEX_msg_to_type6MEX_msg(struct zcrypt_device *zdev, in ICAMEX_msg_to_type6MEX_msg() argument
223 msg->cprb.usage_domain[0]= AP_QID_QUEUE(zdev->ap_dev->qid); in ICAMEX_msg_to_type6MEX_msg()
241 static int ICACRT_msg_to_type6CRT_msg(struct zcrypt_device *zdev, in ICACRT_msg_to_type6CRT_msg() argument
286 msg->cprb.usage_domain[0] = AP_QID_QUEUE(zdev->ap_dev->qid); in ICACRT_msg_to_type6CRT_msg()
315 static int convert_type86(struct zcrypt_device *zdev, in convert_type86() argument
368 zdev->max_mod_size = PCICC_MAX_MOD_SIZE_OLD; in convert_type86()
372 zdev->max_mod_size = PCICC_MAX_MOD_SIZE_OLD; in convert_type86()
377 zdev->online = 0; in convert_type86()
379 zdev->ap_dev->qid); in convert_type86()
380 ZCRYPT_DBF_DEV(DBF_ERR, zdev, "dev%04xo%drc%d", in convert_type86()
381 zdev->ap_dev->qid, zdev->online, in convert_type86()
415 static int convert_response(struct zcrypt_device *zdev, in convert_response() argument
426 return convert_error(zdev, reply); in convert_response()
429 return convert_error(zdev, reply); in convert_response()
431 return convert_type86(zdev, reply, in convert_response()
435 zdev->online = 0; in convert_response()
437 zdev->ap_dev->qid); in convert_response()
438 ZCRYPT_DBF_DEV(DBF_ERR, zdev, "dev%04xo%dfail", in convert_response()
439 zdev->ap_dev->qid, zdev->online); in convert_response()
489 static long zcrypt_pcicc_modexpo(struct zcrypt_device *zdev, in zcrypt_pcicc_modexpo() argument
505 rc = ICAMEX_msg_to_type6MEX_msg(zdev, &ap_msg, mex); in zcrypt_pcicc_modexpo()
509 ap_queue_message(zdev->ap_dev, &ap_msg); in zcrypt_pcicc_modexpo()
512 rc = convert_response(zdev, &ap_msg, mex->outputdata, in zcrypt_pcicc_modexpo()
516 ap_cancel_message(zdev->ap_dev, &ap_msg); in zcrypt_pcicc_modexpo()
529 static long zcrypt_pcicc_modexpo_crt(struct zcrypt_device *zdev, in zcrypt_pcicc_modexpo_crt() argument
545 rc = ICACRT_msg_to_type6CRT_msg(zdev, &ap_msg, crt); in zcrypt_pcicc_modexpo_crt()
549 ap_queue_message(zdev->ap_dev, &ap_msg); in zcrypt_pcicc_modexpo_crt()
552 rc = convert_response(zdev, &ap_msg, crt->outputdata, in zcrypt_pcicc_modexpo_crt()
556 ap_cancel_message(zdev->ap_dev, &ap_msg); in zcrypt_pcicc_modexpo_crt()
577 struct zcrypt_device *zdev; in zcrypt_pcicc_probe() local
580 zdev = zcrypt_device_alloc(PCICC_MAX_RESPONSE_SIZE); in zcrypt_pcicc_probe()
581 if (!zdev) in zcrypt_pcicc_probe()
583 zdev->ap_dev = ap_dev; in zcrypt_pcicc_probe()
584 zdev->ops = &zcrypt_pcicc_ops; in zcrypt_pcicc_probe()
585 zdev->online = 1; in zcrypt_pcicc_probe()
586 zdev->user_space_type = ZCRYPT_PCICC; in zcrypt_pcicc_probe()
587 zdev->type_string = "PCICC"; in zcrypt_pcicc_probe()
588 zdev->min_mod_size = PCICC_MIN_MOD_SIZE; in zcrypt_pcicc_probe()
589 zdev->max_mod_size = PCICC_MAX_MOD_SIZE; in zcrypt_pcicc_probe()
590 zdev->speed_rating = PCICC_SPEED_RATING; in zcrypt_pcicc_probe()
591 zdev->max_exp_bit_length = PCICC_MAX_MOD_SIZE; in zcrypt_pcicc_probe()
592 ap_dev->reply = &zdev->reply; in zcrypt_pcicc_probe()
593 ap_dev->private = zdev; in zcrypt_pcicc_probe()
594 rc = zcrypt_device_register(zdev); in zcrypt_pcicc_probe()
601 zcrypt_device_free(zdev); in zcrypt_pcicc_probe()
611 struct zcrypt_device *zdev = ap_dev->private; in zcrypt_pcicc_remove() local
613 zcrypt_device_unregister(zdev); in zcrypt_pcicc_remove()