SCSI class drivers of mass-storage devices are required to handle a superset of the I/O control codes for IRP_MJ_DEVICE_CONTROL requests that other drivers of the same types of devices handle. See the preceding chapters about the I/O requests sent to disk, CD-ROM, and tape drivers for information about the basic requirements for all drivers of these types of devices.
This section summarizes the I/O control codes that SCSI class drivers of mass-storage devices also handle, as appropriate to the device.
The IOCTL_STORAGE_XXX control codes replace the previous IOCTL_DeviceType_XXX control codes, where DeviceType was DISK, TAPE, or CDROM. For example, IOCTL_STORAGE_RESERVE replaces IOCTL_DISK_RESERVE, IOCTL_TAPE_RESERVE, and IOCTL_CDROM_RESERVE. The new storage control codes have identical values for function code, transfer method, and required access as the previous disk, tape, and CD-ROM codes. The only difference is the device type. Drivers that pass unrecognized IOCTLs to the SCSI class driver do not need to make any changes for these new IOCTLs.
Claims a device on a SCSI bus with multiple initiators for the exclusive use of the caller.
None
None
The Information field is set to zero. The Status field is set to STATUS_SUCCESS or possibly to STATUS_INVALID_DEVICE_REQUEST, STATUS_DEVICE_NOT_CONNECTED, or STATUS_IO_TIMEOUT.
Releases a previously reserved device.
None
None
The Information field is set to zero. The Status field is set to STATUS_SUCCESS or possibly to STATUS_INVALID_DEVICE_REQUEST.
Causes media to be loaded in a drive.
None
None
The Information field is set to zero. The Status field is set to STATUS_SUCCESS or possibly to STATUS_INVALID_DEVICE_REQUEST, STATUS_NO_MEDIA_IN_DEVICE, STATUS_BUFFER_TOO_SMALL, or STATUS_DEVICE_NOT_CONNECTED.
If the driver can prevent the media from being removed while the drive is in use, it disables or enables the mechanism that ejects media.
A driver for such a removable media which can support this IOCTL must do the following:
The buffer at Irp->AssociatedIrp.SystemBuffer contains a Boolean value, with TRUE indicating that the driver should lock the media in the drive.
None
The Information field is set to zero. The Status field is set to STATUS_SUCCESS or possibly to STATUS_INVALID_DEVICE_REQUEST, STATUS_NO_MEDIA_IN_DEVICE, or STATUS_DEVICE_NOT_CONNECTED.
If the device supports it, ejects the media.
None
None
The Information field is set to zero. The Status field is set to STATUS_SUCCESS or possibly to STATUS_NO_MEDIA_IN_DEVICE or STATUS_INVALID_DEVICE_REQUEST.