]> git.neil.brown.name Git - history.git/commitdiff
Import 2.0.34pre5 2.0.34pre5
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:11:40 +0000 (15:11 -0500)
committerAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:11:40 +0000 (15:11 -0500)
arch/i386/kernel/head.S
drivers/scsi/BusLogic.c
drivers/scsi/BusLogic.h
drivers/scsi/FlashPoint.c
drivers/scsi/Makefile
drivers/scsi/README.BusLogic
include/linux/modversions.h [new file with mode: 0644]
kernel/fork.c

index 454f4493703bbc6edfca927cb594b9a1ba2a1816..10766d03ac87398ac203e2864628d5b4f1dde10e 100644 (file)
@@ -148,6 +148,21 @@ checkCPUtype:
        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
@@ -198,6 +213,9 @@ ncyrix:     movl $3, SYMBOL_NAME(x86)
 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
@@ -211,6 +229,11 @@ isnew:     pushl %ecx              # restore original EFLAGS
        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
@@ -221,7 +244,7 @@ isnew:      pushl %ecx              # restore original EFLAGS
        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
index b81756cc851ff4a3b0cb58477fd4a617aae160da..a658b1174f7d8aa5185d9294ed65f532fed6cba4 100644 (file)
@@ -26,8 +26,8 @@
 */
 
 
-#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>
@@ -1020,6 +1020,38 @@ static int BusLogic_InitializeMultiMasterProbeInfo(BusLogic_HostAdapter_T
           : 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;
 }
 
@@ -1976,6 +2008,12 @@ Common:
   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
@@ -2682,17 +2720,26 @@ static void BusLogic_SelectQueueDepths(SCSI_Host_T *Host,
   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)
@@ -4567,14 +4614,18 @@ static boolean BusLogic_ParseKeyword(char **StringPointer, char *Keyword)
   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>...]
 
@@ -4826,6 +4877,7 @@ static void BusLogic_ParseDriverOptions(char *OptionsString)
                                 NULL, QueueDepth);
                  return;
                }
+             DriverOptions->CommonQueueDepth = QueueDepth;
              for (TargetID = 0;
                   TargetID < BusLogic_MaxTargetDevices;
                   TargetID++)
index ef7a8dcca1c16177ee2ae359b1868f92fc671ec4..0e07abe1f2a81852f4e5f5e35cec1d993c3fc92d 100644 (file)
@@ -1252,6 +1252,7 @@ typedef struct BusLogic_DriverOptions
   unsigned short TaggedQueuingPermittedMask;
   unsigned short BusSettleTime;
   BusLogic_LocalOptions_T LocalOptions;
+  unsigned char CommonQueueDepth;
   unsigned char QueueDepth[BusLogic_MaxTargetDevices];
   BusLogic_ErrorRecoveryStrategy_T
     ErrorRecoveryStrategy[BusLogic_MaxTargetDevices];
@@ -1412,6 +1413,7 @@ typedef struct BusLogic_HostAdapter
   unsigned short DriverQueueDepth;
   unsigned short HostAdapterQueueDepth;
   unsigned short UntaggedQueueDepth;
+  unsigned short CommonQueueDepth;
   unsigned short BusSettleTime;
   unsigned short SynchronousPermitted;
   unsigned short FastPermitted;
index 831a0e1421b598ba5e9ffdf999185587f8930273..d94631a416e9e2ebc1549808e690c44b20c29563 100644 (file)
@@ -17,7 +17,6 @@
 
 
 #include <linux/config.h>
-#include <asm/io.h>
 
 
 #ifndef CONFIG_SCSI_OMIT_FLASHPOINT
index 53d618a91ec65275b22c2e8b777f3e27220f813c..8d12efc7b239c562fc31b0e789012c823de4d279 100644 (file)
@@ -370,9 +370,6 @@ endif
 
 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 
 
index 60fa4011c00e44eea33137259a7277467734080f..05ac7412cd143114d5945a2281af57fee0eb9bbf 100644 (file)
@@ -1,10 +1,10 @@
           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
@@ -429,14 +429,18 @@ following options are available:
 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>...]
 
@@ -587,7 +591,7 @@ 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.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
diff --git a/include/linux/modversions.h b/include/linux/modversions.h
new file mode 100644 (file)
index 0000000..1103f93
--- /dev/null
@@ -0,0 +1,30 @@
+#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
index 3750b8322be1e5d7a82fb44996016cb0b3a32307..42254afadefc20e636e33e81e86dc06daf06a28e 100644 (file)
@@ -136,7 +136,9 @@ static inline int copy_mm(unsigned long clone_flags, struct task_struct * tsk)
                        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);
@@ -144,6 +146,7 @@ free_mm:
                        kfree(mm);
                        return -ENOMEM;
                }
+               up(&mm->mmap_sem);
                return 0;
        }
        SET_PAGE_DIR(tsk, current->mm->pgd);