• Home
  • Raw
  • Download

Lines Matching refs:eq

256 	struct ehea_eq *eq;  in ehea_create_eq()  local
258 eq = kzalloc(sizeof(*eq), GFP_KERNEL); in ehea_create_eq()
259 if (!eq) in ehea_create_eq()
262 eq->adapter = adapter; in ehea_create_eq()
263 eq->attr.type = type; in ehea_create_eq()
264 eq->attr.max_nr_of_eqes = max_nr_of_eqes; in ehea_create_eq()
265 eq->attr.eqe_gen = eqe_gen; in ehea_create_eq()
266 spin_lock_init(&eq->spinlock); in ehea_create_eq()
269 &eq->attr, &eq->fw_handle); in ehea_create_eq()
275 ret = hw_queue_ctor(&eq->hw_queue, eq->attr.nr_pages, in ehea_create_eq()
282 for (i = 0; i < eq->attr.nr_pages; i++) { in ehea_create_eq()
283 vpage = hw_qpageit_get_inc(&eq->hw_queue); in ehea_create_eq()
294 eq->fw_handle, rpage, 1); in ehea_create_eq()
296 if (i == (eq->attr.nr_pages - 1)) { in ehea_create_eq()
298 vpage = hw_qpageit_get_inc(&eq->hw_queue); in ehea_create_eq()
309 hw_qeit_reset(&eq->hw_queue); in ehea_create_eq()
310 return eq; in ehea_create_eq()
313 hw_queue_dtor(&eq->hw_queue); in ehea_create_eq()
316 ehea_h_free_resource(adapter->handle, eq->fw_handle, FORCE_FREE); in ehea_create_eq()
319 kfree(eq); in ehea_create_eq()
323 struct ehea_eqe *ehea_poll_eq(struct ehea_eq *eq) in ehea_poll_eq() argument
328 spin_lock_irqsave(&eq->spinlock, flags); in ehea_poll_eq()
329 eqe = hw_eqit_eq_get_inc_valid(&eq->hw_queue); in ehea_poll_eq()
330 spin_unlock_irqrestore(&eq->spinlock, flags); in ehea_poll_eq()
335 static u64 ehea_destroy_eq_res(struct ehea_eq *eq, u64 force) in ehea_destroy_eq_res() argument
340 spin_lock_irqsave(&eq->spinlock, flags); in ehea_destroy_eq_res()
342 hret = ehea_h_free_resource(eq->adapter->handle, eq->fw_handle, force); in ehea_destroy_eq_res()
343 spin_unlock_irqrestore(&eq->spinlock, flags); in ehea_destroy_eq_res()
348 hw_queue_dtor(&eq->hw_queue); in ehea_destroy_eq_res()
349 kfree(eq); in ehea_destroy_eq_res()
354 int ehea_destroy_eq(struct ehea_eq *eq) in ehea_destroy_eq() argument
357 if (!eq) in ehea_destroy_eq()
360 hcp_epas_dtor(&eq->epas); in ehea_destroy_eq()
362 hret = ehea_destroy_eq_res(eq, NORMAL_FREE); in ehea_destroy_eq()
364 ehea_error_data(eq->adapter, eq->fw_handle, &aer, &aerr); in ehea_destroy_eq()
365 hret = ehea_destroy_eq_res(eq, FORCE_FREE); in ehea_destroy_eq()