@@ -18,7 +18,7 @@ static enum iavf_status iavf_alloc_adminq_asq_ring(struct iavf_hw *hw)
1818 ret_code = iavf_allocate_dma_mem (hw , & hw -> aq .asq .desc_buf ,
1919 iavf_mem_atq_ring ,
2020 (hw -> aq .num_asq_entries *
21- sizeof (struct iavf_aq_desc )),
21+ sizeof (struct libie_aq_desc )),
2222 IAVF_ADMINQ_DESC_ALIGNMENT );
2323 if (ret_code )
2424 return ret_code ;
@@ -45,7 +45,7 @@ static enum iavf_status iavf_alloc_adminq_arq_ring(struct iavf_hw *hw)
4545 ret_code = iavf_allocate_dma_mem (hw , & hw -> aq .arq .desc_buf ,
4646 iavf_mem_arq_ring ,
4747 (hw -> aq .num_arq_entries *
48- sizeof (struct iavf_aq_desc )),
48+ sizeof (struct libie_aq_desc )),
4949 IAVF_ADMINQ_DESC_ALIGNMENT );
5050
5151 return ret_code ;
@@ -81,7 +81,7 @@ static void iavf_free_adminq_arq(struct iavf_hw *hw)
8181 **/
8282static enum iavf_status iavf_alloc_arq_bufs (struct iavf_hw * hw )
8383{
84- struct iavf_aq_desc * desc ;
84+ struct libie_aq_desc * desc ;
8585 struct iavf_dma_mem * bi ;
8686 enum iavf_status ret_code ;
8787 int i ;
@@ -111,9 +111,9 @@ static enum iavf_status iavf_alloc_arq_bufs(struct iavf_hw *hw)
111111 /* now configure the descriptors for use */
112112 desc = IAVF_ADMINQ_DESC (hw -> aq .arq , i );
113113
114- desc -> flags = cpu_to_le16 (IAVF_AQ_FLAG_BUF );
114+ desc -> flags = cpu_to_le16 (LIBIE_AQ_FLAG_BUF );
115115 if (hw -> aq .arq_buf_size > IAVF_AQ_LARGE_BUF )
116- desc -> flags |= cpu_to_le16 (IAVF_AQ_FLAG_LB );
116+ desc -> flags |= cpu_to_le16 (LIBIE_AQ_FLAG_LB );
117117 desc -> opcode = 0 ;
118118 /* This is in accordance with Admin queue design, there is no
119119 * register for buffer size configuration
@@ -122,12 +122,12 @@ static enum iavf_status iavf_alloc_arq_bufs(struct iavf_hw *hw)
122122 desc -> retval = 0 ;
123123 desc -> cookie_high = 0 ;
124124 desc -> cookie_low = 0 ;
125- desc -> params .external .addr_high =
125+ desc -> params .generic .addr_high =
126126 cpu_to_le32 (upper_32_bits (bi -> pa ));
127- desc -> params .external .addr_low =
127+ desc -> params .generic .addr_low =
128128 cpu_to_le32 (lower_32_bits (bi -> pa ));
129- desc -> params .external .param0 = 0 ;
130- desc -> params .external .param1 = 0 ;
129+ desc -> params .generic .param0 = 0 ;
130+ desc -> params .generic .param1 = 0 ;
131131 }
132132
133133alloc_arq_bufs :
@@ -558,8 +558,8 @@ static u16 iavf_clean_asq(struct iavf_hw *hw)
558558 struct iavf_adminq_ring * asq = & hw -> aq .asq ;
559559 struct iavf_asq_cmd_details * details ;
560560 u16 ntc = asq -> next_to_clean ;
561- struct iavf_aq_desc desc_cb ;
562- struct iavf_aq_desc * desc ;
561+ struct libie_aq_desc desc_cb ;
562+ struct libie_aq_desc * desc ;
563563
564564 desc = IAVF_ADMINQ_DESC (* asq , ntc );
565565 details = IAVF_ADMINQ_DETAILS (* asq , ntc );
@@ -573,7 +573,7 @@ static u16 iavf_clean_asq(struct iavf_hw *hw)
573573 desc_cb = * desc ;
574574 cb_func (hw , & desc_cb );
575575 }
576- memset ((void * )desc , 0 , sizeof (struct iavf_aq_desc ));
576+ memset ((void * )desc , 0 , sizeof (struct libie_aq_desc ));
577577 memset ((void * )details , 0 ,
578578 sizeof (struct iavf_asq_cmd_details ));
579579 ntc ++ ;
@@ -615,14 +615,14 @@ bool iavf_asq_done(struct iavf_hw *hw)
615615 * queue. It runs the queue, cleans the queue, etc
616616 **/
617617enum iavf_status iavf_asq_send_command (struct iavf_hw * hw ,
618- struct iavf_aq_desc * desc ,
618+ struct libie_aq_desc * desc ,
619619 void * buff , /* can be NULL */
620620 u16 buff_size ,
621621 struct iavf_asq_cmd_details * cmd_details )
622622{
623623 struct iavf_dma_mem * dma_buff = NULL ;
624624 struct iavf_asq_cmd_details * details ;
625- struct iavf_aq_desc * desc_on_ring ;
625+ struct libie_aq_desc * desc_on_ring ;
626626 bool cmd_completed = false;
627627 enum iavf_status status = 0 ;
628628 u16 retval = 0 ;
@@ -637,7 +637,7 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,
637637 goto asq_send_command_error ;
638638 }
639639
640- hw -> aq .asq_last_status = IAVF_AQ_RC_OK ;
640+ hw -> aq .asq_last_status = LIBIE_AQ_RC_OK ;
641641
642642 val = rd32 (hw , IAVF_VF_ATQH1 );
643643 if (val >= hw -> aq .num_asq_entries ) {
@@ -717,9 +717,9 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,
717717 /* Update the address values in the desc with the pa value
718718 * for respective buffer
719719 */
720- desc_on_ring -> params .external .addr_high =
720+ desc_on_ring -> params .generic .addr_high =
721721 cpu_to_le32 (upper_32_bits (dma_buff -> pa ));
722- desc_on_ring -> params .external .addr_low =
722+ desc_on_ring -> params .generic .addr_low =
723723 cpu_to_le32 (lower_32_bits (dma_buff -> pa ));
724724 }
725725
@@ -766,13 +766,13 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,
766766 retval &= 0xff ;
767767 }
768768 cmd_completed = true;
769- if ((enum iavf_admin_queue_err )retval == IAVF_AQ_RC_OK )
769+ if ((enum libie_aq_err )retval == LIBIE_AQ_RC_OK )
770770 status = 0 ;
771- else if ((enum iavf_admin_queue_err )retval == IAVF_AQ_RC_EBUSY )
771+ else if ((enum libie_aq_err )retval == LIBIE_AQ_RC_EBUSY )
772772 status = IAVF_ERR_NOT_READY ;
773773 else
774774 status = IAVF_ERR_ADMIN_QUEUE_ERROR ;
775- hw -> aq .asq_last_status = (enum iavf_admin_queue_err )retval ;
775+ hw -> aq .asq_last_status = (enum libie_aq_err )retval ;
776776 }
777777
778778 iavf_debug (hw , IAVF_DEBUG_AQ_MESSAGE ,
@@ -809,12 +809,12 @@ enum iavf_status iavf_asq_send_command(struct iavf_hw *hw,
809809 *
810810 * Fill the desc with default values
811811 **/
812- void iavf_fill_default_direct_cmd_desc (struct iavf_aq_desc * desc , u16 opcode )
812+ void iavf_fill_default_direct_cmd_desc (struct libie_aq_desc * desc , u16 opcode )
813813{
814814 /* zero out the desc */
815- memset ((void * )desc , 0 , sizeof (struct iavf_aq_desc ));
815+ memset ((void * )desc , 0 , sizeof (struct libie_aq_desc ));
816816 desc -> opcode = cpu_to_le16 (opcode );
817- desc -> flags = cpu_to_le16 (IAVF_AQ_FLAG_SI );
817+ desc -> flags = cpu_to_le16 (LIBIE_AQ_FLAG_SI );
818818}
819819
820820/**
@@ -832,7 +832,7 @@ enum iavf_status iavf_clean_arq_element(struct iavf_hw *hw,
832832 u16 * pending )
833833{
834834 u16 ntc = hw -> aq .arq .next_to_clean ;
835- struct iavf_aq_desc * desc ;
835+ struct libie_aq_desc * desc ;
836836 enum iavf_status ret_code = 0 ;
837837 struct iavf_dma_mem * bi ;
838838 u16 desc_idx ;
@@ -866,9 +866,9 @@ enum iavf_status iavf_clean_arq_element(struct iavf_hw *hw,
866866 desc_idx = ntc ;
867867
868868 hw -> aq .arq_last_status =
869- (enum iavf_admin_queue_err )le16_to_cpu (desc -> retval );
869+ (enum libie_aq_err )le16_to_cpu (desc -> retval );
870870 flags = le16_to_cpu (desc -> flags );
871- if (flags & IAVF_AQ_FLAG_ERR ) {
871+ if (flags & LIBIE_AQ_FLAG_ERR ) {
872872 ret_code = IAVF_ERR_ADMIN_QUEUE_ERROR ;
873873 iavf_debug (hw ,
874874 IAVF_DEBUG_AQ_MESSAGE ,
@@ -892,14 +892,14 @@ enum iavf_status iavf_clean_arq_element(struct iavf_hw *hw,
892892 * size
893893 */
894894 bi = & hw -> aq .arq .r .arq_bi [ntc ];
895- memset ((void * )desc , 0 , sizeof (struct iavf_aq_desc ));
895+ memset ((void * )desc , 0 , sizeof (struct libie_aq_desc ));
896896
897- desc -> flags = cpu_to_le16 (IAVF_AQ_FLAG_BUF );
897+ desc -> flags = cpu_to_le16 (LIBIE_AQ_FLAG_BUF );
898898 if (hw -> aq .arq_buf_size > IAVF_AQ_LARGE_BUF )
899- desc -> flags |= cpu_to_le16 (IAVF_AQ_FLAG_LB );
899+ desc -> flags |= cpu_to_le16 (LIBIE_AQ_FLAG_LB );
900900 desc -> datalen = cpu_to_le16 ((u16 )bi -> size );
901- desc -> params .external .addr_high = cpu_to_le32 (upper_32_bits (bi -> pa ));
902- desc -> params .external .addr_low = cpu_to_le32 (lower_32_bits (bi -> pa ));
901+ desc -> params .generic .addr_high = cpu_to_le32 (upper_32_bits (bi -> pa ));
902+ desc -> params .generic .addr_low = cpu_to_le32 (lower_32_bits (bi -> pa ));
903903
904904 /* set tail = the last cleaned desc index. */
905905 wr32 (hw , IAVF_VF_ARQT1 , ntc );
0 commit comments