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
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 {
52 UCHAR SenseInfoLength;
54 ULONG DataTransferLength;
56 ULONG_PTR DataBufferOffset;
57 ULONG SenseInfoOffset;
59 } SCSI_PASS_THROUGH, *PSCSI_PASS_THROUGH;
61 typedef struct _SCSI_PASS_THROUGH_DIRECT {
68 UCHAR SenseInfoLength;
70 ULONG DataTransferLength;
73 ULONG SenseInfoOffset;
75 } SCSI_PASS_THROUGH_DIRECT, *PSCSI_PASS_THROUGH_DIRECT;
77 typedef struct _SCSI_ADDRESS {
83 } SCSI_ADDRESS, *PSCSI_ADDRESS;
85 typedef struct _IO_SCSI_CAPABILITIES {
87 ULONG MaximumTransferLength;
88 ULONG MaximumPhysicalPages;
89 ULONG SupportedAsynchronousEvents;
91 BOOLEAN TaggedQueuing;
92 BOOLEAN AdapterScansDown;
93 BOOLEAN AdapterUsesPio;
94 } IO_SCSI_CAPABILITIES, *PIO_SCSI_CAPABILITIES;
100 #endif /* _NTDDSCSI_H_ */