- Start putting all data, needed for ISR into a dedicated structure.

- Use DEVICE_QUEUEs.
- Add a function to retrieve SRB information help structure (is a shared code between Notify(), and in future - ScsiPortGetSrb()).
- Rework RequestComplete part of ScsiPortNotification().
- Rework ScsiPortDispatchScsi() a bit - shutdown/flush can share the same code as execute_scsi/ioctl requests, also added a few more DPRINTs in error conditions to help debugging.

svn path=/trunk/; revision=26192
This commit is contained in:
Aleksey Bragin 2007-03-28 10:41:03 +00:00
parent 24387402f3
commit ce0e0958b4
2 changed files with 217 additions and 120 deletions

View file

@ -20,7 +20,8 @@
#define LUS_NUMBER 8
/* Flags */
#define SCSI_PORT_SCAN_IN_PROGRESS 0x8000
#define SCSI_PORT_NEXT_REQUEST_READY 0x0008
#define SCSI_PORT_SCAN_IN_PROGRESS 0x8000
typedef enum _SCSI_PORT_TIMER_STATES
{
@ -44,6 +45,8 @@ typedef struct _SCSI_PORT_DEVICE_BASE
typedef struct _SCSI_REQUEST_BLOCK_INFO
{
LIST_ENTRY Requests;
PSCSI_REQUEST_BLOCK Srb;
struct _SCSI_REQUEST_BLOCK_INFO *CompletedRequests;
} SCSI_REQUEST_BLOCK_INFO, *PSCSI_REQUEST_BLOCK_INFO;
typedef struct _SCSI_PORT_LUN_EXTENSION
@ -97,6 +100,15 @@ typedef struct _BUSES_CONFIGURATION_INFORMATION
PSCSI_BUS_SCAN_INFO BusScanInfo[1];
} BUSES_CONFIGURATION_INFORMATION, *PBUSES_CONFIGURATION_INFORMATION;
typedef struct _SCSI_PORT_INTERRUPT_DATA
{
ULONG Flags; /* Interrupt-time flags */
PSCSI_REQUEST_BLOCK_INFO CompletedRequests; /* Linked list of Srb info data */
} SCSI_PORT_INTERRUPT_DATA, *PSCSI_PORT_INTERRUPT_DATA;
/*
* SCSI_PORT_DEVICE_EXTENSION
*
@ -127,6 +139,8 @@ typedef struct _SCSI_PORT_DEVICE_EXTENSION
ULONG LunExtensionSize;
PSCSI_PORT_LUN_EXTENSION LunExtensionList[LUS_NUMBER];
SCSI_PORT_INTERRUPT_DATA InterruptData;
ULONG SrbExtensionSize;
PIO_SCSI_CAPABILITIES PortCapabilities;