Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net...
[cascardo/linux.git] / drivers / net / ethernet / intel / i40e / i40e_adminq.c
index f7f6206..35fa09a 100644 (file)
@@ -51,7 +51,7 @@ static inline bool i40e_is_nvm_update_op(struct i40e_aq_desc *desc)
 static void i40e_adminq_init_regs(struct i40e_hw *hw)
 {
        /* set head and tail registers in our local struct */
-       if (hw->mac.type == I40E_MAC_VF) {
+       if (i40e_is_vf(hw)) {
                hw->aq.asq.tail = I40E_VF_ATQT1;
                hw->aq.asq.head = I40E_VF_ATQH1;
                hw->aq.asq.len  = I40E_VF_ATQLEN1;
@@ -956,9 +956,6 @@ i40e_status i40e_clean_arq_element(struct i40e_hw *hw,
        ntu = (rd32(hw, hw->aq.arq.head) & I40E_PF_ARQH_ARQH_MASK);
        if (ntu == ntc) {
                /* nothing to do - shouldn't need to update ring's values */
-               i40e_debug(hw,
-                          I40E_DEBUG_AQ_MESSAGE,
-                          "AQRX: Queue is empty.\n");
                ret_code = I40E_ERR_ADMIN_QUEUE_NO_WORK;
                goto clean_arq_element_out;
        }
@@ -980,10 +977,10 @@ i40e_status i40e_clean_arq_element(struct i40e_hw *hw,
 
        e->desc = *desc;
        datalen = le16_to_cpu(desc->datalen);
-       e->msg_size = min(datalen, e->msg_size);
-       if (e->msg_buf != NULL && (e->msg_size != 0))
+       e->msg_len = min(datalen, e->buf_len);
+       if (e->msg_buf != NULL && (e->msg_len != 0))
                memcpy(e->msg_buf, hw->aq.arq.r.arq_bi[desc_idx].va,
-                      e->msg_size);
+                      e->msg_len);
 
        i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, "AQRX: desc and buffer:\n");
        i40e_debug_aq(hw, I40E_DEBUG_AQ_COMMAND, (void *)desc, e->msg_buf,