]> git.neil.brown.name Git - history.git/commitdiff
- pre7: 2.4.0-test11pre7
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:40:10 +0000 (15:40 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:40:10 +0000 (15:40 -0500)
   - Kai Germaschewski: more ISDN cleanups and small fixes.
   - Al Viro: fix ntfs_new_inode() that he broke. Cleanups.
   - various: handle !CONFIG_HOTPLUG properly
   - David Miller: sparc and networking
   - Linus: more iso9660 fixes.
   - Neil Brown: fix rd and RAID on highmem machines
   - Vojtech Pavlik: input driver fixes
   - David Woodhouse: module unload races - up_and_exit()

113 files changed:
CREDITS
Documentation/Configure.help
MAINTAINERS
Makefile
arch/alpha/kernel/irq.c
arch/ia64/ia32/sys_ia32.c
arch/sparc64/kernel/sparc64_ksyms.c
arch/sparc64/kernel/sys_sunos32.c
arch/sparc64/solaris/ioctl.c
arch/sparc64/solaris/socket.c
drivers/block/loop.c
drivers/block/rd.c
drivers/char/joystick/adi.c
drivers/char/joystick/ns558.c
drivers/char/joystick/sidewinder.c
drivers/i2o/i2o_proc.c
drivers/input/evdev.c
drivers/input/input.c
drivers/input/joydev.c
drivers/input/mousedev.c
drivers/isdn/Config.in
drivers/isdn/act2000/Makefile
drivers/isdn/act2000/act2000.h
drivers/isdn/act2000/act2000_isa.c
drivers/isdn/act2000/act2000_isa.h
drivers/isdn/act2000/capi.c
drivers/isdn/act2000/capi.h
drivers/isdn/act2000/module.c
drivers/isdn/avmb1/Makefile
drivers/isdn/avmb1/b1.c
drivers/isdn/avmb1/b1dma.c
drivers/isdn/avmb1/b1isa.c
drivers/isdn/avmb1/b1pci.c
drivers/isdn/avmb1/b1pcmcia.c
drivers/isdn/avmb1/c4.c
drivers/isdn/avmb1/capi.c
drivers/isdn/avmb1/capidrv.c
drivers/isdn/avmb1/capifs.c
drivers/isdn/avmb1/t1isa.c
drivers/isdn/avmb1/t1pci.c
drivers/isdn/divert/divert_init.c
drivers/isdn/divert/divert_procfs.c
drivers/isdn/divert/isdn_divert.c
drivers/isdn/divert/isdn_divert.h
drivers/isdn/hisax/config.c
drivers/isdn/hisax/w6692.c
drivers/isdn/hysdn/boardergo.c
drivers/isdn/hysdn/boardergo.h
drivers/isdn/hysdn/hycapi.c
drivers/isdn/hysdn/hysdn_boot.c
drivers/isdn/hysdn/hysdn_defs.h
drivers/isdn/hysdn/hysdn_init.c
drivers/isdn/hysdn/hysdn_net.c
drivers/isdn/hysdn/hysdn_pof.h
drivers/isdn/hysdn/hysdn_procconf.c
drivers/isdn/hysdn/hysdn_proclog.c
drivers/isdn/hysdn/hysdn_sched.c
drivers/isdn/icn/icn.c
drivers/isdn/icn/icn.h
drivers/isdn/isdn_ppp.c
drivers/isdn/isdnloop/isdnloop.c
drivers/isdn/isdnloop/isdnloop.h
drivers/isdn/sc/debug.c
drivers/md/raid5.c
drivers/net/pppoe.c
drivers/net/sunhme.c
drivers/net/wan/lapbether.c
drivers/nubus/proc.c
drivers/pci/proc.c
drivers/usb/hub.c
fs/autofs/inode.c
fs/devfs/base.c
fs/dquot.c
fs/efs/dir.c
fs/fat/inode.c
fs/file_table.c
fs/isofs/dir.c
fs/isofs/inode.c
fs/isofs/joliet.c
fs/isofs/namei.c
fs/jffs/inode-v23.c
fs/jffs/intrep.c
fs/namei.c
fs/ncpfs/file.c
fs/nfs/inode.c
fs/ntfs/inode.c
fs/proc/generic.c
fs/proc/inode.c
fs/proc/root.c
fs/sysv/ialloc.c
fs/udf/dir.c
fs/udf/ialloc.c
include/linux/highmem.h
include/linux/iso_fs.h
include/linux/kernel.h
include/linux/proc_fs.h
include/net/x25.h
init/main.c
ipc/shm.c
kernel/exit.c
kernel/kmod.c
kernel/ksyms.c
kernel/sysctl.c
mm/filemap.c
net/core/dev.c
net/ipv4/tcp_ipv4.c
net/ipv6/ndisc.c
net/khttpd/datasending.c
net/khttpd/main.c
net/socket.c
net/unix/garbage.c
net/x25/af_x25.c
net/x25/x25_in.c

diff --git a/CREDITS b/CREDITS
index fd299379efb8fdcd45d488d7497fa02b3dca5f49..7f8a8c70c4c032aeca9557c75addd0fb961069b3 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -765,11 +765,10 @@ S: D-57250 Netphen
 S: Germany
 
 N: Rik Faith
-E: faith@cs.unc.edu
 E: faith@acm.org
-D: Author: Future Domain TMC-16x0 SCSI driver
-D: Debugging: SCSI code; Cyclades serial driver; APM driver
-D: Debugging: XFree86 Mach 32 server, accelerated server code
+D: Future Domain TMC-16x0 SCSI driver (author)
+D: APM driver (early port)
+D: DRM drivers (author of several)
 
 N: János Farkas
 E: chexum@shadow.banki.hu
index d89d228a0266118bd37b8226833fa3032d11838f..ee2e3e87350c1212ac0e46e5f64354f386354533 100644 (file)
@@ -77,7 +77,7 @@ CONFIG_EXPERIMENTAL
   in some special cases. Detailed bug reports from people familiar
   with the kernel internals are usually welcomed by the developers
   (before submitting bug reports, please read the documents README,
-  MAINTAINERS, REPORTING_BUGS, Documentation/BUG-HUNTING, and
+  MAINTAINERS, REPORTING-BUGS, Documentation/BUG-HUNTING, and
   Documentation/oops-tracing.txt in the kernel source). 
 
   This option will also make obsoleted drivers available. These are
@@ -113,7 +113,7 @@ CONFIG_SMP
   Management" code will be disabled if you say Y here.
 
   See also the files Documentation/smp.tex, Documentation/smp.txt,
-  Documentation/IO-APIC.txt, Documentation/nmi_watchdog.txt and the 
+  Documentation/i386/IO-APIC.txt, Documentation/nmi_watchdog.txt and the 
   SMP-FAQ on the WWW at http://www.irisa.fr/prive/mentre/smp-faq/ .
   
   If you don't know what to do here, say N.
@@ -3503,7 +3503,7 @@ CONFIG_PARPORT
   The module will be called parport.o. If you have more than one
   parallel port and want to specify which port and IRQ to be used by
   this driver at module load time, take a look at
-  Documentation/networking/parport.txt.
+  Documentation/parport.txt.
 
   If unsure, say Y.
 
@@ -3646,7 +3646,7 @@ CONFIG_INET
   "Sysctl support" below, you can change various aspects of the
   behavior of the TCP/IP code by writing to the (virtual) files in
   /proc/sys/net/ipv4/*; the options are explained in the file
-  Documentation/Networking/ip-sysctl.txt.
+  Documentation/networking/ip-sysctl.txt.
 
   Short answer: say Y.
 
@@ -5027,7 +5027,7 @@ Compaq Smart Array support
 CONFIG_BLK_CPQ_CISS_DA
    This is the driver for Compaq Smart Array controllers.
    Everyone using these boards should say Y here.
-   See "linux/Documentation/cciss.txt" for the current list of
+   See Documentation/cciss.txt for the current list of
    boards supported by this driver, and for further information
    on the use of this driver.
 
@@ -14027,7 +14027,7 @@ CONFIG_SOUND_MSS
 SGI Visual Workstation on-board audio
 CONFIG_SOUND_VWSND
   Say Y or M if you have an SGI Visual Workstation and you want to
-  be able to use its on-board audio.  Read Documentation/sound/visws
+  be able to use its on-board audio.  Read Documentation/sound/vwsnd
   for more info on this driver's capabilities.
 
 Ensoniq Soundscape support
index 24f6a6cf1b80907c8a689f041ddd9d10347d6ded..072d1da5d3dc3fc05549dadc04021a0857945395 100644 (file)
@@ -379,6 +379,12 @@ M: jrv@vanzandt.mv.com
 L:     blinux-list@redhat.com
 S:     Maintained
 
+DRM DRIVERS
+P:     Rik Faith
+M:     faith@valinux.com
+L:     dri-devel@lists.sourceforge.net
+S:     Supported
+
 EATA-DMA SCSI DRIVER
 P:     Michael Neuffer
 M:     mike@i-Connect.Net
index 25940fe6e24160e916bbf4455aacc5c6fb2cbc18..e87bfc0cc0651c88340993fb693623964b7a22fa 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -497,4 +497,4 @@ scripts/mkdep: scripts/mkdep.c
        $(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c
 
 scripts/split-include: scripts/split-include.c
-       $(HOSTCC) $(HOSTCFLAGS) -I$(HPATH) -o scripts/split-include scripts/split-include.c
+       $(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c
index ac7ca67f89f2eaa2eb18769518d0f8ff045bd233..080e48e43f3269a5a5dad8220d9745f1bdb11bb8 100644 (file)
@@ -747,7 +747,7 @@ probe_irq_mask(unsigned long val)
        unsigned int mask;
 
        mask = 0;
-       for (i = 0; i < 16; i++) {
+       for (i = 0; i < NR_IRQS; i++) {
                irq_desc_t *desc = irq_desc + i;
                unsigned int status;
 
@@ -755,8 +755,11 @@ probe_irq_mask(unsigned long val)
                status = desc->status;
 
                if (status & IRQ_AUTODETECT) {
-                       if (!(status & IRQ_WAITING))
-                               mask |= 1 << i;
+                       /* We only react to ISA interrupts */
+                       if (!(status & IRQ_WAITING)) {
+                               if (i < 16)
+                                       mask |= 1 << i;
+                       }
 
                        desc->status = status & ~IRQ_AUTODETECT;
                        desc->handler->shutdown(i);
index 0383741a0cb303dbd97220c752dfbfcb0d3264a5..416b23faa8be5708bc5c5cc59f123176d3974a55 100644 (file)
@@ -3392,7 +3392,7 @@ sockfd_lookup(int fd, int *err)
        }
 
        inode = file->f_dentry->d_inode;
