Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 May 2016 20:18:37 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r299567 - user/ngie/ntb-hacking/sys/dev/ntb/if_ntb
Message-ID:  <201605122018.u4CKIbth041264@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Thu May 12 20:18:37 2016
New Revision: 299567
URL: https://svnweb.freebsd.org/changeset/base/299567

Log:
  Set the link state within ntb_net_event_handler(..)
  
  It was previously stubbed out, and has been since the driver was
  first introduced in head@r250079

Modified:
  user/ngie/ntb-hacking/sys/dev/ntb/if_ntb/if_ntb.c

Modified: user/ngie/ntb-hacking/sys/dev/ntb/if_ntb/if_ntb.c
==============================================================================
--- user/ngie/ntb-hacking/sys/dev/ntb/if_ntb/if_ntb.c	Thu May 12 20:15:23 2016	(r299566)
+++ user/ngie/ntb-hacking/sys/dev/ntb/if_ntb/if_ntb.c	Thu May 12 20:18:37 2016	(r299567)
@@ -567,15 +567,14 @@ ntb_net_event_handler(void *data, enum n
 {
 	struct ifnet *ifp;
 
-	ifp = data;
-	(void)ifp;
-
-	/* XXX The Linux driver munges with the carrier status here. */
+	ifp = (struct ifnet*)data;
 
 	switch (status) {
 	case NTB_LINK_DOWN:
+		if_link_state_change(ifp, LINK_STATE_DOWN);
 		break;
 	case NTB_LINK_UP:
+		if_link_state_change(ifp, LINK_STATE_UP);
 		break;
 	default:
 		panic("Bogus ntb_link_event %u\n", status);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605122018.u4CKIbth041264>