/*
Linux Driver for BusLogic MultiMaster and FlashPoint SCSI Host Adapters
Copyright 1995-1998 by Leonard N. Zubkoff <lnz@dandelion.com>
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.
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, Jin-Lon Hon, 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.
Finally, special thanks to Mylex/BusLogic for making the FlashPoint SCCB
Manager available as freely redistributable source code.
*/
#ifndef _BUSLOGIC_H
#define _BUSLOGIC_H
#include <linux/config.h>
#ifndef PACKED
#define PACKED __attribute__((packed))
#endif
/*
FlashPoint support is only available for the Intel x86 Architecture with
CONFIG_PCI set.
*/
#ifndef __i386__
#undef CONFIG_SCSI_OMIT_FLASHPOINT
#define CONFIG_SCSI_OMIT_FLASHPOINT
#endif
#ifndef CONFIG_PCI
#undef CONFIG_SCSI_OMIT_FLASHPOINT
#define CONFIG_SCSI_OMIT_FLASHPOINT
#define BusLogic_InitializeProbeInfoListISA BusLogic_InitializeProbeInfoList
#endif
/*
Define the maximum number of BusLogic Host Adapters supported by this driver.
*/
#define BusLogic_MaxHostAdapters 16
/*
Define the maximum number of Target Devices supported by this driver.
*/
#define BusLogic_MaxTargetDevices 16
/*
Define the maximum number of Scatter/Gather Segments used by this driver.
For optimal performance, it is important that this limit be at least as
large as the largest single request generated by the I/O Subsystem.
*/
#define BusLogic_ScatterGatherLimit 128
/*
Define the maximum, maximum automatic, minimum automatic, 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_MaxTaggedQueueDepth 64
#define BusLogic_MaxAutomaticTaggedQueueDepth 28
#define BusLogic_MinAutomaticTaggedQueueDepth 7
#define BusLogic_TaggedQueueDepthBB 3
#define BusLogic_UntaggedQueueDepth 3
#define BusLogic_UntaggedQueueDepthBB 2
/*
Define the default amount of time in seconds to wait between a Host Adapter
Hard Reset which initiates a SCSI Bus Reset and issuing any SCSI commands.
Some SCSI devices get confused if they receive SCSI commands too soon after
a SCSI Bus Reset.
*/
#define BusLogic_DefaultBusSettleTime 2
/*
Define the maximum number of Mailboxes that should be used for MultiMaster
Host Adapters. This number is chosen to be larger than the maximum Host
Adapter Queue Depth and small enough so that the Host Adapter structure
does not cross an allocation block size boundary.
*/
#define BusLogic_MaxMailboxes 211
/*
Define the number of CCBs that should be allocated as a group to optimize
Kernel memory allocation.
*/
#define BusLogic_CCB_AllocationGroupSize 7
/*
Define the Host Adapter Line and Message Buffer Sizes.
*/
#define BusLogic_LineBufferSize 100
#define BusLogic_MessageBufferSize 9700
/*
Define the Driver Message Levels.
*/
enum BusLogic_MessageLevel {
BusLogic_AnnounceLevel = 0,
BusLogic_InfoLevel = 1,
BusLogic_NoticeLevel = 2,
BusLogic_WarningLevel = 3,
BusLogic_ErrorLevel = 4
};
static char *BusLogic_MessageLevelMap[] = { KERN_NOTICE, KERN_NOTICE, KERN_NOTICE, KERN_WARNING, KERN_ERR };
/*
Define Driver Message macros.
*/
#define BusLogic_Announce(Format, Arguments...) \
BusLogic_Message(BusLogic_AnnounceLevel, Format, ##Arguments)
#define BusLogic_Info(Format, Arguments...) \
BusLogic_Message(BusLogic_InfoLevel, Format, ##Arguments)
#define BusLogic_Notice(Format, Arguments...) \
BusLogic_Message(BusLogic_NoticeLevel, Format, ##Arguments)
#define BusLogic_Warning(Format, Arguments...) \
BusLogic_Message(BusLogic_WarningLevel, Format, ##Arguments)
#define BusLogic_Error(Format, Arguments...) \
BusLogic_Message(BusLogic_ErrorLevel, Format, ##Arguments)
/*
Define the types of BusLogic Host Adapters that are supported and the number
of I/O Addresses required by each type.
*/
enum BusLogic_HostAdapterType {
BusLogic_MultiMaster = 1,
BusLogic_FlashPoint = 2
} PACKED;
#define BusLogic_MultiMasterAddressCount 4
#define BusLogic_FlashPointAddressCount 256
static int BusLogic_HostAdapterAddressCount[3] = {