Add ISP_FC_GETHINFO ioctl.

MFC after:	1 week
This commit is contained in:
Matt Jacob 2002-06-16 04:59:30 +00:00
parent fc08717104
commit 81ac553609
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98286
2 changed files with 30 additions and 1 deletions

View File

@ -209,7 +209,7 @@ isp_fc_runstate(struct ispsoftc *isp, int tval)
fcparam *fcp; fcparam *fcp;
int *tptr; int *tptr;
if (IS_SCSI(isp) || isp->isp_role == ISP_ROLE_NONE) if (IS_SCSI(isp))
return (0); return (0);
tptr = tval? &tval : NULL; tptr = tval? &tval : NULL;

View File

@ -127,3 +127,32 @@ struct isp_fc_device {
*/ */
#define ISP_GET_FW_CRASH_DUMP _IO(ISP_IOC, 10) #define ISP_GET_FW_CRASH_DUMP _IO(ISP_IOC, 10)
#define ISP_FORCE_CRASH_DUMP _IO(ISP_IOC, 11) #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)