]> git.neil.brown.name Git - history.git/commitdiff
Linux 2.2.18pre22 2.2.18pre22
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:22:49 +0000 (15:22 -0500)
committerAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:22:49 +0000 (15:22 -0500)
o Fix HZ assumption in USB hub driver (Oleg Drokin)
o Fix ndisc range check on ipv6 (Dave Miller)
o Clear other fields in qcam VIDIOCGWIN return (Damion de Soto)
o Fix sparc64 includes for socket.h (Solar Designer)
o ELF platform was misset for Pentium IV (Mikael Pettersson)
o ADMTek 985 ident was wrong (Lee Bradshaw)
o Fix filemark status test on scsi tape (Robin Miller)
o Fix file/block when spacing to tape beginning (Kai Maiksara)
o Small ISDN documentation fixes (Kai Germaschewski)
o Resync icn driver with core isdn tree (Kai Germaschewski)
o Fix isdn loopback driver (Kai Germaschewski)
o Fix small leaks in lockd (Trond Myklebust)
o Add Pentium IV rep nop, ident etc (Various folks,
 notably HPA and
 Linda Wang)
o Update sparc default config (Dave Miller)
o Hopefully properly fix the megaraid problem (Willy Tarreau, AMI
 and others)
o Resync tcp bits with Dave (Dave Miller)
o Make cpqarray provide randomness (Nigel Metheringham)
o Fix wavefront symbols bug (Carlos E. Gorges)
o Fix acenic jumbo handling when flushing ring (Val Henson)
o Fix ace_set_mac_addr for littleendian hosts (Stephen Hack)
o Fix assorted typos in the kernel (Andries Brouwer)
o EEPro100 fixes (Dragan Stancevic)
o Fix hisax _setup crash case (David Woodhouse)
o Fix small cdrom driver bugs (Jens Axboe)
o Fix remaining vmalloc corner cases (Ben LaHaise)
o Update USB maintainers (Greg Kroah-Hartman)
o Fix matroxfb doc bug (Pavel Rabel)
o Fix setscheduler lock inversion  (Andrew Morton)
o Fix scsi unload/sg ioctl oops (Paul Clements)

63 files changed:
Documentation/fb/matroxfb.txt
Documentation/isdn/INTERFACE.fax
Documentation/isdn/README
MAINTAINERS
Makefile
arch/i386/kernel/smp.c
arch/sparc/defconfig
arch/sparc64/defconfig
drivers/block/cciss.c
drivers/block/cpqarray.c
drivers/block/ide-cd.c
drivers/char/README.computone
drivers/char/bw-qcam.c
drivers/char/c-qcam.c
drivers/isdn/divert/divert_init.c
drivers/isdn/divert/divert_procfs.c
drivers/isdn/hisax/config.c
drivers/isdn/icn/icn.c
drivers/isdn/icn/icn.h
drivers/isdn/isdn_cards.c
drivers/isdn/isdn_common.c
drivers/isdn/isdnloop/isdnloop.c
drivers/isdn/isdnloop/isdnloop.h
drivers/net/3c59x.c
drivers/net/82596.c
drivers/net/acenic.c
drivers/net/arlan.c
drivers/net/dmfe.c
drivers/net/eepro100.c
drivers/net/lmc/lmc_main.c
drivers/net/ncr885e.h
drivers/net/rclanmtl.h
drivers/net/tulip.c
drivers/scsi/megaraid.c
drivers/scsi/pci2000.c
drivers/scsi/pci2220i.c
drivers/scsi/sd.c
drivers/scsi/sg.c
drivers/scsi/sr.c
drivers/scsi/st.c
drivers/sound/wf_midi.c
drivers/telephony/ixj.c
drivers/telephony/ixj.h
drivers/usb/hub.c
drivers/usb/kaweth.c
drivers/usb/scanner.c
drivers/usb/usb-storage.c
fs/lockd/clntproc.c
fs/lockd/svc4proc.c
fs/lockd/svclock.c
fs/lockd/svcproc.c
fs/lockd/svcshare.c
fs/smbfs/proc.c
include/asm-i386/elf.h
include/asm-i386/processor.h
include/asm-i386/spinlock.h
include/asm-sparc64/socket.h
include/linux/ixjuser.h
include/linux/telephony.h
kernel/sched.c
mm/vmalloc.c
net/ipv4/tcp_output.c
net/ipv6/ndisc.c

