Lines Matching +full:firmware +full:- +full:initialised
4 * Copyright (C) 2011-2016 Chelsio Communications. All rights reserved.
56 if (atomic_read(&dev->inflight)) { in detach_work_fn()
57 dev->wqretry--; in detach_work_fn()
58 if (dev->wqretry) { in detach_work_fn()
60 atomic_read(&dev->inflight)); in detach_work_fn()
62 schedule_delayed_work(&dev->detach_work, WQ_DETACH_TM); in detach_work_fn()
65 atomic_read(&dev->inflight)); in detach_work_fn()
66 complete(&dev->detach_comp); in detach_work_fn()
69 complete(&dev->detach_comp); in detach_work_fn()
79 * device in round-robin fashion for crypto operations in assign_chcr_device()
81 * maintain request-response ordering. in assign_chcr_device()
86 if (list_is_last(&drv_data.last_dev->entry, &drv_data.act_dev)) in assign_chcr_device()
101 dev = &u_ctx->dev; in chcr_dev_add()
102 dev->state = CHCR_ATTACH; in chcr_dev_add()
103 atomic_set(&dev->inflight, 0); in chcr_dev_add()
105 list_move(&u_ctx->entry, &drv_data.act_dev); in chcr_dev_add()
115 dev = &u_ctx->dev; in chcr_dev_init()
116 spin_lock_init(&dev->lock_chcr_dev); in chcr_dev_init()
117 INIT_DELAYED_WORK(&dev->detach_work, detach_work_fn); in chcr_dev_init()
118 init_completion(&dev->detach_comp); in chcr_dev_init()
119 dev->state = CHCR_INIT; in chcr_dev_init()
120 dev->wqretry = WQ_RETRY; in chcr_dev_init()
122 atomic_set(&dev->inflight, 0); in chcr_dev_init()
124 list_add_tail(&u_ctx->entry, &drv_data.inact_dev); in chcr_dev_init()
132 if (list_is_last(&drv_data.last_dev->entry, &drv_data.act_dev)) in chcr_dev_move()
139 list_move(&u_ctx->entry, &drv_data.inact_dev); in chcr_dev_move()
158 fw6_pld->data[1]); in cpl_fw6_pld_handler()
161 ntohl(*(__be32 *)((unsigned char *)&fw6_pld->data[0] + 4)); in cpl_fw6_pld_handler()
163 error_status = -EBADMSG; in cpl_fw6_pld_handler()
168 pr_err("Incorrect request address from the firmware\n"); in cpl_fw6_pld_handler()
169 return -EFAULT; in cpl_fw6_pld_handler()
172 atomic_inc(&adap->chcr_stats.error); in cpl_fw6_pld_handler()
179 return cxgb4_crypto_send(skb->dev, skb); in chcr_send_wr()
188 if (!(lld->ulp_crypto & ULP_CRYPTO_LOOKASIDE)) in chcr_uld_add()
189 return ERR_PTR(-EOPNOTSUPP); in chcr_uld_add()
194 u_ctx = ERR_PTR(-ENOMEM); in chcr_uld_add()
197 u_ctx->lldi = *lld; in chcr_uld_add()
207 struct chcr_dev *dev = &u_ctx->dev; in chcr_uld_rx_handler()
211 if (!work_handlers[rpl->opcode]) { in chcr_uld_rx_handler()
212 pr_err("Unsupported opcode %d received\n", rpl->opcode); in chcr_uld_rx_handler()
217 work_handlers[rpl->opcode](adap, (unsigned char *)&rsp[1]); in chcr_uld_rx_handler()
219 work_handlers[rpl->opcode](adap, pgl->va); in chcr_uld_rx_handler()
225 struct chcr_dev *dev = &u_ctx->dev; in chcr_detach_device()
227 if (dev->state == CHCR_DETACH) { in chcr_detach_device()
231 dev->state = CHCR_DETACH; in chcr_detach_device()
232 if (atomic_read(&dev->inflight) != 0) { in chcr_detach_device()
233 schedule_delayed_work(&dev->detach_work, WQ_DETACH_TM); in chcr_detach_device()
234 wait_for_completion(&dev->detach_comp); in chcr_detach_device()
248 if (u_ctx->dev.state != CHCR_INIT) { in chcr_uld_state_change()
249 // ALready Initialised. in chcr_uld_state_change()
292 adap = padap(&u_ctx->dev); in chcr_crypto_exit()
293 memset(&adap->chcr_stats, 0, sizeof(adap->chcr_stats)); in chcr_crypto_exit()
294 list_del(&u_ctx->entry); in chcr_crypto_exit()
298 adap = padap(&u_ctx->dev); in chcr_crypto_exit()
299 memset(&adap->chcr_stats, 0, sizeof(adap->chcr_stats)); in chcr_crypto_exit()
300 list_del(&u_ctx->entry); in chcr_crypto_exit()
309 MODULE_DESCRIPTION("Crypto Co-processor for Chelsio Terminator cards.");