Date: Tue, 23 Mar 2010 21:38:41 +0000 (UTC) From: Andrew Gallatin <gallatin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r205538 - stable/7/sys/dev/mxge Message-ID: <201003232138.o2NLcfEv094619@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gallatin Date: Tue Mar 23 21:38:41 2010 New Revision: 205538 URL: http://svn.freebsd.org/changeset/base/205538 Log: MFC 204212: Update mxge to support IFCAP_VLAN_HWTSO Modified: stable/7/sys/dev/mxge/if_mxge.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/7/sys/dev/mxge/if_mxge.c Tue Mar 23 21:38:25 2010 (r205537) +++ stable/7/sys/dev/mxge/if_mxge.c Tue Mar 23 21:38:41 2010 (r205538) @@ -3855,6 +3855,13 @@ mxge_ioctl(struct ifnet *ifp, u_long com } if (mask & IFCAP_VLAN_HWTAGGING) ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; + if (mask & IFCAP_VLAN_HWTSO) + ifp->if_capenable ^= IFCAP_VLAN_HWTSO; + + if (!(ifp->if_capabilities & IFCAP_VLAN_HWTSO) || + !(ifp->if_capenable & IFCAP_VLAN_HWTAGGING)) + ifp->if_capenable &= ~IFCAP_VLAN_HWTSO; + mtx_unlock(&sc->driver_mtx); VLAN_CAPABILITIES(ifp); @@ -4450,6 +4457,11 @@ mxge_attach(device_t dev) #ifdef MXGE_NEW_VLAN_API ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWCSUM; + + /* Only FW 1.4.32 and newer can do TSO over vlans */ + if (sc->fw_ver_major == 1 && sc->fw_ver_minor == 4 && + sc->fw_ver_tiny >= 32) + ifp->if_capabilities |= IFCAP_VLAN_HWTSO; #endif sc->max_mtu = mxge_max_mtu(sc);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003232138.o2NLcfEv094619>