]> git.neil.brown.name Git - history.git/commitdiff
Import 2.3.44pre10 2.3.44pre10
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:31:17 +0000 (15:31 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:31:17 +0000 (15:31 -0500)
26 files changed:
arch/sparc64/kernel/irq.c
drivers/char/agp/agp.h
drivers/net/8390.c
drivers/net/acenic_firmware.h
drivers/net/hamradio/baycom_epp.c
drivers/net/hamradio/baycom_par.c
drivers/net/hamradio/baycom_ser_fdx.c
drivers/net/hamradio/baycom_ser_hdx.c
drivers/net/hamradio/hdlcdrv.c
drivers/net/hamradio/soundmodem/sm.c
drivers/net/rtl8139.c
drivers/net/yellowfin.c
drivers/scsi/sd.c
include/asm-sparc/hardirq.h
include/asm-sparc64/hardirq.h
include/linux/interrupt.h
include/linux/kmod.h
include/linux/netdevice.h
include/net/sock.h
kernel/kmod.c
kernel/ksyms.c
net/core/skbuff.c
net/decnet/af_decnet.c
net/ipv4/tcp_ipv4.c
net/socket.c
net/sunrpc/svcsock.c

index a093039710654b927f0877e7a5e5783fa8361fb2..cb659b65561022f35aef43db7a31734c9f551a0b 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: irq.c,v 1.82 2000/02/09 11:15:07 davem Exp $
+/* $Id: irq.c,v 1.83 2000/02/11 06:57:17 jj Exp $
  * irq.c: UltraSparc IRQ handling/init/registry.
  *
  * Copyright (C) 1997  David S. Miller  (davem@caip.rutgers.edu)
@@ -57,7 +57,7 @@ struct ino_bucket ivector_table[NUM_IVECS] __attribute__ ((aligned (64)));
 
 #ifndef __SMP__
 unsigned int __up_workvec[16] __attribute__ ((aligned (64)));
-#define irq_work(__cpu, __pil) &(__up_workvec[(__pil)])
+#define irq_work(__cpu, __pil) &(__up_workvec[(void)(__cpu), (__pil)])
 #else
 #define irq_work(__cpu, __pil) &(cpu_data[(__cpu)].irq_worklists[(__pil)])
 #endif
index ca7f76aa3d515d863fb93b40654ac440c9013354..31f4810655142d1673f1b5a262c264e2fafa6899 100644 (file)
@@ -27,8 +27,6 @@
 #ifndef _AGP_BACKEND_PRIV_H
 #define _AGP_BACKEND_PRIV_H 1
 
-#include <linux/config.h>
-
 enum aper_size_type {
        U8_APER_SIZE,
        U16_APER_SIZE,
index f63e1c3109b284c67a3ffe52692abdbf2ed376bc..cf34666e035b6b8e1f1a1a7796ad39ad311773fe 100644 (file)
@@ -567,7 +567,6 @@ static void ei_tx_intr(struct net_device *dev)
                        printk(KERN_ERR "%s: bogus last_tx_buffer %d, tx1=%d.\n",
                                ei_local->name, ei_local->lasttx, ei_local->tx1);
                ei_local->tx1 = 0;
-               netif_start_queue(dev);
                if (ei_local->tx2 > 0) 
                {
                        ei_local->txing = 1;
@@ -584,7 +583,6 @@ static void ei_tx_intr(struct net_device *dev)
                        printk("%s: bogus last_tx_buffer %d, tx2=%d.\n",
                                ei_local->name, ei_local->lasttx, ei_local->tx2);
                ei_local->tx2 = 0;
-               netif_start_queue(dev);
                if (ei_local->tx1 > 0) 
                {
                        ei_local->txing = 1;
@@ -604,7 +602,6 @@ static void ei_tx_intr(struct net_device *dev)
         *  Single Tx buffer: mark it free so another packet can be loaded.
         */
        ei_local->txing = 0;
-       netif_start_queue(dev);
 #endif
 
        /* Minimize Tx latency: update the statistics after we restart TXing. */
index ec51a8e32223150f00da927a35b12d4f4de96508..729eac6641ba5c17ad82150c4b584c834abfc6e6 100644 (file)
@@ -1,3 +1,4 @@
+#include <linux/config.h>
 /*
  * Declare these here even if Tigon I support is disabled to avoid
  * the compiler complaining about undefined symbols.
index 1cf71210cb1c83f2912ce4967c2b68493e5363f5..7e0679f9bf96592d5b2958299c014e51ededbb2c 100644 (file)
  *
  *
  *  History:
- *   0.1  xx.xx.98  Initial version by Matthias Welwarsky (dg2fef)
- *   0.2  21.04.98  Massive rework by Thomas Sailer
- *                  Integrated FPGA EPP modem configuration routines
- *   0.3  11.05.98  Took FPGA config out and moved it into a separate program
- *   0.4  26.07.99  Adapted to new lowlevel parport driver interface
- *   0.5  03.08.99  adapt to Linus' new __setup/__initcall
- *                  removed some pre-2.2 kernel compatibility cruft
- *   0.6  10.08.99  Check if parport can do SPP and is safe to access during interrupt contexts
+ *   0.1  xx.xx.1998  Initial version by Matthias Welwarsky (dg2fef)
+ *   0.2  21.04.1998  Massive rework by Thomas Sailer
+ *                    Integrated FPGA EPP modem configuration routines
+ *   0.3  11.05.1998  Took FPGA config out and moved it into a separate program
+ *   0.4  26.07.1999  Adapted to new lowlevel parport driver interface
+ *   0.5  03.08.1999  adapt to Linus' new __setup/__initcall
+ *                    removed some pre-2.2 kernel compatibility cruft
+ *   0.6  10.08.1999  Check if parport can do SPP and is safe to access during interrupt contexts
+ *   0.7  12.02.2000  adapted to softnet driver interface
  *
  */
 
@@ -50,6 +51,7 @@
 #include <linux/smp_lock.h>
 #include <asm/uaccess.h>
 #include <linux/if_arp.h>
+#include <linux/kmod.h>
 #include <linux/hdlcdrv.h>
 #include <linux/baycom.h>
 #include <linux/soundmodem.h>
@@ -90,8 +92,8 @@ static const char paranoia_str[] = KERN_ERR
 /* --------------------------------------------------------------------- */
 
 static const char bc_drvname[] = "baycom_epp";
-static const char bc_drvinfo[] = KERN_INFO "baycom_epp: (C) 1998-1999 Thomas Sailer, HB9JNX/AE4WA\n"
-KERN_INFO "baycom_epp: version 0.5 compiled " __TIME__ " " __DATE__ "\n";
+static const char bc_drvinfo[] = KERN_INFO "baycom_epp: (C) 1998-2000 Thomas Sailer, HB9JNX/AE4WA\n"
+KERN_INFO "baycom_epp: version 0.7 compiled " __TIME__ " " __DATE__ "\n";
 
 /* --------------------------------------------------------------------- */
 
@@ -377,40 +379,6 @@ static char *envp[] = { "HOME=/", "TERM=linux", "PATH=/usr/bin:/bin", NULL };
 
 static int errno;
 
-static inline void use_init_fs_context(void)
-{
-        struct fs_struct *our_fs, *init_fs;
-
-        /*
-         * Make modprobe's fs context be a copy of init's.
-         *
-         * We cannot use the user's fs context, because it
-         * may have a different root than init.
-         * Since init was created with CLONE_FS, we can grab
-         * its fs context from "init_task".
-         *
-         * The fs context has to be a copy. If it is shared
-         * with init, then any chdir() call in modprobe will
-         * also affect init and the other threads sharing
-         * init_task's fs context.
-         *
-         * We created the exec_modprobe thread without CLONE_FS,
-         * so we can update the fields in our fs context freely.
-         */
-        lock_kernel();
-
-        our_fs = current->fs;
-        dput(our_fs->root);
-        dput(our_fs->pwd);
-
-        init_fs = init_task.fs;
-        our_fs->umask = init_fs->umask;
-        our_fs->root = dget(init_fs->root);
-        our_fs->pwd = dget(init_fs->pwd);
-
-        unlock_kernel();
-}
-
 static int exec_eppfpga(void *b)
 {
        struct baycom_state *bc = (struct baycom_state *)b;
@@ -428,41 +396,11 @@ static int exec_eppfpga(void *b)
        sprintf(portarg, "%ld", bc->pdev->port->base);
        printk(KERN_DEBUG "%s: %s -s -p %s -m %s\n", bc_drvname, eppconfig_path, portarg, modearg);
 
-        current->session = 1;
-        current->pgrp = 1;
-
-        use_init_fs_context();
-
-        /* Prevent parent user process from sending signals to child.
-           Otherwise, if the modprobe program does not exist, it might
-           be possible to get a user defined signal handler to execute
-           as the super user right after the execve fails if you time
-           the signal just right.
-        */
-        spin_lock_irq(&current->sigmask_lock);
-        flush_signals(current);
-        flush_signal_handlers(current);
-        spin_unlock_irq(&current->sigmask_lock);
-
-        for (i = 0; i < current->files->max_fds; i++ ) {
-                if (current->files->fd[i]) close(i);
-        }
-
-        /* Drop the "current user" thing */
-        free_uid(current);
-
-        /* Give kmod all privileges.. */
-        current->uid = current->euid = current->fsuid = 0;
-        cap_set_full(current->cap_inheritable);
-        cap_set_full(current->cap_effective);
-
-        /* Allow execve args to be in kernel space. */
-        set_fs(KERNEL_DS);
-
-       if (execve(eppconfig_path, argv, envp) < 0) {
+       i = exec_usermodehelper(eppconfig_path, argv, envp);
+       if (i < 0) {
                 printk(KERN_ERR "%s: failed to exec %s -s -p %s -m %s, errno = %d\n",
-                       bc_drvname, eppconfig_path, portarg, modearg, errno);
-                return -errno;
+                       bc_drvname, eppconfig_path, portarg, modearg, i);
+                return i;
         }
         return 0;
 }
@@ -1459,6 +1397,7 @@ static int baycom_probe(struct net_device *dev)
        dev->addr_len = AX25_ADDR_LEN;     /* sizeof an ax.25 address */
        memcpy(dev->broadcast, ax25_bcast, AX25_ADDR_LEN);
        memcpy(dev->dev_addr, ax25_nocall, AX25_ADDR_LEN);
+       dev->tx_queue_len = 16;
 
        /* New style flags */
        dev->flags = 0;
index 5b11f3b4d2f96b6c9cd1d1cf7e7f6cf424b4bfda..87a9e7f0a3ecbcb2cbee3570a684e7012391a966 100644 (file)
  *
  *
  *  History:
- *   0.1  26.06.96  Adapted from baycom.c and made network driver interface
- *        18.10.96  Changed to new user space access routines (copy_{to,from}_user)
- *   0.3  26.04.97  init code/data tagged
- *   0.4  08.07.97  alternative ser12 decoding algorithm (uses delta CTS ints)
- *   0.5  11.11.97  split into separate files for ser12/par96
- *   0.6  03.08.99  adapt to Linus' new __setup/__initcall
- *                  removed some pre-2.2 kernel compatibility cruft
- *   0.7  10.08.99  Check if parport can do SPP and is safe to access during interrupt contexts
+ *   0.1  26.06.1996  Adapted from baycom.c and made network driver interface
+ *        18.10.1996  Changed to new user space access routines (copy_{to,from}_user)
+ *   0.3  26.04.1997  init code/data tagged
+ *   0.4  08.07.1997  alternative ser12 decoding algorithm (uses delta CTS ints)
+ *   0.5  11.11.1997  split into separate files for ser12/par96
+ *   0.6  03.08.1999  adapt to Linus' new __setup/__initcall
+ *                    removed some pre-2.2 kernel compatibility cruft
+ *   0.7  10.08.1999  Check if parport can do SPP and is safe to access during interrupt contexts
+ *   0.8  12.02.2000  adapted to softnet driver interface
+ *                    removed direct parport access, uses parport driver methods
  */
 
 /*****************************************************************************/
@@ -77,7 +79,6 @@
 #include <linux/string.h>
 #include <asm/system.h>
 #include <asm/bitops.h>
-#include <asm/io.h>
 #include <asm/uaccess.h>
 #include <linux/init.h>
 #include <linux/delay.h>
 /* --------------------------------------------------------------------- */
 
 static const char bc_drvname[] = "baycom_par";
-static const char bc_drvinfo[] = KERN_INFO "baycom_par: (C) 1996-1999 Thomas Sailer, HB9JNX/AE4WA\n"
-KERN_INFO "baycom_par: version 0.6 compiled " __TIME__ " " __DATE__ "\n";
+static const char bc_drvinfo[] = KERN_INFO "baycom_par: (C) 1996-2000 Thomas Sailer, HB9JNX/AE4WA\n"
+KERN_INFO "baycom_par: version 0.8 compiled " __TIME__ " " __DATE__ "\n";
 
 /* --------------------------------------------------------------------- */
 
@@ -110,13 +111,6 @@ static struct net_device baycom_device[NR_PORTS];
 
 /* --------------------------------------------------------------------- */
 
-#define SER12_EXTENT 8
-
-#define LPT_DATA(dev)    ((dev)->base_addr+0)
-#define LPT_STATUS(dev)  ((dev)->base_addr+1)
-#define LPT_CONTROL(dev) ((dev)->base_addr+2)
-#define LPT_IRQ_ENABLE      0x10
-
 #define PAR96_BURSTBITS 16
 #define PAR96_BURST     4
 #define PAR96_PTT       2
@@ -207,6 +201,7 @@ static __inline__ void par96_tx(struct net_device *dev, struct baycom_state *bc)
 {
        int i;
        unsigned int data = hdlcdrv_getbits(&bc->hdrv);
+       struct parport *pp = bc->pdev->port;
 
        for(i = 0; i < PAR96_BURSTBITS; i++, data >>= 1) {
                unsigned char val = PAR97_POWER;
@@ -219,8 +214,8 @@ static __inline__ void par96_tx(struct net_device *dev, struct baycom_state *bc)
                                (PAR96_SCRAM_TAPN << 1);
                if (bc->modem.par96.scram & (PAR96_SCRAM_TAP1 << 2))
                        val |= PAR96_TXBIT;
-               outb(val, LPT_DATA(dev));
-               outb(val | PAR96_BURST, LPT_DATA(dev));
+               pp->ops->write_data(pp, val);
+               pp->ops->write_data(pp, val | PAR96_BURST);
        }
 }
 
@@ -230,24 +225,25 @@ static __inline__ void par96_rx(struct net_device *dev, struct baycom_state *bc)
 {
        int i;
        unsigned int data, mask, mask2, descx;
+       struct parport *pp = bc->pdev->port;
 
        /*
         * do receiver; differential decode and descramble on the fly
         */
        for(data = i = 0; i < PAR96_BURSTBITS; i++) {
                bc->modem.par96.descram = (bc->modem.par96.descram << 1);
-               if (inb(LPT_STATUS(dev)) & PAR96_RXBIT)
+               if (pp->ops->read_status(pp) & PAR96_RXBIT)
                        bc->modem.par96.descram |= 1;
                descx = bc->modem.par96.descram ^
                        (bc->modem.par96.descram >> 1);
                /* now the diff decoded data is inverted in descram */
-               outb(PAR97_POWER | PAR96_PTT, LPT_DATA(dev));
+               pp->ops->write_data(pp, PAR97_POWER | PAR96_PTT);
                descx ^= ((descx >> PAR96_DESCRAM_TAPSH1) ^
                          (descx >> PAR96_DESCRAM_TAPSH2));
                data >>= 1;
                if (!(descx & 1))
                        data |= 0x8000;
-               outb(PAR97_POWER | PAR96_PTT | PAR96_BURST, LPT_DATA(dev));
+               pp->ops->write_data(pp, PAR97_POWER | PAR96_PTT | PAR96_BURST);
        }
        hdlcdrv_putbits(&bc->hdrv, data);
        /*
@@ -272,7 +268,7 @@ static __inline__ void par96_rx(struct net_device *dev, struct baycom_state *bc)
                        bc->modem.par96.dcd_count -= 2;
                hdlcdrv_setdcd(&bc->hdrv, bc->modem.par96.dcd_count > 0);
        } else {
-               hdlcdrv_setdcd(&bc->hdrv, !!(inb(LPT_STATUS(dev)) & PAR96_DCD));
+               hdlcdrv_setdcd(&bc->hdrv, !!(pp->ops->read_status(pp) & PAR96_DCD));
        }
 }
 
@@ -353,13 +349,12 @@ static int par96_open(struct net_device *dev)
                parport_unregister_device(bc->pdev);
                return -EBUSY;
        }
+       pp = bc->pdev->port;
        dev->irq = pp->irq;
-       /* bc->pdev->port->ops->change_mode(bc->pdev->port, PARPORT_MODE_PCSPP);  not yet implemented */
+       pp->ops->data_forward(pp);
         bc->hdrv.par.bitrate = 9600;
-       /* switch off PTT */
-       outb(PAR96_PTT | PAR97_POWER, LPT_DATA(dev));
-       /*bc->pdev->port->ops->enable_irq(bc->pdev->port);  not yet implemented */
-        outb(LPT_IRQ_ENABLE, LPT_CONTROL(dev));        
+       pp->ops->write_data(pp, PAR96_PTT | PAR97_POWER); /* switch off PTT */
+       pp->ops->enable_irq(pp);
        printk(KERN_INFO "%s: par96 at iobase 0x%lx irq %u options 0x%x\n",
               bc_drvname, dev->base_addr, dev->irq, bc->options);
        MOD_INC_USE_COUNT;
@@ -371,14 +366,15 @@ static int par96_open(struct net_device *dev)
 static int par96_close(struct net_device *dev)
 {
        struct baycom_state *bc = (struct baycom_state *)dev->priv;
+       struct parport *pp;
 
        if (!dev || !bc)
                return -EINVAL;
+       pp = bc->pdev->port;
        /* disable interrupt */
-        outb(0, LPT_CONTROL(dev));
-       /*bc->pdev->port->ops->disable_irq(bc->pdev->port);  not yet implemented */
+       pp->ops->disable_irq(pp);
        /* switch off PTT */
-       outb(PAR96_PTT | PAR97_POWER, LPT_DATA(dev));
+       pp->ops->write_data(pp, PAR96_PTT | PAR97_POWER);
        parport_release(bc->pdev);
        parport_unregister_device(bc->pdev);
        printk(KERN_INFO "%s: close par96 at iobase 0x%lx irq %u\n",
index fdb01b90b3cb113f43683dc10cfd0708bac69df8..080aa787ff4a4ffbfa568d968dc236afb45a4378 100644 (file)
  *
  *
  *  History:
- *   0.1  26.06.96  Adapted from baycom.c and made network driver interface
- *        18.10.96  Changed to new user space access routines (copy_{to,from}_user)
- *   0.3  26.04.97  init code/data tagged
- *   0.4  08.07.97  alternative ser12 decoding algorithm (uses delta CTS ints)
- *   0.5  11.11.97  ser12/par96 split into separate files
- *   0.6  24.01.98  Thorsten Kranzkowski, dl8bcu and Thomas Sailer:
- *                  reduced interrupt load in transmit case
- *                  reworked receiver
- *   0.7  03.08.99  adapt to Linus' new __setup/__initcall
- *   0.8  10.08.99  use module_init/module_exit
+ *   0.1  26.06.1996  Adapted from baycom.c and made network driver interface
+ *        18.10.1996  Changed to new user space access routines (copy_{to,from}_user)
+ *   0.3  26.04.1997  init code/data tagged
+ *   0.4  08.07.1997  alternative ser12 decoding algorithm (uses delta CTS ints)
+ *   0.5  11.11.1997  ser12/par96 split into separate files
+ *   0.6  24.01.1998  Thorsten Kranzkowski, dl8bcu and Thomas Sailer:
+ *                    reduced interrupt load in transmit case
+ *                    reworked receiver
+ *   0.7  03.08.1999  adapt to Linus' new __setup/__initcall
+ *   0.8  10.08.1999  use module_init/module_exit
+ *   0.9  12.02.2000  adapted to softnet driver interface
  */
 
 /*****************************************************************************/
@@ -86,8 +87,8 @@
 /* --------------------------------------------------------------------- */
 
 static const char bc_drvname[] = "baycom_ser_fdx";
-static const char bc_drvinfo[] = KERN_INFO "baycom_ser_fdx: (C) 1996-1999 Thomas Sailer, HB9JNX/AE4WA\n"
-KERN_INFO "baycom_ser_fdx: version 0.7 compiled " __TIME__ " " __DATE__ "\n";
+static const char bc_drvinfo[] = KERN_INFO "baycom_ser_fdx: (C) 1996-2000 Thomas Sailer, HB9JNX/AE4WA\n"
+KERN_INFO "baycom_ser_fdx: version 0.9 compiled " __TIME__ " " __DATE__ "\n";
 
 /* --------------------------------------------------------------------- */
 
index c44395f84c419cac62cda449879c7804d3fd098d..1101b5ac726e6778d786f908fd05093ece1e2e7f 100644 (file)
@@ -3,7 +3,7 @@
 /*
  *     baycom_ser_hdx.c  -- baycom ser12 halfduplex radio modem driver.
  *
- *     Copyright (C) 1996-1999  Thomas Sailer (sailer@ife.ee.ethz.ch)
+ *     Copyright (C) 1996-2000  Thomas Sailer (sailer@ife.ee.ethz.ch)
  *
  *     This program is free software; you can redistribute it and/or modify
  *     it under the terms of the GNU General Public License as published by
  *
  *
  *  History:
- *   0.1  26.06.96  Adapted from baycom.c and made network driver interface
- *        18.10.96  Changed to new user space access routines (copy_{to,from}_user)
- *   0.3  26.04.97  init code/data tagged
- *   0.4  08.07.97  alternative ser12 decoding algorithm (uses delta CTS ints)
- *   0.5  11.11.97  ser12/par96 split into separate files
- *   0.6  14.04.98  cleanups
- *   0.7  03.08.99  adapt to Linus' new __setup/__initcall
- *   0.8  10.08.99  use module_init/module_exit
+ *   0.1  26.06.1996  Adapted from baycom.c and made network driver interface
+ *        18.10.1996  Changed to new user space access routines (copy_{to,from}_user)
+ *   0.3  26.04.1997  init code/data tagged
+ *   0.4  08.07.1997  alternative ser12 decoding algorithm (uses delta CTS ints)
+ *   0.5  11.11.1997  ser12/par96 split into separate files
+ *   0.6  14.04.1998  cleanups
+ *   0.7  03.08.1999  adapt to Linus' new __setup/__initcall
+ *   0.8  10.08.1999  use module_init/module_exit
+ *   0.9  12.02.2000  adapted to softnet driver interface
  */
 
 /*****************************************************************************/
@@ -76,8 +77,8 @@
 /* --------------------------------------------------------------------- */
 
 static const char bc_drvname[] = "baycom_ser_hdx";
-static const char bc_drvinfo[] = KERN_INFO "baycom_ser_hdx: (C) 1996-1999 Thomas Sailer, HB9JNX/AE4WA\n"
-KERN_INFO "baycom_ser_hdx: version 0.7 compiled " __TIME__ " " __DATE__ "\n";
+static const char bc_drvinfo[] = KERN_INFO "baycom_ser_hdx: (C) 1996-2000 Thomas Sailer, HB9JNX/AE4WA\n"
+KERN_INFO "baycom_ser_hdx: version 0.9 compiled " __TIME__ " " __DATE__ "\n";
 
 /* --------------------------------------------------------------------- */
 
@@ -597,7 +598,7 @@ static int baycom_ioctl(struct net_device *dev, struct ifreq *ifr,
                return 0;
 
        case HDLCDRVCTL_SETMODE:
-               if (dev->start || !suser())
+               if (test_bit(LINK_STATE_START, &dev->state) || !suser())
                        return -EACCES;
                hi->data.modename[sizeof(hi->data.modename)-1] = '\0';
                return baycom_setmode(bc, hi->data.modename);
index 6ef76bcdfc0e81b242fcb503c353676ba9b77c7c..e35eddb449c180d4dfc1a2ec29841ad2f78de03c 100644 (file)
  *     Written 1993-94 by Donald Becker.
  *
  *  History:
- *   0.1  21.09.96  Started
- *        18.10.96  Changed to new user space access routines 
- *                  (copy_{to,from}_user)
- *   0.2  21.11.96  various small changes
- *   0.3  03.03.97  fixed (hopefully) IP not working with ax.25 as a module
- *   0.4  16.04.97  init code/data tagged
- *   0.5  30.07.97  made HDLC buffers bigger (solves a problem with the
- *                  soundmodem driver)
- *   0.6  05.04.98  add spinlocks
- *   0.7  03.08.99  removed some old compatibility cruft
+ *   0.1  21.09.1996  Started
+ *        18.10.1996  Changed to new user space access routines 
+ *                    (copy_{to,from}_user)
+ *   0.2  21.11.1996  various small changes
+ *   0.3  03.03.1997  fixed (hopefully) IP not working with ax.25 as a module
+ *   0.4  16.04.1997  init code/data tagged
+ *   0.5  30.07.1997  made HDLC buffers bigger (solves a problem with the
+ *                    soundmodem driver)
+ *   0.6  05.04.1998  add spinlocks
+ *   0.7  03.08.1999  removed some old compatibility cruft
+ *   0.8  12.02.2000  adapted to softnet driver interface
  */
 
 /*****************************************************************************/
@@ -789,7 +790,6 @@ static int hdlcdrv_probe(struct net_device *dev)
        dev->get_stats = hdlcdrv_get_stats;
 
        /* Fill in the fields of the device structure */
-
        dev_init_buffers(dev);
 
        s->skb = NULL;
@@ -809,6 +809,7 @@ static int hdlcdrv_probe(struct net_device *dev)
        dev->addr_len = AX25_ADDR_LEN;     /* sizeof an ax.25 address */
        memcpy(dev->broadcast, ax25_bcast, AX25_ADDR_LEN);
        memcpy(dev->dev_addr, ax25_nocall, AX25_ADDR_LEN);
+       dev->tx_queue_len = 16;
 
        /* New style flags */
        dev->flags = 0;
@@ -897,8 +898,8 @@ MODULE_DESCRIPTION("Packet Radio network interface HDLC encoder/decoder");
 
 int __init init_module(void)
 {
-       printk(KERN_INFO "hdlcdrv: (C) 1996 Thomas Sailer HB9JNX/AE4WA\n");
-       printk(KERN_INFO "hdlcdrv: version 0.7 compiled " __TIME__ " " __DATE__ "\n");
+       printk(KERN_INFO "hdlcdrv: (C) 1996-2000 Thomas Sailer HB9JNX/AE4WA\n");
+       printk(KERN_INFO "hdlcdrv: version 0.8 compiled " __TIME__ " " __DATE__ "\n");
        return 0;
 }
 
index a4dea336690a0ae7dd07e803c1ff82bfa784d0f8..2a8796260b6e479804015125450ae184168567ff 100644 (file)
  *
  *
  *  History:
- *   0.1  21.09.96  Started
- *        18.10.96  Changed to new user space access routines (copy_{to,from}_user)
- *   0.4  21.01.97  Separately compileable soundcard/modem modules
- *   0.5  03.03.97  fixed LPT probing (check_lpt result was interpreted the wrong way round)
- *   0.6  16.04.97  init code/data tagged
- *   0.7  30.07.97  fixed halfduplex interrupt handlers/hotfix for CS423X
- *   0.8  14.04.98  cleanups
- *   0.9  03.08.99  adapt to Linus' new __setup/__initcall
- *                  use parport lowlevel drivers instead of directly writing to a parallel port
- *                  removed some pre-2.2 kernel compatibility cruft
- *   0.10 10.08.99  Check if parport can do SPP and is safe to access during interrupt contexts
+ *   0.1  21.09.1996  Started
+ *        18.10.1996  Changed to new user space access routines (copy_{to,from}_user)
+ *   0.4  21.01.1997  Separately compileable soundcard/modem modules
+ *   0.5  03.03.1997  fixed LPT probing (check_lpt result was interpreted the wrong way round)
+ *   0.6  16.04.1997  init code/data tagged
+ *   0.7  30.07.1997  fixed halfduplex interrupt handlers/hotfix for CS423X
+ *   0.8  14.04.1998  cleanups
+ *   0.9  03.08.1999  adapt to Linus' new __setup/__initcall
+ *                    use parport lowlevel drivers instead of directly writing to a parallel port
+ *                    removed some pre-2.2 kernel compatibility cruft
+ *   0.10 10.08.1999  Check if parport can do SPP and is safe to access during interrupt contexts
+ *   0.11 12.02.2000  adapted to softnet driver interface
  */
 
 /*****************************************************************************/
@@ -63,8 +64,8 @@
 /* --------------------------------------------------------------------- */
 
 /*static*/ const char sm_drvname[] = "soundmodem";
-static const char sm_drvinfo[] = KERN_INFO "soundmodem: (C) 1996-1999 Thomas Sailer, HB9JNX/AE4WA\n"
-KERN_INFO "soundmodem: version 0.9 compiled " __TIME__ " " __DATE__ "\n";
+static const char sm_drvinfo[] = KERN_INFO "soundmodem: (C) 1996-2000 Thomas Sailer, HB9JNX/AE4WA\n"
+KERN_INFO "soundmodem: version 0.11 compiled " __TIME__ " " __DATE__ "\n";
 
 /* --------------------------------------------------------------------- */
 
index 17a01334c43c7979fd6664564fa2f6c56407d705..25efb4ae435c6ab2b74292ba798319c2478ae762 100644 (file)
@@ -96,11 +96,6 @@ static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
 #else
 #define PCI_SUPPORT_VER2
 #endif
-#if LINUX_VERSION_CODE < 0x20159
-#define dev_free_skb(skb) dev_kfree_skb(skb, FREE_WRITE);
-#else
-#define dev_free_skb(skb) dev_kfree_skb(skb);
-#endif
 
 /* The I/O extent. */
 #define RTL8129_TOTAL_SIZE 0x80
@@ -1322,7 +1317,7 @@ rtl8129_close(struct net_device *dev)
                if (skb) {
                        if (mapping)
                                pci_unmap_single(tp->pdev, mapping, skb->len);
-                       dev_free_skb(skb);
+                       dev_kfree_skb(skb);
                }
                tp->tx_info[i].skb = NULL;
                tp->tx_info[i].mapping = 0;
index 37cf755edbd61dd331ab730f22b99c3e9e56e6c1..e6eb9492c85f0d915c1b45d7aa91c9efd33e3462 100644 (file)
@@ -86,8 +86,6 @@ static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
 
 #define RUN_AT(x) (jiffies + (x))
 
-#define DEV_FREE_SKB(skb) dev_kfree_skb(skb);
-
 /* The PCI I/O space extent. */
 #define YELLOWFIN_TOTAL_SIZE 0x100
 
@@ -858,7 +856,7 @@ static void yellowfin_interrupt(int irq, void *dev_instance, struct pt_regs *reg
                        if (yp->tx_ring[entry].status == 0)
                                break;
                        /* Free the original skb. */
-                       DEV_FREE_SKB(yp->tx_skbuff[entry]);
+                       dev_kfree_skb_irq(yp->tx_skbuff[entry]);
                        yp->tx_skbuff[entry] = 0;
                        yp->stats.tx_packets++;
                }
@@ -921,7 +919,7 @@ static void yellowfin_interrupt(int irq, void *dev_instance, struct pt_regs *reg
                                }
 
                                /* Free the original skb. */
-                               DEV_FREE_SKB(yp->tx_skbuff[entry]);
+                               dev_kfree_skb_irq(yp->tx_skbuff[entry]);
                                yp->tx_skbuff[entry] = 0;
                                /* Mark status as empty. */
                                yp->tx_status[entry].tx_errs = 0;
@@ -1193,13 +1191,13 @@ static int yellowfin_close(struct net_device *dev)
                yp->rx_ring[i].cmd = CMD_STOP;
                yp->rx_ring[i].addr = 0xBADF00D0; /* An invalid address. */
                if (yp->rx_skbuff[i]) {
-                       DEV_FREE_SKB(yp->rx_skbuff[i]);
+                       dev_kfree_skb(yp->rx_skbuff[i]);
                }
                yp->rx_skbuff[i] = 0;
        }
        for (i = 0; i < TX_RING_SIZE; i++) {
                if (yp->tx_skbuff[i])
-                       DEV_FREE_SKB(yp->tx_skbuff[i]);
+                       dev_kfree_skb(yp->tx_skbuff[i]);
                yp->tx_skbuff[i] = 0;
        }
 
index a897c959713a8aca7604f70cacdaaca6ba2942b7..ff3ea3cf5a91df6fcfb20d28e410a21c00552a10 100644 (file)
@@ -720,7 +720,7 @@ static int sd_init_onedisk(int i)
                                SCpnt->sense_buffer[2] = 0;
 
                                scsi_wait_cmd(SCpnt, (void *) cmd, (void *) buffer,
-                                           512, SD_TIMEOUT, MAX_RETRIES);
+                                           0/*512*/, SD_TIMEOUT, MAX_RETRIES);
                        }
                        spintime = 1;
                        spintime_value = jiffies;
index 56fe88bba327e0a68ebd5d3b9fd026f034d4d224..bbe134c28c25489a75db93cb3bd0dfc50bb2b9e9 100644 (file)
@@ -18,8 +18,8 @@ extern unsigned int local_irq_count;
  */
 #define in_interrupt()  ((local_irq_count + local_bh_count) != 0)
 
-#define hardirq_trylock(cpu)   (local_irq_count == 0)
-#define hardirq_endlock(cpu)   do { } while (0)
+#define hardirq_trylock(cpu)   ((void)(cpu), local_irq_count == 0)
+#define hardirq_endlock(cpu)   do { (void)(cpu); } while (0)
 
 #define hardirq_enter(cpu)     (local_irq_count++)
 #define hardirq_exit(cpu)      (local_irq_count--)
index daff61ac48567550ef5250adc0acb29222a484ad..58597a028bbc56d62ec80feae45a9612def48177 100644 (file)
@@ -25,11 +25,11 @@ extern unsigned int local_irq_count;
 
 #ifndef __SMP__
 
-#define hardirq_trylock(cpu)   (local_irq_count == 0)
-#define hardirq_endlock(cpu)   do { } while(0)
+#define hardirq_trylock(cpu)   ((void)(cpu), local_irq_count == 0)
+#define hardirq_endlock(cpu)   do { (void)(cpu); } while(0)
 
-#define hardirq_enter(cpu)     (local_irq_count++)
-#define hardirq_exit(cpu)      (local_irq_count--)
+#define hardirq_enter(cpu)     ((void)(cpu), local_irq_count++)
+#define hardirq_exit(cpu)      ((void)(cpu), local_irq_count--)
 
 #define synchronize_irq()      barrier()
 
@@ -73,7 +73,7 @@ static inline int hardirq_trylock(int cpu)
                ! spin_is_locked (&global_irq_lock));
 }
 
