mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 03:05:40 +00:00
Branch scsiport from the "before hbirr rewrite" state (rev. 8950).
svn path=/trunk/; revision=26185
This commit is contained in:
parent
9c00af1b5f
commit
86476d7a1b
7 changed files with 2935 additions and 0 deletions
8
reactos/drivers/storage/scsiport-new/.cvsignore
Normal file
8
reactos/drivers/storage/scsiport-new/.cvsignore
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
base.tmp
|
||||||
|
junk.tmp
|
||||||
|
temp.exp
|
||||||
|
scsiport.coff
|
||||||
|
*.o
|
||||||
|
*.sym
|
||||||
|
*.sys
|
||||||
|
*.map
|
17
reactos/drivers/storage/scsiport-new/makefile
Normal file
17
reactos/drivers/storage/scsiport-new/makefile
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# $Id: makefile,v 1.6 2003/11/13 14:20:03 ekohl Exp $
|
||||||
|
|
||||||
|
PATH_TO_TOP = ../../..
|
||||||
|
|
||||||
|
TARGET_BOOTSTRAP = yes
|
||||||
|
|
||||||
|
TARGET_TYPE = export_driver
|
||||||
|
|
||||||
|
TARGET_NAME = scsiport
|
||||||
|
|
||||||
|
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||||
|
|
||||||
|
TARGET_CFLAGS = -Werror -Wall
|
||||||
|
|
||||||
|
include $(PATH_TO_TOP)/rules.mak
|
||||||
|
|
||||||
|
include $(TOOLS_PATH)/helper.mk
|
2669
reactos/drivers/storage/scsiport-new/scsiport.c
Normal file
2669
reactos/drivers/storage/scsiport-new/scsiport.c
Normal file
File diff suppressed because it is too large
Load diff
52
reactos/drivers/storage/scsiport-new/scsiport.def
Normal file
52
reactos/drivers/storage/scsiport-new/scsiport.def
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
; $Id: scsiport.def,v 1.2 2001/07/23 06:13:48 ekohl Exp $
|
||||||
|
;
|
||||||
|
; scsiport.def - export definition file for scsiport driver
|
||||||
|
;
|
||||||
|
LIBRARY SCSIPORT.SYS
|
||||||
|
EXPORTS
|
||||||
|
ScsiDebugPrint
|
||||||
|
ScsiPortCompleteRequest@20
|
||||||
|
ScsiPortConvertPhysicalAddressToUlong@8
|
||||||
|
ScsiPortConvertUlongToPhysicalAddress@4
|
||||||
|
ScsiPortFlushDma@4
|
||||||
|
ScsiPortFreeDeviceBase@8
|
||||||
|
ScsiPortGetBusData@24
|
||||||
|
ScsiPortGetDeviceBase@28
|
||||||
|
ScsiPortGetLogicalUnit@16
|
||||||
|
ScsiPortGetPhysicalAddress@16
|
||||||
|
ScsiPortGetSrb@20
|
||||||
|
ScsiPortGetUncachedExtension@12
|
||||||
|
ScsiPortGetVirtualAddress@12
|
||||||
|
ScsiPortInitialize@16
|
||||||
|
ScsiPortIoMapTransfer@16
|
||||||
|
ScsiPortLogError@28
|
||||||
|
ScsiPortMoveMemory@12
|
||||||
|
ScsiPortNotification
|
||||||
|
ScsiPortReadPortBufferUchar@12
|
||||||
|
ScsiPortReadPortBufferUshort@12
|
||||||
|
ScsiPortReadPortBufferUlong@12
|
||||||
|
ScsiPortReadPortUchar@4
|
||||||
|
ScsiPortReadPortUshort@4
|
||||||
|
ScsiPortReadPortUlong@4
|
||||||
|
ScsiPortReadRegisterBufferUchar@12
|
||||||
|
ScsiPortReadRegisterBufferUshort@12
|
||||||
|
ScsiPortReadRegisterBufferUlong@12
|
||||||
|
ScsiPortReadRegisterUchar@4
|
||||||
|
ScsiPortReadRegisterUshort@4
|
||||||
|
ScsiPortReadRegisterUlong@4
|
||||||
|
ScsiPortSetBusDataByOffset@28
|
||||||
|
ScsiPortStallExecution@4
|
||||||
|
ScsiPortValidateRange@28
|
||||||
|
ScsiPortWritePortBufferUchar@12
|
||||||
|
ScsiPortWritePortBufferUshort@12
|
||||||
|
ScsiPortWritePortBufferUlong@12
|
||||||
|
ScsiPortWritePortUchar@8
|
||||||
|
ScsiPortWritePortUshort@8
|
||||||
|
ScsiPortWritePortUlong@8
|
||||||
|
ScsiPortWriteRegisterBufferUchar@12
|
||||||
|
ScsiPortWriteRegisterBufferUshort@12
|
||||||
|
ScsiPortWriteRegisterBufferUlong@12
|
||||||
|
ScsiPortWriteRegisterUchar@8
|
||||||
|
ScsiPortWriteRegisterUshort@8
|
||||||
|
ScsiPortWriteRegisterUlong@8
|
||||||
|
;EOF
|
52
reactos/drivers/storage/scsiport-new/scsiport.edf
Normal file
52
reactos/drivers/storage/scsiport-new/scsiport.edf
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
; $Id: scsiport.edf,v 1.5 2002/06/26 18:39:50 hbirr Exp $
|
||||||
|
;
|
||||||
|
; scsiport.def - export definition file for scsiport driver
|
||||||
|
;
|
||||||
|
LIBRARY SCSIPORT.SYS
|
||||||
|
EXPORTS
|
||||||
|
ScsiDebugPrint
|
||||||
|
ScsiPortCompleteRequest=ScsiPortCompleteRequest@20
|
||||||
|
ScsiPortConvertPhysicalAddressToUlong=ScsiPortConvertPhysicalAddressToUlong@8
|
||||||
|
ScsiPortConvertUlongToPhysicalAddress=NTOSKRNL.RtlConvertUlongToLargeInteger
|
||||||
|
ScsiPortFlushDma=ScsiPortFlushDma@4
|
||||||
|
ScsiPortFreeDeviceBase=ScsiPortFreeDeviceBase@8
|
||||||
|
ScsiPortGetBusData=ScsiPortGetBusData@24
|
||||||
|
ScsiPortGetDeviceBase=ScsiPortGetDeviceBase@28
|
||||||
|
ScsiPortGetLogicalUnit=ScsiPortGetLogicalUnit@16
|
||||||
|
ScsiPortGetPhysicalAddress=ScsiPortGetPhysicalAddress@16
|
||||||
|
ScsiPortGetSrb=ScsiPortGetSrb@20
|
||||||
|
ScsiPortGetUncachedExtension=ScsiPortGetUncachedExtension@12
|
||||||
|
ScsiPortGetVirtualAddress=ScsiPortGetVirtualAddress@12
|
||||||
|
ScsiPortInitialize=ScsiPortInitialize@16
|
||||||
|
ScsiPortIoMapTransfer=ScsiPortIoMapTransfer@16
|
||||||
|
ScsiPortLogError=ScsiPortLogError@28
|
||||||
|
ScsiPortMoveMemory=ScsiPortMoveMemory@12
|
||||||
|
ScsiPortNotification
|
||||||
|
ScsiPortReadPortBufferUchar=HAL.READ_PORT_BUFFER_UCHAR
|
||||||
|
ScsiPortReadPortBufferUshort=HAL.READ_PORT_BUFFER_USHORT
|
||||||
|
ScsiPortReadPortBufferUlong=HAL.READ_PORT_BUFFER_ULONG
|
||||||
|
ScsiPortReadPortUchar=HAL.READ_PORT_UCHAR
|
||||||
|
ScsiPortReadPortUshort=HAL.READ_PORT_USHORT
|
||||||
|
ScsiPortReadPortUlong=HAL.READ_PORT_ULONG
|
||||||
|
ScsiPortReadRegisterBufferUchar=NTOSKRNL.READ_REGISTER_BUFFER_UCHAR
|
||||||
|
ScsiPortReadRegisterBufferUshort=NTOSKRNL.READ_REGISTER_BUFFER_USHORT
|
||||||
|
ScsiPortReadRegisterBufferUlong=NTOSKRNL.READ_REGISTER_BUFFER_ULONG
|
||||||
|
ScsiPortReadRegisterUchar=NTOSKRNL.READ_REGISTER_UCHAR
|
||||||
|
ScsiPortReadRegisterUshort=NTOSKRNL.READ_REGISTER_USHORT
|
||||||
|
ScsiPortReadRegisterUlong=NTOSKRNL.READ_REGISTER_ULONG
|
||||||
|
ScsiPortSetBusDataByOffset=ScsiPortSetBusDataByOffset@28
|
||||||
|
ScsiPortStallExecution=HAL.KeStallExecutionProcessor
|
||||||
|
ScsiPortValidateRange=ScsiPortValidateRange@28
|
||||||
|
ScsiPortWritePortUchar=HAL.WRITE_PORT_UCHAR
|
||||||
|
ScsiPortWritePortUshort=HAL.WRITE_PORT_USHORT
|
||||||
|
ScsiPortWritePortUlong=HAL.WRITE_PORT_ULONG
|
||||||
|
ScsiPortWritePortBufferUchar=HAL.WRITE_PORT_BUFFER_UCHAR
|
||||||
|
ScsiPortWritePortBufferUshort=HAL.WRITE_PORT_BUFFER_USHORT
|
||||||
|
ScsiPortWritePortBufferUlong=HAL.WRITE_PORT_BUFFER_ULONG
|
||||||
|
ScsiPortWriteRegisterBufferUchar=NTOSKRNL.WRITE_REGISTER_BUFFER_UCHAR
|
||||||
|
ScsiPortWriteRegisterBufferUshort=NTOSKRNL.WRITE_REGISTER_BUFFER_USHORT
|
||||||
|
ScsiPortWriteRegisterBufferUlong=NTOSKRNL.WRITE_REGISTER_BUFFER_ULONG
|
||||||
|
ScsiPortWriteRegisterUchar=NTOSKRNL.WRITE_REGISTER_UCHAR
|
||||||
|
ScsiPortWriteRegisterUshort=NTOSKRNL.WRITE_REGISTER_USHORT
|
||||||
|
ScsiPortWriteRegisterUlong=NTOSKRNL.WRITE_REGISTER_ULONG
|
||||||
|
;EOF
|
37
reactos/drivers/storage/scsiport-new/scsiport.rc
Normal file
37
reactos/drivers/storage/scsiport-new/scsiport.rc
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
#include <defines.h>
|
||||||
|
#include <reactos/resource.h>
|
||||||
|
|
||||||
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
|
|
||||||
|
VS_VERSION_INFO VERSIONINFO
|
||||||
|
FILEVERSION RES_UINT_FV_MAJOR,RES_UINT_FV_MINOR,RES_UINT_FV_REVISION,RES_UINT_FV_BUILD
|
||||||
|
PRODUCTVERSION RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD
|
||||||
|
FILEFLAGSMASK 0x3fL
|
||||||
|
#ifdef _DEBUG
|
||||||
|
FILEFLAGS 0x1L
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0x0L
|
||||||
|
#endif
|
||||||
|
FILEOS 0x40004L
|
||||||
|
FILETYPE 0x2L
|
||||||
|
FILESUBTYPE 0x0L
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0"
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", RES_STR_COMPANY_NAME
|
||||||
|
VALUE "FileDescription", "SCSI Port Driver\0"
|
||||||
|
VALUE "FileVersion", "0.0.0\0"
|
||||||
|
VALUE "InternalName", "scsiport\0"
|
||||||
|
VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT
|
||||||
|
VALUE "OriginalFilename", "scsiport.sys\0"
|
||||||
|
VALUE "ProductName", RES_STR_PRODUCT_NAME
|
||||||
|
VALUE "ProductVersion", RES_STR_PRODUCT_VERSION
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200
|
||||||
|
END
|
||||||
|
END
|
100
reactos/drivers/storage/scsiport-new/scsiport_int.h
Normal file
100
reactos/drivers/storage/scsiport-new/scsiport_int.h
Normal file
|
@ -0,0 +1,100 @@
|
||||||
|
/*
|
||||||
|
* SCSI_PORT_TIMER_STATES
|
||||||
|
*
|
||||||
|
* DESCRIPTION
|
||||||
|
* An enumeration containing the states in the timer DFA
|
||||||
|
*/
|
||||||
|
typedef enum _SCSI_PORT_TIMER_STATES
|
||||||
|
{
|
||||||
|
IDETimerIdle,
|
||||||
|
IDETimerCmdWait,
|
||||||
|
IDETimerResetWaitForBusyNegate,
|
||||||
|
IDETimerResetWaitForDrdyAssert
|
||||||
|
} SCSI_PORT_TIMER_STATES;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _SCSI_PORT_DEVICE_BASE
|
||||||
|
{
|
||||||
|
LIST_ENTRY List;
|
||||||
|
|
||||||
|
PVOID MappedAddress;
|
||||||
|
ULONG NumberOfBytes;
|
||||||
|
SCSI_PHYSICAL_ADDRESS IoAddress;
|
||||||
|
ULONG SystemIoBusNumber;
|
||||||
|
} SCSI_PORT_DEVICE_BASE, *PSCSI_PORT_DEVICE_BASE;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _SCSI_PORT_LUN_EXTENSION
|
||||||
|
{
|
||||||
|
LIST_ENTRY List;
|
||||||
|
|
||||||
|
UCHAR PathId;
|
||||||
|
UCHAR TargetId;
|
||||||
|
UCHAR Lun;
|
||||||
|
|
||||||
|
BOOLEAN DeviceClaimed;
|
||||||
|
PDEVICE_OBJECT DeviceObject;
|
||||||
|
|
||||||
|
INQUIRYDATA InquiryData;
|
||||||
|
|
||||||
|
KDEVICE_QUEUE DeviceQueue;
|
||||||
|
|
||||||
|
/* More data? */
|
||||||
|
|
||||||
|
UCHAR MiniportLunExtension[1]; /* must be the last entry */
|
||||||
|
} SCSI_PORT_LUN_EXTENSION, *PSCSI_PORT_LUN_EXTENSION;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SCSI_PORT_DEVICE_EXTENSION
|
||||||
|
*
|
||||||
|
* DESCRIPTION
|
||||||
|
* First part of the port objects device extension. The second
|
||||||
|
* part is the miniport-specific device extension.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct _SCSI_PORT_DEVICE_EXTENSION
|
||||||
|
{
|
||||||
|
ULONG Length;
|
||||||
|
ULONG MiniPortExtensionSize;
|
||||||
|
PPORT_CONFIGURATION_INFORMATION PortConfig;
|
||||||
|
ULONG PortNumber;
|
||||||
|
|
||||||
|
KSPIN_LOCK IrpLock;
|
||||||
|
KSPIN_LOCK SpinLock;
|
||||||
|
PKINTERRUPT Interrupt;
|
||||||
|
PIRP CurrentIrp;
|
||||||
|
ULONG IrpFlags;
|
||||||
|
|
||||||
|
SCSI_PORT_TIMER_STATES TimerState;
|
||||||
|
LONG TimerCount;
|
||||||
|
|
||||||
|
LIST_ENTRY DeviceBaseListHead;
|
||||||
|
|
||||||
|
ULONG LunExtensionSize;
|
||||||
|
LIST_ENTRY LunExtensionListHead;
|
||||||
|
|
||||||
|
ULONG SrbExtensionSize;
|
||||||
|
|
||||||
|
PIO_SCSI_CAPABILITIES PortCapabilities;
|
||||||
|
|
||||||
|
PDEVICE_OBJECT DeviceObject;
|
||||||
|
PCONTROLLER_OBJECT ControllerObject;
|
||||||
|
|
||||||
|
PHW_STARTIO HwStartIo;
|
||||||
|
PHW_INTERRUPT HwInterrupt;
|
||||||
|
|
||||||
|
PSCSI_REQUEST_BLOCK OriginalSrb;
|
||||||
|
SCSI_REQUEST_BLOCK InternalSrb;
|
||||||
|
SENSE_DATA InternalSenseData;
|
||||||
|
|
||||||
|
/* DMA related stuff */
|
||||||
|
PADAPTER_OBJECT AdapterObject;
|
||||||
|
ULONG MapRegisterCount;
|
||||||
|
|
||||||
|
PHYSICAL_ADDRESS PhysicalAddress;
|
||||||
|
PVOID VirtualAddress;
|
||||||
|
ULONG CommonBufferLength;
|
||||||
|
|
||||||
|
UCHAR MiniPortDeviceExtension[1]; /* must be the last entry */
|
||||||
|
} SCSI_PORT_DEVICE_EXTENSION, *PSCSI_PORT_DEVICE_EXTENSION;
|
Loading…
Add table
Add a link
Reference in a new issue