* [net 0/2][pull request] Intel Wired LAN Driver Updates 2016-06-29
@ 2016-06-29 16:30 Jeff Kirsher
2016-06-29 16:30 ` [net 1/2] e1000e: keep Rx/Tx HW_VLAN_CTAG in sync Jeff Kirsher
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Jeff Kirsher @ 2016-06-29 16:30 UTC (permalink / raw)
To: davem; +Cc: Jeff Kirsher, netdev, nhorman, sassmann, jogreene
This series contains fixes to e1000e and ixgbevf.
Jarod Wilson's fix for e1000e was a follow-on patch to his previous fix to
keep the hardware VLAN CTAG's for receive and transmit in sync, which
in turn resolves the original issue, so revert a portion of the original
fix.
Xin Long noticed that the ret_val needed to be initialized to IXGBE_ERR_MBX,
instead of -IXGBE_ERR_MBX.
The following are changes since commit 751ad819b0bf443ad8963eb7bfbd533e6a463973:
Merge tag 'mac80211-for-davem-2016-06-29-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue master
Jarod Wilson (1):
e1000e: keep Rx/Tx HW_VLAN_CTAG in sync
Xin Long (1):
ixgbevf: ixgbevf_write/read_posted_mbx should use IXGBE_ERR_MBX to
initialize ret_val
drivers/net/ethernet/intel/e1000e/netdev.c | 21 +++++++++------------
drivers/net/ethernet/intel/ixgbevf/mbx.c | 4 ++--
2 files changed, 11 insertions(+), 14 deletions(-)
--
2.5.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [net 1/2] e1000e: keep Rx/Tx HW_VLAN_CTAG in sync
2016-06-29 16:30 [net 0/2][pull request] Intel Wired LAN Driver Updates 2016-06-29 Jeff Kirsher
@ 2016-06-29 16:30 ` Jeff Kirsher
2016-06-29 16:30 ` [net 2/2] ixgbevf: ixgbevf_write/read_posted_mbx should use IXGBE_ERR_MBX to initialize ret_val Jeff Kirsher
2016-06-30 12:57 ` [net 0/2][pull request] Intel Wired LAN Driver Updates 2016-06-29 David Miller
2 siblings, 0 replies; 5+ messages in thread
From: Jeff Kirsher @ 2016-06-29 16:30 UTC (permalink / raw)
To: davem; +Cc: Jarod Wilson, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
From: Jarod Wilson <jarod@redhat.com>
The bit in the e1000 driver that mentions explicitly that the hardware
has no support for separate RX/TX VLAN accel toggling rings true for
e1000e as well, and thus both NETIF_F_HW_VLAN_CTAG_RX and
NETIF_F_HW_VLAN_CTAG_TX need to be kept in sync.
Revert a portion of commit 889ad456660461 ("e1000e: keep VLAN interfaces
functional after rxvlan off") since keeping the bits in sync resolves
the original issue.
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 73f7452..2b2e2f8 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -154,16 +154,6 @@ void __ew32(struct e1000_hw *hw, unsigned long reg, u32 val)
writel(val, hw->hw_addr + reg);
}
-static bool e1000e_vlan_used(struct e1000_adapter *adapter)
-{
- u16 vid;
-
- for_each_set_bit(vid, adapter->active_vlans, VLAN_N_VID)
- return true;
-
- return false;
-}
-
/**
* e1000_regdump - register printout routine
* @hw: pointer to the HW structure
@@ -3453,8 +3443,7 @@ static void e1000e_set_rx_mode(struct net_device *netdev)
ew32(RCTL, rctl);
- if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX ||
- e1000e_vlan_used(adapter))
+ if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX)
e1000e_vlan_strip_enable(adapter);
else
e1000e_vlan_strip_disable(adapter);
@@ -6926,6 +6915,14 @@ static netdev_features_t e1000_fix_features(struct net_device *netdev,
if ((hw->mac.type >= e1000_pch2lan) && (netdev->mtu > ETH_DATA_LEN))
features &= ~NETIF_F_RXFCS;
+ /* Since there is no support for separate Rx/Tx vlan accel
+ * enable/disable make sure Tx flag is always in same state as Rx.
+ */
+ if (features & NETIF_F_HW_VLAN_CTAG_RX)
+ features |= NETIF_F_HW_VLAN_CTAG_TX;
+ else
+ features &= ~NETIF_F_HW_VLAN_CTAG_TX;
+
return features;
}
--
2.5.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [net 2/2] ixgbevf: ixgbevf_write/read_posted_mbx should use IXGBE_ERR_MBX to initialize ret_val
2016-06-29 16:30 [net 0/2][pull request] Intel Wired LAN Driver Updates 2016-06-29 Jeff Kirsher
2016-06-29 16:30 ` [net 1/2] e1000e: keep Rx/Tx HW_VLAN_CTAG in sync Jeff Kirsher
@ 2016-06-29 16:30 ` Jeff Kirsher
2016-06-29 16:38 ` Greg
2016-06-30 12:57 ` [net 0/2][pull request] Intel Wired LAN Driver Updates 2016-06-29 David Miller
2 siblings, 1 reply; 5+ messages in thread
From: Jeff Kirsher @ 2016-06-29 16:30 UTC (permalink / raw)
To: davem; +Cc: Xin Long, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
From: Xin Long <lucien.xin@gmail.com>
Now ixgbevf_write/read_posted_mbx use -IXGBE_ERR_MBX as the initiative
return value, but it's incorrect, cause in ixgbevf_vlan_rx_add_vid(),
it use err == IXGBE_ERR_MBX, the err returned from mac.ops.set_vfta,
and in ixgbevf_set_vfta_vf, it return from write/read_posted. so we
should initialize err with IXGBE_ERR_MBX, instead of -IXGBE_ERR_MBX.
With this fix, the other functions that called it also can work well,
cause they only care about if err is 0 or not.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbevf/mbx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbevf/mbx.c b/drivers/net/ethernet/intel/ixgbevf/mbx.c
index 61a80da..2819abc 100644
--- a/drivers/net/ethernet/intel/ixgbevf/mbx.c
+++ b/drivers/net/ethernet/intel/ixgbevf/mbx.c
@@ -85,7 +85,7 @@ static s32 ixgbevf_poll_for_ack(struct ixgbe_hw *hw)
static s32 ixgbevf_read_posted_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size)
{
struct ixgbe_mbx_info *mbx = &hw->mbx;
- s32 ret_val = -IXGBE_ERR_MBX;
+ s32 ret_val = IXGBE_ERR_MBX;
if (!mbx->ops.read)
goto out;
@@ -111,7 +111,7 @@ out:
static s32 ixgbevf_write_posted_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size)
{
struct ixgbe_mbx_info *mbx = &hw->mbx;
- s32 ret_val = -IXGBE_ERR_MBX;
+ s32 ret_val = IXGBE_ERR_MBX;
/* exit if either we can't write or there isn't a defined timeout */
if (!mbx->ops.write || !mbx->timeout)
--
2.5.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [net 2/2] ixgbevf: ixgbevf_write/read_posted_mbx should use IXGBE_ERR_MBX to initialize ret_val
2016-06-29 16:30 ` [net 2/2] ixgbevf: ixgbevf_write/read_posted_mbx should use IXGBE_ERR_MBX to initialize ret_val Jeff Kirsher
@ 2016-06-29 16:38 ` Greg
0 siblings, 0 replies; 5+ messages in thread
From: Greg @ 2016-06-29 16:38 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: davem, Xin Long, netdev, nhorman, sassmann, jogreene
On Wed, 2016-06-29 at 09:30 -0700, Jeff Kirsher wrote:
> From: Xin Long <lucien.xin@gmail.com>
>
> Now ixgbevf_write/read_posted_mbx use -IXGBE_ERR_MBX as the initiative
> return value, but it's incorrect, cause in ixgbevf_vlan_rx_add_vid(),
> it use err == IXGBE_ERR_MBX, the err returned from mac.ops.set_vfta,
> and in ixgbevf_set_vfta_vf, it return from write/read_posted. so we
> should initialize err with IXGBE_ERR_MBX, instead of -IXGBE_ERR_MBX.
I believe "initiative" should be "initial", "cause" should be "because"
and "it use err" should be "it uses err". And I won't be a grammar nazi
about all the commas.
- Greg
>
> With this fix, the other functions that called it also can work well,
> cause they only care about if err is 0 or not.
>
> Signed-off-by: Xin Long <lucien.xin@gmail.com>
> Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
> drivers/net/ethernet/intel/ixgbevf/mbx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbevf/mbx.c b/drivers/net/ethernet/intel/ixgbevf/mbx.c
> index 61a80da..2819abc 100644
> --- a/drivers/net/ethernet/intel/ixgbevf/mbx.c
> +++ b/drivers/net/ethernet/intel/ixgbevf/mbx.c
> @@ -85,7 +85,7 @@ static s32 ixgbevf_poll_for_ack(struct ixgbe_hw *hw)
> static s32 ixgbevf_read_posted_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size)
> {
> struct ixgbe_mbx_info *mbx = &hw->mbx;
> - s32 ret_val = -IXGBE_ERR_MBX;
> + s32 ret_val = IXGBE_ERR_MBX;
>
> if (!mbx->ops.read)
> goto out;
> @@ -111,7 +111,7 @@ out:
> static s32 ixgbevf_write_posted_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size)
> {
> struct ixgbe_mbx_info *mbx = &hw->mbx;
> - s32 ret_val = -IXGBE_ERR_MBX;
> + s32 ret_val = IXGBE_ERR_MBX;
>
> /* exit if either we can't write or there isn't a defined timeout */
> if (!mbx->ops.write || !mbx->timeout)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [net 0/2][pull request] Intel Wired LAN Driver Updates 2016-06-29
2016-06-29 16:30 [net 0/2][pull request] Intel Wired LAN Driver Updates 2016-06-29 Jeff Kirsher
2016-06-29 16:30 ` [net 1/2] e1000e: keep Rx/Tx HW_VLAN_CTAG in sync Jeff Kirsher
2016-06-29 16:30 ` [net 2/2] ixgbevf: ixgbevf_write/read_posted_mbx should use IXGBE_ERR_MBX to initialize ret_val Jeff Kirsher
@ 2016-06-30 12:57 ` David Miller
2 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2016-06-30 12:57 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, nhorman, sassmann, jogreene
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 29 Jun 2016 09:30:02 -0700
> This series contains fixes to e1000e and ixgbevf.
Pulled, thanks Jeff.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-06-30 12:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-29 16:30 [net 0/2][pull request] Intel Wired LAN Driver Updates 2016-06-29 Jeff Kirsher
2016-06-29 16:30 ` [net 1/2] e1000e: keep Rx/Tx HW_VLAN_CTAG in sync Jeff Kirsher
2016-06-29 16:30 ` [net 2/2] ixgbevf: ixgbevf_write/read_posted_mbx should use IXGBE_ERR_MBX to initialize ret_val Jeff Kirsher
2016-06-29 16:38 ` Greg
2016-06-30 12:57 ` [net 0/2][pull request] Intel Wired LAN Driver Updates 2016-06-29 David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).