outb %ax,$0x22; \
inb $0x23,%ax
+ /*
+ * Cyrix screwed this up. You have to do the basic cyrix
+ * detect then pray its right in order to turn CPUID on
+ * to see if you have a Cyrix. If its a future non Cyrix
+ * chip that seems to be a cyrix but crashes on IO 0x22/0x23
+ * don't blame us...
+ *
+ * If we don't set this minimal group however then it breaks
+ * our delay loops and stuff so we have to do something
+ * for this contraption.
+ *
+ * Note; We do the minimal here. The xchg bug and other stuff
+ * can be tweaked with user mode tools.
+ */
+
cli
getCx86($0xc3) # get CCR3
movb %ax,%cx # Save old value
isnew: pushl %ecx # restore original EFLAGS
popfl
incl SYMBOL_NAME(have_cpuid) # we have CPUID
+ /*
+ * Technically we should use CPUID 0 to see if we have CPUID 1!
+ */
/* get processor type */
movl $1, %eax # Use the CPUID instruction to
.byte 0x0f, 0xa2 # check the processor type
movb %cl,SYMBOL_NAME(x86_mask)
movl %edx,SYMBOL_NAME(x86_capability)
+#ifdef SOMEONE_FIXED_ME
+ /*
+ * This trips some PPro/PII's and overwrites the mask
+ * with crap. Removed until the Linux/Cyrix guys fix it.
+ */
xor %ax,%ax # test again for Cyrix CPU
sahf
movb $5,%ax
jne ncyrx2 # skip if not Cyrix CPU
getCx86($0xff) # DIR1 : let's check the stepping
movb %al,SYMBOL_NAME(x86_mask)
-
+#endif
/* get vendor info */
ncyrx2: xorl %eax, %eax # call CPUID with 0 -> return vendor ID
.byte 0x0f, 0xa2 # CPUID
*/
-#define BusLogic_DriverVersion "2.0.11"
-#define BusLogic_DriverDate "31 January 1998"
+#define BusLogic_DriverVersion "2.0.12"
+#define BusLogic_DriverDate "29 March 1998"
#include <linux/version.h>
: check_region(0x134, BusLogic_MultiMasterAddressCount) == 0))
BusLogic_AppendProbeAddressISA(0x134);
}
+ /*
+ Iterate over the older non-compliant MultiMaster PCI Host Adapters,
+ noting the PCI bus location and assigned IRQ Channel.
+ */
+ Index = 0;
+ while (pcibios_find_device(PCI_VENDOR_ID_BUSLOGIC,
+ PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC,
+ Index++, &Bus, &DeviceFunction) == 0)
+ if (pcibios_read_config_dword(Bus, DeviceFunction,
+ PCI_BASE_ADDRESS_0, &BaseAddress0) == 0 &&
+ pcibios_read_config_byte(Bus, DeviceFunction,
+ PCI_INTERRUPT_LINE, &IRQ_Channel) == 0)
+ {
+ unsigned char Device = DeviceFunction >> 3;
+ IO_Address = BaseAddress0 & PCI_BASE_ADDRESS_IO_MASK;
+ if (IO_Address == 0 || IRQ_Channel == 0 || IRQ_Channel >= NR_IRQS)
+ continue;
+ for (i = 0; i < BusLogic_ProbeInfoCount; i++)
+ {
+ BusLogic_ProbeInfo_T *ProbeInfo = &BusLogic_ProbeInfoList[i];
+ if (ProbeInfo->IO_Address == IO_Address &&
+ ProbeInfo->HostAdapterType == BusLogic_MultiMaster)
+ {
+ ProbeInfo->HostAdapterBusType = BusLogic_PCI_Bus;
+ ProbeInfo->PCI_Address = 0;
+ ProbeInfo->Bus = Bus;
+ ProbeInfo->Device = Device;
+ ProbeInfo->IRQ_Channel = IRQ_Channel;
+ break;
+ }
+ }
+ }
return PCIMultiMasterCount;
}
if (HostAdapter->BounceBuffersRequired)
HostAdapter->UntaggedQueueDepth = BusLogic_UntaggedQueueDepthBB;
else HostAdapter->UntaggedQueueDepth = BusLogic_UntaggedQueueDepth;
+ if (HostAdapter->DriverOptions != NULL)
+ HostAdapter->CommonQueueDepth =
+ HostAdapter->DriverOptions->CommonQueueDepth;
+ if (HostAdapter->CommonQueueDepth > 0 &&
+ HostAdapter->CommonQueueDepth < HostAdapter->UntaggedQueueDepth)
+ HostAdapter->UntaggedQueueDepth = HostAdapter->CommonQueueDepth;
/*
Tagged Queuing is only allowed if Disconnect/Reconnect is permitted.
Therefore, mask the Tagged Queuing Permitted Default bits with the
for (TargetID = 0; TargetID < HostAdapter->MaxTargetDevices; TargetID++)
if (HostAdapter->TargetFlags[TargetID].TargetExists)
{
- int QueueDepth = HostAdapter->UntaggedQueueDepth;
+ int QueueDepth = HostAdapter->QueueDepth[TargetID];
if (HostAdapter->TargetFlags[TargetID].TaggedQueuingSupported &&
(HostAdapter->TaggedQueuingPermitted & (1 << TargetID)))
{
- QueueDepth = HostAdapter->QueueDepth[TargetID];
TaggedDeviceCount++;
if (QueueDepth == 0) AutomaticTaggedDeviceCount++;
}
- else UntaggedDeviceCount++;
- HostAdapter->QueueDepth[TargetID] = QueueDepth;
+ else
+ {
+ UntaggedDeviceCount++;
+ if (QueueDepth == 0 ||
+ QueueDepth > HostAdapter->UntaggedQueueDepth)
+ {
+ QueueDepth = HostAdapter->UntaggedQueueDepth;
+ HostAdapter->QueueDepth[TargetID] = QueueDepth;
+ }
+ }
AllocatedQueueDepth += QueueDepth;
+ if (QueueDepth == 1)
+ HostAdapter->TaggedQueuingPermitted &= ~(1 << TargetID);
}
HostAdapter->TargetDeviceCount = TaggedDeviceCount + UntaggedDeviceCount;
if (AutomaticTaggedDeviceCount > 0)
QueueDepth:<integer>
The "QueueDepth:" or QD:" option specifies the Queue Depth to use for all
- Target Devices that support Tagged Queuing. If no Queue Depth option is
- provided, the Queue Depth will be determined automatically based on the
- Host Adapter's Total Queue Depth and the number, type, speed, and
+ Target Devices that support Tagged Queuing, as well as the maximum Queue
+ Depth for devices that do not support Tagged Queuing. If no Queue Depth
+ option is provided, the Queue Depth will be determined automatically based
+ on the Host Adapter's Total Queue Depth and the number, type, speed, and
capabilities of the detected Target Devices. For Host Adapters that
require ISA Bounce Buffers, the Queue Depth is automatically set by default
- to BusLogic_QueueDepthBounceBuffers to avoid excessive preallocation of DMA
- Bounce Buffer memory. Target Devices that do not support Tagged Queuing
- always use a Queue Depth of BusLogic_UntaggedQueueDepth.
+ to BusLogic_TaggedQueueDepthBB or BusLogic_UntaggedQueueDepthBB to avoid
+ excessive preallocation of DMA Bounce Buffer memory. Target Devices that
+ do not support Tagged Queuing always have their Queue Depth set to
+ BusLogic_UntaggedQueueDepth or BusLogic_UntaggedQueueDepthBB, unless a
+ lower Queue Depth option is provided. A Queue Depth of 1 automatically
+ disables Tagged Queuing.
QueueDepth:[<integer>,<integer>...]
NULL, QueueDepth);
return;
}
+ DriverOptions->CommonQueueDepth = QueueDepth;
for (TargetID = 0;
TargetID < BusLogic_MaxTargetDevices;
TargetID++)
unsigned short TaggedQueuingPermittedMask;
unsigned short BusSettleTime;
BusLogic_LocalOptions_T LocalOptions;
+ unsigned char CommonQueueDepth;
unsigned char QueueDepth[BusLogic_MaxTargetDevices];
BusLogic_ErrorRecoveryStrategy_T
ErrorRecoveryStrategy[BusLogic_MaxTargetDevices];
unsigned short DriverQueueDepth;
unsigned short HostAdapterQueueDepth;
unsigned short UntaggedQueueDepth;
+ unsigned short CommonQueueDepth;
unsigned short BusSettleTime;
unsigned short SynchronousPermitted;
unsigned short FastPermitted;
#include <linux/config.h>
-#include <asm/io.h>
#ifndef CONFIG_SCSI_OMIT_FLASHPOINT
include $(TOPDIR)/Rules.make
-BusLogic.o: BusLogic.c
- $(CC) $(CFLAGS) -c BusLogic.c -o BusLogic.o
-
aha152x.o: aha152x.c
$(CC) $(CFLAGS) $(AHA152X) -c aha152x.c
BusLogic MultiMaster and FlashPoint SCSI Driver for Linux
- Version 2.0.11 for Linux 2.0
+ Version 2.0.12 for Linux 2.0
PRODUCTION RELEASE
- 31 January 1998
+ 29 March 1998
Leonard N. Zubkoff
Dandelion Digital
QueueDepth:<integer>
The "QueueDepth:" or QD:" option specifies the Queue Depth to use for all
- Target Devices that support Tagged Queuing. If no Queue Depth option is
- provided, the Queue Depth will be determined automatically based on the
- Host Adapter's Total Queue Depth and the number, type, speed, and
+ Target Devices that support Tagged Queuing, as well as the maximum Queue
+ Depth for devices that do not support Tagged Queuing. If no Queue Depth
+ option is provided, the Queue Depth will be determined automatically based
+ on the Host Adapter's Total Queue Depth and the number, type, speed, and
capabilities of the detected Target Devices. For Host Adapters that
require ISA Bounce Buffers, the Queue Depth is automatically set by default
- to BusLogic_QueueDepthBounceBuffers to avoid excessive preallocation of DMA
- Bounce Buffer memory. Target Devices that do not support Tagged Queuing
- always use a Queue Depth of BusLogic_UntaggedQueueDepth.
+ to BusLogic_TaggedQueueDepthBB or BusLogic_UntaggedQueueDepthBB to avoid
+ excessive preallocation of DMA Bounce Buffer memory. Target Devices that
+ do not support Tagged Queuing always have their Queue Depth set to
+ BusLogic_UntaggedQueueDepth or BusLogic_UntaggedQueueDepthBB, unless a
+ lower Queue Depth option is provided. A Queue Depth of 1 automatically
+ disables Tagged Queuing.
QueueDepth:[<integer>,<integer>...]
replacing "/usr/src" with wherever you keep your Linux kernel source tree:
cd /usr/src
- tar -xvzf BusLogic-2.0.11.tar.gz
+ tar -xvzf BusLogic-2.0.12.tar.gz
mv README.* LICENSE.* BusLogic.[ch] FlashPoint.c linux/drivers/scsi
patch -p < BusLogic.patch
cd linux
--- /dev/null
+#ifdef MODVERSIONS
+#undef CONFIG_MODVERSIONS
+#define CONFIG_MODVERSIONS
+#ifndef _set_ver
+#define _set_ver(sym,vers) sym ## _R ## vers
+#endif
+#include <linux/modules/b1capi.ver>
+#include <linux/modules/b1pci.ver>
+#include <linux/modules/capidrv.ver>
+#include <linux/modules/capiutil.ver>
+#include <linux/modules/fatfs_syms.ver>
+#include <linux/modules/firewall.ver>
+#include <linux/modules/isdn_syms.ver>
+#include <linux/modules/ksyms.ver>
+#include <linux/modules/md.ver>
+#include <linux/modules/misc.ver>
+#include <linux/modules/msdosfs_syms.ver>
+#include <linux/modules/netsyms.ver>
+#include <linux/modules/nls.ver>
+#include <linux/modules/p8022.ver>
+#include <linux/modules/p8022tr.ver>
+#include <linux/modules/ppp.ver>
+#include <linux/modules/procfs_syms.ver>
+#include <linux/modules/psnap.ver>
+#include <linux/modules/scsi_syms.ver>
+#include <linux/modules/serial.ver>
+#include <linux/modules/slhc.ver>
+#include <linux/modules/vfatfs_syms.ver>
+#undef CONFIG_MODVERSIONS
+#endif
exit_mmap(mm);
goto free_mm;
}
+ down(&mm->mmap_sem);
if (dup_mmap(mm)) {
+ up(&mm->mmap_sem);
tsk->mm = NULL;
exit_mmap(mm);
free_page_tables(mm);
kfree(mm);
return -ENOMEM;
}
+ up(&mm->mmap_sem);
return 0;
}
SET_PAGE_DIR(tsk, current->mm->pgd);