mirror of
https://github.com/reactos/reactos.git
synced 2024-07-30 08:08:56 +00:00
- Start ScsiPortInitialize() refactoring: moving code to separate functions, adding support for various registry-defined options / tweaks (like DisableTaggedQueuing).
- Fixed a bug with using wrong spinlock (IrpLock instead of SpinLock). - Doesn't fix anything yet, just makes work with the ScsiPortInitialize() more comfortable and initializing needed fields correctly. Also the "PortConfig" filling inside ScsiPortInitialize() will go away once it works fine in the standalone function. svn path=/trunk/; revision=26205
This commit is contained in:
parent
e3701e4987
commit
b33dcd50d9
File diff suppressed because it is too large
Load diff
|
@ -45,7 +45,6 @@
|
||||||
#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,
|
||||||
|
@ -54,6 +53,26 @@ typedef enum _SCSI_PORT_TIMER_STATES
|
||||||
IDETimerResetWaitForDrdyAssert
|
IDETimerResetWaitForDrdyAssert
|
||||||
} SCSI_PORT_TIMER_STATES;
|
} SCSI_PORT_TIMER_STATES;
|
||||||
|
|
||||||
|
typedef struct _CONFIGURATION_INFO
|
||||||
|
{
|
||||||
|
/* Identify info */
|
||||||
|
ULONG AdapterNumber;
|
||||||
|
ULONG LastAdapterNumber;
|
||||||
|
ULONG BusNumber;
|
||||||
|
|
||||||
|
/* Registry related */
|
||||||
|
HANDLE BusKey;
|
||||||
|
HANDLE ServiceKey;
|
||||||
|
HANDLE DeviceKey;
|
||||||
|
|
||||||
|
/* Features */
|
||||||
|
BOOLEAN DisableTaggedQueueing;
|
||||||
|
BOOLEAN DisableMultipleLun;
|
||||||
|
|
||||||
|
/* Parameters */
|
||||||
|
PVOID Parameter;
|
||||||
|
PACCESS_RANGE AccessRanges;
|
||||||
|
} CONFIGURATION_INFO, *PCONFIGURATION_INFO;
|
||||||
|
|
||||||
typedef struct _SCSI_PORT_DEVICE_BASE
|
typedef struct _SCSI_PORT_DEVICE_BASE
|
||||||
{
|
{
|
||||||
|
@ -178,9 +197,14 @@ typedef struct _SCSI_PORT_DEVICE_EXTENSION
|
||||||
ULONG PortNumber;
|
ULONG PortNumber;
|
||||||
|
|
||||||
LONG ActiveRequestCounter;
|
LONG ActiveRequestCounter;
|
||||||
|
ULONG SrbFlags;
|
||||||
ULONG Flags;
|
ULONG Flags;
|
||||||
|
|
||||||
KSPIN_LOCK IrpLock;
|
ULONG BusNum;
|
||||||
|
ULONG MaxTargedIds;
|
||||||
|
ULONG MaxLunCount;
|
||||||
|
|
||||||
|
KSPIN_LOCK IrqLock; /* Used when there are 2 irqs */
|
||||||
KSPIN_LOCK SpinLock;
|
KSPIN_LOCK SpinLock;
|
||||||
PKINTERRUPT Interrupt;
|
PKINTERRUPT Interrupt;
|
||||||
PIRP CurrentIrp;
|
PIRP CurrentIrp;
|
||||||
|
@ -189,6 +213,9 @@ typedef struct _SCSI_PORT_DEVICE_EXTENSION
|
||||||
SCSI_PORT_TIMER_STATES TimerState;
|
SCSI_PORT_TIMER_STATES TimerState;
|
||||||
LONG TimerCount;
|
LONG TimerCount;
|
||||||
|
|
||||||
|
KTIMER MiniportTimer;
|
||||||
|
KDPC MiniportTimerDpc;
|
||||||
|
|
||||||
LIST_ENTRY DeviceBaseListHead;
|
LIST_ENTRY DeviceBaseListHead;
|
||||||
|
|
||||||
ULONG LunExtensionSize;
|
ULONG LunExtensionSize;
|
||||||
|
@ -212,6 +239,8 @@ typedef struct _SCSI_PORT_DEVICE_EXTENSION
|
||||||
|
|
||||||
PHW_STARTIO HwStartIo;
|
PHW_STARTIO HwStartIo;
|
||||||
PHW_INTERRUPT HwInterrupt;
|
PHW_INTERRUPT HwInterrupt;
|
||||||
|
PHW_RESET_BUS HwResetBus;
|
||||||
|
PHW_DMA_STARTED HwDmaStarted;
|
||||||
|
|
||||||
PSCSI_REQUEST_BLOCK OriginalSrb;
|
PSCSI_REQUEST_BLOCK OriginalSrb;
|
||||||
SCSI_REQUEST_BLOCK InternalSrb;
|
SCSI_REQUEST_BLOCK InternalSrb;
|
||||||
|
@ -236,5 +265,7 @@ typedef struct _SCSI_PORT_DEVICE_EXTENSION
|
||||||
BOOLEAN NeedSrbExtensionAlloc;
|
BOOLEAN NeedSrbExtensionAlloc;
|
||||||
BOOLEAN NeedSrbDataAlloc;
|
BOOLEAN NeedSrbDataAlloc;
|
||||||
|
|
||||||
|
ULONG RequestsNumber;
|
||||||
|
|
||||||
UCHAR MiniPortDeviceExtension[1]; /* must be the last entry */
|
UCHAR MiniPortDeviceExtension[1]; /* must be the last entry */
|
||||||
} SCSI_PORT_DEVICE_EXTENSION, *PSCSI_PORT_DEVICE_EXTENSION;
|
} SCSI_PORT_DEVICE_EXTENSION, *PSCSI_PORT_DEVICE_EXTENSION;
|
||||||
|
|
Loading…
Reference in a new issue