ReactOS 0.4.15-dev-8135-g1bc6c90
srb.h
Go to the documentation of this file.
1/*
2 Module Name:
3
4 srb.h
5
6 Abstract:
7
8 This file defines the interface between SCSI mini-port drivers and the
9 SCSI port driver. It is also used by SCSI class drivers to talk to the
10 SCSI port driver.
11 w2k-related definitions are added by Alter from w2k/xp DDK
12 */
13
14#ifndef _NTSRB_
15#define _NTSRB_
16
17#pragma pack(push, 8)
18
19// Define SCSI maximum configuration parameters.
20
21#define SCSI_MAXIMUM_LOGICAL_UNITS 8
22#define SCSI_MAXIMUM_TARGETS_PER_BUS 128
23#define SCSI_MAXIMUM_LUNS_PER_TARGET 255
24#define SCSI_MAXIMUM_BUSES 8
25#define SCSI_MINIMUM_PHYSICAL_BREAKS 16
26#define SCSI_MAXIMUM_PHYSICAL_BREAKS 255
27
28// This constant is for backward compatibility.
29// This use to be the maximum number of targets supported.
30
31#define SCSI_MAXIMUM_TARGETS 8
32// begin_ntminitape
33#define MAXIMUM_CDB_SIZE 12
34// end_ntminitape
35
36#ifndef USER_MODE
37
39
40typedef struct _ACCESS_RANGE {
45
46#ifdef __REACTOS__
47#pragma pack(push, 4)
48#endif
49
50//
51// Configuration information structure. Contains the information necessary
52// to initialize the adapter. NOTE: This structure's must be a multiple of
53// quadwords.
54//
55
57 ULONG Length; // Length of port configuation information strucuture.
58 ULONG SystemIoBusNumber; // IO bus number (0 for machines that have only 1 IO bus
60 ULONG BusInterruptLevel; // Interrupt request level for device
61 // Bus interrupt vector used with hardware buses which use as vector as
62 // well as level, such as internal buses.
64 KINTERRUPT_MODE InterruptMode; // Interrupt mode (level-sensitive or edge-triggered)
65
66 ULONG MaximumTransferLength; // Max bytes that can be transferred in a single SRB
67 ULONG NumberOfPhysicalBreaks; // Number of contiguous blocks of physical memory
68 ULONG DmaChannel; // DMA channel for devices using system DMA
72 ULONG AlignmentMask; // Alignment masked for the adapter for data transfers.
73 ULONG NumberOfAccessRanges; // Number of allocated access range elements.
74 ACCESS_RANGE (*AccessRanges)[]; // Pointer to array of access range elements.
76 UCHAR NumberOfBuses; // Number of SCSI buses attached to the adapter.
77 CCHAR InitiatorBusId[8]; // SCSI bus ID for adapter
78 BOOLEAN ScatterGather; // Indicates that the adapter does scatter/gather
79 BOOLEAN Master; // Indicates that the adapter is a bus master
80 BOOLEAN CachesData; // Host caches data or state.
81 BOOLEAN AdapterScansDown; // Host adapter scans down for bios devices.
82 BOOLEAN AtdiskPrimaryClaimed; // Primary at disk address (0x1F0) claimed.
83 BOOLEAN AtdiskSecondaryClaimed; // Secondary at disk address (0x170) claimed.
84 BOOLEAN Dma32BitAddresses; // The master uses 32-bit DMA addresses.
85 BOOLEAN DemandMode; // Use Demand Mode DMA rather than Single Request.
86 BOOLEAN MapBuffers; // Data buffers must be mapped into virtual address space.
87 BOOLEAN NeedPhysicalAddresses; // We need to tranlate virtual to physical addresses.
88 BOOLEAN TaggedQueuing; // Supports tagged queuing
89 BOOLEAN AutoRequestSense; // Supports auto request sense.
90 BOOLEAN MultipleRequestPerLu; // Supports multiple requests per logical unit.
91 BOOLEAN ReceiveEvent; // Support receive event function.
92 BOOLEAN RealModeInitialized; // Indicates the real-mode driver has initialized the card.
93
94 BOOLEAN BufferAccessScsiPortControlled; // Indicate that the miniport will not touch
95 // the data buffers directly.
96 UCHAR MaximumNumberOfTargets; // Indicator for wide scsi.
97 UCHAR ReservedUchars[2]; // Ensure quadword alignment.
98 ULONG SlotNumber; // Adapter slot number
99 ULONG BusInterruptLevel2; // Interrupt information for a second IRQ.
102 ULONG DmaChannel2; // DMA information for a second channel.
106
108
110 // Fields added to allow for the miniport
111 // to update these sizes based on requirements
112 // for large transfers ( > 64K);
117
119 // Used to determine whether the system and/or the miniport support
120 // 64-bit physical addresses. See SCSI_DMA64_* flags below.
122 // Indicates that the miniport can accept a SRB_FUNCTION_RESET_DEVICE
123 // to clear all requests to a particular LUN.
125 // Indicates that the miniport can support more than 8 logical units per
126 // target (maximum LUN number is one less than this field).
128 // Supports WMI?
131
132#ifdef __REACTOS__
133#pragma pack(pop)
134#endif
135
141
142//
143// Version control for ConfigInfo structure.
144//
145
146#define CONFIG_INFO_VERSION_2 sizeof(PORT_CONFIGURATION_INFORMATION)
147
148//
149// Flags for controlling 64-bit DMA use (PORT_CONFIGURATION_INFORMATION field
150// Dma64BitAddresses)
151//
152
153//
154// Set by scsiport on entering HwFindAdapter if the system can support 64-bit
155// physical addresses. The miniport can use this information before calling
156// ScsiPortGetUncachedExtension to modify the DeviceExtensionSize,
157// SpecificLuExtensionSize & SrbExtensionSize fields to account for the extra
158// size of the scatter gather list.
159//
160
161#define SCSI_DMA64_SYSTEM_SUPPORTED 0x80
162
163//
164// Set by the miniport before calling ScsiPortGetUncachedExtension to indicate
165// that scsiport should provide it with 64-bit physical addresses. If the
166// system does not support 64-bit PA's then this bit will be ignored.
167//
168
169#define SCSI_DMA64_MINIPORT_SUPPORTED 0x01
170
171
172//
173// Command type (and parameter) definition(s) for AdapterControl requests.
174//
175
185
186//
187// Adapter control status values
188//
189
194
195//
196// Parameters for Adapter Control Functions:
197//
198
199//
200// ScsiQuerySupportedControlTypes:
201//
202
203#ifdef _MSC_VER
204#pragma warning(disable:4200)
205#endif
207
208 //
209 // Specifies the number of entries in the adapter control type list.
210 //
211
213
214 //
215 // The miniport will set TRUE for each control type it supports.
216 // The number of entries in this array is defined by MaxAdapterControlType
217 // - the miniport must not attempt to set any AC types beyond the maximum
218 // value specified.
219 //
220
222
224#ifdef _MSC_VER
225#pragma warning(disable:4200)
226#endif
227
228//
229// Uninitialized flag value.
230//
231
232#define SP_UNINITIALIZED_VALUE ((ULONG) ~0)
233#define SP_UNTAGGED ((UCHAR) ~0)
234
235//
236// Set asynchronous events.
237//
238
239#define SRBEV_BUS_RESET 0x0001
240#define SRBEV_SCSI_ASYNC_NOTIFICATION 0x0002
241
242// begin_ntminitape
243
244//
245// SCSI I/O Request Block
246//
247
248typedef struct _SCSI_REQUEST_BLOCK {
249 USHORT Length; // offset 0
250 UCHAR Function; // offset 2
251 UCHAR SrbStatus; // offset 3
252 UCHAR ScsiStatus; // offset 4
253 UCHAR PathId; // offset 5
254 UCHAR TargetId; // offset 6
255 UCHAR Lun; // offset 7
256 UCHAR QueueTag; // offset 8
257 UCHAR QueueAction; // offset 9
258 UCHAR CdbLength; // offset a
260 ULONG SrbFlags; // offset c
262 ULONG TimeOutValue; // offset 14
263 PVOID DataBuffer; // offset 18
264 PVOID SenseInfoBuffer; // offset 1c
265 struct _SCSI_REQUEST_BLOCK *NextSrb; // offset 20
266 PVOID OriginalRequest; // offset 24
267 PVOID SrbExtension; // offset 28
268 union {
269 ULONG InternalStatus; // offset 2c
270 ULONG QueueSortKey; // offset 2c
271 };
272
273#if defined(_WIN64)
274 // Force PVOID alignment of Cdb
276
277#endif
278
279 UCHAR Cdb[16]; // offset 30
281
282#define SCSI_REQUEST_BLOCK_SIZE sizeof(SCSI_REQUEST_BLOCK)
283
284//
285// SCSI I/O Request Block for WMI Requests
286//
287
290 UCHAR Function; // SRB_FUNCTION_WMI
293 UCHAR PathId; // If SRB_WMI_FLAGS_ADAPTER_REQUEST is set in
294 UCHAR TargetId; // WMIFlags then PathId, TargetId and Lun are
295 UCHAR Lun; // reserved fields.
310
311//
312// SRB Functions
313//
314
315#define SRB_FUNCTION_EXECUTE_SCSI 0x00
316#define SRB_FUNCTION_CLAIM_DEVICE 0x01
317#define SRB_FUNCTION_IO_CONTROL 0x02
318#define SRB_FUNCTION_RECEIVE_EVENT 0x03
319#define SRB_FUNCTION_RELEASE_QUEUE 0x04
320#define SRB_FUNCTION_ATTACH_DEVICE 0x05
321#define SRB_FUNCTION_RELEASE_DEVICE 0x06
322#define SRB_FUNCTION_SHUTDOWN 0x07
323#define SRB_FUNCTION_FLUSH 0x08
324#define SRB_FUNCTION_ABORT_COMMAND 0x10
325#define SRB_FUNCTION_RELEASE_RECOVERY 0x11
326#define SRB_FUNCTION_RESET_BUS 0x12
327#define SRB_FUNCTION_RESET_DEVICE 0x13
328#define SRB_FUNCTION_TERMINATE_IO 0x14
329#define SRB_FUNCTION_FLUSH_QUEUE 0x15
330#define SRB_FUNCTION_REMOVE_DEVICE 0x16
331#define SRB_FUNCTION_WMI 0x17
332#define SRB_FUNCTION_LOCK_QUEUE 0x18
333#define SRB_FUNCTION_UNLOCK_QUEUE 0x19
334#define SRB_FUNCTION_RESET_LOGICAL_UNIT 0x20
335
336//
337// SRB Status
338//
339
340#define SRB_STATUS_PENDING 0x00
341#define SRB_STATUS_SUCCESS 0x01
342#define SRB_STATUS_ABORTED 0x02
343#define SRB_STATUS_ABORT_FAILED 0x03
344#define SRB_STATUS_ERROR 0x04
345#define SRB_STATUS_BUSY 0x05
346#define SRB_STATUS_INVALID_REQUEST 0x06
347#define SRB_STATUS_INVALID_PATH_ID 0x07
348#define SRB_STATUS_NO_DEVICE 0x08
349#define SRB_STATUS_TIMEOUT 0x09
350#define SRB_STATUS_SELECTION_TIMEOUT 0x0A
351#define SRB_STATUS_COMMAND_TIMEOUT 0x0B
352#define SRB_STATUS_MESSAGE_REJECTED 0x0D
353#define SRB_STATUS_BUS_RESET 0x0E
354#define SRB_STATUS_PARITY_ERROR 0x0F
355#define SRB_STATUS_REQUEST_SENSE_FAILED 0x10
356#define SRB_STATUS_NO_HBA 0x11
357#define SRB_STATUS_DATA_OVERRUN 0x12
358#define SRB_STATUS_UNEXPECTED_BUS_FREE 0x13
359#define SRB_STATUS_PHASE_SEQUENCE_FAILURE 0x14
360#define SRB_STATUS_BAD_SRB_BLOCK_LENGTH 0x15
361#define SRB_STATUS_REQUEST_FLUSHED 0x16
362#define SRB_STATUS_INVALID_LUN 0x20
363#define SRB_STATUS_INVALID_TARGET_ID 0x21
364#define SRB_STATUS_BAD_FUNCTION 0x22
365#define SRB_STATUS_ERROR_RECOVERY 0x23
366#define SRB_STATUS_NOT_POWERED 0x24
367
368//
369// This value is used by the port driver to indicate that a non-scsi-related
370// error occured. Miniports must never return this status.
371//
372
373#define SRB_STATUS_INTERNAL_ERROR 0x30
374
375//
376// Srb status values 0x38 through 0x3f are reserved for internal port driver
377// use.
378//
379
380
381
382//
383// SRB Status Masks
384//
385
386#define SRB_STATUS_QUEUE_FROZEN 0x40
387#define SRB_STATUS_AUTOSENSE_VALID 0x80
388
389#define SRB_STATUS(Status) (Status & ~(SRB_STATUS_AUTOSENSE_VALID | SRB_STATUS_QUEUE_FROZEN))
390
391//
392// SRB Flag Bits
393//
394
395#define SRB_FLAGS_QUEUE_ACTION_ENABLE 0x00000002
396#define SRB_FLAGS_DISABLE_DISCONNECT 0x00000004
397#define SRB_FLAGS_DISABLE_SYNCH_TRANSFER 0x00000008
398#define SRB_FLAGS_BYPASS_FROZEN_QUEUE 0x00000010
399#define SRB_FLAGS_DISABLE_AUTOSENSE 0x00000020
400#define SRB_FLAGS_DATA_IN 0x00000040
401#define SRB_FLAGS_DATA_OUT 0x00000080
402#define SRB_FLAGS_NO_DATA_TRANSFER 0x00000000
403#define SRB_FLAGS_UNSPECIFIED_DIRECTION (SRB_FLAGS_DATA_IN | SRB_FLAGS_DATA_OUT)
404#define SRB_FLAGS_NO_QUEUE_FREEZE 0x00000100
405#define SRB_FLAGS_ADAPTER_CACHE_ENABLE 0x00000200
406#define SRB_FLAGS_FREE_SENSE_BUFFER 0x00000400
407#define SRB_FLAGS_IS_ACTIVE 0x00010000
408#define SRB_FLAGS_ALLOCATED_FROM_ZONE 0x00020000
409#define SRB_FLAGS_SGLIST_FROM_POOL 0x00040000
410#define SRB_FLAGS_BYPASS_LOCKED_QUEUE 0x00080000
411
412#define SRB_FLAGS_NO_KEEP_AWAKE 0x00100000
413#define SRB_FLAGS_PORT_DRIVER_ALLOCSENSE 0x00200000
414#define SRB_FLAGS_PORT_DRIVER_SENSEHASPORT 0x00400000
415#define SRB_FLAGS_DONT_START_NEXT_PACKET 0x00800000
416
417#define SRB_FLAGS_PORT_DRIVER_RESERVED 0x0F000000
418#define SRB_FLAGS_CLASS_DRIVER_RESERVED 0xF0000000
419//
420// Queue Action
421//
422
423#define SRB_SIMPLE_TAG_REQUEST 0x20
424#define SRB_HEAD_OF_QUEUE_TAG_REQUEST 0x21
425#define SRB_ORDERED_QUEUE_TAG_REQUEST 0x22
426
427#define SRB_WMI_FLAGS_ADAPTER_REQUEST 0x01
428
429// end_ntminitape
430
431//
432// SCSI Adapter Dependent Routines
433//
434
435typedef
438 IN PVOID DeviceExtension
439 );
440
441typedef
444 IN PVOID DeviceExtension,
446 );
447
448typedef
451 IN PVOID DeviceExtension
452 );
453
454typedef
456(NTAPI *PHW_TIMER) (
457 IN PVOID DeviceExtension
458 );
459
460typedef
463 IN PVOID DeviceExtension
464 );
465
466typedef
469 IN PVOID DeviceExtension,
472 IN PCHAR ArgumentString,
474 OUT PBOOLEAN Again
475 );
476
477typedef
480 IN PVOID DeviceExtension,
482 );
483
484typedef
487 IN PVOID DeviceExtension,
490 );
491
492typedef
495 IN PVOID DeviceExtension,
496 IN SCSI_ADAPTER_CONTROL_TYPE ControlType,
498 );
499
500//
501// Port driver error codes
502//
503
504#define SP_BUS_PARITY_ERROR 0x0001
505#define SP_UNEXPECTED_DISCONNECT 0x0002
506#define SP_INVALID_RESELECTION 0x0003
507#define SP_BUS_TIME_OUT 0x0004
508#define SP_PROTOCOL_ERROR 0x0005
509#define SP_INTERNAL_ADAPTER_ERROR 0x0006
510#define SP_REQUEST_TIMEOUT 0x0007
511#define SP_IRQ_NOT_RESPONDING 0x0008
512#define SP_BAD_FW_WARNING 0x0009
513#define SP_BAD_FW_ERROR 0x000a
514#define SP_LOST_WMI_MINIPORT_REQUEST 0x000b
515
516
517//
518// Return values for SCSI_HW_FIND_ADAPTER.
519//
520
521#define SP_RETURN_NOT_FOUND 0
522#define SP_RETURN_FOUND 1
523#define SP_RETURN_ERROR 2
524#define SP_RETURN_BAD_CONFIG 3
525
526//
527// Notification Event Types
528//
529
542
543//
544// Structure passed between miniport initialization
545// and SCSI port initialization
546//
547
549
551 // Adapter interface type:
552 //
553 // Internal
554 // Isa
555 // Eisa
556 // MicroChannel
557 // TurboChannel
558 // PCIBus
559 // VMEBus
560 // NuBus
561 // PCMCIABus
562 // CBus
563 // MPIBus
564 // MPSABus
566 // Miniport driver routines
579
580 BOOLEAN MapBuffers; // Data buffers must be mapped into virtual address space.
581 BOOLEAN NeedPhysicalAddresses; // We need to tranlate virtual to physical addresses.
582 BOOLEAN TaggedQueuing; // Supports tagged queuing
583 BOOLEAN AutoRequestSense; // Supports auto request sense.
584 BOOLEAN MultipleRequestPerLu; // Supports multiple requests per logical unit.
585 BOOLEAN ReceiveEvent; // Support receive event function.
586 USHORT VendorIdLength; // Vendor identification length
587 PVOID VendorId; // Vendor identification
588 USHORT ReservedUshort; // Pad for alignment and future use.
589 USHORT DeviceIdLength; // Device identification length
590 PVOID DeviceId; // Device identification
591
593
595 // Stop adapter routine.
597
599
604
605// begin_ntminitape
606
607#ifndef _NTDDK_
608#define SCSIPORT_API DECLSPEC_IMPORT
609#else
610#define SCSIPORT_API
611#endif
612
613// end_ntminitape
614
615//
616// Port driver routines called by miniport driver
617//
618
626 );
627
631 IN PVOID HwDeviceExtension,
632 IN PVOID MappedAddress
633 );
634
638 IN PVOID DeviceExtension,
639 IN ULONG BusDataType,
640 IN ULONG SystemIoBusNumber,
644 );
645
649 IN PVOID DeviceExtension,
650 IN ULONG BusDataType,
651 IN ULONG SystemIoBusNumber,
656 );
657
661 IN PVOID HwDeviceExtension,
663 IN ULONG SystemIoBusNumber,
664 IN SCSI_PHYSICAL_ADDRESS IoAddress,
666 IN BOOLEAN InIoSpace
667 );
668
672 IN PVOID HwDeviceExtension,
675 IN UCHAR Lun
676 );
677
681 IN PVOID DeviceExtension,
684 IN UCHAR Lun,
685 IN LONG QueueTag
686 );
687
691 IN PVOID HwDeviceExtension,
695 );
696
700 IN PVOID HwDeviceExtension,
702 );
703
707 IN PVOID HwDeviceExtension,
710 );
711
715 IN PVOID DeviceExtension
716 );
717
721 IN PVOID HwDeviceExtension,
723 IN PVOID LogicalAddress,
725 );
726
731 IN PVOID HwDeviceExtension,
732 ...
733 );
734
738 IN PVOID HwDeviceExtension,
742 IN UCHAR Lun,
744 IN ULONG UniqueId
745 );
746
750 IN PVOID HwDeviceExtension,
753 IN UCHAR Lun,
754 IN UCHAR SrbStatus
755 );
756
763 );
764
769 );
770
775 );
776
781 );
782
786 IN PUCHAR Port,
789 );
790
797 );
798
802 IN PULONG Port,
805 );
806
811 );
812
817 );
818
823 );
824
831 );
832
839 );
840
847 );
848
852 IN ULONG Delay
853 );
854
858 IN PUCHAR Port,
860 );
861
867 );
868
872 IN PULONG Port,
874 );
875
879 IN PUCHAR Port,
882 );
883
890 );
891
895 IN PULONG Port,
898 );
899
905 );
906
912 );
913
919 );
920
927 );
928
935 );
936
943 );
944
948 ULONG UlongAddress
949 );
950
955 );
956
957#define ScsiPortConvertPhysicalAddressToUlong(Address) ((Address).LowPart)
958
962 IN PVOID HwDeviceExtension,
964 IN ULONG SystemIoBusNumber,
965 IN SCSI_PHYSICAL_ADDRESS IoAddress,
967 IN BOOLEAN InIoSpace
968 );
969
970// begin_ntminitape
971
975 ULONG DebugPrintLevel,
976 PCCHAR DebugMessage,
977 ...
978 );
979
980// end_ntminitape
981
982#endif //USER_MODE
983
984#pragma pack(pop)
985
986#endif //
#define SaveState(State)
unsigned char BOOLEAN
#define __cdecl
Definition: accygwin.h:79
#define VOID
Definition: acefi.h:82
#define WriteBuffer(BaseIoAddress, Buffer, Count)
Definition: atapi.h:344
#define ReadBuffer(BaseIoAddress, Buffer, Count)
Definition: atapi.h:339
_In_ PSCSI_REQUEST_BLOCK Srb
Definition: cdrom.h:989
Definition: bufpool.h:45
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR _In_ UCHAR Lun
Definition: classpnp.h:1315
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR PathId
Definition: classpnp.h:1313
_In_ PVOID Argument2
Definition: classpnp.h:721
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR TargetId
Definition: classpnp.h:1314
struct _SCSI_SUPPORTED_CONTROL_TYPE_LIST SCSI_SUPPORTED_CONTROL_TYPE_LIST
SCSIPORT_API VOID NTAPI ScsiPortLogError(IN PVOID HwDeviceExtension, IN PSCSI_REQUEST_BLOCK Srb OPTIONAL, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun, IN ULONG ErrorCode, IN ULONG UniqueId)
Definition: scsiport.c:1299
SCSIPORT_API BOOLEAN NTAPI ScsiPortValidateRange(IN PVOID HwDeviceExtension, IN INTERFACE_TYPE BusType, IN ULONG SystemIoBusNumber, IN SCSI_PHYSICAL_ADDRESS IoAddress, IN ULONG NumberOfBytes, IN BOOLEAN InIoSpace)
Definition: scsiport.c:1497
VOID(NTAPI * PHW_DMA_STARTED)(IN PVOID DeviceExtension)
Definition: srb.h:462
struct _SCSI_REQUEST_BLOCK SCSI_REQUEST_BLOCK
BOOLEAN(NTAPI * PHW_INTERRUPT)(IN PVOID DeviceExtension)
Definition: srb.h:450
struct _ACCESS_RANGE ACCESS_RANGE
struct _PORT_CONFIGURATION_INFORMATION_COMMON PORT_CONFIGURATION_INFORMATION_COMMON
SCSIPORT_API VOID NTAPI ScsiPortReadPortBufferUshort(IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count)
Definition: stubs.c:64
_SCSI_ADAPTER_CONTROL_TYPE
Definition: srb.h:176
@ ScsiRestartAdapter
Definition: srb.h:179
@ ScsiQuerySupportedControlTypes
Definition: srb.h:177
@ ScsiAdapterControlMax
Definition: srb.h:182
@ ScsiSetBootConfig
Definition: srb.h:180
@ ScsiStopAdapter
Definition: srb.h:178
@ MakeAdapterControlTypeSizeOfUlong
Definition: srb.h:183
@ ScsiSetRunningConfig
Definition: srb.h:181
struct _PORT_CONFIGURATION_INFORMATION_NT * PPORT_CONFIGURATION_INFORMATION_NT
SCSIPORT_API VOID NTAPI ScsiPortReadRegisterBufferUshort(IN PUSHORT Register, IN PUSHORT Buffer, IN ULONG Count)
Definition: scsiport.c:1438
PHYSICAL_ADDRESS SCSI_PHYSICAL_ADDRESS
Definition: srb.h:38
#define SCSIPORT_API
Definition: srb.h:608
struct _PORT_CONFIGURATION_INFORMATION * PPORT_CONFIGURATION_INFORMATION
enum _SCSI_NOTIFICATION_TYPE * PSCSI_NOTIFICATION_TYPE
SCSIPORT_API VOID NTAPI ScsiPortWritePortBufferUshort(IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count)
Definition: scsiport.c:1537
enum _SCSI_NOTIFICATION_TYPE SCSI_NOTIFICATION_TYPE
SCSIPORT_API ULONG NTAPI ScsiPortReadPortUlong(IN PULONG Port)
Definition: scsiport.c:1400
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterUlong(IN PULONG Register, IN ULONG Value)
Definition: scsiport.c:1616
SCSIPORT_API VOID NTAPI ScsiPortFreeDeviceBase(IN PVOID HwDeviceExtension, IN PVOID MappedAddress)
Definition: scsiport.c:549
SCSIPORT_API USHORT NTAPI ScsiPortReadPortUshort(IN PUSHORT Port)
Definition: scsiport.c:1408
SCSIPORT_API VOID NTAPI ScsiPortWritePortBufferUchar(IN PUCHAR Port, IN PUCHAR Buffer, IN ULONG Count)
Definition: scsiport.c:1517
SCSIPORT_API VOID NTAPI ScsiPortMoveMemory(IN PVOID WriteBuffer, IN PVOID ReadBuffer, IN ULONG Length)
Definition: scsiport.c:1314
struct _PORT_CONFIGURATION_INFORMATION_NT PORT_CONFIGURATION_INFORMATION_NT
struct _HW_INITIALIZATION_DATA_COMMON * PHW_INITIALIZATION_DATA_COMMON
_SCSI_ADAPTER_CONTROL_STATUS
Definition: srb.h:190
@ ScsiAdapterControlSuccess
Definition: srb.h:191
@ ScsiAdapterControlUnsuccessful
Definition: srb.h:192
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterBufferUlong(IN PULONG Register, IN PULONG Buffer, IN ULONG Count)
Definition: scsiport.c:1585
struct _HW_INITIALIZATION_DATA * PHW_INITIALIZATION_DATA
VOID(NTAPI * PHW_TIMER)(IN PVOID DeviceExtension)
Definition: srb.h:456
struct _SCSI_WMI_REQUEST_BLOCK SCSI_WMI_REQUEST_BLOCK
enum _SCSI_ADAPTER_CONTROL_TYPE SCSI_ADAPTER_CONTROL_TYPE
SCSIPORT_API PSCSI_REQUEST_BLOCK NTAPI ScsiPortGetSrb(IN PVOID DeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun, IN LONG QueueTag)
Definition: scsiport.c:658
SCSIPORT_API ULONG NTAPI ScsiPortSetBusDataByOffset(IN PVOID DeviceExtension, IN ULONG BusDataType, IN ULONG SystemIoBusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
Definition: scsiport.c:1473
enum _SCSI_ADAPTER_CONTROL_STATUS SCSI_ADAPTER_CONTROL_STATUS
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterUchar(IN PUCHAR Register, IN UCHAR Value)
Definition: scsiport.c:1607
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterBufferUshort(IN PUSHORT Register, IN PUSHORT Buffer, IN ULONG Count)
Definition: scsiport.c:1596
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterUshort(IN PUSHORT Register, IN USHORT Value)
Definition: scsiport.c:1625
SCSIPORT_API ULONG NTAPI ScsiPortGetBusData(IN PVOID DeviceExtension, IN ULONG BusDataType, IN ULONG SystemIoBusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Length)
Definition: scsiport.c:558
SCSIPORT_API VOID NTAPI ScsiPortReadPortBufferUchar(IN PUCHAR Port, IN PUCHAR Buffer, IN ULONG Count)
Definition: stubs.c:54
SCSIPORT_API ULONG NTAPI ScsiPortReadRegisterUlong(IN PULONG Register)
Definition: scsiport.c:1457
SCSIPORT_API SCSI_PHYSICAL_ADDRESS NTAPI ScsiPortConvertUlongToPhysicalAddress(ULONG UlongAddress)
SCSIPORT_API VOID NTAPI ScsiPortCompleteRequest(IN PVOID HwDeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun, IN UCHAR SrbStatus)
Definition: scsiport.c:507
struct _HW_INITIALIZATION_DATA HW_INITIALIZATION_DATA
SCSIPORT_API PVOID NTAPI ScsiPortGetVirtualAddress(IN PVOID HwDeviceExtension, IN SCSI_PHYSICAL_ADDRESS PhysicalAddress)
Definition: scsiport.c:821
struct _SCSI_SUPPORTED_CONTROL_TYPE_LIST * PSCSI_SUPPORTED_CONTROL_TYPE_LIST
SCSIPORT_API VOID NTAPI ScsiPortFlushDma(IN PVOID DeviceExtension)
Definition: scsiport.c:540
SCSIPORT_API VOID __cdecl ScsiDebugPrint(ULONG DebugPrintLevel, PCCHAR DebugMessage,...)
SCSIPORT_API VOID NTAPI ScsiPortReadPortBufferUlong(IN PULONG Port, IN PULONG Buffer, IN ULONG Count)
Definition: stubs.c:74
SCSIPORT_API PVOID NTAPI ScsiPortGetLogicalUnit(IN PVOID HwDeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun)
Definition: scsiport.c:609
BOOLEAN(NTAPI * PHW_STARTIO)(IN PVOID DeviceExtension, IN PSCSI_REQUEST_BLOCK Srb)
Definition: srb.h:443
struct _PORT_CONFIGURATION_INFORMATION_2K PORT_CONFIGURATION_INFORMATION_2K
BOOLEAN(NTAPI * PHW_ADAPTER_STATE)(IN PVOID DeviceExtension, IN PVOID Context, IN BOOLEAN SaveState)
Definition: srb.h:486
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterBufferUchar(IN PUCHAR Register, IN PUCHAR Buffer, IN ULONG Count)
Definition: scsiport.c:1574
BOOLEAN(NTAPI * PHW_RESET_BUS)(IN PVOID DeviceExtension, IN ULONG PathId)
Definition: srb.h:479
SCSIPORT_API PVOID NTAPI ScsiPortGetDeviceBase(IN PVOID HwDeviceExtension, IN INTERFACE_TYPE BusType, IN ULONG SystemIoBusNumber, IN SCSI_PHYSICAL_ADDRESS IoAddress, IN ULONG NumberOfBytes, IN BOOLEAN InIoSpace)
Definition: scsiport.c:571
SCSIPORT_API VOID NTAPI ScsiPortWritePortUchar(IN PUCHAR Port, IN UCHAR Value)
Definition: scsiport.c:1547
SCSIPORT_API USHORT NTAPI ScsiPortReadRegisterUshort(IN PUSHORT Register)
Definition: scsiport.c:1465
SCSIPORT_API VOID NTAPI ScsiPortIoMapTransfer(IN PVOID HwDeviceExtension, IN PSCSI_REQUEST_BLOCK Srb, IN PVOID LogicalAddress, IN ULONG Length)
Definition: scsiport.c:1287
SCSIPORT_API ULONG NTAPI ScsiPortInitialize(IN PVOID Argument1, IN PVOID Argument2, IN struct _HW_INITIALIZATION_DATA *HwInitializationData, IN PVOID HwContext)
Definition: scsiport.c:836
SCSIPORT_API VOID __cdecl ScsiPortNotification(IN SCSI_NOTIFICATION_TYPE NotificationType, IN PVOID HwDeviceExtension,...)
Definition: scsiport.c:1451
#define ScsiPortConvertPhysicalAddressToUlong(Address)
Definition: srb.h:957
struct _SCSI_REQUEST_BLOCK * PSCSI_REQUEST_BLOCK
SCSIPORT_API VOID NTAPI ScsiPortStallExecution(IN ULONG Delay)
Definition: scsiport.c:1489
PHYSICAL_ADDRESS * PSCSI_PHYSICAL_ADDRESS
Definition: srb.h:38
struct _PORT_CONFIGURATION_INFORMATION PORT_CONFIGURATION_INFORMATION
SCSIPORT_API VOID NTAPI ScsiPortWritePortUshort(IN PUSHORT Port, IN USHORT Value)
Definition: scsiport.c:1565
struct _HW_INITIALIZATION_DATA_COMMON HW_INITIALIZATION_DATA_COMMON
struct _SCSI_WMI_REQUEST_BLOCK * PSCSI_WMI_REQUEST_BLOCK
SCSI_ADAPTER_CONTROL_STATUS(NTAPI * PHW_ADAPTER_CONTROL)(IN PVOID DeviceExtension, IN SCSI_ADAPTER_CONTROL_TYPE ControlType, IN PVOID Parameters)
Definition: srb.h:494
SCSIPORT_API VOID NTAPI ScsiPortWritePortBufferUlong(IN PULONG Port, IN PULONG Buffer, IN ULONG Count)
Definition: scsiport.c:1527
SCSIPORT_API VOID NTAPI ScsiPortReadRegisterBufferUlong(IN PULONG Register, IN PULONG Buffer, IN ULONG Count)
Definition: scsiport.c:1427
struct _HW_INITIALIZATION_DATA_2K * PHW_INITIALIZATION_DATA_2K
SCSIPORT_API UCHAR NTAPI ScsiPortReadRegisterUchar(IN PUCHAR Register)
Definition: scsiport.c:1449
enum _SCSI_ADAPTER_CONTROL_TYPE * PSCSI_ADAPTER_CONTROL_TYPE
SCSIPORT_API VOID NTAPI ScsiPortWritePortUlong(IN PULONG Port, IN ULONG Value)
Definition: scsiport.c:1556
_SCSI_NOTIFICATION_TYPE
Definition: srb.h:530
@ ResetDetected
Definition: srb.h:534
@ WMIEvent
Definition: srb.h:539
@ RequestTimerCall
Definition: srb.h:537
@ CallEnableInterrupts
Definition: srb.h:536
@ CallDisableInterrupts
Definition: srb.h:535
@ RequestComplete
Definition: srb.h:531
@ WMIReregister
Definition: srb.h:540
@ NextRequest
Definition: srb.h:532
@ BusChangeDetected
Definition: srb.h:538
@ NextLuRequest
Definition: srb.h:533
struct _HW_INITIALIZATION_DATA_2K HW_INITIALIZATION_DATA_2K
enum _SCSI_ADAPTER_CONTROL_STATUS * PSCSI_ADAPTER_CONTROL_STATUS
SCSIPORT_API SCSI_PHYSICAL_ADDRESS NTAPI ScsiPortGetPhysicalAddress(IN PVOID HwDeviceExtension, IN PSCSI_REQUEST_BLOCK Srb, IN PVOID VirtualAddress, OUT ULONG *Length)
Definition: scsiport.c:622
struct _PORT_CONFIGURATION_INFORMATION_2K * PPORT_CONFIGURATION_INFORMATION_2K
SCSIPORT_API UCHAR NTAPI ScsiPortReadPortUchar(IN PUCHAR Port)
Definition: scsiport.c:1390
struct _PORT_CONFIGURATION_INFORMATION_COMMON * PPORT_CONFIGURATION_INFORMATION_COMMON
SCSIPORT_API PVOID NTAPI ScsiPortGetUncachedExtension(IN PVOID HwDeviceExtension, IN PPORT_CONFIGURATION_INFORMATION ConfigInfo, IN ULONG NumberOfBytes)
Definition: scsiport.c:736
ULONG(NTAPI * PHW_FIND_ADAPTER)(IN PVOID DeviceExtension, IN PVOID HwContext, IN PVOID BusInformation, IN PCHAR ArgumentString, IN OUT PPORT_CONFIGURATION_INFORMATION ConfigInfo, OUT PBOOLEAN Again)
Definition: srb.h:468
SCSIPORT_API VOID NTAPI ScsiPortReadRegisterBufferUchar(IN PUCHAR Register, IN PUCHAR Buffer, IN ULONG Count)
Definition: scsiport.c:1416
struct _ACCESS_RANGE * PACCESS_RANGE
BOOLEAN(NTAPI * PHW_INITIALIZE)(IN PVOID DeviceExtension)
Definition: srb.h:437
CPPORT Port[4]
Definition: headless.c:35
enum _INTERFACE_TYPE INTERFACE_TYPE
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
int Count
Definition: noreturn.cpp:7
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define BOOLEAN
Definition: pedump.c:73
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
static WCHAR Address[46]
Definition: ping.c:68
enum _KINTERRUPT_MODE KINTERRUPT_MODE
enum _DMA_SPEED DMA_SPEED
enum _DMA_WIDTH DMA_WIDTH
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA _In_ PVOID HwContext
Definition: srb.h:907
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA * HwInitializationData
Definition: srb.h:906
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
struct _ACCESS_RANGE ACCESS_RANGE
BOOLEAN(STREAMAPI * PHW_INTERRUPT)(IN PVOID DeviceExtension)
Definition: strmini.h:311
ULONG RangeLength
Definition: srb.h:42
BOOLEAN RangeInMemory
Definition: srb.h:43
SCSI_PHYSICAL_ADDRESS RangeStart
Definition: srb.h:41
PHW_ADAPTER_CONTROL HwAdapterControl
Definition: srb.h:596
HW_INITIALIZATION_DATA_2K w2k
Definition: srb.h:602
HW_INITIALIZATION_DATA comm
Definition: srb.h:601
USHORT ReservedUshort
Definition: srb.h:588
PHW_INTERRUPT HwInterrupt
Definition: srb.h:569
BOOLEAN TaggedQueuing
Definition: srb.h:582
BOOLEAN ReceiveEvent
Definition: srb.h:585
PHW_ADAPTER_STATE HwAdapterState
Definition: srb.h:573
PHW_DMA_STARTED HwDmaStarted
Definition: srb.h:572
BOOLEAN AutoRequestSense
Definition: srb.h:583
PHW_RESET_BUS HwResetBus
Definition: srb.h:571
USHORT VendorIdLength
Definition: srb.h:586
PHW_STARTIO HwStartIo
Definition: srb.h:568
BOOLEAN MultipleRequestPerLu
Definition: srb.h:584
BOOLEAN NeedPhysicalAddresses
Definition: srb.h:581
ULONG SpecificLuExtensionSize
Definition: srb.h:575
ULONG SrbExtensionSize
Definition: srb.h:576
ULONG HwInitializationDataSize
Definition: srb.h:550
USHORT DeviceIdLength
Definition: srb.h:589
PHW_INITIALIZE HwInitialize
Definition: srb.h:567
ULONG DeviceExtensionSize
Definition: srb.h:574
INTERFACE_TYPE AdapterInterfaceType
Definition: srb.h:565
PHW_FIND_ADAPTER HwFindAdapter
Definition: srb.h:570
BOOLEAN MapBuffers
Definition: srb.h:580
ULONG NumberOfAccessRanges
Definition: srb.h:577
PORT_CONFIGURATION_INFORMATION comm
Definition: srb.h:137
PORT_CONFIGURATION_INFORMATION_2K w2k
Definition: srb.h:139
PORT_CONFIGURATION_INFORMATION_NT nt4
Definition: srb.h:138
ACCESS_RANGE(* AccessRanges)[]
Definition: srb.h:74
BOOLEAN AtdiskSecondaryClaimed
Definition: srb.h:83
BOOLEAN BufferAccessScsiPortControlled
Definition: srb.h:94
KINTERRUPT_MODE InterruptMode
Definition: srb.h:64
INTERFACE_TYPE AdapterInterfaceType
Definition: srb.h:59
KINTERRUPT_MODE InterruptMode2
Definition: srb.h:101
UCHAR QueueTag
Definition: srb.h:256
ULONG TimeOutValue
Definition: srb.h:262
UCHAR TargetId
Definition: srb.h:254
PVOID OriginalRequest
Definition: srb.h:266
UCHAR SenseInfoBufferLength
Definition: srb.h:259
PVOID DataBuffer
Definition: srb.h:263
UCHAR PathId
Definition: srb.h:253
UCHAR QueueAction
Definition: srb.h:257
UCHAR CdbLength
Definition: srb.h:258
UCHAR Cdb[16]
Definition: srb.h:279
PVOID SenseInfoBuffer
Definition: srb.h:264
ULONG QueueSortKey
Definition: srb.h:270
UCHAR Function
Definition: srb.h:250
UCHAR ScsiStatus
Definition: srb.h:252
ULONG DataTransferLength
Definition: srb.h:261
PVOID SrbExtension
Definition: srb.h:267
ULONG InternalStatus
Definition: srb.h:269
struct _SCSI_REQUEST_BLOCK * NextSrb
Definition: srb.h:265
ULONG SrbFlags
Definition: srb.h:260
USHORT Length
Definition: srb.h:249
UCHAR SrbStatus
Definition: srb.h:251
OUT BOOLEAN SupportedTypeList[0]
Definition: srb.h:221
UCHAR WMISubFunction
Definition: srb.h:292
UCHAR Reserved5[16]
Definition: srb.h:308
UCHAR Reserved2[2]
Definition: srb.h:298
ULONG DataTransferLength
Definition: srb.h:300
PVOID OriginalRequest
Definition: srb.h:305
uint32_t * PULONG
Definition: typedefs.h:59
unsigned char * PBOOLEAN
Definition: typedefs.h:53
#define NTAPI
Definition: typedefs.h:36
uint16_t * PUSHORT
Definition: typedefs.h:56
#define IN
Definition: typedefs.h:39
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
char CCHAR
Definition: typedefs.h:51
char * PCHAR
Definition: typedefs.h:51
_In_ WDF_SPECIAL_FILE_TYPE NotificationType
Definition: wdfdevice.h:1024
_In_ WDFDEVICE _In_ PPNP_BUS_INFORMATION BusInformation
Definition: wdfdevice.h:3915
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:869
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
_In_ WDFIORESREQLIST _In_ ULONG SlotNumber
Definition: wdfresource.h:68
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
_IRQL_requires_same_ _In_opt_ PVOID Argument1
Definition: cmtypes.h:696
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE BusType
Definition: halfuncs.h:159
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1098
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1036
unsigned char UCHAR
Definition: xmlstorage.h:181