* [PATCH net-next 0/2][pull request] Intel Wired LAN Driver Updates 2022-08-18 (ixgbe)
@ 2022-08-18 22:34 Tony Nguyen
2022-08-18 22:34 ` [PATCH net-next 1/2] ixgbe: Don't call kmap() on page allocated with GFP_ATOMIC Tony Nguyen
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tony Nguyen @ 2022-08-18 22:34 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet; +Cc: Tony Nguyen, netdev
This series contains updates to ixgbe driver only.
Fabio M. De Francesco replaces kmap() call to page_address() for
rx_buffer->page().
Jeff Daly adds a manual AN-37 restart to help resolve issues with some link
partners.
The following are changes since commit e34cfee65ec891a319ce79797dda18083af33a76:
stmmac: intel: remove unused 'has_crossts' flag
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 10GbE
Fabio M. De Francesco (1):
ixgbe: Don't call kmap() on page allocated with GFP_ATOMIC
Jeff Daly (1):
ixgbe: Manual AN-37 for troublesome link partners for X550 SFI
.../net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 3 +
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 56 ++++++++++++++++++-
3 files changed, 57 insertions(+), 6 deletions(-)
--
2.35.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net-next 1/2] ixgbe: Don't call kmap() on page allocated with GFP_ATOMIC
2022-08-18 22:34 [PATCH net-next 0/2][pull request] Intel Wired LAN Driver Updates 2022-08-18 (ixgbe) Tony Nguyen
@ 2022-08-18 22:34 ` Tony Nguyen
2022-08-18 22:34 ` [PATCH net-next 2/2] ixgbe: Manual AN-37 for troublesome link partners for X550 SFI Tony Nguyen
2022-08-23 3:30 ` [PATCH net-next 0/2][pull request] Intel Wired LAN Driver Updates 2022-08-18 (ixgbe) patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Tony Nguyen @ 2022-08-18 22:34 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet
Cc: Fabio M. De Francesco, netdev, anthony.l.nguyen, Ira Weiny,
Alexander Duyck, Alexander Duyck, Gurucharan
From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Pages allocated with GFP_ATOMIC cannot come from Highmem. This is why
there is no need to call kmap() on them.
Therefore, don't call kmap() on rx_buffer->page() and instead use a
plain page_address() to get the kernel address.
Suggested-by: Ira Weiny <ira.weiny@intel.com>
Suggested-by: Alexander Duyck <alexander.duyck@gmail.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index 04f453eabef6..cb5c707538a5 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -1964,15 +1964,13 @@ static bool ixgbe_check_lbtest_frame(struct ixgbe_rx_buffer *rx_buffer,
frame_size >>= 1;
- data = kmap(rx_buffer->page) + rx_buffer->page_offset;
+ data = page_address(rx_buffer->page) + rx_buffer->page_offset;
if (data[3] != 0xFF ||
data[frame_size + 10] != 0xBE ||
data[frame_size + 12] != 0xAF)
match = false;
- kunmap(rx_buffer->page);
-
return match;
}
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net-next 2/2] ixgbe: Manual AN-37 for troublesome link partners for X550 SFI
2022-08-18 22:34 [PATCH net-next 0/2][pull request] Intel Wired LAN Driver Updates 2022-08-18 (ixgbe) Tony Nguyen
2022-08-18 22:34 ` [PATCH net-next 1/2] ixgbe: Don't call kmap() on page allocated with GFP_ATOMIC Tony Nguyen
@ 2022-08-18 22:34 ` Tony Nguyen
2022-08-23 3:30 ` [PATCH net-next 0/2][pull request] Intel Wired LAN Driver Updates 2022-08-18 (ixgbe) patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Tony Nguyen @ 2022-08-18 22:34 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet
Cc: Jeff Daly, netdev, anthony.l.nguyen, Dave Switzer
From: Jeff Daly <jeffd@silicom-usa.com>
Some (Juniper MX5) SFP link partners exhibit a disinclination to
autonegotiate with X550 configured in SFI mode. This patch enables
a manual AN-37 restart to work around the problem.
Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
Tested-by: Dave Switzer <david.switzer@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 3 +
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 56 ++++++++++++++++++-
2 files changed, 56 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
index 7f7ea468ffa9..2b00db92b08f 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
@@ -3712,7 +3712,9 @@ struct ixgbe_info {
#define IXGBE_KRM_LINK_S1(P) ((P) ? 0x8200 : 0x4200)
#define IXGBE_KRM_LINK_CTRL_1(P) ((P) ? 0x820C : 0x420C)
#define IXGBE_KRM_AN_CNTL_1(P) ((P) ? 0x822C : 0x422C)
+#define IXGBE_KRM_AN_CNTL_4(P) ((P) ? 0x8238 : 0x4238)
#define IXGBE_KRM_AN_CNTL_8(P) ((P) ? 0x8248 : 0x4248)
+#define IXGBE_KRM_PCS_KX_AN(P) ((P) ? 0x9918 : 0x5918)
#define IXGBE_KRM_SGMII_CTRL(P) ((P) ? 0x82A0 : 0x42A0)
#define IXGBE_KRM_LP_BASE_PAGE_HIGH(P) ((P) ? 0x836C : 0x436C)
#define IXGBE_KRM_DSP_TXFFE_STATE_4(P) ((P) ? 0x8634 : 0x4634)
@@ -3722,6 +3724,7 @@ struct ixgbe_info {
#define IXGBE_KRM_PMD_FLX_MASK_ST20(P) ((P) ? 0x9054 : 0x5054)
#define IXGBE_KRM_TX_COEFF_CTRL_1(P) ((P) ? 0x9520 : 0x5520)
#define IXGBE_KRM_RX_ANA_CTL(P) ((P) ? 0x9A00 : 0x5A00)
+#define IXGBE_KRM_FLX_TMRS_CTRL_ST31(P) ((P) ? 0x9180 : 0x5180)
#define IXGBE_KRM_PMD_FLX_MASK_ST20_SFI_10G_DA ~(0x3 << 20)
#define IXGBE_KRM_PMD_FLX_MASK_ST20_SFI_10G_SR BIT(20)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
index 35c2b9b8bd19..aa4bf6c9a2f7 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
@@ -1721,9 +1721,59 @@ static s32 ixgbe_setup_sfi_x550a(struct ixgbe_hw *hw, ixgbe_link_speed *speed)
return IXGBE_ERR_LINK_SETUP;
}
- status = mac->ops.write_iosf_sb_reg(hw,
- IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id),
- IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
+ (void)mac->ops.write_iosf_sb_reg(hw,
+ IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id),
+ IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
+
+ /* change mode enforcement rules to hybrid */
+ (void)mac->ops.read_iosf_sb_reg(hw,
+ IXGBE_KRM_FLX_TMRS_CTRL_ST31(hw->bus.lan_id),
+ IXGBE_SB_IOSF_TARGET_KR_PHY, ®_val);
+ reg_val |= 0x0400;
+
+ (void)mac->ops.write_iosf_sb_reg(hw,
+ IXGBE_KRM_FLX_TMRS_CTRL_ST31(hw->bus.lan_id),
+ IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
+
+ /* manually control the config */
+ (void)mac->ops.read_iosf_sb_reg(hw,
+ IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
+ IXGBE_SB_IOSF_TARGET_KR_PHY, ®_val);
+ reg_val |= 0x20002240;
+
+ (void)mac->ops.write_iosf_sb_reg(hw,
+ IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
+ IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
+
+ /* move the AN base page values */
+ (void)mac->ops.read_iosf_sb_reg(hw,
+ IXGBE_KRM_PCS_KX_AN(hw->bus.lan_id),
+ IXGBE_SB_IOSF_TARGET_KR_PHY, ®_val);
+ reg_val |= 0x1;
+
+ (void)mac->ops.write_iosf_sb_reg(hw,
+ IXGBE_KRM_PCS_KX_AN(hw->bus.lan_id),
+ IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
+
+ /* set the AN37 over CB mode */
+ (void)mac->ops.read_iosf_sb_reg(hw,
+ IXGBE_KRM_AN_CNTL_4(hw->bus.lan_id),
+ IXGBE_SB_IOSF_TARGET_KR_PHY, ®_val);
+ reg_val |= 0x20000000;
+
+ (void)mac->ops.write_iosf_sb_reg(hw,
+ IXGBE_KRM_AN_CNTL_4(hw->bus.lan_id),
+ IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
+
+ /* restart AN manually */
+ (void)mac->ops.read_iosf_sb_reg(hw,
+ IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
+ IXGBE_SB_IOSF_TARGET_KR_PHY, ®_val);
+ reg_val |= IXGBE_KRM_LINK_CTRL_1_TETH_AN_RESTART;
+
+ (void)mac->ops.write_iosf_sb_reg(hw,
+ IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
+ IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
/* Toggle port SW reset by AN reset. */
status = ixgbe_restart_an_internal_phy_x550em(hw);
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next 0/2][pull request] Intel Wired LAN Driver Updates 2022-08-18 (ixgbe)
2022-08-18 22:34 [PATCH net-next 0/2][pull request] Intel Wired LAN Driver Updates 2022-08-18 (ixgbe) Tony Nguyen
2022-08-18 22:34 ` [PATCH net-next 1/2] ixgbe: Don't call kmap() on page allocated with GFP_ATOMIC Tony Nguyen
2022-08-18 22:34 ` [PATCH net-next 2/2] ixgbe: Manual AN-37 for troublesome link partners for X550 SFI Tony Nguyen
@ 2022-08-23 3:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-08-23 3:30 UTC (permalink / raw)
To: Tony Nguyen; +Cc: davem, kuba, pabeni, edumazet, netdev
Hello:
This series was applied to netdev/net-next.git (master)
by Tony Nguyen <anthony.l.nguyen@intel.com>:
On Thu, 18 Aug 2022 15:34:00 -0700 you wrote:
> This series contains updates to ixgbe driver only.
>
> Fabio M. De Francesco replaces kmap() call to page_address() for
> rx_buffer->page().
>
> Jeff Daly adds a manual AN-37 restart to help resolve issues with some link
> partners.
>
> [...]
Here is the summary with links:
- [net-next,1/2] ixgbe: Don't call kmap() on page allocated with GFP_ATOMIC
https://git.kernel.org/netdev/net-next/c/03f51719df03
- [net-next,2/2] ixgbe: Manual AN-37 for troublesome link partners for X550 SFI
https://git.kernel.org/netdev/net-next/c/565736048bd5
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-08-23 3:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-18 22:34 [PATCH net-next 0/2][pull request] Intel Wired LAN Driver Updates 2022-08-18 (ixgbe) Tony Nguyen
2022-08-18 22:34 ` [PATCH net-next 1/2] ixgbe: Don't call kmap() on page allocated with GFP_ATOMIC Tony Nguyen
2022-08-18 22:34 ` [PATCH net-next 2/2] ixgbe: Manual AN-37 for troublesome link partners for X550 SFI Tony Nguyen
2022-08-23 3:30 ` [PATCH net-next 0/2][pull request] Intel Wired LAN Driver Updates 2022-08-18 (ixgbe) patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.