|
ReactOS 0.4.17-dev-1196-gb6224c3
|
#include <wdm.h>#include <ntddk.h>#include <ntintsafe.h>#include <ntstrsafe.h>#include <stdio.h>#include <memory.h>#include <storport.h>#include <ntddscsi.h>#include <ntdddisk.h>#include <mountdev.h>#include <wdmguid.h>

Go to the source code of this file.
Classes | |
| struct | _DRIVER_INIT_DATA |
| struct | _DRIVER_OBJECT_EXTENSION |
| struct | _MINIPORT_DEVICE_EXTENSION |
| struct | _MINIPORT |
| struct | _UNIT_DATA |
| struct | _TIMER_ENTRY |
| struct | _PDO_IO_FLOW_CONTROL |
| struct | _FDO_IO_FLOW_CONTROL |
| struct | _STARVED_REQUEST_QUEUE |
| struct | _FDO_DEVICE_EXTENSION |
| struct | _PDO_DEVICE_EXTENSION |
| struct | _QUEUED_REQUEST_REFERENCE |
| struct | _LUN_DESCRIPTOR |
| struct | _REPORT_LUNS_DATA |
Macros | |
| #define | _STORPORT_ |
| #define | TAG_GLOBAL_DATA 'DGtS' |
| #define | TAG_INIT_DATA 'DItS' |
| #define | TAG_DEVICE_RELATION 'RDtS' |
| #define | TAG_DEVICE_ID 'DItS' |
| #define | TAG_DEVICE_TEXT 'XTtS' |
| #define | TAG_MINIPORT_DATA 'DMtS' |
| #define | TAG_ACCRESS_RANGE 'RAtS' |
| #define | TAG_RESOURCE_LIST 'LRtS' |
| #define | TAG_ADDRESS_MAPPING 'MAtS' |
| #define | TAG_INQUIRY_DATA 'QItS' |
| #define | TAG_REPORT_LUN_DATA 'LRtS' |
| #define | TAG_SENSE_DATA 'NStS' |
| #define | TAG_QUEUED_REQUEST 'RQtS' |
| #define | TAG_SRB_EXTENSION 'XStS' |
| #define | SET_FLAG(Flags, Bit) ((Flags) |= (Bit)) |
| #define | CLEAR_FLAG(Flags, Bit) ((Flags) &= ~(Bit)) |
| #define | TEST_FLAG(Flags, Bit) (((Flags) & (Bit)) != 0) |
Enumerations | |
| enum | DEVICE_STATE { dsStopped , dsStarted , dsPaused , dsRemoved , dsSurpriseRemoved , NotStarted = 0 , Started , StopPending , Stopped , RemovePending , SurpriseRemovePending , Deleted , dsStopped , dsStarted , dsPaused , dsRemoved , dsSurpriseRemoved , dsStopped , dsStarted , dsPaused , dsRemoved , dsSurpriseRemoved } |
| enum | EXTENSION_TYPE { InvalidExtension = 0 , DriverExtension , FdoExtension , PdoExtension } |
| typedef struct _DRIVER_INIT_DATA DRIVER_INIT_DATA |
| typedef struct _LUN_DESCRIPTOR LUN_DESCRIPTOR |
| typedef struct _DRIVER_INIT_DATA * PDRIVER_INIT_DATA |
| typedef struct _FDO_DEVICE_EXTENSION * PFDO_DEVICE_EXTENSION |
| typedef struct _FDO_IO_FLOW_CONTROL * PFDO_IO_FLOW_CONTROL |
| typedef struct _LUN_DESCRIPTOR * PLUN_DESCRIPTOR |
| typedef struct _PDO_DEVICE_EXTENSION * PPDO_DEVICE_EXTENSION |
| typedef struct _PDO_IO_FLOW_CONTROL * PPDO_IO_FLOW_CONTROL |
| typedef struct _REPORT_LUNS_DATA * PREPORT_LUNS_DATA |
| typedef struct _TIMER_ENTRY * PTIMER_ENTRY |
| typedef struct _UNIT_DATA * PUNIT_DATA |
| typedef struct _REPORT_LUNS_DATA REPORT_LUNS_DATA |
| typedef struct _TIMER_ENTRY TIMER_ENTRY |
| typedef struct _UNIT_DATA UNIT_DATA |
| Enumerator | |
|---|---|
| InvalidExtension | |
| DriverExtension | |
| FdoExtension | |
| PdoExtension | |
Definition at line 56 of file precomp.h.
| NTSTATUS AllocateAddressMapping | ( | PMAPPED_ADDRESS * | MappedAddressList, |
| STOR_PHYSICAL_ADDRESS | IoAddress, | ||
| PVOID | MappedAddress, | ||
| ULONG | NumberOfBytes, | ||
| ULONG | BusNumber | ||
| ) |
Definition at line 291 of file misc.c.
Referenced by StorPortGetDeviceBase().
| PCM_RESOURCE_LIST CopyResourceList | ( | POOL_TYPE | PoolType, |
| PCM_RESOURCE_LIST | Source | ||
| ) |
Definition at line 92 of file misc.c.
Referenced by PortFdoStartDevice().
| NTSTATUS NTAPI DriverEntry | ( | _In_ PDRIVER_OBJECT | DriverObject, |
| _In_ PUNICODE_STRING | RegistryPath | ||
| ) |
Definition at line 1771 of file compbatt.c.
| PPDO_DEVICE_EXTENSION FdoFindLun | ( | _In_ PFDO_DEVICE_EXTENSION | FdoExtension, |
| _In_ ULONG | Bus, | ||
| _In_ ULONG | Target, | ||
| _In_ ULONG | Lun | ||
| ) |
Definition at line 1078 of file fdo.c.
Referenced by StorPortDeviceBusy(), StorPortDeviceReady(), and StorPortSetDeviceQueueDepth().
Definition at line 5 of file utils.c.
| INTERFACE_TYPE GetBusInterface | ( | PDEVICE_OBJECT | DeviceObject | ) |
Definition at line 33 of file misc.c.
Referenced by PortFdoStartMiniport().
| PCSTR GetDeviceType | ( | _In_ PINQUIRYDATA | InquiryData | ) |
Definition at line 7 of file scsitypes.h.
| PCSTR GetGenericType | ( | _In_ PINQUIRYDATA | InquiryData | ) |
Definition at line 49 of file scsitypes.h.
| NTSTATUS GetResourceListInterrupt | ( | PFDO_DEVICE_EXTENSION | DeviceExtension, |
| PULONG | Vector, | ||
| PKIRQL | Irql, | ||
| KINTERRUPT_MODE * | InterruptMode, | ||
| PBOOLEAN | ShareVector, | ||
| PKAFFINITY | Affinity | ||
| ) |
Definition at line 242 of file misc.c.
Referenced by PortFdoConnectInterrupt().
Definition at line 294 of file miniport.c.
Referenced by PortFdoStartMiniport().
Definition at line 346 of file miniport.c.
Referenced by PortFdoStartMiniport().
Definition at line 362 of file miniport.c.
Referenced by PortFdoInterruptRoutine().
| NTSTATUS MiniportInitialize | ( | _In_ PMINIPORT | Miniport, |
| _In_ PFDO_DEVICE_EXTENSION | DeviceExtension, | ||
| _In_ PHW_INITIALIZATION_DATA | HwInitializationData | ||
| ) |
Definition at line 239 of file miniport.c.
| BOOLEAN MiniportStartIo | ( | _In_ PMINIPORT | Miniport, |
| _In_ PSCSI_REQUEST_BLOCK | Srb | ||
| ) |
Definition at line 378 of file miniport.c.
| VOID PortAllocateRequestReserve | ( | _In_ PFDO_DEVICE_EXTENSION | FdoExtension | ) |
Reserves the memory a single request needs, so IO can still be issued out of pool.
Definition at line 168 of file fdo.c.
Referenced by PortFdoStartDevice().
| VOID NTAPI PortCompletionDpc | ( | _In_ PKDPC | Dpc, |
| _In_ PVOID | Context, | ||
| _In_ PVOID | SystemArgument1, | ||
| _In_ PVOID | SystemArgument2 | ||
| ) |
Definition at line 894 of file srb.c.
Referenced by PortAddDevice().
| NTSTATUS PortCreatePdo | ( | _In_ PFDO_DEVICE_EXTENSION | FdoExtension, |
| _In_ ULONG | Bus, | ||
| _In_ ULONG | Target, | ||
| _In_ ULONG | Lun, | ||
| _Out_ PPDO_DEVICE_EXTENSION * | PdoExtension | ||
| ) |
Definition at line 21 of file pdo.c.
Referenced by PortFdoScanBus().
| NTSTATUS PortDeletePdo | ( | _In_ PPDO_DEVICE_EXTENSION | PdoExtension | ) |
Definition at line 108 of file pdo.c.
Referenced by PortFdoScanBus().
Definition at line 146 of file ioctl.c.
Referenced by PortDispatchDeviceControl().
Definition at line 1139 of file fdo.c.
Referenced by PortDispatchPnp().
Definition at line 1111 of file fdo.c.
Referenced by PortDispatchScsi().
| VOID PortFlushStarvedRequests | ( | _In_ PFDO_DEVICE_EXTENSION | FdoExtension | ) |
Fails every queued request, for when the adapter goes away.
Definition at line 153 of file fdo.c.
Referenced by PortFdoPnp().
| VOID PortFreeRequestReserve | ( | _In_ PFDO_DEVICE_EXTENSION | FdoExtension | ) |
Releases the reserve. No request may be using it anymore.
Definition at line 205 of file fdo.c.
Referenced by PortFdoPnp().
| PHW_INITIALIZATION_DATA PortGetDriverInitData | ( | PDRIVER_OBJECT_EXTENSION | DriverExtension, |
| INTERFACE_TYPE | InterfaceType | ||
| ) |
Definition at line 81 of file storport.c.
Referenced by PortFdoStartMiniport(), and StorPortGetUncachedExtension().
| NTSTATUS PortInitializeStarvedRequestQueue | ( | _In_ PSTARVED_REQUEST_QUEUE | Queue | ) |
Definition at line 105 of file fdo.c.
Referenced by PortAddDevice().
Definition at line 378 of file ioctl.c.
Referenced by PortDispatchDeviceControl().
| NTSTATUS PortPdoIssueRequest | ( | _In_ PPDO_DEVICE_EXTENSION | PdoExtension, |
| _In_ PQUEUED_REQUEST_REFERENCE | RequestReference | ||
| ) |
Definition at line 290 of file srb.c.
Referenced by PortPdoScsi(), and PortScheduleComingRequestsOnCompletion().
Definition at line 681 of file pdo.c.
Referenced by PortDispatchPnp().
| BOOLEAN PortPdoScheduleRequestFlowControlled | ( | _In_ PPDO_DEVICE_EXTENSION | PdoExtension, |
| _In_ PFDO_DEVICE_EXTENSION | FdoExtension, | ||
| _In_ PQUEUED_REQUEST_REFERENCE | RequestReference | ||
| ) |
Schedules an outstanding request and return a boolean value to indicate if the request can be immediately issued.
| PdoExtension | PDO device extension. |
| FdoExtension | FDO device extension. |
| RequestReference | RequestReference must be allocated beforehand. |
Definition at line 397 of file srb.c.
Referenced by PortPdoScsi().
Definition at line 516 of file srb.c.
Referenced by PortDispatchScsi(), and PortRetryStarvedRequest().
| VOID PortQueueStarvedRequest | ( | _In_ PFDO_DEVICE_EXTENSION | FdoExtension, |
| _In_ PIRP | Irp | ||
| ) |
Queues a request that could not allocate its private contexts.
Definition at line 124 of file fdo.c.
Referenced by PortPdoStarveRequest().
| VOID PortRetryStarvedRequest | ( | _In_ PFDO_DEVICE_EXTENSION | FdoExtension | ) |
Retries one queued request, so each completion lets exactly one through.
Definition at line 135 of file fdo.c.
Referenced by PortCompleteRequest().
| NTSTATUS QueryBusInterface | ( | PDEVICE_OBJECT | DeviceObject, |
| PGUID | Guid, | ||
| USHORT | Size, | ||
| USHORT | Version, | ||
| PBUS_INTERFACE_STANDARD | Interface, | ||
| PVOID | InterfaceSpecificData | ||
| ) |
Definition at line 122 of file misc.c.
Referenced by PortFdoStartDevice().
| VOID NTAPI SimpleTimerCallbackDpcRoutine | ( | PKDPC | Dpc, |
| PVOID | DeferredContext, | ||
| PVOID | SystemArgument1, | ||
| PVOID | SystemArgument2 | ||
| ) |
| VOID StorpSrbFreeRequestReference | ( | _In_ PSCSI_REQUEST_BLOCK | Srb | ) |
Frees an SRB's Request Reference and restore Srb->OriginalRequest field to IRP. This function does not check if Srb->OriginalRequest is actually an request reference, and you must determine it by other means.
| Srb |
Definition at line 106 of file srb.c.
Referenced by PortCompleteRequest(), and PortPdoSrbAllocatePrivateContexts().
| VOID NTAPI TimerCallbackDpcRoutine | ( | PKDPC | Dpc, |
| PVOID | DeferredContext, | ||
| PVOID | SystemArgument1, | ||
| PVOID | SystemArgument2 | ||
| ) |
Definition at line 348 of file misc.c.
Referenced by StorPortExtendedFunction().
| BOOLEAN TranslateResourceListAddress | ( | PFDO_DEVICE_EXTENSION | DeviceExtension, |
| INTERFACE_TYPE | BusType, | ||
| ULONG | SystemIoBusNumber, | ||
| STOR_PHYSICAL_ADDRESS | IoAddress, | ||
| ULONG | NumberOfBytes, | ||
| BOOLEAN | InIoSpace, | ||
| PPHYSICAL_ADDRESS | TranslatedAddress | ||
| ) |
Definition at line 173 of file misc.c.
Referenced by StorPortGetDeviceBase().