Lines Matching refs:zq

44 	struct zcrypt_queue *zq = aq->private;
45 int online = aq->config && zq->online ? 1 : 0;
55 struct zcrypt_queue *zq = aq->private;
56 struct zcrypt_card *zc = zq->zcard;
66 zq->online = online;
69 AP_QID_CARD(zq->queue->qid),
70 AP_QID_QUEUE(zq->queue->qid),
74 ap_flush_queue(zq->queue);
84 struct zcrypt_queue *zq = to_ap_queue(dev)->private;
86 return scnprintf(buf, PAGE_SIZE, "%d\n", atomic_read(&zq->load));
101 void zcrypt_queue_force_online(struct zcrypt_queue *zq, int online)
103 zq->online = online;
105 ap_flush_queue(zq->queue);
110 struct zcrypt_queue *zq;
112 zq = kzalloc(sizeof(struct zcrypt_queue), GFP_KERNEL);
113 if (!zq)
115 zq->reply.msg = kmalloc(max_response_size, GFP_KERNEL);
116 if (!zq->reply.msg)
118 zq->reply.len = max_response_size;
119 INIT_LIST_HEAD(&zq->list);
120 kref_init(&zq->refcount);
121 return zq;
124 kfree(zq);
129 void zcrypt_queue_free(struct zcrypt_queue *zq)
131 kfree(zq->reply.msg);
132 kfree(zq);
138 struct zcrypt_queue *zq =
140 zcrypt_queue_free(zq);
143 void zcrypt_queue_get(struct zcrypt_queue *zq)
145 kref_get(&zq->refcount);
149 int zcrypt_queue_put(struct zcrypt_queue *zq)
151 return kref_put(&zq->refcount, zcrypt_queue_release);
157 * @zq: Pointer to a crypto queue device
161 int zcrypt_queue_register(struct zcrypt_queue *zq)
167 zc = zq->queue->card->private;
169 zq->zcard = zc;
170 zq->online = 1; /* New devices are online by default. */
173 AP_QID_CARD(zq->queue->qid), AP_QID_QUEUE(zq->queue->qid));
175 list_add_tail(&zq->list, &zc->zqueues);
179 rc = sysfs_create_group(&zq->queue->ap_dev.device.kobj,
184 if (zq->ops->rng) {
192 sysfs_remove_group(&zq->queue->ap_dev.device.kobj,
196 list_del_init(&zq->list);
205 * @zq: Pointer to crypto queue device
209 void zcrypt_queue_unregister(struct zcrypt_queue *zq)
214 AP_QID_CARD(zq->queue->qid), AP_QID_QUEUE(zq->queue->qid));
216 zc = zq->zcard;
218 list_del_init(&zq->list);
221 if (zq->ops->rng)
223 sysfs_remove_group(&zq->queue->ap_dev.device.kobj,
226 zcrypt_queue_put(zq);