Lines Matching refs:handler
252 static inline int process_frame_data(struct hp_handler *handler, in process_frame_data() argument
255 u32 *p = handler->frame_ptr; in process_frame_data()
259 if (qm_fd_addr_get64(fd) != handler->addr) { in process_frame_data()
261 qm_fd_addr_get64(fd), handler->addr); in process_frame_data()
265 *p ^= handler->rx_mixer; in process_frame_data()
270 *p ^= handler->tx_mixer; in process_frame_data()
280 struct hp_handler *handler = (struct hp_handler *)fq; in normal_dqrr() local
282 if (process_frame_data(handler, &dqrr->fd)) { in normal_dqrr()
286 if (qman_enqueue(&handler->tx, &dqrr->fd)) { in normal_dqrr()
298 struct hp_handler *handler = (struct hp_handler *)fq; in special_dqrr() local
300 process_frame_data(handler, &dqrr->fd); in special_dqrr()
302 if (qman_enqueue(&handler->tx, &dqrr->fd)) { in special_dqrr()
317 struct hp_handler *handler; in create_per_cpu_handlers() local
328 handler = kmem_cache_alloc(hp_handler_slab, GFP_KERNEL); in create_per_cpu_handlers()
329 if (!handler) { in create_per_cpu_handlers()
334 handler->processor_id = hp_cpu->processor_id; in create_per_cpu_handlers()
335 handler->addr = frame_dma; in create_per_cpu_handlers()
336 handler->frame_ptr = frame_ptr; in create_per_cpu_handlers()
337 list_add_tail(&handler->node, &hp_cpu->handlers); in create_per_cpu_handlers()
352 struct hp_handler *handler = list_entry(loop, struct hp_handler, in destroy_per_cpu_handlers() local
354 if (qman_retire_fq(&handler->rx, &flags) || in destroy_per_cpu_handlers()
360 if (qman_oos_fq(&handler->rx)) { in destroy_per_cpu_handlers()
365 qman_destroy_fq(&handler->rx); in destroy_per_cpu_handlers()
366 qman_destroy_fq(&handler->tx); in destroy_per_cpu_handlers()
367 qman_release_fqid(handler->fqid_rx); in destroy_per_cpu_handlers()
368 list_del(&handler->node); in destroy_per_cpu_handlers()
369 kmem_cache_free(hp_handler_slab, handler); in destroy_per_cpu_handlers()
390 struct hp_handler *handler = h; in init_handler() local
393 if (handler->processor_id != smp_processor_id()) { in init_handler()
398 memset(&handler->rx, 0, sizeof(handler->rx)); in init_handler()
399 if (handler == special_handler) in init_handler()
400 handler->rx.cb.dqrr = special_dqrr; in init_handler()
402 handler->rx.cb.dqrr = normal_dqrr; in init_handler()
403 err = qman_create_fq(handler->fqid_rx, 0, &handler->rx); in init_handler()
413 err = qman_init_fq(&handler->rx, QMAN_INITFQ_FLAG_SCHED | in init_handler()
420 memset(&handler->tx, 0, sizeof(handler->tx)); in init_handler()
421 err = qman_create_fq(handler->fqid_tx, QMAN_FQ_FLAG_NO_MODIFY, in init_handler()
422 &handler->tx); in init_handler()
445 struct hp_handler *handler; in init_phase2() local
477 handler = list_first_entry(&hp_cpu->handlers, struct hp_handler, node); in init_phase2()
478 if (handler->fqid_rx != 0 || handler->rx_mixer != 0xdeadbeef) in init_phase2()
480 handler->fqid_rx = fqid; in init_phase2()
481 handler->rx_mixer = lfsr; in init_phase2()
483 special_handler = handler; in init_phase2()