- more FIXME -> TRACE
[wine.git] / include / ntddscsi.h
blob222969cf20354509cab3873377e3f0150129ced9
1 /*
2 * DDK definitions for scsi media access
4 * Copyright (C) 2002 Laurent Pinchart
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef _NTDDSCSI_H_
22 #define _NTDDSCSI_H_
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 #define IOCTL_SCSI_BASE FILE_DEVICE_CONTROLLER
30 #define IOCTL_SCSI_PASS_THROUGH CTL_CODE(IOCTL_SCSI_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
31 #define IOCTL_SCSI_MINIPORT CTL_CODE(IOCTL_SCSI_BASE, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
32 #define IOCTL_SCSI_GET_INQUIRY_DATA CTL_CODE(IOCTL_SCSI_BASE, 0x0403, METHOD_BUFFERED, FILE_ANY_ACCESS)
33 #define IOCTL_SCSI_GET_CAPABILITIES CTL_CODE(IOCTL_SCSI_BASE, 0x0404, METHOD_BUFFERED, FILE_ANY_ACCESS)
34 #define IOCTL_SCSI_PASS_THROUGH_DIRECT CTL_CODE(IOCTL_SCSI_BASE, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
35 #define IOCTL_SCSI_GET_ADDRESS CTL_CODE(IOCTL_SCSI_BASE, 0x0406, METHOD_BUFFERED, FILE_ANY_ACCESS)
36 #define IOCTL_SCSI_RESCAN_BUS CTL_CODE(IOCTL_SCSI_BASE, 0x0407, METHOD_BUFFERED, FILE_ANY_ACCESS)
37 #define IOCTL_SCSI_GET_DUMP_POINTERS CTL_CODE(IOCTL_SCSI_BASE, 0x0408, METHOD_BUFFERED, FILE_ANY_ACCESS)
38 #define IOCTL_SCSI_FREE_DUMP_POINTERS CTL_CODE(IOCTL_SCSI_BASE, 0x0409, METHOD_BUFFERED, FILE_ANY_ACCESS)
39 #define IOCTL_IDE_PASS_THROUGH CTL_CODE(IOCTL_SCSI_BASE, 0x040a, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
41 #define SCSI_IOCTL_DATA_OUT 0
42 #define SCSI_IOCTL_DATA_IN 1
43 #define SCSI_IOCTL_DATA_UNSPECIFIED 2
45 typedef struct _SCSI_PASS_THROUGH {
46 USHORT Length;
47 UCHAR ScsiStatus;
48 UCHAR PathId;
49 UCHAR TargetId;
50 UCHAR Lun;
51 UCHAR CdbLength;
52 UCHAR SenseInfoLength;
53 UCHAR DataIn;
54 ULONG DataTransferLength;
55 ULONG TimeOutValue;
56 ULONG_PTR DataBufferOffset;
57 ULONG SenseInfoOffset;
58 UCHAR Cdb[16];
59 } SCSI_PASS_THROUGH, *PSCSI_PASS_THROUGH;
61 typedef struct _SCSI_PASS_THROUGH_DIRECT {
62 USHORT Length;
63 UCHAR ScsiStatus;
64 UCHAR PathId;
65 UCHAR TargetId;
66 UCHAR Lun;
67 UCHAR CdbLength;
68 UCHAR SenseInfoLength;
69 UCHAR DataIn;
70 ULONG DataTransferLength;
71 ULONG TimeOutValue;
72 PVOID DataBuffer;
73 ULONG SenseInfoOffset;
74 UCHAR Cdb[16];
75 } SCSI_PASS_THROUGH_DIRECT, *PSCSI_PASS_THROUGH_DIRECT;
77 typedef struct _SCSI_ADDRESS {
78 ULONG Length;
79 UCHAR PortNumber;
80 UCHAR PathId;
81 UCHAR TargetId;
82 UCHAR Lun;
83 } SCSI_ADDRESS, *PSCSI_ADDRESS;
85 typedef struct _IO_SCSI_CAPABILITIES {
86 ULONG Length;
87 ULONG MaximumTransferLength;
88 ULONG MaximumPhysicalPages;
89 ULONG SupportedAsynchronousEvents;
90 ULONG AlignmentMask;
91 BOOLEAN TaggedQueuing;
92 BOOLEAN AdapterScansDown;
93 BOOLEAN AdapterUsesPio;
94 } IO_SCSI_CAPABILITIES, *PIO_SCSI_CAPABILITIES;
96 #ifdef __cplusplus
98 #endif
100 #endif /* _NTDDSCSI_H_ */