Date: Sun, 2 Sep 2012 14:56:04 +0000 (UTC) From: Matt Jacob <mjacob@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r240013 - stable/9/sys/dev/isp Message-ID: <201209021456.q82Eu4SD020966@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjacob Date: Sun Sep 2 14:56:04 2012 New Revision: 240013 URL: http://svn.freebsd.org/changeset/base/240013 Log: A belated MFC of 227126 Implement the sysctl's for fibre channel that are listed in the man page. Modified: stable/9/sys/dev/isp/isp_freebsd.c stable/9/sys/dev/isp/isp_freebsd.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/isp/ (props changed) Modified: stable/9/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/9/sys/dev/isp/isp_freebsd.c Sun Sep 2 14:46:30 2012 (r240012) +++ stable/9/sys/dev/isp/isp_freebsd.c Sun Sep 2 14:56:04 2012 (r240013) @@ -175,6 +175,14 @@ isp_attach_chan(ispsoftc_t *isp, struct 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: stable/9/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/9/sys/dev/isp/isp_freebsd.h Sun Sep 2 14:46:30 2012 (r240012) +++ stable/9/sys/dev/isp/isp_freebsd.h Sun Sep 2 14:56:04 2012 (r240013) @@ -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>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209021456.q82Eu4SD020966>