Commit ecfcc06e authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.49

parent 6f3ded5f
......@@ -27,8 +27,8 @@
*/
#define BusLogic_DriverVersion "2.0.9"
#define BusLogic_DriverDate "29 March 1997"
#define BusLogic_DriverVersion "2.0.10"
#define BusLogic_DriverDate "11 August 1997"
#include <linux/module.h>
......@@ -43,7 +43,6 @@
#include <linux/stat.h>
#include <linux/pci.h>
#include <linux/bios32.h>
#include <linux/init.h>
#include <asm/dma.h>
#include <asm/io.h>
#include <asm/system.h>
......@@ -223,8 +222,7 @@ static void BusLogic_UnregisterHostAdapter(BusLogic_HostAdapter_T *HostAdapter)
Host Adapter.
*/
__initfunc(static boolean
BusLogic_CreateMailboxes(BusLogic_HostAdapter_T *HostAdapter))
static boolean BusLogic_CreateMailboxes(BusLogic_HostAdapter_T *HostAdapter)
{
/*
FlashPoint Host Adapters do not use Outgoing and Incoming Mailboxes.
......@@ -306,8 +304,7 @@ static boolean BusLogic_CreateCCB(BusLogic_HostAdapter_T *HostAdapter)
BusLogic_CreateInitialCCBs allocates the initial CCBs for Host Adapter.
*/
__initfunc(static boolean
BusLogic_CreateInitialCCBs(BusLogic_HostAdapter_T *HostAdapter))
static boolean BusLogic_CreateInitialCCBs(BusLogic_HostAdapter_T *HostAdapter)
{
int Allocated;
for (Allocated = 0; Allocated < HostAdapter->InitialCCBs; Allocated++)
......@@ -420,8 +417,8 @@ static void BusLogic_DeallocateCCB(BusLogic_CCB_T *CCB)
structure for Host Adapter.
*/
__initfunc(static boolean
BusLogic_CreateTargetDeviceStatistics(BusLogic_HostAdapter_T *HostAdapter))
static boolean BusLogic_CreateTargetDeviceStatistics(BusLogic_HostAdapter_T
*HostAdapter)
{
HostAdapter->TargetDeviceStatistics =
(BusLogic_TargetDeviceStatistics_T *)
......@@ -508,13 +505,14 @@ static int BusLogic_Command(BusLogic_HostAdapter_T *HostAdapter,
Wait for the Host Adapter Ready bit to be set and the Command/Parameter
Register Busy bit to be reset in the Status Register.
*/
TimeoutCounter = loops_per_sec >> 3;
TimeoutCounter = 10000;
while (--TimeoutCounter >= 0)
{
StatusRegister.All = BusLogic_ReadStatusRegister(HostAdapter);
if (StatusRegister.Bits.HostAdapterReady &&
!StatusRegister.Bits.CommandParameterRegisterBusy)
break;
udelay(100);
}
if (TimeoutCounter < 0)
{
......@@ -590,11 +588,11 @@ static int BusLogic_Command(BusLogic_HostAdapter_T *HostAdapter,
case BusLogic_InquireInstalledDevicesID8to15:
case BusLogic_InquireTargetDevices:
/* Approximately 60 seconds. */
TimeoutCounter = loops_per_sec << 2;
TimeoutCounter = 60*10000;
break;
default:
/* Approximately 1 second. */
TimeoutCounter = loops_per_sec >> 4;
TimeoutCounter = 10000;
break;
}
/*
......@@ -614,6 +612,7 @@ static int BusLogic_Command(BusLogic_HostAdapter_T *HostAdapter,
else BusLogic_ReadDataInRegister(HostAdapter);
if (OperationCode == BusLogic_FetchHostAdapterLocalRAM &&
StatusRegister.Bits.HostAdapterReady) break;
udelay(100);
}
if (TimeoutCounter < 0)
{
......@@ -711,7 +710,7 @@ static int BusLogic_Command(BusLogic_HostAdapter_T *HostAdapter,
only from the list of standard BusLogic MultiMaster ISA I/O Addresses.
*/
static inline void BusLogic_InitializeProbeInfoListISA(void)
static void BusLogic_InitializeProbeInfoListISA(void)
{
int StandardAddressIndex;
/*
......@@ -749,9 +748,8 @@ static inline void BusLogic_InitializeProbeInfoListISA(void)
of increasing PCI Bus and Device Number.
*/
__initfunc(static void
BusLogic_SortProbeInfo(BusLogic_ProbeInfo_T *ProbeInfoList,
int ProbeInfoCount))
static void BusLogic_SortProbeInfo(BusLogic_ProbeInfo_T *ProbeInfoList,
int ProbeInfoCount)
{
int LastInterchange = ProbeInfoCount-1, Bound, j;
while (LastInterchange > 0)
......@@ -785,12 +783,12 @@ BusLogic_SortProbeInfo(BusLogic_ProbeInfo_T *ProbeInfoList,
I/O Addresses. It returns the number of PCI MultiMaster Host Adapters found.
*/
__initfunc(static int BusLogic_InitializeMultiMasterProbeInfo(void))
static int BusLogic_InitializeMultiMasterProbeInfo(void)
{
boolean StandardAddressSeen[BusLogic_ISA_StandardAddressesCount];
BusLogic_ProbeInfo_T *PrimaryProbeInfo =
&BusLogic_ProbeInfoList[BusLogic_ProbeInfoCount];
int NonPrimaryPCIMultiMasterIndex = BusLogic_ProbeInfoCount;
int NonPrimaryPCIMultiMasterIndex = BusLogic_ProbeInfoCount + 1;
int NonPrimaryPCIMultiMasterCount = 0, PCIMultiMasterCount = 0;
boolean ForceBusDeviceScanningOrder = false;
boolean ForceBusDeviceScanningOrderChecked = false;
......@@ -1016,7 +1014,7 @@ __initfunc(static int BusLogic_InitializeMultiMasterProbeInfo(void))
number of FlashPoint Host Adapters found.
*/
__initfunc(static int BusLogic_InitializeFlashPointProbeInfo(void))
static int BusLogic_InitializeFlashPointProbeInfo(void)
{
int FlashPointIndex = BusLogic_ProbeInfoCount, FlashPointCount = 0;
unsigned char Bus, DeviceFunction, IRQ_Channel;
......@@ -1123,7 +1121,7 @@ __initfunc(static int BusLogic_InitializeFlashPointProbeInfo(void))
particular probe order.
*/
static inline void BusLogic_InitializeProbeInfoList(void)
static void BusLogic_InitializeProbeInfoList(void)
{
/*
If BusLogic_Setup has provided an I/O Address probe list, do not override
......@@ -1232,8 +1230,7 @@ static boolean BusLogic_Failure(BusLogic_HostAdapter_T *HostAdapter,
BusLogic_ProbeHostAdapter probes for a BusLogic Host Adapter.
*/
__initfunc(static boolean
BusLogic_ProbeHostAdapter(BusLogic_HostAdapter_T *HostAdapter))
static boolean BusLogic_ProbeHostAdapter(BusLogic_HostAdapter_T *HostAdapter)
{
BusLogic_StatusRegister_T StatusRegister;
BusLogic_InterruptRegister_T InterruptRegister;
......@@ -1245,13 +1242,16 @@ BusLogic_ProbeHostAdapter(BusLogic_HostAdapter_T *HostAdapter))
{
FlashPoint_Info_T *FlashPointInfo = (FlashPoint_Info_T *)
scsi_init_malloc(sizeof(FlashPoint_Info_T), GFP_ATOMIC);
int Retries = 10;
if (FlashPointInfo == NULL)
return BusLogic_Failure(HostAdapter, "ALLOCATING FLASHPOINT INFO");
FlashPointInfo->BaseAddress = HostAdapter->IO_Address;
FlashPointInfo->IRQ_Channel = HostAdapter->IRQ_Channel;
FlashPointInfo->Present = false;
if (!(FlashPoint_ProbeHostAdapter(FlashPointInfo) == 0 &&
FlashPointInfo->Present))
while (!(FlashPoint_ProbeHostAdapter(FlashPointInfo) == 0 &&
FlashPointInfo->Present) &&
--Retries >= 0) ;
if (!FlashPointInfo->Present)
{
scsi_init_free((char *) FlashPointInfo, sizeof(FlashPoint_Info_T));
BusLogic_Error("BusLogic: FlashPoint Host Adapter detected at "
......@@ -1326,7 +1326,7 @@ static boolean BusLogic_HardResetHostAdapter(BusLogic_HostAdapter_T
*HostAdapter)
{
BusLogic_StatusRegister_T StatusRegister;
int TimeoutCounter = loops_per_sec;
int TimeoutCounter;
/*
FlashPoint Host Adapters are Hard Reset by the FlashPoint SCCB Manager.
*/
......@@ -1349,10 +1349,12 @@ static boolean BusLogic_HardResetHostAdapter(BusLogic_HostAdapter_T
/*
Wait until Diagnostic Active is set in the Status Register.
*/
TimeoutCounter = 5*10000;
while (--TimeoutCounter >= 0)
{
StatusRegister.All = BusLogic_ReadStatusRegister(HostAdapter);
if (StatusRegister.Bits.DiagnosticActive) break;
udelay(100);
}
if (BusLogic_GlobalOptions.Bits.TraceHardReset)
BusLogic_Notice("BusLogic_HardReset(0x%X): Diagnostic Active, "
......@@ -1368,10 +1370,12 @@ static boolean BusLogic_HardResetHostAdapter(BusLogic_HostAdapter_T
/*
Wait until Diagnostic Active is reset in the Status Register.
*/
TimeoutCounter = 10*10000;
while (--TimeoutCounter >= 0)
{
StatusRegister.All = BusLogic_ReadStatusRegister(HostAdapter);
if (!StatusRegister.Bits.DiagnosticActive) break;
udelay(100);
}
if (BusLogic_GlobalOptions.Bits.TraceHardReset)
BusLogic_Notice("BusLogic_HardReset(0x%X): Diagnostic Completed, "
......@@ -1382,6 +1386,7 @@ static boolean BusLogic_HardResetHostAdapter(BusLogic_HostAdapter_T
Wait until at least one of the Diagnostic Failure, Host Adapter Ready,
or Data In Register Ready bits is set in the Status Register.
*/
TimeoutCounter = 10000;
while (--TimeoutCounter >= 0)
{
StatusRegister.All = BusLogic_ReadStatusRegister(HostAdapter);
......@@ -1389,6 +1394,7 @@ static boolean BusLogic_HardResetHostAdapter(BusLogic_HostAdapter_T
StatusRegister.Bits.HostAdapterReady ||
StatusRegister.Bits.DataInRegisterReady)
break;
udelay(100);
}
if (BusLogic_GlobalOptions.Bits.TraceHardReset)
BusLogic_Notice("BusLogic_HardReset(0x%X): Host Adapter Ready, "
......@@ -1427,8 +1433,7 @@ static boolean BusLogic_HardResetHostAdapter(BusLogic_HostAdapter_T
Host Adapter. It also determines the IRQ Channel for non-PCI Host Adapters.
*/
__initfunc(static boolean
BusLogic_CheckHostAdapter(BusLogic_HostAdapter_T *HostAdapter))
static boolean BusLogic_CheckHostAdapter(BusLogic_HostAdapter_T *HostAdapter)
{
BusLogic_Configuration_T Configuration;
BusLogic_ExtendedSetupInformation_T ExtendedSetupInformation;
......@@ -1491,8 +1496,8 @@ BusLogic_CheckHostAdapter(BusLogic_HostAdapter_T *HostAdapter))
from Host Adapter and initializes the Host Adapter structure.
*/
__initfunc(static boolean
BusLogic_ReadHostAdapterConfiguration(BusLogic_HostAdapter_T *HostAdapter))
static boolean BusLogic_ReadHostAdapterConfiguration(BusLogic_HostAdapter_T
*HostAdapter)
{
BusLogic_BoardID_T BoardID;
BusLogic_Configuration_T Configuration;
......@@ -2005,8 +2010,8 @@ BusLogic_ReadHostAdapterConfiguration(BusLogic_HostAdapter_T *HostAdapter))
Host Adapter.
*/
__initfunc(static boolean
BusLogic_ReportHostAdapterConfiguration(BusLogic_HostAdapter_T *HostAdapter))
static boolean BusLogic_ReportHostAdapterConfiguration(BusLogic_HostAdapter_T
*HostAdapter)
{
unsigned short AllTargetsMask = (1 << HostAdapter->MaxTargetDevices) - 1;
unsigned short SynchronousPermitted, FastPermitted;
......@@ -2231,8 +2236,7 @@ BusLogic_ReportHostAdapterConfiguration(BusLogic_HostAdapter_T *HostAdapter))
Host Adapter.
*/
__initfunc(static boolean
BusLogic_AcquireResources(BusLogic_HostAdapter_T *HostAdapter))
static boolean BusLogic_AcquireResources(BusLogic_HostAdapter_T *HostAdapter)
{
BusLogic_HostAdapter_T *FirstHostAdapter =
BusLogic_RegisteredHostAdapters[HostAdapter->IRQ_Channel];
......@@ -2318,8 +2322,7 @@ static void BusLogic_ReleaseResources(BusLogic_HostAdapter_T *HostAdapter)
interrupts do not get through as a result.
*/
__initfunc(static boolean
BusLogic_TestInterrupts(BusLogic_HostAdapter_T *HostAdapter))
static boolean BusLogic_TestInterrupts(BusLogic_HostAdapter_T *HostAdapter)
{
unsigned int InitialInterruptCount, FinalInterruptCount;
int TestCount = 5, i;
......@@ -2608,10 +2611,9 @@ static boolean BusLogic_TargetDeviceInquiry(BusLogic_HostAdapter_T
through explicit acquisition and release of the Host Adapter's Lock.
*/
__initfunc(static void
BusLogic_InitializeHostStructure(BusLogic_HostAdapter_T
*HostAdapter,
SCSI_Host_T *Host))
static void BusLogic_InitializeHostStructure(BusLogic_HostAdapter_T
*HostAdapter,
SCSI_Host_T *Host)
{
Host->max_id = HostAdapter->MaxTargetDevices;
Host->max_lun = HostAdapter->MaxLogicalUnits;
......@@ -2682,7 +2684,7 @@ static void BusLogic_SelectQueueDepths(SCSI_Host_T *Host,
registered.
*/
__initfunc(int BusLogic_DetectHostAdapter(SCSI_Host_Template_T *HostTemplate))
int BusLogic_DetectHostAdapter(SCSI_Host_Template_T *HostTemplate)
{
int BusLogicHostAdapterCount = 0, CommandLineEntryIndex = 0, ProbeIndex;
char *MessageBuffer = NULL;
......@@ -3007,8 +3009,6 @@ static void BusLogic_ScanIncomingMailboxes(BusLogic_HostAdapter_T *HostAdapter)
"Incoming Mailbox\n", HostAdapter,
CCB->SerialNumber, CCB->Status);
}
else BusLogic_Warning("Aborted CCB #%ld to Target %d Not Found\n",
HostAdapter, CCB->SerialNumber, CCB->TargetID);
NextIncomingMailbox->CompletionCode = BusLogic_IncomingMailboxFree;
if (++NextIncomingMailbox > HostAdapter->LastIncomingMailbox)
NextIncomingMailbox = HostAdapter->FirstIncomingMailbox;
......
......@@ -31,6 +31,18 @@
#endif
/*
FlashPoint support is only available for the Intel x86 Architecture.
*/
#ifndef __i386__
#undef CONFIG_SCSI_OMIT_FLASHPOINT
#define CONFIG_SCSI_OMIT_FLASHPOINT
#endif
#ifndef CONFIG_SCSI_OMIT_FLASHPOINT
......@@ -495,7 +507,7 @@ typedef struct SCCBMgr_info {
#define SCSI_PARITY_ENA 0x0001
#define LOW_BYTE_TERM 0x0010
#define HIGH_BYTE_TERM 0x0020
#define _BUSTYPE_PCI 0x3
#define BUSTYPE_PCI 0x3
#endif
#define SUPPORT_16TAR_32LUN 0x0002
......@@ -2590,7 +2602,7 @@ int SccbMgr_sense_adapter(PSCCBMGR_INFO pCardInfo)
pCardInfo->si_flags |= SUPPORT_16TAR_32LUN;
pCardInfo->si_card_family = HARPOON_FAMILY;
pCardInfo->si_bustype = _BUSTYPE_PCI;
pCardInfo->si_bustype = BUSTYPE_PCI;
if(pCurrNvRam){
pCardInfo->si_card_model[0] = '9';
......@@ -3193,7 +3205,7 @@ STATIC s32bits probe_adapter(PADAPTER_INFO pAdapterInfo)
}
pAdapterInfo->ai_product_family = HARPOON_FAMILY;
pAdapterInfo->ai_HBAbustype = _BUSTYPE_PCI;
pAdapterInfo->ai_HBAbustype = BUSTYPE_PCI;
for (i=0;i<CARD_MODEL_NAMELEN;i++)
{
......
BusLogic MultiMaster and FlashPoint SCSI Driver for Linux
Version 2.0.9 for Linux 2.0
Version 2.0.10 for Linux 2.0
PRODUCTION RELEASE
29 March 1997
11 August 1997
Leonard N. Zubkoff
Dandelion Digital
......@@ -284,6 +284,14 @@ o PCI Slot Scanning Order
so as to recognize the host adapters in the same order as they are enumerated
by the host adapter's BIOS.
o Mega-Transfers/Second
The driver reports on the synchronous transfer parameters negotiated between
the host adapter and target devices in units of "mega-transfers/second". For
wide devices, the unit of transfer is 16 bits if wide negotiation has been
successfully completed. Therefore, the total transfer rate to wide devices
will generally be twice the synchronous tranfer rate reported by the driver.
COMMAND LINE OPTIONS
......@@ -372,16 +380,17 @@ substantially impact performance.
INSTALLATION
This distribution was prepared for Linux kernel version 2.0.29, but should be
compatible with 2.0.4 or any later 2.0 series kernel.
This distribution was prepared for Linux kernel version 2.0.30, but should be
compatible with 2.0.4 or any later 2.0 series kernel if BusLogic.patch is also
applied.
To install the new BusLogic SCSI driver, you may use the following commands,
replacing "/usr/src" with wherever you keep your Linux kernel source tree:
cd /usr/src
tar -xvzf BusLogic-2.0.9.tar.gz
tar -xvzf BusLogic-2.0.10.tar.gz
mv README.* LICENSE.* BusLogic.[ch] FlashPoint.c linux/drivers/scsi
patch -p < BusLogic.patch
patch -p < BusLogic.patch # Only for kernels prior to 2.0.30
cd linux
make config
make depend
......
/*
* fs/dcache.c
*
......@@ -92,6 +91,25 @@ void dput(struct dentry *dentry)
}
}
/*
* Try to invalidate the dentry if it turns out to be
* possible. If there are other users of the dentry we
* can't invalidate it.
*
* This is currently incorrect. We should try to see if
* we can invalidate any unused children - right now we
* refuse to invalidate way too much.
*/
int d_invalidate(struct dentry * dentry)
{
/* We should do a partial shrink_dcache here */
if (dentry->d_count != 1)
return -EBUSY;
d_drop(dentry);
return 0;
}
/*
* Shrink the dcache. This is done when we need
* more memory, or simply when we need to unmount
......@@ -366,6 +384,11 @@ char * d_path(struct dentry *dentry, char *buffer, int buflen)
*--end = '\0';
buflen--;
if (dentry->d_parent != dentry && list_empty(&dentry->d_hash)) {
buflen -= 10;
end -= 10;
memcpy(end, " (deleted)", 10);
}
/* Get '/' right */
retval = end-1;
......
......@@ -270,16 +270,12 @@ static struct dentry * cached_lookup(struct dentry * parent, struct qstr * name)
if (dentry && dentry->d_revalidate) {
int validated, (*revalidate)(struct dentry *) = dentry->d_revalidate;
struct dentry * save;
dentry->d_count++;
validated = revalidate(dentry);
save = dentry;
if (!validated) {
d_drop(dentry);
validated = revalidate(dentry) || d_invalidate(dentry);
dput(dentry);
if (!validated)
dentry = NULL;
}
dput(save);
}
return dentry;
}
......
......@@ -1118,7 +1118,6 @@ __initfunc(static int do_change_root(kdev_t new_root_dev,const char *put_old))
dput(dir_d);
error = -ENOTDIR;
}
dput(old_root);
dput(old_pwd);
if (error) {
int umount_error;
......
......@@ -81,11 +81,11 @@ static inline void d_drop(struct dentry * dentry)
extern void d_instantiate(struct dentry *, struct inode *);
extern void d_delete(struct dentry *);
/* allocate/de-allocate */
extern void d_free(struct dentry *);
extern struct dentry * d_alloc(struct dentry * parent, const struct qstr *name);
extern void shrink_dcache(void);
extern int d_invalidate(struct dentry *);
/* only used at mount-time */
extern struct dentry * d_alloc_root(struct inode * root_inode, struct dentry * old_root);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment