patch-1.3.89 linux/drivers/scsi/BusLogic.h
Next file: linux/drivers/scsi/ChangeLog
Previous file: linux/drivers/scsi/BusLogic.c
Back to the patch index
Back to the overall index
- Lines: 661
- Date:
Sun Apr 14 11:21:08 1996
- Orig file:
v1.3.88/linux/drivers/scsi/BusLogic.h
- Orig date:
Sat Mar 9 15:41:12 1996
diff -u --recursive --new-file v1.3.88/linux/drivers/scsi/BusLogic.h linux/drivers/scsi/BusLogic.h
@@ -4,7 +4,22 @@
Copyright 1995 by Leonard N. Zubkoff <lnz@dandelion.com>
- See BusLogic.c for licensing information.
+ This program is free software; you may redistribute and/or modify it under
+ the terms of the GNU General Public License Version 2 as published by the
+ Free Software Foundation, provided that none of the source code or runtime
+ copyright notices are removed or modified.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for complete details.
+
+ The author respectfully requests that any modifications to this software be
+ sent directly to him for evaluation and testing.
+
+ Special thanks to Wayne Yen and Alex Win of BusLogic, whose advice has been
+ invaluable, to David Gentzel, for writing the original Linux BusLogic driver,
+ and to Paul Gortmaker, for being such a dedicated test site.
*/
@@ -17,6 +32,7 @@
typedef struct pt_regs Registers_T;
typedef Scsi_Host_Template SCSI_Host_Template_T;
typedef struct Scsi_Host SCSI_Host_T;
+typedef struct scsi_device SCSI_Device_T;
typedef struct scsi_disk SCSI_Disk_T;
typedef struct scsi_cmnd SCSI_Command_T;
typedef struct scatterlist SCSI_ScatterList_T;
@@ -33,7 +49,7 @@
int BusLogic_QueueCommand(SCSI_Command_T *,
void (*CompletionRoutine)(SCSI_Command_T *));
int BusLogic_AbortCommand(SCSI_Command_T *);
-int BusLogic_ResetCommand(SCSI_Command_T *);
+int BusLogic_ResetCommand(SCSI_Command_T *, unsigned int);
int BusLogic_BIOSDiskParameters(SCSI_Disk_T *, KernelDevice_T, int *);
@@ -87,47 +103,30 @@
/*
- Define the maximum number of Target IDs supported by this driver.
+ Define the maximum number of Target Devices supported by this driver.
*/
-#define BusLogic_MaxTargetIDs 16
-
-
-/*
- Define the number of Incoming and Outgoing Mailboxes used by this driver.
- The maximum possible value is 255, since the MailboxCount parameter to the
- Initialize Extended Mailbox command is limited to a single byte.
-*/
-
-#define BusLogic_MailboxCount 64
-
-
-/*
- Define the number of Command Control Blocks (CCBs) to create during
- initialization for each Host Adapter. Additional CCBs will be allocated
- if necessary as commands are queued.
-*/
-
-#define BusLogic_InitialCCBs 32
+#define BusLogic_MaxTargetDevices 16
/*
Define the maximum number of Scatter/Gather Segments used by this driver.
- For maximum performance, it is important that this limit be at least as
- large as the maximum single request generated by the routine make_request.
+ For optimal performance, it is important that this limit be at least as
+ large as the maximum single request generated by the I/O Subsystem.
*/
#define BusLogic_ScatterGatherLimit 128
/*
- Define the default number of Concurrent Commands per Logical Unit to allow
- for Target Devices depending on whether or not ISA bounce buffers are
- required.
+ Define the maximum and default Queue Depth to allow for Target Devices
+ depending on whether or not they support Tagged Queuing and whether or not
+ ISA Bounce Buffers are required.
*/
-#define BusLogic_Concurrency 7
-#define BusLogic_Concurrency_BB 1
+#define BusLogic_MaxTaggedQueueDepth 31
+#define BusLogic_TaggedQueueDepth_BB 2
+#define BusLogic_UntaggedQueueDepth 3
/*
@@ -155,21 +154,22 @@
#define BusLogic_TraceHardReset 2
#define BusLogic_TraceConfiguration 4
#define BusLogic_TraceErrors 8
+#define BusLogic_TraceQueueDepths 16
/*
- Define the possible Error Recovery Options.
+ Define the possible Error Recovery Strategy Options.
*/
-#define BusLogic_ErrorRecoveryDefault 0
-#define BusLogic_ErrorRecoveryHardReset 1
-#define BusLogic_ErrorRecoveryBusDeviceReset 2
-#define BusLogic_ErrorRecoveryNone 3
+#define BusLogic_ErrorRecovery_Default 0
+#define BusLogic_ErrorRecovery_HardReset 1
+#define BusLogic_ErrorRecovery_BusDeviceReset 2
+#define BusLogic_ErrorRecovery_None 3
static char
- *BusLogic_ErrorRecoveryOptions[] =
+ *BusLogic_ErrorRecoveryStrategyNames[] =
{ "Default", "Hard Reset", "Bus Device Reset", "None" },
- *BusLogic_ErrorRecoveryOptions2[] =
+ *BusLogic_ErrorRecoveryStrategyLetters[] =
{ "D", "H", "B", "N" };
@@ -250,10 +250,10 @@
{
BusLogic_TestCommandCompleteInterrupt = 0x00, /* documented */
BusLogic_InitializeMailbox = 0x01, /* documented */
- BusLogic_StartMailboxCommand = 0x02, /* documented */
- BusLogic_StartBIOSCommand = 0x03, /* documented */
+ BusLogic_ExecuteMailboxCommand = 0x02, /* documented */
+ BusLogic_ExecuteBIOSCommand = 0x03, /* documented */
BusLogic_InquireBoardID = 0x04, /* documented */
- BusLogic_EnableOutgoingMailboxAvailableIRQ = 0x05, /* documented */
+ BusLogic_EnableOutgoingMailboxAvailableInt = 0x05, /* documented */
BusLogic_SetSCSISelectionTimeout = 0x06, /* documented */
BusLogic_SetPreemptTimeOnBus = 0x07, /* documented */
BusLogic_SetTimeOffBus = 0x08, /* ISA Bus only */
@@ -270,13 +270,16 @@
BusLogic_HostAdapterDiagnostic = 0x20, /* documented */
BusLogic_SetAdapterOptions = 0x21, /* documented */
BusLogic_InquireInstalledDevicesID8to15 = 0x23, /* Wide only */
+ BusLogic_InquireDevices = 0x24, /* "W" and "C" only */
BusLogic_InitializeExtendedMailbox = 0x81, /* documented */
BusLogic_InquireFirmwareVersion3rdDigit = 0x84, /* undocumented */
BusLogic_InquireFirmwareVersionLetter = 0x85, /* undocumented */
+ BusLogic_InquireGenericIOPortInformation = 0x86, /* PCI only */
BusLogic_InquireBoardModelNumber = 0x8B, /* undocumented */
BusLogic_InquireSynchronousPeriod = 0x8C, /* undocumented */
BusLogic_InquireExtendedSetupInformation = 0x8D, /* documented */
BusLogic_EnableStrictRoundRobinMode = 0x8F, /* documented */
+ BusLogic_FetchHostAdapterLocalRAM = 0x91, /* undocumented */
BusLogic_ModifyIOAddress = 0x95, /* PCI only */
BusLogic_EnableWideModeCCB = 0x96 /* Wide only */
}
@@ -289,24 +292,32 @@
typedef struct BusLogic_BoardID
{
- unsigned char BoardType;
- unsigned char CustomFeatures;
- unsigned char FirmwareVersion1stDigit;
- unsigned char FirmwareVersion2ndDigit;
+ unsigned char BoardType; /* Byte 0 */
+ unsigned char CustomFeatures; /* Byte 1 */
+ unsigned char FirmwareVersion1stDigit; /* Byte 2 */
+ unsigned char FirmwareVersion2ndDigit; /* Byte 3 */
}
BusLogic_BoardID_T;
/*
Define the Inquire Installed Devices ID 0 to 7 and Inquire Installed
- Devices ID 8 to 15 reply type. For each Target ID, a byte is returned
+ Devices ID 8 to 15 reply type. For each Target Device, a byte is returned
where bit 0 set indicates that Logical Unit 0 exists, bit 1 set indicates
that Logical Unit 1 exists, and so on.
*/
typedef unsigned char BusLogic_InstalledDevices8_T[8];
-typedef unsigned char BusLogic_InstalledDevices_T[BusLogic_MaxTargetIDs];
+
+/*
+ Define the Inquire Devices reply type. Inquire Devices only tests Logical
+ Unit 0 of each Target Device unlike Inquire Installed Devices which tests
+ Logical Units 0 - 7. Two bytes are returned, where bit 0 set indicates
+ that Target Device 0 exists, and so on.
+*/
+
+typedef unsigned short BusLogic_InstalledDevices_T;
/*
@@ -315,20 +326,20 @@
typedef struct BusLogic_Configuration
{
- unsigned char :5; /* Byte 0: DMA Channel */
- boolean DMA_Channel5:1;
- boolean DMA_Channel6:1;
- boolean DMA_Channel7:1;
- boolean IRQ_Channel9:1; /* Byte 1: IRQ Channel */
- boolean IRQ_Channel10:1;
- boolean IRQ_Channel11:1;
- boolean IRQ_Channel12:1;
- unsigned char :1;
- boolean IRQ_Channel14:1;
- boolean IRQ_Channel15:1;
- unsigned char :1;
- unsigned char HostAdapterID:4; /* Byte 2: Host Adapter ID */
- unsigned char :4;
+ unsigned char :5; /* Byte 0 Bits 0-4 */
+ boolean DMA_Channel5:1; /* Byte 0 Bit 5 */
+ boolean DMA_Channel6:1; /* Byte 0 Bit 6 */
+ boolean DMA_Channel7:1; /* Byte 0 Bit 7 */
+ boolean IRQ_Channel9:1; /* Byte 1 Bit 0 */
+ boolean IRQ_Channel10:1; /* Byte 1 Bit 1 */
+ boolean IRQ_Channel11:1; /* Byte 1 Bit 2 */
+ boolean IRQ_Channel12:1; /* Byte 1 Bit 3 */
+ unsigned char :1; /* Byte 1 Bit 4 */
+ boolean IRQ_Channel14:1; /* Byte 1 Bit 5 */
+ boolean 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 */
}
BusLogic_Configuration_T;
@@ -339,9 +350,9 @@
typedef struct BusLogic_SynchronousValue
{
- unsigned char Offset:4;
- unsigned char TransferPeriod:3;
- boolean Synchronous:1;
+ unsigned char Offset:4; /* Bits 0-3 */
+ unsigned char TransferPeriod:3; /* Bits 4-6 */
+ boolean Synchronous:1; /* Bit 7 */
}
BusLogic_SynchronousValue_T;
@@ -349,27 +360,27 @@
BusLogic_SynchronousValues8_T[8];
typedef BusLogic_SynchronousValue_T
- BusLogic_SynchronousValues_T[BusLogic_MaxTargetIDs];
+ BusLogic_SynchronousValues_T[BusLogic_MaxTargetDevices];
typedef struct BusLogic_SetupInformation
{
- boolean SynchronousInitiationEnabled:1; /* Byte 0 */
- boolean ParityCheckEnabled:1;
- unsigned char :6;
- 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 */
+ boolean SynchronousInitiationEnabled:1; /* Byte 0 Bit 0 */
+ boolean ParityCheckEnabled: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 */
BusLogic_SynchronousValues8_T SynchronousValuesID0to7; /* Bytes 8-15 */
- unsigned char DisconnectPermittedID0to7; /* Byte 16 */
- unsigned char Signature; /* Byte 17 */
- unsigned char CharacterD; /* Byte 18 */
- unsigned char BusLetter; /* Byte 19 */
- unsigned char :8; /* Byte 20 */
- unsigned char :8; /* Byte 21 */
+ unsigned char DisconnectPermittedID0to7; /* Byte 16 */
+ unsigned char Signature; /* Byte 17 */
+ unsigned char CharacterD; /* Byte 18 */
+ unsigned char BusLetter; /* Byte 19 */
+ unsigned char :8; /* Byte 20 */
+ unsigned char :8; /* Byte 21 */
BusLogic_SynchronousValues8_T SynchronousValuesID8to15; /* Bytes 22-29 */
- unsigned char DisconnectPermittedID8to15; /* Byte 30 */
+ unsigned char DisconnectPermittedID8to15; /* Byte 30 */
}
BusLogic_SetupInformation_T;
@@ -380,8 +391,8 @@
typedef struct BusLogic_ExtendedMailboxRequest
{
- unsigned char MailboxCount;
- void *BaseMailboxAddress __attribute__ ((packed));
+ unsigned char MailboxCount; /* Byte 0 */
+ void *BaseMailboxAddress __attribute__ ((packed)); /* Bytes 1-4 */
}
BusLogic_ExtendedMailboxRequest_T;
@@ -401,6 +412,26 @@
/*
+ Define the Inquire Generic I/O Port Information reply type.
+*/
+
+typedef struct BusLogic_GenericIOPortInformation
+{
+ unsigned char ISACompatibleIOPort; /* Byte 0 */
+ unsigned char PCIAssignedIRQChannel; /* Byte 1 */
+ boolean LowByteTerminated:1; /* Byte 2 Bit 0 */
+ boolean HighByteTerminated:1; /* Byte 2 Bit 1 */
+ unsigned char :2; /* Byte 2 Bits 2-3 */
+ boolean JP1:1; /* Byte 2 Bit 4 */
+ boolean JP2:1; /* Byte 2 Bit 5 */
+ boolean JP3:1; /* Byte 2 Bit 6 */
+ boolean Valid:1; /* Byte 2 Bit 7 */
+ unsigned char :8; /* Byte 3 */
+}
+BusLogic_GenericIOPortInformation_T;
+
+
+/*
Define the Inquire Board Model Number reply type.
*/
@@ -408,12 +439,12 @@
/*
- Define the Inquire Synchronous Period reply type. For each Target ID, a byte
- is returned which represents the Synchronous Transfer Period in units of 10
- nanoseconds.
+ Define the Inquire Synchronous Period reply type. For each Target Device,
+ a byte is returned which represents the Synchronous Transfer Period in units
+ of 10 nanoseconds.
*/
-typedef unsigned char BusLogic_SynchronousPeriod_T[BusLogic_MaxTargetIDs];
+typedef unsigned char BusLogic_SynchronousPeriod_T[BusLogic_MaxTargetDevices];
/*
@@ -427,13 +458,15 @@
unsigned short ScatterGatherLimit; /* Bytes 2-3 */
unsigned char MailboxCount; /* Byte 4 */
void *BaseMailboxAddress __attribute__ ((packed)); /* Bytes 5-8 */
- struct { unsigned char :6; /* Byte 9 */
- boolean LevelSensitiveInterrupts:1;
- unsigned char :1; } Misc;
+ struct { unsigned char :6; /* Byte 9 Bits 0-5 */
+ boolean LevelSensitiveInterrupts:1; /* Byte 9 Bit 6 */
+ unsigned char :1; } Misc; /* Byte 9 Bit 7 */
unsigned char FirmwareRevision[3]; /* Bytes 10-12 */
boolean HostWideSCSI:1; /* Byte 13 Bit 0 */
boolean HostDifferentialSCSI:1; /* Byte 13 Bit 1 */
- unsigned char :6;
+ boolean HostAutomaticConfiguration:1; /* Byte 13 Bit 2 */
+ boolean HostUltraSCSI:1; /* Byte 13 Bit 3 */
+ unsigned char :4; /* Byte 13 Bits 4-7 */
}
BusLogic_ExtendedSetupInformation_T;
@@ -449,6 +482,47 @@
/*
+ Define the Fetch Host Adapter Local RAM request type.
+*/
+
+#define BusLogic_BIOS_BaseOffset 0
+#define BusLogic_AutoSCSI_BaseOffset 64
+
+typedef struct BusLogic_FetchHostAdapterLocalRAMRequest
+{
+ unsigned char ByteOffset; /* Byte 0 */
+ unsigned char ByteCount; /* Byte 1 */
+}
+BusLogic_FetchHostAdapterLocalRAMRequest_T;
+
+
+/*
+ Define the Host Adapter Local RAM Auto SCSI Byte 15 reply structure.
+*/
+
+typedef struct BusLogic_AutoSCSIByte15
+{
+ unsigned char LowByteTerminated:1; /* Bit 0 */
+ unsigned char :1; /* Bit 1 */
+ unsigned char HighByteTerminated:1; /* Bit 2 */
+ unsigned char :5; /* Bits 3-7 */
+}
+BusLogic_AutoSCSIByte15_T;
+
+
+/*
+ Define the Host Adapter Local RAM Auto SCSI Byte 45 reply structure.
+*/
+
+typedef struct BusLogic_AutoSCSIByte45
+{
+ unsigned char ForceBusDeviceScanningOrder:1; /* Bit 0 */
+ unsigned char :7; /* Bits 1-7 */
+}
+BusLogic_AutoSCSIByte45_T;
+
+
+/*
Define the Modify I/O Address request type. On PCI Host Adapters, the
Modify I/O Address command allows modification of the ISA compatible I/O
Address that the Host Adapter responds to; it does not affect the PCI
@@ -469,7 +543,7 @@
/*
Define the Enable Wide Mode SCSI CCB request type. Wide Mode CCBs are
- necessary to support more than 8 Logical Units per Target.
+ necessary to support more than 8 Logical Units per Target Device.
*/
#define BusLogic_NormalModeCCB 0x00
@@ -489,8 +563,9 @@
/*
Define a Lock data structure. Until a true symmetric multiprocessing kernel
- is available, locking is implemented as saving the processor flags and
- disabling interrupts, and unlocking restores the saved processor flags.
+ with fine grained locking is available, acquiring the lock is implemented as
+ saving the processor flags and disabling interrupts, and releasing the lock
+ restores the saved processor flags.
*/
typedef unsigned long BusLogic_Lock_T;
@@ -535,7 +610,7 @@
BusLogic_InitiatorCCB_ScatterGather = 0x02,
BusLogic_InitiatorCCB_ResidualDataLength = 0x03,
BusLogic_InitiatorCCB_ScatterGatherResidual = 0x04,
- BusLogic_SCSIBusDeviceReset = 0x81
+ BusLogic_BusDeviceReset = 0x81
}
BusLogic_CCB_Opcode_T;
@@ -640,8 +715,8 @@
typedef struct BusLogic_ScatterGatherSegment
{
- unsigned long SegmentByteCount;
- void *SegmentDataPointer;
+ unsigned long SegmentByteCount; /* Bytes 0-3 */
+ void *SegmentDataPointer; /* Bytes 4-7 */
}
BusLogic_ScatterGatherSegment_T;
@@ -710,9 +785,9 @@
typedef struct BusLogic_OutgoingMailbox
{
- BusLogic_CCB_T *CCB;
- unsigned long :24;
- BusLogic_ActionCode_T ActionCode:8;
+ BusLogic_CCB_T *CCB; /* Bytes 0-3 */
+ unsigned long :24; /* Byte 4 */
+ BusLogic_ActionCode_T ActionCode:8; /* Bytes 5-7 */
}
BusLogic_OutgoingMailbox_T;
@@ -723,11 +798,11 @@
typedef struct BusLogic_IncomingMailbox
{
- BusLogic_CCB_T *CCB;
- BusLogic_HostAdapterStatus_T HostAdapterStatus:8;
- BusLogic_TargetDeviceStatus_T TargetDeviceStatus:8;
- unsigned char :8;
- BusLogic_CompletionCode_T CompletionCode:8;
+ BusLogic_CCB_T *CCB; /* Bytes 0-3 */
+ BusLogic_HostAdapterStatus_T HostAdapterStatus:8; /* Byte 4 */
+ BusLogic_TargetDeviceStatus_T TargetDeviceStatus:8; /* Byte 5 */
+ unsigned char :8; /* Byte 6 */
+ BusLogic_CompletionCode_T CompletionCode:8; /* Byte 7 */
}
BusLogic_IncomingMailbox_T;
@@ -759,12 +834,12 @@
typedef struct BusLogic_CommandLineEntry
{
unsigned short IO_Address;
- unsigned short Concurrency;
+ unsigned short TaggedQueueDepth;
unsigned short BusSettleTime;
unsigned short LocalOptions;
unsigned short TaggedQueuingPermitted;
unsigned short TaggedQueuingPermittedMask;
- unsigned char ErrorRecoveryOption[BusLogic_MaxTargetIDs];
+ unsigned char ErrorRecoveryStrategy[BusLogic_MaxTargetDevices];
}
BusLogic_CommandLineEntry_T;
@@ -794,14 +869,25 @@
boolean LevelSensitiveInterrupts:1;
boolean HostWideSCSI:1;
boolean HostDifferentialSCSI:1;
- boolean HostAdapterResetPending:1;
+ boolean HostAutomaticConfiguration:1;
+ boolean HostUltraSCSI:1;
+ boolean TerminationInfoValid:1;
+ boolean LowByteTerminated:1;
+ boolean HighByteTerminated:1;
boolean BounceBuffersRequired:1;
+ boolean StrictRoundRobinModeSupported:1;
+ boolean HostAdapterResetRequested:1;
volatile boolean HostAdapterCommandCompleted:1;
unsigned short HostAdapterScatterGatherLimit;
unsigned short DriverScatterGatherLimit;
- unsigned short MaxTargetIDs;
+ unsigned short MaxTargetDevices;
unsigned short MaxLogicalUnits;
- unsigned short Concurrency;
+ unsigned short MailboxCount;
+ unsigned short InitialCCBs;
+ unsigned short IncrementalCCBs;
+ unsigned short TotalQueueDepth;
+ unsigned short TaggedQueueDepth;
+ unsigned short UntaggedQueueDepth;
unsigned short BusSettleTime;
unsigned short LocalOptions;
unsigned short DisconnectPermitted;
@@ -810,30 +896,30 @@
BusLogic_InstalledDevices_T InstalledDevices;
BusLogic_SynchronousValues_T SynchronousValues;
BusLogic_SynchronousPeriod_T SynchronousPeriod;
- BusLogic_Lock_T Lock;
- struct BusLogic_HostAdapter *Next;
BusLogic_CommandLineEntry_T *CommandLineEntry;
+ struct BusLogic_HostAdapter *Next;
BusLogic_CCB_T *All_CCBs;
BusLogic_CCB_T *Free_CCBs;
- unsigned char ErrorRecoveryOption[BusLogic_MaxTargetIDs];
- unsigned char CommandSuccessfulFlag[BusLogic_MaxTargetIDs];
- unsigned long ReadWriteOperationCount[BusLogic_MaxTargetIDs];
- unsigned char QueuedOperationCount[BusLogic_MaxTargetIDs];
- unsigned long LastSequencePoint[BusLogic_MaxTargetIDs];
+ BusLogic_CCB_T *BusDeviceResetPendingCCB[BusLogic_MaxTargetDevices];
+ unsigned char ErrorRecoveryStrategy[BusLogic_MaxTargetDevices];
+ unsigned char TaggedQueuingActive[BusLogic_MaxTargetDevices];
+ unsigned char CommandSuccessfulFlag[BusLogic_MaxTargetDevices];
+ unsigned char ActiveCommandCount[BusLogic_MaxTargetDevices];
+ unsigned long TotalCommandCount[BusLogic_MaxTargetDevices];
+ unsigned long LastSequencePoint[BusLogic_MaxTargetDevices];
+ unsigned long LastResetTime[BusLogic_MaxTargetDevices];
BusLogic_OutgoingMailbox_T *FirstOutgoingMailbox;
BusLogic_OutgoingMailbox_T *LastOutgoingMailbox;
BusLogic_OutgoingMailbox_T *NextOutgoingMailbox;
BusLogic_IncomingMailbox_T *FirstIncomingMailbox;
BusLogic_IncomingMailbox_T *LastIncomingMailbox;
BusLogic_IncomingMailbox_T *NextIncomingMailbox;
- BusLogic_OutgoingMailbox_T OutgoingMailboxes[BusLogic_MailboxCount];
- BusLogic_IncomingMailbox_T IncomingMailboxes[BusLogic_MailboxCount];
}
BusLogic_HostAdapter_T;
/*
- Define a symbolic structure for the BIOS Disk Parameters.
+ Define a structure for the BIOS Disk Parameters.
*/
typedef struct BIOS_DiskParameters
@@ -846,46 +932,50 @@
/*
- BusLogic_LockHostAdapter acquires exclusive access to Host Adapter.
+ BusLogic_AcquireHostAdapterLock acquires exclusive access to Host Adapter.
*/
static inline
-void BusLogic_LockHostAdapter(BusLogic_HostAdapter_T *HostAdapter)
+void BusLogic_AcquireHostAdapterLock(BusLogic_HostAdapter_T *HostAdapter,
+ BusLogic_Lock_T *Lock)
{
- save_flags(HostAdapter->Lock);
+ save_flags(*Lock);
cli();
}
/*
- BusLogic_UnlockHostAdapter releases exclusive access to Host Adapter.
+ BusLogic_ReleaseHostAdapterLock releases exclusive access to Host Adapter.
*/
static inline
-void BusLogic_UnlockHostAdapter(BusLogic_HostAdapter_T *HostAdapter)
+void BusLogic_ReleaseHostAdapterLock(BusLogic_HostAdapter_T *HostAdapter,
+ BusLogic_Lock_T *Lock)
{
- restore_flags(HostAdapter->Lock);
+ restore_flags(*Lock);
}
/*
- BusLogic_LockHostAdapterID acquires exclusive access to Host Adapter,
+ BusLogic_AcquireHostAdapterLockID acquires exclusive access to Host Adapter,
but is only called when interrupts are disabled.
*/
static inline
-void BusLogic_LockHostAdapterID(BusLogic_HostAdapter_T *HostAdapter)
+void BusLogic_AcquireHostAdapterLockID(BusLogic_HostAdapter_T *HostAdapter,
+ BusLogic_Lock_T *Lock)
{
}
/*
- BusLogic_UnlockHostAdapterID releases exclusive access to Host Adapter,
+ BusLogic_ReleaseHostAdapterLockID releases exclusive access to Host Adapter,
but is only called when interrupts are disabled.
*/
static inline
-void BusLogic_UnlockHostAdapterID(BusLogic_HostAdapter_T *HostAdapter)
+void BusLogic_ReleaseHostAdapterLockID(BusLogic_HostAdapter_T *HostAdapter,
+ BusLogic_Lock_T *Lock)
{
}
@@ -936,16 +1026,16 @@
/*
- BusLogic_StartMailboxScan issues a Start Mailbox Scan command, which
+ BusLogic_StartMailboxCommand issues an Execute Mailbox Command, which
notifies the Host Adapter that an entry has been made in an Outgoing
Mailbox.
*/
static inline
-void BusLogic_StartMailboxScan(BusLogic_HostAdapter_T *HostAdapter)
+void BusLogic_StartMailboxCommand(BusLogic_HostAdapter_T *HostAdapter)
{
BusLogic_WriteCommandParameterRegister(HostAdapter,
- BusLogic_StartMailboxCommand);
+ BusLogic_ExecuteMailboxCommand);
}
@@ -971,7 +1061,8 @@
static void BusLogic_InterruptHandler(int, void *, Registers_T *);
static int BusLogic_ResetHostAdapter(BusLogic_HostAdapter_T *,
- SCSI_Command_T *);
+ SCSI_Command_T *,
+ unsigned int);
#endif /* BusLogic_DriverVersion */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this