index e2a816ee4e9eda832fea99806793c2894c881392..16f5aa42b79cff65553eef5a9a89c764791ee3e0 100644 (file)
@@ -228,7 +228,7 @@ depth:X  - Bits per pixel: 0=text, 4,8,15,16,24 or 32. Default depends on
            `vesa'.
 
 If you know capabilities of your monitor, you can specify some (or all) of
-`pixclk', `fh' and `fv'. In this case, `pixclock' is computed so that
+`maxclk', `fh' and `fv'. In this case, `pixclock' is computed so that
 pixclock <= maxclk, real_fh <= fh and real_fv <= fv.
 
 maxclk:X - maximum dotclock. X can be specified in MHz, kHz or Hz. Default is
index 479344ba0039043c3ef36044b3153ac61ba94bec..7e5731319e30d6b0b5361bff7c94c2952f5d2a97 100644 (file)
@@ -1,10 +1,10 @@
-$Id: INTERFACE.fax,v 1.1 1999/08/11 20:30:28 armin Exp $
+$Id: INTERFACE.fax,v 1.2 2000/08/06 09:22:50 armin Exp $
 
 
 Description of the fax-subinterface between linklevel and hardwarelevel of 
   isdn4linux. 
 
-  The communication between link level (LL) and hardware level (HL) for fax
+  The communication between linklevel (LL) and hardwarelevel (HL) for fax
   is based on the struct T30_s (defined in isdnif.h).
   This struct is allocated in the LL.  
   In order to use fax, the LL provides the pointer to this struct with the 
index 0d3b0b02331bfd9b208180d59a0574386d2fc0f0..6df4d2bb9b55de1a54220cf121f7df798d185057 100644 (file)
@@ -242,7 +242,7 @@ README for the ISDN-subsystem
                                       0 = transparent
                                       1 = transparent with audio features (e.g. DSP)
                                       2 = Fax G3 Class 2 commands (S14 has to be set to 11)
-                                      2 = Fax G3 Class 1 commands (S14 has to be set to 11)
+                                      3 = Fax G3 Class 1 commands (S14 has to be set to 11)
              16   250       Send-Packet-size/16
              17   8         Window-size (not yet implemented)
              18   4         Bit coded register, Service-Octet-1 to accept,
index 471fd8e98c40556005b00181b06c2eee89c1f5a1..3c9c9554805eeeee079972d84133a481449c81ab 100644 (file)
@@ -968,20 +968,114 @@ M:       axboe@suse.de
 L:     linux-kernel@vger.kernel.org
 S:     Maintained
 
-USB HUB AND UHCI DRIVERS
+USB SUBSYSTEM
+P:     Johannes Erdfelt
+M      jerdfelt@valinux.com
+M:     johannes@erdfelt.com
+L:     linux-usb-users@lists.sourceforge.net
+L:     linux-usb-devel@lists.sourceforge.net
+W:     http://www.linux-usb.org
+S:     Supported
+
+USB ACM DRIVER
+P:     Vojtech Pavlik
+M:     vojtech@suse.cz
+L:     linux-usb-users@lists.sourceforge.net
+L:     linux-usb-devel@lists.sourceforge.net
+S:     Supported
+
+USB BLUETOOTH DRIVER
+P:     Greg Kroah-Hartman
+M:     greg@kroah.com
+L:     linux-usb-users@lists.sourceforge.net
+L:     linux-usb-devel@lists.sourceforge.net
+S:     Maintained
+W:     http://www.kroah.com/linux-usb/
+
+USB HID/HIDBP/INPUT DRIVERS
+P:     Vojtech Pavlik
+M:     vojtech@suse.cz
+L:     linux-usb-users@lists.sourceforge.net
+L:     linux-usb-devel@lists.sourceforge.net
+W:     http://www.suse.cz/development/input/
+S:     Supported
+
+USB HUB
 P:     Johannes Erdfelt
 M:     jerdfelt@sventech.com
-L:     linux-usb@suse.com
+L:     linux-usb-users@lists.sourceforge.net
+L:     linux-usb-devel@lists.sourceforge.net
 S:     Maintained
 
 USB OHCI DRIVER
-P:     Gregory P. Smith
-M:     greg@electricrain.com
-M:     greg@suitenine.com
-L:     linux-usb@suse.com
-S:     Maintained (not yet usable)
-W:     http://suitenine.com/usb/
+P:     Roman Weissgaerber
+M:     weissg@vienna.at
+L:     linux-usb-users@lists.sourceforge.net
+L:     linux-usb-devel@lists.sourceforge.net
+S:     Maintained
+
+USB OV511 DRIVER
+P:     Mark McClelland
+M:     mmcclelland@delphi.com
+L:     linux-usb-users@lists.sourceforge.net
+L:     linux-usb-devel@lists.sourceforge.net
+W:     http://alpha.dyndns.org/ov511/
+S:     Maintained
 
+USB PEGASUS DRIVER
+P:     Petko Manolov
+M:     petkan@dce.bg
+L:     linux-usb-users@lists.sourceforge.net
+L:     linux-usb-devel@lists.sourceforge.net
+S:     Maintained
+
+USB PRINTER DRIVER
+P:     Vojtech Pavlik
+M:     vojtech@suse.cz
+L:     linux-usb-users@lists.sourceforge.net
+L:     linux-usb-devel@lists.sourceforge.net
+S:     Supported
+
+USB SERIAL DIGI ACCELEPORT DRIVER
+P:     Peter Berger and Al Borchers
+M:     pberger@brimson.com
+M:     alborchers@steinerpoint.com
+L:     linux-usb-users@lists.sourceforge.net
+L:     linux-usb-devel@lists.sourceforge.net
+S:     Supported
+
+USB SERIAL KEYSPAN DRIVER
+P:     Hugh Blemings
+M:     hugh@linuxcare.com
+L:     linux-usb-users@lists.sourceforge.net
+L:     linux-usb-devel@lists.sourceforge.net
+S:     Maintained
+W:     http://www.linuxcare.com.au/hugh/keyspan.html
+
+USB SERIAL DRIVER
+P:     Greg Kroah-Hartman
+M:     greg@kroah.com
+L:     linux-usb-users@lists.sourceforge.net
+L:     linux-usb-devel@lists.sourceforge.net
+S:     Maintained
+W:     http://www.kroah.com/linux-usb/
+
+USB MASS STORAGE DRIVER
+P:     Matthew Dharm
+M:     mdharm-usb@one-eyed-alien.net
+L:     linux-usb-users@lists.sourceforge.net
+L:     linux-usb-devel@lists.sourceforge.net
+S:     Maintained
+W:     http://www.one-eyed-alien.net/~mdharm/linux-usb/
+
+USB UHCI DRIVER
+P:     Georg Acher
+M:     usb@in.tum.de
+L:     linux-usb-users@lists.sourceforge.net
+L:     linux-usb-devel@lists.sourceforge.net
+W:     http://usb.in.tum.de
+S:     Maintained
+       
 VFAT FILESYSTEM:
 P:     Gordon Chaffee
 M:     chaffee@cs.berkeley.edu
index 2e646ce411b98dc10ac41ca2858f9985c5737299..7ca99b444ab61a475b511b1f705248d67c8f4297 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 2
 SUBLEVEL = 18
-EXTRAVERSION = pre21
+EXTRAVERSION = pre22
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
index 004ada11f9fb565a03c8f4ada74431e3f28f1d9b..cbcbf45c4d1dbcb5a6b8b841f96ab18253bb942b 100644 (file)
@@ -220,6 +220,8 @@ static char *mpc_family(int family,int model)
                return("Pentium(tm)");
        if (family==0x0F && model==0x0F)
                return("Special controller");
+       if (family==0x0F && model==0x00)
+               return("Pentium 4(tm)");
        if (family==0x04 && model<9)
                return model_defs[model];
        sprintf(n,"Unknown CPU [%d:%d]",family, model);
@@ -1120,7 +1122,8 @@ int __init start_secondary(void *unused)
         */
        smp_callin();
        while (!atomic_read(&smp_commenced))
-               /* nothing */ ;
+               rep_nop() /* bus friendly nothing */ ;
+               
        return cpu_idle(NULL);
 }
 
index 10163c632aed7d360ad87a69d6edda957017c250..8aebe64385c09696ae3883897afc1e3be103310a 100644 (file)
@@ -19,6 +19,7 @@ CONFIG_KMOD=y
 #
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
+CONFIG_SPARC32=y
 # CONFIG_AP1000 is not set
 # CONFIG_SMP is not set
 # CONFIG_SUN4 is not set
@@ -69,8 +70,8 @@ CONFIG_SUN_AURORA=m
 #
 # CONFIG_SPARCAUDIO is not set
 # CONFIG_SPARCAUDIO_AMD7930 is not set
-# CONFIG_SPARCAUDIO_CS4231 is not set
 # CONFIG_SPARCAUDIO_DBRI is not set
+# CONFIG_SPARCAUDIO_CS4231 is not set
 # CONFIG_SPARCAUDIO_DUMMY is not set
 CONFIG_SUN_OPENPROMFS=m
 CONFIG_NET=y
@@ -260,11 +261,12 @@ CONFIG_SGI_PARTITION=y
 #
 CONFIG_CODA_FS=m
 CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
 CONFIG_NFSD=m
-# CONFIG_NFSD_SUN is not set
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_TCP is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
-CONFIG_NFS_V3=y
 CONFIG_SMB_FS=m
 # CONFIG_SMB_NLS_DEFAULT is not set
 CONFIG_NCP_FS=m
index b6e91bcfdebab44735702ffff89d287a93e8a1ba..65690f506f38d52aafaabca288d441acaf52c668 100644 (file)
@@ -319,6 +319,7 @@ CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 CONFIG_NFSD=m
 CONFIG_NFSD_V3=y
+# CONFIG_NFSD_TCP is not set
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
 CONFIG_SMB_FS=m
index 37f2709d40b9b4585b5095d1b1fce9875dd85e30..74fcd4939bc70a607e570052de9f637e649febd5 100644 (file)
@@ -1799,7 +1799,9 @@ int cciss_init(void)
                }
                /* make sure the board interrupts are off */
                hba[i]->access.set_intr_mask(hba[i], CCISS_INTR_OFF);
-               if( request_irq(hba[i]->intr, do_cciss_intr, SA_INTERRUPT|SA_SHIRQ, hba[i]->devname, hba[i]))
+               if( request_irq(hba[i]->intr, do_cciss_intr,
+                               SA_INTERRUPT|SA_SHIRQ|SA_SAMPLE_RANDOM,
+                               hba[i]->devname, hba[i]))
                {
                        printk(KERN_ERR "ciss: Unable to get irq %d for %s\n",
                                hba[i]->intr, hba[i]->devname);
index e79ab275e7e6854a63240ad9ee97f34a59ab7569..f3db6f02aba8dacfdd6025c8089a42677c8bde12 100644 (file)
@@ -455,7 +455,8 @@ int cpqarray_init(void)
 
                hba[i]->access.set_intr_mask(hba[i], 0);
                if (request_irq(hba[i]->intr, do_ida_intr,
-                       SA_INTERRUPT|SA_SHIRQ, hba[i]->devname, hba[i])) {
+                               SA_INTERRUPT|SA_SHIRQ|SA_SAMPLE_RANDOM,
+                               hba[i]->devname, hba[i])) {
 
                        printk(KERN_ERR "cpqarray: Unable to get irq %d for %s\n", 
                                hba[i]->intr, hba[i]->devname);
index 2e32b34e622ac6112d8f55451635a1918fa5006f..f54dd13561ccf35f497df47728dcbd6e6c8c320b 100644 (file)
@@ -324,41 +324,50 @@ static void cdrom_saw_media_change (ide_drive_t *drive)
        info->nsectors_buffered = 0;
 }
 
+static int cdrom_log_sense(ide_drive_t *drive, struct packet_command *pc,
+                          struct request_sense *sense)
+{
+       int log = 0;
+
+       if (sense == NULL)
+               return 0;
+
+       switch (sense->sense_key) {
+               case NO_SENSE: case RECOVERED_ERROR:
+                       break;
+               case NOT_READY:
+                       /*
+                        * don't care about tray state messages for
+                        * e.g. capacity commands or in-progress or
+                        * becoming ready
+                        */
+                       if (sense->asc == 0x3a || sense->asc == 0x04)
+                               break;
+                       log = 1;
+                       break;
+               case UNIT_ATTENTION:
+                       /*
+                        * Make good and sure we've seen this potential media
+                        * change. Some drives (i.e. Creative) fail to present
+                        * the correct sense key in the error register.
+                        */
+                       cdrom_saw_media_change(drive);
+                       break;
+               default:
+                       log = 1;
+                       break;
+       }
+       return log;
+}
 
 static
 void cdrom_analyze_sense_data(ide_drive_t *drive,
                              struct packet_command *failed_command,
                              struct request_sense *sense)
 {
-       if (sense->sense_key == NOT_READY ||
-           sense->sense_key == UNIT_ATTENTION) {
-               /* Make good and sure we've seen this potential media change.
-                  Some drives (i.e. Creative) fail to present the correct
-                  sense key in the error register. */
-               cdrom_saw_media_change (drive);
-
-
-               /* Don't print not ready or unit attention errors for
-                  READ_SUBCHANNEL.  Workman (and probably other programs)
-                  uses this command to poll the drive, and we don't want
-                  to fill the syslog with useless errors. */
-               if (failed_command &&
-                   (failed_command->c[0] == GPCMD_READ_SUBCHANNEL ||
-                    failed_command->c[0] == GPCMD_TEST_UNIT_READY))
-                       return;
-       }
 
-       if (sense->error_code == 0x70 && sense->sense_key  == 0x02
-        && ((sense->asc      == 0x3a && sense->ascq       == 0x00) ||
-            (sense->asc      == 0x04 && sense->ascq       == 0x01)))
-       {
-               /*
-                * Suppress the following errors:
-                * "Medium not present", "in progress of becoming ready",
-                * and "writing" to keep the noise level down to a dull roar.
-                */
+       if (!cdrom_log_sense(drive, failed_command, sense))
                return;
-       }
 
 #if VERBOSE_IDE_CD_ERRORS
        {
@@ -1105,7 +1114,13 @@ static ide_startstop_t cdrom_seek_intr (ide_drive_t *drive)
 
        if (retry && jiffies - info->start_seek > IDECD_SEEK_TIMER) {
                if (--retry == 0) {
+                       /*
+                        * this condition is far too common, to bother
+                        * users about it
+                        */
+#if 0
                        printk("%s: disabled DSC seek overlap\n", drive->name);
+#endif
                        drive->dsc_overlap = 0;
                }
        }
@@ -1329,8 +1344,12 @@ static ide_startstop_t cdrom_do_packet_command (ide_drive_t *drive)
 static
 void cdrom_sleep (int time)
 {
-       current->state = TASK_INTERRUPTIBLE;
-       schedule_timeout(time);
+       int sleep = time;
+
+       do {
+               set_current_state(TASK_INTERRUPTIBLE);
+               sleep = schedule_timeout(sleep);
+       } while (sleep);
 }
 
 static
@@ -1849,6 +1868,9 @@ static int cdrom_get_toc_entry(ide_drive_t *drive, int track,
        struct atapi_toc *toc = info->toc;
        int ntracks;
 
+       if (!CDROM_STATE_FLAGS(drive)->toc_valid)
+               return -EINVAL;
+
        /* Check validity of requested track number. */
        ntracks = toc->hdr.last_track - toc->hdr.first_track + 1;
        if (toc->hdr.first_track == CDROM_LEADOUT) ntracks = 0;
index 234522f6597431b1fd1f7fd3b2244dbecb0c8deb..f7cd6e1f3d3f650be9424b616c92ffe74a72198c 100644 (file)
@@ -92,7 +92,7 @@ Previously, the driver sources were packaged with a set of patch files
 to update the character drivers' makefile and configuration file, and other 
 kernel source files. A build script (ip2build) was included which applies 
 the patches if needed, and build any utilities needed.
-What you recieve may be a single patch file in conventional kernel
+What you receive may be a single patch file in conventional kernel
 patch format build script. That form can also be applied by
 running patch -p1 < ThePatchFile.  Otherwise the drivers source may be
 a tar file, then untar and run ip2build if a new installation.
index 9cc37a808bb3d39e24e05502fef54b0232ed4e1e..e6204e4630a85a1825f267c4bfa5bae835899a05 100644 (file)
@@ -867,12 +867,9 @@ static int qcam_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
                case VIDIOCGWIN:
                {
                        struct video_window vw;
-                       vw.x=0;
-                       vw.y=0;
+                       memset(&vw, 0, sizeof(vw));
                        vw.width=qcam->width/qcam->transfer_scale;
                        vw.height=qcam->height/qcam->transfer_scale;
-                       vw.chromakey=0;
-                       vw.flags=0;
                        if(copy_to_user(arg, &vw, sizeof(vw)))
                                return -EFAULT;
                        return 0;
index e26336b08f3ec04029d7efd402f9646eaa71f783..f520f87a861d134ef87e19ef8256b54936648edd 100644 (file)
@@ -612,12 +612,9 @@ static int qcam_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
                case VIDIOCGWIN:
                {
                        struct video_window vw;
-                       vw.x=0;
-                       vw.y=0;
+                       memset(&vw, 0, sizeof(vw));
                        vw.width=qcam->width;
                        vw.height=qcam->height;
-                       vw.chromakey=0;
-                       vw.flags=0;
                        if(copy_to_user(arg, &vw, sizeof(vw)))
                                return -EFAULT;
                        return 0;
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 e166ec395e2c951d988491d2eeb2754d743c2b14..776d4c177e6e7b2c18ca469023cbb47dc4371702 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 b60313e51d4ef083438bac3f9ac8f5341649e7f5..99ce02141b9fb4c397a6c729dc0b21f9a275b303 100644 (file)
@@ -619,7 +619,7 @@ HiSax_setup(char *str, int *ints))
                }
                i++;
        }
-       if (strlen(str)) {
+       if (str && *str) {
                strcpy(HiSaxID, str);
                HiSax_id = HiSaxID;
        } else {
index c19d25e6b19ed314f3a97eb0b103155136bebeee..3212a6a8abeb20e541726533729cb597c0e55413 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: icn.c,v 1.62 1999/09/06 07:29:35 fritz 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.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.62 $";
+*revision = "$Revision: 1.65 $";
 
 static int icn_addcard(int, char *, char *);
 
@@ -1865,7 +1651,7 @@ icn_setup(char *str, int *ints)
                portbase = ints[1];
        if (ints[0] > 1)
                membase = ints[2];
-       if (strlen(str)) {
+       if (str && *str) {
                strcpy(sid, str);
                icn_id = sid;
                if ((p = strchr(sid, ','))) {
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 4ee2d4c73925657b75f916ff76aa30555ec79993..14413285fc1c72ce99ade59d979e192d81bb4d7b 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: isdn_cards.c,v 1.11 2000/05/11 22:29:20 kai Exp $
+/* $Id: isdn_cards.c,v 1.13 2000/10/28 23:03:38 kai Exp $
 
  * Linux ISDN subsystem, initialization for non-modularized drivers.
  *
@@ -43,7 +43,9 @@ extern void kcapi_init(void);
 extern void capi_init(void);
 extern void capidrv_init(void);
 #endif
+#if CONFIG_ISDN_DRV_ACT2000
 extern void act2000_init(void);
+#endif
 
 void
 isdn_cards_init(void)
index 60e2664399d34e4b0e125a64fec0800a871c582b..b366dbb6c23c10cb8b5ed645c9d87d777a19b038 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: isdn_common.c,v 1.111 2000/08/20 07:40:14 keil Exp $
+/* $Id: isdn_common.c,v 1.113 2000/11/01 17:54:00 detabc Exp $
 
  * Linux ISDN subsystem, common used functions (linklevel).
  *
@@ -44,9 +44,9 @@
 /* Debugflags */
 #undef ISDN_DEBUG_STATCALLB
 
-isdn_dev *dev = (isdn_dev *) 0;
+isdn_dev *dev;
 
-static char *isdn_revision = "$Revision: 1.111 $";
+static char *isdn_revision = "$Revision: 1.113 $";
 
 extern char *isdn_net_revision;
 extern char *isdn_tty_revision;
@@ -63,7 +63,7 @@ static char *isdn_audio_revision = ": none $";
 extern char *isdn_v110_revision;
 
 #ifdef CONFIG_ISDN_DIVERSION
-isdn_divert_if *divert_if = NULL; /* interface to diversion module */
+isdn_divert_if *divert_if; /* interface to diversion module */
 #endif CONFIG_ISDN_DIVERSION
 
 
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 a81db987fbb958106be3080c8324ed4c4309704f..603e125d70f4f04edbe9f4946362dcd841f6bbb8 100644 (file)
@@ -1245,7 +1245,7 @@ vortex_open(struct device *dev)
                        vp->tx_skbuff[i] = 0;
                outl(0, ioaddr + DownListPtr);
        }
-       /* Set reciever mode: presumably accept b-case and phys addr only. */
+       /* Set receiver mode: presumably accept b-case and phys addr only. */
        set_rx_mode(dev);
        outw(StatsEnable, ioaddr + EL3_CMD); /* Turn on statistics. */
 
index 26998293f1c6f0d162d1dda8d838bb4df1606268..0ad0a99a7db37afd01c8cccac8c99155ff7c1f3e 100644 (file)
@@ -27,6 +27,9 @@
    should be stored as 0x56781234.  This is a real pain, when
    you have linked lists which are shared by the 680x0 and the
    i596.
+   NOTE: This was fixed in Stepping C of the chip. That again
+   means that big-endian should not be used at all: Steppings
+   A1, B and C of the 82596 each have a different big-endian behaviour.
 
    Driver skeleton
    Written 1993 by Donald Becker.
index a3f784f10aeaa60226fb1c049db49455189c8d5f..7d74336060220fb39941661f9747b206d857162b 100644 (file)
@@ -2,7 +2,7 @@
  * acenic.c: Linux driver for the Alteon AceNIC Gigabit Ethernet card
  *           and other Tigon based cards.
  *
- * Copyright 1998-2000 by Jes Sorensen, <Jes.Sorensen@cern.ch>.
+ * Copyright 1998-2000 by Jes Sorensen, <jes@linuxcare.com>.
  *
  * Thanks to Alteon and 3Com for providing hardware and documentation
  * enabling me to write this driver.
  *   Ken Aaker <kdaaker@rchland.vnet.ibm.com>: Correct check for whether
  *                                       memory mapped IO is enabled to
  *                                       make the driver work on RS/6000.
+ *   Stephen Hack <stephen_hack@hp.com>: Fixed ace_set_mac_addr for little
+ *                                       endian systems.
+ *   Val Hensson <vhenson@esscom.com>:   Reset Jumbo skb producer and
+ *                                       rx producer index when
+ *                                       flushing the Jumbo ring.
  */
 
 #include <linux/config.h>
@@ -607,7 +612,7 @@ int __init acenic_probe (struct net_device *dev)
 }
 
 
-MODULE_AUTHOR("Jes Sorensen <Jes.Sorensen@cern.ch>");
+MODULE_AUTHOR("Jes Sorensen <Jes.Sorensen@linuxcare.com>");
 MODULE_DESCRIPTION("AceNIC/3C985/GA620 Gigabit Ethernet driver");
 MODULE_PARM(link, "1-" __MODULE_STRING(8) "i");
 MODULE_PARM(trace, "1-" __MODULE_STRING(8) "i");
@@ -1073,7 +1078,7 @@ static int __init ace_init(struct net_device *dev)
                        default:
                                printk(KERN_INFO "  Cache line size %i not "
                                       "supported, PCI write and invalidate "
-                                      "disabled\n", L1_CACHE_BYTES);
+                                      "disabled\n", SMP_CACHE_BYTES);
                                ap->pci_command &= ~PCI_COMMAND_INVALIDATE;
                                pci_write_config_word(ap->pdev, PCI_COMMAND,
                                                      ap->pci_command);
@@ -1827,7 +1832,20 @@ static u32 ace_handle_event(struct net_device *dev, u32 evtcsm, u32 evtprd)
                                        ap->skb->rx_jumbo_skbuff[i].skb = NULL;
                                }
                        }
+
+                       if (ACE_IS_TIGON_I(ap)) {
+                               struct cmd cmd;
+                               cmd.evt = C_SET_RX_JUMBO_PRD_IDX;
+                               cmd.code = 0;
+                               cmd.idx = 0;
+                               ace_issue_cmd(ap->regs, &cmd);
+                       } else {
+                               writel(0, &((ap->regs)->RxJumboPrd));
+                               wmb();
+                       }
+
                        ap->jumbo = 0;
+                       ap->rx_jumbo_skbprd = 0;
                        printk(KERN_INFO "%s: Jumbo ring flushed\n",
                               dev->name);
                        if (!ap->tx_full)
@@ -2553,7 +2571,7 @@ static int ace_set_mac_addr(struct net_device *dev, void *p)
 {
        struct sockaddr *addr=p;
        struct ace_regs *regs;
-       u16 *da;
+       u8 *da;
        struct cmd cmd;
 
        if(netif_running(dev))
@@ -2561,11 +2579,11 @@ static int ace_set_mac_addr(struct net_device *dev, void *p)
 
        memcpy(dev->dev_addr, addr->sa_data,dev->addr_len);
 
-       da = (u16 *)dev->dev_addr;
+       da = (u8 *)dev->dev_addr;
 
        regs = ((struct ace_private *)dev->priv)->regs;
-       writel(da[0], &regs->MacAddrHi);
-       writel((da[1] << 16) | da[2], &regs->MacAddrLo);
+       writel(da[0] << 8 | da[1], &regs->MacAddrHi);
+       writel((da[2] << 24) | (da[3] << 16) | (da[4] << 8) | da[5] , &regs->MacAddrLo);
 
        cmd.evt = C_SET_MAC_ADDR;
        cmd.code = 0;
index abab7603b79b482fa578a3d6c6c8145f7b39e30e..025dabb29964bdc0a89853d581a2868bb1c7d259 100644 (file)
@@ -1784,7 +1784,7 @@ static void arlan_rx_interrupt(struct device *dev, u_char rxStatus, u_short rxOf
                break;
                
                default:
-                       printk(KERN_ERR "arlan intr: recieved unknown status\n");
+                       printk(KERN_ERR "arlan intr: received unknown status\n");
                        priv->stats.rx_crc_errors++;
                        break;
        }
index a6ee66c3427676e01ad37ee6b14481ddfbb568a2..a8ac5dcc2d0531a836b089de1fa692c67a773d31 100644 (file)
@@ -183,7 +183,7 @@ struct dmfe_board_info {
        u8 link_failed;         /* Ever link failed */
        u8 wait_reset;          /* Hardware failed, need to reset */
        u8 in_reset_state;      /* Now driver in reset routine */
-       u8 rx_error_cnt;        /* recievd abnormal case count */
+       u8 rx_error_cnt;        /* received abnormal case count */
        u8 dm910x_chk_mode;     /* Operating mode check */
        struct timer_list timer;
        struct enet_statistics stats;   /* statistic counter */
index d726acb0f20f1a6addc5c65bb84b88197e0977dd..6110d8e3582ee97bac0f8af5d57f6a473bce1083 100644 (file)
@@ -1,5 +1,3 @@
-#define USE_IO
-
 /* drivers/net/eepro100.c: An Intel i82557-559 Ethernet driver for Linux. */
 /*
    NOTICE: this version of the driver is supposed to work with 2.2 kernels.
        2000 May 30  Dragan Stancevic <visitor@valinux.com> and
                                 Andrey Moruga <moruga@sw.com.sg>
                Honor PortReset timing specification.
+       2000 Jul 25  Dragan Stancevic <visitor@valinux.com>
+               Changed to MMIO, resized FIFOs, resized rings, changed ISR timeout
+               Problem reported by:
+               Marc MERLIN <merlin@valinux.com>
+       2000 Nov 15  Dragan Stancevic <visitor@valinux.com>
+               Changed command completion time and added debug info as to which
+               CMD timed out. Problem reported by:
+               "Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de>
 */
 
+/*#define USE_IO*/
 static const char *version =
 "eepro100.c:v1.09j-t 9/29/99 Donald Becker http://cesdis.gsfc.nasa.gov/linux/drivers/eepro100.html\n"
-"eepro100.c: $Revision: 1.20.2.10 $ 2000/05/31 Modified by Andrey V. Savochkin <saw@saw.sw.com.sg> and others\n";
+"eepro100.c: $Revision: 1.20.2.10 $ 2000/05/31 Modified by Andrey V. Savochkin <saw@saw.sw.com.sg> and others\n"
+"eepro100.c: VA Linux custom, Dragan Stancevic <visitor@valinux.com> 2000/11/15\n";
 
 /* A few user-configurable values that apply to all boards.
    First set is undocumented and spelled per Intel recommendations. */
 
 static int congenb = 0;                /* Enable congestion control in the DP83840. */
-static int txfifo = 8;         /* Tx FIFO threshold in 4 byte units, 0-15 */
-static int rxfifo = 8;         /* Rx FIFO threshold, default 32 bytes. */
+static int txfifo = 0;         /* Tx FIFO threshold in 4 byte units, 0-15 */
+static int rxfifo = 0xF;               /* Rx FIFO threshold, default 32 bytes. */
 /* Tx/Rx DMA burst length, 0-127, 0 == no preemption, tx==128 -> disabled. */
 static int txdmacount = 128;
 static int rxdmacount = 0;
@@ -63,7 +71,7 @@ static int rx_copybreak = 200;
 #endif
 
 /* Maximum events (Rx packets, etc.) to handle at each interrupt. */
-static int max_interrupt_work = 20;
+static int max_interrupt_work = 200;
 
 /* Maximum number of multicast addresses to filter (vs. rx-all-multicast) */
 static int multicast_filter_limit = 64;
@@ -78,8 +86,8 @@ static int debug = -1;                        /* The debug level */
 
 /* A few values that may be tweaked. */
 /* The ring sizes should be a power of two for efficiency. */
-#define TX_RING_SIZE   32
-#define RX_RING_SIZE   32
+#define TX_RING_SIZE   64
+#define RX_RING_SIZE   64
 /* How much slots multicast filter setup may take.
    Do not descrease without changing set_rx_mode() implementaion. */
 #define TX_MULTICAST_SIZE   2
@@ -364,13 +372,21 @@ static inline void io_outw(unsigned int val, unsigned long port)
    Typically this takes 0 ticks. */
 static inline void wait_for_cmd_done(long cmd_ioaddr)
 {
-       int wait = 1000;
+       int wait = 20000;
+       char cmd_reg1, cmd_reg2;
        do   ;
-       while(inb(cmd_ioaddr) && --wait >= 0);
-#ifndef final_version
-       if (wait < 0)
-               printk(KERN_ALERT "eepro100: wait_for_cmd_done timeout!\n");
-#endif
+       while((cmd_reg1 = inb(cmd_ioaddr)) && (--wait >= 0));
+
+       /* Last chance to change your mind --Dragan*/
+       if (wait < 0){
+               cmd_reg2 = inb(cmd_ioaddr);
+               if(cmd_reg2){
+                       printk(KERN_ALERT "eepro100: cmd_wait for(%#2.2x) timedout with(%#2.2x)!\n",
+                               cmd_reg1, cmd_reg2);
+               
+               }
+       }
+
 }
 
 /* Offsets to the various registers.
@@ -1147,8 +1163,10 @@ static void speedo_timer(unsigned long data)
 static void speedo_show_state(struct net_device *dev)
 {
        struct speedo_private *sp = (struct speedo_private *)dev->priv;
+#if 0
        long ioaddr = dev->base_addr;
        int phy_num = sp->phy[0] & 0x1f;
+#endif
        int i;
 
        /* Print a few items for debugging. */
@@ -1508,7 +1526,7 @@ static void speedo_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
                   FCP and ER interrupts --Dragan */
                outw(status & 0xfc00, ioaddr + SCBStatus);
 
-               if (speedo_debug > 4)
+               if (speedo_debug > 3)
                        printk(KERN_DEBUG "%s: interrupt  status=%#4.4x.\n",
                                   dev->name, status);
 
index d08a5f3c4f2ca9f51c6f782e00df5183f8c8512c..d7d1fced22aca95e25f5d7b5e13905a874a18657 100644 (file)
@@ -640,7 +640,7 @@ static void lmc_watchdog (unsigned long data) /*fold00*/
 
 
     /* Make sure the tx jabber and rx watchdog are off,
-     * and the transmit and recieve processes are running.
+     * and the transmit and receive processes are running.
      */
 
     LMC_CSR_WRITE (sc, csr_15, cpu_to_le32(0x00000011));
@@ -2139,7 +2139,7 @@ static void lmc_softreset (lmc_softc_t * const sc) /*fold00*/
 
     lmc_trace(sc->lmc_device, "lmc_softreset in");
 
-    /* Initialize the recieve rings and buffers. */
+    /* Initialize the receive rings and buffers. */
     sc->lmc_txfull = 0;
     sc->lmc_next_rx = 0;
     sc->lmc_next_tx = 0;
index bbcc82e117787894c55192d144c55c0cb4659d8b..b0e1a05d7729248759ff506b8b5080adb2ab414b 100644 (file)
 /*  bits for the above three interrupt registers */
 #define  INTERRUPT_INTE        1<<15   /* interrupt enable */
 #define  INTERRUPT_WI          1<<9    /* wakeup interrupt */
-#define  INTERRUPT_ERI         1<<8    /* early recieve interrupt */
+#define  INTERRUPT_ERI         1<<8    /* early receive interrupt */
 #define  INTERRUPT_PPET        1<<7    /* PCI Tx parity error */
 #define  INTERRUPT_PBFT        1<<6    /* PCI Tx bus fault */
 #define  INTERRUPT_IIDT        1<<5    /* illegal instruction Tx */
index 14a6494e8a6a3143e544057942407941775d44fa..e82961b6f743a141dd235f7910d449224d1c66cd 100644 (file)
@@ -346,7 +346,7 @@ void RCProcI2OMsgQ(u16 AdapterID);
  /*
  ** Disable and Enable I2O interrupts.  I2O interrupts are enabled at Init time
  ** but can be disabled and re-enabled through these two function calls.
- ** Packets will still be put into any posted recieved buffers and packets will
+ ** Packets will still be put into any posted received buffers and packets will
  ** be sent through RCI2OSendPacket() functions.  Disabling I2O interrupts
  ** will prevent hardware interrupt to host even though the outbound I2O msg
  ** queue is not emtpy.
index c0567fffb6b42eaa9f202e5a777d5ba1bec7fd76..e2e67668878de5bb04d1cf511b982c1a40ab1161 100644 (file)
@@ -345,7 +345,7 @@ static struct pci_id_info pci_tbl[] __initdata = {
   { "ADMtek AN981 Comet",
        0x1317, 0x0981, 0xffff, PCI_ADDR0_IO, 256, 32, tulip_probe1 },
   { "ADMtek AN985 Comet",
-       0x1317, 0x0981, 0xffff, PCI_ADDR0_IO, 256, 32, tulip_probe1 },
+       0x1317, 0x0985, 0xffff, PCI_ADDR0_IO, 256, 32, tulip_probe1 },
   { "Compex RL100-TX",
        0x11F6, 0x9881, 0xffff, PCI_ADDR0_IO, 128, 32, tulip_probe1 },
   { "Intel 21145 Tulip",
index f7d2c09507085576c6d946d5f5f3beeaa8054ca3..45eb4dcc0da290769ad6eb7a599b2685373bd855 100644 (file)
@@ -1902,21 +1902,8 @@ int mega_findCard (Scsi_Host_Template * pHostTmpl,
            PCI_FUNC (pciDevFun));
 
     /* Read the base port and IRQ from PCI */
-#if LINUX_VERSION_CODE < 0x20100
-    pcibios_read_config_dword (pciBus, pciDevFun,
-                              PCI_BASE_ADDRESS_0,
-                              (u_int *) & megaBase);
-    pcibios_read_config_byte (pciBus, pciDevFun,
-                             PCI_INTERRUPT_LINE,
-                             &megaIrq);
-#elif LINUX_VERSION_CODE < 0x20300
-    megaBase = pdev->base_address[0];
-    megaIrq  = pdev->irq;
-#else
-
     megaBase = pci_resource_start (pdev, 0);
     megaIrq  = pdev->irq;
-#endif
 
     pciIdx++;
 
index e07417b7e3bed3ca06d577c6b18b65e4d854cfa6..b2478aad80967dd2a5a5d35612050d91cdfd91a0 100644 (file)
@@ -280,7 +280,7 @@ static void Irq_Handler (int irq, void *dev_id, struct pt_regs *regs)
     spin_lock_irqsave (&io_request_lock, flags);
 #endif /* version >= v2.1.95 */
 
-       DEB(printk ("\npci2000 recieved interrupt "));
+       DEB(printk ("\npci2000 received interrupt "));
        for ( z = 0; z < NumAdapters;  z++ )                                                                            // scan for interrupt to process
                {
                if ( PsiHost[z]->irq == (UCHAR)(irq & 0xFF) )
index 76519480ceea310d04bb4d57d3e50237c9c2a2ef..19b0cf2cf1bbcb1e7c80886b9083efdf83198346 100644 (file)
@@ -1655,7 +1655,7 @@ static void Irq_Handler (int irq, void *dev_id, struct pt_regs *regs)
     spin_lock_irqsave (&io_request_lock, flags);
 #endif /* version >= v2.1.95 */
 
-//     DEB (printk ("\npci2220i recieved interrupt\n"));
+//     DEB (printk ("\npci2220i received interrupt\n"));
 
        for ( z = 0; z < NumAdapters;  z++ )                                                            // scan for interrupt to process
                {
index bb99bc1d14d7fece9dc85c0d68ef918d02e592df..28cfe9c14721375730ef7dcabf1db51e2c0e3b2d 100644 (file)
@@ -1775,6 +1775,8 @@ static void sd_detach(Scsi_Device * SDp)
            dpnt->device = NULL;
            dpnt->capacity = 0;
            SDp->attached--;
+            if (SDp->scsi_request_fn == do_sd_request)
+               SDp->scsi_request_fn = NULL;
            sd_template.dev_noticed--;
            sd_template.nr_dev--;
            SD_GENDISK(i).nr_real--;
index 154895425578123e9f66be156055a5c6d1537464..af5ed5665e1e24fa67aab177f8eb47d3b0306832 100644 (file)
@@ -68,7 +68,7 @@
 
 int sg_big_buff = SG_DEF_RESERVED_SIZE; /* sg_big_buff is ro through sysctl */
 /* N.B. This global is here to keep existing software happy. It now holds
-   the size of the reserve buffer of the most recent sucessful sg_open(). 
+   the size of the reserve buffer of the most recent successful sg_open(). 
    Only available when 'sg' compiled into kernel (rather than a module). 
    This is deprecated (use SG_GET_RESERVED_SIZE ioctl() instead). */
 
index 91bc0e88955db09451aa617bfa4a2dda089e27cf..15d65f2e5b71461503b30a6ea782a5ba57f11b90 100644 (file)
@@ -1213,6 +1213,8 @@ static void sr_detach(Scsi_Device * SDp)
                        cpnt->device = NULL;
                        cpnt->capacity = 0;
                        SDp->attached--;
+                        if (SDp->scsi_request_fn == do_sr_request)
+                                SDp->scsi_request_fn = NULL;
                        sr_template.nr_dev--;
                        sr_template.dev_noticed--;
                        sr_sizes[i] = 0;
index e02dcbd28517fdda154d58ebf9ad6e441c0d103d..87e454d91a3aafb47c7ce0dcd7cf9fe15b06ac4e 100644 (file)
@@ -957,7 +957,7 @@ scsi_tape_flush(struct file * filp)
           ((SCpnt->sense_buffer[0] & 0x80) != 0 &&
            (SCpnt->sense_buffer[3] | SCpnt->sense_buffer[4] |
             SCpnt->sense_buffer[5] |
-            SCpnt->sense_buffer[6]) == 0))) {
+            SCpnt->sense_buffer[6]) != 0))) {
          /* Filter out successful write at EOM */
          scsi_release_command(SCpnt);
          SCpnt = NULL;
@@ -2460,7 +2460,7 @@ st_int_ioctl(struct inode * inode,
        STps->eof = ST_NOEOF;
      }
      else if ( (cmd_in == MTBSF) || (cmd_in == MTBSFM) ) {
-       if (fileno >= 0)
+       if (STps->drv_file >= 0)
          STps->drv_file = fileno + undone ;
        else
         STps->drv_file = fileno;
@@ -2488,7 +2488,7 @@ st_int_ioctl(struct inode * inode,
         STps->drv_block = (-1);
        }
        else {
-        if (blkno >= 0)
+        if (STps->drv_block >= 0)
           STps->drv_block = blkno + undone;
         else
           STps->drv_block = (-1);
index a8c6fc829cc984cf68a5d398d6f0b24d01cfc9c4..0fa44ca29ca4a194df488c4a387940000d8a5625 100644 (file)
@@ -803,7 +803,7 @@ virtual_midi_disable (void)
        return 0;
 }
 
-__initfunc (static int detect_wf_mpu (int irq, int io_base))
+__initfunc (int detect_wf_mpu (int irq, int io_base))
 
 {
        if (check_region (io_base, 2)) {
index e4d4fe2a6b6229ada394ad27f041ec0859cd2b8b..9781b068f769ca4da790e13d4eb9757a73f0d3e4 100644 (file)
@@ -732,7 +732,7 @@ static void ixj_timeout(unsigned long ptr)
                                                if (j->m_DAAShadowRegs.XOP_REGS.XOP.xr0.bitreg.Caller_ID) {
                                                        if (j->daa_mode == SOP_PU_RINGING && j->flags.pstn_ringing) {
                                                                j->pstn_cid_intr = 1;
-                                                               j->pstn_cid_recieved = jiffies;
+                                                               j->pstn_cid_received = jiffies;
                                                        }
                                                }
                                        } else {
@@ -740,7 +740,7 @@ static void ixj_timeout(unsigned long ptr)
                                                        daa_int_read(board);
                                                }
                                                j->ex.bits.pstn_ring = 0;
-                                               if (j->pstn_cid_intr && jiffies > j->pstn_cid_recieved + (hertz * 3)) {
+                                               if (j->pstn_cid_intr && jiffies > j->pstn_cid_received + (hertz * 3)) {
                                                        if (j->daa_mode == SOP_PU_RINGING) {
                                                                ixj_daa_cid_read(board);
                                                                j->ex.bits.caller_id = 1;
index ca4e264e62a5f18f33d7ba298f796e49078df081..8b418ee1c33f527a3ca367f3af4215362c05a17d 100644 (file)
@@ -1250,7 +1250,7 @@ typedef struct {
        unsigned char fskz;
        unsigned char fskphase;
        unsigned char fskcnt;
-       unsigned pstn_cid_recieved;
+       unsigned pstn_cid_received;
        PHONE_CID cid;
        PHONE_CID cid_send;
        unsigned long pstn_ring_start;
index 08e84dde4eeda2b0612d26edf7cb9ed43a073e4c..da8aae4d8c63c2cc522c2aaf900670d3f997d45f 100644 (file)
@@ -648,7 +648,7 @@ void usb_hub_cleanup(void)
        ret = kill_proc(khubd_pid, SIGTERM, 1);
        if (!ret) {
                /* Wait 10 seconds */
-               int count = 10 * 100;
+               int count = 10 * HZ;
 
                while (khubd_running && --count) {
                        current->state = TASK_INTERRUPTIBLE;
index c6226e75f5b410753e3776009e28f83c90b481b5..ee3461fa341e4ed84398f6d8c44adb53833b2ccd 100644 (file)
@@ -380,19 +380,19 @@ static int kaweth_set_sofs_wait(struct kaweth_device *kaweth, __u16 sofs_wait)
 }
 
 /****************************************************************
- *     kaweth_set_recieve_filter
+ *     kaweth_set_receive_filter
  ****************************************************************/
-static int kaweth_set_recieve_filter(struct kaweth_device *kaweth, __u16 recieve_filter)
+static int kaweth_set_receive_filter(struct kaweth_device *kaweth, __u16 receive_filter)
 {
        int retval;
 
-       printk("Set recieve filter to %d\n", (unsigned)recieve_filter);
+       printk("Set receive filter to %d\n", (unsigned)receive_filter);
 
        retval = kaweth_control(kaweth,
                                                                        usb_sndctrlpipe(kaweth->dev, 0),
                                                                        KAWETH_COMMAND_SET_PACKET_FILTER,
                                                                        USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
-                                                                       recieve_filter,
+                                                                       receive_filter,
                                                                        0,
                                                                        (void *)&kaweth->firmware_buf,
                                                                        0,
@@ -480,7 +480,7 @@ static int kaweth_reset(struct kaweth_device *kaweth)
        return result;
 }
 
-static void kaweth_usb_recieve(struct urb *);
+static void kaweth_usb_receive(struct urb *);
 
 /****************************************************************
  *     kaweth_resubmit_rx_urb
@@ -498,7 +498,7 @@ static inline void kaweth_resubmit_rx_urb(struct kaweth_device *kaweth)
                                                                usb_rcvbulkpipe(kaweth->dev, 1),
                                                                kaweth->rx_buf,
                                                                KAWETH_BUF_SIZE,
-                                                               kaweth_usb_recieve,
+                                                               kaweth_usb_receive,
                                                                kaweth);
 
 //     kaweth->rx_urb->transfer_flags = USB_DISABLE_SPD | USB_URB_EARLY_COMPLETE;
@@ -510,9 +510,9 @@ static inline void kaweth_resubmit_rx_urb(struct kaweth_device *kaweth)
 }
 
 /****************************************************************
- *     kaweth_usb_recieve
+ *     kaweth_usb_receive
  ****************************************************************/
-static void kaweth_usb_recieve(struct urb *urb)
+static void kaweth_usb_receive(struct urb *urb)
 {
        struct kaweth_device *kaweth = urb->context;
        struct net_device *net = kaweth->net;
@@ -927,13 +927,13 @@ static void *kaweth_probe(struct usb_device *dev, unsigned int ifnum)
                return kaweth;
        }
 
-       result = kaweth_set_recieve_filter(kaweth, KAWETH_PACKET_FILTER_DIRECTED |
+       result = kaweth_set_receive_filter(kaweth, KAWETH_PACKET_FILTER_DIRECTED |
                                                                                                                         KAWETH_PACKET_FILTER_BROADCAST |
                                                                                                                         KAWETH_PACKET_FILTER_MULTICAST);
 
        if(result < 0)
        {
-               printk("Error setting recieve filter\n");
+               printk("Error setting receive filter\n");
 
                return kaweth;
        }
index d326e58922af322180dad3fd4d396380e6678d97..1973a4255ff079dcf73077f64e316dbcd552857b 100644 (file)
@@ -378,7 +378,7 @@ write_scanner(struct file * file, const char * buffer,
                dbg("write stats(%d): result:%d this_write:%d partial:%d", scn_minor, result, this_write, partial);
 
                if (result == USB_ST_TIMEOUT) { /* NAK -- shouldn't happen */
-                       warn("write_scanner: NAK recieved.");
+                       warn("write_scanner: NAK received.");
                        ret = -ETIME;
                        break;
                } else if (result < 0) { /* We should not get any I/O errors */
index 85600c2b1f89835398756eabcd11d2a3f818a191..c09fbe41b14193a870f902293c2a4c55fd29db39 100644 (file)
@@ -458,7 +458,7 @@ static unsigned int us_transfer_length(Scsi_Cmnd *srb, struct us_data *us)
 /* Invoke the transport and basic error-handling/recovery methods
  *
  * This is used by the protocol layers to actually send the message to
- * the device and recieve the response.
+ * the device and receive the response.
  */
 static void invoke_transport(Scsi_Cmnd *srb, struct us_data *us)
 {
@@ -611,7 +611,7 @@ static void CBI_irq(struct urb *urb)
 {
        struct us_data *us = (struct us_data *)urb->context;
 
-       US_DEBUGP("USB IRQ recieved for device on host %d\n", us->host_no);
+       US_DEBUGP("USB IRQ received for device on host %d\n", us->host_no);
        US_DEBUGP("-- IRQ data length is %d\n", urb->actual_length);
        US_DEBUGP("-- IRQ state is %d\n", urb->status);
 
@@ -1615,7 +1615,7 @@ static int usb_stor_control_thread(void * __us)
 
                /* exit if we get a signal to exit */
                if (action == US_ACT_EXIT) {
-                       US_DEBUGP("-- US_ACT_EXIT command recieved\n");
+                       US_DEBUGP("-- US_ACT_EXIT command received\n");
                        break;
                }
        } /* for (;;) */
index eb9b79c4cea90752ac7a542b4fcf495bdf6c4efd..714bf760547b8ac2bdec9c201d7bc9be1c4629d7 100644 (file)
@@ -309,16 +309,14 @@ nlmclnt_call(struct nlm_rqst *req, u32 proc)
 /*
  * Generic NLM call, async version.
  */
-static int
-_nlmclnt_async_call(struct nlm_rqst *req, u32 proc, rpc_action callback,
-                   struct rpc_cred *cred)
+int
+nlmsvc_async_call(struct nlm_rqst *req, u32 proc, rpc_action callback)
 {
        struct nlm_host *host = req->a_host;
        struct rpc_clnt *clnt;
        struct nlm_args *argp = &req->a_args;
        struct nlm_res  *resp = &req->a_res;
        struct rpc_message msg;
-       int             status;
 
        dprintk("lockd: call procedure %s on %s (async)\n",
                        nlm_procname(proc), host->h_name);
@@ -327,42 +325,48 @@ _nlmclnt_async_call(struct nlm_rqst *req, u32 proc, rpc_action callback,
        if ((clnt = nlm_bind_host(host)) == NULL)
                return -ENOLCK;
 
-       /* Increment host refcount */
-        nlm_get_host(host);
-
-        /* bootstrap and kick off the async RPC call */
+       /* bootstrap and kick off the async RPC call */
        msg.rpc_proc = proc;
        msg.rpc_argp = argp;
        msg.rpc_resp =resp;
-       msg.rpc_cred = cred;
-        status = rpc_call_async(clnt, &msg, RPC_TASK_ASYNC, callback, req);
-
-       if (status < 0)
-               nlm_release_host(host);
-       return status;
+       msg.rpc_cred = NULL;    
+       return rpc_call_async(clnt, &msg, RPC_TASK_ASYNC, callback, req);
 }
 
-
 int
 nlmclnt_async_call(struct nlm_rqst *req, u32 proc, rpc_action callback)
 {
+       struct nlm_host *host = req->a_host;
+       struct rpc_clnt *clnt;
        struct nlm_args *argp = &req->a_args;
-       struct file     *filp = argp->lock.fl.fl_file;
-       struct rpc_cred *cred = NULL;
+       struct nlm_res  *resp = &req->a_res;
+       struct file     *file = argp->lock.fl.fl_file;
+       struct rpc_message msg;
+       int             status;
 
-       if (filp)
-               cred = nfs_file_cred(filp);
+       dprintk("lockd: call procedure %s on %s (async)\n",
+                       nlm_procname(proc), host->h_name);
 
-       return _nlmclnt_async_call(req, proc, callback, cred);
-}
+       /* If we have no RPC client yet, create one. */
+       if ((clnt = nlm_bind_host(host)) == NULL)
+               return -ENOLCK;
 
-int
-nlmsvc_async_call(struct nlm_rqst *req, u32 proc, rpc_action callback)
-{
-       return _nlmclnt_async_call(req, proc, callback, NULL);
+       /* bootstrap and kick off the async RPC call */
+       msg.rpc_proc = proc;
+       msg.rpc_argp = argp;
+       msg.rpc_resp =resp;
+       if (file)
+               msg.rpc_cred = nfs_file_cred(file);
+       else
+               msg.rpc_cred = NULL;
+       /* Increment host refcount */
+       nlm_get_host(host);
+       status = rpc_call_async(clnt, &msg, RPC_TASK_ASYNC, callback, req);
+       if (status < 0)
+               nlm_release_host(host);
+       return status;
 }
 
-
 /*
  * TEST for the presence of a conflicting lock
  */
index ab9dbd5e7ea9ec515e841a40588890a880781da3..f8f6dc62c5b34472f686cf1fdb94dd2f0d980cbe 100644 (file)
@@ -450,8 +450,8 @@ nlm4svc_proc_sm_notify(struct svc_rqst *rqstp, struct nlm_reboot *argp,
                if ((clnt = nlmsvc_ops->exp_getclient(&saddr)) != NULL 
                 && (host = nlm_lookup_host(clnt, &saddr, 0, 0)) != NULL) {
                        nlmsvc_free_host_resources(host);
+                       nlm_release_host(host);
                }
-               nlm_release_host(host);
        }
 
        return rpc_success;
@@ -472,7 +472,7 @@ nlm4svc_callback(struct svc_rqst *rqstp, u32 proc, struct nlm_res *resp)
        host = nlmclnt_lookup_host(&rqstp->rq_addr,
                                rqstp->rq_prot, rqstp->rq_vers);
        if (!host) {
-               rpc_free(call);
+               kfree(call);
                return rpc_system_err;
        }
 
@@ -481,9 +481,13 @@ nlm4svc_callback(struct svc_rqst *rqstp, u32 proc, struct nlm_res *resp)
        memcpy(&call->a_args, resp, sizeof(*resp));
 
        if (nlmsvc_async_call(call, proc, nlm4svc_callback_exit) < 0)
-               return rpc_system_err;
+               goto error;
 
        return rpc_success;
+ error:
+       kfree(call);
+       nlm_release_host(host);
+       return rpc_system_err;
 }
 
 static void
@@ -496,7 +500,7 @@ nlm4svc_callback_exit(struct rpc_task *task)
                                        task->tk_pid, -task->tk_status);
        }
        nlm_release_host(call->a_host);
-       rpc_free(call);
+       kfree(call);
 }
 
 /*
index 9ec2c257b9f249272aff60d505af5551e1e2d510..d5e7f33c9b6c6a9537dc7087753b9e5a7459c4ca 100644 (file)
@@ -531,8 +531,10 @@ callback:
        nlmsvc_insert_block(block, jiffies + 30 * HZ);
 
        /* Call the client */
-       nlmsvc_async_call(&block->b_call, NLMPROC_GRANTED_MSG,
-                                               nlmsvc_grant_callback);
+       nlm_get_host(block->b_call.a_host);
+       if (nlmsvc_async_call(&block->b_call, NLMPROC_GRANTED_MSG,
+                                               nlmsvc_grant_callback) < 0)
+               nlm_release_host(block->b_call.a_host);
        up(&file->f_sema);
 }
 
index 3fdce17b0dbebd5a2108c5508eb19e218d64561f..eef85a00196364bea43a41619fb01339a0c97520 100644 (file)
@@ -463,8 +463,8 @@ nlmsvc_proc_sm_notify(struct svc_rqst *rqstp, struct nlm_reboot *argp,
                if ((clnt = nlmsvc_ops->exp_getclient(&saddr)) != NULL 
                 && (host = nlm_lookup_host(clnt, &saddr, 0, 0)) != NULL) {
                        nlmsvc_free_host_resources(host);
+                       nlm_release_host(host);
                }
-               nlm_release_host(host);
        }
 
        return rpc_success;
@@ -494,9 +494,13 @@ nlmsvc_callback(struct svc_rqst *rqstp, u32 proc, struct nlm_res *resp)
        memcpy(&call->a_args, resp, sizeof(*resp));
 
        if (nlmsvc_async_call(call, proc, nlmsvc_callback_exit) < 0)
-               return rpc_system_err;
+               goto error;
 
        return rpc_success;
+ error:
+       nlm_release_host(host);
+       kfree(call);
+       return rpc_system_err;
 }
 
 static void
index 2e387658fefd5b01cf65c0ad18139374bdbf02f9..62ee9f2991fae978eb1d4ce0506d3eebcca7674a 100644 (file)
@@ -54,7 +54,6 @@ nlmsvc_share_file(struct nlm_host *host, struct nlm_file *file,
        share->s_owner.len  = oh->len;
        share->s_next       = file->f_shares;
        file->f_shares      = share;
-       file->f_count      += 1;
 
 update:
        share->s_access = argp->fsm_access;
index c3e8f19d1b1ce79c113ae2b36dacfe17d373811f..2b3afb65bfd8a54b6a0d8b9f47d4d0b5e88629ed 100644 (file)
@@ -589,7 +589,7 @@ smb_retry(struct smb_sb_info *server)
 #else
        /*
         * We don't want to be interrupted. For example, what if 'current'
-        * already has recieved a signal? sleep_on would terminate immediately
+        * already has received a signal? sleep_on would terminate immediately
         * and smbmount would not be able to re-establish connection.
         *
         * smbmount should be able to reconnect later, but it can't because
index e3916575b591982716e71390687371f15317b4d4..4e3a1f5decf0230fa9296590d609e462acd19249 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <asm/ptrace.h>
 #include <asm/user.h>
+#include <linux/utsname.h>
 
 typedef unsigned long elf_greg_t;
 
@@ -93,7 +94,7 @@ typedef struct user_i387_struct elf_fpregset_t;
    For the moment, we have only optimizations for the Intel generations,
    but that could change... */
 
-#define ELF_PLATFORM  ("i386\0i486\0i586\0i686"+((boot_cpu_data.x86-3)*5))
+#define ELF_PLATFORM (system_utsname.machine)
 
 #ifdef __KERNEL__
 #define SET_PERSONALITY(ex, ibcs2) \
index d0ab746e9947bbce7b7f161200abfe0ea1ce982d..1f22eb3a56b8b29a717105728c8b033e4b41db35 100644 (file)
@@ -327,4 +327,10 @@ extern void free_task_struct(struct task_struct *);
 #define init_task      (init_task_union.task)
 #define init_stack     (init_task_union.stack)
 
+/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
+extern inline void rep_nop(void)
+{
+       __asm__ __volatile__("rep;nop");
+}
+
 #endif /* __ASM_I386_PROCESSOR_H */
index 745f2715a4563535c70b6e02d76a369a2bab050f..18119d489cbccb81826a6e49cbb75a008a4b72a5 100644 (file)
@@ -153,6 +153,7 @@ typedef struct { unsigned long a[100]; } __dummy_lock_t;
        "jc 2f\n" \
        ".section .text.lock,\"ax\"\n" \
        "2:\t" \
+       "rep; nop\n\t" \
        "testb $1,%0\n\t" \
        "jne 2b\n\t" \
        "jmp 1b\n" \
@@ -214,7 +215,8 @@ typedef struct {
                     "js 2f\n" \
                     ".section .text.lock,\"ax\"\n" \
                     "2:\tlock ; decl %0\n" \
-                    "3:\tcmpl $0,%0\n\t" \
+                    "3:\trep; nop\n\t" \
+                    "cmpl $0,%0\n\t" \
                     "js 3b\n\t" \
                     "jmp 1b\n" \
                     ".previous" \
@@ -232,7 +234,8 @@ typedef struct {
                     "jne 3f\n" \
                     ".section .text.lock,\"ax\"\n" \
                     "3:\tlock ; btrl $31,%0\n" \
-                    "4:\tcmp $0,%0\n\t" \
+                    "4:\trep; nop\n\t" \
+                    "cmp $0,%0\n\t" \
                     "jne 4b\n\t" \
                     "jmp 1b\n" \
                     ".previous" \
index e9e59f199b1d23c637efedc014390967a9a033b7..a3a675b347d78cb671dc8a765f4430b5b4e2aa18 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: socket.h,v 1.5.2.1 1999/08/07 10:52:59 davem Exp $ */
+/* $Id: socket.h,v 1.5.2.2 2000/11/12 13:16:14 davem Exp $ */
 #ifndef _ASM_SOCKET_H
 #define _ASM_SOCKET_H
 
@@ -46,6 +46,7 @@
 #define SO_SECURITY_ENCRYPTION_NETWORK         0x5004
 
 /* Socket types. */
+#if defined(__KERNEL__)
 #define SOCK_STREAM    1               /* stream (connection) socket   */
 #define SOCK_DGRAM     2               /* datagram (conn.less) socket  */
 #define SOCK_RAW       3               /* raw socket                   */
@@ -56,5 +57,6 @@
                                        /* level.  For writing rarp and */
                                        /* other similar things on the  */
                                        /* user level.                  */
+#endif
 
 #endif /* _ASM_SOCKET_H */
index 2aca5e2c8bb2f2841c152db051239affbb6c222c..5310a15e01499ca27463063270409311321adf2f 100644 (file)
@@ -568,16 +568,16 @@ typedef struct {
 
 /******************************************************************************
 * 
-* The DAA Analog GAIN sets 2 parameters at one time, the recieve gain (AGRR), 
+* The DAA Analog GAIN sets 2 parameters at one time, the receive gain (AGRR), 
 * and the transmit gain (AGX).  OR together the components and pass them
 * as the parameter to IXJCTL_DAA_AGAIN.  The default setting is both at 0dB.
 * 
 ******************************************************************************/
 #define IXJCTL_DAA_AGAIN               _IOW ('q', 0xD2, int)
 
-#define AGRR00DB       0x00    // Analog gain in recieve direction 0dB
-#define AGRR3_5DB      0x10    // Analog gain in recieve direction 3.5dB
-#define AGRR06DB       0x30    // Analog gain in recieve direction 6dB
+#define AGRR00DB       0x00    // Analog gain in receive direction 0dB
+#define AGRR3_5DB      0x10    // Analog gain in receive direction 3.5dB
+#define AGRR06DB       0x30    // Analog gain in receive direction 6dB
 
 #define AGX00DB                0x00    // Analog gain in transmit direction 0dB
 #define AGX_6DB                0x04    // Analog gain in transmit direction -6dB
index 3dd5a969aaa35d38d957b903b1f392351c109d0d..4e38e8ccb32d72ce256dbff4b28473ed2744d40e 100644 (file)
@@ -207,8 +207,8 @@ struct phone_codec_data
 * indicate the current state of the hookswitch.  The pstn_ring bit
 * indicates that the DAA on a LineJACK card has detected ring voltage on
 * the PSTN port.  The caller_id bit indicates that caller_id data has been
-* recieved and is available.  The pstn_wink bit indicates that the DAA on
-* the LineJACK has recieved a wink from the telco switch.  The f0, f1, f2
+* received and is available.  The pstn_wink bit indicates that the DAA on
+* the LineJACK has received a wink from the telco switch.  The f0, f1, f2
 * and f3 bits indicate that the filter has been triggered by detecting the
 * frequency programmed into that filter.
 *
index dbac2102e5b405a129d901b16502ea2210478137..d4b30f586b887b43fa48441c2a240fb26da9fc93 100644 (file)
@@ -1744,8 +1744,8 @@ static int setscheduler(pid_t pid, int policy,
        /*
         * We play safe to avoid deadlocks.
         */
-       spin_lock_irq(&runqueue_lock);
-       read_lock(&tasklist_lock);
+       read_lock_irq(&tasklist_lock);
+       spin_lock(&runqueue_lock);
 
        p = find_process_by_pid(pid);
 
@@ -1789,8 +1789,8 @@ static int setscheduler(pid_t pid, int policy,
        current->need_resched = 1;
 
 out_unlock:
-       read_unlock(&tasklist_lock);
-       spin_unlock_irq(&runqueue_lock);
+       spin_unlock(&runqueue_lock);
+       read_unlock_irq(&tasklist_lock);
 
 out_nounlock:
        return retval;
index bb66494e6fa3713ceb5047e82acaf165bb84a551..a944a13a1d8e4ef644c3790e3b4eef9170091b86 100644 (file)
@@ -70,11 +70,12 @@ static inline void free_area_pmd(pgd_t * dir, unsigned long address, unsigned lo
 void vmfree_area_pages(unsigned long address, unsigned long size)
 {
        pgd_t * dir;
+       unsigned long start = address;
        unsigned long end = address + size;
 
        dir = pgd_offset_k(address);
        flush_cache_all();
-       while (address < end) {
+       while (address >= start && address < end) {
                free_area_pmd(dir, address, end - address);
                address = (address + PGDIR_SIZE) & PGDIR_MASK;
                dir++;
@@ -127,11 +128,12 @@ static inline int alloc_area_pmd(pmd_t * pmd, unsigned long address, unsigned lo
 int vmalloc_area_pages(unsigned long address, unsigned long size)
 {
        pgd_t * dir;
+       unsigned long start = address;
        unsigned long end = address + size;
 
        dir = pgd_offset_k(address);
        flush_cache_all();
-       while (address < end) {
+       while (address >= start && address < end) {
                pmd_t *pmd;
                pgd_t olddir = *dir;
                
index 8508d0ab721168b1a58e74892062f3d2aa0aeaae..eb96c82395a09c4afd3eb07c21c9e7fb6f935712 100644 (file)
@@ -5,7 +5,7 @@
  *
  *             Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:    $Id: tcp_output.c,v 1.108.2.10 2000/10/29 01:52:21 davem Exp $
+ * Version:    $Id: tcp_output.c,v 1.108.2.11 2000/11/10 12:43:29 davem Exp $
  *
  * Authors:    Ross Biro, <bir7@leland.Stanford.Edu>
  *             Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -104,7 +104,7 @@ void tcp_transmit_skb(struct sock *sk, struct sk_buff *skb)
        if(skb != NULL) {
                struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp);
                struct tcp_skb_cb *tcb = TCP_SKB_CB(skb);
-               int tcp_header_size = tp->tcp_header_len;
+               int tcp_header_size = sizeof(struct tcphdr);
                struct tcphdr *th;
                int sysctl_flags;
 
@@ -128,12 +128,17 @@ void tcp_transmit_skb(struct sock *sk, struct sk_buff *skb)
                                if(!(sysctl_flags & SYSCTL_FLAG_TSTAMPS))
                                        tcp_header_size += TCPOLEN_SACKPERM_ALIGNED;
                        }
-               } else if(tp->sack_ok && tp->num_sacks) {
-                       /* A SACK is 2 pad bytes, a 2 byte header, plus
-                        * 2 32-bit sequence numbers for each SACK block.
-                        */
-                       tcp_header_size += (TCPOLEN_SACK_BASE_ALIGNED +
-                                           (tp->num_sacks * TCPOLEN_SACK_PERBLOCK));
+               } else {
+                       if(tp->tstamp_ok)
+                               tcp_header_size += TCPOLEN_TSTAMP_ALIGNED;
+
+                       if(tp->sack_ok && tp->num_sacks) {
+                               /* A SACK is 2 pad bytes, a 2 byte header, plus
+                                * 2 32-bit sequence numbers for each SACK block.
+                                */
+                               tcp_header_size += (TCPOLEN_SACK_BASE_ALIGNED +
+                                                   (tp->num_sacks * TCPOLEN_SACK_PERBLOCK));
+                       }
                }
                th = (struct tcphdr *) skb_push(skb, tcp_header_size);
                skb->h.th = th;
index bb5e083738d466f5d154d933f80fd14651a6d677..d404818376ec27a4bbe64b7b8ce6b609da482f07 100644 (file)
@@ -630,7 +630,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);