Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci/ixgbe Set ifm_active to IFM_NONE when the physic...



details:   https://anonhg.NetBSD.org/src/rev/ce34f7f4e6a6
branches:  trunk
changeset: 821485:ce34f7f4e6a6
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Wed Feb 08 03:59:12 2017 +0000

description:
Set ifm_active to IFM_NONE when the physical interface's link is down.
Now ifconfig shows "media: Ethernet autoselect '(none)'".

diffstat:

 sys/dev/pci/ixgbe/ixgbe.c |  3 ++-
 sys/dev/pci/ixgbe/ixv.c   |  3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diffs (40 lines):

diff -r 4c5eb7d03f8f -r ce34f7f4e6a6 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Wed Feb 08 03:44:40 2017 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Wed Feb 08 03:59:12 2017 +0000
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixgbe.c,v 1.67 2017/02/01 10:47:13 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.68 2017/02/08 03:59:12 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -1879,6 +1879,7 @@
        ifmr->ifm_active = IFM_ETHER;
 
        if (!adapter->link_active) {
+               ifmr->ifm_active |= IFM_NONE;
                IXGBE_CORE_UNLOCK(adapter);
                return;
        }
diff -r 4c5eb7d03f8f -r ce34f7f4e6a6 sys/dev/pci/ixgbe/ixv.c
--- a/sys/dev/pci/ixgbe/ixv.c   Wed Feb 08 03:44:40 2017 +0000
+++ b/sys/dev/pci/ixgbe/ixv.c   Wed Feb 08 03:59:12 2017 +0000
@@ -31,7 +31,7 @@
 
 ******************************************************************************/
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixv.c,v 1.38 2017/02/07 04:27:43 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.39 2017/02/08 03:59:12 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -1020,6 +1020,7 @@
        ifmr->ifm_active = IFM_ETHER;
 
        if (!adapter->link_active) {
+               ifmr->ifm_active |= IFM_NONE;
                IXGBE_CORE_UNLOCK(adapter);
                return;
        }



Home | Main Index | Thread Index | Old Index