build: move intel NIC patches
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
src/{ixgbe_ptp.c.orig => ixgbe_ptp.c} | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/ixgbe_ptp.c.orig b/src/ixgbe_ptp.c
|
||||
index fb832f0..b868c68 100644
|
||||
--- a/src/ixgbe_ptp.c.orig
|
||||
+++ b/src/ixgbe_ptp.c
|
||||
@@ -244,7 +244,7 @@ static void ixgbe_ptp_setup_sdp_X540(struct ixgbe_adapter *adapter)
|
||||
* result of SYSTIME is 32bits of "billions of cycles" and 32 bits of
|
||||
* "cycles", rather than seconds and nanoseconds.
|
||||
*/
|
||||
-static cycle_t ixgbe_ptp_read_X550(const struct cyclecounter *hw_cc) {
|
||||
+static u64 ixgbe_ptp_read_X550(const struct cyclecounter *hw_cc) {
|
||||
struct ixgbe_adapter *adapter =
|
||||
container_of(hw_cc, struct ixgbe_adapter, hw_cc);
|
||||
struct ixgbe_hw *hw = &adapter->hw;
|
||||
@@ -280,7 +280,7 @@ static cycle_t ixgbe_ptp_read_X550(const struct cyclecounter *hw_cc) {
|
||||
* cyclecounter structure used to construct a ns counter from the
|
||||
* arbitrary fixed point registers
|
||||
*/
|
||||
-static cycle_t ixgbe_ptp_read_82599(const struct cyclecounter *hw_cc)
|
||||
+static u64 ixgbe_ptp_read_82599(const struct cyclecounter *hw_cc)
|
||||
{
|
||||
struct ixgbe_adapter *adapter =
|
||||
container_of(hw_cc, struct ixgbe_adapter, hw_cc);
|
||||
@@ -0,0 +1,37 @@
|
||||
diff --git a/src/ixgbe_main.c b/src/ixgbe_main.c
|
||||
index 83c6250..fe226cd 100644
|
||||
--- a/src/ixgbe_main.c
|
||||
+++ b/src/ixgbe_main.c
|
||||
@@ -6379,11 +6379,6 @@ static void ixgbe_free_all_rx_resources(struct ixgbe_adapter *adapter)
|
||||
static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu)
|
||||
{
|
||||
struct ixgbe_adapter *adapter = netdev_priv(netdev);
|
||||
- int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN;
|
||||
-
|
||||
- /* MTU < 68 is an error and causes problems on some kernels */
|
||||
- if ((new_mtu < 68) || (max_frame > IXGBE_MAX_JUMBO_FRAME_SIZE))
|
||||
- return -EINVAL;
|
||||
|
||||
/*
|
||||
* For 82599EB we cannot allow legacy VFs to enable their receive
|
||||
@@ -6392,7 +6387,7 @@ static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu)
|
||||
*/
|
||||
if ((adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) &&
|
||||
(adapter->hw.mac.type == ixgbe_mac_82599EB) &&
|
||||
- (max_frame > (ETH_FRAME_LEN + ETH_FCS_LEN)))
|
||||
+ (new_mtu > ETH_DATA_LEN))
|
||||
e_warn(probe, "Setting MTU > 1500 will disable legacy VFs\n");
|
||||
|
||||
e_info(probe, "changing MTU from %d to %d\n", netdev->mtu, new_mtu);
|
||||
@@ -10134,6 +10129,11 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
|
||||
#ifdef IFF_SUPP_NOFCS
|
||||
netdev->priv_flags |= IFF_SUPP_NOFCS;
|
||||
#endif
|
||||
+
|
||||
+ /* MTU range: 68 - 9710 */
|
||||
+ netdev->min_mtu = ETH_MIN_MTU;
|
||||
+ netdev->max_mtu = IXGBE_MAX_JUMBO_FRAME_SIZE - (ETH_HLEN + ETH_FCS_LEN);
|
||||
+
|
||||
#if IS_ENABLED(CONFIG_DCB)
|
||||
if (adapter->flags & IXGBE_FLAG_DCB_CAPABLE)
|
||||
netdev->dcbnl_ops = &dcbnl_ops;
|
||||
Reference in New Issue
Block a user