diff options
author | Matt Jacob <mjacob@FreeBSD.org> | 2002-02-21 23:30:05 +0000 |
---|---|---|
committer | Matt Jacob <mjacob@FreeBSD.org> | 2002-02-21 23:30:05 +0000 |
commit | f553351ed202d28d3f832666237f383aac2f90c2 (patch) | |
tree | e8fd6c65ce7927dea8b308dd2d290924b348515f /sys/dev/isp/isp_ioctl.h | |
parent | a82f127b41f544a448b421a9f008b5bcc1e3988c (diff) |
Notes
Diffstat (limited to 'sys/dev/isp/isp_ioctl.h')
-rw-r--r-- | sys/dev/isp/isp_ioctl.h | 52 |
1 files changed, 36 insertions, 16 deletions
diff --git a/sys/dev/isp/isp_ioctl.h b/sys/dev/isp/isp_ioctl.h index c0480808392b3..9b5419e6be967 100644 --- a/sys/dev/isp/isp_ioctl.h +++ b/sys/dev/isp/isp_ioctl.h @@ -43,36 +43,37 @@ * The old value is written into this argument. */ -#define ISP_SDBLEV _IOWR(ISP_IOC, 0, int) +#define ISP_SDBLEV _IOWR(ISP_IOC, 1, int) /* * This ioctl resets the HBA. Use with caution. */ -#define ISP_RESETHBA _IO(ISP_IOC, 1) +#define ISP_RESETHBA _IO(ISP_IOC, 2) /* * This ioctl performs a fibre chanel rescan. */ -#define ISP_FC_RESCAN _IO(ISP_IOC, 2) +#define ISP_RESCAN _IO(ISP_IOC, 3) /* - * Initiate a LIP + * This ioctl performs a reset and then will set the adapter to the + * role that was passed in (the old role will be returned). It almost + * goes w/o saying: use with caution. */ -#define ISP_FC_LIP _IO(ISP_IOC, 3) +#define ISP_SETROLE _IOWR(ISP_IOC, 4, int) + +#define ISP_ROLE_NONE 0x0 +#define ISP_ROLE_INITIATOR 0x1 +#define ISP_ROLE_TARGET 0x2 +#define ISP_ROLE_BOTH (ISP_ROLE_TARGET|ISP_ROLE_INITIATOR) +#ifndef ISP_DEFAULT_ROLES +#define ISP_DEFAULT_ROLES ISP_ROLE_BOTH +#endif /* - * Return the Port Database structure for the named device, or ENODEV if none. - * Caller fills in virtual loopid (0..255), aka 'target'. The driver returns - * ENODEV (if nothing valid there) or the actual loopid (for local loop devices - * only), 24 bit Port ID and Node and Port WWNs. + * Get the current adapter role */ -struct isp_fc_device { - u_int32_t loopid; /* 0..255 */ - u_int32_t portid; /* 24 bit Port ID */ - u_int64_t node_wwn; - u_int64_t port_wwn; -}; -#define ISP_FC_GETDINFO _IOWR(ISP_IOC, 4, struct isp_fc_device) +#define ISP_GETROLE _IOR(ISP_IOC, 5), int /* * Get/Clear Stats @@ -103,6 +104,25 @@ typedef struct { #define ISP_CLR_STATS _IO(ISP_IOC, 7) /* + * Initiate a LIP + */ +#define ISP_FC_LIP _IO(ISP_IOC, 8) + +/* + * Return the Port Database structure for the named device, or ENODEV if none. + * Caller fills in virtual loopid (0..255), aka 'target'. The driver returns + * ENODEV (if nothing valid there) or the actual loopid (for local loop devices + * only), 24 bit Port ID and Node and Port WWNs. + */ +struct isp_fc_device { + u_int32_t loopid; /* 0..255 */ + u_int32_t portid; /* 24 bit Port ID */ + u_int64_t node_wwn; + u_int64_t port_wwn; +}; +#define ISP_FC_GETDINFO _IOWR(ISP_IOC, 9, struct isp_fc_device) + +/* * Get F/W crash dump */ #define ISP_GET_FW_CRASH_DUMP _IO(ISP_IOC, 10) |