Lines Matching refs:asq
53 hw->aq.asq.tail = I40E_VF_ATQT1; in i40e_adminq_init_regs()
54 hw->aq.asq.head = I40E_VF_ATQH1; in i40e_adminq_init_regs()
55 hw->aq.asq.len = I40E_VF_ATQLEN1; in i40e_adminq_init_regs()
56 hw->aq.asq.bal = I40E_VF_ATQBAL1; in i40e_adminq_init_regs()
57 hw->aq.asq.bah = I40E_VF_ATQBAH1; in i40e_adminq_init_regs()
74 ret_code = i40e_allocate_dma_mem(hw, &hw->aq.asq.desc_buf, in i40e_alloc_adminq_asq_ring()
82 ret_code = i40e_allocate_virt_mem(hw, &hw->aq.asq.cmd_buf, in i40e_alloc_adminq_asq_ring()
86 i40e_free_dma_mem(hw, &hw->aq.asq.desc_buf); in i40e_alloc_adminq_asq_ring()
119 i40e_free_dma_mem(hw, &hw->aq.asq.desc_buf); in i40e_free_adminq_asq()
212 ret_code = i40e_allocate_virt_mem(hw, &hw->aq.asq.dma_head, in i40e_alloc_asq_bufs()
216 hw->aq.asq.r.asq_bi = (struct i40e_dma_mem *)hw->aq.asq.dma_head.va; in i40e_alloc_asq_bufs()
220 bi = &hw->aq.asq.r.asq_bi[i]; in i40e_alloc_asq_bufs()
235 i40e_free_dma_mem(hw, &hw->aq.asq.r.asq_bi[i]); in i40e_alloc_asq_bufs()
236 i40e_free_virt_mem(hw, &hw->aq.asq.dma_head); in i40e_alloc_asq_bufs()
270 if (hw->aq.asq.r.asq_bi[i].pa) in i40e_free_asq_bufs()
271 i40e_free_dma_mem(hw, &hw->aq.asq.r.asq_bi[i]); in i40e_free_asq_bufs()
274 i40e_free_virt_mem(hw, &hw->aq.asq.cmd_buf); in i40e_free_asq_bufs()
277 i40e_free_dma_mem(hw, &hw->aq.asq.desc_buf); in i40e_free_asq_bufs()
280 i40e_free_virt_mem(hw, &hw->aq.asq.dma_head); in i40e_free_asq_bufs()
295 wr32(hw, hw->aq.asq.head, 0); in i40e_config_asq_regs()
296 wr32(hw, hw->aq.asq.tail, 0); in i40e_config_asq_regs()
299 wr32(hw, hw->aq.asq.len, (hw->aq.num_asq_entries | in i40e_config_asq_regs()
301 wr32(hw, hw->aq.asq.bal, lower_32_bits(hw->aq.asq.desc_buf.pa)); in i40e_config_asq_regs()
302 wr32(hw, hw->aq.asq.bah, upper_32_bits(hw->aq.asq.desc_buf.pa)); in i40e_config_asq_regs()
305 reg = rd32(hw, hw->aq.asq.bal); in i40e_config_asq_regs()
306 if (reg != lower_32_bits(hw->aq.asq.desc_buf.pa)) in i40e_config_asq_regs()
361 if (hw->aq.asq.count > 0) { in i40e_init_asq()
374 hw->aq.asq.next_to_use = 0; in i40e_init_asq()
375 hw->aq.asq.next_to_clean = 0; in i40e_init_asq()
393 hw->aq.asq.count = hw->aq.num_asq_entries; in i40e_init_asq()
474 if (hw->aq.asq.count == 0) { in i40e_shutdown_asq()
480 wr32(hw, hw->aq.asq.head, 0); in i40e_shutdown_asq()
481 wr32(hw, hw->aq.asq.tail, 0); in i40e_shutdown_asq()
482 wr32(hw, hw->aq.asq.len, 0); in i40e_shutdown_asq()
483 wr32(hw, hw->aq.asq.bal, 0); in i40e_shutdown_asq()
484 wr32(hw, hw->aq.asq.bah, 0); in i40e_shutdown_asq()
486 hw->aq.asq.count = 0; /* to indicate uninitialized queue */ in i40e_shutdown_asq()
609 struct i40e_adminq_ring *asq = &(hw->aq.asq); in i40e_clean_asq() local
611 u16 ntc = asq->next_to_clean; in i40e_clean_asq()
615 desc = I40E_ADMINQ_DESC(*asq, ntc); in i40e_clean_asq()
616 details = I40E_ADMINQ_DETAILS(*asq, ntc); in i40e_clean_asq()
617 while (rd32(hw, hw->aq.asq.head) != ntc) { in i40e_clean_asq()
619 "ntc %d head %d.\n", ntc, rd32(hw, hw->aq.asq.head)); in i40e_clean_asq()
631 if (ntc == asq->count) in i40e_clean_asq()
633 desc = I40E_ADMINQ_DESC(*asq, ntc); in i40e_clean_asq()
634 details = I40E_ADMINQ_DETAILS(*asq, ntc); in i40e_clean_asq()
637 asq->next_to_clean = ntc; in i40e_clean_asq()
639 return I40E_DESC_UNUSED(asq); in i40e_clean_asq()
654 return rd32(hw, hw->aq.asq.head) == hw->aq.asq.next_to_use; in i40evf_asq_done()
685 if (hw->aq.asq.count == 0) { in i40evf_asq_send_command()
694 val = rd32(hw, hw->aq.asq.head); in i40evf_asq_send_command()
702 details = I40E_ADMINQ_DETAILS(hw->aq.asq, hw->aq.asq.next_to_use); in i40evf_asq_send_command()
757 desc_on_ring = I40E_ADMINQ_DESC(hw->aq.asq, hw->aq.asq.next_to_use); in i40evf_asq_send_command()
764 dma_buff = &(hw->aq.asq.r.asq_bi[hw->aq.asq.next_to_use]); in i40evf_asq_send_command()
782 (hw->aq.asq.next_to_use)++; in i40evf_asq_send_command()
783 if (hw->aq.asq.next_to_use == hw->aq.asq.count) in i40evf_asq_send_command()
784 hw->aq.asq.next_to_use = 0; in i40evf_asq_send_command()
786 wr32(hw, hw->aq.asq.tail, hw->aq.asq.next_to_use); in i40evf_asq_send_command()
971 hw->aq.asq.next_to_use = 0; in i40evf_resume_aq()
972 hw->aq.asq.next_to_clean = 0; in i40evf_resume_aq()