📄 i60uscsi.h
字号:
#define MSG_IGNOREWIDE 0x23#define MSG_IDENT 0x80#define MSG_DISC 0x40 /* Disconnect allowed *//* SCSI MESSAGE */#define MSG_EXTEND 0x01#define MSG_SDP 0x02#define MSG_ABORT 0x06#define MSG_REJ 0x07#define MSG_NOP 0x08#define MSG_PARITY 0x09#define MSG_DEVRST 0x0C#define MSG_STAG 0x20/*********************************************************************** Target Device Control Structure**********************************************************************/typedef struct ORC_Tar_Ctrl_Struc { UBYTE TCS_DrvDASD; /* 6 */ UBYTE TCS_DrvSCSI; /* 7 */ UBYTE TCS_DrvHead; /* 8 */ UWORD TCS_DrvFlags; /* 4 */ UBYTE TCS_DrvSector; /* 7 */} ORC_TCS, *PORC_TCS;/* Bit Definition for TCF_DrvFlags */#define TCS_DF_NODASD_SUPT 0x20 /* Suppress OS/2 DASD Mgr support */#define TCS_DF_NOSCSI_SUPT 0x40 /* Suppress OS/2 SCSI Mgr support *//*********************************************************************** Host Adapter Control Structure************************************************************************/typedef struct ORC_Ha_Ctrl_Struc { USHORT HCS_Base; /* 00 */ UBYTE HCS_Index; /* 02 */ UBYTE HCS_Intr; /* 04 */ UBYTE HCS_SCSI_ID; /* 06 H/A SCSI ID */ UBYTE HCS_BIOS; /* 07 BIOS configuration */ UBYTE HCS_Flags; /* 0B */ UBYTE HCS_HAConfig1; /* 1B SCSI0MAXTags */ UBYTE HCS_MaxTar; /* 1B SCSI0MAXTags */ USHORT HCS_Units; /* Number of units this adapter */ USHORT HCS_AFlags; /* Adapter info. defined flags */ ULONG HCS_Timeout; /* Adapter timeout value */ PVOID HCS_virScbArray; /* 28 Virtual Pointer to SCB array */ U32 HCS_physScbArray; /* Scb Physical address */ PVOID HCS_virEscbArray; /* Virtual pointer to ESCB Scatter list */ U32 HCS_physEscbArray; /* scatter list Physical address */ UBYTE TargetFlag[16]; /* 30 target configuration, TCF_EN_TAG */ UBYTE MaximumTags[16]; /* 40 ORC_MAX_SCBS */ UBYTE ActiveTags[16][16]; /* 50 */ ORC_TCS HCS_Tcs[16]; /* 28 */ U32 BitAllocFlag[MAX_CHANNELS][8]; /* Max STB is 256, So 256/32 */ spinlock_t BitAllocFlagLock; ULONG pSRB_head; ULONG pSRB_tail; spinlock_t pSRB_lock;} ORC_HCS;/* Bit Definition for HCS_Flags */#define HCF_SCSI_RESET 0x01 /* SCSI BUS RESET */#define HCF_PARITY 0x02 /* parity card */#define HCF_LVDS 0x10 /* parity card *//* Bit Definition for TargetFlag */#define TCF_EN_255 0x08#define TCF_EN_TAG 0x10#define TCF_BUSY 0x20#define TCF_DISCONNECT 0x40#define TCF_SPIN_UP 0x80/* Bit Definition for HCS_AFlags */#define HCS_AF_IGNORE 0x01 /* Adapter ignore */#define HCS_AF_DISABLE_RESET 0x10 /* Adapter disable reset */#define HCS_AF_DISABLE_ADPT 0x80 /* Adapter disable *//*---------------------------------------*//* TimeOut for RESET to complete (30s) *//* *//* After a RESET the drive is checked *//* every 200ms. *//*---------------------------------------*/#define DELAYED_RESET_MAX (30*1000L)#define DELAYED_RESET_INTERVAL 200L/*----------------------------------------------*//* TimeOut for IRQ from last interrupt (5s) *//*----------------------------------------------*/#define IRQ_TIMEOUT_INTERVAL (5*1000L)/*----------------------------------------------*//* Retry Delay interval (200ms) *//*----------------------------------------------*/#define DELAYED_RETRY_INTERVAL 200L#define INQUIRY_SIZE 36#define CAPACITY_SIZE 8#define DEFAULT_SENSE_LEN 14#define DEVICE_NOT_FOUND 0x86/*----------------------------------------------*//* Definition for PCI device *//*----------------------------------------------*/#define MAX_PCI_DEVICES 21#define MAX_PCI_BUSES 8typedef struct Adpt_Struc { USHORT ADPT_BIOS; /* 0 */ UBYTE ADPT_BASE; /* 1 */ UBYTE ADPT_Bus; /* 2 */ UBYTE ADPT_Device; /* 3 */ UBYTE ADPT_Reserved[3];} JACS, *PJACS;typedef struct _NVRAM {/*----------header ---------------*/ UCHAR SubVendorID0; /* 00 - Sub Vendor ID */ UCHAR SubVendorID1; /* 00 - Sub Vendor ID */ UCHAR SubSysID0; /* 02 - Sub System ID */ UCHAR SubSysID1; /* 02 - Sub System ID */ UCHAR SubClass; /* 04 - Sub Class */ UCHAR VendorID0; /* 05 - Vendor ID */ UCHAR VendorID1; /* 05 - Vendor ID */ UCHAR DeviceID0; /* 07 - Device ID */ UCHAR DeviceID1; /* 07 - Device ID */ UCHAR Reserved0[2]; /* 09 - Reserved */ UCHAR Revision; /* 0B - Revision of data structure */ /* ----Host Adapter Structure ---- */ UCHAR NumOfCh; /* 0C - Number of SCSI channel */ UCHAR BIOSConfig1; /* 0D - BIOS configuration 1 */ UCHAR BIOSConfig2; /* 0E - BIOS boot channel&target ID */ UCHAR BIOSConfig3; /* 0F - BIOS configuration 3 */ /* ----SCSI channel Structure ---- */ /* from "CTRL-I SCSI Host Adapter SetUp menu " */ UCHAR SCSI0Id; /* 10 - Channel 0 SCSI ID */ UCHAR SCSI0Config; /* 11 - Channel 0 SCSI configuration */ UCHAR SCSI0MaxTags; /* 12 - Channel 0 Maximum tags */ UCHAR SCSI0ResetTime; /* 13 - Channel 0 Reset recovering time */ UCHAR ReservedforChannel0[2]; /* 14 - Reserved */ /* ----SCSI target Structure ---- */ /* from "CTRL-I SCSI device SetUp menu " */ UCHAR Target00Config; /* 16 - Channel 0 Target 0 config */ UCHAR Target01Config; /* 17 - Channel 0 Target 1 config */ UCHAR Target02Config; /* 18 - Channel 0 Target 2 config */ UCHAR Target03Config; /* 19 - Channel 0 Target 3 config */ UCHAR Target04Config; /* 1A - Channel 0 Target 4 config */ UCHAR Target05Config; /* 1B - Channel 0 Target 5 config */ UCHAR Target06Config; /* 1C - Channel 0 Target 6 config */ UCHAR Target07Config; /* 1D - Channel 0 Target 7 config */ UCHAR Target08Config; /* 1E - Channel 0 Target 8 config */ UCHAR Target09Config; /* 1F - Channel 0 Target 9 config */ UCHAR Target0AConfig; /* 20 - Channel 0 Target A config */ UCHAR Target0BConfig; /* 21 - Channel 0 Target B config */ UCHAR Target0CConfig; /* 22 - Channel 0 Target C config */ UCHAR Target0DConfig; /* 23 - Channel 0 Target D config */ UCHAR Target0EConfig; /* 24 - Channel 0 Target E config */ UCHAR Target0FConfig; /* 25 - Channel 0 Target F config */ UCHAR SCSI1Id; /* 26 - Channel 1 SCSI ID */ UCHAR SCSI1Config; /* 27 - Channel 1 SCSI configuration */ UCHAR SCSI1MaxTags; /* 28 - Channel 1 Maximum tags */ UCHAR SCSI1ResetTime; /* 29 - Channel 1 Reset recovering time */ UCHAR ReservedforChannel1[2]; /* 2A - Reserved */ /* ----SCSI target Structure ---- */ /* from "CTRL-I SCSI device SetUp menu " */ UCHAR Target10Config; /* 2C - Channel 1 Target 0 config */ UCHAR Target11Config; /* 2D - Channel 1 Target 1 config */ UCHAR Target12Config; /* 2E - Channel 1 Target 2 config */ UCHAR Target13Config; /* 2F - Channel 1 Target 3 config */ UCHAR Target14Config; /* 30 - Channel 1 Target 4 config */ UCHAR Target15Config; /* 31 - Channel 1 Target 5 config */ UCHAR Target16Config; /* 32 - Channel 1 Target 6 config */ UCHAR Target17Config; /* 33 - Channel 1 Target 7 config */ UCHAR Target18Config; /* 34 - Channel 1 Target 8 config */ UCHAR Target19Config; /* 35 - Channel 1 Target 9 config */ UCHAR Target1AConfig; /* 36 - Channel 1 Target A config */ UCHAR Target1BConfig; /* 37 - Channel 1 Target B config */ UCHAR Target1CConfig; /* 38 - Channel 1 Target C config */ UCHAR Target1DConfig; /* 39 - Channel 1 Target D config */ UCHAR Target1EConfig; /* 3A - Channel 1 Target E config */ UCHAR Target1FConfig; /* 3B - Channel 1 Target F config */ UCHAR reserved[3]; /* 3C - Reserved */ /* ---------- CheckSum ---------- */ UCHAR CheckSum; /* 3F - Checksum of NVRam */} NVRAM, *PNVRAM;/* Bios Configuration for nvram->BIOSConfig1 */#define NBC_BIOSENABLE 0x01 /* BIOS enable */#define NBC_CDROM 0x02 /* Support bootable CDROM */#define NBC_REMOVABLE 0x04 /* Support removable drive *//* Bios Configuration for nvram->BIOSConfig2 */#define NBB_TARGET_MASK 0x0F /* Boot SCSI target ID number */#define NBB_CHANL_MASK 0xF0 /* Boot SCSI channel number *//* Bit definition for nvram->SCSIConfig */#define NCC_BUSRESET 0x01 /* Reset SCSI bus at power up */#define NCC_PARITYCHK 0x02 /* SCSI parity enable */#define NCC_LVDS 0x10 /* Enable LVDS */#define NCC_ACTTERM1 0x20 /* Enable active terminator 1 */#define NCC_ACTTERM2 0x40 /* Enable active terminator 2 */#define NCC_AUTOTERM 0x80 /* Enable auto termination *//* Bit definition for nvram->TargetxConfig */#define NTC_PERIOD 0x07 /* Maximum Sync. Speed */#define NTC_1GIGA 0x08 /* 255 head / 63 sectors (64/32) */#define NTC_NO_SYNC 0x10 /* NO SYNC. NEGO */#define NTC_NO_WIDESYNC 0x20 /* NO WIDE SYNC. NEGO */#define NTC_DISC_ENABLE 0x40 /* Enable SCSI disconnect */#define NTC_SPINUP 0x80 /* Start disk drive *//* Default NVRam values */#define NBC_DEFAULT (NBC_ENABLE)#define NCC_DEFAULT (NCC_BUSRESET | NCC_AUTOTERM | NCC_PARITYCHK)#define NCC_MAX_TAGS 0x20 /* Maximum tags per target */#define NCC_RESET_TIME 0x0A /* SCSI RESET recovering time */#define NTC_DEFAULT (NTC_1GIGA | NTC_NO_WIDESYNC | NTC_DISC_ENABLE)typedef union { /* Union define for mechanism 1 */ struct { unsigned char RegNum; unsigned char FcnNum:3; unsigned char DeviceNum:5; unsigned char BusNum; unsigned char Reserved:7; unsigned char Enable:1; } sConfigAdr; unsigned long lConfigAdr;} CONFIG_ADR;typedef union { /* Union define for mechanism 2 */ struct { unsigned char RegNum; unsigned char DeviceNum; unsigned short Reserved; } sHostAdr; unsigned long lHostAdr;} HOST_ADR;#define ORC_RD(x,y) (UCHAR)(inb( (int)((ULONG)((ULONG)x+(UCHAR)y)) ))#define ORC_RDLONG(x,y) (long)(inl((int)((ULONG)((ULONG)x+(UCHAR)y)) ))#define ORC_WR( adr,data) outb( (UCHAR)(data), (int)(adr))#define ORC_WRSHORT(adr,data) outw( (UWORD)(data), (int)(adr))#define ORC_WRLONG( adr,data) outl( (ULONG)(data), (int)(adr))#define SCSI_ABORT_SNOOZE 0#define SCSI_ABORT_SUCCESS 1#define SCSI_ABORT_PENDING 2#define SCSI_ABORT_BUSY 3#define SCSI_ABORT_NOT_RUNNING 4#define SCSI_ABORT_ERROR 5#define SCSI_RESET_SNOOZE 0#define SCSI_RESET_PUNT 1#define SCSI_RESET_SUCCESS 2#define SCSI_RESET_PENDING 3#define SCSI_RESET_WAKEUP 4#define SCSI_RESET_NOT_RUNNING 5#define SCSI_RESET_ERROR 6#define SCSI_RESET_SYNCHRONOUS 0x01#define SCSI_RESET_ASYNCHRONOUS 0x02#define SCSI_RESET_SUGGEST_BUS_RESET 0x04#define SCSI_RESET_SUGGEST_HOST_RESET 0x08#define SCSI_RESET_BUS_RESET 0x100#define SCSI_RESET_HOST_RESET 0x200#define SCSI_RESET_ACTION 0xff
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -