smartmontools  SVN Rev 4057
Utility to control and monitor storage systems with "S.M.A.R.T."
os_freebsd.h
Go to the documentation of this file.
1 /*
2  * os_freebsd.h
3  *
4  * Home page of code is: http://smartmontools.sourceforge.net
5  *
6  * Copyright (C) 2003-8 Eduard Martinescu <smartmontools-support@lists.sourceforge.net>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2, or (at your option)
11  * any later version.
12  *
13  * You should have received a copy of the GNU General Public License
14  * (for example COPYING); if not, write to the Free Software Foundation,
15  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16  *
17  * This code was originally developed as a Senior Thesis by Michael Cornwell
18  * at the Concurrent Systems Laboratory (now part of the Storage Systems
19  * Research Center), Jack Baskin School of Engineering, University of
20  * California, Santa Cruz. http://ssrc.soe.ucsc.edu/
21  *
22  */
23 
24 /*-
25  * Copyright (c) 2000 Michael Smith
26  * Copyright (c) 2003 Paul Saab
27  * Copyright (c) 2003 Vinod Kashyap
28  * Copyright (c) 2000 BSDi
29  * All rights reserved.
30  *
31  * Redistribution and use in source and binary forms, with or without
32  * modification, are permitted provided that the following conditions
33  * are met:
34  * 1. Redistributions of source code must retain the above copyright
35  * notice, this list of conditions and the following disclaimer.
36  * 2. Redistributions in binary form must reproduce the above copyright
37  * notice, this list of conditions and the following disclaimer in the
38  * documentation and/or other materials provided with the distribution.
39  *
40  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
41  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
42  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
43  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
44  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
45  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
46  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
48  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
49  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
50  * SUCH DAMAGE.
51  *
52  */
53 
54 /*
55  * Copyright (c) 2004-05 Applied Micro Circuits Corporation.
56  * Copyright (c) 2004-05 Vinod Kashyap
57  * All rights reserved.
58  *
59  * Redistribution and use in source and binary forms, with or without
60  * modification, are permitted provided that the following conditions
61  * are met:
62  * 1. Redistributions of source code must retain the above copyright
63  * notice, this list of conditions and the following disclaimer.
64  * 2. Redistributions in binary form must reproduce the above copyright
65  * notice, this list of conditions and the following disclaimer in the
66  * documentation and/or other materials provided with the distribution.
67  *
68  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
69  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
70  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
71  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
72  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
73  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
74  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
75  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
76  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
77  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
78  * SUCH DAMAGE.
79  *
80  */
81 
82 #ifndef OS_FREEBSD_H_
83 #define OS_FREEBSD_H_
84 
85 #define OS_FREEBSD_H_CVSID "$Id: os_freebsd.h 3727 2012-12-13 17:23:06Z samm2 $"
86 
87 #define MAX_NUM_DEV 26
88 
89 #ifdef HAVE_SYS_TWEREG_H
90 #include <sys/twereg.h>
91 #else
92 /**
93  * The following cut out of twereg.h
94  *
95  */
96 #if __FreeBSD_version < 500040
97 #define __packed __attribute__((__packed__))
98 #endif
99 
100 #define TWE_MAX_SGL_LENGTH 62
101 #define TWE_MAX_ATA_SGL_LENGTH 60
102 #define TWE_OP_ATA_PASSTHROUGH 0x11
103 
104 /* scatter/gather list entry */
105 typedef struct
106 {
107  u_int32_t address;
108  u_int32_t length;
109 } __packed TWE_SG_Entry;
110 
111 typedef struct {
112  u_int8_t opcode:5; /* TWE_OP_INITCONNECTION */
113  u_int8_t res1:3;
114  u_int8_t size;
115  u_int8_t request_id;
116  u_int8_t res2:4;
117  u_int8_t host_id:4;
118  u_int8_t status;
119  u_int8_t flags;
120  u_int16_t message_credits;
122 } __packed TWE_Command_INITCONNECTION;
123 
124 typedef struct
125 {
126  u_int8_t opcode:5; /* TWE_OP_READ/TWE_OP_WRITE */
127  u_int8_t res1:3;
128  u_int8_t size;
129  u_int8_t request_id;
130  u_int8_t unit:4;
131  u_int8_t host_id:4;
132  u_int8_t status;
133  u_int8_t flags;
134  u_int16_t block_count;
135  u_int32_t lba;
136  TWE_SG_Entry sgl[TWE_MAX_SGL_LENGTH];
137 } __packed TWE_Command_IO;
138 
139 typedef struct
140 {
141  u_int8_t opcode:5; /* TWE_OP_HOTSWAP */
142  u_int8_t res1:3;
143  u_int8_t size;
144  u_int8_t request_id;
145  u_int8_t unit:4;
146  u_int8_t host_id:4;
147  u_int8_t status;
148  u_int8_t flags;
149  u_int8_t action;
150 #define TWE_OP_HOTSWAP_REMOVE 0x00 /* remove assumed-degraded unit */
151 #define TWE_OP_HOTSWAP_ADD_CBOD 0x01 /* add CBOD to empty port */
152 #define TWE_OP_HOTSWAP_ADD_SPARE 0x02 /* add spare to empty port */
153  u_int8_t aport;
154 } __packed TWE_Command_HOTSWAP;
155 
156 typedef struct
157 {
158  u_int8_t opcode:5; /* TWE_OP_SETATAFEATURE */
159  u_int8_t res1:3;
160  u_int8_t size;
161  u_int8_t request_id;
162  u_int8_t unit:4;
163  u_int8_t host_id:4;
164  u_int8_t status;
165  u_int8_t flags;
166  u_int8_t feature;
167 #define TWE_OP_SETATAFEATURE_WCE 0x02
168 #define TWE_OP_SETATAFEATURE_DIS_WCE 0x82
169  u_int8_t feature_mode;
170  u_int16_t all_units;
171  u_int16_t persistence;
172 } __packed TWE_Command_SETATAFEATURE;
173 
174 typedef struct
175 {
176  u_int8_t opcode:5; /* TWE_OP_CHECKSTATUS */
177  u_int8_t res1:3;
178  u_int8_t size;
179  u_int8_t request_id;
180  u_int8_t unit:4;
181  u_int8_t res2:4;
182  u_int8_t status;
183  u_int8_t flags;
184  u_int16_t target_status; /* set low byte to target request's ID */
185 } __packed TWE_Command_CHECKSTATUS;
186 
187 typedef struct
188 {
189  u_int8_t opcode:5; /* TWE_OP_GETPARAM, TWE_OP_SETPARAM */
190  u_int8_t res1:3;
191  u_int8_t size;
192  u_int8_t request_id;
193  u_int8_t unit:4;
194  u_int8_t host_id:4;
195  u_int8_t status;
196  u_int8_t flags;
197  u_int16_t param_count;
198  TWE_SG_Entry sgl[TWE_MAX_SGL_LENGTH];
199 } __packed TWE_Command_PARAM;
200 
201 typedef struct
202 {
203  u_int8_t opcode:5; /* TWE_OP_REBUILDUNIT */
204  u_int8_t res1:3;
205  u_int8_t size;
206  u_int8_t request_id;
207  u_int8_t src_unit:4;
208  u_int8_t host_id:4;
209  u_int8_t status;
210  u_int8_t flags;
211  u_int8_t action:7;
212 #define TWE_OP_REBUILDUNIT_NOP 0
213 #define TWE_OP_REBUILDUNIT_STOP 2 /* stop all rebuilds */
214 #define TWE_OP_REBUILDUNIT_START 4 /* start rebuild with lowest unit */
215 #define TWE_OP_REBUILDUNIT_STARTUNIT 5 /* rebuild src_unit (not supported) */
216  u_int8_t cs:1; /* request state change on src_unit */
217  u_int8_t logical_subunit; /* for RAID10 rebuild of logical subunit */
218 } __packed TWE_Command_REBUILDUNIT;
219 
220 typedef struct
221 {
222  u_int8_t opcode:5;
223  u_int8_t sgl_offset:3;
224  u_int8_t size;
225  u_int8_t request_id;
226  u_int8_t unit;
227  u_int8_t status;
228  u_int8_t flags;
229  u_int16_t param;
230  u_int16_t features;
231  u_int16_t sector_count;
232  u_int16_t sector_num;
233  u_int16_t cylinder_lo;
234  u_int16_t cylinder_hi;
235  u_int8_t drive_head;
236  u_int8_t command;
237  TWE_SG_Entry sgl[TWE_MAX_ATA_SGL_LENGTH];
238 } __packed TWE_Command_ATA;
239 
240 typedef struct
241 {
242  u_int8_t opcode:5;
243  u_int8_t sgl_offset:3;
244  u_int8_t size;
245  u_int8_t request_id;
246  u_int8_t unit:4;
247  u_int8_t host_id:4;
248  u_int8_t status;
249  u_int8_t flags;
250 #define TWE_FLAGS_SUCCESS 0x00
251 #define TWE_FLAGS_INFORMATIONAL 0x01
252 #define TWE_FLAGS_WARNING 0x02
253 #define TWE_FLAGS_FATAL 0x03
254 #define TWE_FLAGS_PERCENTAGE (1<<8) /* bits 0-6 indicate completion percentage */
255  u_int16_t count; /* block count, parameter count, message credits */
256 } __packed TWE_Command_Generic;
257 
258 /* command packet - must be TWE_ALIGNMENT aligned */
259 typedef union
260 {
261  TWE_Command_INITCONNECTION initconnection;
262  TWE_Command_IO io;
263  TWE_Command_PARAM param;
264  TWE_Command_CHECKSTATUS checkstatus;
265  TWE_Command_REBUILDUNIT rebuildunit;
266  TWE_Command_SETATAFEATURE setatafeature;
267  TWE_Command_ATA ata;
268  TWE_Command_Generic generic;
269  u_int8_t pad[512];
270 } TWE_Command;
271 
272 /* response queue entry */
273 typedef union
274 {
275  struct
276  {
277  u_int32_t undefined_1:4;
278  u_int32_t response_id:8;
279  u_int32_t undefined_2:20;
280  } u;
281  u_int32_t value;
283 
284 #endif
285 
286 #ifdef HAVE_SYS_TWEIO_H
287 #include <sys/tweio.h>
288 #else
289 /*
290  * Following cut out of tweio.h
291  *
292  */
293 /*
294  * User-space command
295  *
296  * Note that the command's scatter/gather list will be computed by the
297  * driver, and cannot be filled in by the consumer.
298  */
300  TWE_Command tu_command; /* command ready for the controller */
301  void *tu_data; /* pointer to data in userspace */
302  size_t tu_size; /* userspace data length */
303 };
304 
305 #define TWEIO_COMMAND _IOWR('T', 100, struct twe_usercommand)
306 
307 #endif
308 
309 #ifdef HAVE_SYS_TW_OSL_IOCTL_H
310 #include <sys/tw_osl_ioctl.h>
311 #else
312 /*
313  * Following cut out of tw_osl_types.h
314  *
315  */
316 
317 typedef void TW_VOID;
318 typedef char TW_INT8;
319 typedef unsigned char TW_UINT8;
320 typedef short TW_INT16;
321 typedef unsigned short TW_UINT16;
322 typedef int TW_INT32;
323 typedef unsigned int TW_UINT32;
324 typedef long long TW_INT64;
325 typedef unsigned long long TW_UINT64;
326 
327 /*
328  * Following cut out of tw_cl_share.h
329  *
330  */
331 
332 #pragma pack(1)
333 
342  TW_UINT8 parameter_data[98];
344  TW_UINT8 severity_str[20];
345 };
346 
347 #pragma pack()
348 
349 /*
350  * Following cut out of tw_cl_fwif.h
351  *
352  */
353 
354 #define TWA_FW_CMD_ATA_PASSTHROUGH 0x11
355 
356 #define TWA_SENSE_DATA_LENGTH 18
357 
358 #pragma pack(1)
359 /* 7000 structures. */
374 };
375 
376 
377 /* Structure for downloading firmware onto the controller. */
387 };
388 
389 
390 /* Structure for hard resetting the controller. */
400 };
401 
402 
403 /* Structure for sending get/set param commands. */
413 };
414 
415 
416 /* Generic command packet. */
424  TW_UINT16 count; /* block cnt, parameter cnt, message credits */
425 };
426 
427 
428 /* Command packet header. */
431  struct {
432  TW_INT8 reserved[4];
436  } status_block;
437  TW_UINT8 err_specific_desc[98];
438  struct {
442  } header_desc;
443 };
444 
445 
446 /* 7000 Command packet. */
448  struct tw_cl_command_init_connect init_connect;
451  struct tw_cl_command_param param;
452  struct tw_cl_command_generic generic;
453  TW_UINT8 padding[1024 - sizeof(struct tw_cl_command_header)];
454 };
455 
456 
457 /* 9000 Command Packet. */
463  TW_UINT8 sgl_offset; /* offset (in bytes) to sg_list, from the
464  end of sgl_entries */
467  TW_UINT8 sg_list[872];/* total struct size =
468  1024-sizeof(cmd_hdr) */
469 };
470 
471 
472 /* Full command packet. */
474  struct tw_cl_command_header cmd_hdr;
475  union {
476  union tw_cl_command_7k cmd_pkt_7k;
477  struct tw_cl_command_9k cmd_pkt_9k;
478  } command;
479 };
480 
481 #pragma pack()
482 
483 /*
484  * Following cut out of tw_cl_ioctl.h
485  *
486  */
487 
488 #pragma pack(1)
489 
490 /* Structure used to handle GET/RELEASE LOCK ioctls. */
495 };
496 
497 
498 /* Structure used to handle GET COMPATIBILITY INFO ioctl. */
500  TW_UINT8 driver_version[32];/* driver version */
501  TW_UINT16 working_srl; /* driver & firmware negotiated srl */
502  TW_UINT16 working_branch; /* branch # of the firmware that the
503  driver is compatible with */
504  TW_UINT16 working_build; /* build # of the firmware that the
505  driver is compatible with */
506 };
507 
508 
509 /* Driver understandable part of the ioctl packet built by the API. */
517 };
518 
519 #pragma pack()
520 
521 /*
522  * Following cut out of tw_osl_ioctl.h
523  *
524  */
525 
526 #pragma pack(1)
527 /*
528  * We need the structure below to ensure that the first byte of
529  * data_buf is not overwritten by the kernel, after we return
530  * from the ioctl call. Note that cmd_pkt has been reduced
531  * to an array of 1024 bytes even though it's actually 2048 bytes
532  * in size. This is because, we don't expect requests from user
533  * land requiring 2048 (273 sg elements) byte cmd pkts.
534  */
536  struct tw_cl_driver_packet driver_pkt;
537  TW_VOID *pdata; /* points to data_buf */
538  TW_INT8 padding[488 - sizeof(TW_VOID *)];
539  struct tw_cl_command_packet cmd_pkt;
541 
542 #pragma pack()
543 
544 #define TW_OSL_IOCTL_FIRMWARE_PASS_THROUGH \
545  _IOWR('T', 202, TW_OSLI_IOCTL_NO_DATA_BUF)
546 
547 #pragma pack(1)
548 
550  struct tw_cl_driver_packet driver_pkt;
551  TW_INT8 padding[488];
552  struct tw_cl_command_packet cmd_pkt;
553  union {
554  struct tw_cl_event_packet event_pkt;
555  struct tw_cl_lock_packet lock_pkt;
556  struct tw_cl_compatibility_packet compat_pkt;
557  TW_INT8 data_buf[1];
558  } payload;
560 
561 #pragma pack()
562 
563 #endif
564 
565 #define HPT_CTL_CODE(x) (x+0xFF00)
566 #define HPT_IOCTL_GET_CHANNEL_INFO HPT_CTL_CODE(3)
567 #define HPT_IOCTL_GET_CHANNEL_INFO_V2 HPT_CTL_CODE(53)
568 #define HPT_IOCTL_IDE_PASS_THROUGH HPT_CTL_CODE(24)
569 
570 #define HPT_READ 1
571 #define HPT_WRITE 2
572 
573 #define HPT_IOCTL_MAGIC 0xA1B2C3D4
574 
575 #define MAXDEV_PER_CHANNEL 2
576 #define PMPORT_PER_CHANNEL 15 /* max devices connected to this channel via pmport */
577 
578 #pragma pack(1)
579 typedef struct _HPT_CHANNEL_INFO {
580  unsigned int reserve1;
581  unsigned int reserve2;
584 
585 typedef struct _HPT_CHANNEL_INFO_V2 {
586  unsigned int reserve1;
587  unsigned int reserve2;
590 
591 typedef struct _HPT_IOCTL_PARAM {
592  unsigned int magic; /* used to check if it's a valid ioctl packet */
593  unsigned int ctrl_code; /* operation control code */
594  void* in; /* input data buffer */
595  unsigned int in_size; /* size of input data buffer */
596  void* out; /* output data buffer */
597  unsigned int out_size; /* size of output data buffer */
598  void* returned_size; /* count of chars returned */
600 #define HPT_DO_IOCONTROL _IOW('H', 0, HPT_IOCTL_PARAM)
601 
602 typedef struct _HPT_PASS_THROUGH_HEADER {
603  unsigned int id; /* disk ID */
604  unsigned char feature;
605  unsigned char sectorcount;
606  unsigned char lbalow;
607  unsigned char lbamid;
608  unsigned char lbahigh;
609  unsigned char driverhead;
610  unsigned char command;
611  unsigned char sectors; /* data size in sectors, if the command has data transfer */
612  unsigned char protocol; /* HPT_(READ,WRITE) or zero for non-DATA */
613  unsigned char reserve[3];
614 }
616 #pragma pack()
617 
618 #ifndef __unused
619 #define __unused __attribute__ ((__unused__))
620 #endif
621 
622 #endif /* OS_FREEBSD_H_ */
TW_UINT32 force_flag
Definition: os_freebsd.h:494
unsigned char TW_UINT8
Definition: os_freebsd.h:319
u_int8_t feature_mode
Definition: os_freebsd.h:169
u_int16_t message_credits
Definition: os_freebsd.h:120
unsigned long long TW_UINT64
Definition: os_freebsd.h:325
u_int16_t block_count
Definition: os_freebsd.h:134
u_int8_t logical_subunit
Definition: os_freebsd.h:217
u32 size
Definition: megaraid.h:79
TW_UINT16 aen_code
Definition: os_freebsd.h:337
TW_UINT32 timeout_msec
Definition: os_freebsd.h:492
#define MAXDEV_PER_CHANNEL
Definition: os_freebsd.h:575
TWE_Command_ATA ata
Definition: os_freebsd.h:267
#define TWE_MAX_SGL_LENGTH
Definition: os_freebsd.h:100
struct _HPT_IOCTL_PARAM * PHPT_IOCTL_PARAM
unsigned char command
Definition: os_freebsd.h:610
TW_UINT16 lun_l4__req_id
Definition: os_freebsd.h:461
struct _HPT_PASS_THROUGH_HEADER * PHPT_PASS_THROUGH_HEADER
TW_UINT8 status
Definition: os_freebsd.h:462
TW_UINT8 parameter_len
Definition: os_freebsd.h:341
u_int16_t features
Definition: os_freebsd.h:230
u_int32_t address
Definition: os_freebsd.h:107
TW_UINT16 param_count
Definition: os_freebsd.h:411
TWE_Command_INITCONNECTION initconnection
Definition: os_freebsd.h:261
struct _HPT_PASS_THROUGH_HEADER HPT_PASS_THROUGH_HEADER
u_int16_t persistence
Definition: os_freebsd.h:171
short TW_INT16
Definition: os_freebsd.h:320
unsigned int reserve2
Definition: os_freebsd.h:581
u_int32_t lba
Definition: os_freebsd.h:135
struct tw_osli_ioctl_no_data_buf TW_OSLI_IOCTL_NO_DATA_BUF
u16 flags
Definition: megaraid.h:93
void TW_VOID
Definition: os_freebsd.h:317
unsigned char sectorcount
Definition: os_freebsd.h:605
TW_UINT32 control_code
Definition: os_freebsd.h:511
u_int8_t feature
Definition: os_freebsd.h:166
unsigned int reserve1
Definition: os_freebsd.h:586
TW_UINT32 unique_id
Definition: os_freebsd.h:513
struct _HPT_CHANNEL_INFO_V2 * PHPT_CHANNEL_INFO_V2
unsigned int in_size
Definition: os_freebsd.h:595
unsigned char feature
Definition: os_freebsd.h:604
TWE_Command_PARAM param
Definition: os_freebsd.h:263
u_int8_t drive_head
Definition: os_freebsd.h:235
struct _HPT_CHANNEL_INFO_V2 HPT_CHANNEL_INFO_V2
u_int16_t param_count
Definition: os_freebsd.h:197
u_int8_t action
Definition: os_freebsd.h:149
static struct @39 devices[20]
TW_UINT8 sgl_offset
Definition: os_freebsd.h:463
u8 cdb[16]
Definition: megaraid.h:100
u_int8_t aport
Definition: os_freebsd.h:153
unsigned char lbahigh
Definition: os_freebsd.h:608
unsigned int ctrl_code
Definition: os_freebsd.h:593
#define PMPORT_PER_CHANNEL
Definition: os_freebsd.h:576
TWE_Command_REBUILDUNIT rebuildunit
Definition: os_freebsd.h:265
struct _HPT_CHANNEL_INFO HPT_CHANNEL_INFO
TW_UINT8 sgl_off__opcode
Definition: os_freebsd.h:405
u_int16_t count
Definition: os_freebsd.h:255
TW_UINT32 sequence_id
Definition: os_freebsd.h:514
uint8_t opcode
Definition: megaraid.h:86
unsigned int reserve2
Definition: os_freebsd.h:587
unsigned int out_size
Definition: os_freebsd.h:597
unsigned int magic
Definition: os_freebsd.h:592
union megasas_sgl sgl
Definition: megaraid.h:101
long long TW_INT64
Definition: os_freebsd.h:324
unsigned char lbamid
Definition: os_freebsd.h:607
TW_UINT32 sequence_id
Definition: os_freebsd.h:335
unsigned char driverhead
Definition: os_freebsd.h:609
TWE_Command_CHECKSTATUS checkstatus
Definition: os_freebsd.h:264
u_int16_t all_units
Definition: os_freebsd.h:170
u_int16_t target_status
Definition: os_freebsd.h:184
TW_UINT8 res__opcode
Definition: os_freebsd.h:459
u_int16_t param
Definition: os_freebsd.h:229
u_int16_t sector_num
Definition: os_freebsd.h:232
u_int8_t command
Definition: os_freebsd.h:236
u_int8_t status
Definition: os_freebsd.h:118
#define TWA_SENSE_DATA_LENGTH
Definition: os_freebsd.h:356
TW_UINT16 lun_h4__sgl_entries
Definition: os_freebsd.h:465
unsigned int TW_UINT32
Definition: os_freebsd.h:323
int TW_INT32
Definition: os_freebsd.h:322
unsigned short TW_UINT16
Definition: os_freebsd.h:321
u_int16_t cylinder_lo
Definition: os_freebsd.h:233
u_int16_t sector_count
Definition: os_freebsd.h:231
u_int32_t response_queue_pointer
Definition: os_freebsd.h:121
struct _HPT_CHANNEL_INFO * PHPT_CHANNEL_INFO
u_int8_t request_id
Definition: os_freebsd.h:115
void * returned_size
Definition: os_freebsd.h:598
unsigned int reserve1
Definition: os_freebsd.h:580
#define TWE_MAX_ATA_SGL_LENGTH
Definition: os_freebsd.h:101
TWE_Command_SETATAFEATURE setatafeature
Definition: os_freebsd.h:266
u_int8_t size
Definition: os_freebsd.h:114
unsigned char lbalow
Definition: os_freebsd.h:606
TWE_Command_IO io
Definition: os_freebsd.h:262
TW_UINT8 host_id__unit
Definition: os_freebsd.h:408
struct _HPT_IOCTL_PARAM HPT_IOCTL_PARAM
TW_UINT32 time_remaining_msec
Definition: os_freebsd.h:493
u_int8_t flags
Definition: os_freebsd.h:119
TW_UINT8 repeat_count
Definition: os_freebsd.h:340
TW_UINT8 sgl_off__opcode
Definition: os_freebsd.h:418
TW_UINT32 event_src
Definition: os_freebsd.h:343
u_int32_t length
Definition: os_freebsd.h:108
unsigned char protocol
Definition: os_freebsd.h:612
char TW_INT8
Definition: os_freebsd.h:318
struct tw_osli_ioctl_with_payload TW_OSLI_IOCTL_WITH_PAYLOAD
TW_UINT32 time_stamp_sec
Definition: os_freebsd.h:336
TW_UINT8 res__severity
Definition: os_freebsd.h:435
u_int16_t cylinder_hi
Definition: os_freebsd.h:234
TW_UINT8 retrieved
Definition: os_freebsd.h:339
TWE_Command tu_command
Definition: os_freebsd.h:300
TW_UINT32 os_status
Definition: os_freebsd.h:515
TW_UINT32 buffer_length
Definition: os_freebsd.h:516
unsigned char sectors
Definition: os_freebsd.h:611