Author: cem
Date: Tue Oct 20 19:19:48 2015
New Revision: 289645
URL: https://svnweb.freebsd.org/changeset/base/289645
Log:
NTB: MFV 7eb38781: Print driver name in module init
Prints driver name to indicate what is being loaded.
Authored by: Dave Jiang
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division
Modified:
head/sys/dev/ntb/if_ntb/if_ntb.c
head/sys/dev/ntb/ntb_hw/ntb_hw.c
Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==============================================================================
--- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:08:26 2015
(r289644)
+++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 19:19:48 2015
(r289645)
@@ -393,6 +393,9 @@ ntb_setup_interface(void)
ntb_transport_link_up(net_softc.qp);
net_softc.bufsize = ntb_transport_max_size(net_softc.qp) +
sizeof(struct ether_header);
+
+ if_printf(ifp, "if_ntb device setup\n");
+
return (0);
}
@@ -404,6 +407,7 @@ ntb_teardown_interface(void)
ntb_transport_link_down(net_softc.qp);
if (net_softc.ifp != NULL) {
+ if_printf(net_softc.ifp, "if_ntb device destroyed\n");
ether_ifdetach(net_softc.ifp);
if_free(net_softc.ifp);
}
Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==============================================================================
--- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 19:08:26 2015
(r289644)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 19:19:48 2015
(r289645)
@@ -530,6 +530,8 @@ ntb_attach(device_t device)
pci_enable_busmaster(ntb->device);
+ device_printf(ntb->device, "NTB device registered\n");
+
out:
if (error != 0)
ntb_detach(device);
@@ -561,6 +563,8 @@ ntb_detach(device_t device)
ntb_detect_max_mw(ntb);
ntb_unmap_pci_bar(ntb);
+ device_printf(ntb->device, "NTB device unregistered\n");
+
return (0);
}
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"