Date: Fri, 29 Jan 2016 09:16:08 +0000 (UTC) From: Steven Hartland <smh@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295035 - stable/10/sys/dev/ixgbe Message-ID: <201601290916.u0T9G8Nr034297@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: smh Date: Fri Jan 29 09:16:08 2016 New Revision: 295035 URL: https://svnweb.freebsd.org/changeset/base/295035 Log: MFC r294578: Fix ix advertise value after media change Approved by: re (gjb) Sponsored by: Multiplay Modified: stable/10/sys/dev/ixgbe/if_ix.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ixgbe/if_ix.c ============================================================================== --- stable/10/sys/dev/ixgbe/if_ix.c Fri Jan 29 03:10:22 2016 (r295034) +++ stable/10/sys/dev/ixgbe/if_ix.c Fri Jan 29 09:16:08 2016 (r295035) @@ -1855,10 +1855,16 @@ ixgbe_media_change(struct ifnet * ifp) hw->mac.autotry_restart = TRUE; hw->mac.ops.setup_link(hw, speed, TRUE); - adapter->advertise = - ((speed & IXGBE_LINK_SPEED_10GB_FULL) << 2) | - ((speed & IXGBE_LINK_SPEED_1GB_FULL) << 1) | - ((speed & IXGBE_LINK_SPEED_100_FULL) << 0); + if (IFM_SUBTYPE(ifm->ifm_media) == IFM_AUTO) { + adapter->advertise = 0; + } else { + if ((speed & IXGBE_LINK_SPEED_10GB_FULL) != 0) + adapter->advertise |= 1 << 2; + if ((speed & IXGBE_LINK_SPEED_1GB_FULL) != 0) + adapter->advertise |= 1 << 1; + if ((speed & IXGBE_LINK_SPEED_100_FULL) != 0) + adapter->advertise |= 1 << 0; + } return (0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601290916.u0T9G8Nr034297>