svn commit: r299567 - user/ngie/ntb-hacking/sys/dev/ntb/if_ntb

Garrett Cooper ngie at FreeBSD.org
Thu May 12 20:18:38 UTC 2016


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 at 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);


More information about the svn-src-user mailing list