@@ -18,7 +18,7 @@ static int i40e_alloc_adminq_asq_ring(struct i40e_hw *hw)
1818
1919 ret_code = i40e_allocate_dma_mem (hw , & hw -> aq .asq .desc_buf ,
2020 (hw -> aq .num_asq_entries *
21- sizeof (struct i40e_aq_desc )),
21+ sizeof (struct libie_aq_desc )),
2222 I40E_ADMINQ_DESC_ALIGNMENT );
2323 if (ret_code )
2424 return ret_code ;
@@ -44,7 +44,7 @@ static int i40e_alloc_adminq_arq_ring(struct i40e_hw *hw)
4444
4545 ret_code = i40e_allocate_dma_mem (hw , & hw -> aq .arq .desc_buf ,
4646 (hw -> aq .num_arq_entries *
47- sizeof (struct i40e_aq_desc )),
47+ sizeof (struct libie_aq_desc )),
4848 I40E_ADMINQ_DESC_ALIGNMENT );
4949
5050 return ret_code ;
@@ -80,7 +80,7 @@ static void i40e_free_adminq_arq(struct i40e_hw *hw)
8080 **/
8181static int i40e_alloc_arq_bufs (struct i40e_hw * hw )
8282{
83- struct i40e_aq_desc * desc ;
83+ struct libie_aq_desc * desc ;
8484 struct i40e_dma_mem * bi ;
8585 int ret_code ;
8686 int i ;
@@ -108,9 +108,9 @@ static int i40e_alloc_arq_bufs(struct i40e_hw *hw)
108108 /* now configure the descriptors for use */
109109 desc = I40E_ADMINQ_DESC (hw -> aq .arq , i );
110110
111- desc -> flags = cpu_to_le16 (I40E_AQ_FLAG_BUF );
111+ desc -> flags = cpu_to_le16 (LIBIE_AQ_FLAG_BUF );
112112 if (hw -> aq .arq_buf_size > I40E_AQ_LARGE_BUF )
113- desc -> flags |= cpu_to_le16 (I40E_AQ_FLAG_LB );
113+ desc -> flags |= cpu_to_le16 (LIBIE_AQ_FLAG_LB );
114114 desc -> opcode = 0 ;
115115 /* This is in accordance with Admin queue design, there is no
116116 * register for buffer size configuration
@@ -119,12 +119,12 @@ static int i40e_alloc_arq_bufs(struct i40e_hw *hw)
119119 desc -> retval = 0 ;
120120 desc -> cookie_high = 0 ;
121121 desc -> cookie_low = 0 ;
122- desc -> params .external .addr_high =
122+ desc -> params .generic .addr_high =
123123 cpu_to_le32 (upper_32_bits (bi -> pa ));
124- desc -> params .external .addr_low =
124+ desc -> params .generic .addr_low =
125125 cpu_to_le32 (lower_32_bits (bi -> pa ));
126- desc -> params .external .param0 = 0 ;
127- desc -> params .external .param1 = 0 ;
126+ desc -> params .generic .param0 = 0 ;
127+ desc -> params .generic .param1 = 0 ;
128128 }
129129
130130alloc_arq_bufs :
@@ -691,8 +691,8 @@ static u16 i40e_clean_asq(struct i40e_hw *hw)
691691 struct i40e_adminq_ring * asq = & (hw -> aq .asq );
692692 struct i40e_asq_cmd_details * details ;
693693 u16 ntc = asq -> next_to_clean ;
694- struct i40e_aq_desc desc_cb ;
695- struct i40e_aq_desc * desc ;
694+ struct libie_aq_desc desc_cb ;
695+ struct libie_aq_desc * desc ;
696696
697697 desc = I40E_ADMINQ_DESC (* asq , ntc );
698698 details = I40E_ADMINQ_DETAILS (* asq , ntc );
@@ -750,15 +750,15 @@ static bool i40e_asq_done(struct i40e_hw *hw)
750750 **/
751751static int
752752i40e_asq_send_command_atomic_exec (struct i40e_hw * hw ,
753- struct i40e_aq_desc * desc ,
753+ struct libie_aq_desc * desc ,
754754 void * buff , /* can be NULL */
755755 u16 buff_size ,
756756 struct i40e_asq_cmd_details * cmd_details ,
757757 bool is_atomic_context )
758758{
759759 struct i40e_dma_mem * dma_buff = NULL ;
760760 struct i40e_asq_cmd_details * details ;
761- struct i40e_aq_desc * desc_on_ring ;
761+ struct libie_aq_desc * desc_on_ring ;
762762 bool cmd_completed = false;
763763 u16 retval = 0 ;
764764 int status = 0 ;
@@ -771,7 +771,7 @@ i40e_asq_send_command_atomic_exec(struct i40e_hw *hw,
771771 goto asq_send_command_error ;
772772 }
773773
774- hw -> aq .asq_last_status = I40E_AQ_RC_OK ;
774+ hw -> aq .asq_last_status = LIBIE_AQ_RC_OK ;
775775
776776 val = rd32 (hw , I40E_PF_ATQH );
777777 if (val >= hw -> aq .num_asq_entries ) {
@@ -851,9 +851,9 @@ i40e_asq_send_command_atomic_exec(struct i40e_hw *hw,
851851 /* Update the address values in the desc with the pa value
852852 * for respective buffer
853853 */
854- desc_on_ring -> params .external .addr_high =
854+ desc_on_ring -> params .generic .addr_high =
855855 cpu_to_le32 (upper_32_bits (dma_buff -> pa ));
856- desc_on_ring -> params .external .addr_low =
856+ desc_on_ring -> params .generic .addr_low =
857857 cpu_to_le32 (lower_32_bits (dma_buff -> pa ));
858858 }
859859
@@ -905,13 +905,13 @@ i40e_asq_send_command_atomic_exec(struct i40e_hw *hw,
905905 retval &= 0xff ;
906906 }
907907 cmd_completed = true;
908- if ((enum i40e_admin_queue_err )retval == I40E_AQ_RC_OK )
908+ if ((enum libie_aq_err )retval == LIBIE_AQ_RC_OK )
909909 status = 0 ;
910- else if ((enum i40e_admin_queue_err )retval == I40E_AQ_RC_EBUSY )
910+ else if ((enum libie_aq_err )retval == LIBIE_AQ_RC_EBUSY )
911911 status = - EBUSY ;
912912 else
913913 status = - EIO ;
914- hw -> aq .asq_last_status = (enum i40e_admin_queue_err )retval ;
914+ hw -> aq .asq_last_status = (enum libie_aq_err )retval ;
915915 }
916916
917917 i40e_debug (hw , I40E_DEBUG_AQ_COMMAND ,
@@ -954,7 +954,7 @@ i40e_asq_send_command_atomic_exec(struct i40e_hw *hw,
954954 **/
955955int
956956i40e_asq_send_command_atomic (struct i40e_hw * hw ,
957- struct i40e_aq_desc * desc ,
957+ struct libie_aq_desc * desc ,
958958 void * buff , /* can be NULL */
959959 u16 buff_size ,
960960 struct i40e_asq_cmd_details * cmd_details ,
@@ -972,7 +972,7 @@ i40e_asq_send_command_atomic(struct i40e_hw *hw,
972972}
973973
974974int
975- i40e_asq_send_command (struct i40e_hw * hw , struct i40e_aq_desc * desc ,
975+ i40e_asq_send_command (struct i40e_hw * hw , struct libie_aq_desc * desc ,
976976 void * buff , /* can be NULL */ u16 buff_size ,
977977 struct i40e_asq_cmd_details * cmd_details )
978978{
@@ -996,12 +996,12 @@ i40e_asq_send_command(struct i40e_hw *hw, struct i40e_aq_desc *desc,
996996 **/
997997int
998998i40e_asq_send_command_atomic_v2 (struct i40e_hw * hw ,
999- struct i40e_aq_desc * desc ,
999+ struct libie_aq_desc * desc ,
10001000 void * buff , /* can be NULL */
10011001 u16 buff_size ,
10021002 struct i40e_asq_cmd_details * cmd_details ,
10031003 bool is_atomic_context ,
1004- enum i40e_admin_queue_err * aq_status )
1004+ enum libie_aq_err * aq_status )
10051005{
10061006 int status ;
10071007
@@ -1023,13 +1023,13 @@ i40e_asq_send_command_atomic_v2(struct i40e_hw *hw,
10231023 *
10241024 * Fill the desc with default values
10251025 **/
1026- void i40e_fill_default_direct_cmd_desc (struct i40e_aq_desc * desc ,
1026+ void i40e_fill_default_direct_cmd_desc (struct libie_aq_desc * desc ,
10271027 u16 opcode )
10281028{
10291029 /* zero out the desc */
1030- memset ((void * )desc , 0 , sizeof (struct i40e_aq_desc ));
1030+ memset ((void * )desc , 0 , sizeof (struct libie_aq_desc ));
10311031 desc -> opcode = cpu_to_le16 (opcode );
1032- desc -> flags = cpu_to_le16 (I40E_AQ_FLAG_SI );
1032+ desc -> flags = cpu_to_le16 (LIBIE_AQ_FLAG_SI );
10331033}
10341034
10351035/**
@@ -1047,7 +1047,7 @@ int i40e_clean_arq_element(struct i40e_hw *hw,
10471047 u16 * pending )
10481048{
10491049 u16 ntc = hw -> aq .arq .next_to_clean ;
1050- struct i40e_aq_desc * desc ;
1050+ struct libie_aq_desc * desc ;
10511051 struct i40e_dma_mem * bi ;
10521052 int ret_code = 0 ;
10531053 u16 desc_idx ;
@@ -1081,9 +1081,9 @@ int i40e_clean_arq_element(struct i40e_hw *hw,
10811081 desc_idx = ntc ;
10821082
10831083 hw -> aq .arq_last_status =
1084- (enum i40e_admin_queue_err )le16_to_cpu (desc -> retval );
1084+ (enum libie_aq_err )le16_to_cpu (desc -> retval );
10851085 flags = le16_to_cpu (desc -> flags );
1086- if (flags & I40E_AQ_FLAG_ERR ) {
1086+ if (flags & LIBIE_AQ_FLAG_ERR ) {
10871087 ret_code = - EIO ;
10881088 i40e_debug (hw ,
10891089 I40E_DEBUG_AQ_MESSAGE ,
@@ -1107,14 +1107,14 @@ int i40e_clean_arq_element(struct i40e_hw *hw,
11071107 * size
11081108 */
11091109 bi = & hw -> aq .arq .r .arq_bi [ntc ];
1110- memset ((void * )desc , 0 , sizeof (struct i40e_aq_desc ));
1110+ memset ((void * )desc , 0 , sizeof (struct libie_aq_desc ));
11111111
1112- desc -> flags = cpu_to_le16 (I40E_AQ_FLAG_BUF );
1112+ desc -> flags = cpu_to_le16 (LIBIE_AQ_FLAG_BUF );
11131113 if (hw -> aq .arq_buf_size > I40E_AQ_LARGE_BUF )
1114- desc -> flags |= cpu_to_le16 (I40E_AQ_FLAG_LB );
1114+ desc -> flags |= cpu_to_le16 (LIBIE_AQ_FLAG_LB );
11151115 desc -> datalen = cpu_to_le16 ((u16 )bi -> size );
1116- desc -> params .external .addr_high = cpu_to_le32 (upper_32_bits (bi -> pa ));
1117- desc -> params .external .addr_low = cpu_to_le32 (lower_32_bits (bi -> pa ));
1116+ desc -> params .generic .addr_high = cpu_to_le32 (upper_32_bits (bi -> pa ));
1117+ desc -> params .generic .addr_low = cpu_to_le32 (lower_32_bits (bi -> pa ));
11181118
11191119 /* set tail = the last cleaned desc index. */
11201120 wr32 (hw , I40E_PF_ARQT , ntc );
0 commit comments