-       if (!inode || !inode->i_sock || !socki_lookup(inode))
+       if (!inode->i_sock || !socki_lookup(inode))
        {
                *err = -ENOTSOCK;
                fput(file);
index 20d8a1a43a7510caf328f75e2bb72f74a2b58356..e1ae982bf4b9ad0960b78538c5cb2bd6efbb3afe 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: sparc64_ksyms.c,v 1.96 2000/11/06 06:59:03 davem Exp $
+/* $Id: sparc64_ksyms.c,v 1.98 2000/11/13 10:03:32 davem Exp $
  * arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support.
  *
  * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
@@ -109,25 +109,14 @@ extern void _do_write_unlock(rwlock_t *rw);
 
 extern unsigned long phys_base;
 
-/* One thing to note is that the way the symbols of the mul/div
- * support routines are named is a mess, they all start with
- * a '.' which makes it a bitch to export, here is the trick:
- */
-
-#define EXPORT_SYMBOL_PRIVATE(sym)                             \
-extern int __sparc_priv_ ## sym (int) __asm__("__" #sym);      \
-const struct module_symbol __export_priv_##sym                 \
-__attribute__((section("__ksymtab"))) =                                \
-{ (unsigned long) &__sparc_priv_ ## sym, "__" #sym }
-
 /* used by various drivers */
 #ifdef CONFIG_SMP
 #ifndef SPIN_LOCK_DEBUG
 /* Out of line rw-locking implementation. */
-EXPORT_SYMBOL_PRIVATE(read_lock);
-EXPORT_SYMBOL_PRIVATE(read_unlock);
-EXPORT_SYMBOL_PRIVATE(write_lock);
-EXPORT_SYMBOL_PRIVATE(write_unlock);
+EXPORT_SYMBOL(__read_lock);
+EXPORT_SYMBOL(__read_unlock);
+EXPORT_SYMBOL(__write_lock);
+EXPORT_SYMBOL(__write_unlock);
 #endif
 
 /* Kernel wide locking */
@@ -136,10 +125,10 @@ EXPORT_SYMBOL(kernel_flag);
 /* Hard IRQ locking */
 EXPORT_SYMBOL(global_irq_holder);
 EXPORT_SYMBOL(synchronize_irq);
-EXPORT_SYMBOL_PRIVATE(global_cli);
-EXPORT_SYMBOL_PRIVATE(global_sti);
-EXPORT_SYMBOL_PRIVATE(global_save_flags);
-EXPORT_SYMBOL_PRIVATE(global_restore_flags);
+EXPORT_SYMBOL(__global_cli);
+EXPORT_SYMBOL(__global_sti);
+EXPORT_SYMBOL(__global_save_flags);
+EXPORT_SYMBOL(__global_restore_flags);
 
 /* Per-CPU information table */
 EXPORT_SYMBOL(cpu_data);
@@ -162,27 +151,33 @@ EXPORT_SYMBOL(_do_write_unlock);
 
 #endif
 
+/* semaphores */
+EXPORT_SYMBOL(__down);
+EXPORT_SYMBOL(__down_interruptible);
+EXPORT_SYMBOL(__down_trylock);
+EXPORT_SYMBOL(__up);
+
 /* rw semaphores */
 EXPORT_SYMBOL_NOVERS(__down_read_failed);
 EXPORT_SYMBOL_NOVERS(__down_write_failed);
 EXPORT_SYMBOL_NOVERS(__rwsem_wake);
 
 /* Atomic counter implementation. */
-EXPORT_SYMBOL_PRIVATE(atomic_add);
-EXPORT_SYMBOL_PRIVATE(atomic_sub);
+EXPORT_SYMBOL(__atomic_add);
+EXPORT_SYMBOL(__atomic_sub);
 
 /* Atomic bit operations. */
-EXPORT_SYMBOL_PRIVATE(test_and_set_bit);
-EXPORT_SYMBOL_PRIVATE(test_and_clear_bit);
-EXPORT_SYMBOL_PRIVATE(test_and_change_bit);
-EXPORT_SYMBOL_PRIVATE(test_and_set_le_bit);
-EXPORT_SYMBOL_PRIVATE(test_and_clear_le_bit);
+EXPORT_SYMBOL(__test_and_set_bit);
+EXPORT_SYMBOL(__test_and_clear_bit);
+EXPORT_SYMBOL(__test_and_change_bit);
+EXPORT_SYMBOL(__test_and_set_le_bit);
+EXPORT_SYMBOL(__test_and_clear_le_bit);
 
 EXPORT_SYMBOL(ivector_table);
 EXPORT_SYMBOL(enable_irq);
 EXPORT_SYMBOL(disable_irq);
 
-EXPORT_SYMBOL_PRIVATE(flushw_user);
+EXPORT_SYMBOL(__flushw_user);
 
 EXPORT_SYMBOL(__flush_dcache_page);
 
index 75d5c096eb0ef2a25e8b90dca89a8581d9411d57..a5f5411f525d91b14128efcb9c2057f2ca988d6f 100644 (file)
@@ -601,7 +601,6 @@ sunos_nfs_get_server_fd (int fd, struct sockaddr_in *addr)
        int    try_port;
        int    ret;
        struct socket *socket;
-       struct dentry *dentry;
        struct inode  *inode;
        struct file   *file;
 
@@ -609,8 +608,7 @@ sunos_nfs_get_server_fd (int fd, struct sockaddr_in *addr)
        if(!file)
                return 0;
 
-       dentry = file->f_dentry;
-       inode = dentry->d_inode;
+       inode = file->f_dentry->d_inode;
 
        socket = &inode->u.socket_i;
        local.sin_family = AF_INET;
index 0e899da18d9590e7ac42dee15f787d326eb6c582..4a10c1b4c905d93496f514715c2f9f110af3425a 100644 (file)
@@ -464,8 +464,8 @@ static inline int solaris_S(struct file *filp, unsigned int fd, unsigned int cmd
         struct sol_socket_struct *sock;
         struct module_info *mi;
 
-        if (! (ino = filp->f_dentry->d_inode) ||
-           ! ino->i_sock)
+        ino = filp->f_dentry->d_inode;
+        if (! ino->i_sock)
                return -EBADF;
         sock = filp->private_data;
         if (! sock) {
index 3013d43cf5a1f4d547721d1ac839060974cb4f10..9b910a63328ca00ff592c42c62ac9c22a5f5f786 100644 (file)
@@ -265,7 +265,7 @@ extern __inline__ struct socket *sockfd_lookup(int fd, int *err)
        }
 
        inode = file->f_dentry->d_inode;
-       if (!inode || !inode->i_sock || !socki_lookup(inode)) {
+       if (!inode->i_sock || !socki_lookup(inode)) {
                *err = -ENOTSOCK;
                fput(file);
                return NULL;
index ae8489380edbc773853340e3f8b416ee2ac5a74f..dc5ecd1519f7facf4a01a0d39551b5540ff0ad61 100644 (file)
@@ -411,10 +411,6 @@ static int loop_set_fd(struct loop_device *lo, kdev_t dev, unsigned int arg)
 
        error = -EINVAL;
        inode = file->f_dentry->d_inode;
-       if (!inode) {
-               printk(KERN_ERR "loop_set_fd: NULL inode?!?\n");
-               goto out_putf;
-       }
 
        if (S_ISBLK(inode->i_mode)) {
                /* dentry will be wired, so... */
index 2d0b54648b36cff1b36e3cccd693d032285e947f..1799ccef536eed59611461bf9190804ed5d77b7a 100644 (file)
@@ -199,6 +199,7 @@ static int rd_make_request(request_queue_t * q, int rw, struct buffer_head *sbh)
        unsigned int minor;
        unsigned long offset, len;
        struct buffer_head *rbh;
+       char *bdata;
 
        
        minor = MINOR(sbh->b_rdev);
@@ -221,12 +222,17 @@ static int rd_make_request(request_queue_t * q, int rw, struct buffer_head *sbh)
        }
 
        rbh = getblk(sbh->b_rdev, sbh->b_rsector/(sbh->b_size>>9), sbh->b_size);
+       /* I think that it is safe to assume that rbh is not in HighMem, though
+        * sbh might be - NeilBrown
+        */
+       bdata = bh_kmap(sbh);
        if (rw == READ) {
                if (sbh != rbh)
-                       memcpy(sbh->b_data, rbh->b_data, rbh->b_size);
+                       memcpy(bdata, rbh->b_data, rbh->b_size);
        } else
                if (sbh != rbh)
-                       memcpy(rbh->b_data, sbh->b_data, rbh->b_size);
+                       memcpy(rbh->b_data, bdata, rbh->b_size);
+       bh_kunmap(sbh);
        mark_buffer_protected(rbh);
        brelse(rbh);
 
index 3195fce03c0b0af56c716e985c9f6724a414dc63..a2f68d74eb0579e0ac6c88742ec9d004c23513ff 100644 (file)
@@ -418,7 +418,7 @@ static void adi_init_input(struct adi *adi, struct adi_port *port)
        adi->dev.private = port;
        adi->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
 
-       for (i = 0; i < adi->axes10 + adi->axes8 + adi->hats * 2; i++)
+       for (i = 0; i < adi->axes10 + adi->axes8 + (adi->hats + (adi->pad > 0)) * 2; i++)
                set_bit(adi->abs[i], &adi->dev.absbit);
 
        for (i = 0; i < adi->buttons; i++)
@@ -431,7 +431,7 @@ static void adi_init_center(struct adi *adi)
 
        if (!adi->length) return;
 
-       for (i = 0; i < adi->axes10 + adi->axes8 + adi->hats * 2; i++) {
+       for (i = 0; i < adi->axes10 + adi->axes8 + (adi->hats + (adi->pad > 0)) * 2; i++) {
 
                t = adi->abs[i];
                x = adi->dev.abs[t];
index 838deb09c0ee229bb7caaa8841e0a9f1e5eee44d..36c5d9f9e22a93d9316a1fc3a5282d0a97f00e01 100644 (file)
@@ -58,6 +58,7 @@ struct ns558 {
 };
        
 static struct ns558 *ns558;
+static int ns558_pci;
 
 /*
  * ns558_isa_probe() tries to find an isa gameport at the
@@ -187,12 +188,10 @@ static int __devinit ns558_pci_probe(struct pci_dev *pdev, const struct pci_devi
        }
        memset(port, 0, sizeof(struct ns558));
 
-       port->next = ns558;
        port->type = NS558_PCI;
        port->gameport.io = ioport;
        port->gameport.size = iolen;
        port->dev = pdev;
-       ns558 = port;
 
        pdev->driver_data = port;
 
@@ -315,8 +314,7 @@ int __init ns558_init(void)
  * it is the least-invasive probe.
  */
 
-       i = pci_register_driver(&ns558_pci_driver);
-       if (i < 0) return i;
+       ns558_pci = !pci_module_init(&ns558_pci_driver);
 
 /*
  * Probe for ISA ports.
@@ -337,12 +335,12 @@ int __init ns558_init(void)
        }
 #endif
 
-       return 0;
+       return (ns558 || ns558_pci) ? 0 : -ENODEV;
 }
 
 void __exit ns558_exit(void)
 {
-       struct ns558 *port = ns558;
+       struct ns558 *next, *port = ns558;
 
        while (port) {
                gameport_unregister_port(&port->gameport);
@@ -363,10 +361,13 @@ void __exit ns558_exit(void)
                                break;
                }
                
-               port = port->next;
+               next = port->next;
+               kfree(port);
+               port = next;
        }
 
-       pci_unregister_driver(&ns558_pci_driver);
+       if (ns558_pci)
+               pci_unregister_driver(&ns558_pci_driver);
 }
 
 module_init(ns558_init);
index 85be9f8b11de266f83d7104f35e468880d677371..ae31265cbbe153d4214c7dba469074fc96e52bd3 100644 (file)
@@ -102,7 +102,7 @@ static short sw_btn[][12] = {
        { BTN_TRIGGER, BTN_THUMB, BTN_TOP, BTN_TOP2, BTN_BASE, BTN_BASE2, BTN_BASE3, BTN_BASE4, BTN_SELECT },
        { BTN_TRIGGER, BTN_THUMB, BTN_TOP, BTN_TOP2, BTN_BASE, BTN_BASE2, BTN_BASE3, BTN_BASE4, BTN_SELECT },
        { BTN_A, BTN_B, BTN_C, BTN_X, BTN_Y, BTN_Z, BTN_TL, BTN_TR, BTN_START, BTN_MODE, BTN_SELECT },
-       { BTN_TRIGGER, BTN_TOP, BTN_THUMB, BTN_THUMB2, BTN_BASE, BTN_BASE2, BTN_BASE3 }};
+       { BTN_TRIGGER, BTN_TOP, BTN_THUMB, BTN_THUMB2, BTN_BASE, BTN_BASE2, BTN_BASE3, BTN_BASE4 }};
 
 static struct {
        int x;
index 4c92ff09d1c075cda4a58ac77e69e147263dd7c3..dc70e732228ac34af8244778681a3e3092c40732 100644 (file)
@@ -3237,7 +3237,7 @@ static void i2o_proc_remove_controller(struct i2o_controller *pctrl,
        for(dev=pctrl->devices; dev; dev=dev->next)
                i2o_proc_remove_device(dev);
 
-       if(!pctrl->proc_entry->count)
+       if(!atomic_read(&pctrl->proc_entry->count))
        {
                sprintf(buff, "iop%d", pctrl->unit);
 
@@ -3257,7 +3257,7 @@ void i2o_proc_remove_device(struct i2o_device *dev)
 
        i2o_device_notify_off(dev, &i2o_proc_handler);
        /* Would it be safe to remove _files_ even if they are in use? */
-       if((de) && (!de->count))
+       if((de) && (!atomic_read(&de->count)))
        {
                i2o_proc_remove_entries(generic_dev_entries, de);
                switch(dev->lct_data.class_id)
@@ -3334,7 +3334,7 @@ static int __exit destroy_i2o_procfs(void)
                }
        }
 
-       if(!i2o_proc_dir_root->count)
+       if(!atomic_read(&i2o_proc_dir_root->count))
                remove_proc_entry("i2o", 0);
        else
                return -1;
index 65109e9ca37754290d5242f901a1c73848c3cb9f..8e676b8da378e87634f1f5dfd614893edbd6a174 100644 (file)
@@ -123,7 +123,7 @@ static int evdev_open(struct inode * inode, struct file * file)
        struct evdev_list *list;
        int i = MINOR(inode->i_rdev) - EVDEV_MINOR_BASE;
 
-       if (i > EVDEV_MINORS || !evdev_table[i])
+       if (i >= EVDEV_MINORS || !evdev_table[i])
                return -ENODEV;
 
        if (!(list = kmalloc(sizeof(struct evdev_list), GFP_KERNEL)))
@@ -288,7 +288,7 @@ static struct input_handle *evdev_connect(struct input_handler *handler, struct
        int minor;
 
        for (minor = 0; minor < EVDEV_MINORS && evdev_table[minor]; minor++);
-       if (evdev_table[minor]) {
+       if (minor == EVDEV_MINORS) {
                printk(KERN_ERR "evdev: no more free evdev devices\n");
                return NULL;
        }
index e121192a6d8a19f01c1c373a3185d752ac46fabd..c78e490864e7ea424bd03bb2a84ab3db8b709d25 100644 (file)
@@ -29,6 +29,8 @@
  */
 
 #include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/smp_lock.h>
 #include <linux/input.h>
 #include <linux/module.h>
 #include <linux/random.h>
@@ -378,7 +380,11 @@ static int input_open_file(struct inode *inode, struct file *file)
        }
        old_fops = file->f_op;
        file->f_op = new_fops;
+
+       lock_kernel();
        err = new_fops->open(inode, file);
+       unlock_kernel();
+
        if (err) {
                fops_put(file->f_op);
                file->f_op = fops_get(old_fops);
index 90c4dbcef1a117181f16065098ea2f8bd9facf23..4e12f55b723495ff0214d675ad13272ea4b07a1d 100644 (file)
@@ -193,7 +193,7 @@ static int joydev_open(struct inode *inode, struct file *file)
        struct joydev_list *list;
        int i = MINOR(inode->i_rdev) - JOYDEV_MINOR_BASE;
 
-       if (i > JOYDEV_MINORS || !joydev_table[i])
+       if (i >= JOYDEV_MINORS || !joydev_table[i])
                return -ENODEV;
 
        if (!(list = kmalloc(sizeof(struct joydev_list), GFP_KERNEL)))
@@ -395,7 +395,7 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct
                || test_bit(BTN_1, dev->keybit)))) return NULL; 
 
        for (minor = 0; minor < JOYDEV_MINORS && joydev_table[minor]; minor++);
-       if (joydev_table[minor]) {
+       if (minor == JOYDEV_MINORS) {
                printk(KERN_ERR "joydev: no more free joydev devices\n");
                return NULL;
        }
index 1aa85e2273999a9c1fcf35cd9858476b9a08a92c..e6a9e02a131a5409696d44fcf671b594b43d7591 100644 (file)
@@ -39,6 +39,7 @@
 #include <linux/input.h>
 #include <linux/config.h>
 #include <linux/smp_lock.h>
+#include <linux/random.h>
 
 #ifndef CONFIG_INPUT_MOUSEDEV_SCREEN_X
 #define CONFIG_INPUT_MOUSEDEV_SCREEN_X 1024
@@ -86,6 +87,8 @@ static void mousedev_event(struct input_handle *handle, unsigned int type, unsig
        struct mousedev_list *list;
        int index, size;
 
+       add_mouse_randomness((type << 4) ^ code ^ (code >> 4) ^ value);
+
        while (*mousedev) {
                list = (*mousedev)->list;
                while (list) {
@@ -213,7 +216,7 @@ static int mousedev_open(struct inode * inode, struct file * file)
        struct mousedev_list *list;
        int i = MINOR(inode->i_rdev) - MOUSEDEV_MINOR_BASE;
 
-       if (i > MOUSEDEV_MINORS || !mousedev_table[i])
+       if (i >= MOUSEDEV_MINORS || !mousedev_table[i])
                return -ENODEV;
 
        if (!(list = kmalloc(sizeof(struct mousedev_list), GFP_KERNEL)))
@@ -407,7 +410,7 @@ static struct input_handle *mousedev_connect(struct input_handler *handler, stru
                return NULL;
 
        for (minor = 0; minor < MOUSEDEV_MINORS && mousedev_table[minor]; minor++);
-       if (mousedev_table[minor]) {
+       if (minor == MOUSEDEV_MINORS) {
                printk(KERN_ERR "mousedev: no more free mousedev devices\n");
                return NULL;
        }
index 2062f753c3c5cae12c085c181a2ff15ee419b6e2..f42516b12d176c4acc86f09cc8fc449b9d3f470e 100644 (file)
@@ -10,7 +10,7 @@ if [ "$CONFIG_INET" != "n" ]; then
 fi
 bool '  Support audio via ISDN' CONFIG_ISDN_AUDIO
 if [ "$CONFIG_ISDN_AUDIO" != "n" ]; then
-   bool '    Support AT-Fax Class 2 commands' CONFIG_ISDN_TTY_FAX
+   bool '    Support AT-Fax Class 1 and 2 commands' CONFIG_ISDN_TTY_FAX
 fi
 if [ "$CONFIG_X25" != "n" ]; then
    bool '  X.25 PLP on top of ISDN' CONFIG_ISDN_X25
index 0e3c4a7e18f76dc630ee3a645c6ab891f62f9bda..31312e8f6df195f1cf0acccb1467a6208e3e5503 100644 (file)
@@ -7,7 +7,7 @@ ifeq ($(CONFIG_ISDN_DRV_ACT2000),y)
   O_TARGET += act2000.o
 else
   ifeq ($(CONFIG_ISDN_DRV_ACT2000),m)
-       O_TARGET += act2000.o
+       O_TARGET += act2000.o
        M_OBJS = act2000.o
   endif
 endif
index 5d35a12ecd3a68acad4d1d78a8bf4d69df10de70..432f433cb3966ade6c8f36d25c5c41e14ef1bfdf 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: act2000.h,v 1.7 1999/04/12 13:13:54 fritz Exp $
+/* $Id: act2000.h,v 1.8 2000/11/12 16:32:06 kai Exp $
  *
  * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000.
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
  *
- * $Log: act2000.h,v $
- * Revision 1.7  1999/04/12 13:13:54  fritz
- * Made cards pointer static to avoid name-clash.
- *
- * Revision 1.6  1998/11/05 22:12:38  fritz
- * Changed mail-address.
- *
- * Revision 1.5  1997/10/09 22:22:59  fritz
- * New HL<->LL interface:
- *   New BSENT callback with nr. of bytes included.
- *   Sending without ACK.
- *
- * Revision 1.4  1997/09/25 17:25:37  fritz
- * Support for adding cards at runtime.
- * Support for new Firmware.
- *
- * Revision 1.3  1997/09/24 23:11:43  fritz
- * Optimized IRQ load and polling-mode.
- *
- * Revision 1.2  1997/09/24 19:44:12  fritz
- * Added MSN mapping support, some cleanup.
- *
- * Revision 1.1  1997/09/23 18:00:05  fritz
- * New driver for IBM Active 2000.
- *
  */
 
 #ifndef act2000_h
index 99c93dbed6ec808bbeda19b0c7d4e9e771d095c8..216269dcae72055f3b77df69d4d4849d528b10e2 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: act2000_isa.c,v 1.10 1999/10/24 18:46:05 fritz Exp $
+/* $Id: act2000_isa.c,v 1.11 2000/11/12 16:32:06 kai Exp $
  *
  * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000 (ISA-Version).
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
  *
- * $Log: act2000_isa.c,v $
- * Revision 1.10  1999/10/24 18:46:05  fritz
- * Changed isa_ prefix to act2000_isa_ to prevent name-clash in latest
- * kernels.
- *
- * Revision 1.9  1999/09/04 06:20:04  keil
- * Changes from kernel set_current_state()
- *
- * Revision 1.8  1999/01/05 18:29:25  he
- * merged remaining schedule_timeout() changes from 2.1.127
- *
- * Revision 1.7  1998/11/05 22:12:41  fritz
- * Changed mail-address.
- *
- * Revision 1.6  1998/06/17 19:51:09  he
- * merged with 2.1.10[34] (cosmetics and udelay() -> mdelay())
- * brute force fix to avoid Ugh's in isdn_tty_write()
- * cleaned up some dead code
- *
- * Revision 1.5  1998/02/12 23:06:47  keil
- * change for 2.1.86 (removing FREE_READ/FREE_WRITE from [dev]_kfree_skb()
- *
- * Revision 1.4  1997/10/09 22:23:00  fritz
- * New HL<->LL interface:
- *   New BSENT callback with nr. of bytes included.
- *   Sending without ACK.
- *
- * Revision 1.3  1997/09/25 17:25:38  fritz
- * Support for adding cards at runtime.
- * Support for new Firmware.
- *
- * Revision 1.2  1997/09/24 23:11:44  fritz
- * Optimized IRQ load and polling-mode.
- *
- * Revision 1.1  1997/09/23 18:00:05  fritz
- * New driver for IBM Active 2000.
- *
  */
 
 #define __NO_VERSION__
index ff3e5419aeb7f3f3fb4ac0c2c84ab8c4a4ef926d..0b705d33fe59f0b1e44a49a93694a7058e550d60 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: act2000_isa.h,v 1.3 1999/10/24 18:46:05 fritz Exp $
+/* $Id: act2000_isa.h,v 1.4 2000/11/12 16:32:06 kai Exp $
  *
  * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000 (ISA-Version).
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
  *
- * $Log: act2000_isa.h,v $
- * Revision 1.3  1999/10/24 18:46:05  fritz
- * Changed isa_ prefix to act2000_isa_ to prevent name-clash in latest
- * kernels.
- *
- * Revision 1.2  1998/11/05 22:12:43  fritz
- * Changed mail-address.
- *
- * Revision 1.1  1997/09/23 18:00:07  fritz
- * New driver for IBM Active 2000.
- *
  */
 
 #ifndef act2000_isa_h
index 9502b314e1c370962992195e0bb0e9810352cb2c..ad2471a171b772e5e3313895e063259312df16f5 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: capi.c,v 1.8 1998/11/05 22:12:46 fritz Exp $
+/* $Id: capi.c,v 1.9 2000/11/12 16:32:06 kai Exp $
  *
  * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000.
  *        CAPI encoder/decoder
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
  *
- * $Log: capi.c,v $
- * Revision 1.8  1998/11/05 22:12:46  fritz
- * Changed mail-address.
- *
- * Revision 1.7  1998/02/23 23:35:41  fritz
- * Eliminated some compiler warnings.
- *
- * Revision 1.6  1998/02/12 23:06:50  keil
- * change for 2.1.86 (removing FREE_READ/FREE_WRITE from [dev]_kfree_skb()
- *
- * Revision 1.5  1997/10/09 22:23:02  fritz
- * New HL<->LL interface:
- *   New BSENT callback with nr. of bytes included.
- *   Sending without ACK.
- *
- * Revision 1.4  1997/09/25 17:25:39  fritz
- * Support for adding cards at runtime.
- * Support for new Firmware.
- *
- * Revision 1.3  1997/09/24 19:44:14  fritz
- * Added MSN mapping support, some cleanup.
- *
- * Revision 1.2  1997/09/23 19:41:24  fritz
- * Disabled Logging of DATA_B3_IND/RESP/REQ/CONF Messages.
- *
- * Revision 1.1  1997/09/23 18:00:08  fritz
- * New driver for IBM Active 2000.
- *
  */
 
 #define __NO_VERSION__
index 0500550db90f7b0a328d0e03fd6a9e185449173a..88e9b1aabf24c64599c4d283c0b8f8239c85a8d8 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: capi.h,v 1.5 1998/11/05 22:12:48 fritz Exp $
+/* $Id: capi.h,v 1.6 2000/11/12 16:32:06 kai Exp $
  *
  * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000.
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
  *
- * $Log: capi.h,v $
- * Revision 1.5  1998/11/05 22:12:48  fritz
- * Changed mail-address.
- *
- * Revision 1.4  1997/10/01 09:21:04  fritz
- * Removed old compatibility stuff for 2.0.X kernels.
- * From now on, this code is for 2.1.X ONLY!
- * Old stuff is still in the separate branch.
- *
- * Revision 1.3  1997/09/25 17:25:41  fritz
- * Support for adding cards at runtime.
- * Support for new Firmware.
- *
- * Revision 1.2  1997/09/24 19:44:15  fritz
- * Added MSN mapping support, some cleanup.
- *
- * Revision 1.1  1997/09/23 18:00:10  fritz
- * New driver for IBM Active 2000.
- *
  */
 
 #ifndef CAPI_H
index 87f98b02984e3234dce59f288fd96e80cd0a633e..c602d945f27e0d3e220396ba94f7c5e79f30f02a 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: module.c,v 1.12 2000/05/06 00:52:36 kai Exp $
+/* $Id: module.c,v 1.14 2000/11/12 16:32:06 kai Exp $
  *
  * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000.
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
  *
- * $Log: module.c,v $
- * Revision 1.12  2000/05/06 00:52:36  kai
- * merged changes from kernel tree
- * fixed timer and net_device->name breakage
- *
- * Revision 1.11  1999/10/30 09:48:04  keil
- * miss one prefix act2000
- *
- * Revision 1.10  1999/10/24 18:46:05  fritz
- * Changed isa_ prefix to act2000_isa_ to prevent name-clash in latest
- * kernels.
- *
- * Revision 1.9  1999/04/12 13:13:56  fritz
- * Made cards pointer static to avoid name-clash.
- *
- * Revision 1.8  1998/11/05 22:12:51  fritz
- * Changed mail-address.
- *
- * Revision 1.7  1998/02/12 23:06:52  keil
- * change for 2.1.86 (removing FREE_READ/FREE_WRITE from [dev]_kfree_skb()
- *
- * Revision 1.6  1998/01/31 22:10:42  keil
- * changes for 2.1.82
- *
- * Revision 1.5  1997/10/09 22:23:04  fritz
- * New HL<->LL interface:
- *   New BSENT callback with nr. of bytes included.
- *   Sending without ACK.
- *
- * Revision 1.4  1997/09/25 17:25:43  fritz
- * Support for adding cards at runtime.
- * Support for new Firmware.
- *
- * Revision 1.3  1997/09/24 23:11:45  fritz
- * Optimized IRQ load and polling-mode.
- *
- * Revision 1.2  1997/09/24 19:44:17  fritz
- * Added MSN mapping support, some cleanup.
- *
- * Revision 1.1  1997/09/23 18:00:13  fritz
- * New driver for IBM Active 2000.
- *
  */
 
 #include "act2000.h"
index cd222391152167a86028765b0bb20dc708387f00..56f7ac4be57cd72ec2ee2436997c2c75dd392d3d 100644 (file)
@@ -1,5 +1,5 @@
 #
-# $Id: Makefile,v 1.18 2000/04/03 16:39:25 calle Exp $
+# $Id: Makefile,v 1.21 2000/11/01 14:05:02 calle Exp $
 #
 # Makefile for the CAPI and AVM-B1 device drivers.
 #
 # parent makes..
 #
 # $Log: Makefile,v $
+# Revision 1.21  2000/11/01 14:05:02  calle
+# - use module_init/module_exit from linux/init.h.
+# - all static struct variables are initialized with "membername:" now.
+# - avm_cs.c, let it work with newer pcmcia-cs.
+#
+# Revision 1.20  2000/10/18 06:13:34  ostoyke
+# Removing CAPI4Linux from I4L CVS.
+#
+# Revision 1.19  2000/08/10 14:46:25  ostoyke
+# CAPI4Linux.
+#
+# Revision 1.18  2000/04/03 16:39:25  calle
+# Makefile checked in with future things :-(
+#
+# Revision 1.17  2000/04/03 16:38:05  calle
+# made suppress_pollack static.
+#
 # Revision 1.16  2000/03/17 12:15:44  calle
 # ALL_SUB_DIRS were wrong.
 #
 
 SUB_DIRS     :=
 MOD_SUB_DIRS :=
-ALL_SUB_DIRS := # fcpci fcclassic
+ALL_SUB_DIRS :=
 #
 # Objects that don't export a symtab
 #
@@ -158,14 +175,6 @@ ifeq ($(CONFIG_ISDN_CAPI),y)
   ifdef CONFIG_ISDN_DRV_AVMB1_C4
        O_OBJS   += c4.o
   endif
-  ifdef CONFIG_ISDN_DRV_AVMB1_FCPCI
-       SUB_DIRS += fcpci
-       MOD_SUB_DIRS += fcpci
-  endif
-  ifdef CONFIG_ISDN_DRV_AVMB1_FCCLASSIC
-       SUB_DIRS += fcclassic
-       MOD_SUB_DIRS += fcclassic
-  endif
   OX_OBJS  += capiutil.o capidrv.o b1.o b1dma.o
 else
   ifeq ($(CONFIG_ISDN_CAPI),m)
@@ -198,12 +207,6 @@ else
        ifdef CONFIG_ISDN_DRV_AVMB1_C4
                M_OBJS   += c4.o
        endif
-       ifdef CONFIG_ISDN_DRV_AVMB1_FCPCI
-               MOD_SUB_DIRS += fcpci
-       endif
-       ifdef CONFIG_ISDN_DRV_AVMB1_FCCLASSIC
-               MOD_SUB_DIRS += fcclassic
-       endif
        MX_OBJS  += capiutil.o capidrv.o b1.o b1dma.o
   endif
 endif
index 8ccf5fc7ef5866cb96246023c52f3c2d61f53fb5..747b5ea7f2bf1e7fca4282668d4ccf20fcc53351 100644 (file)
@@ -517,7 +517,7 @@ void b1_handle_interrupt(avmcard * card)
        struct sk_buff *skb;
 
        unsigned ApplId;
-       signed MsgLen;
+       unsigned MsgLen;
        unsigned DataB3Len;
        unsigned NCCI;
        unsigned WindowSize;
index 9da7a21ac3d80cb32b5abd465f3dfd5d8e0b1c8c..6cdc6c5a40ae93812aae372c54d4a53fbd256522 100644 (file)
@@ -483,8 +483,7 @@ static void b1dma_handle_rx(avmcard *card)
        struct capi_ctr *ctrl = cinfo->capi_ctrl;
        struct sk_buff *skb;
        void *p = dma->recvbuf+4;
-       __u32 ApplId, DataB3Len, NCCI, WindowSize;
-       __s32 MsgLen;
+       __u32 ApplId, MsgLen, DataB3Len, NCCI, WindowSize;
        __u8 b1cmd =  _get_byte(&p);
 
 #ifdef CONFIG_B1DMA_DEBUG
index 9c67a0a4234207c11daa8055534325879b8db7bd..486a0f28d10c46d9d760572436a93704a16688e8 100644 (file)
@@ -244,20 +244,20 @@ static char *b1isa_procinfo(struct capi_ctr *ctrl)
 /* ------------------------------------------------------------- */
 
 static struct capi_driver b1isa_driver = {
-    "b1isa",
-    "0.0",
-    b1_load_firmware,
-    b1_reset_ctr,
-    b1isa_remove_ctr,
-    b1_register_appl,
-    b1_release_appl,
-    b1_send_message,
-
-    b1isa_procinfo,
-    b1ctl_read_proc,
-    0, /* use standard driver_read_proc */
-
-    b1isa_add_card,
+    name: "b1isa",
+    revision: "0.0",
+    load_firmware: b1_load_firmware,
+    reset_ctr: b1_reset_ctr,
+    remove_ctr: b1isa_remove_ctr,
+    register_appl: b1_register_appl,
+    release_appl: b1_release_appl,
+    send_message: b1_send_message,
+
+    procinfo: b1isa_procinfo,
+    ctr_read_proc: b1ctl_read_proc,
+    driver_read_proc: 0,       /* use standard driver_read_proc */
+
+    add_card: b1isa_add_card,
 };
 
 #ifdef MODULE
index 69bab955790441286ea31b7de49202ff34866f6e..27af2e27b80a08bc05d8b7d617fda3a9f6fd03fc 100644 (file)
@@ -276,20 +276,20 @@ static int b1pci_add_card(struct capi_driver *driver, struct capicardparams *p)
 /* ------------------------------------------------------------- */
 
 static struct capi_driver b1pci_driver = {
-    "b1pci",
-    "0.0",
-    b1_load_firmware,
-    b1_reset_ctr,
-    b1pci_remove_ctr,
-    b1_register_appl,
-    b1_release_appl,
-    b1_send_message,
-
-    b1pci_procinfo,
-    b1ctl_read_proc,
-    0, /* use standard driver_read_proc */
-
-    0, /* no add_card function */
+    name: "b1pci",
+    revision: "0.0",
+    load_firmware: b1_load_firmware,
+    reset_ctr: b1_reset_ctr,
+    remove_ctr: b1pci_remove_ctr,
+    register_appl: b1_register_appl,
+    release_appl: b1_release_appl,
+    send_message: b1_send_message,
+
+    procinfo: b1pci_procinfo,
+    ctr_read_proc: b1ctl_read_proc,
+    driver_read_proc: 0,       /* use standard driver_read_proc */
+
+    add_card: 0, /* no add_card function */
 };
 
 #ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4
@@ -463,20 +463,20 @@ static int b1pciv4_add_card(struct capi_driver *driver, struct capicardparams *p
 
 
 static struct capi_driver b1pciv4_driver = {
-    "b1pciv4",
-    "0.0",
-    b1dma_load_firmware,
-    b1dma_reset_ctr,
-    b1pciv4_remove_ctr,
-    b1dma_register_appl,
-    b1dma_release_appl,
-    b1dma_send_message,
-
-    b1pciv4_procinfo,
-    b1dmactl_read_proc,
-    0, /* use standard driver_read_proc */
-
-    0, /* no add_card function */
+    name: "b1pciv4",
+    revision: "0.0",
+    load_firmware: b1dma_load_firmware,
+    reset_ctr: b1dma_reset_ctr,
+    remove_ctr: b1pciv4_remove_ctr,
+    register_appl: b1dma_register_appl,
+    release_appl: b1dma_release_appl,
+    send_message: b1dma_send_message,
+
+    procinfo: b1pciv4_procinfo,
+    ctr_read_proc: b1dmactl_read_proc,
+    driver_read_proc: 0,       /* use standard driver_read_proc */
+
+    add_card: 0, /* no add_card function */
 };
 
 #endif /* CONFIG_ISDN_DRV_AVMB1_B1PCIV4 */
index c3537c363cb17749b1e09b8073838ffa54410876..20b8515482fd5594f798fc81297c0398a7754a73 100644 (file)
@@ -245,20 +245,20 @@ static char *b1pcmcia_procinfo(struct capi_ctr *ctrl)
 /* ------------------------------------------------------------- */
 
 static struct capi_driver b1pcmcia_driver = {
-    "b1pcmcia",
-    "0.0",
-    b1_load_firmware,
-    b1_reset_ctr,
-    b1pcmcia_remove_ctr,
-    b1_register_appl,
-    b1_release_appl,
-    b1_send_message,
-
-    b1pcmcia_procinfo,
-    b1ctl_read_proc,
-    0, /* use standard driver_read_proc */
-
-    0,
+    name: "b1pcmcia",
+    revision: "0.0",
+    load_firmware: b1_load_firmware,
+    reset_ctr: b1_reset_ctr,
+    remove_ctr: b1pcmcia_remove_ctr,
+    register_appl: b1_register_appl,
+    release_appl: b1_release_appl,
+    send_message: b1_send_message,
+
+    procinfo: b1pcmcia_procinfo,
+    ctr_read_proc: b1ctl_read_proc,
+    driver_read_proc: 0,       /* use standard driver_read_proc */
+
+    add_card: 0,
 };
 
 /* ------------------------------------------------------------- */
index ae2c492610ea7fcb18cd7651768936a4bdc69a8d..7f13400019c97e7247d1ca195928d6fe357cace3 100644 (file)
@@ -580,8 +580,7 @@ static void c4_handle_rx(avmcard *card)
        avmctrl_info *cinfo;
        struct sk_buff *skb;
        void *p = dma->recvbuf;
-       __u32 ApplId, DataB3Len, NCCI, WindowSize;
-       __s32 MsgLen;
+       __u32 ApplId, MsgLen, DataB3Len, NCCI, WindowSize;
        __u8 b1cmd =  _get_byte(&p);
        __u32 cidx;
 
@@ -1311,22 +1310,23 @@ static int c4_add_card(struct capi_driver *driver, struct capicardparams *p)
 /* ------------------------------------------------------------- */
 
 static struct capi_driver c4_driver = {
-    "c4",
-    "0.0",
-    c4_load_firmware,
-    c4_reset_ctr,
-    c4_remove_ctr,
-    c4_register_appl,
-    c4_release_appl,
-    c4_send_message,
-
-    c4_procinfo,
-    c4_read_proc,
-    0, /* use standard driver_read_proc */
-
-    0, /* no add_card function */
+    name: "c4",
+    revision: "0.0",
+    load_firmware: c4_load_firmware,
+    reset_ctr: c4_reset_ctr,
+    remove_ctr: c4_remove_ctr,
+    register_appl: c4_register_appl,
+    release_appl: c4_release_appl,
+    send_message: c4_send_message,
+
+    procinfo: c4_procinfo,
+    ctr_read_proc: c4_read_proc,
+    driver_read_proc: 0,       /* use standard driver_read_proc */
+
+    add_card: 0, /* no add_card function */
 };
 
+
 #ifdef MODULE
 #define c4_init init_module
 void cleanup_module(void);
index ff91a89f84ab6e6c9a245e6c160d455c6535da46..69385b4df28b92ef350a25ce19f111af9d6f7b75 100644 (file)
@@ -2054,8 +2054,8 @@ static void lower_callback(unsigned int cmd, __u32 contr, void *data)
 }
 
 static struct capi_interface_user cuser = {
-       "capi20",
-       lower_callback,
+       name: "capi20",
+       callback: lower_callback,
 };
 
 static char rev[10];
index a66057e1c0f2f1b753decb1607c503f6becad9a8..e512c8672e9cc3c91a55d7ed132c0e70ad4f2a80 100644 (file)
@@ -386,16 +386,16 @@ static inline __u32 b3prot(int l2, int l3)
        }
 }
 
-static _cstruct b1config_sync_v110(__u16 rate)
+static _cstruct b1config_async_v110(__u16 rate)
 {
        /* CAPI-Spec "B1 Configuration" */
        static unsigned char buf[9];
        buf[0] = 8; /* len */
        /* maximum bitrate */
        buf[1] = rate & 0xff; buf[2] = (rate >> 8) & 0xff;
-       buf[3] = buf[4] = 0; /* reserved, bits per character */
-       buf[5] = buf[6] = 0; /* reserved, parity */
-       buf[7] = buf[9] = 0; /* reserved, stop bits */
+       buf[3] = 8; buf[4] = 0; /* 8 bits per character */
+       buf[5] = 0; buf[6] = 0; /* parity none */
+       buf[7] = 0; buf[8] = 0; /* 1 stop bit */
        return buf;
 }
 
@@ -410,11 +410,11 @@ static _cstruct b1config(int l2, int l3)
        default:
                return 0;
         case ISDN_PROTO_L2_V11096:
-           return b1config_sync_v110(9600);
+           return b1config_async_v110(9600);
         case ISDN_PROTO_L2_V11019:
-           return b1config_sync_v110(19200);
+           return b1config_async_v110(19200);
         case ISDN_PROTO_L2_V11038:
-           return b1config_sync_v110(38400);
+           return b1config_async_v110(38400);
        }
 }
 
@@ -2464,8 +2464,8 @@ static void __exit proc_exit(void)
 }
 
 static struct capi_interface_user cuser = {
-       "capidrv",
-       lower_callback
+       name: "capidrv",
+       callback: lower_callback
 };
 
 int __init capidrv_init(void)
index d4956c45bb9e23bf39ff731f950e51c57a9a2efb..b932c17e00190df62f8b4c0e6b7be2d88db38709 100644 (file)
@@ -119,8 +119,6 @@ struct inode_operations capifs_root_inode_operations = {
        lookup: capifs_root_lookup,
 };
 
-struct inode_operations capifs_inode_operations;
-
 static struct dentry_operations capifs_dentry_operations = {
        d_revalidate: capifs_revalidate,
 };
@@ -468,10 +466,8 @@ static void capifs_read_inode(struct inode *inode)
        ino_t ino = inode->i_ino;
        struct capifs_sb_info *sbi = SBI(inode->i_sb);
 
-       inode->i_op = NULL;
        inode->i_mode = 0;
        inode->i_nlink = 0;
-       inode->i_size = 0;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
        inode->i_blocks = 0;
        inode->i_blksize = 1024;
@@ -485,9 +481,6 @@ static void capifs_read_inode(struct inode *inode)
                return;
        } 
 
-       /* need dummy inode operations .... */
-       inode->i_op = &capifs_inode_operations;
-
        ino -= 2;
        if ( ino >= sbi->max_ncci )
                return;         /* Bogus */
index 7a69f7b52b350224e99bbca51b281d2ae021c767..ff77c5f20c93dca493680df1901563483f33ebb9 100644 (file)
@@ -209,7 +209,7 @@ static void t1_handle_interrupt(avmcard * card)
        struct sk_buff *skb;
 
        unsigned ApplId;
-       signed MsgLen;
+       unsigned MsgLen;
        unsigned DataB3Len;
        unsigned NCCI;
        unsigned WindowSize;
@@ -597,20 +597,20 @@ static char *t1isa_procinfo(struct capi_ctr *ctrl)
 /* ------------------------------------------------------------- */
 
 static struct capi_driver t1isa_driver = {
-    "t1isa",
-    "0.0",
-    t1isa_load_firmware,
-    t1isa_reset_ctr,
-    t1isa_remove_ctr,
-    b1_register_appl,
-    b1_release_appl,
-    t1isa_send_message,
-
-    t1isa_procinfo,
-    b1ctl_read_proc,
-    0, /* use standard driver_read_proc */
-
-    t1isa_add_card,
+    name: "t1isa",
+    revision: "0.0",
+    load_firmware: t1isa_load_firmware,
+    reset_ctr: t1isa_reset_ctr,
+    remove_ctr: t1isa_remove_ctr,
+    register_appl: b1_register_appl,
+    release_appl: b1_release_appl,
+    send_message: t1isa_send_message,
+
+    procinfo: t1isa_procinfo,
+    ctr_read_proc: b1ctl_read_proc,
+    driver_read_proc: 0,       /* use standard driver_read_proc */
+
+    add_card: t1isa_add_card,
 };
 
 #ifdef MODULE
index d2303feab66fe4c903cd140e94e614d4ac078d19..50ecc729df5fe54b5f976734b19e2cae012ce481 100644 (file)
@@ -259,20 +259,20 @@ static char *t1pci_procinfo(struct capi_ctr *ctrl)
 /* ------------------------------------------------------------- */
 
 static struct capi_driver t1pci_driver = {
-    "t1pci",
-    "0.0",
-    b1dma_load_firmware,
-    b1dma_reset_ctr,
-    t1pci_remove_ctr,
-    b1dma_register_appl,
-    b1dma_release_appl,
-    b1dma_send_message,
-
-    t1pci_procinfo,
-    b1dmactl_read_proc,
-    0, /* use standard driver_read_proc */
-
-    0, /* no add_card function */
+    name: "t1pci",
+    revision: "0.0",
+    load_firmware: b1dma_load_firmware,
+    reset_ctr: b1dma_reset_ctr,
+    remove_ctr: t1pci_remove_ctr,
+    register_appl: b1dma_register_appl,
+    release_appl: b1dma_release_appl,
+    send_message: b1dma_send_message,
+
+    procinfo: t1pci_procinfo,
+    ctr_read_proc: b1dmactl_read_proc,
+    driver_read_proc: 0,       /* use standard driver_read_proc */
+
+    add_card: 0, /* no add_card function */
 };
 
 #ifdef MODULE
index ce44cfa19cd3b65e337d69fee34f9f67a98ad3cd..0e0c439641dcafd5d829de3add0ac3317403a72b 100644 (file)
@@ -1,5 +1,5 @@
 /* 
- * $Id: divert_init.c,v 1.4 1999/08/22 20:26:32 calle Exp $
+ * $Id: divert_init.c,v 1.5 2000/11/13 22:51:47 kai Exp $
  *
  * Module init for DSS1 diversion services for i4l.
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
  *
- * $Log: divert_init.c,v $
- * Revision 1.4  1999/08/22 20:26:32  calle
- * backported changes from kernel 2.3.14:
- * - several #include "config.h" gone, others come.
- * - "struct device" changed to "struct net_device" in 2.3.14, added a
- *   define in isdn_compat.h for older kernel versions.
- *
- * Revision 1.3  1999/07/05 20:21:39  werner
- * changes to use diversion sources for all kernel versions.
- * removed static device, only proc filesystem used
- *
- * Revision 1.2  1999/07/04 21:37:30  werner
- * Ported from kernel version 2.0
- *
- *
- *
  */
 
 #include <linux/module.h>
index 5b08e80259812f59fe7ce6ac051314a5ecb584b5..8cff1683ae410a350f8d4ca5cfa83b3eff56e62f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: divert_procfs.c,v 1.9 2000/08/20 07:40:14 keil Exp $
+ * $Id: divert_procfs.c,v 1.10 2000/11/13 22:51:47 kai Exp $
  *
  * Filesystem handling for the diversion supplementary services.
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Log: divert_procfs.c,v $
- * Revision 1.9  2000/08/20 07:40:14  keil
- * changes from 2.4
- *
- * Revision 1.8  2000/03/03 16:37:11  kai
- * incorporated some cosmetic changes from the official kernel tree back
- * into CVS
- *
- * Revision 1.7  2000/03/02 00:11:06  werner
- *
- * Changes related to procfs for 2.3.48
- *
- * Revision 1.6  2000/02/14 19:23:03  werner
- *
- * Changed handling of proc filesystem tables to a more portable version
- *
- * Revision 1.5  1999/09/14 20:31:01  werner
- *
- * Removed obsoleted functions for proc fs and synced with new ones.
- *
- * Revision 1.4  1999/08/06 07:42:48  calle
- * Added COMPAT_HAS_NEW_WAITQ for rd_queue for newer kernels.
- *
- * Revision 1.3  1999/07/05 20:21:41  werner
- * changes to use diversion sources for all kernel versions.
- * removed static device, only proc filesystem used
- *
- * Revision 1.2  1999/07/04 21:37:31  werner
- * Ported from kernel version 2.0
- *
- *
- *
  */
 
 #include <linux/config.h>
index 7079232e7dcfd73adb288a7fdec7b6f73fc81dd2..f5b6b8773753f30c46b62fd18d3d902b10105207 100644 (file)
@@ -1,5 +1,5 @@
 /* 
- * $Id: isdn_divert.c,v 1.5 1999/08/31 11:20:04 paul Exp $
+ * $Id: isdn_divert.c,v 1.6 2000/11/13 22:51:47 kai Exp $
  *
  * DSS1 main diversion supplementary handling for i4l.
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
  *
- * $Log: isdn_divert.c,v $
- * Revision 1.5  1999/08/31 11:20:04  paul
- * various spelling corrections (new checksums may be needed, Karsten!)
- *
- * Revision 1.4  1999/08/25 20:02:21  werner
- * Changed return values for stat_icall(w) from 3->4 and 4->5 because of conflicts
- * with existing software definitions. (PtP incomplete called party number)
- *
- * Revision 1.3  1999/08/22 20:26:35  calle
- * backported changes from kernel 2.3.14:
- * - several #include "config.h" gone, others come.
- * - "struct device" changed to "struct net_device" in 2.3.14, added a
- *   define in isdn_compat.h for older kernel versions.
- *
- * Revision 1.2  1999/07/04 21:37:32  werner
- * Ported from kernel version 2.0
- *
- *
- *
  */
 
 
index 6ab119ed9527f05e3bd19f337a6217dd037393f1..84390c9976c5b5e69fc6cdb2db28038eedbff049 100644 (file)
@@ -1,5 +1,5 @@
 /* 
- * $Id: isdn_divert.h,v 1.4 1999/09/02 13:24:12 paul Exp $
+ * $Id: isdn_divert.h,v 1.5 2000/11/13 22:51:47 kai Exp $
  *
  * Header for the diversion supplementary ioctl interface.
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
  *
- * $Log: isdn_divert.h,v $
- * Revision 1.4  1999/09/02 13:24:12  paul
- * cosmetics; text following #endif is not ANSI C
- *
- * Revision 1.3  1999/08/22 20:26:37  calle
- * backported changes from kernel 2.3.14:
- * - several #include "config.h" gone, others come.
- * - "struct device" changed to "struct net_device" in 2.3.14, added a
- *   define in isdn_compat.h for older kernel versions.
- *
- * Revision 1.2  1999/07/04 21:37:33  werner
- * Ported from kernel version 2.0
- *
  */
 
 
index 4ed7e4129afa28d6a92f00318ef7492328f74238..614f145cb266164e03433c49c34b9b636fa09253 100644 (file)
@@ -484,7 +484,7 @@ HiSax_setup(char *line)
                }
                i++;
        }
-       if (strlen(str)) {
+       if (str && *str) {
                strcpy(HiSaxID, str);
                HiSax_id = HiSaxID;
        } else {
index eca66942e16c5fa3b4c68623a0c57bf8adfbe5a7..0a2e1d4eca8c6474cd32cfa311737727a1e52e9f 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: w6692.c,v 1.7 2000/06/26 08:59:15 keil Exp $
+/* $Id: w6692.c,v 1.8 2000/09/07 20:33:30 werner Exp $
  *
  * w6692.c   Winbond W6692 specific routines
  *
@@ -46,7 +46,7 @@ static const PCI_ENTRY id_list[] =
 
 extern const char *CardType[];
 
-const char *w6692_revision = "$Revision: 1.7 $";
+const char *w6692_revision = "$Revision: 1.8 $";
 
 #define DBUSY_TIMER_VALUE 80
 
@@ -1056,6 +1056,7 @@ __initfunc(int setup_w6692(struct IsdnCard *card))
        cs->BC_Send_Data = &W6692B_fill_fifo;
        cs->cardmsg = &w6692_card_msg;
        cs->irq_func = &W6692_interrupt;
+       cs->irq_flags |= SA_SHIRQ;
        W6692Version(cs, "W6692:");
        printk(KERN_INFO "W6692 ISTA=0x%X\n", ReadW6692(cs, W_ISTA));
        printk(KERN_INFO "W6692 IMASK=0x%X\n", ReadW6692(cs, W_IMASK));
index 471ec549ec9c2b5fbdd6f86041feb1c74c4174e4..17fc82ffc547cf8514b8634a38b88840c1a2b93b 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: boardergo.c,v 1.3 2000/05/17 11:41:30 ualbrecht Exp $
+/* $Id: boardergo.c,v 1.4 2000/11/13 22:51:47 kai Exp $
 
  * Linux driver for HYSDN cards, specific routines for ergo type boards.
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Log: boardergo.c,v $
- * Revision 1.3  2000/05/17 11:41:30  ualbrecht
- * CAPI 2.0 support added
- *
- * Revision 1.2  2000/04/23 14:18:36  kai
- * merge changes from main tree
- *
- * Revision 1.1  2000/02/10 19:45:18  werner
- *
- * Initial release
- *
- *
  */
 
 #define __NO_VERSION__
index 0e2c3f6787847cb042772998b7c607c86e474b42..224d1823aa6d7cc4392e72e453c3ef184540b758 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: boardergo.h,v 1.1 2000/02/10 19:44:30 werner Exp $
+/* $Id: boardergo.h,v 1.2 2000/11/13 22:51:47 kai Exp $
 
  * Linux driver for HYSDN cards, definitions for ergo type boards (buffers..).
  * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Log: boardergo.h,v $
- * Revision 1.1  2000/02/10 19:44:30  werner
- *
- * Initial release
- *
- *
  */
 
 
index aabb28b8d1fba348264c4ebdc69c8488aebc8356..f90d902e25acd791768bca470976b14757a96e6c 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: hycapi.c,v 1.6 2000/07/25 08:07:42 ualbrecht Exp $
+/* $Id: hycapi.c,v 1.7 2000/11/13 22:51:47 kai Exp $
  *
  * Linux driver for HYSDN cards, CAPI2.0-Interface.
  * written by Ulrich Albrecht (u.albrecht@hypercope.de) for Hypercope GmbH
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Log: hycapi.c,v $
- * Revision 1.6  2000/07/25 08:07:42  ualbrecht
- * Fixed stupid re-registering bug resulting in system-freeze
- *
- * Revision 1.5  2000/06/18 16:08:18  keil
- * 2.4 PCI changes and some cosmetics
- *
- * Revision 1.4  2000/06/13 09:13:06  ualbrecht
- * Changed internal application handling: Registration is now deferred
- * until a CAPI-message is actually sent to the controller (no good
- * wasting memory on the card if it's never used anyways).
- * Module will now unload more gracefully.
- *
- * Revision 1.2  2000/05/22 10:31:22  ualbrecht
- * Parameter-checking for app-registration fixed
- *
- * Revision 1.1  2000/05/17 11:34:30  ualbrecht
- * Initial release
- *
- *
  */
 
 #define __NO_VERSION__
@@ -61,7 +41,7 @@
 #include "hysdn_defs.h"
 #include <linux/kernelcapi.h>
 
-static char hycapi_revision[]="$Revision: 1.6 $";
+static char hycapi_revision[]="$Revision: 1.7 $";
 
 typedef struct _hycapi_appl {
        unsigned int ctrl_mask;
index 31eaa14cb1e23956b35f2b8cd21090bebba69d7f..2af44170e50b0c6cedc97e798259c438c72401c1 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: hysdn_boot.c,v 1.3 2000/05/17 11:41:30 ualbrecht Exp $
+/* $Id: hysdn_boot.c,v 1.4 2000/11/13 22:51:47 kai Exp $
 
  * Linux driver for HYSDN cards, specific routines for booting and pof handling.
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Log: hysdn_boot.c,v $
- * Revision 1.3  2000/05/17 11:41:30  ualbrecht
- * CAPI 2.0 support added
- *
- * Revision 1.2  2000/04/23 14:18:36  kai
- * merge changes from main tree
- *
- * Revision 1.1  2000/02/10 19:45:18  werner
- *
- * Initial release
- *
- *
  */
 
 #define __NO_VERSION__
index e5ad863d4b9387241857acd4e6a769ea4ad708fd..0e4794c394def6631ea9ac159d64fb313ba72f5d 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: hysdn_defs.h,v 1.3 2000/06/13 09:14:26 ualbrecht Exp $
+/* $Id: hysdn_defs.h,v 1.4 2000/11/13 22:51:47 kai Exp $
 
  * Linux driver for HYSDN cards, global definitions and exported vars and functions.
  * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Log: hysdn_defs.h,v $
- * Revision 1.3  2000/06/13 09:14:26  ualbrecht
- * Removed obsolete struct for CAPI-application tracking.
- *
- * Revision 1.2  2000/05/17 11:41:30  ualbrecht
- * CAPI 2.0 support added
- *
- * Revision 1.1  2000/02/10 19:44:30  werner
- *
- * Initial release
- *
- *
  */
 
 #ifndef HYSDN_DEFS_H
index 6ae0c3a7fe93d185d92436742f36bb94430fb8b7..2b39167536407d2674c647dc6beda34d81c48f13 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: hysdn_init.c,v 1.5 2000/08/20 16:46:09 keil Exp $
+/* $Id: hysdn_init.c,v 1.6 2000/11/13 22:51:47 kai Exp $
 
  * Linux driver for HYSDN cards, init functions.
  * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Log: hysdn_init.c,v $
- * Revision 1.5  2000/08/20 16:46:09  keil
- * Changes for 2.4
- *
- * Revision 1.4  2000/06/18 16:08:18  keil
- * 2.4 PCI changes and some cosmetics
- *
- * Revision 1.3  2000/06/13 09:15:07  ualbrecht
- * Module will now unload more gracefully.
- *
- * Revision 1.2  2000/05/17 11:41:30  ualbrecht
- * CAPI 2.0 support added
- *
- * Revision 1.1  2000/02/10 19:45:18  werner
- *
- * Initial release
- *
- *
  */
 
 #include <linux/config.h>
@@ -49,7 +31,7 @@
 
 #include "hysdn_defs.h"
 
-static char *hysdn_init_revision = "$Revision: 1.5 $";
+static char *hysdn_init_revision = "$Revision: 1.6 $";
 int cardmax;                   /* number of found cards */
 hysdn_card *card_root = NULL;  /* pointer to first card */
 
index 61441da10ef647bd55b1959145fd49ac39de912d..cf250e48d9240ff42ab22f3a6e7f224b9ff3e3c7 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: hysdn_net.c,v 1.7 2000/05/23 06:48:54 ualbrecht Exp $
+/* $Id: hysdn_net.c,v 1.8 2000/11/13 22:51:47 kai Exp $
 
  * Linux driver for HYSDN cards, net (ethernet type) handling routines.
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Log: hysdn_net.c,v $
- * Revision 1.7  2000/05/23 06:48:54  ualbrecht
- * Reverted last change in dev->name assignment (broken netdevice.h in 2.3.99pre6?)
- *
- * Revision 1.6  2000/05/17 11:43:03  ualbrecht
- * Fixed a NULL-pointer kernel-oops assigning the device-name
- *
- * Revision 1.5  2000/05/06 00:52:38  kai
- * merged changes from kernel tree
- * fixed timer and net_device->name breakage
- *
- * Revision 1.4  2000/04/23 14:18:36  kai
- * merge changes from main tree
- *
- * Revision 1.3  2000/02/14 19:24:12  werner
- *
- * Removed superflous file
- *
- * Revision 1.2  2000/02/13 17:32:19  werner
- *
- * Added support for new network layer of 2.3.43 and 44 kernels and tested driver.
- *
- * Revision 1.1  2000/02/10 19:45:18  werner
- *
- * Initial release
- *
- *
  */
 
 #define __NO_VERSION__
@@ -65,7 +38,7 @@
 #include "hysdn_defs.h"
 
 /* store the actual version for log reporting */
-char *hysdn_net_revision = "$Revision: 1.7 $";
+char *hysdn_net_revision = "$Revision: 1.8 $";
 
 #define MAX_SKB_BUFFERS 20     /* number of buffers for keeping TX-data */
 
index 619c07897850c2f94cd8cf36984cd4ae5a608c5e..524b7a0ae9c54e9af8fde2ed73a81c114a36c973 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: hysdn_pof.h,v 1.1 2000/02/10 19:44:30 werner Exp $
+/* $Id: hysdn_pof.h,v 1.2 2000/11/13 22:51:47 kai Exp $
 
  * Linux driver for HYSDN cards, definitions used for handling pof-files.
  * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Log: hysdn_pof.h,v $
- * Revision 1.1  2000/02/10 19:44:30  werner
- *
- * Initial release
- *
- *
  */
 
 /************************/
index aa17c10146bdac7e34811185bfaba2e27e8634d2..2200f990671172305f291156fd481669939528a2 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: hysdn_procconf.c,v 1.7 2000/08/20 16:46:09 keil Exp $
+/* $Id: hysdn_procconf.c,v 1.8 2000/11/13 22:51:47 kai Exp $
 
  * Linux driver for HYSDN cards, /proc/net filesystem dir and conf functions.
  * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Log: hysdn_procconf.c,v $
- * Revision 1.7  2000/08/20 16:46:09  keil
- * Changes for 2.4
- *
- * Revision 1.6  2000/05/17 11:41:30  ualbrecht
- * CAPI 2.0 support added
- *
- * Revision 1.5  2000/04/23 14:18:36  kai
- * merge changes from main tree
- *
- * Revision 1.4  2000/03/03 16:37:12  kai
- * incorporated some cosmetic changes from the official kernel tree back
- * into CVS
- *
- * Revision 1.3  2000/03/02 00:11:07  werner
- *
- * Changes related to procfs for 2.3.48
- *
- * Revision 1.2  2000/02/14 19:23:03  werner
- *
- * Changed handling of proc filesystem tables to a more portable version
- *
- * Revision 1.1  2000/02/10 19:45:18  werner
- *
- * Initial release
- *
- *
  */
 
 #define __NO_VERSION__
@@ -58,7 +31,7 @@
 
 #include "hysdn_defs.h"
 
-static char *hysdn_procconf_revision = "$Revision: 1.7 $";
+static char *hysdn_procconf_revision = "$Revision: 1.8 $";
 
 #define INFO_OUT_LEN 80                /* length of info line including lf */
 
index a0ac125fe1b9939e08caf0db2b8314e0f0a60d12..09c59523667205ad5029df5215e0577331311861 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: hysdn_proclog.c,v 1.7 2000/08/20 16:46:09 keil Exp $
+/* $Id: hysdn_proclog.c,v 1.8 2000/11/13 22:51:47 kai Exp $
 
  * Linux driver for HYSDN cards, /proc/net filesystem log functions.
  * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Log: hysdn_proclog.c,v $
- * Revision 1.7  2000/08/20 16:46:09  keil
- * Changes for 2.4
- *
- * Revision 1.6  2000/06/18 16:08:18  keil
- * 2.4 PCI changes and some cosmetics
- *
- * Revision 1.5  2000/04/23 14:18:36  kai
- * merge changes from main tree
- *
- * Revision 1.4  2000/03/03 16:37:12  kai
- * incorporated some cosmetic changes from the official kernel tree back
- * into CVS
- *
- * Revision 1.3  2000/03/02 00:11:07  werner
- *
- * Changes related to procfs for 2.3.48
- *
- * Revision 1.2  2000/02/14 19:23:03  werner
- *
- * Changed handling of proc filesystem tables to a more portable version
- *
- * Revision 1.1  2000/02/10 19:45:18  werner
- *
- * Initial release
- *
- *
  */
 
 #define __NO_VERSION__
index 64b8782f0e6d4002d3fce442df52a88015bba8d9..3091c2bc1622368c05d885668e1ce6d2a5fb023a 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: hysdn_sched.c,v 1.3 2000/05/17 11:41:30 ualbrecht Exp $
+/* $Id: hysdn_sched.c,v 1.4 2000/11/13 22:51:47 kai Exp $
 
  * Linux driver for HYSDN cards, scheduler routines for handling exchange card <-> pc.
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Log: hysdn_sched.c,v $
- * Revision 1.3  2000/05/17 11:41:30  ualbrecht
- * CAPI 2.0 support added
- *
- * Revision 1.2  2000/04/23 14:18:36  kai
- * merge changes from main tree
- *
- * Revision 1.1  2000/02/10 19:45:18  werner
- *
- * Initial release
- *
- *
  */
 
 #define __NO_VERSION__
index 29245ddff5727a840de400322f11fe838965c319..180b3711a4e54cbbd7bf23c82986b7a9181e59be 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: icn.c,v 1.64 2000/10/02 17:33:43 keil Exp $
+/* $Id: icn.c,v 1.65 2000/11/13 22:51:48 kai Exp $
 
  * ISDN low-level module for the ICN active ISDN-Card.
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Log: icn.c,v $
- * Revision 1.64  2000/10/02 17:33:43  keil
- * Fix NULL pointer error  (thanks Luca Montecchia)
- *
- * Revision 1.63  2000/05/06 00:52:39  kai
- * merged changes from kernel tree
- * fixed timer and net_device->name breakage
- *
- * Revision 1.62  1999/09/06 07:29:35  fritz
- * Changed my mail-address.
- *
- * Revision 1.61  1999/09/03 14:06:58  fritz
- * Fixed a memory leak.
- *
- * Revision 1.60  1999/08/31 11:20:32  paul
- * various spelling corrections (new checksums may be needed, Karsten!)
- *
- * Revision 1.59  1999/08/28 22:10:55  keil
- * __setup function should be static
- *
- * Revision 1.58  1999/08/25 16:44:17  keil
- * Support for new __setup function
- *
- * Revision 1.57  1999/07/06 16:15:30  detabc
- * remove unused messages
- *
- * Revision 1.56  1999/04/12 13:15:07  fritz
- * Fixed a cast.
- *
- * Revision 1.55  1999/04/12 12:34:02  fritz
- * Changes from 2.0 tree.
- *
- * Revision 1.54  1999/01/05 18:29:39  he
- * merged remaining schedule_timeout() changes from 2.1.127
- *
- * Revision 1.53  1998/06/17 19:51:28  he
- * merged with 2.1.10[34] (cosmetics and udelay() -> mdelay())
- * brute force fix to avoid Ugh's in isdn_tty_write()
- * cleaned up some dead code
- *
- * Revision 1.52  1998/05/20 19:29:58  tsbogend
- * fixed bug introduced by changes for new BSENT callback
- *
- * Revision 1.51  1998/03/07 22:29:55  fritz
- * Adapted Detlef's chenges for 2.1.
- *
- * Revision 1.49  1998/02/13 11:14:15  keil
- * change for 2.1.86 (removing FREE_READ/FREE_WRITE from [dev]_kfree_skb()
- *
- * Revision 1.48  1997/10/10 15:56:14  fritz
- * New HL<->LL interface:
- *   New BSENT callback with nr. of bytes included.
- *   Sending without ACK.
- *
- * Revision 1.47  1997/10/01 09:21:51  fritz
- * Removed old compatibility stuff for 2.0.X kernels.
- * From now on, this code is for 2.1.X ONLY!
- * Old stuff is still in the separate branch.
- *
- * Revision 1.46  1997/08/21 22:38:33  fritz
- * Fixed a typo.
- *
- * Revision 1.45  1997/06/21 10:42:06  fritz
- * Added availability to select leased mode on only one channel.
- *
- * Revision 1.44  1997/03/30 16:51:26  calle
- * changed calls to copy_from_user/copy_to_user and removed verify_area
- * were possible.
- *
- * Revision 1.43  1997/03/21 18:27:04  fritz
- * Corrected parsing of incoming setup.
- *
- * Revision 1.42  1997/03/05 21:13:18  fritz
- * Bugfix: sndcount was not reset on hangup.
- *
- * Revision 1.41  1997/02/24 23:34:29  fritz
- * Bugfix in Layer1 error-recovery.
- *
- * Revision 1.40  1997/02/23 23:34:45  fritz
- * Minor bugfixes in debugging code.
- *
- * Revision 1.39  1997/02/23 16:21:56  fritz
- * Bugfix: Check for NULL pointer in icn_parse_status().
- *
- * Revision 1.38  1997/02/11 18:29:31  fritz
- * Bugfix in D64S initialization.
- *
- * Revision 1.37  1997/02/10 22:43:20  fritz
- * Added plan and screen elements on ISDN_STAT_ICALL
- *
- * Revision 1.36  1997/02/10 21:31:20  fritz
- * Changed setup-interface (incoming and outgoing).
- *
- * Revision 1.35  1997/02/10 10:10:28  fritz
- * Changes for Kernel 2.1.X compatibility.
- * Enhanced initialization, can recover from
- * misconfiguration by other autoprobing drivers.
- *
- * Revision 1.34  1997/01/29 22:34:44  fritz
- * Cleanup, Corrected D64S setup of 2nd channel.
- *
- * Revision 1.33  1996/12/05 20:31:48  tsbogend
- * added handling of L2: DATA LINK LOST messages
- *
- * Revision 1.32  1996/11/14 23:49:18  fritz
- * Bugfix: copy_to_user/copy_from_user mismatch in debugging-ioctl.
- *
- * Revision 1.31  1996/11/13 02:36:25  fritz
- * Fixed a race condition in writecmd.
- * Some optimizations and cleanup.
- *
- * Revision 1.30  1996/10/22 23:14:09  fritz
- * Changes for compatibility to 2.0.X and 2.1.X kernels.
- *
- * Revision 1.29  1996/08/29 20:34:54  fritz
- * Bugfix in send queue management:
- * sndcount was not updated correctly.
- * Minor Bugfixes.
- *
- * Revision 1.28  1996/06/28 17:02:53  fritz
- * replaced memcpy_fromfs_toio.
- *
- * Revision 1.27  1996/06/25 18:38:59  fritz
- * Fixed function name in error message.
- *
- * Revision 1.26  1996/06/24 17:20:35  fritz
- * Bugfixes in pollbchan_send():
- *   - Using lock field of skbuff breaks networking.
- *   - Added channel locking
- *   - changed dequeuing scheme.
- * Eliminated misc. compiler warnings.
- *
- * Revision 1.25  1996/06/11 22:53:35  tsbogend
- * fixed problem with large array on stack
- * made the driver working on Linux/alpha
- *
- * Revision 1.24  1996/06/06 13:58:33  fritz
- * Changed code to be architecture independent
- *
- * Revision 1.23  1996/06/03 19:59:00  fritz
- * Fixed typos.
- *
- * Revision 1.22  1996/05/17 15:46:41  fritz
- * Removed own queue management.
- * Changed queue management to use sk_buffs.
- *
- * Revision 1.21  1996/05/02 04:01:20  fritz
- * Bugfix:
- *  - icn_addcard() evaluated wrong driverId.
- *
- * Revision 1.20  1996/05/02 00:40:27  fritz
- * Major rewrite to support more than one card
- * with a single module.
- * Support for new firmware.
- *
- * Revision 1.19  1996/04/21 17:43:32  fritz
- * Changes for Support of new Firmware BRV3.02
- *
- * Revision 1.18  1996/04/20 16:50:26  fritz
- * Fixed status-buffer overrun.
- * Misc. typos
- *
- * Revision 1.17  1996/02/11 02:39:04  fritz
- * Increased Buffer for status-messages.
- * Removed conditionals for HDLC-firmware.
- *
- * Revision 1.16  1996/01/22 05:01:55  fritz
- * Revert to GPL.
- *
- * Revision 1.15  1996/01/10 20:57:39  fritz
- * Bugfix: Loading firmware twice caused the device stop working.
- *
- * Revision 1.14  1995/12/18  18:23:37  fritz
- * Support for ICN-2B Cards.
- * Change for supporting user-settable service-octet.
- *
- * Revision 1.13  1995/10/29  21:41:07  fritz
- * Added support for DriverId's, added Jan's patches for Kernel versions.
- *
- * Revision 1.12  1995/04/29  13:07:35  fritz
- * Added support for new Euro-ISDN-firmware
- *
- * Revision 1.11  1995/04/23  13:40:45  fritz
- * Added support for SPV's.
- * Changed Dial-Command to support MSN's on DSS1-Lines.
- *
- * Revision 1.10  1995/03/25  23:23:24  fritz
- * Changed configurable Ports, to allow settings for DIP-Switch Cardversions.
- *
- * Revision 1.9  1995/03/25  23:17:30  fritz
- * Fixed race-condition in pollbchan_send
- *
- * Revision 1.8  1995/03/15  12:49:44  fritz
- * Added support for SPV's
- * Split pollbchan_work for calling send-routine directly
- *
- * Revision 1.7  1995/02/20  03:48:03  fritz
- * Added support of new request_region-function.
- * Minor bugfixes.
- *
- * Revision 1.6  1995/01/31  15:48:45  fritz
- * Added Cause-Messages to be signaled to upper layers.
- * Added Revision-Info on load.
- *
- * Revision 1.5  1995/01/29  23:34:59  fritz
- * Added stopdriver() and appropriate calls.
- * Changed printk-statements to support loglevels.
- *
- * Revision 1.4  1995/01/09  07:40:46  fritz
- * Added GPL-Notice
- *
- * Revision 1.3  1995/01/04  05:15:18  fritz
- * Added undocumented "bootload-finished"-command in download-code
- * to satisfy some brain-damaged icn card-versions.
- *
- * Revision 1.2  1995/01/02  02:14:45  fritz
- * Misc Bugfixes
- *
- * Revision 1.1  1994/12/14  17:56:06  fritz
- * Initial revision
- *
  */
 
 #include "icn.h"
 #undef MAP_DEBUG
 
 static char
-*revision = "$Revision: 1.64 $";
+*revision = "$Revision: 1.65 $";
 
 static int icn_addcard(int, char *, char *);
 
index 6d40a695c434ce472b176321ffd55c67219dacfb..b49887c2aadf5ba403c872c48c4dc7ec767725e3 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: icn.h,v 1.29 1999/09/06 07:29:35 fritz Exp $
+/* $Id: icn.h,v 1.30 2000/11/13 22:51:48 kai Exp $
 
  * ISDN lowlevel-module for the ICN active ISDN-Card.
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Log: icn.h,v $
- * Revision 1.29  1999/09/06 07:29:35  fritz
- * Changed my mail-address.
- *
- * Revision 1.28  1997/10/10 15:56:18  fritz
- * New HL<->LL interface:
- *   New BSENT callback with nr. of bytes included.
- *   Sending without ACK.
- *
- * Revision 1.27  1997/10/01 09:21:56  fritz
- * Removed old compatibility stuff for 2.0.X kernels.
- * From now on, this code is for 2.1.X ONLY!
- * Old stuff is still in the separate branch.
- *
- * Revision 1.26  1997/02/14 12:23:16  fritz
- * Added support for new insmod parameter handling.
- *
- * Revision 1.25  1997/02/10 10:10:31  fritz
- * Changes for Kernel 2.1.X compatibility.
- * Enhanced initialization, can recover from
- * misconfiguration by other autoprobing drivers.
- *
- * Revision 1.24  1997/01/29 22:34:46  fritz
- * Cleanup, Corrected D64S setup of 2nd channel.
- *
- * Revision 1.23  1996/12/17 18:47:55  tsbogend
- * changed timeouts from absolute numbers to HZ based values
- *
- * Revision 1.22  1996/11/13 02:37:33  fritz
- * Added delay include.
- *
- * Revision 1.21  1996/08/29 20:35:57  fritz
- * Speed up B-Channel polling interval.
- *
- * Revision 1.20  1996/06/24 17:20:37  fritz
- * Bugfixes in pollbchan_send():
- *   - Using lock field of skbuff breaks networking.
- *   - Added channel locking
- *   - changed dequeuing scheme.
- * Eliminated misc. compiler warnings.
- *
- * Revision 1.19  1996/06/06 13:58:35  fritz
- * Changed code to be architecture independent
- *
- * Revision 1.18  1996/06/03 19:59:30  fritz
- * Removed include of config.h
- *
- * Revision 1.17  1996/05/18 00:47:04  fritz
- * Removed callback debug code.
- *
- * Revision 1.16  1996/05/17 15:46:43  fritz
- * Removed own queue management.
- * Changed queue management to use sk_buffs.
- *
- * Revision 1.15  1996/05/02 04:01:57  fritz
- * Removed ICN_MAXCARDS
- *
- * Revision 1.14  1996/05/02 00:40:29  fritz
- * Major rewrite to support more than one card
- * with a single module.
- * Support for new firmware.
- *
- * Revision 1.13  1996/04/20 16:51:41  fritz
- * Increased status buffer.
- * Misc. typos
- *
- * Revision 1.12  1996/01/22 05:01:22  fritz
- * Revert to GPL.
- *
- * Revision 1.11  1995/12/18  18:25:00  fritz
- * Support for ICN-2B Cards.
- * Change for supporting user-settable service-octet.
- *
- * Revision 1.10  1995/10/29  21:43:10  fritz
- * Added support for leased lines.
- *
- * Revision 1.9  1995/04/23  13:42:10  fritz
- * Added some constants for distinguishing 1TR6 and DSS1
- *
- * Revision 1.8  1995/03/25  23:18:55  fritz
- * Changed ICN_PORTLEN to reflect correct number of ports.
- *
- * Revision 1.7  1995/03/15  12:52:06  fritz
- * Some cleanup
- *
- * Revision 1.6  1995/02/20  03:49:22  fritz
- * Fixed ICN_MAX_SQUEUE to correctly reflect outstanding bytes, not number
- * of buffers.
- *
- * Revision 1.5  1995/01/29  23:36:50  fritz
- * Minor cleanup.
- *
- * Revision 1.4  1995/01/09  07:41:20  fritz
- * Added GPL-Notice
- *
- * Revision 1.3  1995/01/04  05:14:20  fritz
- * removed include of linux/asm/string.h for compiling with Linux 1.1.76
- *
- * Revision 1.2  1995/01/02  02:15:57  fritz
- * Misc. Bugfixes
- *
- * Revision 1.1  1994/12/14  18:02:38  fritz
- * Initial revision
- *
  */
 
 #ifndef icn_h
index 66b7dfd493aabecd68cc6f0cdf9ecadc4114aa92..5ad0edc6a9eabb9e6a4d57387b708865e73c3b4e 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: isdn_ppp.c,v 1.82 2000/11/02 22:48:30 kai Exp $
+/* $Id: isdn_ppp.c,v 1.84 2000/11/13 22:51:46 kai Exp $
  *
  * Linux ISDN subsystem, functions for synchronous PPP (linklevel).
  *
@@ -83,7 +83,7 @@ static void isdn_ppp_mp_cleanup( isdn_net_local * lp );
 static int isdn_ppp_bundle(struct ippp_struct *, int unit);
 #endif /* CONFIG_ISDN_MPP */
   
-char *isdn_ppp_revision = "$Revision: 1.82 $";
+char *isdn_ppp_revision = "$Revision: 1.84 $";
 
 static struct ippp_struct *ippp_table[ISDN_MAX_CHANNELS];
 
index 9168aca8cbba3c10d9387f5d8f2a18965b96b228..f91723bbe0785c8a598422436b98adc316b028be 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: isdnloop.c,v 1.9 1999/09/06 07:29:36 fritz Exp $
+/* $Id: isdnloop.c,v 1.11 2000/11/13 22:51:50 kai Exp $
 
  * ISDN low-level module implementing a dummy loop driver.
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Log: isdnloop.c,v $
- * Revision 1.9  1999/09/06 07:29:36  fritz
- * Changed my mail-address.
- *
- * Revision 1.8  1998/11/18 18:59:43  armin
- * changes for 2.1.127
- *
- * Revision 1.7  1998/10/30 18:58:03  he
- * typecast to suppress a compiler warning
- *
- * Revision 1.6  1998/06/17 19:51:37  he
- * merged with 2.1.10[34] (cosmetics and udelay() -> mdelay())
- * brute force fix to avoid Ugh's in isdn_tty_write()
- * cleaned up some dead code
- *
- * Revision 1.5  1998/04/14 20:59:32  he
- * merged 2.1.94 changes
- *
- * Revision 1.4  1998/02/24 21:39:05  he
- * L2_PROT_X25DTE / DCE
- * additional state 17 and new internal signal messages "BCON_I"
- * (for reliable connect confirmation primitive as needed by x.25 upper layer)
- * Changes for new LL-HL interface
- *
- * Revision 1.3  1998/02/20 17:33:30  fritz
- * Changes for recent kernels.
- *
- * Revision 1.2  1997/10/01 09:22:03  fritz
- * Removed old compatibility stuff for 2.0.X kernels.
- * From now on, this code is for 2.1.X ONLY!
- * Old stuff is still in the separate branch.
- *
- * Revision 1.1  1997/03/24 23:02:04  fritz
- * Added isdnloop driver.
- *
  */
 
 #include <linux/config.h>
 #include "isdnloop.h"
 
 static char
-*revision = "$Revision: 1.9 $";
+*revision = "$Revision: 1.11 $";
 
 static int isdnloop_addcard(char *);
 
@@ -865,6 +830,7 @@ isdnloop_parse_cmd(isdnloop_card * card)
                        if (card->rcard[ch - 1]) {
                                isdnloop_fake(card->rcard[ch - 1], "BCON_I",
                                              card->rch[ch - 1] + 1);
+                               isdnloop_fake(card, "BCON_C", ch);
                        }
                        break;
                case 17:
index 82266edbe3938b8d33cdae4a005c2a1808fefa23..e0ddaaf36a37529d9f822c7dc6620c3cce14bb61 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: isdnloop.h,v 1.4 1999/09/06 07:29:36 fritz Exp $
+/* $Id: isdnloop.h,v 1.5 2000/11/13 22:51:50 kai Exp $
 
  * Loopback lowlevel module for testing of linklevel.
  *
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Log: isdnloop.h,v $
- * Revision 1.4  1999/09/06 07:29:36  fritz
- * Changed my mail-address.
- *
- * Revision 1.3  1998/04/14 20:59:35  he
- * merged 2.1.94 changes
- *
- * Revision 1.2  1997/10/01 09:22:07  fritz
- * Removed old compatibility stuff for 2.0.X kernels.
- * From now on, this code is for 2.1.X ONLY!
- * Old stuff is still in the separate branch.
- *
- * Revision 1.1  1997/03/24 23:02:05  fritz
- * Added isdnloop driver.
- *
  */
 
 #ifndef isdnloop_h
index d032508acec431b75a3a89ebdab286b72dc7f598..09c11f57da03fc223cd01476268243eb10b33294 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  $Id: debug.c,v 1.4 2000/10/28 23:03:40 kai Exp $
+ *  $Id: debug.c,v 1.5 2000/11/12 15:29:37 kai Exp $
  *  Copyright (C) 1996  SpellCaster Telecommunications Inc.
  *
  *  This program is free software; you can redistribute it and/or modify
index ff67aad62b09c623e9c2c29b544defd0598c1686..4103b0ea58ad2d7ccc67535259096b40aa7fd32e 100644 (file)
@@ -858,13 +858,16 @@ static void compute_parity(struct stripe_head *sh, int method)
 
        PRINTK("compute_parity, stripe %lu, method %d\n", sh->sector, method);
        for (i = 0; i < disks; i++) {
+               char *bdata;
                if (i == pd_idx || !sh->bh_new[i])
                        continue;
                if (!sh->bh_copy[i])
                        sh->bh_copy[i] = raid5_alloc_buffer(sh, sh->size);
                raid5_build_block(sh, sh->bh_copy[i], i);
                atomic_set_buffer_dirty(sh->bh_copy[i]);
-               memcpy(sh->bh_copy[i]->b_data, sh->bh_new[i]->b_data, sh->size);
+               bdata = bh_kmap(sh->bh_new[i]);
+               memcpy(sh->bh_copy[i]->b_data, bdata, sh->size);
+               bh_kunmap(sh->bh_new[i]);
        }
        if (sh->bh_copy[pd_idx] == NULL) {
                sh->bh_copy[pd_idx] = raid5_alloc_buffer(sh, sh->size);
@@ -965,12 +968,14 @@ static void complete_stripe(struct stripe_head *sh)
                        if (!sh->new[i]) {
 #if 0
                                if (sh->cmd == STRIPE_WRITE) {
-                                       if (memcmp(sh->bh_new[i]->b_data, sh->bh_copy[i]->b_data, sh->size)) {
+                                       char *bdata = bh_kmap(sh->bh_new[i]);
+                                       if (memcmp(bdata, sh->bh_copy[i]->b_data, sh->size)) {
                                                printk("copy differs, %s, sector %lu ",
                                                        test_bit(BH_Dirty, &sh->bh_new[i]->b_state) ? "dirty" : "clean",
                                                        sh->sector);
                                        } else if (test_bit(BH_Dirty, &sh->bh_new[i]->b_state))
                                                printk("sector %lu dirty\n", sh->sector);
+                                       bh_kunmap(sh->bh_new[i]);
                                }
 #endif
                                if (sh->cmd == STRIPE_WRITE)
@@ -1136,11 +1141,14 @@ static void handle_stripe_read (mddev_t *mddev , raid5_conf_t *conf,
        if (!method1 || (method1 == 1 && nr_cache == disks - 1)) {
                PRINTK("read %lu completed from cache\n", sh->sector);
                for (i = 0; i < disks; i++) {
+                       char *bdata;
                        if (!sh->bh_new[i])
                                continue;
                        if (!sh->bh_old[i])
                                compute_block(sh, i);
-                       memcpy(sh->bh_new[i]->b_data, sh->bh_old[i]->b_data, sh->size);
+                       bdata = bh_kmap(sh->bh_new[i]);
+                       memcpy(bdata, sh->bh_old[i]->b_data, sh->size);
+                       bh_kunmap(sh->bh_new[i]);
                }
                complete_stripe(sh);
                return;
@@ -1168,7 +1176,9 @@ static void handle_stripe_read (mddev_t *mddev , raid5_conf_t *conf,
                if (!sh->bh_new[i])
                        continue;
                if (sh->bh_old[i]) {
-                       memcpy(sh->bh_new[i]->b_data, sh->bh_old[i]->b_data, sh->size);
+                       char *bdata = bh_kmap(sh->bh_new[i]);
+                       memcpy(bdata, sh->bh_old[i]->b_data, sh->size);
+                       bh_kunmap(sh->bh_new[i]);
                        continue;
                }
 #if RAID5_PARANOIA
index 7714370c9dabae828039cb99241df5feef6c5542..feb72365193f7bdb0c1e1eb6bdf444bf7176d6f8 100644 (file)
@@ -5,7 +5,7 @@
  * PPPoE --- PPP over Ethernet (RFC 2516)
  *
  *
- * Version:    0.6.3
+ * Version:    0.6.4
  *
  * 030700 :     Fixed connect logic to allow for disconnect.
  * 270700 :    Fixed potential SMP problems; we must protect against 
  *             and ppp_unregister_channel.
  * 040800 :    Respect reference count mechanisms on net-devices.
  * 200800 :     fix kfree(skb) in pppoe_rcv (acme)
- *
  *             Module reference count is decremented in the right spot now,
  *             guards against sock_put not actually freeing the sk 
  *             in pppoe_release.
- *
- * 051000 :    Initialization cleanup
+ * 051000 :    Initialization cleanup.
+ * 111100 :    Fix recvmsg.
  *
  * Author:     Michal Ostrowski <mostrows@styx.uwaterloo.ca>
  * Contributors:
@@ -533,13 +532,10 @@ int pppoe_release(struct socket *sock)
        if (po->pppoe_dev)
            dev_put(po->pppoe_dev);
 
-       /* Should also do a queue purge here */
-
        sock_orphan(sk);
        sock->sk = NULL;
 
        skb_queue_purge(&sk->receive_queue);
-
        sock_put(sk);
 
        return error;
@@ -566,7 +562,7 @@ int pppoe_connect(struct socket *sock, struct sockaddr *uservaddr,
        if ((sk->state & PPPOX_CONNECTED) && sp->sa_addr.pppoe.sid)
                goto end;
 
-       /* Check for already disconnected sockets, 
+       /* Check for already disconnected sockets,
           on attempts to disconnect */
        error = -EALREADY;
        if((sk->state & PPPOX_DEAD) && !sp->sa_addr.pppoe.sid )
@@ -590,7 +586,7 @@ int pppoe_connect(struct socket *sock, struct sockaddr *uservaddr,
        /* Don't re-bind if sid==0 */
        if (sp->sa_addr.pppoe.sid != 0) {
                dev = dev_get_by_name(sp->sa_addr.pppoe.dev);
-           
+
                error = -ENODEV;
                if (!dev)
                        goto end;
@@ -726,6 +722,7 @@ int pppoe_ioctl(struct socket *sock, unsigned int cmd,
                if (!relay_po)
                        break;
 
+               sock_put(relay_po->sk);
                sk->state |= PPPOX_RELAY;
                err = 0;
                break;
@@ -757,7 +754,6 @@ int pppoe_sendmsg(struct socket *sock, struct msghdr *m,
        struct pppoe_hdr *ph;
        struct net_device *dev;
        char *start;
-       int copied = 0;
 
        if (sk->dead || !(sk->state & PPPOX_CONNECTED)) {
                error = -ENOTCONN;
@@ -773,6 +769,11 @@ int pppoe_sendmsg(struct socket *sock, struct msghdr *m,
 
        dev = sk->protinfo.pppox->pppoe_dev;
 
+       error = -EMSGSIZE;
+       if(total_len > dev->mtu+dev->hard_header_len)
+               goto end;
+
+
        skb = sock_wmalloc(sk, total_len + dev->hard_header_len + 32,
                           0, GFP_KERNEL);
        if (!skb) {
@@ -793,21 +794,25 @@ int pppoe_sendmsg(struct socket *sock, struct msghdr *m,
        ph = (struct pppoe_hdr *) skb_put(skb, total_len + sizeof(struct pppoe_hdr));
        start = (char *) &ph->tag[0];
 
-       error = copied = memcpy_fromiovec( start, m->msg_iov, m->msg_iovlen);
-       if( error <= 0 )
-           goto end;
+       error = memcpy_fromiovec( start, m->msg_iov, total_len);
+
+       if (error < 0) {
+               kfree_skb(skb);
+               goto end;
+       }
 
+       error = total_len;
        dev->hard_header(skb, dev, ETH_P_PPP_SES,
                         sk->protinfo.pppox->pppoe_pa.remote,
-                        NULL, copied);
+                        NULL, total_len);
 
        memcpy(ph, &hdr, sizeof(struct pppoe_hdr));
 
-       ph->length = htons(copied);
+       ph->length = htons(total_len);
 
        dev_queue_xmit(skb);
 
-end:
+ end:
        release_sock(sk);
        return error;
 }
@@ -1025,7 +1030,7 @@ int __init pppoe_init(void)
        int err = register_pppox_proto(PX_PROTO_OE, &pppoe_proto);
 
        if (err == 0) {
-               printk(KERN_INFO "Registered PPPoE v0.6.3\n");
+               printk(KERN_INFO "Registered PPPoE v0.6.4\n");
 
                dev_add_pack(&pppoes_ptype);
                register_netdevice_notifier(&pppoe_notifier);
index af184f47294f4576efd720bc23f9949caa9d8204..bfb0f57dfd00ac169df564cdb5242ee487a424b1 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: sunhme.c,v 1.100 2000/11/12 10:23:30 davem Exp $
+/* $Id: sunhme.c,v 1.104 2000/11/17 01:40:00 davem Exp $
  * sunhme.c: Sparc HME/BigMac 10/100baseT half/full duplex auto switching,
  *           auto carrier detecting ethernet driver.  Also known as the
  *           "Happy Meal Ethernet" found on SunSwift SBUS cards.
@@ -48,8 +48,8 @@ static char *version =
 #ifndef __sparc_v9__
 #include <asm/io-unit.h>
 #endif
-#include <asm/uaccess.h>
 #endif
+#include <asm/uaccess.h>
 
 #include <asm/pgtable.h>
 #include <asm/irq.h>
@@ -171,6 +171,25 @@ static __inline__ void tx_dump_ring(struct happy_meal *hp)
 #define DEFAULT_IPG2       4 /* For all modes */
 #define DEFAULT_JAMSIZE    4 /* Toe jam */
 
+#ifdef CONFIG_PCI
+/* This happy_pci_ids is declared __initdata because it is only used
+   as an advisory to depmod.  If this is ported to the new PCI interface
+   where it could be referenced at any time due to hot plugging,
+   it should be changed to __devinitdata. */
+
+struct pci_device_id happymeal_pci_ids[] __initdata = {
+       {
+         vendor: PCI_VENDOR_ID_SUN,
+         device: PCI_DEVICE_ID_SUN_HAPPYMEAL,
+         subvendor: PCI_ANY_ID,
+         subdevice: PCI_ANY_ID,
+       },
+       { }                     /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE(pci, happymeal_pci_ids);
+#endif
+
 /* NOTE: In the descriptor writes one _must_ write the address
  *      member _first_.  The card must not be allowed to see
  *      the updated descriptor flags until the address is
@@ -1600,6 +1619,10 @@ static int happy_meal_init(struct happy_meal *hp, int from_irq)
        HMD(("happy_meal_init: old[%08x] bursts<",
             hme_read32(hp, gregs + GREG_CFG)));
 
+#ifndef __sparc__
+       /* It is always PCI and can handle 64byte bursts. */
+       hme_write32(hp, gregs + GREG_CFG, GREG_CFG_BURST64);
+#else
        if ((hp->happy_bursts & DMA_BURST64) &&
            ((hp->happy_flags & HFLAG_PCI) != 0
 #ifdef CONFIG_SBUS
@@ -1633,6 +1656,7 @@ static int happy_meal_init(struct happy_meal *hp, int from_irq)
                HMD(("XXX>"));
                hme_write32(hp, gregs + GREG_CFG, 0);
        }
+#endif /* __sparc__ */
 
        /* Turn off interrupts we do not want to hear. */
        HMD((", enable global interrupts, "));
@@ -2887,8 +2911,10 @@ static int __init happy_meal_pci_init(struct net_device *dev, struct pci_dev *pd
        /* And of course, indicate this is PCI. */
        hp->happy_flags |= HFLAG_PCI;
 
+#ifdef __sparc__
        /* Assume PCI happy meals can handle all burst sizes. */
        hp->happy_bursts = DMA_BURSTBITS;
+#endif
 
        hp->happy_block = (struct hmeal_init_block *)
                pci_alloc_consistent(pdev, PAGE_SIZE, &hp->hblock_dvma);
index f101e25f7f18d6f99a22edb9d038847cb7813535..eaba0cd3415f6a874df71cfd6edbac32ec206ef4 100644 (file)
@@ -17,6 +17,7 @@
  *     History
  *     LAPBETH 001     Jonathan Naylor         Cloned from bpqether.c
  *     2000-10-29      Henner Eisen    lapb_data_indication() return status.
+ *     2000-11-14      Henner Eisen    dev_hold/put, NETDEV_GOING_DOWN support
  */
 
 #include <linux/errno.h>
@@ -80,6 +81,7 @@ static struct lapbethdev {
 /*
  *     Get the ethernet device for a LAPB device
  */
+#if 0
 static __inline__ struct net_device *lapbeth_get_ether_dev(struct net_device *dev)
 {
        struct lapbethdev *lapbeth;
@@ -88,7 +90,7 @@ static __inline__ struct net_device *lapbeth_get_ether_dev(struct net_device *de
 
        return (lapbeth != NULL) ? lapbeth->ethdev : NULL;
 }
-
+#endif
 /*
  *     Get the LAPB device for the ethernet device
  */
@@ -137,6 +139,7 @@ static int lapbeth_check_devices(struct net_device *dev)
                                result = 1;
 
                        unregister_netdev(&lapbeth->axdev);
+                       dev_put(lapbeth->ethdev);
                        kfree(lapbeth);
                }
 
@@ -419,6 +422,7 @@ static int lapbeth_new_device(struct net_device *dev)
                
        memset(lapbeth, 0, sizeof(struct lapbethdev));
        
+       dev_hold(dev);
        lapbeth->ethdev = dev;
 
        lapbeth->ethname[sizeof(lapbeth->ethname)-1] = '\0';
@@ -437,6 +441,7 @@ static int lapbeth_new_device(struct net_device *dev)
        }
 
        if (k == MAXLAPBDEV) {
+               dev_put(dev);
                kfree(lapbeth);
                return -ENODEV;
        }
@@ -446,6 +451,7 @@ static int lapbeth_new_device(struct net_device *dev)
        dev->init = lapbeth_dev_init;
 
        if (register_netdev(dev) != 0) {
+               dev_put(dev);
                kfree(lapbeth);
                 return -EIO;
         }
@@ -499,6 +505,7 @@ static int lapbeth_device_event(struct notifier_block *this,unsigned long event,
                                lapbeth_new_device(dev);
                        break;
 
+               case NETDEV_GOING_DOWN:
                case NETDEV_DOWN:       /* ethernet device closed -> close LAPB interface */
                        if ((dev = lapbeth_get_x25_dev(dev)) != NULL)
                                dev_close(dev);
index f41daa570279a00d5ff1721e15b8ae582d95a072..40ca15bb075bad2e3ce5509513347e6b5cddb134 100644 (file)
@@ -148,7 +148,7 @@ int nubus_proc_detach_device(struct nubus_dev *dev)
        struct proc_dir_entry *e;
 
        if ((e = dev->procdir)) {
-               if (e->count)
+               if (atomic_read(&e->count))
                        return -EBUSY;
                remove_proc_entry(e->name, proc_bus_nubus_dir);
                dev->procdir = NULL;
index 81902c5729df978d3199ee53fa1e342b0092bdf7..049cdcf354565d57a52a24fb9af1af4534b9d268 100644 (file)
@@ -279,7 +279,7 @@ int pci_proc_detach_device(struct pci_dev *dev)
        struct proc_dir_entry *e;
 
        if ((e = dev->procent)) {
-               if (e->count)
+               if (atomic_read(&e->count))
                        return -EBUSY;
                remove_proc_entry(e->name, dev->bus->procdir);
                dev->procent = NULL;
index dc662182357cd43ea29082c9697c6303a2a3fd80..8ecc1221bb663efffbc019171bd56512c838728a 100644 (file)
@@ -36,7 +36,7 @@ static LIST_HEAD(hub_list);           /* List containing all of the hubs (for cleanup) */
 
 static DECLARE_WAIT_QUEUE_HEAD(khubd_wait);
 static int khubd_pid = 0;                      /* PID of khubd */
-static int khubd_running = 0;
+static DECLARE_MUTEX_LOCKED(khubd_exited);
 
 static int usb_get_hub_descriptor(struct usb_device *dev, void *data, int size)
 {
@@ -741,8 +741,6 @@ he_unlock:
 
 static int usb_hub_thread(void *__hub)
 {
-       khubd_running = 1;
-
        lock_kernel();
 
        /*
@@ -762,9 +760,8 @@ static int usb_hub_thread(void *__hub)
        } while (!signal_pending(current));
 
        dbg("usb_hub_thread exiting");
-       khubd_running = 0;
 
-       return 0;
+       up_and_exit(&khubd_exited, 0);
 }
 
 static struct usb_device_id hub_id_table [] = {
@@ -815,18 +812,8 @@ void usb_hub_cleanup(void)
 
        /* Kill the thread */
        ret = kill_proc(khubd_pid, SIGTERM, 1);
-       if (!ret) {
-               /* Wait 10 seconds */
-               int count = 10 * 100;
 
-               while (khubd_running && --count) {
-                       current->state = TASK_INTERRUPTIBLE;
-                       schedule_timeout(1);
-               }
-
-               if (!count)
-                       err("giving up on killing khubd");
-       }
+       down(&khubd_exited);
 
        /*
         * Hub resources are freed for us by usb_deregister. It calls
index ae157d1aceb7ebe1c9ee0a04b42b7b67f9222530..0eb91f3c20b0d1283e9d6df6753ef2abd7013af2 100644 (file)
@@ -211,7 +211,6 @@ static void autofs_read_inode(struct inode *inode)
        inode->i_fop = &autofs_dir_operations;
        inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO;
        inode->i_nlink = 2;
-       inode->i_size = 0;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
        inode->i_blocks = 0;
        inode->i_blksize = 1024;
index 67962d5dcc5b66170b14dfc199791e902b062f82..5c412e301f99ee40f3af755e73d3917f2dd56381 100644 (file)
@@ -2250,7 +2250,6 @@ static void devfs_read_inode (struct inode *inode)
        printk ("%s: read_inode(%d): VFS inode: %p  devfs_entry: %p\n",
                DEVFS_NAME, (int) inode->i_ino, inode, de);
 #endif
-    inode->i_size = 0;
     inode->i_blocks = 0;
     inode->i_blksize = 1024;
     inode->i_op = &devfs_iops;
@@ -2416,11 +2415,6 @@ static int devfs_readdir (struct file *file, void *dirent, filldir_t filldir)
     struct devfs_entry *parent, *de;
     struct inode *inode = file->f_dentry->d_inode;
 
-    if (inode == NULL)
-    {
-       printk ("%s: readdir(): NULL inode\n", DEVFS_NAME);
-       return -EBADF;
-    }
     if ( !S_ISDIR (inode->i_mode) )
     {
        printk ("%s: readdir(): inode is not a directory\n", DEVFS_NAME);
index ef1f15016f3622f3bd2f05c98970a48885e2f6b7..1bcd12ceb2e1c7524e85e2f0e07df3af598c3802 100644 (file)
@@ -679,8 +679,6 @@ restart:
                if (!filp->f_dentry)
                        continue;
                inode = filp->f_dentry->d_inode;
-               if (!inode)
-                       continue;
                if (filp->f_mode & FMODE_WRITE && dqinit_needed(inode, type)) {
                        file_list_unlock();
                        sb->dq_op->initialize(inode, type);
index ac64b8aeb3202e8b3a4ebb534f48047f12aee226..9bba7a2cbfa25bb649f08791944d3dff308ed6c0 100644 (file)
@@ -28,9 +28,6 @@ static int efs_readdir(struct file *filp, void *dirent, filldir_t filldir) {
        int                     slot, namelen;
        char                    *nameptr;
 
-       if (!inode || !S_ISDIR(inode->i_mode))
-               return -EBADF;
-
        if (inode->i_size & (EFS_DIRBSIZE-1))
                printk(KERN_WARNING "EFS: WARNING: readdir(): directory size not a multiple of EFS_DIRBSIZE\n");
 
index aed45096d6bdb956adb47e3fa946e91da9856340..7537ee5693b1f825d7a41e5530dfcb8e961d1d5a 100644 (file)
@@ -794,7 +794,6 @@ static void fat_fill_inode(struct inode *inode, struct msdos_dir_entry *de)
                        inode->i_nlink = 1;
                }
 #endif
-               inode->i_size = 0;
                if ((nr = MSDOS_I(inode)->i_start) != 0)
                        while (nr != -1) {
                                inode->i_size += SECTOR_SIZE*sbi->cluster_size;
@@ -818,7 +817,6 @@ static void fat_fill_inode(struct inode *inode, struct msdos_dir_entry *de)
                                (CF_LE_W(de->starthi) << 16);
                }
                MSDOS_I(inode)->i_logstart = MSDOS_I(inode)->i_start;
-               inode->i_nlink = 1;
                inode->i_size = CF_LE_L(de->size);
                inode->i_op = &fat_file_inode_operations;
                inode->i_fop = &fat_file_operations;
index 931314661e61a48c08fe97c2637940617841e45f..09b28574dc266581ca400716e2b46bcc4be835c3 100644 (file)
@@ -176,10 +176,13 @@ int fs_may_remount_ro(struct super_block *sb)
        file_list_lock();
        for (p = sb->s_files.next; p != &sb->s_files; p = p->next) {
                struct file *file = list_entry(p, struct file, f_list);
-               struct inode *inode = file->f_dentry->d_inode;
-               if (!inode)
+               struct inode *inode;
+
+               if (!file->f_dentry)
                        continue;
 
+               inode = file->f_dentry->d_inode;
+
                /* File with pending delete? */
                if (inode->i_nlink == 0)
                        goto too_bad;
index 8d77ed2f7483f017db2d085b0ddc5de73d6ca6d9..c9915cf809a02145b9f22c2e6027336742dcb716 100644 (file)
@@ -40,14 +40,17 @@ struct inode_operations isofs_dir_inode_operations =
        lookup:         isofs_lookup,
 };
 
-static int isofs_name_translate(char * old, int len, char * new)
+int isofs_name_translate(struct iso_directory_record *de, char *new, struct inode *inode)
 {
-       int i, c;
+       char * old = de->name;
+       int len = de->name_len[0];
+       int i;
                        
        for (i = 0; i < len; i++) {
-               c = old[i];
+               unsigned char c = old[i];
                if (!c)
                        break;
+
                if (c >= 'A' && c <= 'Z')
                        c |= 0x20;      /* lower case */
 
@@ -74,8 +77,7 @@ int get_acorn_filename(struct iso_directory_record * de,
 {
        int std;
        unsigned char * chr;
-       int retnamlen = isofs_name_translate(de->name,
-                               de->name_len[0], retname);
+       int retnamlen = isofs_name_translate(de, retname, inode);
        if (retnamlen == 0) return 0;
        std = sizeof(struct iso_directory_record) + de->name_len[0];
        if (std & 1) std++;
@@ -94,14 +96,6 @@ int get_acorn_filename(struct iso_directory_record * de,
        return retnamlen;
 }
 
-static struct buffer_head *isofs_bread(struct inode *inode, unsigned int bufsize, unsigned int block)
-{
-       unsigned int blknr = isofs_bmap(inode, block);
-       if (!blknr)
-               return NULL;
-       return bread(inode->i_dev, blknr, bufsize);
-}
-
 /*
  * This should _really_ be cleaned up some day..
  */
@@ -138,12 +132,9 @@ static int do_isofs_readdir(struct inode *inode, struct file *filp,
                }
 
                de = (struct iso_directory_record *) (bh->b_data + offset);
-               if (first_de) inode_number = (bh->b_blocknr << bufbits) + (offset & (bufsize - 1));
+               if (first_de) inode_number = (bh->b_blocknr << bufbits) + offset;
 
                de_len = *(unsigned char *) de;
-#ifdef DEBUG
-               printk("de_len = %d\n", de_len);
-#endif     
 
                /* If the length byte is zero, we should move on to the next
                   CDROM sector.  If we are at the end of the directory, we
@@ -152,32 +143,29 @@ static int do_isofs_readdir(struct inode *inode, struct file *filp,
                if (de_len == 0) {
                        brelse(bh);
                        bh = NULL;
-                       filp->f_pos = ((filp->f_pos & ~(ISOFS_BLOCK_SIZE - 1)) + ISOFS_BLOCK_SIZE);
+                       filp->f_pos = (filp->f_pos + ISOFS_BLOCK_SIZE) & ~(ISOFS_BLOCK_SIZE - 1);
                        block = filp->f_pos >> bufbits;
                        offset = 0;
                        continue;
                }
 
                offset += de_len;
-               if (offset == bufsize) {
-                       offset = 0;
-                       block++;
-                       brelse(bh);
-                       bh = NULL;
-               }
 
                /* Make sure we have a full directory entry */
-               if (offset > bufsize) {
+               if (offset >= bufsize) {
                        int slop = bufsize - offset + de_len;
                        memcpy(tmpde, de, slop);
                        offset &= bufsize - 1;
                        block++;
                        brelse(bh);
-                       bh = isofs_bread(inode, bufsize, block);
-                       if (!bh)
-                               return 0;
-                       memcpy((void *) tmpde + slop, bh->b_data, de_len - slop);
-                       de = tmpde;
+                       bh = NULL;
+                       if (offset) {
+                               bh = isofs_bread(inode, bufsize, block);
+                               if (!bh)
+                                       return 0;
+                               memcpy((void *) tmpde + slop, bh->b_data, offset);
+                       }
+                       de = tmpde;                             
                }
 
                if (de->flags[-high_sierra] & 0x80) {
@@ -227,7 +215,7 @@ static int do_isofs_readdir(struct inode *inode, struct file *filp,
                if (map) {
 #ifdef CONFIG_JOLIET
                        if (inode->i_sb->u.isofs_sb.s_joliet_level) {
-                               len = get_joliet_filename(de, inode, tmpname);
+                               len = get_joliet_filename(de, tmpname, inode);
                                p = tmpname;
                        } else
 #endif
@@ -236,8 +224,7 @@ static int do_isofs_readdir(struct inode *inode, struct file *filp,
                                p = tmpname;
                        } else
                        if (inode->i_sb->u.isofs_sb.s_mapping == 'n') {
-                               len = isofs_name_translate(de->name,
-                                       de->name_len[0], tmpname);
+                               len = isofs_name_translate(de, tmpname, inode);
                                p = tmpname;
                        } else {
                                p = de->name;
@@ -252,7 +239,7 @@ static int do_isofs_readdir(struct inode *inode, struct file *filp,
 
                continue;
        }
-       brelse(bh);
+       if (bh) brelse(bh);
        return 0;
 }
 
index 157b8ebbab4d8b71ca8bb80f020386bb6d7df6f1..453e4a456c368c303d90464a89edb0229fb0c524 100644 (file)
@@ -972,14 +972,24 @@ int isofs_bmap(struct inode *inode, int block)
        return 0;
 }
 
+struct buffer_head *isofs_bread(struct inode *inode, unsigned int bufsize, unsigned int block)
+{
+       unsigned int blknr = isofs_bmap(inode, block);
+       if (!blknr)
+               return NULL;
+       return bread(inode->i_dev, blknr, bufsize);
+}
+
 static int isofs_readpage(struct file *file, struct page *page)
 {
        return block_read_full_page(page,isofs_get_block);
 }
+
 static int _isofs_bmap(struct address_space *mapping, long block)
 {
        return generic_block_bmap(mapping,block,isofs_get_block);
 }
+
 static struct address_space_operations isofs_aops = {
        readpage: isofs_readpage,
        sync_page: block_sync_page,
@@ -1002,93 +1012,89 @@ static inline void test_and_set_gid(gid_t *p, gid_t value)
 
 static int isofs_read_level3_size(struct inode * inode)
 {
-       unsigned long ino = inode->i_ino;
+       unsigned long f_pos = inode->i_ino;
        unsigned long bufsize = ISOFS_BUFFER_SIZE(inode);
        int high_sierra = inode->i_sb->u.isofs_sb.s_high_sierra;
        struct buffer_head * bh = NULL;
-       int block = 0;
+       unsigned long block, offset;
        int i = 0;
        int more_entries = 0;
-       void *cpnt;
-       struct iso_directory_record * raw_inode;
+       struct iso_directory_record * tmpde = kmalloc(256, GFP_KERNEL);
+
+       if (!tmpde)
+               return -ENOMEM;
 
        inode->i_size = 0;
        inode->u.isofs_i.i_next_section_ino = 0;
+
+       block = f_pos >> ISOFS_BUFFER_BITS(inode);
+       offset = f_pos & (bufsize-1);
+
        do {
-               unsigned char *pnt;
-               unsigned int reclen;
-               int offset = (ino & (bufsize - 1));
-
-               cpnt = NULL;
-               /* Check whether to update our buffer */
-               if (block != ino >> ISOFS_BUFFER_BITS(inode)) {
-                       block = ino >> ISOFS_BUFFER_BITS(inode);
-                       brelse(bh);
+               struct iso_directory_record * de;
+               unsigned int de_len;
+
+               if (!bh) {
                        bh = bread(inode->i_dev, block, bufsize);
                        if (!bh)
                                goto out_noread;
                }
-               pnt = ((unsigned char *) bh->b_data + offset);
-               /*
-                * Note: this is invariant even if the record
-                * spans buffers and must be copied ...
-                */
-               reclen = *pnt;
+               de = (struct iso_directory_record *) (bh->b_data + offset);
+               de_len = *(unsigned char *) de;
 
-               /* N.B. this test doesn't trigger the i++ code ... */   
-               if(reclen == 0) {
-                       ino = (ino & ~(ISOFS_BLOCK_SIZE - 1)) + ISOFS_BLOCK_SIZE;
+               if (de_len == 0) {
+                       brelse(bh);
+                       bh = NULL;
+                       f_pos = (f_pos + ISOFS_BLOCK_SIZE) & ~(ISOFS_BLOCK_SIZE - 1);
+                       block = f_pos >> ISOFS_BUFFER_BITS(inode);
+                       offset = 0;
                        continue;
                }
-               raw_inode = ((struct iso_directory_record *) pnt);
-
-               /* Check whether the raw inode spans the buffer ... */  
-               if (offset + reclen > bufsize){
-                       int frag1 = bufsize - offset;
-       
-                       cpnt = kmalloc(reclen, GFP_KERNEL);
-                       if (cpnt == NULL)
-                               goto out_nomem;
-                       memcpy(cpnt, pnt, frag1);
+
+               offset += de_len;
+
+               /* Make sure we have a full directory entry */
+               if (offset >= bufsize) {
+                       int slop = bufsize - offset + de_len;
+                       memcpy(tmpde, de, slop);
+                       offset &= bufsize - 1;
+                       block++;
                        brelse(bh);
-                       bh = bread(inode->i_dev, ++block, bufsize);
-                       if (!bh)
-                               goto out_noread;
-                       offset += reclen - bufsize;
-                       memcpy((char *)cpnt+frag1, bh->b_data, offset);
-                       raw_inode = ((struct iso_directory_record *) cpnt);
+                       bh = NULL;
+                       if (offset) {
+                               bh = bread(inode->i_dev, block, bufsize);
+                               if (!bh)
+                                       goto out_noread;
+                               memcpy((void *) tmpde + slop, bh->b_data, offset);
+                       }
+                       de = tmpde;
                }
 
-               inode->i_size += isonum_733 (raw_inode->size);
-               if(i == 1) inode->u.isofs_i.i_next_section_ino = ino;
+               inode->i_size += isonum_733(de->size);
+               if (i == 1)
+                       inode->u.isofs_i.i_next_section_ino = f_pos;
 
-               more_entries = raw_inode->flags[-high_sierra] & 0x80;
+               more_entries = de->flags[-high_sierra] & 0x80;
 
-               ino += reclen;
-               if (cpnt)
-                       kfree (cpnt);
+               f_pos += de_len;
                i++;
                if(i > 100)
                        goto out_toomany;
        } while(more_entries);
 out:
-       brelse(bh);
+       kfree(tmpde);
+       if (bh) brelse(bh);
        return 0;
 
-out_nomem:
-       printk(KERN_INFO "ISOFS: NoMem ISO inode %lu\n", inode->i_ino);
-       brelse(bh);
-       return 1;
 out_noread:
-       printk(KERN_INFO "ISOFS: unable to read i-node block %d\n", block);
-       if (cpnt)
-               kfree(cpnt);
+       printk(KERN_INFO "ISOFS: unable to read i-node block %lu\n", block);
+       kfree(tmpde);
        return 1;
 out_toomany:
        printk(KERN_INFO "isofs_read_level3_size: "
                "More than 100 file sections ?!?, aborting...\n"
                "isofs_read_level3_size: inode=%lu ino=%lu\n",
-               inode->i_ino, ino);
+               inode->i_ino, f_pos);
        goto out;
 }
 
@@ -1259,143 +1265,6 @@ static void isofs_read_inode(struct inode * inode)
        return;
 }
 
-/* There are times when we need to know the inode number of a parent of
-   a particular directory.  When control passes through a routine that
-   has access to the parent information, it fills it into the inode structure,
-   but sometimes the inode gets flushed out of the queue, and someone
-   remembers the number.  When they try to open up again, we have lost
-   the information.  The '..' entry on the disc points to the data area
-   for a particular inode, so we can follow these links back up, but since
-   we do not know the inode number, we do not actually know how large the
-   directory is.  The disc is almost always correct, and there is
-   enough error checking on the drive itself, but an open ended search
-   makes me a little nervous.
-
-   The BSD iso filesystem uses the extent number for an inode, and this
-   would work really nicely for us except that the read_inode function
-   would not have any clean way of finding the actual directory record
-   that goes with the file.  If we had such info, then it would pay
-   to change the inode numbers and eliminate this function.
-*/
-
-int isofs_lookup_grandparent(struct inode * parent, int extent)
-{
-       unsigned long bufsize = ISOFS_BUFFER_SIZE(parent);
-       unsigned char bufbits = ISOFS_BUFFER_BITS(parent);
-       unsigned int block,offset;
-       int parent_dir, inode_number;
-       int result;
-       int directory_size;
-       struct buffer_head * bh;
-       struct iso_directory_record * de;
-
-       offset = 0;
-       block = extent << (ISOFS_ZONE_BITS(parent) - bufbits);
-       if (!(bh = bread(parent->i_dev, block, bufsize)))  return -1;
-
-       while (1 == 1) {
-               de = (struct iso_directory_record *) (bh->b_data + offset);
-               if (*((unsigned char *) de) == 0)
-               {
-                       brelse(bh);
-                       printk("Directory .. not found\n");
-                       return -1;
-               }
-
-               offset += *((unsigned char *) de);
-
-               if (offset >= bufsize)
-               {
-                       printk(".. Directory not in first block"
-                              " of directory.\n");
-                       brelse(bh);
-                       return -1;
-               }
-
-               if (de->name_len[0] == 1 && de->name[0] == 1)
-               {
-                       parent_dir = find_rock_ridge_relocation(de, parent);
-                       directory_size = isonum_733 (de->size);
-                       brelse(bh);
-                       break;
-               }
-       }
-#ifdef DEBUG
-       printk("Parent dir:%x\n",parent_dir);
-#endif
-       /* Now we know the extent where the parent dir starts on. */
-
-       result = -1;
-
-       offset = 0;
-       block = parent_dir << (ISOFS_ZONE_BITS(parent) - bufbits);
-       if (!block || !(bh = bread(parent->i_dev,block, bufsize)))
-       {
-               return -1;
-       }
-
-       for(;;)
-       {
-               de = (struct iso_directory_record *) (bh->b_data + offset);
-               inode_number = (block << bufbits)+(offset & (bufsize - 1));
-
-               /* If the length byte is zero, we should move on to the next
-                  CDROM sector.  If we are at the end of the directory, we
-                  kick out of the while loop. */
-
-               if ((*((unsigned char *) de) == 0) || (offset == bufsize) )
-               {
-                       brelse(bh);
-                       offset = 0;
-                       block++;
-                       directory_size -= bufsize;
-                       if(directory_size < 0) return -1;
-                       if((block & 1) && (ISOFS_ZONE_BITS(parent) - bufbits) == 1)
-                       {
-                               return -1;
-                       }
-                       if((block & 3) && (ISOFS_ZONE_BITS(parent) - bufbits) == 2)
-                       {
-                               return -1;
-                       }
-                       if (!block
-                           || !(bh = bread(parent->i_dev,block, bufsize)))
-                       {
-                               return -1;
-                       }
-                       continue;
-               }
-
-               /* Make sure that the entire directory record is in the current
-                  bh block.  If not, we malloc a buffer, and put the two
-                  halves together, so that we can cleanly read the block.  */
-
-               offset += *((unsigned char *) de);
-
-               if (offset > bufsize)
-               {
-                       printk("Directory overrun\n");
-                       goto out;
-               }
-
-               if (find_rock_ridge_relocation(de, parent) == extent){
-                       result = inode_number;
-                       goto out;
-               }
-
-       }
-
-       /* We go here for any condition we cannot handle.
-          We also drop through to here at the end of the directory. */
-
- out:
-       brelse(bh);
-#ifdef DEBUG
-       printk("Resultant Inode %d\n",result);
-#endif
-       return result;
-}
-
 #ifdef LEAK_CHECK
 #undef malloc
 #undef free_s
index 009314a824165b3c3a534d26d66d679b7e172275..5b93f458154b6a8d25a1ae14de13e85a8b62d125 100644 (file)
@@ -70,8 +70,7 @@ wcsntombs_be(__u8 *s, const __u8 *pwcs, int inlen, int maxlen)
 }
 
 int
-get_joliet_filename(struct iso_directory_record * de, struct inode * inode,
-                   unsigned char *outname)
+get_joliet_filename(struct iso_directory_record * de, unsigned char *outname, struct inode * inode)
 {
        unsigned char utf8;
        struct nls_table *nls;
index 7d4ca4e980885913fd3ea4a339a10fadea74a8ca..c5d64240c4540debd06ad2bade6975211132f099 100644 (file)
@@ -57,147 +57,87 @@ isofs_cmp(struct dentry * dentry, const char * compare, int dlen)
  * itself (as an inode number). It does NOT read the inode of the
  * entry - you'll have to do that yourself if you want to.
  */
-static struct buffer_head *
-isofs_find_entry(struct inode *dir, struct dentry *dentry, unsigned long *ino)
+static unsigned long
+isofs_find_entry(struct inode *dir, struct dentry *dentry,
+       char * tmpname, struct iso_directory_record * tmpde)
 {
+       unsigned long inode_number;
        unsigned long bufsize = ISOFS_BUFFER_SIZE(dir);
        unsigned char bufbits = ISOFS_BUFFER_BITS(dir);
-       unsigned int block, i, f_pos, offset, 
-               inode_number = 0; /* shut gcc up */
-       struct buffer_head * bh , * retval = NULL;
-       unsigned int old_offset;
-       int dlen, match;
-       char * dpnt;
-       unsigned char *page = NULL;
-       struct iso_directory_record * de = NULL; /* shut gcc up */
-       char de_not_in_buf = 0;   /* true if de is in kmalloc'd memory */
-       char c;
-
-       *ino = 0;
-       
-       if (!(block = dir->u.isofs_i.i_first_extent)) return NULL;
+       unsigned int block, f_pos, offset;
+       struct buffer_head * bh = NULL;
+
+       if (!dir->u.isofs_i.i_first_extent)
+               return 0;
   
        f_pos = 0;
-
-       offset = f_pos & (bufsize - 1);
-       block = isofs_bmap(dir,f_pos >> bufbits);
-
-       if (!block || !(bh = bread(dir->i_dev,block,bufsize))) return NULL;
+       offset = 0;
+       block = 0;
 
        while (f_pos < dir->i_size) {
+               struct iso_directory_record * de;
+               int de_len, match, i, dlen;
+               char *dpnt;
 
-               /* if de is in kmalloc'd memory, do not point to the
-                   next de, instead we will move to the next sector */
-               if(!de_not_in_buf) {
-                       de = (struct iso_directory_record *) 
-                               (bh->b_data + offset);
+               if (!bh) {
+                       bh = isofs_bread(dir, bufsize, block);
+                       if (!bh)
+                               return 0;
                }
-               inode_number = (block << bufbits) + (offset & (bufsize - 1));
-
-               /* If byte is zero, or we had to fetch this de past
-                  the end of the buffer, this is the end of file, or
-                  time to move to the next sector. Usually 2048 byte
-                  boundaries. */
-               
-               if (*((unsigned char *) de) == 0 || de_not_in_buf) {
-                       if(de_not_in_buf) {
-                               /* james@bpgc.com: Since we slopped
-                                   past the end of the last buffer, we
-                                   must start some way into the new
-                                   one */
-                               de_not_in_buf = 0;
-                               kfree(de);
-                               f_pos += offset;
-                       }
-                       else { 
-                               offset = 0;
-                               f_pos = ((f_pos & ~(ISOFS_BLOCK_SIZE - 1))
-                                        + ISOFS_BLOCK_SIZE);
-                       }
-                       brelse(bh);
-                       bh = NULL;
-
-                       if (f_pos >= dir->i_size) 
-                               break;
 
-                       block = isofs_bmap(dir,f_pos>>bufbits);
-                       if (!block || !(bh = bread(dir->i_dev,block,bufsize)))
-                               break;
+               de = (struct iso_directory_record *) (bh->b_data + offset);
+               inode_number = (bh->b_blocknr << bufbits) + offset;
 
-                       continue; /* Will kick out if past end of directory */
+               de_len = *(unsigned char *) de;
+               if (!de_len) {
+                       brelse(bh);
+                       bh = NULL;
+                       f_pos = (f_pos + ISOFS_BLOCK_SIZE) & ~(ISOFS_BLOCK_SIZE - 1);
+                       block = f_pos >> bufbits;
+                       offset = 0;
+                       continue;
                }
 
-               old_offset = offset;
-               offset += *((unsigned char *) de);
-               f_pos += *((unsigned char *) de);
+               offset += de_len;
+               f_pos += de_len;
 
-               /* james@bpgc.com: new code to handle case where the
-                  directory entry spans two blocks.  Usually 1024
-                  byte boundaries */
+               /* Make sure we have a full directory entry */
                if (offset >= bufsize) {
-                       struct buffer_head *bh_next;
-
-                       /* james@bpgc.com: read the next block, and
-                           copy the split de into a newly kmalloc'd
-                           buffer */
-                       block = isofs_bmap(dir,f_pos>>bufbits);
-                       if (!block || 
-                           !(bh_next = bread(dir->i_dev,block,bufsize)))
-                               break;
-                       
-                       de = (struct iso_directory_record *)
-                               kmalloc(offset - old_offset, GFP_KERNEL);
-                       memcpy((char *)de, bh->b_data + old_offset, 
-                              bufsize - old_offset);
-                       memcpy((char *)de + bufsize - old_offset,
-                              bh_next->b_data, offset - bufsize);
-                       brelse(bh_next);
-                       de_not_in_buf = 1;
-                       offset -= bufsize;
+                       int slop = bufsize - offset + de_len;
+                       memcpy(tmpde, de, slop);
+                       offset &= bufsize - 1;
+                       block++;
+                       brelse(bh);
+                       bh = NULL;
+                       if (offset) {
+                               bh = isofs_bread(dir, bufsize, block);
+                               if (!bh)
+                                       return 0;
+                               memcpy((void *) tmpde + slop, bh->b_data, offset);
+                       }
+                       de = tmpde;
                }
+
                dlen = de->name_len[0];
                dpnt = de->name;
 
-               if (dir->i_sb->u.isofs_sb.s_rock ||
-                   dir->i_sb->u.isofs_sb.s_joliet_level || 
-                   dir->i_sb->u.isofs_sb.s_mapping == 'n' ||
-                   dir->i_sb->u.isofs_sb.s_mapping == 'a') {
-                       if (! page) {
-                               page = (unsigned char *)
-                                       __get_free_page(GFP_KERNEL);
-                               if (!page) break;
-                       }
-               }
                if (dir->i_sb->u.isofs_sb.s_rock &&
-                   ((i = get_rock_ridge_filename(de, page, dir)))) {
+                   ((i = get_rock_ridge_filename(de, tmpname, dir)))) {
                        dlen = i;
-                       dpnt = page;
+                       dpnt = tmpname;
 #ifdef CONFIG_JOLIET
                } else if (dir->i_sb->u.isofs_sb.s_joliet_level) {
-                       dlen = get_joliet_filename(de, dir, page);
-                       dpnt = page;
+                       dlen = get_joliet_filename(de, dir, tmpname);
+                       dpnt = tmpname;
 #endif
                } else if (dir->i_sb->u.isofs_sb.s_mapping == 'a') {
-                       dlen = get_acorn_filename(de, page, dir);
-                       dpnt = page;
+                       dlen = get_acorn_filename(de, tmpname, dir);
+                       dpnt = tmpname;
                } else if (dir->i_sb->u.isofs_sb.s_mapping == 'n') {
-                       for (i = 0; i < dlen; i++) {
-                               c = dpnt[i];
-                               /* lower case */
-                               if (c >= 'A' && c <= 'Z') c |= 0x20;
-                               if (c == ';' && i == dlen-2 && dpnt[i+1] == '1') {
-                                       dlen -= 2;
-                                       break;
-                               }
-                               if (c == ';') c = '.';
-                               page[i] = c;
-                       }
-                       /* This allows us to match with and without
-                        * a trailing period. */
-                       if(page[dlen-1] == '.' && dentry->d_name.len == dlen-1)
-                               dlen--;
-                       dpnt = page;
+                       dlen = isofs_name_translate(de, tmpname, dir);
+                       dpnt = tmpname;
                }
+
                /*
                 * Skip hidden or associated files unless unhide is set 
                 */
@@ -208,43 +148,32 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry, unsigned long *ino)
                        match = (isofs_cmp(dentry,dpnt,dlen) == 0);
                }
                if (match) {
-                       if(inode_number == -1) {
-                               /* Should only happen for the '..' entry */
-                               inode_number = 
-                                       isofs_lookup_grandparent(dir,
-                                          find_rock_ridge_relocation(de,dir));
-                       }
-                       *ino = inode_number;
-                       retval = bh;
-                       bh = NULL;
-                       break;
+                       if (bh) brelse(bh);
+                       return inode_number;
                }
        }
-       if (page) free_page((unsigned long) page);
        if (bh) brelse(bh);
-       if(de_not_in_buf) 
-               kfree(de);
-       return retval;
+       return 0;
 }
 
 struct dentry *isofs_lookup(struct inode * dir, struct dentry * dentry)
 {
        unsigned long ino;
-       struct buffer_head * bh;
        struct inode *inode;
+       struct page *page;
 
 #ifdef DEBUG
        printk("lookup: %x %s\n",dir->i_ino, dentry->d_name.name);
 #endif
        dentry->d_op = dir->i_sb->s_root->d_op;
 
-       bh = isofs_find_entry(dir, dentry, &ino);
+       page = alloc_page(GFP_USER);
+       ino = isofs_find_entry(dir, dentry, page_address(page), 1024 + page_address(page));
+       __free_page(page);
 
        inode = NULL;
-       if (bh) {
-               brelse(bh);
-
-               inode = iget(dir->i_sb,ino);
+       if (ino) {
+               inode = iget(dir->i_sb, ino);
                if (!inode)
                        return ERR_PTR(-EACCES);
        }
index 9ea3cafdb1cc6a96783e82ad145630f6b6fe8e26..f61005aaca616b0cd3f65d90de58c85541afe1de 100644 (file)
@@ -349,7 +349,6 @@ jffs_new_inode(const struct inode * dir, struct jffs_raw_inode *raw_inode,
        inode->i_blksize = PAGE_SIZE;
        inode->i_blocks = (inode->i_size + 511) >> 9;
        inode->i_version = 0;
-       inode->i_flags = sb->s_flags;
        inode->u.generic_ip = (void *)jffs_find_file(c, raw_inode->ino);
 
        insert_inode_hash(inode);
index d3706c05e8e888f119ab565c4a1f109c161b270a..09e88d7bad7727bb332a400b2e2d8a646b3654a9 100644 (file)
@@ -3054,9 +3054,8 @@ jffs_garbage_collect_thread(void *ptr)
                        case SIGKILL:
                                D1(printk("jffs_garbage_collect_thread(): SIGKILL received.\n"));
                                c->gc_task = NULL;
-                               up(&c->gc_thread_sem);
                                unlock_kernel();
-                               return(0);
+                               up_and_exit(&c->gc_thread_sem, 0);
                        }
                }
 
index 026dc7e1039bd0ee18d1880e88054270bd87898b..c0d1abc36e57ee6f581648a3b98406fc1c95a495 100644 (file)
@@ -1381,7 +1381,10 @@ asmlinkage long sys_rmdir(const char * pathname)
                case LAST_DOTDOT:
                        error = -ENOTEMPTY;
                        goto exit1;
-               case LAST_ROOT: case LAST_DOT:
+               case LAST_DOT:
+                       error = -EINVAL;
+                       goto exit1;
+               case LAST_ROOT:
                        error = -EBUSY;
                        goto exit1;
        }
index 139c9262de1defcba7fc78b331efea09caf3ba01..ac4de2b832b39f69b0134d672a98066eb7c4bec8 100644 (file)
@@ -120,11 +120,6 @@ ncp_file_read(struct file *file, char *buf, size_t count, loff_t *ppos)
        DPRINTK("ncp_file_read: enter %s/%s\n",
                dentry->d_parent->d_name.name, dentry->d_name.name);
 
-       error = -EINVAL;
-       if (inode == NULL) {
-               DPRINTK("ncp_file_read: inode = NULL\n");
-               goto out;
-       }
        error = -EIO;
        if (!ncp_conn_valid(NCP_SERVER(inode)))
                goto out;
@@ -210,10 +205,6 @@ ncp_file_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
 
        DPRINTK("ncp_file_write: enter %s/%s\n",
                dentry->d_parent->d_name.name, dentry->d_name.name);
-       if (inode == NULL) {
-               DPRINTK("ncp_file_write: inode = NULL\n");
-               return -EINVAL;
-       }
        errno = -EIO;
        if (!ncp_conn_valid(NCP_SERVER(inode)))
                goto out;
index fee191bd7612617a6e79806eac359f007d707ced..5b582024ef94d421470743cacef9ccb1c4bff206 100644 (file)
@@ -723,7 +723,6 @@ nfs_fhget(struct dentry *dentry, struct nfs_fh *fhandle,
                struct inode *inode = new_inode(sb);
                if (!inode)
                        goto out;
-               inode->i_flags = 0;
                inode->i_ino = nfs_fattr_to_ino_t(fattr);
                nfs_read_inode(inode);
                nfs_fill_inode(inode, fattr);
index 910ffe095030d06d4a525c3671d4f0adc92263d4..3fdc84ed131bd3c40457a61f929dea50e6f9ce74 100644 (file)
@@ -1050,7 +1050,7 @@ ntfs_clear_bit (unsigned char *byte, int bit)
 
 /* We have to skip the 16 metafiles and the 8 reserved entries */
 static int 
-new_inode (ntfs_volume* vol,int* result)
+ntfs_new_inode (ntfs_volume* vol,int* result)
 {
        int byte,error;
        int bit;
@@ -1236,11 +1236,11 @@ int ntfs_alloc_inode (ntfs_inode *dir, ntfs_inode *result,
        ntfs_volume* vol=dir->vol;
        int byte,bit;
 
-       error=new_inode (vol,&(result->i_number));
+       error=ntfs_new_inode (vol,&(result->i_number));
        if(error==ENOSPC){
                error=ntfs_extend_mft(vol);
                if(error)return error;
-               error=new_inode(vol,&(result->i_number));
+               error=ntfs_new_inode(vol,&(result->i_number));
        }
        if(error){
                ntfs_error ("ntfs_get_empty_inode: no free inodes\n");
index 0dd6e60634026e47bbbdfaa02b5fd34dec3c16dd..e58b04e02ebb535529163d9f61b1e9aba6b1e6c1 100644 (file)
@@ -215,7 +215,7 @@ static int proc_follow_link(struct dentry *dentry, struct nameidata *nd)
 
 static struct inode_operations proc_link_inode_operations = {
        readlink:       proc_readlink,
-       follow_link:    proc_follow_link
+       follow_link:    proc_follow_link,
 };
 
 /*
@@ -396,8 +396,6 @@ static void proc_kill_inodes(struct proc_dir_entry *de)
                if (dentry->d_op != &proc_dentry_operations)
                        continue;
                inode = dentry->d_inode;
-               if (!inode)
-                       continue;
                if (inode->u.generic_ip != de)
                        continue;
                fops_put(filp->f_op);
@@ -573,12 +571,12 @@ void remove_proc_entry(const char *name, struct proc_dir_entry *parent)
                                (void *) proc_alloc_map);
                proc_kill_inodes(de);
                de->nlink = 0;
-               de->deleted = 1;
-               if (!de->count)
+               if (!atomic_read(&de->count))
                        free_proc_entry(de);
                else {
+                       de->deleted = 1;
                        printk("remove_proc_entry: %s/%s busy, count=%d\n",
-                               parent->name, de->name, de->count);
+                               parent->name, de->name, atomic_read(&de->count));
                }
                break;
        }
index 7b571398af8c4a6d8b3b6a2ab2254cb77a959757..3453bf88b7d270365244b9e627803e63810277f5 100644 (file)
@@ -25,7 +25,7 @@ extern void free_proc_entry(struct proc_dir_entry *);
 struct proc_dir_entry * de_get(struct proc_dir_entry *de)
 {
        if (de)
-               de->count++;
+               atomic_inc(&de->count);
        return de;
 }
 
@@ -34,20 +34,21 @@ struct proc_dir_entry * de_get(struct proc_dir_entry *de)
  */
 void de_put(struct proc_dir_entry *de)
 {
-       if (de) {
-               lock_kernel(); /* FIXME: count should be atomic_t */
-               if (!de->count) {
+       if (de) {       
+               lock_kernel();          
+               if (!atomic_read(&de->count)) {
                        printk("de_put: entry %s already free!\n", de->name);
+                       unlock_kernel();
                        return;
                }
 
-               if (!--de->count) {
+               if (atomic_dec_and_test(&de->count)) {
                        if (de->deleted) {
                                printk("de_put: deferred delete of %s\n",
                                        de->name);
                                free_proc_entry(de);
                        }
-               }
+               }               
                unlock_kernel();
        }
 }
@@ -139,7 +140,7 @@ struct inode * proc_get_inode(struct super_block * sb, int ino,
 #if 1
 /* shouldn't ever happen */
 if (de && de->deleted)
-printk("proc_iget: using deleted entry %s, count=%d\n", de->name, de->count);
+printk("proc_iget: using deleted entry %s, count=%d\n", de->name, atomic_read(&de->count));
 #endif
 
        inode = iget(sb, ino);
index 075a5843df663d90e2c42f7c47e41485fa37cc79..cae8619608daed48f95f9d7334de58170a172ab7 100644 (file)
@@ -96,10 +96,12 @@ static struct inode_operations proc_root_inode_operations = {
  * This is the root "inode" in the /proc tree..
  */
 struct proc_dir_entry proc_root = {
-       PROC_ROOT_INO, 5, "/proc",
-       S_IFDIR | S_IRUGO | S_IXUGO, 2, 0, 0,
-       0, &proc_root_inode_operations, &proc_root_operations,
-       NULL, NULL,
-       NULL,
-       &proc_root, NULL
+       low_ino:        PROC_ROOT_INO, 
+       namelen:        5, 
+       name:           "/proc",
+       mode:           S_IFDIR | S_IRUGO | S_IXUGO, 
+       nlink:          2, 
+       proc_iops:      &proc_root_inode_operations, 
+       proc_fops:      &proc_root_operations,
+       parent:         &proc_root,
 };
index d45304cfae58b0c9f0039467ef169e7048c83d27..7709ade8d904cded44b3859a8e10912dddf79712 100644 (file)
@@ -142,7 +142,6 @@ struct inode * sysv_new_inode(const struct inode * dir)
        mark_inode_dirty(inode);
        /* Change directory entry: */
        inode->i_mode = 0;              /* for sysv_write_inode() */
-       inode->i_size = 0;              /* ditto */
        sysv_write_inode(inode, 0);     /* ensure inode not allocated again */
                                        /* FIXME: caller may call this too. */
        mark_inode_dirty(inode);        /* cleared by sysv_write_inode() */
index 9f093c536bc17d0cc729fd92f773aa0ce21c83fa..9ec279e47a62026c488f53d60fe72201a5ececfa 100644 (file)
@@ -86,12 +86,6 @@ int udf_readdir(struct file *filp, void *dirent, filldir_t filldir)
        struct inode *dir = filp->f_dentry->d_inode;
        int result;
 
-       if (!dir)
-          return -EBADF;
-
-       if (!S_ISDIR(dir->i_mode))
-          return -ENOTDIR;
-
        if ( filp->f_pos == 0 ) 
        {
                if (filldir(dirent, ".", 1, filp->f_pos, dir->i_ino, DT_DIR))
index 9bffe61fdc4e527af0c3a00a0cef367e18099e85..5a2e7a1dc30e09c75ec96e8978191f6bdadc375f 100644 (file)
@@ -84,7 +84,6 @@ struct inode * udf_new_inode (const struct inode *dir, int mode, int * err)
                *err = -ENOMEM;
                return NULL;
        }
-       inode->i_flags = 0;
        *err = -ENOSPC;
 
        block = udf_new_block(dir, UDF_I_LOCATION(dir).partitionReferenceNum,
@@ -128,7 +127,6 @@ struct inode * udf_new_inode (const struct inode *dir, int mode, int * err)
        inode->i_ino = udf_get_lb_pblock(sb, UDF_I_LOCATION(inode), 0);
        inode->i_blksize = PAGE_SIZE;
        inode->i_blocks = 0;
-       inode->i_size = 0;
        UDF_I_LENEATTR(inode) = 0;
        UDF_I_LENALLOC(inode) = 0;
        if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_EXTENDED_FE))
index 88dc7d7f538b7735bda365178e5c5be2fd3f7a5d..9fcd98f34206de64f93514bde20add5b5c9c4b5e 100644 (file)
@@ -17,6 +17,17 @@ extern struct page * prepare_highmem_swapout(struct page *);
 extern struct page * replace_with_highmem(struct page *);
 extern struct buffer_head * create_bounce(int rw, struct buffer_head * bh_orig);
 
+
+static inline char *bh_kmap(struct buffer_head *bh)
+{
+       return kmap(bh->p_page) + bh_offset(bh);
+}
+
+static inline void bh_kunmap(struct buffer_head *bh)
+{
+       kunmap(bh->b_page);
+}
+
 #else /* CONFIG_HIGHMEM */
 
 static inline unsigned int nr_free_highpages(void) { return 0; }
@@ -30,6 +41,9 @@ static inline void *kmap(struct page *page) { return page_address(page); }
 #define kmap_atomic(page,idx)          kmap(page)
 #define kunmap_atomic(page,idx)                kunmap(page)
 
+#define bh_kmap(bh)    ((bh)->b_data)
+#define bh_kunmap(bh)  do { } while (0);
+
 #endif /* CONFIG_HIGHMEM */
 
 /* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */
index 63543da77790d42de3bca9f66c3482e1c285e654..471c9af2c202de316910c22d50e9b384c99df100 100644 (file)
@@ -177,16 +177,17 @@ extern int iso_date(char *, int);
 
 extern int parse_rock_ridge_inode(struct iso_directory_record *, struct inode *);
 extern int get_rock_ridge_filename(struct iso_directory_record *, char *, struct inode *);
+extern int isofs_name_translate(struct iso_directory_record *, char *, struct inode *);
 
 extern int find_rock_ridge_relocation(struct iso_directory_record *, struct inode *);
 
-int get_joliet_filename(struct iso_directory_record *, struct inode *, unsigned char *);
+int get_joliet_filename(struct iso_directory_record *, unsigned char *, struct inode *);
 int get_acorn_filename(struct iso_directory_record *, char *, struct inode *);
 
 extern struct dentry *isofs_lookup(struct inode *, struct dentry *);
 extern int isofs_get_block(struct inode *, long, struct buffer_head *, int);
 extern int isofs_bmap(struct inode *, int);
-extern int isofs_lookup_grandparent(struct inode *, int);
+extern struct buffer_head *isofs_bread(struct inode *, unsigned int, unsigned int);
 
 extern struct inode_operations isofs_dir_inode_operations;
 extern struct file_operations isofs_dir_operations;
index aa337fe6c3aa598cb551390859b63cfb1d50bd1e..beb41bfa3c1b8e2799825fa2fee6c01835410c54 100644 (file)
 #define FASTCALL(x)    x
 #endif
 
+struct semaphore;
+
 extern struct notifier_block *panic_notifier_list;
 NORET_TYPE void panic(const char * fmt, ...)
        __attribute__ ((NORET_AND format (printf, 1, 2)));
 NORET_TYPE void do_exit(long error_code)
        ATTRIB_NORET;
+NORET_TYPE void up_and_exit(struct semaphore *, long)
+       ATTRIB_NORET;
 extern unsigned long simple_strtoul(const char *,char **,unsigned int);
 extern long simple_strtol(const char *,char **,unsigned int);
 extern int sprintf(char * buf, const char * fmt, ...);
index 28bf3daa02aaa2ea6b37be27a1d37375188a3eac..da8f6b3dc0e07aa503ea273855690a3dd1322ab1 100644 (file)
@@ -67,7 +67,7 @@ struct proc_dir_entry {
        void *data;
        read_proc_t *read_proc;
        write_proc_t *write_proc;
-       unsigned int count;     /* use count */
+       atomic_t count;         /* use count */
        int deleted;            /* delete flag */
        kdev_t  rdev;
 };
index 22cd0863cafb910da773cd713060242adf802ac5..257618d44983edc865102e39299707954288b9c4 100644 (file)
@@ -169,6 +169,7 @@ extern void x25_limit_facilities(struct x25_facilities *, struct x25_neigh *);
 
 /* x25_in.c */
 extern int  x25_process_rx_frame(struct sock *, struct sk_buff *);
+extern int  x25_backlog_rcv(struct sock *, struct sk_buff *);
 
 /* x25_link.c */
 extern void x25_link_control(struct sk_buff *, struct x25_neigh *, unsigned short);
index 3ed437693cf2533f31b25ef16d635fc1ac925b8f..f7486444bfd6d1dfe29049fd6522a2a77b08e86b 100644 (file)
@@ -712,11 +712,13 @@ static void __init do_basic_setup(void)
        init_pcmcia_ds();               /* Do this last */
 #endif
 
+#ifdef CONFIG_HOTPLUG
        /* do this after other 'do this last' stuff, because we want
         * to minimize spurious executions of /sbin/hotplug
         * during boot-up
         */
        net_notifier_init();
+#endif
 
        /* Mount the root filesystem.. */
        mount_root();
index 6205bc2d1b3c9cb108f008663a8c1378103a2fc9..c4607fd5e3ac8f68fa76ac03b5886e8a2a9c254e 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -376,13 +376,14 @@ static void shm_read_inode(struct inode * inode)
        struct shmid_kernel *shp;
 
        id = inode->i_ino;
-       inode->i_op = NULL;
        inode->i_mode = 0;
        inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
 
        if (id < SEQ_MULTIPLIER) {
-               if (!(shp = shm_lock (id)))
+               if (!(shp = shm_lock (id))) {
+                       make_bad_inode(inode);
                        return;
+               }
                inode->i_mode = (shp->shm_flags & S_IALLUGO) | S_IFREG;
                inode->i_uid  = shp->shm_perm.uid;
                inode->i_gid  = shp->shm_perm.gid;
@@ -572,13 +573,13 @@ static pte_t **shm_alloc(unsigned long pages, int doacc)
        if (pages == 0)
                return NULL;
 
-       ret = kmalloc ((dir+1) * sizeof(pte_t *), GFP_KERNEL);
+       ret = kmalloc ((dir+1) * sizeof(pte_t *), GFP_USER);
        if (!ret)
                goto nomem;
 
        for (ptr = ret; ptr < ret+dir ; ptr++)
        {
-               *ptr = (pte_t *)__get_free_page (GFP_KERNEL);
+               *ptr = (pte_t *)__get_free_page (GFP_USER);
                if (!*ptr)
                        goto free;
                init_ptes (*ptr, PTES_PER_PAGE);
@@ -586,7 +587,7 @@ static pte_t **shm_alloc(unsigned long pages, int doacc)
 
        /* The last one is probably not of PAGE_SIZE: we use kmalloc */
        if (last) {
-               *ptr = kmalloc (last*sizeof(pte_t), GFP_KERNEL);
+               *ptr = kmalloc (last*sizeof(pte_t), GFP_USER);
                if (!*ptr)
                        goto free;
                init_ptes (*ptr, last);
@@ -724,7 +725,7 @@ static struct shmid_kernel *seg_alloc(int numpages, size_t namelen)
        struct shmid_kernel *shp;
        pte_t              **dir;
 
-       shp = (struct shmid_kernel *) kmalloc (sizeof (*shp) + namelen, GFP_KERNEL);
+       shp = (struct shmid_kernel *) kmalloc (sizeof (*shp) + namelen, GFP_USER);
        if (!shp)
                return ERR_PTR(-ENOMEM);
 
@@ -1202,7 +1203,7 @@ asmlinkage long sys_shmat (int shmid, char *shmaddr, int shmflg, ulong *raddr)
        char   name[SHM_FMT_LEN+1];
        void *user_addr;
 
-       if (!shm_sb || (shmid % SEQ_MULTIPLIER) == zero_id)
+       if (!shm_sb || shmid < 0 || (shmid % SEQ_MULTIPLIER) == zero_id)
                return -EINVAL;
 
        if ((addr = (ulong)shmaddr)) {
index 35114e2a6e27ac2f38de2a5987fa4cceafbb37d0..3045d7ac60c97ccba89ed7e4e1d4bcfbf3b97991 100644 (file)
@@ -467,6 +467,14 @@ fake_volatile:
        goto fake_volatile;
 }
 
+NORET_TYPE void up_and_exit(struct semaphore *sem, long code)
+{
+       if (sem)
+               up(sem);
+       
+       do_exit(code);
+}
+
 asmlinkage long sys_exit(int error_code)
 {
        do_exit((error_code&0xff)<<8);
index 7655f4ddadfe51e731e2900d220e8225c69bf795..a21507eecfd714f70f1e653087f4a7c23ec115ab 100644 (file)
@@ -114,7 +114,8 @@ int exec_usermodehelper(char *program_path, char *argv[], char *envp[])
        }
 
        /* Give kmod all effective privileges.. */
-       current->uid = current->euid = current->fsuid = 0;
+       current->euid = current->fsuid = 0;
+       current->egid = current->fsgid = 0;
        cap_set_full(current->cap_effective);
 
        /* Allow execve args to be in kernel space. */
index 07bebb3592aa4729baa9c82f0ac1e2f72bde903e..100adaeb3687d70960abf391d45b5e7cf57cb6c4 100644 (file)
@@ -418,6 +418,7 @@ EXPORT_SYMBOL(ioport_resource);
 EXPORT_SYMBOL(iomem_resource);
 
 /* process management */
+EXPORT_SYMBOL(up_and_exit);
 EXPORT_SYMBOL(__wake_up);
 EXPORT_SYMBOL(wake_up_process);
 EXPORT_SYMBOL(sleep_on);
index 3da5df9d90712e97fd62d9f5700075cce4c562ed..5591ee2bcf4a6117cb35665282a4b386115b7da6 100644 (file)
@@ -571,7 +571,7 @@ static void unregister_proc_table(ctl_table * table, struct proc_dir_entry *root
                }
 
                /* Don't unregister proc entries that are still being used.. */
-               if (de->count)
+               if (atomic_read(&de->count))
                        continue;
 
                table->de = NULL;
index 55d3fcfe3d95df0cf57bafec9bcb96d411ddfcbc..a191cc2f4ae29725d891f1162f15d38a5435cd6d 100644 (file)
@@ -1208,8 +1208,6 @@ asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, off_t *offset, size_t cou
        if (!out_file->f_op || !out_file->f_op->write)
                goto fput_out;
        out_inode = out_file->f_dentry->d_inode;
-       if (!out_inode)
-               goto fput_out;
        retval = locks_verify_area(FLOCK_VERIFY_WRITE, out_inode, out_file, out_file->f_pos, count);
        if (retval)
                goto fput_out;
index 673638998c134023b2063bf850a11804486e83df..1e5b59c3d74baea43d5e3b290fba27e2c8416c08 100644 (file)
@@ -2704,6 +2704,7 @@ int __init net_dev_init(void)
        return 0;
 }
 
+#ifdef CONFIG_HOTPLUG
 
 /* Notify userspace when a netdevice event occurs,
  * by running '/sbin/hotplug net' with certain
@@ -2765,3 +2766,4 @@ void __init net_notifier_init (void)
                printk (KERN_WARNING "unable to register netdev notifier\n"
                        KERN_WARNING "/sbin/hotplug will not be run.\n");
 }
+#endif
index a72471f99be12d2a7f7227641160b004dafafebb..9f16a976cfac9fc5354196568677d547323d5834 100644 (file)
@@ -5,7 +5,7 @@
  *
  *             Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:    $Id: tcp_ipv4.c,v 1.219 2000/11/10 04:02:04 davem Exp $
+ * Version:    $Id: tcp_ipv4.c,v 1.220 2000/11/14 07:26:02 davem Exp $
  *
  *             IPv4 specific functions
  *
@@ -1721,93 +1721,88 @@ static void __tcp_v4_rehash(struct sock *sk)
        sk->prot->hash(sk);
 }
 
-int tcp_v4_rebuild_header(struct sock *sk)
+static int tcp_v4_reselect_saddr(struct sock *sk)
 {
-       struct rtable *rt = (struct rtable *)__sk_dst_check(sk, 0);
+       int err;
+       struct rtable *rt;
+       __u32 old_saddr = sk->saddr;
        __u32 new_saddr;
-        int want_rewrite = sysctl_ip_dynaddr && sk->state == TCP_SYN_SENT &&
-               !(sk->userlocks & SOCK_BINDADDR_LOCK);
+       __u32 daddr = sk->daddr;
 
-       if (rt == NULL) {
-               int err;
+       if(sk->protinfo.af_inet.opt && sk->protinfo.af_inet.opt->srr)
+               daddr = sk->protinfo.af_inet.opt->faddr;
 
-               u32 daddr = sk->daddr;
+       /* Query new route. */
+       err = ip_route_connect(&rt, daddr, 0,
+                              RT_TOS(sk->protinfo.af_inet.tos)|sk->localroute,
+                              sk->bound_dev_if);
+       if (err)
+               return err;
 
-               if(sk->protinfo.af_inet.opt && sk->protinfo.af_inet.opt->srr)
-                       daddr = sk->protinfo.af_inet.opt->faddr;
+       __sk_dst_set(sk, &rt->u.dst);
+       /* sk->route_caps = rt->u.dst.dev->features; */
 
-               err = ip_route_output(&rt, daddr, sk->saddr,
-                                     RT_TOS(sk->protinfo.af_inet.tos) | RTO_CONN | sk->localroute,
-                                     sk->bound_dev_if);
-               if (err) {
-                       sk->err_soft=-err;
-                       sk->error_report(sk);
-                       return -1;
-               }
-               __sk_dst_set(sk, &rt->u.dst);
-       }
+       new_saddr = rt->rt_src;
 
-       /* Force route checking if want_rewrite. */
-       if (want_rewrite) {
-               int tmp;
-               struct rtable *new_rt;
-               __u32 old_saddr = rt->rt_src;
-
-               /* Query new route using another rt buffer */
-               tmp = ip_route_connect(&new_rt, rt->rt_dst, 0,
-                                       RT_TOS(sk->protinfo.af_inet.tos)|sk->localroute,
-                                       sk->bound_dev_if);
-
-               /* Only useful if different source addrs */
-               if (tmp == 0) {
-                       /*
-                        *      Only useful if different source addrs
-                        */
-                       if (new_rt->rt_src != old_saddr ) {
-                               __sk_dst_set(sk, &new_rt->u.dst);
-                               rt = new_rt;
-                               goto do_rewrite;
-                       }
-                       dst_release(&new_rt->u.dst);
-               }
+       if (new_saddr == old_saddr)
+               return 0;
+
+       if (sysctl_ip_dynaddr > 1) {
+               printk(KERN_INFO "tcp_v4_rebuild_header(): shifting sk->saddr "
+                      "from %d.%d.%d.%d to %d.%d.%d.%d\n",
+                      NIPQUAD(old_saddr), 
+                      NIPQUAD(new_saddr));
        }
 
+       sk->saddr = new_saddr;
+       sk->rcv_saddr = new_saddr;
+
+       /* XXX The only one ugly spot where we need to
+        * XXX really change the sockets identity after
+        * XXX it has entered the hashes. -DaveM
+        *
+        * Besides that, it does not check for connection
+        * uniqueness. Wait for troubles.
+        */
+       __tcp_v4_rehash(sk);
        return 0;
+}
 
-do_rewrite:
-       new_saddr = rt->rt_src;
-                
-       /* Ouch!, this should not happen. */
-       if (!sk->saddr || !sk->rcv_saddr) {
-               printk(KERN_WARNING "tcp_v4_rebuild_header(): not valid sock addrs: "
-                      "saddr=%08X rcv_saddr=%08X\n",
-                      ntohl(sk->saddr), 
-                      ntohl(sk->rcv_saddr));
-               return -1;
-       }
+int tcp_v4_rebuild_header(struct sock *sk)
+{
+       struct rtable *rt = (struct rtable *)__sk_dst_check(sk, 0);
+       u32 daddr;
+       int err;
 
-       if (new_saddr != sk->saddr) {
-               if (sysctl_ip_dynaddr > 1) {
-                       printk(KERN_INFO "tcp_v4_rebuild_header(): shifting sk->saddr "
-                              "from %d.%d.%d.%d to %d.%d.%d.%d\n",
-                              NIPQUAD(sk->saddr), 
-                              NIPQUAD(new_saddr));
-               }
+       /* Route is OK, nothing to do. */
+       if (rt != NULL)
+               return 0;
 
-               sk->saddr = new_saddr;
-               sk->rcv_saddr = new_saddr;
+       /* Reroute. */
+       daddr = sk->daddr;
+       if(sk->protinfo.af_inet.opt && sk->protinfo.af_inet.opt->srr)
+               daddr = sk->protinfo.af_inet.opt->faddr;
 
-               /* XXX The only one ugly spot where we need to
-                * XXX really change the sockets identity after
-                * XXX it has entered the hashes. -DaveM
-                *
-                * Besides that, it does not check for connection
-                * uniqueness. Wait for troubles.
-                */
-               __tcp_v4_rehash(sk);
-       } 
-        
-       return 0;
+       err = ip_route_output(&rt, daddr, sk->saddr,
+                             RT_TOS(sk->protinfo.af_inet.tos) | RTO_CONN | sk->localroute,
+                             sk->bound_dev_if);
+       if (!err) {
+               __sk_dst_set(sk, &rt->u.dst);
+               /* sk->route_caps = rt->u.dst.dev->features; */
+               return 0;
+       }
+
+       /* Routing failed... */
+       /* sk->route_caps = 0; */
+
+       if (!sysctl_ip_dynaddr ||
+           sk->state != TCP_SYN_SENT ||
+           (sk->userlocks & SOCK_BINDADDR_LOCK) ||
+           (err = tcp_v4_reselect_saddr(sk)) != 0) {
+               sk->err_soft=-err;
+               /* sk->error_report(sk); */
+       }
+       return err;
 }
 
 static void v4_addr2sockaddr(struct sock *sk, struct sockaddr * uaddr)
index 4a9af93e1c209fd58744c5fe81c128fc9d32fb2f..520a3b6c16c9147734ebdd77d3754803b02536d8 100644 (file)
@@ -660,7 +660,8 @@ static void ndisc_router_discovery(struct sk_buff *skb)
                if (ra_msg->reachable_time) {
                        __u32 rtime = (ntohl(ra_msg->reachable_time)*HZ)/1000;
 
-                       if (rtime != in6_dev->nd_parms->base_reachable_time) {
+                       if (rtime &&
+                           rtime != in6_dev->nd_parms->base_reachable_time) {
                                in6_dev->nd_parms->base_reachable_time = rtime;
                                in6_dev->nd_parms->gc_staletime = 3 * rtime;
                                in6_dev->nd_parms->reachable_time = neigh_rand_reach_time(rtime);
index 7908d726c7fa1d01f490c45623408a37445788f6..5726dca3297ed32f48e5ab04e12c377d68843d8e 100644 (file)
@@ -114,7 +114,7 @@ int DataSending(const int CPUNR)
                        
                        inode = CurrentRequest->filp->f_dentry->d_inode;
                        
-                       if (inode && inode->i_mapping->a_ops->readpage) {
+                       if (inode->i_mapping->a_ops->readpage) {
                                /* This does the actual transfer using sendfile */              
                                read_descriptor_t desc;
                                loff_t *ppos;
index ae44b3a6e95a672cc03140bc7f1c611150bf0f80..2ade82be2685ccc86ccf58a02be345d5d4f834ef 100644 (file)
@@ -145,7 +145,6 @@ static int MainDaemon(void *cpu_pointer)
                        changes +=AcceptConnections(CPUNR,MainSocket);
                }
                
-               set_current_state(TASK_INTERRUPTIBLE);  
                if (changes==0) 
                {
                        (void)interruptible_sleep_on_timeout(&(DummyWQ[CPUNR]),1);      
index 8c33a03c41c9a4bd83273e3ad2baa7c97338aff0..5c5c5a85b21de6311ef2ef84e66480bb8e49408b 100644 (file)
@@ -405,7 +405,7 @@ struct socket *sockfd_lookup(int fd, int *err)
        }
 
        inode = file->f_dentry->d_inode;
-       if (!inode || !inode->i_sock || !(sock = socki_lookup(inode)))
+       if (!inode->i_sock || !(sock = socki_lookup(inode)))
        {
                *err = -ENOTSOCK;
                fput(file);
index 3fcf7464c124edff126e46f931f695d6ee26c7f0..16d46de54386e4ce9aee6559375c2d92c4ed737b 100644 (file)
@@ -100,7 +100,7 @@ extern inline unix_socket *unix_get_socket(struct file *filp)
        /*
         *      Socket ?
         */
-       if (inode && inode->i_sock) {
+       if (inode->i_sock) {
                struct socket * sock = &inode->u.socket_i;
                struct sock * s = sock->sk;
 
index 409e3bc461300c06ebb3e40ff704f1313dea0207..0242b12e5c5cf0639cea4cafc1763b0721958a0d 100644 (file)
@@ -25,6 +25,7 @@
  *                                     Fixed x25_output() related skb leakage.
  *     2000-10-02      Henner Eisen    Made x25_kick() single threaded per socket.
  *     2000-10-27      Henner Eisen    MSG_DONTWAIT for fragment allocation.
+ *     2000-11-14      Henner Eisen    Closing datalink from NETDEV_GOING_DOWN
  */
 
 #include <linux/config.h>
@@ -193,6 +194,7 @@ static void x25_kill_by_device(struct net_device *dev)
 static int x25_device_event(struct notifier_block *this, unsigned long event, void *ptr)
 {
        struct net_device *dev = (struct net_device *)ptr;
+       struct x25_neigh *neigh;
 
        if (dev->type == ARPHRD_X25
 #if defined(CONFIG_LLC) || defined(CONFIG_LLC_MODULE)
@@ -203,6 +205,10 @@ static int x25_device_event(struct notifier_block *this, unsigned long event, vo
                        case NETDEV_UP:
                                x25_link_device_up(dev);
                                break;
+                       case NETDEV_GOING_DOWN:
+                               if ((neigh = x25_get_neigh(dev)))
+                                       x25_terminate_link(neigh);
+                               break;
                        case NETDEV_DOWN:
                                x25_kill_by_device(dev);
                                x25_route_device_down(dev);
@@ -473,7 +479,7 @@ static int x25_create(struct socket *sock, int protocol)
 
        sock->ops    = &x25_proto_ops;
        sk->protocol = protocol;
-       sk->backlog_rcv = x25_process_rx_frame;
+       sk->backlog_rcv = x25_backlog_rcv;
 
        x25->t21   = sysctl_x25_call_request_timeout;
        x25->t22   = sysctl_x25_reset_request_timeout;
index c285af6c886fe3ef142f6d8fa260c41cef1d1d16..bcb5f1cf49b6528e6ec6e8c1d668ba67f2ff960e 100644 (file)
@@ -360,4 +360,14 @@ int x25_process_rx_frame(struct sock *sk, struct sk_buff *skb)
        return queued;
 }
 
+int x25_backlog_rcv(struct sock *sk, struct sk_buff *skb)
+{
+       int queued;
+
+       queued = x25_process_rx_frame(sk,skb);
+       if(!queued) kfree_skb(skb);
+
+       return 0;
+}
+
 #endif