aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-06-18 03:57:44 -0700
committerDavid S. Miller <davem@davemloft.net>2015-06-18 03:58:55 -0700
commitb67ea97fcd4e29c97ced1ecba15443ecfce395b1 (patch)
tree20650c580b1f392d54e802c8d2af69255aea5739 /drivers/net/ethernet/intel/fm10k/fm10k_pf.c
parentnet: stmmac: dwmac-rk: Don't add function name in info or err messages (diff)
parentfm10k: Fix missing braces after if statement (diff)
downloadlinux-dev-b67ea97fcd4e29c97ced1ecba15443ecfce395b1.tar.xz
linux-dev-b67ea97fcd4e29c97ced1ecba15443ecfce395b1.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says: ==================== This series contains updates to fm10k only. Alex provides two fixes for the fm10k, first folds the fm10k_pull_tail() call into fm10k_add_rx_frag(), this way the fragment does not have to be modified after it is added to the skb. The second fixes missing braces to an if statement. The remaining patches are from Jacob which contain improvements and fixes for fm10k. First fix makes it so that invalid address will simply be skipped and allows synchronizing the full list to proceed with using iproute2 tool. Fixed a possible kernel panic by using the correct transmit timestamp function. Simplified the code flow for setting the IN_PROGRESS bit of the shinfo for an skb that we will be timestamping. Fix a bug in the timestamping transmit enqueue code responsible for a NULL pointer dereference and invalid access of the skb list by freeing the clone in the cases where we did not add it to the queue. Update the PF code so that it resets the empty TQMAP/RQMAP regirsters post-VFLR to prevent innocent VF drivers from triggering malicious driver events. The SYSTIME_CFG.Adjust direction bit is actually supposed to indicate that the adjustment is positive, so fix the code to align correctly with the hardware and documentation. Cleanup local variable that is no longer used after a previous refactor of the code. Fix the code flow so that we actually clear the enabled flag as part of our removal of the LPORT. v2: - updated patch 07 description based on feedback from Sergei Shtylyov - updated patch 09 & 10 to use %d in error message based on feedback from Sergei Shtylyov ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/fm10k/fm10k_pf.c')
-rw-r--r--drivers/net/ethernet/intel/fm10k/fm10k_pf.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
index 891e21874b2a..3ca0233b3ea2 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c
@@ -1046,6 +1046,12 @@ static s32 fm10k_iov_reset_resources_pf(struct fm10k_hw *hw,
fm10k_write_reg(hw, FM10K_RQMAP(qmap_idx + i), vf_q_idx + i);
}
+ /* repeat the first ring for all the remaining VF rings */
+ for (i = queues_per_pool; i < qmap_stride; i++) {
+ fm10k_write_reg(hw, FM10K_TQMAP(qmap_idx + i), vf_q_idx);
+ fm10k_write_reg(hw, FM10K_RQMAP(qmap_idx + i), vf_q_idx);
+ }
+
return 0;
}
@@ -1345,6 +1351,14 @@ s32 fm10k_iov_msg_lport_state_pf(struct fm10k_hw *hw, u32 **results,
err = fm10k_update_lport_state_pf(hw, vf_info->glort,
1, false);
+ /* we need to clear VF_FLAG_ENABLED flags in order to ensure
+ * that we actually re-enable the LPORT state below. Note that
+ * this has no impact if the VF is already disabled, as the
+ * flags are already cleared.
+ */
+ if (!err)
+ vf_info->vf_flags = FM10K_VF_FLAG_CAPABLE(vf_info);
+
/* when enabling the port we should reset the rate limiters */
hw->iov.ops.configure_tc(hw, vf_info->vf_idx, vf_info->rate);
@@ -1786,8 +1800,8 @@ static s32 fm10k_adjust_systime_pf(struct fm10k_hw *hw, s32 ppb)
if (systime_adjust > FM10K_SW_SYSTIME_ADJUST_MASK)
return FM10K_ERR_PARAM;
- if (ppb < 0)
- systime_adjust |= FM10K_SW_SYSTIME_ADJUST_DIR_NEGATIVE;
+ if (ppb > 0)
+ systime_adjust |= FM10K_SW_SYSTIME_ADJUST_DIR_POSITIVE;
fm10k_write_sw_reg(hw, FM10K_SW_SYSTIME_ADJUST, (u32)systime_adjust);