From c1c677a1ece500c9e9a43fa3bc7f59735f6b2b2f Mon Sep 17 00:00:00 2001 From: Intel Date: Fri, 8 Nov 2013 03:00:00 +0100 Subject: [PATCH] kni: fix X540 init KNI must not do hardware reset. But it was resetting X540 devices. This bug was in the first KNI version (commit 3fc5ca2f63529ec5ad7b1b75f517d61dc7613bd9). Signed-off-by: Intel --- .../linuxapp/kni/ethtool/ixgbe/ixgbe_x540.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_x540.c b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_x540.c index 3583b200e5..efffe6f675 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_x540.c +++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_x540.c @@ -186,7 +186,14 @@ s32 ixgbe_setup_mac_link_X540(struct ixgbe_hw *hw, **/ s32 ixgbe_reset_hw_X540(struct ixgbe_hw *hw) { - s32 status; + s32 status = 0; + + /* + * Userland DPDK takes the ownershiop of device + * Kernel driver here used as the simple path for ethtool only + * Won't real reset device anyway + */ +#if 0 u32 ctrl, i; /* Call adapter stop to disable tx/rx and clear interrupts */ @@ -230,6 +237,8 @@ mac_reset_top: /* Set the Rx packet buffer size. */ IXGBE_WRITE_REG(hw, IXGBE_RXPBSIZE(0), 384 << IXGBE_RXPBSIZE_SHIFT); +#endif + /* Store the permanent mac address */ hw->mac.ops.get_mac_addr(hw, hw->mac.perm_addr); @@ -260,7 +269,7 @@ mac_reset_top: hw->mac.ops.get_wwn_prefix(hw, &hw->mac.wwnn_prefix, &hw->mac.wwpn_prefix); -reset_hw_out: +//reset_hw_out: return status; } -- 2.20.1