Lines Matching refs:asq
19 hw->aq.asq.tail = IAVF_VF_ATQT1; in iavf_adminq_init_regs()
20 hw->aq.asq.head = IAVF_VF_ATQH1; in iavf_adminq_init_regs()
21 hw->aq.asq.len = IAVF_VF_ATQLEN1; in iavf_adminq_init_regs()
22 hw->aq.asq.bal = IAVF_VF_ATQBAL1; in iavf_adminq_init_regs()
23 hw->aq.asq.bah = IAVF_VF_ATQBAH1; in iavf_adminq_init_regs()
39 ret_code = iavf_allocate_dma_mem(hw, &hw->aq.asq.desc_buf, in iavf_alloc_adminq_asq_ring()
47 ret_code = iavf_allocate_virt_mem(hw, &hw->aq.asq.cmd_buf, in iavf_alloc_adminq_asq_ring()
51 iavf_free_dma_mem(hw, &hw->aq.asq.desc_buf); in iavf_alloc_adminq_asq_ring()
84 iavf_free_dma_mem(hw, &hw->aq.asq.desc_buf); in iavf_free_adminq_asq()
178 ret_code = iavf_allocate_virt_mem(hw, &hw->aq.asq.dma_head, in iavf_alloc_asq_bufs()
183 hw->aq.asq.r.asq_bi = (struct iavf_dma_mem *)hw->aq.asq.dma_head.va; in iavf_alloc_asq_bufs()
187 bi = &hw->aq.asq.r.asq_bi[i]; in iavf_alloc_asq_bufs()
202 iavf_free_dma_mem(hw, &hw->aq.asq.r.asq_bi[i]); in iavf_alloc_asq_bufs()
203 iavf_free_virt_mem(hw, &hw->aq.asq.dma_head); in iavf_alloc_asq_bufs()
237 if (hw->aq.asq.r.asq_bi[i].pa) in iavf_free_asq_bufs()
238 iavf_free_dma_mem(hw, &hw->aq.asq.r.asq_bi[i]); in iavf_free_asq_bufs()
241 iavf_free_virt_mem(hw, &hw->aq.asq.cmd_buf); in iavf_free_asq_bufs()
244 iavf_free_dma_mem(hw, &hw->aq.asq.desc_buf); in iavf_free_asq_bufs()
247 iavf_free_virt_mem(hw, &hw->aq.asq.dma_head); in iavf_free_asq_bufs()
262 wr32(hw, hw->aq.asq.head, 0); in iavf_config_asq_regs()
263 wr32(hw, hw->aq.asq.tail, 0); in iavf_config_asq_regs()
266 wr32(hw, hw->aq.asq.len, (hw->aq.num_asq_entries | in iavf_config_asq_regs()
268 wr32(hw, hw->aq.asq.bal, lower_32_bits(hw->aq.asq.desc_buf.pa)); in iavf_config_asq_regs()
269 wr32(hw, hw->aq.asq.bah, upper_32_bits(hw->aq.asq.desc_buf.pa)); in iavf_config_asq_regs()
272 reg = rd32(hw, hw->aq.asq.bal); in iavf_config_asq_regs()
273 if (reg != lower_32_bits(hw->aq.asq.desc_buf.pa)) in iavf_config_asq_regs()
329 if (hw->aq.asq.count > 0) { in iavf_init_asq()
342 hw->aq.asq.next_to_use = 0; in iavf_init_asq()
343 hw->aq.asq.next_to_clean = 0; in iavf_init_asq()
361 hw->aq.asq.count = hw->aq.num_asq_entries; in iavf_init_asq()
366 iavf_free_dma_mem(hw, &hw->aq.asq.r.asq_bi[i]); in iavf_init_asq()
367 iavf_free_virt_mem(hw, &hw->aq.asq.dma_head); in iavf_init_asq()
452 if (hw->aq.asq.count == 0) { in iavf_shutdown_asq()
458 wr32(hw, hw->aq.asq.head, 0); in iavf_shutdown_asq()
459 wr32(hw, hw->aq.asq.tail, 0); in iavf_shutdown_asq()
460 wr32(hw, hw->aq.asq.len, 0); in iavf_shutdown_asq()
461 wr32(hw, hw->aq.asq.bal, 0); in iavf_shutdown_asq()
462 wr32(hw, hw->aq.asq.bah, 0); in iavf_shutdown_asq()
464 hw->aq.asq.count = 0; /* to indicate uninitialized queue */ in iavf_shutdown_asq()
582 struct iavf_adminq_ring *asq = &hw->aq.asq; in iavf_clean_asq() local
584 u16 ntc = asq->next_to_clean; in iavf_clean_asq()
588 desc = IAVF_ADMINQ_DESC(*asq, ntc); in iavf_clean_asq()
589 details = IAVF_ADMINQ_DETAILS(*asq, ntc); in iavf_clean_asq()
590 while (rd32(hw, hw->aq.asq.head) != ntc) { in iavf_clean_asq()
592 "ntc %d head %d.\n", ntc, rd32(hw, hw->aq.asq.head)); in iavf_clean_asq()
604 if (ntc == asq->count) in iavf_clean_asq()
606 desc = IAVF_ADMINQ_DESC(*asq, ntc); in iavf_clean_asq()
607 details = IAVF_ADMINQ_DETAILS(*asq, ntc); in iavf_clean_asq()
610 asq->next_to_clean = ntc; in iavf_clean_asq()
612 return IAVF_DESC_UNUSED(asq); in iavf_clean_asq()
627 return rd32(hw, hw->aq.asq.head) == hw->aq.asq.next_to_use; in iavf_asq_done()
657 if (hw->aq.asq.count == 0) { in iavf_asq_send_command()
666 val = rd32(hw, hw->aq.asq.head); in iavf_asq_send_command()
674 details = IAVF_ADMINQ_DETAILS(hw->aq.asq, hw->aq.asq.next_to_use); in iavf_asq_send_command()
729 desc_on_ring = IAVF_ADMINQ_DESC(hw->aq.asq, hw->aq.asq.next_to_use); in iavf_asq_send_command()
736 dma_buff = &hw->aq.asq.r.asq_bi[hw->aq.asq.next_to_use]; in iavf_asq_send_command()
754 (hw->aq.asq.next_to_use)++; in iavf_asq_send_command()
755 if (hw->aq.asq.next_to_use == hw->aq.asq.count) in iavf_asq_send_command()
756 hw->aq.asq.next_to_use = 0; in iavf_asq_send_command()
758 wr32(hw, hw->aq.asq.tail, hw->aq.asq.next_to_use); in iavf_asq_send_command()
813 if (rd32(hw, hw->aq.asq.len) & IAVF_VF_ATQLEN1_ATQCRIT_MASK) { in iavf_asq_send_command()