Deleted Added
full compact
isp_ioctl.h (154704) isp_ioctl.h (155704)
1/* $FreeBSD: head/sys/dev/isp/isp_ioctl.h 154704 2006-01-23 06:23:37Z mjacob $ */
1/* $FreeBSD: head/sys/dev/isp/isp_ioctl.h 155704 2006-02-15 00:31:48Z mjacob $ */
2/*-
3 *
4 * Copyright (c) 1997-2006 by Matthew Jacob
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:

--- 60 unchanged lines hidden (view full) ---

70 */
71#define ISP_GETROLE _IOR(ISP_IOC, 5, int)
72
73/*
74 * Get/Clear Stats
75 */
76#define ISP_STATS_VERSION 0
77typedef struct {
2/*-
3 *
4 * Copyright (c) 1997-2006 by Matthew Jacob
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:

--- 60 unchanged lines hidden (view full) ---

70 */
71#define ISP_GETROLE _IOR(ISP_IOC, 5, int)
72
73/*
74 * Get/Clear Stats
75 */
76#define ISP_STATS_VERSION 0
77typedef struct {
78 u_int8_t isp_stat_version;
79 u_int8_t isp_type; /* (ro) reflects chip type */
80 u_int8_t isp_revision; /* (ro) reflects chip version */
81 u_int8_t unused1;
82 u_int32_t unused2;
78 uint8_t isp_stat_version;
79 uint8_t isp_type; /* (ro) reflects chip type */
80 uint8_t isp_revision; /* (ro) reflects chip version */
81 uint8_t unused1;
82 uint32_t unused2;
83 /*
84 * Statistics Counters
85 */
86#define ISP_NSTATS 16
87#define ISP_INTCNT 0
88#define ISP_INTBOGUS 1
89#define ISP_INTMBOXC 2
90#define ISP_INGOASYNC 3
91#define ISP_RSLTCCMPLT 4
92#define ISP_FPHCCMCPLT 5
93#define ISP_RSCCHIWAT 6
94#define ISP_FPCCHIWAT 7
83 /*
84 * Statistics Counters
85 */
86#define ISP_NSTATS 16
87#define ISP_INTCNT 0
88#define ISP_INTBOGUS 1
89#define ISP_INTMBOXC 2
90#define ISP_INGOASYNC 3
91#define ISP_RSLTCCMPLT 4
92#define ISP_FPHCCMCPLT 5
93#define ISP_RSCCHIWAT 6
94#define ISP_FPCCHIWAT 7
95 u_int64_t isp_stats[ISP_NSTATS];
95 uint64_t isp_stats[ISP_NSTATS];
96} isp_stats_t;
97
98#define ISP_GET_STATS _IOR(ISP_IOC, 6, isp_stats_t)
99#define ISP_CLR_STATS _IO(ISP_IOC, 7)
100
101/*
102 * Initiate a LIP
103 */
104#define ISP_FC_LIP _IO(ISP_IOC, 8)
105
106/*
107 * Return the Port Database structure for the named device, or ENODEV if none.
108 * Caller fills in virtual loopid (0..255), aka 'target'. The driver returns
109 * ENODEV (if nothing valid there) or the actual loopid (for local loop devices
110 * only), 24 bit Port ID and Node and Port WWNs.
111 */
112struct isp_fc_device {
96} isp_stats_t;
97
98#define ISP_GET_STATS _IOR(ISP_IOC, 6, isp_stats_t)
99#define ISP_CLR_STATS _IO(ISP_IOC, 7)
100
101/*
102 * Initiate a LIP
103 */
104#define ISP_FC_LIP _IO(ISP_IOC, 8)
105
106/*
107 * Return the Port Database structure for the named device, or ENODEV if none.
108 * Caller fills in virtual loopid (0..255), aka 'target'. The driver returns
109 * ENODEV (if nothing valid there) or the actual loopid (for local loop devices
110 * only), 24 bit Port ID and Node and Port WWNs.
111 */
112struct isp_fc_device {
113 u_int32_t loopid; /* 0..255 */
114 u_int32_t : 6,
113 uint32_t loopid; /* 0..255 */
114 uint32_t : 6,
115 role : 2,
116 portid : 24; /* 24 bit Port ID */
115 role : 2,
116 portid : 24; /* 24 bit Port ID */
117 u_int64_t node_wwn;
118 u_int64_t port_wwn;
117 uint64_t node_wwn;
118 uint64_t port_wwn;
119};
120#define ISP_FC_GETDINFO _IOWR(ISP_IOC, 9, struct isp_fc_device)
121
122/*
123 * Get F/W crash dump
124 */
125#define ISP_GET_FW_CRASH_DUMP _IO(ISP_IOC, 10)
126#define ISP_FORCE_CRASH_DUMP _IO(ISP_IOC, 11)
127
128/*
129 * Get information about this Host Adapter, including current connection
130 * topology and capabilities.
131 */
132struct isp_hba_device {
119};
120#define ISP_FC_GETDINFO _IOWR(ISP_IOC, 9, struct isp_fc_device)
121
122/*
123 * Get F/W crash dump
124 */
125#define ISP_GET_FW_CRASH_DUMP _IO(ISP_IOC, 10)
126#define ISP_FORCE_CRASH_DUMP _IO(ISP_IOC, 11)
127
128/*
129 * Get information about this Host Adapter, including current connection
130 * topology and capabilities.
131 */
132struct isp_hba_device {
133 u_int32_t
133 uint32_t
134 : 8,
135 : 4,
136 fc_speed : 4, /* Gbps */
137 : 2,
138 fc_class2 : 1,
139 fc_ip_supported : 1,
140 fc_scsi_supported : 1,
141 fc_topology : 3,
142 fc_loopid : 8;
134 : 8,
135 : 4,
136 fc_speed : 4, /* Gbps */
137 : 2,
138 fc_class2 : 1,
139 fc_ip_supported : 1,
140 fc_scsi_supported : 1,
141 fc_topology : 3,
142 fc_loopid : 8;
143 u_int8_t fc_fw_major;
144 u_int8_t fc_fw_minor;
145 u_int8_t fc_fw_micro;
146 u_int8_t reserved;
147 u_int64_t nvram_node_wwn;
148 u_int64_t nvram_port_wwn;
149 u_int64_t active_node_wwn;
150 u_int64_t active_port_wwn;
143 uint8_t fc_fw_major;
144 uint8_t fc_fw_minor;
145 uint8_t fc_fw_micro;
146 uint8_t reserved;
147 uint64_t nvram_node_wwn;
148 uint64_t nvram_port_wwn;
149 uint64_t active_node_wwn;
150 uint64_t active_port_wwn;
151};
152
153#define ISP_TOPO_UNKNOWN 0 /* connection topology unknown */
154#define ISP_TOPO_FCAL 1 /* private or PL_DA */
155#define ISP_TOPO_LPORT 2 /* public loop */
156#define ISP_TOPO_NPORT 3 /* N-port */
157#define ISP_TOPO_FPORT 4 /* F-port */
158

--- 11 unchanged lines hidden (view full) ---

170 * "framelength" 512,1024,2048
171 * "exec_throttle" 16..255
172 * "fullduplex" 0,1
173 * "loopid" 0..125
174 */
175
176struct isp_fc_param {
177 char param_name[16]; /* null terminated */
151};
152
153#define ISP_TOPO_UNKNOWN 0 /* connection topology unknown */
154#define ISP_TOPO_FCAL 1 /* private or PL_DA */
155#define ISP_TOPO_LPORT 2 /* public loop */
156#define ISP_TOPO_NPORT 3 /* N-port */
157#define ISP_TOPO_FPORT 4 /* F-port */
158

--- 11 unchanged lines hidden (view full) ---

170 * "framelength" 512,1024,2048
171 * "exec_throttle" 16..255
172 * "fullduplex" 0,1
173 * "loopid" 0..125
174 */
175
176struct isp_fc_param {
177 char param_name[16]; /* null terminated */
178 u_int32_t parameter;
178 uint32_t parameter;
179};
180
181#define ISP_GET_FC_PARAM _IOWR(ISP_IOC, 98, struct isp_fc_param)
182#define ISP_SET_FC_PARAM _IOWR(ISP_IOC, 99, struct isp_fc_param)
183
184/*
185 * Various Reset Goodies
186 */
187struct isp_fc_tsk_mgmt {
179};
180
181#define ISP_GET_FC_PARAM _IOWR(ISP_IOC, 98, struct isp_fc_param)
182#define ISP_SET_FC_PARAM _IOWR(ISP_IOC, 99, struct isp_fc_param)
183
184/*
185 * Various Reset Goodies
186 */
187struct isp_fc_tsk_mgmt {
188 u_int32_t loopid; /* 0..255 */
189 u_int32_t lun;
188 uint32_t loopid; /* 0..255 */
189 uint32_t lun;
190 enum {
191 CLEAR_ACA, TARGET_RESET, LUN_RESET, CLEAR_TASK_SET, ABORT_TASK_SET
192 } action;
193};
194#define ISP_TSK_MGMT _IOWR(ISP_IOC, 97, struct isp_fc_tsk_mgmt)
190 enum {
191 CLEAR_ACA, TARGET_RESET, LUN_RESET, CLEAR_TASK_SET, ABORT_TASK_SET
192 } action;
193};
194#define ISP_TSK_MGMT _IOWR(ISP_IOC, 97, struct isp_fc_tsk_mgmt)