]> git.neil.brown.name Git - history.git/commitdiff
2.2.18pre20 2.2.18pre20
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:22:44 +0000 (15:22 -0500)
committerAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:22:44 +0000 (15:22 -0500)
o Fix ide-probe SMP build error (Ian Morgan)
o Fix appletalk physical layer ioctl handling (Andi Kleen)
o Sparc update (Dave Miller)
o Update Stephen Tweedie's contact info (Stephen Tweedie)
o Fix typo in esp and scsi_obsolete code (Dave Miller)
o Bonding ioctl check fix (Willy Tarreau)
o Fix ipv6 procfs bug (Al Viro)
o Report PIV in proc as family 15 and uname as (Alan Cox)
model 6 as discussed
o Redo Intel cache decodes as code not tables (Alan Cox)
and add new ones  (based on updates by
Asit Mallick & Andrew Ip)
o Fix CMOS locking in machine_power_off paths (Alan Cox)
o Create build tree symlinks only if insmod is
new enough not to be confused by it (Keith Owens)
o Fix cmsg handling (Philippe Troin)
o Tiny xpds driver changes (Dan Hollis)
o Fix vmalloc sign bug (Ben LaHaise)
o SMBFS fixes/changes for find_next problems and (Urban Widmark)
to avoid truncate bug in netapps
o Fix ntfs translation bug (Anton Altaparmakov)
o Fix sparc problem with some soundcards and the (Jeff Garzik)
_IOC magic
o Update ppa driver to v2.05 (Tim Waugh)

45 files changed:
CREDITS
Makefile
arch/i386/kernel/process.c
arch/i386/kernel/setup.c
arch/sparc/config.in
arch/sparc64/config.in
arch/sparc64/defconfig
arch/sparc64/kernel/psycho.c
arch/sparc64/kernel/sparc64_ksyms.c
drivers/block/ide-probe.c
drivers/char/rio/riotty.c
drivers/net/bonding.c
drivers/net/xpds/xpds-encap-fr.c
drivers/net/xpds/xpds.c
drivers/sbus/audio/Config.in
drivers/scsi/esp.c
drivers/scsi/ppa.c
drivers/scsi/ppa.h
drivers/scsi/scsi_obsolete.c
drivers/sound/ac97.c
drivers/sound/ac97_codec.c
drivers/sound/ad1816.c
drivers/sound/cmpci.c
drivers/sound/cs4281.c
drivers/sound/es1370.c
drivers/sound/es1371.c
drivers/sound/esssolo1.c
drivers/sound/maestro.c
drivers/sound/sonicvibes.c
drivers/video/atyfb.c
fs/ntfs/super.c
fs/smbfs/ChangeLog
fs/smbfs/proc.c
fs/smbfs/sock.c
include/asm-i386/bugs.h
include/asm-i386/spinlock.h
include/asm-sparc/asm_offsets.h
include/asm-sparc64/io.h
include/linux/smb.h
kernel/ksyms.c
mm/vmalloc.c
net/appletalk/ddp.c
net/core/scm.c
net/ipv4/proc.c
net/ipv6/route.c

diff --git a/CREDITS b/CREDITS
index 87c7253d18b41d71447ce1ec3711ad6fb88efdc3..285986308b3cfcedf983d08f53234161143d2419 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -2177,17 +2177,14 @@ S: Rockville, Maryland 20853
 S: USA
 
 N: Stephen Tweedie
-E: sct@dcs.ed.ac.uk
+E: sct@redhat.com
 P: 1024/E7A417AD E2 FE A4 20 34 EC ED FC 7D 7E 67 8D E0 31 D1 69
+P: 1024D/43BE7544 D2A4 8556 08E6 90E7 076C  BA3F 243F 20A4 43BE 7544
 D: Second extended file system developer
 D: General filesystem hacker
 D: kswap vm management code
-S: Dept. of Computer Science
-S: University of Edinburgh
-S: JCMB, The King's Buildings
-S: Mayfield Road
-S: Edinburgh 
-S: EH9 3JZ
+S: 44 Campbell Park Crescent
+S: Edinburgh EH13 0HT
 S: United Kingdom
 
 N: Thomas Uhl
index 1e210bbb96d6a003bddbcb77a6c30a57e12dc5f3..b84d817a14923efb3add9f67dee185cde818700e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 2
 SUBLEVEL = 18
-EXTRAVERSION = pre19
+EXTRAVERSION = pre20
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
@@ -335,6 +335,7 @@ modules_install:
        MODLIB=$(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE); \
        mkdir -p $$MODLIB; \
        rm -f $$MODLIB/build; \
+       [ `/sbin/insmod -V 2>&1 | head -1 | awk '/^insmod version /{split("$3", a, /\./); printf "%d%03d%03d\n", a[1], a[2], a[3];}'`0 -ge 20030140 ] && \
        ln -s `pwd` $$MODLIB/build; \
        cd modules; \
        MODULES=""; \
index 0267180290d769d0b211019fd363e4b0bba1fab2..096226ab1f5c53731ad8f5c4445ec144e169524e 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/smp.h>
 #include <linux/reboot.h>
 #include <linux/init.h>