-#define hardirq_endlock(cpu)   do { } while (0)
+#define hardirq_endlock(cpu)   do { (void)(cpu); } while (0)
 
 extern void synchronize_irq(void);
 
index 29a42aef8fe9cb63f6665c8a34f3e49dd10d633d..5729020695f54ea69ba7051300387f38592a034c 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <linux/kernel.h>
 #include <linux/smp.h>
+#include <linux/cache.h>
 #include <asm/bitops.h>
 #include <asm/atomic.h>
 
index 7392910d39fe72f6e8a9bdc47a7f85c3a9a90dfb..4256df6d9519f364510677d6010071454fd346cb 100644 (file)
@@ -6,7 +6,12 @@
 
 #ifdef CONFIG_KMOD
 extern int request_module(const char * name);
+extern int exec_usermodehelper(char *program_path, char *argv[], char *envp[]);
 #else
 #define request_module(x) do {} while(0)
+extern inline int exec_usermodehelper(char *program_path, char *argv[], char *envp[])
+{
+       return -EACCES;
+}
 #endif
 
index 3905728e4ea2855386695db6ace76154325720e7..f0a220f725453846068abf5ddd0be7915bce6882 100644 (file)
@@ -125,6 +125,7 @@ enum {
 
 extern const char *if_port_text[];
 
+#include <linux/cache.h>
 #include <linux/skbuff.h>
 
 struct neighbour;
index 92519ee886036cb5ef73ba4d2a56b8a1ef8dddf6..3bc870fc45f0fb9d6b18afa0f1d043e510244a29 100644 (file)
@@ -35,6 +35,7 @@
 
 #include <linux/config.h>
 #include <linux/timer.h>
+#include <linux/cache.h>
 #include <linux/in.h>          /* struct sockaddr_in */
 
 #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
index 22c7509a877f6e72b14c8ecefbbbf40de6be33dc..dca806e9434d9aeeebde4df4f41597d6801c3f1f 100644 (file)
@@ -63,10 +63,8 @@ use_init_fs_context(void)
        unlock_kernel();
 }
 
