• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /***************************************************************************
3                           dpti_ioctl.h  -  description
4                              -------------------
5     begin                : Thu Sep 7 2000
6     copyright            : (C) 2001 by Adaptec
7 
8     See Documentation/scsi/dpti.rst for history, notes, license info
9     and credits
10  ***************************************************************************/
11 
12 /***************************************************************************
13  *                                                                         *
14  *                                                                         *
15  ***************************************************************************/
16 
17 /***************************************************************************
18  * This file is generated from  osd_unix.h                                 *
19  * *************************************************************************/
20 
21 #ifndef _dpti_ioctl_h
22 #define _dpti_ioctl_h
23 
24 // IOCTL interface commands
25 
26 #ifndef _IOWR
27 # define _IOWR(x,y,z)	(((x)<<8)|y)
28 #endif
29 #ifndef _IOW
30 # define _IOW(x,y,z)	(((x)<<8)|y)
31 #endif
32 #ifndef _IOR
33 # define _IOR(x,y,z)	(((x)<<8)|y)
34 #endif
35 #ifndef _IO
36 # define _IO(x,y)	(((x)<<8)|y)
37 #endif
38 /* EATA PassThrough Command	*/
39 #define EATAUSRCMD      _IOWR('D',65,EATA_CP)
40 /* Set Debug Level If Enabled	*/
41 #define DPT_DEBUG       _IOW('D',66,int)
42 /* Get Signature Structure	*/
43 #define DPT_SIGNATURE   _IOR('D',67,dpt_sig_S)
44 #if defined __bsdi__
45 #define DPT_SIGNATURE_PACKED   _IOR('D',67,dpt_sig_S_Packed)
46 #endif
47 /* Get Number Of DPT Adapters	*/
48 #define DPT_NUMCTRLS    _IOR('D',68,int)
49 /* Get Adapter Info Structure	*/
50 #define DPT_CTRLINFO    _IOR('D',69,CtrlInfo)
51 /* Get Statistics If Enabled	*/
52 #define DPT_STATINFO    _IO('D',70)
53 /* Clear Stats If Enabled	*/
54 #define DPT_CLRSTAT     _IO('D',71)
55 /* Get System Info Structure	*/
56 #define DPT_SYSINFO     _IOR('D',72,sysInfo_S)
57 /* Set Timeout Value		*/
58 #define DPT_TIMEOUT     _IO('D',73)
59 /* Get config Data  		*/
60 #define DPT_CONFIG      _IO('D',74)
61 /* Get Blink LED Code	        */
62 #define DPT_BLINKLED    _IOR('D',75,int)
63 /* Get Statistical information (if available) */
64 #define DPT_STATS_INFO        _IOR('D',80,STATS_DATA)
65 /* Clear the statistical information          */
66 #define DPT_STATS_CLEAR       _IO('D',81)
67 /* Get Performance metrics */
68 #define DPT_PERF_INFO        _IOR('D',82,dpt_perf_t)
69 /* Send an I2O command */
70 #define I2OUSRCMD	_IO('D',76)
71 /* Inform driver to re-acquire LCT information */
72 #define I2ORESCANCMD	_IO('D',77)
73 /* Inform driver to reset adapter */
74 #define I2ORESETCMD	_IO('D',78)
75 /* See if the target is mounted */
76 #define DPT_TARGET_BUSY	_IOR('D',79, TARGET_BUSY_T)
77 
78 
79   /* Structure Returned From Get Controller Info                             */
80 
81 typedef struct {
82 	uCHAR    state;            /* Operational state               */
83 	uCHAR    id;               /* Host adapter SCSI id            */
84 	int      vect;             /* Interrupt vector number         */
85 	int      base;             /* Base I/O address                */
86 	int      njobs;            /* # of jobs sent to HA            */
87 	int      qdepth;           /* Controller queue depth.         */
88 	int      wakebase;         /* mpx wakeup base index.          */
89 	uINT     SGsize;           /* Scatter/Gather list size.       */
90 	unsigned heads;            /* heads for drives on cntlr.      */
91 	unsigned sectors;          /* sectors for drives on cntlr.    */
92 	uCHAR    do_drive32;       /* Flag for Above 16 MB Ability    */
93 	uCHAR    BusQuiet;         /* SCSI Bus Quiet Flag             */
94 	char     idPAL[4];         /* 4 Bytes Of The ID Pal           */
95 	uCHAR    primary;          /* 1 For Primary, 0 For Secondary  */
96 	uCHAR    eataVersion;      /* EATA Version                    */
97 	uINT     cpLength;         /* EATA Command Packet Length      */
98 	uINT     spLength;         /* EATA Status Packet Length       */
99 	uCHAR    drqNum;           /* DRQ Index (0,5,6,7)             */
100 	uCHAR    flag1;            /* EATA Flags 1 (Byte 9)           */
101 	uCHAR    flag2;            /* EATA Flags 2 (Byte 30)          */
102 } CtrlInfo;
103 
104 typedef struct {
105 	uSHORT length;		// Remaining length of this
106 	uSHORT drvrHBAnum;	// Relative HBA # used by the driver
107 	uINT baseAddr;		// Base I/O address
108 	uSHORT blinkState;	// Blink LED state (0=Not in blink LED)
109 	uCHAR pciBusNum;	// PCI Bus # (Optional)
110 	uCHAR pciDeviceNum;	// PCI Device # (Optional)
111 	uSHORT hbaFlags;	// Miscellaneous HBA flags
112 	uSHORT Interrupt;	// Interrupt set for this device.
113 #   if (defined(_DPT_ARC))
114 	uINT baseLength;
115 	ADAPTER_OBJECT *AdapterObject;
116 	LARGE_INTEGER DmaLogicalAddress;
117 	PVOID DmaVirtualAddress;
118 	LARGE_INTEGER ReplyLogicalAddress;
119 	PVOID ReplyVirtualAddress;
120 #   else
121 	uINT reserved1;		// Reserved for future expansion
122 	uINT reserved2;		// Reserved for future expansion
123 	uINT reserved3;		// Reserved for future expansion
124 #   endif
125 } drvrHBAinfo_S;
126 
127 typedef struct TARGET_BUSY
128 {
129   uLONG channel;
130   uLONG id;
131   uLONG lun;
132   uLONG isBusy;
133 } TARGET_BUSY_T;
134 
135 #endif
136 
137