[Midnightbsd-cvs] src [7984] trunk/sys/dev/isp: implement sysctl for fibre channel
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Thu Sep 15 04:25:07 EDT 2016
Revision: 7984
http://svnweb.midnightbsd.org/src/?rev=7984
Author: laffer1
Date: 2016-09-15 04:25:07 -0400 (Thu, 15 Sep 2016)
Log Message:
-----------
implement sysctl for fibre channel
Modified Paths:
--------------
trunk/sys/dev/isp/isp_freebsd.c
trunk/sys/dev/isp/isp_freebsd.h
Modified: trunk/sys/dev/isp/isp_freebsd.c
===================================================================
--- trunk/sys/dev/isp/isp_freebsd.c 2016-09-15 08:24:44 UTC (rev 7983)
+++ trunk/sys/dev/isp/isp_freebsd.c 2016-09-15 08:25:07 UTC (rev 7984)
@@ -175,6 +175,14 @@
isp_prt(isp, ISP_LOGERR, "cannot create test target thread");
}
#endif
+ if (chan == 0) {
+ struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(isp->isp_osinfo.dev);
+ struct sysctl_oid *tree = device_get_sysctl_tree(isp->isp_osinfo.dev);
+ SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "wwnn", CTLFLAG_RD, &FCPARAM(isp, 0)->isp_wwnn, "World Wide Node Name");
+ SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "wwpn", CTLFLAG_RD, &FCPARAM(isp, 0)->isp_wwpn, "World Wide Port Name");
+ SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "loop_down_limit", CTLFLAG_RW, &ISP_FC_PC(isp, 0)->loop_down_limit, 0, "Loop Down Limit");
+ SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "gone_device_time", CTLFLAG_RW, &ISP_FC_PC(isp, 0)->gone_device_time, 0, "Gone Device Time");
+ }
}
return (0);
}
Modified: trunk/sys/dev/isp/isp_freebsd.h
===================================================================
--- trunk/sys/dev/isp/isp_freebsd.h 2016-09-15 08:24:44 UTC (rev 7983)
+++ trunk/sys/dev/isp/isp_freebsd.h 2016-09-15 08:25:07 UTC (rev 7984)
@@ -38,6 +38,7 @@
#include <sys/malloc.h>
#include <sys/mutex.h>
#include <sys/condvar.h>
+#include <sys/sysctl.h>
#include <sys/proc.h>
#include <sys/bus.h>
More information about the Midnightbsd-cvs
mailing list