- Add a few more IOCTLs needed for storage stack

- Add a couple of structs from DDK
- Change ScsiPort prototype to match DDK

svn path=/trunk/; revision=26169
This commit is contained in:
Aleksey Bragin 2007-03-25 18:18:51 +00:00
parent e0fff4a12f
commit 87967349f8
3 changed files with 34 additions and 1 deletions

View file

@ -125,9 +125,24 @@ extern "C" {
#define IOCTL_DISK_REQUEST_STRUCTURE \
CTL_CODE(IOCTL_DISK_BASE, 0x000f, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_DISK_MEDIA_REMOVAL \
CTL_CODE(IOCTL_DISK_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_DISK_EJECT_MEDIA \
CTL_CODE(IOCTL_DISK_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_DISK_LOAD_MEDIA \
CTL_CODE(IOCTL_DISK_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_DISK_RESERVE \
CTL_CODE(IOCTL_DISK_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_DISK_RELEASE \
CTL_CODE(IOCTL_DISK_BASE, 0x0205, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_DISK_FIND_NEW_DEVICES \
CTL_CODE(IOCTL_DISK_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_DISK_SET_CACHE_INFORMATION \
CTL_CODE(IOCTL_DISK_BASE, 0x0036, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
@ -565,6 +580,15 @@ typedef struct _SENDCMDOUTPARAMS {
#define RETURN_SMART_STATUS 0xDA
#define ENABLE_DISABLE_AUTO_OFFLINE 0xDB
typedef struct _MAPPED_ADDRESS {
struct _MAPPED_ADDRESS *NextMappedAddress;
PVOID MappedAddress;
ULONG NumberOfBytes;
LARGE_INTEGER IoAddress;
ULONG BusNumber;
} MAPPED_ADDRESS, *PMAPPED_ADDRESS;
#ifdef __cplusplus
}
#endif

View file

@ -324,6 +324,10 @@ typedef struct _STORAGE_PROPERTY_QUERY {
UCHAR AdditionalParameters[1];
} STORAGE_PROPERTY_QUERY, *PSTORAGE_PROPERTY_QUERY;
typedef struct _PREVENT_MEDIA_REMOVAL {
BOOLEAN PreventMediaRemoval;
} PREVENT_MEDIA_REMOVAL, *PPREVENT_MEDIA_REMOVAL;
#ifdef __cplusplus
}
#endif

View file

@ -165,6 +165,11 @@ typedef PHYSICAL_ADDRESS SCSI_PHYSICAL_ADDRESS, *PSCSI_PHYSICAL_ADDRESS;
#define SRB_FLAGS_PORT_DRIVER_RESERVED 0x0F000000
#define SRB_FLAGS_CLASS_DRIVER_RESERVED 0xF0000000
/* Asynchronous events */
#define SRBEV_BUS_RESET 0x0001
#define SRBEV_SCSI_ASYNC_NOTIFICATION 0x0002
typedef struct _SCSI_REQUEST_BLOCK {
USHORT Length;
UCHAR Function;
@ -496,7 +501,7 @@ DDKAPI
ScsiPortIoMapTransfer(
IN PVOID HwDeviceExtension,
IN PSCSI_REQUEST_BLOCK Srb,
IN ULONG LogicalAddress,
IN PVOID LogicalAddress,
IN ULONG Length);
SCSIPORTAPI