mirror of
https://github.com/reactos/reactos.git
synced 2025-07-09 06:18:03 +00:00
- Massive changes due to a rewrite of the core logic related to ISR, DPC, IRP completion and commands delivery. Fixes a lot of race conditions which existed in hbirr-scsiport.
- Add some helper functions, and fields inside device extension structures. - Reorganize flags a little, dividing them into flags for scsi port device extension and logical unit device extension. (however some of the flags are still messed up) - This gets us further, but still not enough / bugs may exist. svn path=/trunk/; revision=26199
This commit is contained in:
parent
3d4fc31db6
commit
3ff7da19ca
2 changed files with 985 additions and 93 deletions
File diff suppressed because it is too large
Load diff
|
@ -24,16 +24,28 @@
|
||||||
#define SCSI_PORT_LU_ACTIVE 0x0002
|
#define SCSI_PORT_LU_ACTIVE 0x0002
|
||||||
#define SCSI_PORT_NOTIFICATION_NEEDED 0x0004
|
#define SCSI_PORT_NOTIFICATION_NEEDED 0x0004
|
||||||
#define SCSI_PORT_NEXT_REQUEST_READY 0x0008
|
#define SCSI_PORT_NEXT_REQUEST_READY 0x0008
|
||||||
|
#define SCSI_PORT_FLUSH_ADAPTERS 0x0010
|
||||||
|
#define SCSI_PORT_MAP_TRANSFER 0x0020
|
||||||
#define SCSI_PORT_RESET 0x0080
|
#define SCSI_PORT_RESET 0x0080
|
||||||
#define SCSI_PORT_RESET_REQUEST 0x0100
|
#define SCSI_PORT_RESET_REQUEST 0x0100
|
||||||
|
#define SCSI_PORT_RESET_REPORTED 0x0200
|
||||||
|
#define SCSI_PORT_REQUEST_PENDING 0x0800
|
||||||
#define SCSI_PORT_DISCONNECT_ALLOWED 0x1000
|
#define SCSI_PORT_DISCONNECT_ALLOWED 0x1000
|
||||||
|
#define SCSI_PORT_DISABLE_INT_REQUESET 0x2000
|
||||||
#define SCSI_PORT_DISABLE_INTERRUPTS 0x4000
|
#define SCSI_PORT_DISABLE_INTERRUPTS 0x4000
|
||||||
|
#define SCSI_PORT_ENABLE_INT_REQUEST 0x8000
|
||||||
|
#define SCIS_PORT_TIMER_NEEDED 0x10000
|
||||||
|
|
||||||
|
/* LUN Extension flags*/
|
||||||
|
#define LUNEX_FROZEN_QUEUE 0x0001
|
||||||
|
#define LUNEX_NEED_REQUEST_SENSE 0x0004
|
||||||
|
#define LUNEX_BUSY 0x0008
|
||||||
|
#define LUNEX_FULL_QUEUE 0x0010
|
||||||
|
#define LUNEX_REQUEST_PENDING 0x0020
|
||||||
#define SCSI_PORT_SCAN_IN_PROGRESS 0x8000
|
#define SCSI_PORT_SCAN_IN_PROGRESS 0x8000
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef enum _SCSI_PORT_TIMER_STATES
|
typedef enum _SCSI_PORT_TIMER_STATES
|
||||||
{
|
{
|
||||||
IDETimerIdle,
|
IDETimerIdle,
|
||||||
|
@ -58,6 +70,14 @@ typedef struct _SCSI_REQUEST_BLOCK_INFO
|
||||||
LIST_ENTRY Requests;
|
LIST_ENTRY Requests;
|
||||||
PSCSI_REQUEST_BLOCK Srb;
|
PSCSI_REQUEST_BLOCK Srb;
|
||||||
PCHAR DataOffset;
|
PCHAR DataOffset;
|
||||||
|
PVOID SaveSenseRequest;
|
||||||
|
|
||||||
|
ULONG SequenceNumber;
|
||||||
|
|
||||||
|
/* DMA stuff */
|
||||||
|
PVOID BaseOfMapRegister;
|
||||||
|
ULONG NumberOfMapRegisters;
|
||||||
|
|
||||||
struct _SCSI_REQUEST_BLOCK_INFO *CompletedRequests;
|
struct _SCSI_REQUEST_BLOCK_INFO *CompletedRequests;
|
||||||
} SCSI_REQUEST_BLOCK_INFO, *PSCSI_REQUEST_BLOCK_INFO;
|
} SCSI_REQUEST_BLOCK_INFO, *PSCSI_REQUEST_BLOCK_INFO;
|
||||||
|
|
||||||
|
@ -77,10 +97,19 @@ typedef struct _SCSI_PORT_LUN_EXTENSION
|
||||||
INQUIRYDATA InquiryData;
|
INQUIRYDATA InquiryData;
|
||||||
|
|
||||||
KDEVICE_QUEUE DeviceQueue;
|
KDEVICE_QUEUE DeviceQueue;
|
||||||
|
ULONG SortKey;
|
||||||
ULONG QueueCount;
|
ULONG QueueCount;
|
||||||
|
ULONG MaxQueueCount;
|
||||||
|
|
||||||
|
ULONG AttemptCount;
|
||||||
LONG RequestTimeout;
|
LONG RequestTimeout;
|
||||||
|
|
||||||
|
PIRP BusyRequest;
|
||||||
|
PIRP PendingRequest;
|
||||||
|
|
||||||
|
struct _SCSI_PORT_LUN_EXTENSION *ReadyLun;
|
||||||
|
struct _SCSI_PORT_LUN_EXTENSION *CompletedAbortRequests;
|
||||||
|
|
||||||
SCSI_REQUEST_BLOCK_INFO SrbInfo;
|
SCSI_REQUEST_BLOCK_INFO SrbInfo;
|
||||||
|
|
||||||
/* More data? */
|
/* More data? */
|
||||||
|
@ -120,10 +149,18 @@ typedef struct _SCSI_PORT_INTERRUPT_DATA
|
||||||
{
|
{
|
||||||
ULONG Flags; /* Interrupt-time flags */
|
ULONG Flags; /* Interrupt-time flags */
|
||||||
PSCSI_REQUEST_BLOCK_INFO CompletedRequests; /* Linked list of Srb info data */
|
PSCSI_REQUEST_BLOCK_INFO CompletedRequests; /* Linked list of Srb info data */
|
||||||
|
PSCSI_PORT_LUN_EXTENSION CompletedAbort;
|
||||||
|
PSCSI_PORT_LUN_EXTENSION ReadyLun;
|
||||||
} SCSI_PORT_INTERRUPT_DATA, *PSCSI_PORT_INTERRUPT_DATA;
|
} SCSI_PORT_INTERRUPT_DATA, *PSCSI_PORT_INTERRUPT_DATA;
|
||||||
|
|
||||||
|
|
||||||
|
/* Only for interrupt data saving function */
|
||||||
|
typedef struct _SCSI_PORT_SAVE_INTERRUPT
|
||||||
|
{
|
||||||
|
PSCSI_PORT_INTERRUPT_DATA InterruptData;
|
||||||
|
struct _SCSI_PORT_DEVICE_EXTENSION *DeviceExtension;
|
||||||
|
} SCSI_PORT_SAVE_INTERRUPT, *PSCSI_PORT_SAVE_INTERRUPT;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SCSI_PORT_DEVICE_EXTENSION
|
* SCSI_PORT_DEVICE_EXTENSION
|
||||||
*
|
*
|
||||||
|
@ -159,7 +196,14 @@ typedef struct _SCSI_PORT_DEVICE_EXTENSION
|
||||||
|
|
||||||
SCSI_PORT_INTERRUPT_DATA InterruptData;
|
SCSI_PORT_INTERRUPT_DATA InterruptData;
|
||||||
|
|
||||||
|
/* SRB extension stuff*/
|
||||||
ULONG SrbExtensionSize;
|
ULONG SrbExtensionSize;
|
||||||
|
PVOID SrbExtensionBuffer;
|
||||||
|
PVOID FreeSrbExtensions;
|
||||||
|
|
||||||
|
/* SRB information */
|
||||||
|
PSCSI_REQUEST_BLOCK_INFO SrbInfo;
|
||||||
|
PSCSI_REQUEST_BLOCK_INFO FreeSrbInfo;
|
||||||
|
|
||||||
PIO_SCSI_CAPABILITIES PortCapabilities;
|
PIO_SCSI_CAPABILITIES PortCapabilities;
|
||||||
|
|
||||||
|
@ -178,6 +222,12 @@ typedef struct _SCSI_PORT_DEVICE_EXTENSION
|
||||||
ULONG MapRegisterCount;
|
ULONG MapRegisterCount;
|
||||||
BOOLEAN MapBuffers;
|
BOOLEAN MapBuffers;
|
||||||
BOOLEAN MapRegisters;
|
BOOLEAN MapRegisters;
|
||||||
|
PVOID MapRegisterBase;
|
||||||
|
|
||||||
|
/* Features */
|
||||||
|
BOOLEAN SupportsTaggedQueuing;
|
||||||
|
BOOLEAN SupportsAutoSense;
|
||||||
|
|
||||||
|
|
||||||
PHYSICAL_ADDRESS PhysicalAddress;
|
PHYSICAL_ADDRESS PhysicalAddress;
|
||||||
PVOID VirtualAddress;
|
PVOID VirtualAddress;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue