From d2a744ffeab914711878e964e2dc39b1a67edc7e Mon Sep 17 00:00:00 2001 From: Jack F Vogel Date: Thu, 12 Jul 2007 19:04:11 +0000 Subject: [PATCH] A couple late breaking bugs that testing have turned up. - change include style so build in kernel try OR standalone work. - Limit HWCSUM - I was led to believe that it would work with RSS, but our testing had odd issues which suggests this is false. - A fatfinger error in the ioctl code made ifconfig up not work. Approved by: re --- sys/dev/ixgbe/ixgbe.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe.c b/sys/dev/ixgbe/ixgbe.c index a43d37f29041..6e1707d87184 100644 --- a/sys/dev/ixgbe/ixgbe.c +++ b/sys/dev/ixgbe/ixgbe.c @@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "opt_device_polling.h" #endif -#include +#include "ixgbe.h" /********************************************************************* * Set this to one to display debug statistics @@ -533,7 +533,7 @@ ixgbe_ioctl(struct ifnet * ifp, u_long command, caddr_t data) IOCTL_DEBUGOUT("ioctl: SIOCSIFFLAGS (Set Interface Flags)"); IXGBE_LOCK(adapter); if (ifp->if_flags & IFF_UP) { - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { + if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { if ((ifp->if_flags ^ adapter->if_flags) & IFF_PROMISC) { ixgbe_disable_promisc(adapter); @@ -1630,7 +1630,10 @@ ixgbe_setup_interface(device_t dev, struct adapter *adapter) */ ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); - ifp->if_capabilities |= (IFCAP_HWCSUM | IFCAP_TSO4); + if (adapter->msix) /* Don't use CSUM with RSS */ + ifp->if_capabilities |= IFCAP_TSO4; + else + ifp->if_capabilities |= (IFCAP_HWCSUM | IFCAP_TSO4); ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; ifp->if_capabilities |= IFCAP_JUMBO_MTU;