-static int exec_modprobe(void * module_name)
+int exec_usermodehelper(char *program_path, char *argv[], char *envp[])
 {
-       static char * envp[] = { "HOME=/", "TERM=linux", "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL };
-       char *argv[] = { modprobe_path, "-s", "-k", (char*)module_name, NULL };
        int i;
 
        current->session = 1;
@@ -101,13 +99,24 @@ static int exec_modprobe(void * module_name)
        set_fs(KERNEL_DS);
 
        /* Go, go, go... */
-       if (execve(modprobe_path, argv, envp) < 0) {
+       if (execve(program_path, argv, envp) < 0)
+               return -errno;
+       return 0;
+}
+
+static int exec_modprobe(void * module_name)
+{
+       static char * envp[] = { "HOME=/", "TERM=linux", "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL };
+       char *argv[] = { modprobe_path, "-s", "-k", (char*)module_name, NULL };
+       int ret;
+
+       ret = exec_usermodehelper(modprobe_path, argv, envp);
+       if (ret) {
                printk(KERN_ERR
                       "kmod: failed to exec %s -s -k %s, errno = %d\n",
                       modprobe_path, (char*) module_name, errno);
-               return -errno;
        }
-       return 0;
+       return ret;
 }
 
 /*
index b1d76f7a5e02a7a948bc4fb6b475aff353d2a169..2838a23ac5736bf722e457892d63042826b972d0 100644 (file)
@@ -74,6 +74,7 @@ __attribute__((section("__ksymtab"))) = {
 
 #ifdef CONFIG_KMOD
 EXPORT_SYMBOL(request_module);
+EXPORT_SYMBOL(exec_usermodehelper);
 #endif
 
 #ifdef CONFIG_MODULES
index 95e4d8e17a6e8eb39010de73a3e2ce27a344139e..a0307bbd62a6b1cdf4a3fa3c5450aa5942ff06e2 100644 (file)
@@ -4,7 +4,7 @@
  *     Authors:        Alan Cox <iiitac@pyr.swan.ac.uk>
  *                     Florian La Roche <rzsfl@rz.uni-sb.de>
  *
- *     Version:        $Id: skbuff.c,v 1.66 2000/02/09 21:11:30 davem Exp $
+ *     Version:        $Id: skbuff.c,v 1.67 2000/02/11 22:27:23 davem Exp $
  *
  *     Fixes:  
  *             Alan Cox        :       Fixed the worst of the load balancer bugs.
@@ -49,6 +49,7 @@
 #include <linux/string.h>
 #include <linux/skbuff.h>
 #include <linux/slab.h>
+#include <linux/cache.h>
 #include <linux/init.h>
 
 #include <net/ip.h>
index a5237a71297963fa9a6428208bda5b5c6af2d095..1b16e77348d3d527b47a572a097a09480b373c1e 100644 (file)
@@ -2080,8 +2080,8 @@ void __init decnet_proto_init(struct net_proto *pro)
 #ifdef CONFIG_DECNET_RAW
        proc_net_create("decnet_raw", 0, dn_raw_get_info);
 #endif
-       dn_dev_init();
        dn_neigh_init();
+       dn_dev_init();
        dn_route_init();
 
 #ifdef CONFIG_DECNET_ROUTER
@@ -2149,8 +2149,8 @@ void __exit cleanup_module(void)
        unregister_netdevice_notifier(&dn_dev_notifier);
 
        dn_route_cleanup();
-       dn_neigh_cleanup();
        dn_dev_cleanup();
+       dn_neigh_cleanup();
 
 #ifdef CONFIG_DECNET_ROUTER
        dn_fib_cleanup();
index 470f47e7e8e6ddf76f7acdbfdc70821ee8c78dce..25a71d5f04d081355b7af18b2e21823d2fde73f9 100644 (file)
@@ -5,7 +5,7 @@
  *
  *             Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:    $Id: tcp_ipv4.c,v 1.199 2000/02/08 21:27:17 davem Exp $
+ * Version:    $Id: tcp_ipv4.c,v 1.200 2000/02/11 22:27:26 davem Exp $
  *
  *             IPv4 specific functions
  *
@@ -51,6 +51,7 @@
 #include <linux/types.h>
 #include <linux/fcntl.h>
 #include <linux/random.h>
+#include <linux/cache.h>
 #include <linux/init.h>
 
 #include <net/icmp.h>
index d4486c59bd382c5d131955607fed666eca814374..edaf48a3b46f4b17a594384bc1bce4b89cfccf52 100644 (file)
@@ -69,6 +69,7 @@
 #include <linux/wanrouter.h>
 #include <linux/init.h>
 #include <linux/poll.h>
+#include <linux/cache.h>
 
 #if defined(CONFIG_KMOD) && defined(CONFIG_NET)
 #include <linux/kmod.h>
index 131f37f46cc0c7adc2f1892255a81958b2b612df..d63024983a7a753a422614e1148670090f361b38 100644 (file)
@@ -64,7 +64,6 @@ static int            svc_udp_sendto(struct svc_rqst *);
 static inline void
 svc_serv_enqueue(struct svc_serv *serv, struct svc_rqst *rqstp)
 {
-       BUG_TRAP(spin_is_locked(&serv->sv_lock));
        rpc_append_list(&serv->sv_threads, rqstp);
 }
 
@@ -74,7 +73,6 @@ svc_serv_enqueue(struct svc_serv *serv, struct svc_rqst *rqstp)
 static inline void
 svc_serv_dequeue(struct svc_serv *serv, struct svc_rqst *rqstp)
 {
-       BUG_TRAP(spin_is_locked(&serv->sv_lock));
        rpc_remove_list(&serv->sv_threads, rqstp);
 }
 
@@ -106,8 +104,6 @@ svc_sock_enqueue(struct svc_sock *svsk)
        struct svc_serv *serv = svsk->sk_server;
        struct svc_rqst *rqstp;
 
-       BUG_TRAP(spin_is_locked(&svsk->sk_lock));
-
        /* NOTE: Local BH is already disabled by our caller. */
        spin_lock(&serv->sv_lock);
 
@@ -156,8 +152,6 @@ svc_sock_dequeue(struct svc_serv *serv)
 {
        struct svc_sock *svsk;
 
-       BUG_TRAP(spin_is_locked(&serv->sv_lock));
-
        if ((svsk = serv->sv_sockets) != NULL)
                rpc_remove_list(&serv->sv_sockets, svsk);