Lines Matching refs:u_ctx

75 	struct uld_ctx *u_ctx = NULL;  in assign_chcr_device()  local
85 u_ctx = drv_data.last_dev; in assign_chcr_device()
94 return u_ctx; in assign_chcr_device()
97 static void chcr_dev_add(struct uld_ctx *u_ctx) in chcr_dev_add() argument
101 dev = &u_ctx->dev; in chcr_dev_add()
105 list_move(&u_ctx->entry, &drv_data.act_dev); in chcr_dev_add()
107 drv_data.last_dev = u_ctx; in chcr_dev_add()
111 static void chcr_dev_init(struct uld_ctx *u_ctx) in chcr_dev_init() argument
115 dev = &u_ctx->dev; in chcr_dev_init()
124 list_add_tail(&u_ctx->entry, &drv_data.inact_dev); in chcr_dev_init()
128 static int chcr_dev_move(struct uld_ctx *u_ctx) in chcr_dev_move() argument
131 if (drv_data.last_dev == u_ctx) { in chcr_dev_move()
139 list_move(&u_ctx->entry, &drv_data.inact_dev); in chcr_dev_move()
184 struct uld_ctx *u_ctx; in chcr_uld_add() local
192 u_ctx = kzalloc(sizeof(*u_ctx), GFP_KERNEL); in chcr_uld_add()
193 if (!u_ctx) { in chcr_uld_add()
194 u_ctx = ERR_PTR(-ENOMEM); in chcr_uld_add()
197 u_ctx->lldi = *lld; in chcr_uld_add()
198 chcr_dev_init(u_ctx); in chcr_uld_add()
200 return u_ctx; in chcr_uld_add()
206 struct uld_ctx *u_ctx = (struct uld_ctx *)handle; in chcr_uld_rx_handler() local
207 struct chcr_dev *dev = &u_ctx->dev; in chcr_uld_rx_handler()
223 static void chcr_detach_device(struct uld_ctx *u_ctx) in chcr_detach_device() argument
225 struct chcr_dev *dev = &u_ctx->dev; in chcr_detach_device()
238 chcr_dev_move(u_ctx); in chcr_detach_device()
243 struct uld_ctx *u_ctx = handle; in chcr_uld_state_change() local
248 if (u_ctx->dev.state != CHCR_INIT) { in chcr_uld_state_change()
252 chcr_dev_add(u_ctx); in chcr_uld_state_change()
257 chcr_detach_device(u_ctx); in chcr_uld_state_change()
284 struct uld_ctx *u_ctx, *tmp; in chcr_crypto_exit() local
291 list_for_each_entry_safe(u_ctx, tmp, &drv_data.act_dev, entry) { in chcr_crypto_exit()
292 adap = padap(&u_ctx->dev); in chcr_crypto_exit()
294 list_del(&u_ctx->entry); in chcr_crypto_exit()
295 kfree(u_ctx); in chcr_crypto_exit()
297 list_for_each_entry_safe(u_ctx, tmp, &drv_data.inact_dev, entry) { in chcr_crypto_exit()
298 adap = padap(&u_ctx->dev); in chcr_crypto_exit()
300 list_del(&u_ctx->entry); in chcr_crypto_exit()
301 kfree(u_ctx); in chcr_crypto_exit()