From 81ac55360952dfaec44d6af9f8445c86094253a1 Mon Sep 17 00:00:00 2001 From: Matt Jacob Date: Sun, 16 Jun 2002 04:59:30 +0000 Subject: Add ISP_FC_GETHINFO ioctl. MFC after: 1 week --- sys/dev/isp/isp_inline.h | 2 +- sys/dev/isp/isp_ioctl.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) (limited to 'sys/dev/isp') diff --git a/sys/dev/isp/isp_inline.h b/sys/dev/isp/isp_inline.h index 5a1694df05f8..8f8201362548 100644 --- a/sys/dev/isp/isp_inline.h +++ b/sys/dev/isp/isp_inline.h @@ -209,7 +209,7 @@ isp_fc_runstate(struct ispsoftc *isp, int tval) fcparam *fcp; int *tptr; - if (IS_SCSI(isp) || isp->isp_role == ISP_ROLE_NONE) + if (IS_SCSI(isp)) return (0); tptr = tval? &tval : NULL; diff --git a/sys/dev/isp/isp_ioctl.h b/sys/dev/isp/isp_ioctl.h index 9b5419e6be96..64613fd8bc6c 100644 --- a/sys/dev/isp/isp_ioctl.h +++ b/sys/dev/isp/isp_ioctl.h @@ -127,3 +127,32 @@ struct isp_fc_device { */ #define ISP_GET_FW_CRASH_DUMP _IO(ISP_IOC, 10) #define ISP_FORCE_CRASH_DUMP _IO(ISP_IOC, 11) + +/* + * Get information about this Host Adapter, including current connection + * topology and capabilities. + */ +struct isp_hba_device { + u_int32_t + : 8, + : 4, + fc_speed : 4, /* Gbps */ + : 2, + fc_class2 : 1, + fc_ip_supported : 1, + fc_scsi_supported : 1, + fc_topology : 3, + fc_loopid : 8; + u_int64_t nvram_node_wwn; + u_int64_t nvram_port_wwn; + u_int64_t active_node_wwn; + u_int64_t active_port_wwn; +}; + +#define ISP_TOPO_UNKNOWN 0 /* connection topology unknown */ +#define ISP_TOPO_FCAL 1 /* private or PL_DA */ +#define ISP_TOPO_LPORT 2 /* public loop */ +#define ISP_TOPO_NPORT 3 /* N-port */ +#define ISP_TOPO_FPORT 4 /* F-port */ + +#define ISP_FC_GETHINFO _IOR(ISP_IOC, 12, struct isp_hba_device) -- cgit v1.3