|
ReactOS 0.4.16-dev-1946-g52006dd
|
#include <wdm.h>#include <usbdi.h>#include <usbbusif.h>#include <usbdlib.h>#include <classpnp.h>#include <pshpack1.h>#include <poppack.h>

Go to the source code of this file.
Classes | |
| struct | __COMMON_DEVICE_EXTENSION__ |
| struct | FDO_DEVICE_EXTENSION |
| struct | PDO_DEVICE_EXTENSION |
| struct | CBW |
| struct | CSW |
| struct | UFI_INQUIRY_CMD |
| struct | UFI_INQUIRY_RESPONSE |
| struct | UFI_READ_WRITE_CMD |
| struct | UFI_CAPACITY_CMD |
| struct | UFI_CAPACITY_RESPONSE |
| struct | UFI_SENSE_CMD |
| struct | UFI_MODE_PARAMETER_HEADER |
| struct | UFI_TIMER_PROTECT_PAGE |
| struct | UFI_READ_FORMAT_CAPACITY |
| struct | UFI_CAPACITY_FORMAT_HEADER |
| struct | UFI_CAPACITY_DESCRIPTOR |
| struct | UFI_TEST_UNIT_CMD |
| struct | UFI_UNKNOWN_CMD |
| struct | IRP_CONTEXT |
| struct | _ERRORHANDLER_WORKITEM_DATA |
Macros | |
| #define | USB_STOR_TAG 'sbsu' |
| #define | USB_MAXCHILDREN (16) |
| #define | HTONS(n) (((((unsigned short)(n) & 0xFF)) << 8) | (((unsigned short)(n) & 0xFF00) >> 8)) |
| #define | NTOHS(n) (((((unsigned short)(n) & 0xFF)) << 8) | (((unsigned short)(n) & 0xFF00) >> 8)) |
| #define | HTONL(n) |
| #define | NTOHL(n) |
| #define | USB_RECOVERABLE_ERRORS |
| #define | USB_BULK_GET_MAX_LUN 0xFE |
| #define | USB_BULK_RESET_DEVICE 0xFF |
| #define | CBW_SIGNATURE 0x43425355 |
| #define | CSW_SIGNATURE 0x53425355 |
| #define | MAX_LUN 0xF |
| #define | UFI_INQUIRY_CMD_LEN 0x6 |
| #define | UFI_READ_WRITE_CMD_LEN (0xA) |
| #define | UFI_CAPACITY_CMD_LEN 0xA |
| #define | UFI_READ_CAPACITY_CMD_LEN 0xA |
| #define | UFI_SENSE_CMD_LEN (6) |
| #define | UFI_READ_FORMAT_CAPACITY_CMD_LEN (10) |
| #define | UNFORMATTED_MEDIA_CODE_DESCRIPTORY_TYPE (1) |
| #define | FORMAT_MEDIA_CODE_DESCRIPTOR_TYPE (2) |
| #define | CARTRIDGE_MEDIA_CODE_DESCRIPTOR_TYPE (3) |
| #define | UFI_TEST_UNIT_CMD_LEN (6) |
| #define USB_RECOVERABLE_ERRORS |
| typedef struct FDO_DEVICE_EXTENSION * PFDO_DEVICE_EXTENSION |
| typedef struct IRP_CONTEXT * PIRP_CONTEXT |
| typedef struct PDO_DEVICE_EXTENSION * PPDO_DEVICE_EXTENSION |
| typedef struct UFI_CAPACITY_CMD * PUFI_CAPACITY_CMD |
| typedef struct UFI_INQUIRY_CMD * PUFI_INQUIRY_CMD |
| typedef struct UFI_INQUIRY_RESPONSE * PUFI_INQUIRY_RESPONSE |
| typedef struct UFI_SENSE_CMD * PUFI_SENSE_CMD |
| typedef struct UFI_TEST_UNIT_CMD * PUFI_TEST_UNIT_CMD |
| typedef struct UFI_UNKNOWN_CMD * PUFI_UNKNOWN_CMD |
Definition at line 29 of file misc.c.
| C_ASSERT | ( | sizeof(UFI_CAPACITY_CMD) | = =12 | ) |
| C_ASSERT | ( | sizeof(UFI_CAPACITY_FORMAT_HEADER) | = =4 | ) |
| C_ASSERT | ( | sizeof(UFI_CAPACITY_RESPONSE) | = =8 | ) |
| C_ASSERT | ( | sizeof(UFI_INQUIRY_CMD) | = =12 | ) |
| C_ASSERT | ( | sizeof(UFI_INQUIRY_RESPONSE) | = =36 | ) |
| C_ASSERT | ( | sizeof(UFI_MODE_PARAMETER_HEADER) | = =8 | ) |
| C_ASSERT | ( | sizeof(UFI_READ_FORMAT_CAPACITY) | = =12 | ) |
| C_ASSERT | ( | sizeof(UFI_READ_WRITE_CMD) | = =12 | ) |
| C_ASSERT | ( | sizeof(UFI_SENSE_CMD) | = =12 | ) |
| C_ASSERT | ( | sizeof(UFI_TEST_UNIT_CMD) | = =12 | ) |
| C_ASSERT | ( | sizeof(UFI_TIMER_PROTECT_PAGE) | = =8 | ) |
Definition at line 248 of file error.c.
Referenced by USBSTOR_QueueWorkItem().
Definition at line 28 of file queue.c.
Referenced by USBSTOR_HandleInternalDeviceControl(), USBSTOR_QueueAddIrp(), USBSTOR_QueueNextRequest(), and USBSTOR_QueueRelease().
| NTSTATUS USBSTOR_CreatePDO | ( | IN PDEVICE_OBJECT | DeviceObject, |
| IN UCHAR | LUN | ||
| ) |
Definition at line 864 of file pdo.c.
Referenced by USBSTOR_FdoHandleStartDevice().
| NTSTATUS NTAPI USBSTOR_CSWCompletionRoutine | ( | PDEVICE_OBJECT | DeviceObject, |
| PIRP | Irp, | ||
| PVOID | Ctx | ||
| ) |
Definition at line 129 of file scsi.c.
Definition at line 276 of file fdo.c.
Referenced by USBSTOR_DispatchPnp().
| NTSTATUS NTAPI USBSTOR_GetBusInterface | ( | IN PDEVICE_OBJECT | DeviceObject, |
| OUT PUSB_BUS_INTERFACE_USBDI_V2 | BusInterface | ||
| ) |
Definition at line 33 of file misc.c.
Referenced by USBSTOR_FdoHandleStartDevice().
| NTSTATUS USBSTOR_GetDescriptors | ( | IN PDEVICE_OBJECT | DeviceObject | ) |
Definition at line 75 of file descriptor.c.
Referenced by USBSTOR_FdoHandleStartDevice().
| NTSTATUS USBSTOR_GetEndpointStatus | ( | IN PDEVICE_OBJECT | DeviceObject, |
| IN UCHAR | bEndpointAddress, | ||
| OUT PUSHORT | Value | ||
| ) |
Definition at line 18 of file error.c.
| NTSTATUS USBSTOR_GetMaxLUN | ( | IN PDEVICE_OBJECT | DeviceObject, |
| IN PFDO_DEVICE_EXTENSION | DeviceExtension | ||
| ) |
Definition at line 173 of file misc.c.
Referenced by USBSTOR_FdoHandleStartDevice().
| NTSTATUS USBSTOR_GetPipeHandles | ( | IN PFDO_DEVICE_EXTENSION | DeviceExtension | ) |
Definition at line 319 of file descriptor.c.
Referenced by USBSTOR_FdoHandleStartDevice().
| NTSTATUS USBSTOR_HandleDeviceControl | ( | IN PDEVICE_OBJECT | DeviceObject, |
| IN PIRP | Irp | ||
| ) |
Definition at line 416 of file disk.c.
Referenced by USBSTOR_DispatchDeviceControl().
| NTSTATUS USBSTOR_HandleExecuteSCSI | ( | IN PDEVICE_OBJECT | DeviceObject, |
| IN PIRP | Irp, | ||
| IN ULONG | RetryCount | ||
| ) |
Definition at line 1306 of file scsi.c.
| NTSTATUS USBSTOR_HandleInternalDeviceControl | ( | IN PDEVICE_OBJECT | DeviceObject, |
| IN PIRP | Irp | ||
| ) |
Definition at line 84 of file disk.c.
Referenced by USBSTOR_DispatchScsi().
Definition at line 409 of file misc.c.
Referenced by USBSTOR_SendFormatCapacityIrp().
Definition at line 534 of file pdo.c.
Referenced by USBSTOR_DispatchPnp().
| BOOLEAN USBSTOR_QueueAddIrp | ( | IN PDEVICE_OBJECT | DeviceObject, |
| IN PIRP | Irp | ||
| ) |
Definition at line 75 of file queue.c.
Referenced by USBSTOR_HandleInternalDeviceControl().
| VOID USBSTOR_QueueInitialize | ( | PFDO_DEVICE_EXTENSION | FDODeviceExtension | ) |
Definition at line 17 of file queue.c.
Referenced by USBSTOR_FdoHandleStartDevice().
| VOID USBSTOR_QueueNextRequest | ( | IN PDEVICE_OBJECT | DeviceObject | ) |
Definition at line 220 of file queue.c.
Referenced by USBSTOR_Cancel(), USBSTOR_CancelIo(), USBSTOR_CSWCompletionRoutine(), USBSTOR_HandleExecuteSCSI(), USBSTOR_HandleTransferError(), USBSTOR_ResetDeviceWorkItemRoutine(), USBSTOR_SendModeSense(), and USBSTOR_StartIo().
| VOID USBSTOR_QueueRelease | ( | IN PDEVICE_OBJECT | DeviceObject | ) |
Definition at line 262 of file queue.c.
Referenced by USBSTOR_HandleInternalDeviceControl().
| VOID USBSTOR_QueueTerminateRequest | ( | IN PDEVICE_OBJECT | DeviceObject, |
| IN PIRP | Irp | ||
| ) |
Definition at line 186 of file queue.c.
Referenced by USBSTOR_Cancel(), USBSTOR_CancelIo(), USBSTOR_CBWCompletionRoutine(), USBSTOR_CSWCompletionRoutine(), USBSTOR_DataCompletionRoutine(), USBSTOR_HandleExecuteSCSI(), USBSTOR_HandleTransferError(), USBSTOR_SendModeSense(), and USBSTOR_StartIo().
| VOID USBSTOR_QueueWaitForPendingRequests | ( | IN PDEVICE_OBJECT | DeviceObject | ) |
Definition at line 171 of file queue.c.
Referenced by USBSTOR_HandleInternalDeviceControl().
| NTSTATUS USBSTOR_ResetDevice | ( | IN PDEVICE_OBJECT | DeviceObject, |
| IN PFDO_DEVICE_EXTENSION | DeviceExtension | ||
| ) |
Definition at line 219 of file misc.c.
Referenced by USBSTOR_GetMaxLUN(), USBSTOR_HandleTransferError(), USBSTOR_ResetDeviceWorkItemRoutine(), and USBSTOR_TimerWorkerRoutine().
| NTSTATUS USBSTOR_ResetPipeWithHandle | ( | IN PDEVICE_OBJECT | DeviceObject, |
| IN USBD_PIPE_HANDLE | PipeHandle | ||
| ) |
Definition at line 46 of file error.c.
Referenced by USBSTOR_HandleTransferError(), USBSTOR_ResetDeviceWorkItemRoutine(), USBSTOR_ResetHandlerWorkItemRoutine(), USBSTOR_ResetPipeWorkItemRoutine(), and USBSTOR_TimerWorkerRoutine().
| NTSTATUS USBSTOR_SelectConfigurationAndInterface | ( | IN PDEVICE_OBJECT | DeviceObject, |
| IN PFDO_DEVICE_EXTENSION | DeviceExtension | ||
| ) |
Definition at line 234 of file descriptor.c.
Referenced by USBSTOR_FdoHandleStartDevice().
| NTSTATUS USBSTOR_SendCBW | ( | PIRP_CONTEXT | Context, |
| PIRP | Irp | ||
| ) |
Definition at line 591 of file scsi.c.
Referenced by USBSTOR_SendModeSense(), and USBSTOR_SendRequest().
| VOID USBSTOR_SendCSW | ( | PIRP_CONTEXT | Context, |
| PIRP | Irp | ||
| ) |
Definition at line 379 of file scsi.c.
Referenced by USBSTOR_DataCompletionRoutine(), USBSTOR_ResetHandlerWorkItemRoutine(), and USBSTOR_SendModeSense().
| VOID NTAPI USBSTOR_StartIo | ( | PDEVICE_OBJECT | DeviceObject, |
| PIRP | Irp | ||
| ) |
Definition at line 300 of file queue.c.
Referenced by DriverEntry().
| NTSTATUS NTAPI USBSTOR_SyncForwardIrpCompletionRoutine | ( | PDEVICE_OBJECT | DeviceObject, |
| PIRP | Irp, | ||
| PVOID | Context | ||
| ) |
Definition at line 22 of file misc.c.
Referenced by USBCCGP_SyncUrbRequest(), USBSTOR_SyncForwardIrp(), and USBSTOR_SyncUrbRequest().
| NTSTATUS USBSTOR_SyncUrbRequest | ( | IN PDEVICE_OBJECT | DeviceObject, |
| OUT PURB | UrbRequest | ||
| ) |
Definition at line 83 of file misc.c.
Referenced by USBSTOR_ClassRequest(), USBSTOR_GetDescriptor(), USBSTOR_GetEndpointStatus(), USBSTOR_ResetPipeWithHandle(), and USBSTOR_SelectConfigurationAndInterface().
| VOID NTAPI USBSTOR_TimerRoutine | ( | PDEVICE_OBJECT | DeviceObject, |
| PVOID | Context | ||
| ) |
Definition at line 205 of file error.c.
Referenced by USBSTOR_AddDevice().