diff options
author | mjacob <mjacob@FreeBSD.org> | 2002-06-16 04:59:30 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2002-06-16 04:59:30 +0000 |
commit | 288c4d3b4e4fda0a0001816645371b6f97b30bc2 (patch) | |
tree | 6c7052297c6048d12933a3d0af4104ab047ca345 /sys/dev/isp | |
parent | 51b0c82ba5c0ed162ec9ba3c1e39f14651a7b1fd (diff) | |
download | FreeBSD-src-288c4d3b4e4fda0a0001816645371b6f97b30bc2.zip FreeBSD-src-288c4d3b4e4fda0a0001816645371b6f97b30bc2.tar.gz |
Add ISP_FC_GETHINFO ioctl.
MFC after: 1 week
Diffstat (limited to 'sys/dev/isp')
-rw-r--r-- | sys/dev/isp/isp_inline.h | 2 | ||||
-rw-r--r-- | sys/dev/isp/isp_ioctl.h | 29 |
2 files changed, 30 insertions, 1 deletions
diff --git a/sys/dev/isp/isp_inline.h b/sys/dev/isp/isp_inline.h index 5a1694d..8f82013 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 9b5419e..64613fd 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) |