⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 buslogic.h

📁 linux 内核源代码
💻 H
📖 第 1 页 / 共 3 页
字号:
	bool IRQ_Channel15:1;	/* Byte 1 Bit 6 */	unsigned char:1;	/* Byte 1 Bit 7 */	unsigned char HostAdapterID:4;	/* Byte 2 Bits 0-3 */	unsigned char:4;	/* Byte 2 Bits 4-7 */};/*  Define the Inquire Setup Information reply structure.*/struct BusLogic_SynchronousValue {	unsigned char Offset:4;	/* Bits 0-3 */	unsigned char TransferPeriod:3;	/* Bits 4-6 */	bool Synchronous:1;	/* Bit 7 */};struct BusLogic_SetupInformation {	bool SynchronousInitiationEnabled:1;	/* Byte 0 Bit 0 */	bool ParityCheckingEnabled:1;		/* Byte 0 Bit 1 */	unsigned char:6;	/* Byte 0 Bits 2-7 */	unsigned char BusTransferRate;	/* Byte 1 */	unsigned char PreemptTimeOnBus;	/* Byte 2 */	unsigned char TimeOffBus;	/* Byte 3 */	unsigned char MailboxCount;	/* Byte 4 */	unsigned char MailboxAddress[3];	/* Bytes 5-7 */	struct BusLogic_SynchronousValue SynchronousValuesID0to7[8];	/* Bytes 8-15 */	unsigned char DisconnectPermittedID0to7;	/* Byte 16 */	unsigned char Signature;	/* Byte 17 */	unsigned char CharacterD;	/* Byte 18 */	unsigned char HostBusType;	/* Byte 19 */	unsigned char WideTransfersPermittedID0to7;	/* Byte 20 */	unsigned char WideTransfersActiveID0to7;	/* Byte 21 */	struct BusLogic_SynchronousValue SynchronousValuesID8to15[8];	/* Bytes 22-29 */	unsigned char DisconnectPermittedID8to15;	/* Byte 30 */	unsigned char:8;	/* Byte 31 */	unsigned char WideTransfersPermittedID8to15;	/* Byte 32 */	unsigned char WideTransfersActiveID8to15;	/* Byte 33 */};/*  Define the Initialize Extended Mailbox request structure.*/struct BusLogic_ExtendedMailboxRequest {	unsigned char MailboxCount;	/* Byte 0 */	u32 BaseMailboxAddress;	/* Bytes 1-4 */} PACKED;/*  Define the Inquire PCI Host Adapter Information reply type.  The ISA  Compatible I/O Port values are defined here and are also used with  the Modify I/O Address command.*/enum BusLogic_ISACompatibleIOPort {	BusLogic_IO_330 = 0,	BusLogic_IO_334 = 1,	BusLogic_IO_230 = 2,	BusLogic_IO_234 = 3,	BusLogic_IO_130 = 4,	BusLogic_IO_134 = 5,	BusLogic_IO_Disable = 6,	BusLogic_IO_Disable2 = 7} PACKED;struct BusLogic_PCIHostAdapterInformation {	enum BusLogic_ISACompatibleIOPort ISACompatibleIOPort;	/* Byte 0 */	unsigned char PCIAssignedIRQChannel;	/* Byte 1 */	bool LowByteTerminated:1;	/* Byte 2 Bit 0 */	bool HighByteTerminated:1;	/* Byte 2 Bit 1 */	unsigned char:2;	/* Byte 2 Bits 2-3 */	bool JP1:1;		/* Byte 2 Bit 4 */	bool JP2:1;		/* Byte 2 Bit 5 */	bool JP3:1;		/* Byte 2 Bit 6 */	bool GenericInfoValid:1;/* Byte 2 Bit 7 */	unsigned char:8;	/* Byte 3 */};/*  Define the Inquire Extended Setup Information reply structure.*/struct BusLogic_ExtendedSetupInformation {	unsigned char BusType;	/* Byte 0 */	unsigned char BIOS_Address;	/* Byte 1 */	unsigned short ScatterGatherLimit;	/* Bytes 2-3 */	unsigned char MailboxCount;	/* Byte 4 */	u32 BaseMailboxAddress;	/* Bytes 5-8 */	struct {		unsigned char:2;	/* Byte 9 Bits 0-1 */		bool FastOnEISA:1;	/* Byte 9 Bit 2 */		unsigned char:3;	/* Byte 9 Bits 3-5 */		bool LevelSensitiveInterrupt:1;	/* Byte 9 Bit 6 */		unsigned char:1;	/* Byte 9 Bit 7 */	} Misc;	unsigned char FirmwareRevision[3];	/* Bytes 10-12 */	bool HostWideSCSI:1;		/* Byte 13 Bit 0 */	bool HostDifferentialSCSI:1;	/* Byte 13 Bit 1 */	bool HostSupportsSCAM:1;	/* Byte 13 Bit 2 */	bool HostUltraSCSI:1;		/* Byte 13 Bit 3 */	bool HostSmartTermination:1;	/* Byte 13 Bit 4 */	unsigned char:3;	/* Byte 13 Bits 5-7 */} PACKED;/*  Define the Enable Strict Round Robin Mode request type.*/enum BusLogic_RoundRobinModeRequest {	BusLogic_AggressiveRoundRobinMode = 0,	BusLogic_StrictRoundRobinMode = 1} PACKED;/*  Define the Fetch Host Adapter Local RAM request type.*/#define BusLogic_BIOS_BaseOffset		0#define BusLogic_AutoSCSI_BaseOffset		64struct BusLogic_FetchHostAdapterLocalRAMRequest {	unsigned char ByteOffset;	/* Byte 0 */	unsigned char ByteCount;	/* Byte 1 */};/*  Define the Host Adapter Local RAM AutoSCSI structure.*/struct BusLogic_AutoSCSIData {	unsigned char InternalFactorySignature[2];	/* Bytes 0-1 */	unsigned char InformationByteCount;	/* Byte 2 */	unsigned char HostAdapterType[6];	/* Bytes 3-8 */	unsigned char:8;	/* Byte 9 */	bool FloppyEnabled:1;		/* Byte 10 Bit 0 */	bool FloppySecondary:1;		/* Byte 10 Bit 1 */	bool LevelSensitiveInterrupt:1;	/* Byte 10 Bit 2 */	unsigned char:2;	/* Byte 10 Bits 3-4 */	unsigned char SystemRAMAreaForBIOS:3;	/* Byte 10 Bits 5-7 */	unsigned char DMA_Channel:7;	/* Byte 11 Bits 0-6 */	bool DMA_AutoConfiguration:1;	/* Byte 11 Bit 7 */	unsigned char IRQ_Channel:7;	/* Byte 12 Bits 0-6 */	bool IRQ_AutoConfiguration:1;	/* Byte 12 Bit 7 */	unsigned char DMA_TransferRate;	/* Byte 13 */	unsigned char SCSI_ID;	/* Byte 14 */	bool LowByteTerminated:1;	/* Byte 15 Bit 0 */	bool ParityCheckingEnabled:1;	/* Byte 15 Bit 1 */	bool HighByteTerminated:1;	/* Byte 15 Bit 2 */	bool NoisyCablingEnvironment:1;	/* Byte 15 Bit 3 */	bool FastSynchronousNegotiation:1;	/* Byte 15 Bit 4 */	bool BusResetEnabled:1;		/* Byte 15 Bit 5 */	 bool:1;		/* Byte 15 Bit 6 */	bool ActiveNegationEnabled:1;	/* Byte 15 Bit 7 */	unsigned char BusOnDelay;	/* Byte 16 */	unsigned char BusOffDelay;	/* Byte 17 */	bool HostAdapterBIOSEnabled:1;		/* Byte 18 Bit 0 */	bool BIOSRedirectionOfINT19Enabled:1;	/* Byte 18 Bit 1 */	bool ExtendedTranslationEnabled:1;	/* Byte 18 Bit 2 */	bool MapRemovableAsFixedEnabled:1;	/* Byte 18 Bit 3 */	 bool:1;		/* Byte 18 Bit 4 */	bool BIOSSupportsMoreThan2DrivesEnabled:1;	/* Byte 18 Bit 5 */	bool BIOSInterruptModeEnabled:1;	/* Byte 18 Bit 6 */	bool FlopticalSupportEnabled:1;		/* Byte 19 Bit 7 */	unsigned short DeviceEnabled;	/* Bytes 19-20 */	unsigned short WidePermitted;	/* Bytes 21-22 */	unsigned short FastPermitted;	/* Bytes 23-24 */	unsigned short SynchronousPermitted;	/* Bytes 25-26 */	unsigned short DisconnectPermitted;	/* Bytes 27-28 */	unsigned short SendStartUnitCommand;	/* Bytes 29-30 */	unsigned short IgnoreInBIOSScan;	/* Bytes 31-32 */	unsigned char PCIInterruptPin:2;	/* Byte 33 Bits 0-1 */	unsigned char HostAdapterIOPortAddress:2;	/* Byte 33 Bits 2-3 */	bool StrictRoundRobinModeEnabled:1;	/* Byte 33 Bit 4 */	bool VESABusSpeedGreaterThan33MHz:1;	/* Byte 33 Bit 5 */	bool VESABurstWriteEnabled:1;	/* Byte 33 Bit 6 */	bool VESABurstReadEnabled:1;	/* Byte 33 Bit 7 */	unsigned short UltraPermitted;	/* Bytes 34-35 */	unsigned int:32;	/* Bytes 36-39 */	unsigned char:8;	/* Byte 40 */	unsigned char AutoSCSIMaximumLUN;	/* Byte 41 */	 bool:1;		/* Byte 42 Bit 0 */	bool SCAM_Dominant:1;	/* Byte 42 Bit 1 */	bool SCAM_Enabled:1;	/* Byte 42 Bit 2 */	bool SCAM_Level2:1;	/* Byte 42 Bit 3 */	unsigned char:4;	/* Byte 42 Bits 4-7 */	bool INT13ExtensionEnabled:1;	/* Byte 43 Bit 0 */	 bool:1;		/* Byte 43 Bit 1 */	bool CDROMBootEnabled:1;	/* Byte 43 Bit 2 */	unsigned char:5;	/* Byte 43 Bits 3-7 */	unsigned char BootTargetID:4;	/* Byte 44 Bits 0-3 */	unsigned char BootChannel:4;	/* Byte 44 Bits 4-7 */	unsigned char ForceBusDeviceScanningOrder:1;	/* Byte 45 Bit 0 */	unsigned char:7;	/* Byte 45 Bits 1-7 */	unsigned short NonTaggedToAlternateLUNPermitted;	/* Bytes 46-47 */	unsigned short RenegotiateSyncAfterCheckCondition;	/* Bytes 48-49 */	unsigned char Reserved[10];	/* Bytes 50-59 */	unsigned char ManufacturingDiagnostic[2];	/* Bytes 60-61 */	unsigned short Checksum;	/* Bytes 62-63 */} PACKED;/*  Define the Host Adapter Local RAM Auto SCSI Byte 45 structure.*/struct BusLogic_AutoSCSIByte45 {	unsigned char ForceBusDeviceScanningOrder:1;	/* Bit 0 */	unsigned char:7;	/* Bits 1-7 */};/*  Define the Host Adapter Local RAM BIOS Drive Map Byte structure.*/#define BusLogic_BIOS_DriveMapOffset		17struct BusLogic_BIOSDriveMapByte {	unsigned char TargetIDBit3:1;	/* Bit 0 */	unsigned char:2;	/* Bits 1-2 */	enum BusLogic_BIOS_DiskGeometryTranslation DiskGeometry:2;	/* Bits 3-4 */	unsigned char TargetID:3;	/* Bits 5-7 */};/*  Define the Set CCB Format request type.  Extended LUN Format CCBs are  necessary to support more than 8 Logical Units per Target Device.*/enum BusLogic_SetCCBFormatRequest {	BusLogic_LegacyLUNFormatCCB = 0,	BusLogic_ExtendedLUNFormatCCB = 1} PACKED;/*  Define the Outgoing Mailbox Action Codes.*/enum BusLogic_ActionCode {	BusLogic_OutgoingMailboxFree = 0x00,	BusLogic_MailboxStartCommand = 0x01,	BusLogic_MailboxAbortCommand = 0x02} PACKED;/*  Define the Incoming Mailbox Completion Codes.  The MultiMaster Firmware  only uses codes 0 - 4.  The FlashPoint SCCB Manager has no mailboxes, so  completion codes are stored in the CCB; it only uses codes 1, 2, 4, and 5.*/enum BusLogic_CompletionCode {	BusLogic_IncomingMailboxFree = 0x00,	BusLogic_CommandCompletedWithoutError = 0x01,	BusLogic_CommandAbortedAtHostRequest = 0x02,	BusLogic_AbortedCommandNotFound = 0x03,	BusLogic_CommandCompletedWithError = 0x04,	BusLogic_InvalidCCB = 0x05} PACKED;/*  Define the Command Control Block (CCB) Opcodes.*/enum BusLogic_CCB_Opcode {	BusLogic_InitiatorCCB = 0x00,	BusLogic_TargetCCB = 0x01,	BusLogic_InitiatorCCB_ScatterGather = 0x02,	BusLogic_InitiatorCCB_ResidualDataLength = 0x03,	BusLogic_InitiatorCCB_ScatterGatherResidual = 0x04,	BusLogic_BusDeviceReset = 0x81} PACKED;/*  Define the CCB Data Direction Codes.*/enum BusLogic_DataDirection {	BusLogic_UncheckedDataTransfer = 0,	BusLogic_DataInLengthChecked = 1,	BusLogic_DataOutLengthChecked = 2,	BusLogic_NoDataTransfer = 3};/*  Define the Host Adapter Status Codes.  The MultiMaster Firmware does not  return status code 0x0C; it uses 0x12 for both overruns and underruns.*/enum BusLogic_HostAdapterStatus {	BusLogic_CommandCompletedNormally = 0x00,	BusLogic_LinkedCommandCompleted = 0x0A,	BusLogic_LinkedCommandCompletedWithFlag = 0x0B,	BusLogic_DataUnderRun = 0x0C,	BusLogic_SCSISelectionTimeout = 0x11,	BusLogic_DataOverRun = 0x12,	BusLogic_UnexpectedBusFree = 0x13,	BusLogic_InvalidBusPhaseRequested = 0x14,	BusLogic_InvalidOutgoingMailboxActionCode = 0x15,	BusLogic_InvalidCommandOperationCode = 0x16,	BusLogic_LinkedCCBhasInvalidLUN = 0x17,	BusLogic_InvalidCommandParameter = 0x1A,	BusLogic_AutoRequestSenseFailed = 0x1B,	BusLogic_TaggedQueuingMessageRejected = 0x1C,	BusLogic_UnsupportedMessageReceived = 0x1D,	BusLogic_HostAdapterHardwareFailed = 0x20,	BusLogic_TargetFailedResponseToATN = 0x21,	BusLogic_HostAdapterAssertedRST = 0x22,	BusLogic_OtherDeviceAssertedRST = 0x23,	BusLogic_TargetDeviceReconnectedImproperly = 0x24,	BusLogic_HostAdapterAssertedBusDeviceReset = 0x25,	BusLogic_AbortQueueGenerated = 0x26,	BusLogic_HostAdapterSoftwareError = 0x27,	BusLogic_HostAdapterHardwareTimeoutError = 0x30,	BusLogic_SCSIParityErrorDetected = 0x34} PACKED;/*  Define the SCSI Target Device Status Codes.*/enum BusLogic_TargetDeviceStatus {	BusLogic_OperationGood = 0x00,	BusLogic_CheckCondition = 0x02,	BusLogic_DeviceBusy = 0x08} PACKED;/*  Define the Queue Tag Codes.*/enum BusLogic_QueueTag {	BusLogic_SimpleQueueTag = 0,	BusLogic_HeadOfQueueTag = 1,	BusLogic_OrderedQueueTag = 2,	BusLogic_ReservedQT = 3};/*  Define the SCSI Command Descriptor Block (CDB).*/#define BusLogic_CDB_MaxLength			12typedef unsigned char SCSI_CDB_T[BusLogic_CDB_MaxLength];/*  Define the Scatter/Gather Segment structure required by the MultiMaster  Firmware Interface and the FlashPoint SCCB Manager.*/struct BusLogic_ScatterGatherSegment {	u32 SegmentByteCount;	/* Bytes 0-3 */	u32 SegmentDataPointer;	/* Bytes 4-7 */};/*  Define the Driver CCB Status Codes.*/enum BusLogic_CCB_Status {	BusLogic_CCB_Free = 0,	BusLogic_CCB_Active = 1,	BusLogic_CCB_Completed = 2,	BusLogic_CCB_Reset = 3} PACKED;/*  Define the 32 Bit Mode Command Control Block (CCB) structure.  The first 40  bytes are defined by and common to both the MultiMaster Firmware and the  FlashPoint SCCB Manager.  The next 60 bytes are defined by the FlashPoint  SCCB Manager.  The remaining components are defined by the Linux BusLogic  Driver.  Extended LUN Format CCBs differ from Legacy LUN Format 32 Bit Mode  CCBs only in having the TagEnable and QueueTag fields moved from byte 17 to  byte 1, and the Logical Unit field in byte 17 expanded to 6 bits.  In theory,  Extended LUN Format CCBs can support up to 64 Logical Units, but in practice  many devices will respond improperly to Logical Units between 32 and 63, and  the SCSI-2 specification defines Bit 5 as LUNTAR.  Extended LUN Format CCBs  are used by recent versions of the MultiMaster Firmware, as well as by the  FlashPoint SCCB Manager; the FlashPoint SCCB Manager only supports 32 Logical  Units.  Since 64 Logical Units are unlikely to be needed in practice, and  since they are problematic for the above reasons, and since limiting them to  5 bits simplifies the CCB structure definition, this driver only supports  32 Logical Units per Target Device.*/struct BusLogic_CCB {	/*	   MultiMaster Firmware and FlashPoint SCCB Manager Common Portion.	 */	enum BusLogic_CCB_Opcode Opcode;	/* Byte 0 */	unsigned char:3;	/* Byte 1 Bits 0-2 */	enum BusLogic_DataDirection DataDirection:2;	/* Byte 1 Bits 3-4 */	bool TagEnable:1;	/* Byte 1 Bit 5 */	enum BusLogic_QueueTag QueueTag:2;	/* Byte 1 Bits 6-7 */	unsigned char CDB_Length;	/* Byte 2 */	unsigned char SenseDataLength;	/* Byte 3 */	u32 DataLength;		/* Bytes 4-7 */	u32 DataPointer;	/* Bytes 8-11 */	unsigned char:8;	/* Byte 12 */	unsigned char:8;	/* Byte 13 */	enum BusLogic_HostAdapterStatus HostAdapterStatus;	/* Byte 14 */	enum BusLogic_TargetDeviceStatus TargetDeviceStatus;	/* Byte 15 */	unsigned char TargetID;	/* Byte 16 */	unsigned char LogicalUnit:5;	/* Byte 17 Bits 0-4 */	bool LegacyTagEnable:1;	/* Byte 17 Bit 5 */	enum BusLogic_QueueTag LegacyQueueTag:2;	/* Byte 17 Bits 6-7 */	SCSI_CDB_T CDB;		/* Bytes 18-29 */	unsigned char:8;	/* Byte 30 */	unsigned char:8;	/* Byte 31 */	unsigned int:32;	/* Bytes 32-35 */	u32 SenseDataPointer;	/* Bytes 36-39 */	/*	   FlashPoint SCCB Manager Defined Portion.	 */	void (*CallbackFunction) (struct BusLogic_CCB *);	/* Bytes 40-43 */	u32 BaseAddress;	/* Bytes 44-47 */	enum BusLogic_CompletionCode CompletionCode;	/* Byte 48 */#ifndef CONFIG_SCSI_OMIT_FLASHPOINT	unsigned char:8;	/* Byte 49 */	unsigned short OS_Flags;	/* Bytes 50-51 */	unsigned char Private[48];	/* Bytes 52-99 */#endif	/*	   BusLogic Linux Driver Defined Portion.	 */	dma_addr_t AllocationGroupHead;	unsigned int AllocationGroupSize;	u32 DMA_Handle;	enum BusLogic_CCB_Status Status;	unsigned long SerialNumber;	struct scsi_cmnd *Command;	struct BusLogic_HostAdapter *HostAdapter;	struct BusLogic_CCB *Next;	struct BusLogic_CCB *NextAll;	struct BusLogic_ScatterGatherSegment	 ScatterGatherList[BusLogic_ScatterGatherLimit];};/*  Define the 32 Bit Mode Outgoing Mailbox structure.*/struct BusLogic_OutgoingMailbox {	u32 CCB;		/* Bytes 0-3 */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -