From: Wenzhuo Lu Date: Fri, 16 Oct 2015 02:50:50 +0000 (+0800) Subject: e1000/base: fix jumbo frame CRC failures X-Git-Tag: spdx-start~8338 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f26b9791667a7cce9cddf8a0bb26d5788d7c5f0a;p=dpdk.git e1000/base: fix jumbo frame CRC failures This is a patch to change the value of register 776.20[11:2] for jumbo mode from 0x1A to 0x1F. This is to enlarge the gap between read and write pointers in the TX Fifo. And replace the magic number with a macro by the way. Signed-off-by: Wenzhuo Lu --- diff --git a/drivers/net/e1000/base/e1000_defines.h b/drivers/net/e1000/base/e1000_defines.h index 71bd2e0da4..79a88bb2ca 100644 --- a/drivers/net/e1000/base/e1000_defines.h +++ b/drivers/net/e1000/base/e1000_defines.h @@ -468,6 +468,7 @@ POSSIBILITY OF SUCH DAMAGE. #define ETHERNET_FCS_SIZE 4 #define MAX_JUMBO_FRAME_SIZE 0x3F00 +#define E1000_TX_PTR_GAP 0x1F /* Extended Configuration Control and Size */ #define E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP 0x00000020 diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c index a11e0857aa..103b41a0a1 100644 --- a/drivers/net/e1000/base/e1000_ich8lan.c +++ b/drivers/net/e1000/base/e1000_ich8lan.c @@ -2604,7 +2604,7 @@ s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable) return ret_val; hw->phy.ops.read_reg(hw, PHY_REG(776, 20), &data); data &= ~(0x3FF << 2); - data |= (0x1A << 2); + data |= (E1000_TX_PTR_GAP << 2); ret_val = hw->phy.ops.write_reg(hw, PHY_REG(776, 20), data); if (ret_val) return ret_val;