From: Intel Date: Fri, 8 Nov 2013 02:00:00 +0000 (+0100) Subject: kni: fix X540 init X-Git-Tag: spdx-start~11073 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c1c677a1ece500c9e9a43fa3bc7f59735f6b2b2f;p=dpdk.git 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 --- 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; }