Author: mjacob
Date: Sun Nov  6 00:44:40 2011
New Revision: 227126
URL: http://svn.freebsd.org/changeset/base/227126

Log:
  Implement the sysctl's for fibre channel that are listed in the man page.
  
  MFC after:    3 days

Modified:
  head/sys/dev/isp/isp_freebsd.c
  head/sys/dev/isp/isp_freebsd.h

Modified: head/sys/dev/isp/isp_freebsd.c
==============================================================================
--- head/sys/dev/isp/isp_freebsd.c      Sat Nov  5 22:44:37 2011        
(r227125)
+++ head/sys/dev/isp/isp_freebsd.c      Sun Nov  6 00:44:40 2011        
(r227126)
@@ -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: head/sys/dev/isp/isp_freebsd.h
==============================================================================
--- head/sys/dev/isp/isp_freebsd.h      Sat Nov  5 22:44:37 2011        
(r227125)
+++ head/sys/dev/isp/isp_freebsd.h      Sun Nov  6 00:44:40 2011        
(r227126)
@@ -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>
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to