From f7af3de4b86808c39d96cca95e501a689529818c Mon Sep 17 00:00:00 2001 From: mjacob Date: Sat, 7 Feb 2004 03:43:27 +0000 Subject: [PATCH] Reverse role defines for initiator and target mode to better match the class 3 service parameters we'd get. Steal 8 bits out of the portid u_int32_t for role information (port ids are 24 bits anyway). MFC after: 1 week --- sys/dev/isp/isp_ioctl.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/dev/isp/isp_ioctl.h b/sys/dev/isp/isp_ioctl.h index f4d3c15acf8e..93ccc53f9ceb 100644 --- a/sys/dev/isp/isp_ioctl.h +++ b/sys/dev/isp/isp_ioctl.h @@ -63,8 +63,8 @@ #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_TARGET 0x1 +#define ISP_ROLE_INITIATOR 0x2 #define ISP_ROLE_BOTH (ISP_ROLE_TARGET|ISP_ROLE_INITIATOR) #ifndef ISP_DEFAULT_ROLES #define ISP_DEFAULT_ROLES ISP_ROLE_BOTH @@ -115,8 +115,10 @@ typedef struct { * 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_int32_t loopid; /* 0..255 */ + u_int32_t : 6, + role : 2, + portid : 24; /* 24 bit Port ID */ u_int64_t node_wwn; u_int64_t port_wwn; };