+#include <linux/mc146818rtc.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
@@ -253,8 +254,10 @@ static inline void kb_wait(void)
  */
 void machine_real_restart(unsigned char *code, int length)
 {
+       unsigned long flags;
+       
        cli();
-
+       
        /* Write zero to CMOS register number 0x0f, which the BIOS POST
           routine will recognize as telling it to do a proper reboot.  (Well
           that's what this book in front of me says -- it may only apply to
@@ -264,8 +267,9 @@ void machine_real_restart(unsigned char *code, int length)
           `outb_p' is needed instead of just `outb'.  Use it to be on the
           safe side. */
 
-       outb_p (0x8f, 0x70);
-       outb_p (0x00, 0x71);
+       spin_lock_irqsave(&rtc_lock, flags);
+       CMOS_WRITE(0x00, 0x8f);
+       spin_unlock_irqrestore(&rtc_lock, flags);
 
        /* Remap the kernel at virtual address zero, as well as offset zero
           from the kernel segment.  This assumes the kernel segment starts at
index 17fc5a7ec9259a913d0a2afd9fcd7b9135643c16..f8177585136c2d8770c257de0641c7a6aed2ca6f 100644 (file)
  *
  *     Added Cyrix III initial detection code
  *     Alan Cox <alan@redhat.com>, Septembr 2000
+ *
+ *      Improve cache size calculation
+ *      Asit Mallick <asit.k.mallick@intel.com>, October 2000
+ *      Andrew Ip <aip@turbolinux.com>, October 2000
  */
 
 /*
@@ -914,7 +918,7 @@ __initfunc(void identify_cpu(struct cpuinfo_x86 *c))
        int i;
        char *p = NULL;
        extern void mcheck_init(void);
-
+       
        c->loops_per_jiffy = loops_per_jiffy;
        c->x86_cache_size = -1;
 
@@ -961,55 +965,97 @@ __initfunc(void identify_cpu(struct cpuinfo_x86 *c))
 
        if (c->cpuid_level > 1) {
                /* supports eax=2  call */
-               int edx, dummy;
-                       
-               cpuid(2, &dummy, &dummy, &dummy, &edx);
-
-               /* We need only the LSB */
-               edx &= 0xff;
+               int regs[4];
+               int l1c=0, l1d=0, l2=0, l3=0;   /* Cache sizes */
 
-               switch (edx) {
-                       case 0x40:
-                               c->x86_cache_size = 0;
-                               break;
+               cpuid(2, &regs[0], &regs[1], &regs[2], &regs[3]);
+               /* Least significant byte of eax says how many times
+                * to call cpuid with value 2 to get cache and TLB
+                * info.
+                */
+               if ((regs[0] & 0xFF) != 1 )
+                       printk(KERN_WARNING "Multiple cache reports are not supported yet\n");
 
-                       case 0x41: /* 4-way 128 */
-                               c->x86_cache_size = 128;
-                               break;
+               c->x86_cache_size = 0;
 
-                       case 0x42: /* 4-way 256 */
-                       case 0x82: /* 8-way 256 */
-                               c->x86_cache_size = 256;
-                               break;
-
-                       case 0x43: /* 4-way 512 */
-                               c->x86_cache_size = 512;
-                               break;
+               for ( i = 0 ; i < 4 ; i++ ) 
+               {
+                       int j;
 
-                       case 0x44: /* 4-way 1024 */
-                       case 0x84: /* 8-way 1024 */
-                               c->x86_cache_size = 1024;
-                               break;
+                        if ( regs[i] < 0 )
+                                continue; /* no useful data */
 
-                       case 0x45: /* 4-way 2048 */
-                       case 0x85: /* 8-way 2048 */
-                               c->x86_cache_size = 2048;
-                               break;
+                        /* look at all the bytes returned */
 
-                       default:
-                               c->x86_cache_size = 0;
-                               break;
+                        for ( j = ( i == 0 ? 8:0 ) ; j < 25 ; j+=8 )
+                        {
+                               unsigned char rh = regs[i]>>j;
+                               unsigned char rl;
+                               
+                               rl = rh & 0x0F;
+                               rh >>=4;
+                               
+                               switch(rh)
+                               {
+                                       case 2:
+                                               if(rl)
+                                               {
+                                                       printk("%dK L3 cache\n", (rl-1)*512);
+                                                       l3 += (rl-1)*512;
+                                               }
+                                               break;
+                                       case 4:
+                                       case 8:
+                                               if(rl)
+                                               {
+                                                       printk("%dK L2 cache (%d way)\n",128<<(rl-1), rh);
+                                                       l2 += 128<<(rl-1);
+                                               }
+                                               break;
+                                       
+                                       /*
+                                        *      L1 caches do not count for SMP switching weights,
+                                        *      they are shadowed by L2.
+                                        */
+                                        
+                                       case 6:
+                                               if(rh==6 && rl > 5)
+                                               {
+                                                       printk("%dK L1 data cache\n", 8<<(rl - 6));
+                                                       l1d+=8<<(rl-6);
+                                               }
+                                               break;
+                                       case 7:
+                                               printk("%dK L1 instruction cache\n",
+                                                       rl?(16<<(rl-1)):12);
+                                               l1c+=rl?(16<<(rl-1)):12;
+                                               break;
+                               }                     
+                       }                       
                }
+               if(l1c && l1d)
+                       printk("CPU: L1 I Cache: %dK  L1 D Cache: %dK\n",
+                               l1c, l1d);
+               if(l2)
+                       printk("CPU: L2 Cache: %dK\n", l2);
+               if(l3)
+                       printk("CPU: L3 Cache: %dK\n", l3);
+                       
+               /*
+                *      Assuming L3 is shared. The L1 cache is shadowed by L2
+                *      so doesn't need to be included.
+                */
+                
+               c->x86_cache_size += l2;
        }
        
        /*
         *      Intel finally adopted the AMD/Cyrix extended id naming
-        *      stuff
+        *      stuff for the 'Pentium IV'
         */
         
        if(c->x86_vendor ==X86_VENDOR_INTEL && c->x86 == 15)
        {
-               c->x86 = 6;
                intel_model(c);
                return;
        }
@@ -1158,12 +1204,12 @@ int get_cpuinfo(char * buffer)
 #endif
                p += sprintf(p,"processor\t: %d\n"
                               "vendor_id\t: %s\n"
-                              "cpu family\t: %c\n"
+                              "cpu family\t: %d\n"
                               "model\t\t: %d\n"
                               "model name\t: %s\n",
                               n,
                               c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown",
-                              c->x86 + '0',
+                              c->x86,
                               c->x86_model,
                               c->x86_model_id[0] ? c->x86_model_id : "unknown");
 
index f58277be09e18d7536936437a0feacf895c3bb05..71ba40454c355e72a1f01e78709b1a240725a17d 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: config.in,v 1.68.2.1 1999/09/22 11:37:34 jj Exp $
+# $Id: config.in,v 1.68.2.7 2000/10/24 21:00:53 davem Exp $
 # For a description of the syntax of this configuration file,
 # see Documentation/kbuild/config-language.txt.
 #
@@ -24,6 +24,9 @@ comment 'General setup'
 define_bool CONFIG_VT y
 define_bool CONFIG_VT_CONSOLE y
 
+# Identify this as a Sparc32 build
+define_bool CONFIG_SPARC32 y
+
 bool 'Support for AP1000 multicomputer' CONFIG_AP1000
 bool 'Symmetric multi-processing support (does not work on sun4/sun4c)' CONFIG_SMP
 
index a6d8b70464d7f130dc311a32ab7a58bee732439b..30794bd95fcc50a6c2348de723e33a6487ab8d53 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: config.in,v 1.67.2.11 2000/07/27 01:50:59 davem Exp $
+# $Id: config.in,v 1.67.2.13 2000/10/24 21:00:53 davem Exp $
 # For a description of the syntax of this configuration file,
 # see Documentation/kbuild/config-language.txt.
 #
@@ -26,12 +26,8 @@ define_bool CONFIG_VT_CONSOLE y
 
 bool 'Symmetric multi-processing support' CONFIG_SMP
 
-mainmenu_option next_comment
-comment 'Console drivers'
-bool 'PROM console' CONFIG_PROM_CONSOLE
-bool 'Support Frame buffer devices' CONFIG_FB
-source drivers/video/Config.in
-endmenu
+# Identify this as a Sparc64 build
+define_bool CONFIG_SPARC64 y
 
 # Global things across all Sun machines.
 define_bool CONFIG_SBUS y
@@ -45,6 +41,14 @@ define_bool CONFIG_SUN_CONSOLE y
 define_bool CONFIG_SUN_AUXIO y
 define_bool CONFIG_SUN_IO y
 bool 'PCI support' CONFIG_PCI
+
+mainmenu_option next_comment
+comment 'Console drivers'
+bool 'PROM console' CONFIG_PROM_CONSOLE
+bool 'Support Frame buffer devices' CONFIG_FB
+source drivers/video/Config.in
+endmenu
+
 source drivers/sbus/char/Config.in
 source drivers/sbus/audio/Config.in
 
index 2763aa73fbbe8eb8b0bd710236d0179c6bb51656..b6e91bcfdebab44735702ffff89d287a93e8a1ba 100644 (file)
@@ -20,6 +20,18 @@ CONFIG_KMOD=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 # CONFIG_SMP is not set
+CONFIG_SPARC64=y
+CONFIG_SBUS=y
+CONFIG_SBUSCHAR=y
+CONFIG_SUN_MOUSE=y
+CONFIG_SERIAL=y
+CONFIG_SUN_SERIAL=y
+CONFIG_SERIAL_CONSOLE=y
+CONFIG_SUN_KEYBOARD=y
+CONFIG_SUN_CONSOLE=y
+CONFIG_SUN_AUXIO=y
+CONFIG_SUN_IO=y
+CONFIG_PCI=y
 
 #
 # Console drivers
@@ -48,17 +60,6 @@ CONFIG_FBCON_CFB32=y
 CONFIG_FBCON_FONTWIDTH8_ONLY=y
 CONFIG_FONT_SUN8x16=y
 # CONFIG_FBCON_FONTS is not set
-CONFIG_SBUS=y
-CONFIG_SBUSCHAR=y
-CONFIG_SUN_MOUSE=y
-CONFIG_SERIAL=y
-CONFIG_SUN_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
-CONFIG_SUN_KEYBOARD=y
-CONFIG_SUN_CONSOLE=y
-CONFIG_SUN_AUXIO=y
-CONFIG_SUN_IO=y
-CONFIG_PCI=y
 
 #
 # Misc Linux/SPARC drivers
@@ -75,9 +76,7 @@ CONFIG_SUN_AURORA=m
 # Linux/SPARC audio subsystem (EXPERIMENTAL)
 #
 CONFIG_SPARCAUDIO=y
-# CONFIG_SPARCAUDIO_AMD7930 is not set
 CONFIG_SPARCAUDIO_CS4231=y
-# CONFIG_SPARCAUDIO_DBRI is not set
 # CONFIG_SPARCAUDIO_DUMMY is not set
 CONFIG_SUN_OPENPROMFS=m
 CONFIG_PCI_OLD_PROC=y
@@ -164,6 +163,7 @@ CONFIG_ATALK=m
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
 # CONFIG_BRIDGE is not set
+# CONFIG_NET_DIVERT is not set
 # CONFIG_LLC is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
@@ -316,11 +316,11 @@ CONFIG_SGI_PARTITION=y
 #
 CONFIG_CODA_FS=m
 CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
 CONFIG_NFSD=m
-# CONFIG_NFSD_SUN is not set
+CONFIG_NFSD_V3=y
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
-CONFIG_NFS_V3=y
 CONFIG_SMB_FS=m
 # CONFIG_SMB_NLS_DEFAULT is not set
 CONFIG_NCP_FS=m
index 21acaf1865790695659052cea94e73643ac4d8c0..c64797d180cfee1eb0fc5b59dcb8402a7fd778ce 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: psycho.c,v 1.85.2.10 2000/06/14 07:41:19 davem Exp $
+/* $Id: psycho.c,v 1.85.2.11 2000/10/24 21:00:53 davem Exp $
  * psycho.c: Ultra/AX U2P PCI controller support.
  *
  * Copyright (C) 1997 David S. Miller (davem@caipfs.rutgers.edu)
 #define dprintf printk
 #endif
 
-unsigned long pci_dvma_offset = 0x00000000UL;
-unsigned long pci_dvma_mask = 0xffffffffUL;
-
-#define PCI_DVMA_HASH_NONE     0xffffffffffffffffUL
-unsigned long pci_dvma_v2p_hash[PCI_DVMA_HASHSZ];
-unsigned long pci_dvma_p2v_hash[PCI_DVMA_HASHSZ];
-
 /* If this is non-NULL it points to Sabre's DMA write-sync register
  * which is used by drivers of devices behind bridges other than APB
  * to synchronize DMA write streams with interrupt delivery.
@@ -70,6 +63,13 @@ asmlinkage int sys_pciconfig_write(unsigned long bus,
 
 #else
 
+unsigned long pci_dvma_offset = 0x00000000UL;
+unsigned long pci_dvma_mask = 0xffffffffUL;
+
+#define PCI_DVMA_HASH_NONE     0xffffffffffffffffUL
+unsigned long pci_dvma_v2p_hash[PCI_DVMA_HASHSZ];
+unsigned long pci_dvma_p2v_hash[PCI_DVMA_HASHSZ];
+
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
 #include <linux/pci.h>
index 1b8b83a2c00d2a18b6ed32ba5b82a210bafe69f8..934ec309b5c7160b78928db54bdde2a1054d6904 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: sparc64_ksyms.c,v 1.58.2.9 2000/09/05 00:10:54 davem Exp $
+/* $Id: sparc64_ksyms.c,v 1.58.2.11 2000/10/25 21:17:44 davem Exp $
  * arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support.
  *
  * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
@@ -47,6 +47,7 @@
 #endif
 #include <asm/a.out.h>
 #include <asm/svr4.h>
+#include <asm/elf.h>
 
 struct poll {
        int fd;
@@ -89,6 +90,7 @@ extern void bcopy (const char *, char *, int);
 extern int __ashrdi3(int, int);
 
 extern void dump_thread(struct pt_regs *, struct user *);
+extern int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs);
 
 #ifdef __SMP__
 extern spinlock_t kernel_flag;
@@ -206,6 +208,7 @@ EXPORT_SYMBOL(_sigpause_common);
 
 /* Should really be in linux/kernel/ksyms.c */
 EXPORT_SYMBOL(dump_thread);
+EXPORT_SYMBOL(dump_fpu);
 
 /* math-emu wants this */
 EXPORT_SYMBOL(die_if_kernel);
@@ -244,6 +247,7 @@ EXPORT_SYMBOL(__strlen);
 #if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 91)
 EXPORT_SYMBOL(strlen);
 #endif
+EXPORT_SYMBOL(__strlen_user);
 EXPORT_SYMBOL(strnlen);
 EXPORT_SYMBOL(strcpy);
 EXPORT_SYMBOL(strncpy);
index 2f3876b30c95ae27c2d46a9b6c7bf2b18f2f0289..6643df20bb4f7b46522121ab21d461de66dd973a 100644 (file)
@@ -37,6 +37,7 @@
 #include <linux/genhd.h>
 #include <linux/malloc.h>
 #include <linux/delay.h>
+#include <linux/mc146818rtc.h> /* CMOS defines */
 
 #include <asm/byteorder.h>
 #include <asm/irq.h>
index 087b1b8a91a91f9f4ab86bc12ad45433928febdb..2ff09394d89fc9bf7767bb5c6e7f924216fc1e06 100644 (file)
@@ -452,7 +452,7 @@ bombout:
                                */
                                PortP->State |= RIO_WOPEN;
                                rio_spin_unlock_irqrestore(&PortP->portSem, flags);
-                               if (RIODelay (&PortP, HUNDRED_MS) == RIO_FAIL)
+                               if (RIODelay (PortP, HUNDRED_MS) == RIO_FAIL)
 #if 0
                                if ( sleep((caddr_t)&tp->tm.c_canqo, TTIPRI|PCATCH))
 #endif
index 48917a65fc5e9904692cf9d372c6259cb0e8b00e..3ba5e600f6b1aac9282297dc0953c158419714a8 100644 (file)
@@ -176,6 +176,9 @@ static int bond_ioctl(struct device *master, struct ifreq *ifr, int cmd)
 {
        struct device *slave = dev_get(ifr->ifr_slave);
 
+       if (!capable(CAP_NET_ADMIN))
+               return -EPERM;
+
 #ifdef BONDING_DEBUG
        printk("master=%s, slave=%s\n", master->name, slave->name);
 #endif
index 3306134f7c628dc689e193a90224ed5878b469d5..7a9779f3b22dc337c4e1fa8e68002a2c88bf5d21 100644 (file)
@@ -740,7 +740,7 @@ xpds_dlci_transmit(struct sk_buff *skb, struct net_device *dev)
        kfree (buffer);
 
        if (rc) {
-               xpds_data[card_num].stats.tx_errors++;
+               if (rc != -EBUSY) xpds_data[card_num].stats.tx_errors++;
        } else {
                xpds_data[card_num].stats.tx_packets++;
                dev_kfree_skb(skb);
index 503264463b09953212179ed47aeab434f5f4cba5..aeb6b8cbcf057755839d1d5a27dc10851bf0803b 100644 (file)
@@ -4,7 +4,7 @@
  * License to copy and distribute is GNU General Public License, version 2.
  */
 #ifndef VERSION_STRING
-#define VERSION_STRING "$Revision: 1.33 $"
+#define VERSION_STRING "release-20001009k"
 #endif
 
 #define LT_IND_AI      0xc
index 34f8124cd77afeddf56b4015b2f8a092435e52bd..cc7b4a30649f931a9eb92dd13d0d60252712bbb3 100644 (file)
@@ -7,8 +7,10 @@ if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
   comment 'Linux/SPARC audio subsystem (EXPERIMENTAL)'
 
   tristate 'Audio support (EXPERIMENTAL)' CONFIG_SPARCAUDIO
-  dep_tristate '  AMD7930 Lowlevel Driver' CONFIG_SPARCAUDIO_AMD7930 $CONFIG_SPARCAUDIO
+  if [ "$CONFIG_SPARC64" != "y" ]; then
+    dep_tristate '  AMD7930 Lowlevel Driver' CONFIG_SPARCAUDIO_AMD7930 $CONFIG_SPARCAUDIO
+    dep_tristate '  DBRI Lowlevel Driver' CONFIG_SPARCAUDIO_DBRI $CONFIG_SPARCAUDIO
+  fi
   dep_tristate '  CS4231 Lowlevel Driver' CONFIG_SPARCAUDIO_CS4231 $CONFIG_SPARCAUDIO
-  dep_tristate '  DBRI Lowlevel Driver' CONFIG_SPARCAUDIO_DBRI $CONFIG_SPARCAUDIO
   dep_tristate '  Dummy Lowlevel Driver' CONFIG_SPARCAUDIO_DUMMY $CONFIG_SPARCAUDIO
 fi
index fadf90d2ae1638f8bcf1edae9bc6c526293591d2..27eda75ed6dea38cab7eee838873b56bd65ca607 100644 (file)
@@ -396,7 +396,7 @@ extern inline void esp_cmd(struct Sparc_ESP *esp, struct Sparc_ESP_regs *eregs,
  *
  * struct scsi_cmnd:
  *
- *   We keep track of the syncronous capabilities of a target
+ *   We keep track of the synchronous capabilities of a target
  *   in the device member, using sync_min_period and
  *   sync_max_offset.  These are the values we directly write
  *   into the ESP registers while running a command.  If offset
@@ -2521,7 +2521,7 @@ static int esp_do_data_finale(struct Sparc_ESP *esp,
         * on HME broken adapters because we skip the HME fifo
         * workaround code in esp_handle() if we are doing data
         * phase things.  We don't want to fuck directly with
-        * the fifo like that, especially if doing syncronous
+        * the fifo like that, especially if doing synchronous
         * transfers!  Also, will need to double the count on
         * HME if we are doing wide transfers, as the HME fifo
         * will move and count 16-bit quantities during wide data.
index 8eb8d489e3285a132b0d86da6eb0e8ddcf9e1ee0..62dad99ad88583be4fd73ffaef0326a73cfe45c3 100644 (file)
@@ -299,12 +299,11 @@ static unsigned char ppa_wait(int host_no)
     unsigned char r;
 
     k = PPA_SPIN_TMO;
-    do {
-       r = r_str(ppb);
-       k--;
-       udelay(1);
+    /* Wait for bit 6 and 7 - PJC */
+    for (r = r_str (ppb); ((r & 0xc0)!=0xc0) && (k); k--) {
+           udelay (1);
+           r = r_str (ppb);
     }
-    while (!(r & 0x80) && (k));
 
     /*
      * return some status information.
@@ -653,11 +652,7 @@ static int ppa_completion(Scsi_Cmnd * cmd)
            (v == WRITE_6) ||
            (v == WRITE_10));
 
-    /*
-     * We only get here if the drive is ready to comunicate,
-     * hence no need for a full ppa_wait.
-     */
-    r = (r_str(ppb) & 0xf0);
+    r = ppa_wait(host_no); /* Need a ppa_wait() - PJC */
 
     while (r != (unsigned char) 0xf0) {
        /*
@@ -695,7 +690,7 @@ static int ppa_completion(Scsi_Cmnd * cmd)
            }
        }
        /* Now check to see if the drive is ready to comunicate */
-       r = (r_str(ppb) & 0xf0);
+       r = ppa_wait(host_no); /* need ppa_wait() - PJC */
        /* If not, drop back down to the scheduler and wait a timer tick */
        if (!(r & 0x80))
            return 0;
index 618cf518a3e39a14853cefe6623f17ddf5a86927..fb2997df6ac990f730f81d4e44c4634cc5e19376 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef _PPA_H
 #define _PPA_H
 
-#define   PPA_VERSION   "2.03 (for Linux 2.2.x)"
+#define   PPA_VERSION   "2.05 (for Linux 2.2.x)"
 
 /* 
  * this driver has been hacked by Matteo Frigo (athena@theory.lcs.mit.edu)
  *    CONFIG_SCSI_PPA_HAVE_PEDANTIC => CONFIG_SCSI_IZIP_EPP16
  *    added CONFIG_SCSI_IZIP_SLOW_CTR option
  *                                                      [2.03]
+ *
+ * Use ppa_wait() to check for ready AND connected status bits
+ * Add ppa_wait() calls to ppa_completion()
+ *  by Peter Cherriman <pjc@ecs.soton.ac.uk> and
+ *     Tim Waugh <twaugh@redhat.com>
+ *                                                      [2.04]
+ * Fix kernel panic on scsi timeout, 2000-08-18                [2.05]
  */
 /* ------ END OF USER CONFIGURABLE PARAMETERS ----- */
 
@@ -166,6 +173,7 @@ int ppa_biosparam(Disk *, kdev_t, int *);
                eh_device_reset_handler:        NULL,                   \
                eh_bus_reset_handler:           ppa_reset,              \
                eh_host_reset_handler:          ppa_reset,              \
+               use_new_eh_code:                1,                      \
                bios_param:                     ppa_biosparam,          \
                this_id:                        -1,                     \
                sg_tablesize:                   SG_ALL,                 \
index 2ca49f71cc4ad46614c7f8b21fba3cd0d3228d0b..f15bb2dd76c049257006d1b6d99e697cb3205fba 100644 (file)
@@ -366,7 +366,7 @@ void scsi_old_done (Scsi_Cmnd * SCpnt)
         * crashing, all scsi_done() calls during sync resets are ignored.
         */
         printk("scsi%d: device driver called scsi_done() "
-              "for a syncronous reset.\n", SCpnt->host->host_no);
+              "for a synchronous reset.\n", SCpnt->host->host_no);
         return;
     }
     if(SCpnt->flags & WAS_SENSE)
index b54e62f769547d04639a38c9e7c5fdbdc0dd8922..0bfb34889a809895e7e7a713baed9a69e35220e3 100644 (file)
@@ -404,19 +404,19 @@ ac97_mixer_ioctl (struct ac97_hwint *dev, unsigned int cmd, caddr_t arg)
        /* Read or write request. */
        ret = -EINVAL;
        if (_IOC_TYPE (cmd) == 'M') {
-           int dir = _IOC_DIR (cmd);
+           int dir = _SIOC_DIR (cmd);
            int channel = _IOC_NR (cmd);
 
            if (channel >= 0 && channel < SOUND_MIXER_NRDEVICES) {
                ret = 0;
-               if (dir & _IOC_WRITE) {
+               if (dir & _SIOC_WRITE) {
                    int val;
                    if (get_user (val, (int *) arg) == 0)
                        ret = ac97_set_mixer (dev, channel, val);
                    else
                        ret = -EFAULT;
                }
-               if (ret >= 0 && (dir & _IOC_READ)) {
+               if (ret >= 0 && (dir & _SIOC_READ)) {
                    if (dev->last_written_OSS_values[channel]
                        == AC97_REGVAL_UNKNOWN)
                        dev->last_written_OSS_values[channel]
index a9b36e2321f8ecd25677afc9fd853f6bc6da0f4f..0a41f59705f3041d39026689b27c7752eb1d16c7 100644 (file)
@@ -402,13 +402,13 @@ static int ac97_mixer_ioctl(struct ac97_codec *codec, unsigned int cmd, unsigned
                return 0;
        }
 
-       if (_IOC_TYPE(cmd) != 'M' || _IOC_SIZE(cmd) != sizeof(int))
+       if (_IOC_TYPE(cmd) != 'M' || _SIOC_SIZE(cmd) != sizeof(int))
                return -EINVAL;
 
        if (cmd == OSS_GETVERSION)
                return put_user(SOUND_VERSION, (int *)arg);
 
-       if (_IOC_DIR(cmd) == _IOC_READ) {
+       if (_SIOC_DIR(cmd) == _SIOC_READ) {
                switch (_IOC_NR(cmd)) {
                case SOUND_MIXER_RECSRC: /* give them the current record source */
                        if (!codec->recmask_io) {
@@ -448,7 +448,7 @@ static int ac97_mixer_ioctl(struct ac97_codec *codec, unsigned int cmd, unsigned
                return put_user(val, (int *)arg);
        }
 
-       if (_IOC_DIR(cmd) == (_IOC_WRITE|_IOC_READ)) {
+       if (_SIOC_DIR(cmd) == (_SIOC_WRITE|_SIOC_READ)) {
                codec->modcnt++;
                if (get_user(val, (int *)arg))
                        return -EFAULT;
index c944815247a0aa24c0fb17f51106ba7986b356aa..e787f2176a1bb1047c316a0bc097af8b73499e14 100644 (file)
@@ -1010,7 +1010,7 @@ ad1816_mixer_ioctl (int dev, unsigned int cmd, caddr_t arg)
        if (((cmd >> 8) & 0xff) == 'M') { 
                
                /* set ioctl */
-               if (_IOC_DIR (cmd) & _IOC_WRITE) { 
+               if (_SIOC_DIR (cmd) & _SIOC_WRITE) { 
                        switch (cmd & 0xff){
                        case SOUND_MIXER_RECSRC:
                                
index 5f8822e88a625add626abbd889b945a93319cd90..b7495655e9770d8c48a1c02fcd9a706c32478752 100644 (file)
@@ -1044,9 +1044,9 @@ static int mixer_ioctl(struct cm_state *s, unsigned int cmd, unsigned long arg)
        }
        if (cmd == OSS_GETVERSION)
                return put_user(SOUND_VERSION, (int *)arg);
-       if (_IOC_TYPE(cmd) != 'M' || _IOC_SIZE(cmd) != sizeof(int))
+       if (_IOC_TYPE(cmd) != 'M' || _SIOC_SIZE(cmd) != sizeof(int))
                 return -EINVAL;
-        if (_IOC_DIR(cmd) == _IOC_READ) {
+        if (_SIOC_DIR(cmd) == _SIOC_READ) {
                 switch (_IOC_NR(cmd)) {
                 case SOUND_MIXER_RECSRC: /* Arg contains a bit for each recording source */
                        return put_user(mixer_recmask(s), (int *)arg);
@@ -1094,7 +1094,7 @@ static int mixer_ioctl(struct cm_state *s, unsigned int cmd, unsigned long arg)
 #endif /* OSS_DOCUMENTED_MIXER_SEMANTICS */
                }
        }
-        if (_IOC_DIR(cmd) != (_IOC_READ|_IOC_WRITE)) 
+        if (_SIOC_DIR(cmd) != (_SIOC_READ|_SIOC_WRITE)) 
                return -EINVAL;
        s->mix.modcnt++;
        switch (_IOC_NR(cmd)) {
index e275bb590740d30210b5b97477919eae689f5143..190abff629f359c1a8386ec54ba8c5247e29a493 100644 (file)
@@ -1064,12 +1064,12 @@ static int mixer_ioctl(struct cs4281_state *s, unsigned int cmd, unsigned long a
         if (cmd == OSS_GETVERSION)
                 return put_user(SOUND_VERSION, (int *)arg);
         
-        if (_IOC_TYPE(cmd) != 'M' || _IOC_SIZE(cmd) != sizeof(int))
+        if (_IOC_TYPE(cmd) != 'M' || _SIOC_SIZE(cmd) != sizeof(int))
                 return -EINVAL;
         
              // If ioctl has only the IOC_READ bit(bit 31)
              // on, process the only-read commands. 
-        if (_IOC_DIR(cmd) == _IOC_READ) {
+        if (_SIOC_DIR(cmd) == _SIOC_READ) {
                 switch (_IOC_NR(cmd)) {
                 case SOUND_MIXER_RECSRC: // Arg contains a bit for each recording source 
                     cs4281_read_ac97(s, BA0_AC97_RECORD_SELECT, &temp1);
@@ -1103,7 +1103,7 @@ static int mixer_ioctl(struct cs4281_state *s, unsigned int cmd, unsigned long a
         
              // If ioctl doesn't have both the IOC_READ and 
              // the IOC_WRITE bit set, return invalid.
-        if (_IOC_DIR(cmd) != (_IOC_READ|_IOC_WRITE))
+        if (_SIOC_DIR(cmd) != (_SIOC_READ|_SIOC_WRITE))
                 return -EINVAL;
         
              // Increment the count of volume writes.
index 01e5c924f191795bd2aa56de4ae498d3abd829e3..43bea56d3ee3aa1ea5f4a9fa590dfe1bc1db3354 100644 (file)
@@ -912,9 +912,9 @@ static int mixer_ioctl(struct es1370_state *s, unsigned int cmd, unsigned long a
        }
        if (cmd == OSS_GETVERSION)
                return put_user(SOUND_VERSION, (int *)arg);
-       if (_IOC_TYPE(cmd) != 'M' || _IOC_SIZE(cmd) != sizeof(int))
+       if (_IOC_TYPE(cmd) != 'M' || _SIOC_SIZE(cmd) != sizeof(int))
                 return -EINVAL;
-        if (_IOC_DIR(cmd) == _IOC_READ) {
+        if (_SIOC_DIR(cmd) == _SIOC_READ) {
                 switch (_IOC_NR(cmd)) {
                 case SOUND_MIXER_RECSRC: /* Arg contains a bit for each recording source */
                        return put_user(s->mix.recsrc, (int *)arg);
@@ -951,7 +951,7 @@ static int mixer_ioctl(struct es1370_state *s, unsigned int cmd, unsigned long a
                        return put_user(s->mix.vol[mixtable[i].volidx], (int *)arg);
                }
        }
-        if (_IOC_DIR(cmd) != (_IOC_READ|_IOC_WRITE)) 
+        if (_SIOC_DIR(cmd) != (_SIOC_READ|_SIOC_WRITE)) 
                return -EINVAL;
        s->mix.modcnt++;
        switch (_IOC_NR(cmd)) {
index 75a2f4b7d5617501a2f124b7015d2749f3bbeb81..edc376a0df7271c74e72822d764337e3d43d595e 100644 (file)
@@ -1528,9 +1528,9 @@ static int mixer_ioctl(struct es1371_state *s, unsigned int cmd, unsigned long a
        }
        if (cmd == OSS_GETVERSION)
                return put_user(SOUND_VERSION, (int *)arg);
-       if (_IOC_TYPE(cmd) != 'M' || _IOC_SIZE(cmd) != sizeof(int))
+       if (_IOC_TYPE(cmd) != 'M' || _SIOC_SIZE(cmd) != sizeof(int))
                 return -EINVAL;
-        if (_IOC_DIR(cmd) == _IOC_READ) {
+        if (_SIOC_DIR(cmd) == _SIOC_READ) {
                 switch (_IOC_NR(cmd)) {
                 case SOUND_MIXER_RECSRC: /* Arg contains a bit for each recording source */
                        return put_user(recsrc[rdcodec(s, AC97_RECORD_SELECT) & 7], (int *)arg);
@@ -1570,7 +1570,7 @@ static int mixer_ioctl(struct es1371_state *s, unsigned int cmd, unsigned long a
 #endif /* OSS_DOCUMENTED_MIXER_SEMANTICS */
                }
        }
-        if (_IOC_DIR(cmd) != (_IOC_READ|_IOC_WRITE)) 
+        if (_SIOC_DIR(cmd) != (_SIOC_READ|_SIOC_WRITE)) 
                return -EINVAL;
        s->mix.modcnt++;
        switch (_IOC_NR(cmd)) {
index 01ed8fb533946ce42410e38a2b2f98942afef449..1493738cad805186cd0bab4fb1bbec0ba0512532 100644 (file)
@@ -730,9 +730,9 @@ static int mixer_ioctl(struct solo1_state *s, unsigned int cmd, unsigned long ar
        }
        if (cmd == OSS_GETVERSION)
                return put_user(SOUND_VERSION, (int *)arg);
-       if (_IOC_TYPE(cmd) != 'M' || _IOC_SIZE(cmd) != sizeof(int))
+       if (_IOC_TYPE(cmd) != 'M' || _SIOC_SIZE(cmd) != sizeof(int))
                 return -EINVAL;
-        if (_IOC_DIR(cmd) == _IOC_READ) {
+        if (_SIOC_DIR(cmd) == _SIOC_READ) {
                 switch (_IOC_NR(cmd)) {
                 case SOUND_MIXER_RECSRC: /* Arg contains a bit for each recording source */
                        return put_user(mixer_src[read_mixer(s, 0x1c) & 7], (int *)arg);
@@ -761,7 +761,7 @@ static int mixer_ioctl(struct solo1_state *s, unsigned int cmd, unsigned long ar
                        return put_user(s->mix.vol[vidx-1], (int *)arg);
                }
        }
-        if (_IOC_DIR(cmd) != (_IOC_READ|_IOC_WRITE)) 
+        if (_SIOC_DIR(cmd) != (_SIOC_READ|_SIOC_WRITE)) 
                return -EINVAL;
        s->mix.modcnt++;
        switch (_IOC_NR(cmd)) {
index e35e64319abf9d1041cc87052af1e347192db160..958aa9f2aee5765103b6376eb36dbaca068ec5b3 100644 (file)
@@ -1984,10 +1984,10 @@ static int mixer_ioctl(struct ess_card *card, unsigned int cmd, unsigned long ar
        if (cmd == OSS_GETVERSION)
                return put_user(SOUND_VERSION, (int *)arg);
 
-       if (_IOC_TYPE(cmd) != 'M' || _IOC_SIZE(cmd) != sizeof(int))
+       if (_IOC_TYPE(cmd) != 'M' || _SIOC_SIZE(cmd) != sizeof(int))
                 return -EINVAL;
 
-        if (_IOC_DIR(cmd) == _IOC_READ) {
+        if (_SIOC_DIR(cmd) == _SIOC_READ) {
                 switch (_IOC_NR(cmd)) {
                 case SOUND_MIXER_RECSRC: /* give them the current record source */
 
@@ -2035,7 +2035,7 @@ static int mixer_ioctl(struct ess_card *card, unsigned int cmd, unsigned long ar
                return put_user(val,(int *)arg);
        }
        
-        if (_IOC_DIR(cmd) != (_IOC_WRITE|_IOC_READ))
+        if (_SIOC_DIR(cmd) != (_SIOC_WRITE|_SIOC_READ))
                return -EINVAL;
        
        card->mix.modcnt++;
index 7ff22383144ada44014916796f9bc98004c4d3ab..03ad29b9488571541fc90a1e1cf3898f0f9bf633 100644 (file)
@@ -1071,9 +1071,9 @@ static int mixer_ioctl(struct sv_state *s, unsigned int cmd, unsigned long arg)
                        return put_user(0, (int *)arg);
                return put_user(((4 - (l & 7)) << 2) | ((4 - (r & 7)) << 5) | 2, (int *)arg);
        }
-       if (_IOC_TYPE(cmd) != 'M' || _IOC_SIZE(cmd) != sizeof(int))
+       if (_IOC_TYPE(cmd) != 'M' || _SIOC_SIZE(cmd) != sizeof(int))
                 return -EINVAL;
-        if (_IOC_DIR(cmd) == _IOC_READ) {
+        if (_SIOC_DIR(cmd) == _SIOC_READ) {
                 switch (_IOC_NR(cmd)) {
                 case SOUND_MIXER_RECSRC: /* Arg contains a bit for each recording source */
                        return put_user(mixer_recmask(s), (int *)arg);
@@ -1112,7 +1112,7 @@ static int mixer_ioctl(struct sv_state *s, unsigned int cmd, unsigned long arg)
 #endif /* OSS_DOCUMENTED_MIXER_SEMANTICS */
                }
        }
-        if (_IOC_DIR(cmd) != (_IOC_READ|_IOC_WRITE)) 
+        if (_SIOC_DIR(cmd) != (_SIOC_READ|_SIOC_WRITE)) 
                return -EINVAL;
        s->mix.modcnt++;
        switch (_IOC_NR(cmd)) {
index 60ed9e12d5c8bef9b69b8fd2e3daa322671bf91b..26910e67e24aa22dc60839d29ebc2a2d4aac3274 100644 (file)
@@ -1,4 +1,4 @@
-/*  $Id: atyfb.c,v 1.106.2.9 2000/06/23 12:06:38 davem Exp $
+/*  $Id: atyfb.c,v 1.106.2.12 2000/09/05 00:10:55 davem Exp $
  *  linux/drivers/video/atyfb.c -- Frame buffer device for ATI Mach64
  *
  *     Copyright (C) 1997-1998  Geert Uytterhoeven
index 1b6fc7ebdd4e4b2711466ecd6a3a11fb9b1782c6..71757d943c5afb4dd5ab09722f8e8e24725abedc 100644 (file)
@@ -125,7 +125,7 @@ ntfs_init_upcase(ntfs_inode *upcase)
        io.param=(char*)upcase->vol->upcase;
        io.size=2*UPCASE_LENGTH;
        ntfs_read_attr(upcase,upcase->vol->at_data,0,0,&io);
-       upcase->vol->upcase_length = io.size;
+       upcase->vol->upcase_length = io.size / 2;
 }
 
 static int
index 3a48f4f9eaade3238ffd869ed0bdeefb8c3375c3..da221ab2e97787311272a7fdb7028d04ea1a5380 100644 (file)
@@ -1,5 +1,11 @@
 ChangeLog for smbfs.
 
+2000-11-04 Urban Widmark <urban@svenskatest.se>
+
+       * proc.c, sock.c: adjust max parameters & max data to follow max_xmit
+         lots of servers were having find_next trouble with this.
+       * proc.c: use documented write method of truncating (NetApp fix)
+
 2000-09-01 Urban Widmark <urban@svenskatest.se>
 
        * proc.c: add back lanman2 support (OS/2 and others)
index e47be5a85d2eedd39ed26281c2e9892b5bdd2525..c3e8f19d1b1ce79c113ae2b36dacfe17d373811f 100644 (file)
@@ -385,22 +385,16 @@ fail:
 }
 
 /*
- * Returns the maximum read or write size for the current packet size
- * and max_xmit value.
+ * Returns the maximum read or write size for the "payload". Making all of the
+ * packet fit within the negotiated max_xmit size.
+ *
  * N.B. Since this value is usually computed before locking the server,
  * the server's packet size must never be decreased!
  */
-static int
+static inline int
 smb_get_xmitsize(struct smb_sb_info *server, int overhead)
 {
-       int size = server->packet_size;
-
-       /*
-        * Start with the smaller of packet size and max_xmit ...
-        */
-       if (size > server->opt.max_xmit)
-               size = server->opt.max_xmit;
-       return size - overhead;
+       return server->opt.max_xmit - overhead;
 }
 
 /*
@@ -751,6 +745,23 @@ smb_newconn(struct smb_sb_info *server, struct smb_conn_opt *opt)
                server->opt.protocol, server->opt.max_xmit, server->conn_pid,
                server->opt.capabilities);
 
+       /* Make sure we can fit a message of the negotiated size in our
+          packet buffer. */
+       if (server->opt.max_xmit > server->packet_size) {
+               int len = smb_round_length(server->opt.max_xmit);
+               char *buf = smb_vmalloc(len);
+               if (buf) {
+                       server->packet = buf;
+                       server->packet_size = len;
+               } else {
+                       /* else continue with the too small buffer? */
+                       PARANOIA("Failed to allocate new packet buffer: "
+                                "max_xmit=%d, packet_size=%d\n",
+                                server->opt.max_xmit, server->packet_size);
+                       server->opt.max_xmit = server->packet_size;
+               }
+       }
+
 out:
 #ifdef SMB_RETRY_INTR
        wake_up_interruptible(&server->wait);
@@ -1348,17 +1359,16 @@ smb_proc_trunc(struct smb_sb_info *server, __u16 fid, __u32 length)
        smb_lock_server(server);
 
       retry:
-       p = smb_setup_header(server, SMBwrite, 5, 0);
+       p = smb_setup_header(server, SMBwrite, 5, 3);
        WSET(server->packet, smb_vwv0, fid);
        WSET(server->packet, smb_vwv1, 0);
        DSET(server->packet, smb_vwv2, length);
        WSET(server->packet, smb_vwv4, 0);
-       *p++ = 4;
-       *p++ = 0;
-       smb_setup_bcc(server, p);
 
-       if ((result = smb_request_ok(server, SMBwrite, 1, 0)) < 0)
-       {
+       *p++ = 1;
+       WSET(p, 0, 0);
+
+       if ((result = smb_request_ok(server, SMBwrite, 1, 0)) < 0) {
                if (smb_retry(server))
                        goto retry;
                goto out;
@@ -1487,8 +1497,8 @@ static int
 smb_proc_readdir_long(struct smb_sb_info *server, struct dentry *dir, int fpos,
                      void *cachep)
 {
-       unsigned char *p;
-       char *mask, *lastname, *param = server->temp_buf;
+       unsigned char *p, *lastname;
+       char *mask, *param = server->temp_buf;
        __u16 command;
        int first, entries, entries_seen;
 
@@ -1521,7 +1531,7 @@ retry:
         * Encode the initial path
         */
        mask = param + 12;
-       mask_len = smb_encode_path(server, mask, dir, &star);
+       mask_len = smb_encode_path(server, mask, dir, &star) - 1;
        if (mask_len < 0) {
                entries = mask_len;
                goto unlock_return;
@@ -1613,31 +1623,41 @@ retry:
                if (ff_searchcount == 0)
                        break;
 
-               /* we might need the lastname for continuations */
+               /*
+                * We might need the lastname for continuations.
+                *
+                * Note that some servers (win95) point to the filename and
+                * others (NT4, Samba using NT1) to the dir entry. We assume
+                * here that those who do not point to a filename do not need
+                * this info to continue the listing.
+                */
                mask_len = 0;
-               if (ff_lastname > 0) {
+               if (ff_lastname > 0 && ff_lastname < resp_data_len) {
                        lastname = resp_data + ff_lastname;
                        switch (info_level) {
                        case 260:
-                               if (ff_lastname < resp_data_len)
-                                       mask_len = resp_data_len - ff_lastname;
+                               mask_len = resp_data_len - ff_lastname;
                                break;
                        case 1:
-                               /* Win NT 4.0 doesn't set the length byte */
-                               lastname++;
-                               if (ff_lastname + 2 < resp_data_len)
-                                       mask_len = strlen(lastname);
+                               /* lastname points to a length byte */
+                               mask_len = *lastname++;
+                               if (ff_lastname + 1 + mask_len > resp_data_len)
+                                       mask_len = resp_data_len - ff_lastname - 1;
                                break;
                        }
                        /*
                         * Update the mask string for the next message.
                         */
+                       if (mask_len < 0)
+                               mask_len = 0;
                        if (mask_len > 255)
                                mask_len = 255;
                        if (mask_len)
                                strncpy(mask, lastname, mask_len);
                }
                mask[mask_len] = 0;
+               mask_len = strlen(mask);        /* find the actual string len */
+
 
                /* Now we are ready to parse smb directory entries. */
 
index 4a4f8077559f6d21f667961b0e05cb9e4226696f..566990a2cf09304e23b52fa757c5f46969e1116a 100644 (file)
@@ -473,14 +473,12 @@ smb_receive_trans2(struct smb_sb_info *server,
        unsigned int total_p = 0, total_d = 0, buf_len = 0;
        int result;
 
-       while (1)
-       {
+       while (1) {
                result = smb_receive(server);
                if (result < 0)
                        goto out;
                inbuf = server->packet;
-               if (server->rcls != 0)
-               {
+               if (server->rcls != 0) {
                        *parm = *data = inbuf;
                        *ldata = *lparm = 0;
                        goto out;
@@ -504,13 +502,11 @@ smb_receive_trans2(struct smb_sb_info *server,
                parm_len += parm_count;
                data_len += data_count;
 
-               if (!rcv_buf)
-               {
+               if (!rcv_buf) {
                        /*
                         * Check for fast track processing ... just this packet.
                         */
-                       if (parm_count == parm_tot && data_count == data_tot)
-                       {
+                       if (parm_count == parm_tot && data_count == data_tot) {
                                VERBOSE("fast track, parm=%u %u %u, data=%u %u %u\n",
                                        parm_disp, parm_offset, parm_count, 
                                        data_disp, data_offset, data_count);
@@ -520,12 +516,10 @@ smb_receive_trans2(struct smb_sb_info *server,
                                goto success;
                        }
 
-                       if (parm_tot > TRANS2_MAX_TRANSFER ||
-                           data_tot > TRANS2_MAX_TRANSFER)
-                               goto out_too_long;
-
                        /*
-                        * Save the total parameter and data length.
+                        * Allocate a new buffer for receiving multiple packets
+                        * into. If we stick to the negotiated max_xmit this
+                        * shouldn't have to happen.
                         */
                        total_d = data_tot;
                        total_p = parm_tot;
@@ -534,14 +528,15 @@ smb_receive_trans2(struct smb_sb_info *server,
                        if (server->packet_size > buf_len)
                                buf_len = server->packet_size;
                        buf_len = smb_round_length(buf_len);
+                       if (buf_len > SMB_MAX_PACKET_SIZE)
+                               goto out_no_mem;
 
                        rcv_buf = smb_vmalloc(buf_len);
                        if (!rcv_buf)
                                goto out_no_mem;
                        *parm = rcv_buf;
                        *data = rcv_buf + total_p;
-               }
-               else if (data_tot > total_d || parm_tot > total_p)
+               } else if (data_tot > total_d || parm_tot > total_p)
                        goto out_data_grew;
 
                if (parm_disp + parm_count > total_p)
@@ -568,8 +563,7 @@ smb_receive_trans2(struct smb_sb_info *server,
         * old one, in which case we just copy the data.
         */
        inbuf = server->packet;
-       if (buf_len >= server->packet_size)
-       {
+       if (buf_len >= server->packet_size) {
                server->packet_size = buf_len;
                server->packet = rcv_buf;
                rcv_buf = inbuf;
@@ -713,6 +707,7 @@ smb_send_trans2(struct smb_sb_info *server, __u16 trans2_command,
        struct socket *sock = server_sock(server);
        struct scm_cookie scm;
        int err;
+       int mparam, mdata;
 
        /* I know the following is very ugly, but I want to build the
           smb packet as efficiently as possible. */
@@ -733,19 +728,30 @@ smb_send_trans2(struct smb_sb_info *server, __u16 trans2_command,
        struct iovec iov[4];
        struct msghdr msg;
 
-       /* N.B. This test isn't valid! packet_size may be < max_xmit */
+       /* FIXME! this test needs to include SMB overhead too, I think ... */
        if ((bcc + oparam) > server->opt.max_xmit)
-       {
                return -ENOMEM;
-       }
        p = smb_setup_header(server, SMBtrans2, smb_parameters, bcc);
 
+       /*
+        * max parameters + max data + max setup == max_xmit to make NT4 happy
+        * and not abort the transfer or split into multiple packets.
+        *
+        * -100 is to make room for headers, which OS/2 seems to include in the
+        * size calculation NT4 does not?
+        */
+       mparam = SMB_TRANS2_MAX_PARAM;
+       mdata = server->opt.max_xmit - mparam - 100;
+       if (mdata < 1024) {
+               mdata = 1024;
+               mparam = 20;
+       }
+
        WSET(server->packet, smb_tpscnt, lparam);
        WSET(server->packet, smb_tdscnt, ldata);
-       /* N.B. these values should reflect out current packet size */
-       WSET(server->packet, smb_mprcnt, TRANS2_MAX_TRANSFER);
-       WSET(server->packet, smb_mdrcnt, TRANS2_MAX_TRANSFER);
-       WSET(server->packet, smb_msrcnt, 0);
+       WSET(server->packet, smb_mprcnt, mparam);
+       WSET(server->packet, smb_mdrcnt, mdata);
+       WSET(server->packet, smb_msrcnt, 0);    /* max setup always 0 ? */
        WSET(server->packet, smb_flags, 0);
        DSET(server->packet, smb_timeout, 0);
        WSET(server->packet, smb_pscnt, lparam);
@@ -777,8 +783,7 @@ smb_send_trans2(struct smb_sb_info *server, __u16 trans2_command,
        iov[3].iov_len = ldata;
 
        err = scm_send(sock, &msg, &scm);
-        if (err >= 0)
-       {
+        if (err >= 0) {
                err = sock->ops->sendmsg(sock, &msg, packet_length, &scm);
                scm_destroy(&scm);
        }
index cc1cc3313f8f388bcf2ce4757e449ff925ba4a57..8ed3a93423c8f551940ef5c648e737eea70e2efd 100644 (file)
@@ -419,5 +419,13 @@ __initfunc(static void check_bugs(void))
        check_amd_k6();
        check_pentium_f00f();
        check_cyrix_coma();
-       system_utsname.machine[1] = '0' + boot_cpu_data.x86;
+       /*
+        *      Catch people using stupid model number data
+        *      (Pentium IV) and report 686 still. The /proc data
+        *      however does not lie and reports 15 as will cpuid.
+        */
+       if(boot_cpu_data.x86 > 9)
+               system_utsname.machine[1] = '6';
+       else
+               system_utsname.machine[1] = '0' + boot_cpu_data.x86;
 }
index e09ee5b2839d17892a129229de942e951c56c84e..745f2715a4563535c70b6e02d76a369a2bab050f 100644 (file)
@@ -142,6 +142,11 @@ typedef struct {
 typedef struct { unsigned long a[100]; } __dummy_lock_t;
 #define __dummy_lock(lock) (*(__dummy_lock_t *)(lock))
 
+/*
+ *     Intel PIV would benefit from using 'rep nop' here but on older
+ *     processors and non intel it is listed as 'undefined' so cannot be
+ *     blindly used. On 2.4 we should add a PIV CPU type for this one.
+ */
 #define spin_lock_string \
        "\n1:\t" \
        "lock ; btsl $0,%0\n\t" \
index 96344af3e04c85bc3a2aeea028692ccf453cd116..c8e5e25c736de711448c2090d8e2910869b5d290 100644 (file)
 #define ASIZ_task_cap_inheritable      0x00000004
 #define AOFF_task_cap_permitted        0x00000160
 #define ASIZ_task_cap_permitted        0x00000004
-#define AOFF_task_user 0x00000164
+#define AOFF_task_user 0x00000168
 #define ASIZ_task_user 0x00000004
-#define AOFF_task_rlim 0x00000168
+#define AOFF_task_rlim 0x0000016c
 #define ASIZ_task_rlim 0x00000050
-#define AOFF_task_used_math    0x000001b8
+#define AOFF_task_used_math    0x000001bc
 #define ASIZ_task_used_math    0x00000002
-#define AOFF_task_comm 0x000001ba
+#define AOFF_task_comm 0x000001be
 #define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count   0x000001cc
+#define AOFF_task_link_count   0x000001d0
 #define ASIZ_task_link_count   0x00000004
-#define AOFF_task_tty  0x000001d0
+#define AOFF_task_tty  0x000001d4
 #define ASIZ_task_tty  0x00000004
-#define AOFF_task_semundo      0x000001d4
+#define AOFF_task_semundo      0x000001d8
 #define ASIZ_task_semundo      0x00000004
-#define AOFF_task_semsleeping  0x000001d8
+#define AOFF_task_semsleeping  0x000001dc
 #define ASIZ_task_semsleeping  0x00000004
 #define AOFF_task_tss  0x000001e0
 #define ASIZ_task_tss  0x00000388
 #define ASIZ_task_cap_inheritable      0x00000004
 #define AOFF_task_cap_permitted        0x00000258
 #define ASIZ_task_cap_permitted        0x00000004
-#define AOFF_task_user 0x0000025c
+#define AOFF_task_user 0x00000260
 #define ASIZ_task_user 0x00000004
-#define AOFF_task_rlim 0x00000260
+#define AOFF_task_rlim 0x00000264
 #define ASIZ_task_rlim 0x00000050
-#define AOFF_task_used_math    0x000002b0
+#define AOFF_task_used_math    0x000002b4
 #define ASIZ_task_used_math    0x00000002
-#define AOFF_task_comm 0x000002b2
+#define AOFF_task_comm 0x000002b6
 #define ASIZ_task_comm 0x00000010
-#define AOFF_task_link_count   0x000002c4
+#define AOFF_task_link_count   0x000002c8
 #define ASIZ_task_link_count   0x00000004
-#define AOFF_task_tty  0x000002c8
+#define AOFF_task_tty  0x000002cc
 #define ASIZ_task_tty  0x00000004
-#define AOFF_task_semundo      0x000002cc
+#define AOFF_task_semundo      0x000002d0
 #define ASIZ_task_semundo      0x00000004
-#define AOFF_task_semsleeping  0x000002d0
+#define AOFF_task_semsleeping  0x000002d4
 #define ASIZ_task_semsleeping  0x00000004
 #define AOFF_task_tss  0x000002d8
 #define ASIZ_task_tss  0x00000388
index 591199fa8c67c05132c2affe311bf69d5e7efc92..05ceb77af509c96ebf9236fe88cf2230a33b99dd 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: io.h,v 1.19.2.2 2000/09/17 05:11:47 davem Exp $ */
+/* $Id: io.h,v 1.19.2.5 2000/10/25 18:14:47 davem Exp $ */
 #ifndef __SPARC64_IO_H
 #define __SPARC64_IO_H
 
 #define SLOW_DOWN_IO   do { } while (0)
 
 
+#ifndef CONFIG_PCI
+
+/* In builds without PCI these should not be called.
+ *
+ * XXX Unfortunately they are, this is how the scsi
+ * XXX disk driver determines whether kernel buffers
+ * XXX are physically contiguous :-(
+ */
+#define virt_to_phys(addr)     __pa(addr)
+#define phys_to_virt(addr)     __va(addr)
+#define bus_dvma_to_mem(vaddr) (__builtin_trap(), 0)
+
+#else
+
 #define PCI_DVMA_HASHSZ        256
 
 extern unsigned long pci_dvma_offset;
@@ -46,14 +60,15 @@ extern __inline__ void *phys_to_virt(unsigned long addr)
        return (void *)(paddr + off);
 }
 
-#define virt_to_bus virt_to_phys
-#define bus_to_virt phys_to_virt
-
 extern __inline__ unsigned long bus_dvma_to_mem(unsigned long vaddr)
 {
        return vaddr & pci_dvma_mask;
 }
 
+#endif /* CONFIG_PCI */
+
+#define virt_to_bus virt_to_phys
+#define bus_to_virt phys_to_virt
 
 extern __inline__ unsigned int inb(unsigned long addr)
 {
index 1e4caaae9aa962e891c955bcd9a0226b7a0caa94..ab0733c212b5f96ececd7ce299d898701bf25d3b 100644 (file)
@@ -119,11 +119,13 @@ enum smb_conn_state {
 
 #define SMB_HEADER_LEN   37     /* includes everything up to, but not
                                  * including smb_bcc */
-#define SMB_DEF_MAX_XMIT 32768
-#define SMB_INITIAL_PACKET_SIZE 4000
 
-/* Allocate max. 1 page */
-#define TRANS2_MAX_TRANSFER (4096-17)
+#define SMB_INITIAL_PACKET_SIZE        4000
+#define SMB_MAX_PACKET_SIZE    32768
+
+/* reserve this much space for trans2 parameters. Shouldn't have to be more
+   than 10 or so, but OS/2 seems happier like this. */
+#define SMB_TRANS2_MAX_PARAM 64
 
 #endif
 #endif
index 0a3bfacb89ecb80146a9c0436fe266698db66dfd..00453f3d6627be27facc833e856709fd9ba3242d 100644 (file)
@@ -284,6 +284,7 @@ EXPORT_SYMBOL(unregister_exec_domain);
 EXPORT_SYMBOL(register_sysctl_table);
 EXPORT_SYMBOL(unregister_sysctl_table);
 EXPORT_SYMBOL(sysctl_string);
+EXPORT_SYMBOL(sysctl_jiffies);
 EXPORT_SYMBOL(sysctl_intvec);
 EXPORT_SYMBOL(proc_dostring);
 EXPORT_SYMBOL(proc_dointvec);
index 3c04ab020494784e84a4689f60d45982602e62df..bb66494e6fa3713ceb5047e82acaf165bb84a551 100644 (file)
@@ -157,8 +157,13 @@ struct vm_struct * get_vm_area(unsigned long size)
        area = (struct vm_struct *) kmalloc(sizeof(*area), GFP_KERNEL);
        if (!area)
                return NULL;
+       size += PAGE_SIZE;
        addr = VMALLOC_START;
        for (p = &vmlist; (tmp = *p) ; p = &tmp->next) {
+               if ((size + addr) < addr) {
+                       kfree(area);
+                       return NULL;
+               }
                if (size + addr < (unsigned long) tmp->addr)
                        break;
                addr = tmp->size + (unsigned long) tmp->addr;
@@ -168,7 +173,7 @@ struct vm_struct * get_vm_area(unsigned long size)
                }
        }
        area->addr = (void *)addr;
-       area->size = size + PAGE_SIZE;
+       area->size = size;
        area->next = *p;
        *p = area;
        return area;
index e83bbeb5851088a8fae34d148a7a80d2ffeada45..c86e4176fe5cfce1a8143884cdf9b74cbe1d391f 100644 (file)
@@ -2083,22 +2083,6 @@ static int atalk_ioctl(struct socket *sock,unsigned int cmd, unsigned long arg)
                case SIOCDARP:  /* proxy AARP */
                        return (atif_ioctl(cmd,(void *)arg));
 
-               /*
-                * Physical layer ioctl calls
-                */
-               case SIOCSIFLINK:
-               case SIOCGIFHWADDR:
-               case SIOCSIFHWADDR:
-               case SIOCGIFFLAGS:
-               case SIOCSIFFLAGS:
-               case SIOCGIFMTU:
-               case SIOCGIFCONF:
-               case SIOCADDMULTI:
-               case SIOCDELMULTI:
-               case SIOCGIFCOUNT:
-               case SIOCGIFINDEX:
-               case SIOCGIFNAME:
-                       return ((dev_ioctl(cmd,(void *) arg)));
 
                case SIOCSIFMETRIC:
                case SIOCSIFBRDADDR:
@@ -2111,7 +2095,7 @@ static int atalk_ioctl(struct socket *sock,unsigned int cmd, unsigned long arg)
                        return (-EINVAL);
 
                default:
-                       return (-EINVAL);
+                       return dev_ioctl(cmd, (void *) arg); 
        }
 
        return (put_user(amount, (int *)arg));
index cdb5f3d03deb1abeaa806daae2a1de361dfff06a..b69ec15fc40126a2d2b6f54c5022b809cfdcbca3 100644 (file)
@@ -210,12 +210,16 @@ void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm)
 {
        struct cmsghdr *cm = (struct cmsghdr*)msg->msg_control;
 
-       int fdmax = (msg->msg_controllen - sizeof(struct cmsghdr))/sizeof(int);
+       int fdmax = 0;
        int fdnum = scm->fp->count;
        struct file **fp = scm->fp->fp;
        int *cmfptr;
        int err = 0, i;
 
+       if (msg->msg_controllen > sizeof(struct cmsghdr))
+               fdmax = ((msg->msg_controllen - sizeof(struct cmsghdr))
+                        / sizeof(int));
+
        if (fdnum < fdmax)
                fdmax = fdnum;
 
@@ -251,7 +255,7 @@ void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm)
                        msg->msg_controllen -= cmlen;
                }
        }
-       if (i < fdnum)
+       if (i < fdnum || (fdnum && fdmax <= 0))
                msg->msg_flags |= MSG_CTRUNC;
 
        /*
index e924bfee982c9fe4cbb69004711bde52000c08d4..0b45c8e4abc3b64355e8e440a79ed09963f80e7f 100644 (file)
@@ -7,7 +7,7 @@
  *             PROC file system.  It is mainly used for debugging and
  *             statistics.
  *
- * Version:    $Id: proc.c,v 1.34.2.4 2000/10/18 17:50:41 davem Exp $
+ * Version:    $Id: proc.c,v 1.34.2.5 2000/10/29 12:06:28 davem Exp $
  *
  * Authors:    Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  *             Gerald J. Heim, <heim@peanuts.informatik.uni-tuebingen.de>
index 04b49d843497fa38b16eb8023890a1ae085e8007..dd376077d21d7a765d3f28b13d9bcef879ab3b5a 100644 (file)
@@ -5,7 +5,7 @@
  *     Authors:
  *     Pedro Roque             <roque@di.fc.ul.pt>     
  *
- *     $Id: route.c,v 1.35 1999/03/21 05:22:57 davem Exp $
+ *     $Id: route.c,v 1.35.2.1 2000/11/03 01:14:28 davem Exp $
  *
  *     This program is free software; you can redistribute it and/or
  *      modify it under the terms of the GNU General Public License
@@ -1926,19 +1926,19 @@ ctl_table ipv6_route_table[] = {
          &proc_dointvec},
        {NET_IPV6_ROUTE_GC_MIN_INTERVAL, "gc_min_interval",
          &ip6_rt_gc_min_interval, sizeof(int), 0644, NULL,
-         &proc_dointvec_jiffies},
+         &proc_dointvec_jiffies, &sysctl_jiffies},
        {NET_IPV6_ROUTE_GC_TIMEOUT, "gc_timeout",
          &ip6_rt_gc_timeout, sizeof(int), 0644, NULL,
-         &proc_dointvec_jiffies},
+         &proc_dointvec_jiffies, &sysctl_jiffies},
        {NET_IPV6_ROUTE_GC_INTERVAL, "gc_interval",
          &ip6_rt_gc_interval, sizeof(int), 0644, NULL,
-         &proc_dointvec_jiffies},
+         &proc_dointvec_jiffies, &sysctl_jiffies},
        {NET_IPV6_ROUTE_GC_ELASTICITY, "gc_elasticity",
          &ip6_rt_gc_elasticity, sizeof(int), 0644, NULL,
-         &proc_dointvec_jiffies},
+         &proc_dointvec_jiffies, &sysctl_jiffies},
        {NET_IPV6_ROUTE_MTU_EXPIRES, "mtu_expires",
          &ip6_rt_mtu_expires, sizeof(int), 0644, NULL,
-         &proc_dointvec_jiffies},
+         &proc_dointvec_jiffies, &sysctl_jiffies},
         {0}
 };