From 3e56791f03e4744d8549eacea2c721c0393a57ee Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 23 Nov 2007 15:23:43 -0500 Subject: [PATCH] Linux 2.2.20pre4 o Fix small corruption bug in 82596 (Andries Brouwer) o Fix usb printer probing (Pete Zaitcev) o Fix swapon/procfs race (Paul Menage) o Handle ide dma bug in the CS5530 (Mark Lord) o Backport 2.4 ipv6 neighbour discovery changes (Dave Miller) o FIx sock_wmalloc error handling (Dave Miller) o Enter quickack mode for out of window TCP data (Andi Kleen) o Fix Established v SYN-ACK TCP state error (Alexey Kuznetsov) o Sparc updates, ptrace changes etc (Dave Miller) o Fix wrong printk in vdolive masq (Keitaro Yosimura) o Fix core dump handling bugs in 2.2 (Al Viro) o Update hdlc and synclink drivers (Paul Fulghum) o Update netlink help texts (Magnus Damm) o Fix rtl8139 keeping files open (Andrew Morton) o Further sk98 driver updates. fix wrong license (Mirko Lindner) text in files o Jonathan Woithe has moved (Jonathan Woithe) o Update cpqarray driver (Charles White) o Update cciss driver (Charles White) o Don't delete directories on an fs that reports (Ingo Oeser) then 0 size when doing distclean o Add support for the 2.4 boot extensions to 2.2 (H Peter Anvin) o Fix nfs cache locking corruption on SMP (Craig Hagan) o Add missing check to cdrom readaudio ioctl (Jani Jaakkola) o Fix refclock build with newer gcc (Jari Ruusu) o koi8-r fixes (Andy Rysin) o Spelling fixes for documentation (Andries Brouwer) --- CREDITS | 4 +- Documentation/Configure.help | 44 +-- Documentation/SubmittingDrivers | 2 +- Documentation/filesystems/vfs.txt | 10 +- Documentation/networking/sk98lin.txt | 4 +- Documentation/s390/cds.txt | 4 +- Documentation/video4linux/API.html | 2 +- Makefile | 5 +- arch/alpha/kernel/signal.c | 6 +- arch/arm/kernel/signal.c | 6 +- arch/i386/boot/compressed/head.S | 29 +- arch/i386/boot/compressed/misc.c | 40 ++- arch/i386/boot/setup.S | 49 ++- arch/i386/kernel/head.S | 30 +- arch/i386/kernel/signal.c | 6 +- arch/m68k/kernel/signal.c | 4 +- arch/mips/baget/irq.c | 2 +- arch/mips/dec/prom/memory.c | 2 +- arch/mips/kernel/irixelf.c | 53 +--- arch/mips/kernel/irixsig.c | 6 +- arch/mips/kernel/signal.c | 6 +- arch/ppc/kernel/openpic.c | 6 +- arch/ppc/kernel/pmac_pci.c | 2 +- arch/ppc/kernel/signal.c | 6 +- arch/s390/kernel/entry.S | 2 +- arch/s390/kernel/signal.c | 6 +- arch/s390/tools/dasdfmt/dasdfmt.c | 2 +- arch/sparc/kernel/entry.S | 34 +-- arch/sparc/kernel/signal.c | 12 +- arch/sparc/lib/memset.S | 2 +- arch/sparc64/kernel/binfmt_aout32.c | 53 +--- arch/sparc64/kernel/entry.S | 18 +- arch/sparc64/kernel/ioctl32.c | 4 +- arch/sparc64/kernel/signal.c | 10 +- arch/sparc64/kernel/signal32.c | 12 +- arch/sparc64/solaris/entry64.S | 10 +- drivers/block/cciss.c | 8 +- drivers/block/cpqarray.c | 6 +- drivers/block/genhd.c | 3 +- drivers/block/ide-cd.c | 2 +- drivers/block/ide-dma.c | 14 + drivers/block/ide-pmac.c | 9 +- drivers/block/ide.c | 7 +- drivers/cdrom/cdrom.c | 9 +- drivers/char/Config.in | 4 +- drivers/char/Makefile | 12 +- drivers/char/atari_SCC.README | 2 +- drivers/char/atari_SCC.c | 4 +- drivers/char/cyclades.c | 2 +- drivers/char/epca.c | 4 +- drivers/char/hfmodem/refclock.c | 2 +- drivers/char/lp.c | 2 +- drivers/char/n_hdlc.c | 31 +- drivers/char/sbc60xxwdt.c | 2 +- drivers/char/synclink.c | 24 +- drivers/char/tty_io.c | 6 + drivers/char/wdt_pci.c | 2 +- drivers/i2o/i2o_scsi.c | 2 +- drivers/isdn/hisax/l3dss1.c | 2 +- drivers/isdn/hisax/l3ni1.c | 2 +- drivers/macintosh/via-pmu.c | 4 +- drivers/net/8139too.c | 4 + drivers/net/82596.c | 2 +- drivers/net/Config.in | 7 +- drivers/net/daynaport.c | 2 +- drivers/net/macmace.c | 4 +- drivers/net/net_init.c | 4 +- drivers/net/ni52.c | 17 +- drivers/net/sbni.c | 2 +- drivers/net/sdla_fr.c | 8 +- drivers/net/sk98lin/h/lm80.h | 2 +- drivers/net/sk98lin/h/skgehw.h | 10 +- drivers/net/sk98lin/h/skgehwt.h | 28 +- drivers/net/sk98lin/h/ski2c.h | 21 +- drivers/net/sk98lin/h/skqueue.h | 28 +- drivers/net/sk98lin/h/sktimer.h | 28 +- drivers/net/sk98lin/h/skversion.h | 6 +- drivers/net/sk98lin/h/xmac_ii.h | 2 +- drivers/net/sk98lin/skge.c | 244 ++++++++------- drivers/net/sk98lin/skgehwt.c | 30 +- drivers/net/sk98lin/skgeinit.c | 54 ++-- drivers/net/sk98lin/skgepnmi.c | 115 +++---- drivers/net/sk98lin/skgesirq.c | 14 +- drivers/net/sk98lin/ski2c.c | 40 ++- drivers/net/sk98lin/skqueue.c | 32 +- drivers/net/sk98lin/sktimer.c | 30 +- drivers/net/skfp/drvfbi.c | 2 +- drivers/net/skfp/h/smc.h | 4 +- drivers/net/skfp/pcmplc.c | 2 +- drivers/net/skfp/srf.c | 8 +- drivers/net/tulip.c | 3 +- drivers/s390/block/dasd_3990_erp.c | 4 +- drivers/s390/net/ctc.c | 2 +- drivers/sbus/char/envctrl.c | 4 +- drivers/scsi/NCR53C9x.c | 2 +- drivers/scsi/README.ibmmca | 4 +- drivers/scsi/README.ncr53c8xx | 2 +- drivers/scsi/cpqfcTScontrol.c | 4 +- drivers/scsi/cpqfcTSworker.c | 2 +- drivers/scsi/esp.c | 2 +- drivers/scsi/gdth.h | 2 +- drivers/scsi/ips.c | 14 +- drivers/scsi/megaraid.c | 2 +- drivers/scsi/sd_ioctl.c | 1 + drivers/scsi/sym53c8xx.c | 6 +- drivers/scsi/sym53c8xx_defs.h | 4 +- drivers/usb/printer.c | 8 +- drivers/usb/usb-uhci.c | 2 +- drivers/video/atyfb.c | 2 +- fs/binfmt_aout.c | 57 +--- fs/binfmt_elf.c | 54 +--- fs/binfmt_em86.c | 7 +- fs/binfmt_java.c | 14 +- fs/binfmt_misc.c | 7 +- fs/binfmt_script.c | 7 +- fs/dcache.c | 4 +- fs/exec.c | 53 ++++ fs/nfsd/nfssvc.c | 30 +- fs/nls/nls_koi8-r.c | 23 +- fs/ntfs/support.c | 2 +- fs/smbfs/proc.c | 2 +- include/asm-s390/ccwcache.h | 2 +- include/asm-s390/irq.h | 2 +- include/asm-s390/pgtable.h | 8 +- include/asm-sparc/asm_offsets.h | 288 +++++++++--------- include/asm-sparc64/asm_offsets.h | 432 ++++++++++++++------------- include/linux/binfmts.h | 6 +- include/linux/fd.h | 4 +- include/linux/tty.h | 2 + mm/swapfile.c | 2 +- net/core/dev.c | 2 +- net/core/sock.c | 6 +- net/ipv4/af_inet.c | 3 +- net/ipv4/ip_masq_vdolive.c | 2 +- net/ipv4/tcp_input.c | 15 +- net/ipv6/ndisc.c | 27 +- 136 files changed, 1264 insertions(+), 1275 deletions(-) diff --git a/CREDITS b/CREDITS index acb8da518efd..5f1eaf8e8a6e 100644 --- a/CREDITS +++ b/CREDITS @@ -2398,8 +2398,8 @@ N: Jonathan Woithe E: jwoithe@physics.adelaide.edu.au W: http://www.physics.adelaide.edu.au/~jwoithe D: ALS-007 sound card extensions to Sound Blaster driver -S: 4/36 Trevelyan St -S: Wayville SA 5034 +S: 20 Jordan St +S: Valley View, SA 5093 S: Australia N: Clifford Wolf diff --git a/Documentation/Configure.help b/Documentation/Configure.help index 783606367a02..2d8a0c7fc988 100644 --- a/Documentation/Configure.help +++ b/Documentation/Configure.help @@ -3688,32 +3688,38 @@ CONFIG_PACKET Kernel/User network link driver CONFIG_NETLINK - This driver allows for two-way communication between certain parts - of the kernel or modules and user processes; the user processes are - able to read from and write to character special files in the /dev - directory having major mode 36. So far, the kernel uses it to - publish some network related information if you say Y to "Routing - messages", below. It is also used by the firewall code to publish - information about possible attacks if you say Y to "IP: firewall - packet netlink device" further down. You also need to say Y here if - you want to use arpd, a daemon that helps keep the internal ARP - cache (a mapping between IP addresses and hardware addresses on the - local network) small. The ethertap device, which lets user space - programs read and write raw Ethernet frames, also needs the network - link driver. If unsure, say Y. + This driver allows for two-way communication between the kernel and + user processes. It does so by creating a new socket family, PF_NETLINK. + Over this socket, the kernel can send and receive datagrams carrying + information. It is documented on many systems in netlink(7), a HOWTO is + provided as well, for example on + http://snafu.freedom.org/linux2.2/docs/netlink-HOWTO.html + + So far, the kernel uses this feature to publish some network related + information if you say Y to "Routing messages", below. You also need + to say Y here if you want to use arpd, a daemon that helps keep the + internal ARP cache (a mapping between IP addresses and hardware + addresses on the local network) small. The ethertap device, which + lets user space programs read and write raw Ethernet frames, also + needs the network link driver. + + If unsure, say Y. Routing messages CONFIG_RTNETLINK - If you say Y here and create a character special file /dev/route - with major number 36 and minor number 0 using mknod ("man mknod"), - you (or some user space utility) can read some network related - routing information from that file. Everything you write to that - file will be discarded. + If you say Y here, user space programs can receive some network + related routing information over the netlink. 'rtmon', supplied + with the iproute2 package (ftp://ftp.inr.ac.ru), can read and + interpret this data. Information sent to the kernel over this link + is ignored. Netlink device emulation CONFIG_NETLINK_DEV + This option will be removed soon. Any programs that want to use + character special nodes like /dev/tap0 or /dev/route (all with major + number 36) need this option, and need to be rewritten soon to use + the real netlink socket. This is a backward compatibility option, choose Y for now. - This option will be removed soon. SCSI support? CONFIG_SCSI diff --git a/Documentation/SubmittingDrivers b/Documentation/SubmittingDrivers index 061fe011a021..db8540ce1212 100644 --- a/Documentation/SubmittingDrivers +++ b/Documentation/SubmittingDrivers @@ -34,7 +34,7 @@ Linux 2.4test: This kernel tree is under active development. The same rules apply as 2.2 but you may wish to submit your driver via linux-kernel (see resources) and follow that list to track changes in API's. These - should no longer be occuring as we are now in a code freeze. + should no longer be occurring as we are now in a code freeze. The final contact point for Linux 2.4 submissions is . diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index b558535aa94b..dd8d1f5d1bf2 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt @@ -129,7 +129,7 @@ struct file_system_type { name: the name of the filesystem type, such as "ext2", "iso9660", "msdos" and so on - fs_flags: various flags (i.e. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.) + fs_flags: various flags (e.g. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.) read_super: the method to call when a new instance of this filesystem should be mounted @@ -403,7 +403,7 @@ struct dentry_operations { d_release: called when a dentry is deallocated - d_iput: called when a dentry looses its inode (just prior to its + d_iput: called when a dentry loses its inode (just prior to its being deallocated). The default when this is NULL is that the VFS calls iput(). If you define this method, you must call iput() yourself @@ -425,11 +425,11 @@ manipulate dentries: unused list just means that if the system needs some RAM, it goes through the unused list of dentries and deallocates them. If the dentry has already been unhashed and the usage count - drops to 0, in this case the dentry is deallocated after the - "d_delete" method is called + drops to 0, the dentry is deallocated after the "d_delete" + method is called d_drop: this unhashes a dentry from its parents hash list. A - subsequent call to dput() will dellocate the dentry if its + subsequent call to dput() will deallocate the dentry if its usage count drops to 0 d_delete: delete a dentry. If there are no other open references to diff --git a/Documentation/networking/sk98lin.txt b/Documentation/networking/sk98lin.txt index 2316e532f9c5..925ab2e81183 100644 --- a/Documentation/networking/sk98lin.txt +++ b/Documentation/networking/sk98lin.txt @@ -2,9 +2,9 @@ All rights reserved =========================================================================== -sk98lin.txt created 27-Mar-2001 +sk98lin.txt created 07-Jun-2001 -Readme File for sk98lin v4.03 +Readme File for sk98lin v4.07 SK-NET Gigabit Ethernet PCI driver for LINUX This file contains diff --git a/Documentation/s390/cds.txt b/Documentation/s390/cds.txt index ac3f6be7b7c6..935fbbbb929d 100644 --- a/Documentation/s390/cds.txt +++ b/Documentation/s390/cds.txt @@ -317,7 +317,7 @@ The read_dev_chars() function returns : 0 - successful completion -ENODEV - irq doesn't specify a valid subchannel number -EINVAL - an invalid parameter was detected --EBUSY - an irrecoverable I/O error occured or the device is not +-EBUSY - an irrecoverable I/O error occurred or the device is not operational. Usage Notes : @@ -549,7 +549,7 @@ The cpa parameter points to the first format 1 CCW of a channel program : typedef struct { char cmd_code; /* command code */ - char flags; /* flags, like IDA adressing, etc. */ + char flags; /* flags, like IDA addressing, etc. */ unsigned short count; /* byte count */ void *cda; /* data address */ } ccw1_t __attribute__ ((aligned(8))); diff --git a/Documentation/video4linux/API.html b/Documentation/video4linux/API.html index b4b9d0dcc61f..9e9a94ff1cf7 100644 --- a/Documentation/video4linux/API.html +++ b/Documentation/video4linux/API.html @@ -362,7 +362,7 @@ groups of three, as follows: First OctetLeast Siginificant Byte of RDS Block Second OctetMost Siginificant Byte of RDS Block Third OctetBit 7:Error bit. Indicates that -an uncorrectable error occured during reception of this block. +an uncorrectable error occurred during reception of this block.  Bit 6:Corrected bit. Indicates that an error was corrected for this data block.  Bits 5-3:Reeived Offset. Indicates the diff --git a/Makefile b/Makefile index 96fe4de08b9c..3ac15eb330e3 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 2 SUBLEVEL = 20 -EXTRAVERSION = pre3 +EXTRAVERSION = pre4 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) @@ -423,7 +423,8 @@ mrproper: clean archmrproper rm -rf modules distclean: mrproper - rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ + rm -f core `find . \( -not -type d \) -and \ + \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -print` TAGS diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c index 79d71a0235ef..3751ddfb82ad 100644 --- a/arch/alpha/kernel/signal.c +++ b/arch/alpha/kernel/signal.c @@ -692,12 +692,8 @@ do_signal(sigset_t *oldset, struct pt_regs * regs, struct switch_stack * sw, case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: - lock_kernel(); - if (current->binfmt - && current->binfmt->core_dump - && current->binfmt->core_dump(signr, regs)) + if (do_coredump(signr, regs)) exit_code |= 0x80; - unlock_kernel(); /* FALLTHRU */ default: diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 85c855a989e1..b3b2c7836f9c 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -544,12 +544,8 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall) case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: - lock_kernel(); - if (current->binfmt - && current->binfmt->core_dump - && current->binfmt->core_dump(signr, regs)) + if (do_coredump(signr, regs)) exit_code |= 0x80; - unlock_kernel(); /* FALLTHRU */ default: diff --git a/arch/i386/boot/compressed/head.S b/arch/i386/boot/compressed/head.S index 8022d90b1390..61ff710f7bfb 100644 --- a/arch/i386/boot/compressed/head.S +++ b/arch/i386/boot/compressed/head.S @@ -65,6 +65,7 @@ startup_32: movl %eax,0x000000 # loop forever if it isn't cmpl %eax,0x100000 je 1b + /* * Initialize eflags. Some BIOS's leave bits like NT set. This would * confuse the debugger if this code is traced. @@ -86,10 +87,14 @@ startup_32: * Do the decompression, and jump to the new kernel.. */ subl $16,%esp # place for structure on the stack - pushl %esp # address of structure as first arg + movl %esp,%eax + pushl %esi # real mode pointer as second arg + pushl %eax # address of structure as first arg call SYMBOL_NAME(decompress_kernel) orl %eax,%eax jnz 3f + popl %esi # discard address + popl %esi # real mode pointer xorl %ebx,%ebx ljmp $(__KERNEL_CS), $0x100000 @@ -104,11 +109,14 @@ startup_32: movl $0x1000,%edi movl $move_routine_end,%ecx subl %esi,%ecx + addl $3,%ecx + shrl $2,%ecx cld rep - movsb + movsl popl %esi # discard the address + popl %ebx # real mode pointer popl %esi # low_buffer_start popl %ecx # lcount popl %edx # high_buffer_start @@ -122,18 +130,21 @@ startup_32: * if we were high loaded. This _must_ PIC-code ! */ move_routine_start: + movl %ecx,%ebp + shrl $2,%ecx + rep + movsl + movl %ebp,%ecx + andl $3,%ecx rep movsb movl %edx,%esi movl %eax,%ecx # NOTE: rep movsb won't move if %ecx == 0 + addl $3,%ecx + shrl $2,%ecx rep - movsb + movsl + movl %ebx,%esi # Restore setup pointer xorl %ebx,%ebx -/* - * Well, the kernel relies on %esp pointing into low mem, - * with the decompressor loaded high this is no longer true, - * so we set esp here. - */ - mov $0x90000,%esp ljmp $(__KERNEL_CS), $0x100000 move_routine_end: diff --git a/arch/i386/boot/compressed/misc.c b/arch/i386/boot/compressed/misc.c index 89beaa70fb2a..6279fc726cd9 100644 --- a/arch/i386/boot/compressed/misc.c +++ b/arch/i386/boot/compressed/misc.c @@ -74,11 +74,13 @@ static void gzip_release(void **); /* * This is set up by the setup-routine at boot-time */ -#define EXT_MEM_K (*(unsigned short *)0x90002) +static unsigned char *real_mode; /* Pointer to real-mode data */ + +#define EXT_MEM_K (*(unsigned short *)(real_mode + 0x2)) #ifndef STANDARD_MEMORY_BIOS_CALL -#define ALT_MEM_K (*(unsigned long *) 0x901e0) +#define ALT_MEM_K (*(unsigned long *)(real_mode + 0x1e0)) #endif -#define SCREEN_INFO (*(struct screen_info *)0x90000) +#define SCREEN_INFO (*(struct screen_info *)(real_mode+0)) extern char input_data[]; extern int input_len; @@ -98,13 +100,13 @@ static void puts(const char *); extern int end; static long free_mem_ptr = (long)&end; -static long free_mem_end_ptr = 0x90000; +static long free_mem_end_ptr; #define INPLACE_MOVE_ROUTINE 0x1000 #define LOW_BUFFER_START 0x2000 -#define LOW_BUFFER_END 0x90000 -#define LOW_BUFFER_SIZE ( LOW_BUFFER_END - LOW_BUFFER_START ) +#define LOW_BUFFER_MAX 0x90000 #define HEAP_SIZE 0x2400 +static unsigned int low_buffer_end, low_buffer_size; static int high_loaded =0; static uch *high_buffer_start /* = (uch *)(((ulg)&end) + HEAP_SIZE)*/; @@ -255,7 +257,7 @@ static void flush_window_high() in = window; for (n = 0; n < outcnt; n++) { ch = *output_data++ = *in++; - if ((ulg)output_data == LOW_BUFFER_END) output_data=high_buffer_start; + if ((ulg)output_data == low_buffer_end) output_data=high_buffer_start; c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8); } crc = c; @@ -311,10 +313,13 @@ void setup_output_buffer_if_we_run_high(struct moveparams *mv) if ((ALT_MEM_K > EXT_MEM_K ? ALT_MEM_K : EXT_MEM_K) < (3*1024)) error("Less than 4MB of memory.\n"); #endif mv->low_buffer_start = output_data = (char *)LOW_BUFFER_START; + low_buffer_end = ((unsigned int)real_mode > LOW_BUFFER_MAX + ? LOW_BUFFER_MAX : (unsigned int)real_mode) & ~0xfff; + low_buffer_size = low_buffer_end - LOW_BUFFER_START; high_loaded = 1; free_mem_end_ptr = (long)high_buffer_start; - if ( (0x100000 + LOW_BUFFER_SIZE) > ((ulg)high_buffer_start)) { - high_buffer_start = (uch *)(0x100000 + LOW_BUFFER_SIZE); + if ( (0x100000 + low_buffer_size) > ((ulg)high_buffer_start)) { + high_buffer_start = (uch *)(0x100000 + low_buffer_size); mv->hcount = 0; /* say: we need not to move high_buffer */ } else mv->hcount = -1; @@ -323,17 +328,21 @@ void setup_output_buffer_if_we_run_high(struct moveparams *mv) void close_output_buffer_if_we_run_high(struct moveparams *mv) { - mv->lcount = bytes_out; - if (bytes_out > LOW_BUFFER_SIZE) { - mv->lcount = LOW_BUFFER_SIZE; - if (mv->hcount) mv->hcount = bytes_out - LOW_BUFFER_SIZE; + if (bytes_out > low_buffer_size) { + mv->lcount = low_buffer_size; + if (mv->hcount) + mv->hcount = bytes_out - low_buffer_size; + } else { + mv->lcount = bytes_out; + mv->hcount = 0; } - else mv->hcount = 0; } -int decompress_kernel(struct moveparams *mv) +int decompress_kernel(struct moveparams *mv, void *rmode) { + real_mode = rmode; + if (SCREEN_INFO.orig_video_mode == 7) { vidmem = (char *) 0xb0000; vidport = 0x3b4; @@ -355,4 +364,3 @@ int decompress_kernel(struct moveparams *mv) if (high_loaded) close_output_buffer_if_we_run_high(mv); return high_loaded; } - diff --git a/arch/i386/boot/setup.S b/arch/i386/boot/setup.S index 191b53ab2c9d..3af8a8ea44a7 100644 --- a/arch/i386/boot/setup.S +++ b/arch/i386/boot/setup.S @@ -69,7 +69,7 @@ start: ! SETUP-header, must start at CS:2 (old 0x9020:2) ! .ascii "HdrS" ! Signature for SETUP-header - .word 0x0201 ! Version number of header format + .word 0x0202 ! Version number of header format ! (must be >= 0x0105 ! else old loadlin-1.5 will fail) realmode_swtch: .word 0,0 ! default_switch,SETUPSEG @@ -120,9 +120,28 @@ ramdisk_image: .long 0 ! address of loaded ramdisk image ramdisk_size: .long 0 ! its size in bytes bootsect_kludge: .word bootsect_helper,SETUPSEG -heap_end_ptr: .word modelist+1024 ! space from here (exclusive) down to - ! end of setup code can be used by setup - ! for local heap purposes. +heap_end_ptr: .word modelist+1024 ! (Header version 0x0201 or later) + ! space from here (exclusive) down to + ! end of setup code can be used by setup + ! for local heap purposes. + +pad1: .word 0 ! Reserved for future use + +cmd_line_ptr: .long 0 ! (Header version 0x0202 or later) + ! If nonzero, a 32-bit pointer + ! to the kernel command line. + ! The command line should be + ! located between the start of + ! setup and the end of low + ! memory (0xa0000), or it may + ! get overwritten before it + ! gets read. If this field is + ! used, there is no longer + ! anything magical about the + ! 0x90000 segment; the setup + ! can be located anywhere in + ! low memory 0x10000 or higher. + ! ------------------------ end of header ---------------------------------- start_of_setup: @@ -534,6 +553,13 @@ end_move: mov ax,cs ! aka #SETUPSEG ! right, forgot this at first. didn't work :-) mov ds,ax +! Check whether we need to be downward compatible with version <= 0x0201 + cmp dword ptr [cmd_line_ptr],#0 + jne end_move_self + cmp byte ptr [type_of_loader],#0x20 + je end_move_self + +! Boot loader does not support boot protocol version 2.02. ! If we have our code not at 0x90000, we need to move it there now. ! We also then need to move the parameters behind it (command line) ! Because we would overwrite the code on the current IP, we move @@ -572,9 +598,14 @@ move_self_here: mov ds,ax mov ss,dx ! now we are at the right place -end_move_self: +end_move_self: lidt idt_48 ! load idt with 0,0 + xor eax,eax + mov ax,ds + shl eax,#4 + add eax,#gdt + mov [gdt_48+2],eax lgdt gdt_48 ! load gdt with whatever appropriate ! that was painless, now we enable A20 @@ -679,7 +710,11 @@ a20_wait: jmp flush_instr flush_instr: xor bx,bx ! Flag to indicate a boot - + xor esi,esi ! Pointer to real-mode code + mov si,cs + sub si,#DELTA_INITSEG + shl esi,#4 ! Convert to 32-bit pointer + ! NOTE: For high loaded big kernels we need a ! jmpi 0x100000,__KERNEL_CS ! @@ -873,7 +908,7 @@ idt_48: gdt_48: .word 0x800 ! gdt limit=2048, 256 GDT entries - .word 512+gdt,0x9 ! gdt base = 0X9xxxx + .word 0, 0 ! gdt base (filled in later) ! ! Include video setup & detection code diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S index acbc3e325000..0324c4181848 100644 --- a/arch/i386/kernel/head.S +++ b/arch/i386/kernel/head.S @@ -14,11 +14,11 @@ #include #include - -#define CL_MAGIC_ADDR 0x90020 -#define CL_MAGIC 0xA33F -#define CL_BASE_ADDR 0x90000 -#define CL_OFFSET 0x90022 +#define OLD_CL_MAGIC_ADDR 0x90020 +#define OLD_CL_MAGIC 0xA33F +#define OLD_CL_BASE_ADDR 0x90000 +#define OLD_CL_OFFSET 0x90022 +#define NEW_CL_POINTER 0x228 /* Relative to real mode data */ /* * References to members of the boot_cpu_data structure. @@ -36,6 +36,8 @@ /* * swapper_pg_dir is the main page directory, address 0x00101000 + * + * On entry, %esi points to the real-mode code as a 32-bit pointer. */ ENTRY(stext) ENTRY(_stext) @@ -52,6 +54,9 @@ startup_32: #ifdef __SMP__ orw %bx,%bx jz 1f +#endif + +#ifdef __SMP__ /* * New page tables may be in 4Mbyte page mode and may * be using the global pages. @@ -89,6 +94,7 @@ startup_32: jmp checkCPUtype 1: #endif __SMP__ + /* * Clear BSS first so that there are no surprises... */ @@ -99,6 +105,7 @@ startup_32: cld rep stosb + /* * start system 32-bit setup. We need to re-do some of the things done * in 16-bit mode for the "real" operations. @@ -115,8 +122,9 @@ startup_32: * Copy bootup parameters out of the way. First 2kB of * _empty_zero_page is for boot parameters, second 2kB * is for the command line. + * + * Note: %esi still has the pointer to the real-mode data. */ - movl $0x90000,%esi movl $ SYMBOL_NAME(empty_zero_page),%edi movl $512,%ecx cld @@ -126,11 +134,15 @@ startup_32: movl $512,%ecx rep stosl - cmpw $(CL_MAGIC),CL_MAGIC_ADDR + movl SYMBOL_NAME(empty_zero_page)+NEW_CL_POINTER,%esi + andl %esi,%esi + jnz 2f + cmpw $(OLD_CL_MAGIC),OLD_CL_MAGIC_ADDR jne 1f + movzwl OLD_CL_OFFSET,%esi + addl $(OLD_CL_BASE_ADDR),%esi +2: movl $ SYMBOL_NAME(empty_zero_page)+2048,%edi - movzwl CL_OFFSET,%esi - addl $(CL_BASE_ADDR),%esi movl $2048,%ecx rep movsb diff --git a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c index d0dbbcaf8f7c..54a1f3256091 100644 --- a/arch/i386/kernel/signal.c +++ b/arch/i386/kernel/signal.c @@ -697,12 +697,8 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: - lock_kernel(); - if (current->binfmt - && current->binfmt->core_dump - && current->binfmt->core_dump(signr, regs)) + if (do_coredump(signr, regs)) exit_code |= 0x80; - unlock_kernel(); /* FALLTHRU */ default: diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c index 301de71a0b0c..f43802b22b56 100644 --- a/arch/m68k/kernel/signal.c +++ b/arch/m68k/kernel/signal.c @@ -1093,9 +1093,7 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs) case SIGQUIT: case SIGILL: case SIGTRAP: case SIGIOT: case SIGFPE: case SIGSEGV: - if (current->binfmt - && current->binfmt->core_dump - && current->binfmt->core_dump(signr, regs)) + if (do_coredump(signr, regs)) exit_code |= 0x80; /* FALLTHRU */ diff --git a/arch/mips/baget/irq.c b/arch/mips/baget/irq.c index 8fc7ec179e43..2d51687cf1da 100644 --- a/arch/mips/baget/irq.c +++ b/arch/mips/baget/irq.c @@ -212,7 +212,7 @@ static void do_IRQ(int irq, struct pt_regs * regs) add_interrupt_randomness(irq); __cli(); } else { - printk("do_IRQ: Unregistered IRQ (0x%X) occured\n", irq); + printk("do_IRQ: Unregistered IRQ (0x%X) occurred\n", irq); } unmask_irq(irq); hardirq_exit(cpu); diff --git a/arch/mips/dec/prom/memory.c b/arch/mips/dec/prom/memory.c index dbf2c6246cf9..ce6f34249c29 100644 --- a/arch/mips/dec/prom/memory.c +++ b/arch/mips/dec/prom/memory.c @@ -25,7 +25,7 @@ extern int (*prom_printf)(char *, ...); extern unsigned long mips_memory_upper; -volatile unsigned long mem_err = 0; /* So we know an error occured */ +volatile unsigned long mem_err = 0; /* So we know an error occurred */ /* * Probe memory in 4MB chunks, waiting for an error to tell us we've fallen diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c index 08b025a5500f..53e0a1d8471b 100644 --- a/arch/mips/kernel/irixelf.c +++ b/arch/mips/kernel/irixelf.c @@ -44,15 +44,15 @@ static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs); static int load_irix_library(int fd); -static int irix_core_dump(long signr, struct pt_regs * regs); +static int irix_core_dump(long signr, struct pt_regs * regs, struct file *); extern int dump_fpu (elf_fpregset_t *); static struct linux_binfmt irix_format = { -#ifndef MODULE - NULL, NULL, load_irix_binary, load_irix_library, irix_core_dump -#else - NULL, &__this_module.usecount, load_irix_binary, load_irix_library, irix_core_dump -#endif + module: THIS_MODULE, + load_binary: load_irix_binary, + load_shlib: load_irix_library, + core_dump: irix_core_dump, + min_coredump: PAGE_SIZE, }; #ifndef elf_addr_t @@ -1128,14 +1128,10 @@ static int writenote(struct memelfnote *men, struct file *file) * and then they are actually written out. If we run out of core limit * we just truncate. */ -static int irix_core_dump(long signr, struct pt_regs * regs) +static int irix_core_dump(long signr, struct pt_regs * regs, struct file * file) { int has_dumped = 0; - struct file *file; - struct dentry *dentry; - struct inode *inode; mm_segment_t fs; - char corefile[6+sizeof(current->comm)]; int segs; int i; size_t size; @@ -1148,14 +1144,6 @@ static int irix_core_dump(long signr, struct pt_regs * regs) struct elf_prstatus prstatus; /* NT_PRSTATUS */ elf_fpregset_t fpu; /* NT_PRFPREG */ struct elf_prpsinfo psinfo; /* NT_PRPSINFO */ - - if (!current->dumpable || limit < PAGE_SIZE) - return 0; - current->dumpable = 0; - -#ifndef CONFIG_BINFMT_IRIX - MOD_INC_USE_COUNT; -#endif /* Count what's needed to dump, up to the limit of coredump size. */ segs = 0; @@ -1201,27 +1189,6 @@ static int irix_core_dump(long signr, struct pt_regs * regs) fs = get_fs(); set_fs(KERNEL_DS); - memcpy(corefile,"core.", 5); -#if 0 - memcpy(corefile+5,current->comm,sizeof(current->comm)); -#else - corefile[4] = '\0'; -#endif - file = filp_open(corefile, O_CREAT | 2 | O_TRUNC | O_NOFOLLOW, 0600); - if (IS_ERR(file)) - goto end_coredump; - dentry = file->f_dentry; - inode = dentry->d_inode; - if (inode->i_nlink > 1) - goto close_coredump; /* multiple links - don't dump */ - - if (!S_ISREG(inode->i_mode)) - goto close_coredump; - if (!inode->i_op || !inode->i_op->default_file_ops) - goto close_coredump; - if (!file->f_op->write) - goto close_coredump; - has_dumped = 1; current->flags |= PF_DUMPCORE; @@ -1386,13 +1353,7 @@ static int irix_core_dump(long signr, struct pt_regs * regs) } close_coredump: - filp_close(file, NULL); - - end_coredump: set_fs(fs); -#ifndef CONFIG_BINFMT_ELF - MOD_DEC_USE_COUNT; -#endif return has_dumped; } diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c index f41c8b9fc4b4..08b631387d8e 100644 --- a/arch/mips/kernel/irixsig.c +++ b/arch/mips/kernel/irixsig.c @@ -261,12 +261,8 @@ asmlinkage int do_irix_signal(sigset_t *oldset, struct pt_regs *regs) case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: - lock_kernel(); - if (current->binfmt - && current->binfmt->core_dump - && current->binfmt->core_dump(signr, regs)) + if (do_coredump(signr, regs)) exit_code |= 0x80; - unlock_kernel(); /* FALLTHRU */ default: diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index bc29add01f53..cff8684069d9 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c @@ -493,12 +493,8 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs) case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: case SIGBUS: - lock_kernel(); - if (current->binfmt - && current->binfmt->core_dump - && current->binfmt->core_dump(signr, regs)) + if (do_coredump(signr, regs)) exit_code |= 0x80; - unlock_kernel(); /* FALLTHRU */ default: diff --git a/arch/ppc/kernel/openpic.c b/arch/ppc/kernel/openpic.c index 75c2da31d7a4..6b075a6bc832 100644 --- a/arch/ppc/kernel/openpic.c +++ b/arch/ppc/kernel/openpic.c @@ -242,8 +242,8 @@ openpic_init(int main_pic) openpic_mapirq(i, 1<<0); } } else { - /* Prevent any interrupt from occuring during initialisation. - * Hum... I beleive this is not necessary, Apple does that in + /* Prevent any interrupt from occurring during initialisation. + * Hum... I believe this is not necessary, Apple does that in * Darwin's PowerExpress code. */ openpic_set_priority(0, 0xf); @@ -635,4 +635,4 @@ openpic_sleep_restore_intrs(void) for (i=0; iProcessor[i].Current_Task_Priority, save_cpu_task_pri[i]); } -#endif /* CONFIG_PMAC_PBOOK */ \ No newline at end of file +#endif /* CONFIG_PMAC_PBOOK */ diff --git a/arch/ppc/kernel/pmac_pci.c b/arch/ppc/kernel/pmac_pci.c index 1216aabe370a..2b156e11ca63 100644 --- a/arch/ppc/kernel/pmac_pci.c +++ b/arch/ppc/kernel/pmac_pci.c @@ -109,7 +109,7 @@ pmac_pci_dev_root_bridge(unsigned char bus, unsigned char dev_fn) bridge_node = NULL; node = find_pci_device_OFnode(bus, dev_fn & 0xf8); if (node) { - /* note: we don't stop on the first occurence since we need to go + /* note: we don't stop on the first occurrence since we need to go * up to the root bridge */ do { if (node->type && !strcmp(node->type, "pci") diff --git a/arch/ppc/kernel/signal.c b/arch/ppc/kernel/signal.c index 5ce57e7bf286..2cb99e52c9bf 100644 --- a/arch/ppc/kernel/signal.c +++ b/arch/ppc/kernel/signal.c @@ -626,12 +626,8 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs) case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: - lock_kernel(); - if (current->binfmt - && current->binfmt->core_dump - && current->binfmt->core_dump(signr, regs)) + if (do_coredump(signr, regs)) exit_code |= 0x80; - unlock_kernel(); /* FALLTHRU */ default: diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 5bc1af0f163b..f95a1e950fb8 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S @@ -661,7 +661,7 @@ pgm_no_sv: lr %r3,%r8 la %r0,0x7f nr %r3,%r0 # clear per-event-bit - be BASED(pgm_dn) # none of Martins exceptions occured bypass + be BASED(pgm_dn) # none of Martins exceptions occurred bypass l %r9,BASED(.Ljump_table) sll %r3,2 l %r9,0(%r3,%r9) # load address of handler routine diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index 904bacf66285..f0a50b423ffe 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c @@ -529,12 +529,8 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: - lock_kernel(); - if (current->binfmt - && current->binfmt->core_dump - && current->binfmt->core_dump(signr, regs)) + if (do_coredump(signr, regs)) exit_code |= 0x80; - unlock_kernel(); /* FALLTHRU */ default: diff --git a/arch/s390/tools/dasdfmt/dasdfmt.c b/arch/s390/tools/dasdfmt/dasdfmt.c index 3489a49d8a17..1a5d3f95d695 100644 --- a/arch/s390/tools/dasdfmt/dasdfmt.c +++ b/arch/s390/tools/dasdfmt/dasdfmt.c @@ -479,7 +479,7 @@ do_format_dasd(char *dev_name,format_data_t format_params,int testmode, rc=stat(dev_name,&stat_buf); if (rc) { - ERRMSG_EXIT(EXIT_FAILURE,"%s: error occured during stat: " \ + ERRMSG_EXIT(EXIT_FAILURE,"%s: error occurred during stat: " \ "%s\n",prog_name,strerror(errno)); } else { if (!S_ISBLK(stat_buf.st_mode)) diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index eb2b331caf16..c5e970a785a7 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S @@ -1,4 +1,4 @@ -/* $Id: entry.S,v 1.159.2.8 2000/10/05 04:17:17 anton Exp $ +/* $Id: entry.S,v 1.159.2.9 2001/06/18 12:26:13 davem Exp $ * arch/sparc/kernel/entry.S: Sparc trap low-level entry points. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) @@ -1237,8 +1237,8 @@ C_LABEL(sys_ptrace): call C_LABEL(do_ptrace) add %sp, REGWIN_SZ, %o0 - ld [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 + ld [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be 1f nop @@ -1287,8 +1287,8 @@ C_LABEL(sys_sigpause): call C_LABEL(do_sigpause) add %sp, REGWIN_SZ, %o1 - ld [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 + ld [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be 1f nop @@ -1305,8 +1305,8 @@ C_LABEL(sys_sigsuspend): call C_LABEL(do_sigsuspend) add %sp, REGWIN_SZ, %o0 - ld [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 + ld [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be 1f nop @@ -1324,8 +1324,8 @@ C_LABEL(sys_rt_sigsuspend): call C_LABEL(do_rt_sigsuspend) add %sp, REGWIN_SZ, %o2 - ld [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 + ld [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be 1f nop @@ -1342,8 +1342,8 @@ C_LABEL(sys_sigreturn): call C_LABEL(do_sigreturn) add %sp, REGWIN_SZ, %o0 - ld [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 + ld [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be 1f nop @@ -1362,8 +1362,8 @@ C_LABEL(sys_rt_sigreturn): call C_LABEL(do_rt_sigreturn) add %sp, REGWIN_SZ, %o0 - ld [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 + ld [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be 1f nop @@ -1500,9 +1500,9 @@ syscall_is_too_hard: mov %i1, %o1 mov %i2, %o2 - ld [%curptr + AOFF_task_flags], %l5 + ld [%curptr + AOFF_task_ptrace], %l5 mov %i3, %o3 - andcc %l5, 0x20, %g0 + andcc %l5, 0x02, %g0 mov %i4, %o4 bne linux_syscall_trace mov %i0, %l5 @@ -1514,12 +1514,12 @@ syscall_is_too_hard: .globl C_LABEL(ret_sys_call) C_LABEL(ret_sys_call): - ld [%curptr + AOFF_task_flags], %l6 + ld [%curptr + AOFF_task_ptrace], %l6 cmp %o0, -ENOIOCTLCMD ld [%sp + REGWIN_SZ + PT_PSR], %g3 set PSR_C, %g2 bgeu 1f - andcc %l6, 0x20, %l6 + andcc %l6, 0x02, %l6 /* System call success, clear Carry condition code. */ andn %g3, %g2, %g3 diff --git a/arch/sparc/kernel/signal.c b/arch/sparc/kernel/signal.c index 5401c0e24e60..9a736ba8b72e 100644 --- a/arch/sparc/kernel/signal.c +++ b/arch/sparc/kernel/signal.c @@ -1,4 +1,4 @@ -/* $Id: signal.c,v 1.91.2.2 2000/05/28 19:13:21 ecd Exp $ +/* $Id: signal.c,v 1.91.2.3 2001/06/18 12:26:13 davem Exp $ * linux/arch/sparc/kernel/signal.c * * Copyright (C) 1991, 1992 Linus Torvalds @@ -1217,14 +1217,8 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs, case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: case SIGBUS: - if(current->binfmt && current->binfmt->core_dump) { - lock_kernel(); - if(current->binfmt && - current->binfmt->core_dump && - current->binfmt->core_dump(signr, regs)) - exit_code |= 0x80; - unlock_kernel(); - } + if (do_coredump(signr, regs)) + exit_code |= 0x80; #ifdef DEBUG_SIGNALS /* Very useful to debug dynamic linker problems */ printk ("Sig %ld going for %s[%d]...\n", signr, current->comm, current->pid); diff --git a/arch/sparc/lib/memset.S b/arch/sparc/lib/memset.S index b8ca55e50bc8..2cc6191c5243 100644 --- a/arch/sparc/lib/memset.S +++ b/arch/sparc/lib/memset.S @@ -185,7 +185,7 @@ C_LABEL(__memset_end): b 30f add %o0, %o1, %o0 30: -/* %o4 is faulting address, %o5 is %pc where fault occured */ +/* %o4 is faulting address, %o5 is %pc where fault occurred */ save %sp, -104, %sp mov %i5, %o0 mov %i7, %o1 diff --git a/arch/sparc64/kernel/binfmt_aout32.c b/arch/sparc64/kernel/binfmt_aout32.c index c110ee9081a9..a51757ab7f57 100644 --- a/arch/sparc64/kernel/binfmt_aout32.c +++ b/arch/sparc64/kernel/binfmt_aout32.c @@ -34,12 +34,16 @@ static int load_aout32_binary(struct linux_binprm *, struct pt_regs * regs); static int load_aout32_library(int fd); -static int aout32_core_dump(long signr, struct pt_regs * regs); +static int aout32_core_dump(long signr, struct pt_regs * regs, struct file *); extern void dump_thread(struct pt_regs *, struct user *); static struct linux_binfmt aout32_format = { - NULL, NULL, load_aout32_binary, load_aout32_library, aout32_core_dump + module: THIS_MODULE, + load_binary: load_aout32_binary, + load_shlib: load_aout32_library, + core_dump: aout32_core_dump, + min_coredump: PAGE_SIZE, }; static void set_brk(unsigned long start, unsigned long end) @@ -87,46 +91,18 @@ if (file->f_op->llseek) { \ * dumping of the process results in another error.. */ -static inline int -do_aout32_core_dump(long signr, struct pt_regs * regs) +static int +aout32_core_dump(long signr, struct pt_regs * regs, struct file * file) { - struct dentry * dentry = NULL; - struct inode * inode = NULL; - struct file * file; mm_segment_t fs; int has_dumped = 0; - char corefile[6+sizeof(current->comm)]; unsigned long dump_start, dump_size; struct user dump; # define START_DATA(u) (u.u_tsize) # define START_STACK(u) ((regs->u_regs[UREG_FP]) & ~(PAGE_SIZE - 1)) - if (!current->dumpable || atomic_read(¤t->mm->count) != 1) - return 0; - current->dumpable = 0; - -/* See if we have enough room to write the upage. */ - if (current->rlim[RLIMIT_CORE].rlim_cur < PAGE_SIZE) - return 0; fs = get_fs(); set_fs(KERNEL_DS); - memcpy(corefile,"core.",5); -#if 0 - memcpy(corefile+5,current->comm,sizeof(current->comm)); -#else - corefile[4] = '\0'; -#endif - file = filp_open(corefile,O_CREAT | 2 | O_TRUNC | O_NOFOLLOW, 0600); - if (IS_ERR(file)) - goto end_coredump; - dentry = file->f_dentry; - inode = dentry->d_inode; - if (!S_ISREG(inode->i_mode)) - goto close_coredump; - if (!inode->i_op || !inode->i_op->default_file_ops) - goto close_coredump; - if (!file->f_op->write) - goto close_coredump; has_dumped = 1; current->flags |= PF_DUMPCORE; strncpy(dump.u_comm, current->comm, sizeof(current->comm)); @@ -172,23 +148,10 @@ do_aout32_core_dump(long signr, struct pt_regs * regs) set_fs(KERNEL_DS); DUMP_WRITE(current,sizeof(*current)); close_coredump: - filp_close(file, NULL); -end_coredump: set_fs(fs); return has_dumped; } -static int -aout32_core_dump(long signr, struct pt_regs * regs) -{ - int retval; - - MOD_INC_USE_COUNT; - retval = do_aout32_core_dump(signr, regs); - MOD_DEC_USE_COUNT; - return retval; -} - /* * create_aout32_tables() parses the env- and arg-strings in new user * memory and creates the pointer tables from them, and puts their diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index 7a8ecbc8618b..31ddc89e7d71 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S @@ -1,4 +1,4 @@ -/* $Id: entry.S,v 1.103.2.6 2000/09/08 14:00:04 jj Exp $ +/* $Id: entry.S,v 1.103.2.7 2001/06/18 12:26:13 davem Exp $ * arch/sparc64/kernel/entry.S: Sparc64 trap low-level entry points. * * Copyright (C) 1995,1997 David S. Miller (davem@caip.rutgers.edu) @@ -880,8 +880,8 @@ sys_ptrace: add %sp, STACK_BIAS + REGWIN_SZ, %o0 add %o7, 1f-.-4, %o7 nop .align 32 -1: ldx [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 +1: ldx [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be,pt %icc, rtrap clr %l6 call syscall_trace @@ -1015,12 +1015,12 @@ linux_sparc_syscall32: mov %i4, %o4 ! IEU1 lduw [%l7 + %l4], %l7 ! Load srl %i1, 0, %o1 ! IEU0 Group - ldx [%curptr + AOFF_task_flags], %l0 ! Load + ldx [%curptr + AOFF_task_ptrace], %l0 ! Load mov %i5, %o5 ! IEU1 srl %i2, 0, %o2 ! IEU0 Group mov %i0, %l5 ! IEU1 - andcc %l0, 0x20, %g0 ! IEU1 Group + andcc %l0, 0x02, %g0 ! IEU1 Group bne,pn %icc, linux_syscall_trace32 ! CTI srl %i3, 0, %o3 ! IEU0 call %l7 ! CTI Group brk forced @@ -1044,11 +1044,11 @@ linux_sparc_syscall: mov %i1, %o1 ! IEU1 lduw [%l7 + %l4], %l7 ! Load 4: mov %i2, %o2 ! IEU0 Group - ldx [%curptr + AOFF_task_flags], %l0 ! Load + ldx [%curptr + AOFF_task_ptrace], %l0 ! Load mov %i3, %o3 ! IEU1 mov %i4, %o4 ! IEU0 Group - andcc %l0, 0x20, %g0 ! IEU1 Group+1 bubble + andcc %l0, 0x02, %g0 ! IEU1 Group+1 bubble bne,pn %icc, linux_syscall_trace ! CTI Group mov %i0, %l5 ! IEU0 2: call %l7 ! CTI Group brk forced @@ -1059,14 +1059,14 @@ ret_sys_call: call syscall_trace_exit add %sp, STACK_BIAS + REGWIN_SZ, %o1 #endif - ldx [%curptr + AOFF_task_flags], %l6 + ldx [%curptr + AOFF_task_ptrace], %l6 sra %o0, 0, %o0 mov %ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2 ldx [%sp + STACK_BIAS + REGWIN_SZ + PT_V9_TSTATE], %g3 cmp %o0, -ENOIOCTLCMD sllx %g2, 32, %g2 bgeu,pn %xcc, 1f - andcc %l6, 0x20, %l6 + andcc %l6, 0x02, %l6 /* System call success, clear Carry condition code. */ andn %g3, %g2, %g3 diff --git a/arch/sparc64/kernel/ioctl32.c b/arch/sparc64/kernel/ioctl32.c index 0b04b95157d6..e75cfe15f709 100644 --- a/arch/sparc64/kernel/ioctl32.c +++ b/arch/sparc64/kernel/ioctl32.c @@ -1,4 +1,4 @@ -/* $Id: ioctl32.c,v 1.62.2.20 2001/05/16 07:28:40 davem Exp $ +/* $Id: ioctl32.c,v 1.62.2.21 2001/06/08 01:34:11 davem Exp $ * ioctl32.c: Conversion between 32bit and 64bit native ioctls. * * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) @@ -2692,6 +2692,8 @@ asmlinkage int sys32_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) case /* STOP_ARRAY */ _IO (MD_MAJOR, 0x32): case /* STOP_ARRAY_RO */ _IO (MD_MAJOR, 0x33): case /* RESTART_ARRAY_RW */ _IO (MD_MAJOR, 0x34): + case /* PRINT_RAID_DEBUG */ _IO (MD_MAJOR, 0x13): + case /* SET_DISK_FAULTY */ _IO (MD_MAJOR, 0x29): /* Big K */ case PIO_FONT: diff --git a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c index 8ad3e71ce343..962c6b978eff 100644 --- a/arch/sparc64/kernel/signal.c +++ b/arch/sparc64/kernel/signal.c @@ -1,4 +1,4 @@ -/* $Id: signal.c,v 1.38.2.1 1999/06/14 00:36:21 davem Exp $ +/* $Id: signal.c,v 1.38.2.2 2001/06/18 12:26:13 davem Exp $ * arch/sparc64/kernel/signal.c * * Copyright (C) 1991, 1992 Linus Torvalds @@ -918,12 +918,8 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs, case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: case SIGBUS: - if(current->binfmt && current->binfmt->core_dump) { - lock_kernel(); - if(current->binfmt->core_dump(signr, regs)) - exit_code |= 0x80; - unlock_kernel(); - } + if (do_coredump(signr, regs)) + exit_code |= 0x80; #ifdef DEBUG_SIGNALS /* Very useful to debug the dynamic linker */ printk ("Sig %d going...\n", (int)signr); diff --git a/arch/sparc64/kernel/signal32.c b/arch/sparc64/kernel/signal32.c index 688e4b6ee9c1..344e207a88f8 100644 --- a/arch/sparc64/kernel/signal32.c +++ b/arch/sparc64/kernel/signal32.c @@ -1,4 +1,4 @@ -/* $Id: signal32.c,v 1.47.2.3 1999/12/20 01:14:06 davem Exp $ +/* $Id: signal32.c,v 1.47.2.4 2001/06/18 12:26:13 davem Exp $ * arch/sparc64/kernel/signal32.c * * Copyright (C) 1991, 1992 Linus Torvalds @@ -1347,14 +1347,8 @@ asmlinkage int do_signal32(sigset_t *oldset, struct pt_regs * regs, case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: case SIGBUS: - if(current->binfmt && current->binfmt->core_dump) { - lock_kernel(); - if(current->binfmt && - current->binfmt->core_dump && - current->binfmt->core_dump(signr, regs)) - exit_code |= 0x80; - unlock_kernel(); - } + if (do_coredump(signr, regs)) + exit_code |= 0x80; #ifdef DEBUG_SIGNALS /* Very useful to debug dynamic linker problems */ printk ("Sig %ld going for %s[%d]...\n", signr, current->comm, current->pid); diff --git a/arch/sparc64/solaris/entry64.S b/arch/sparc64/solaris/entry64.S index 53d825e6dfe5..6462f5e575b4 100644 --- a/arch/sparc64/solaris/entry64.S +++ b/arch/sparc64/solaris/entry64.S @@ -1,4 +1,4 @@ -/* $Id: entry64.S,v 1.5 1998/03/26 08:46:15 jj Exp $ +/* $Id: entry64.S,v 1.5.2.1 2001/06/18 12:26:13 davem Exp $ * entry64.S: Solaris syscall emulation entry point. * * Copyright (C) 1996,1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) @@ -83,7 +83,7 @@ solaris_sparc_syscall: 1: srl %i0, 0, %o0 lduw [%l7 + %l4], %l3 srl %i1, 0, %o1 - ldx [%g6 + AOFF_task_flags], %l5 + ldx [%g6 + AOFF_task_ptrace], %l5 cmp %l3, NR_SYSCALLS bleu,a,pn %xcc, linux_syscall_for_solaris sethi %hi(sys_call_table32), %l6 @@ -93,21 +93,21 @@ solaris_sparc_syscall: 10: srl %i2, 0, %o2 mov %i5, %o5 andn %l3, 3, %l7 - andcc %l5, 0x20, %g0 + andcc %l5, 0x02, %g0 bne,pn %icc, solaris_syscall_trace mov %i0, %l5 2: call %l7 srl %i3, 0, %o3 ret_from_solaris: stx %o0, [%sp + STACK_BIAS + REGWIN_SZ + PT_V9_I0] - ldx [%g6 + AOFF_task_flags], %l6 + ldx [%g6 + AOFF_task_ptrace], %l6 sra %o0, 0, %o0 mov %ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2 ldx [%sp + STACK_BIAS + REGWIN_SZ + PT_V9_TSTATE], %g3 cmp %o0, -ENOIOCTLCMD sllx %g2, 32, %g2 bgeu,pn %xcc, 1f - andcc %l6, 0x20, %l6 + andcc %l6, 0x02, %l6 /* System call success, clear Carry condition code. */ andn %g3, %g2, %g3 diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index ec906f7d9c6b..70596fcb7076 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -42,8 +42,8 @@ #include #define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin)) -#define DRIVER_NAME "Compaq CISS Driver (v 1.0.3)" -#define DRIVER_VERSION CCISS_DRIVER_VERSION(1,0,3) +#define DRIVER_NAME "Compaq CISS Driver (v 1.0.4)" +#define DRIVER_VERSION CCISS_DRIVER_VERSION(1,0,4) /* Embedded module documentation macros - see modules.h */ MODULE_AUTHOR("Charles M. White III - Compaq Computer Corporation"); @@ -734,7 +734,7 @@ static int revalidate_logvol(kdev_t dev, int maxusage) max_p = gdev->max_p; start = target << gdev->minor_shift; - for(i=max_p; i>=0; i--) { + for(i=max_p-1; i>=0; i--) { int minor = start+i; kdev_t devi = MKDEV(MAJOR_NR + ctlr, minor); struct super_block *sb = get_super(devi); @@ -1129,7 +1129,7 @@ static inline void complete_command( CommandList_struct *cmd, int timeout) if (timeout) status = 0; if(cmd->err_info->CommandStatus != 0) - { /* an error has occured */ + { /* an error has occurred */ switch(cmd->err_info->CommandStatus) { case CMD_TARGET_STATUS: diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c index 7a042d6211fb..b7a19401ac24 100644 --- a/drivers/block/cpqarray.c +++ b/drivers/block/cpqarray.c @@ -41,8 +41,8 @@ #define SMART2_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin)) -#define DRIVER_NAME "Compaq SMART2 Driver (v 1.0.11)" -#define DRIVER_VERSION SMART2_DRIVER_VERSION(1,0,11) +#define DRIVER_NAME "Compaq SMART2 Driver (v 1.0.12)" +#define DRIVER_VERSION SMART2_DRIVER_VERSION(1,0,12) /* Embedded module documentation macros - see modules.h */ /* Original author Chris Frantz - Compaq Computer Corporation */ @@ -1558,7 +1558,7 @@ static int revalidate_logvol(kdev_t dev, int maxusage) max_p = gdev->max_p; start = target << gdev->minor_shift; - for(i=max_p; i>=0; i--) { + for(i=max_p-1; i>=0; i--) { int minor = start+i; kdev_t devi = MKDEV(MAJOR_NR + ctlr, minor); struct super_block *sb = get_super(devi); diff --git a/drivers/block/genhd.c b/drivers/block/genhd.c index bfa99203c921..6d0a209fffc7 100644 --- a/drivers/block/genhd.c +++ b/drivers/block/genhd.c @@ -336,7 +336,8 @@ static void extended_partition(struct gendisk *hd, kdev_t dev, int sector_size) goto done; /* nothing left to do */ hd->part[current_minor].nr_sects = NR_SECTS(p) * sector_size; /* JSt */ - hd->part[current_minor].start_sect = first_sector + START_SECT(p) * sector_size; + hd->part[current_minor].start_sect = + first_sector + START_SECT(p) * sector_size; this_sector = first_sector + START_SECT(p) * sector_size; dev = MKDEV(hd->major, current_minor); brelse(bh); diff --git a/drivers/block/ide-cd.c b/drivers/block/ide-cd.c index f54dd13561cc..0f1dd0163705 100644 --- a/drivers/block/ide-cd.c +++ b/drivers/block/ide-cd.c @@ -254,7 +254,7 @@ * They will disappear later when I get the time to * do it cleanly. * - Minimize the TOC reading - only do it when we - * know a media change has occured. + * know a media change has occurred. * - Moved all the CDROMREADx ioctls to the Uniform layer. * - Heiko Eissfeldt supplied * some fixes for CDI. diff --git a/drivers/block/ide-dma.c b/drivers/block/ide-dma.c index 11bb76a4bf16..17a6f0bd84da 100644 --- a/drivers/block/ide-dma.c +++ b/drivers/block/ide-dma.c @@ -217,6 +217,20 @@ int ide_build_dmatable (ide_drive_t *drive) xcount = bcount & 0xffff; if (is_trm290_chipset) xcount = ((xcount >> 2) - 1) << 16; + if (xcount == 0x0000) { + /* + * Most chipsets correctly interpret a length of 0x0000 as 64KB, + * but at least one (e.g. CS5530) misinterprets it as zero (!). + * So here we break the 64KB entry into two 32KB entries instead. + */ + if (count++ >= PRD_ENTRIES) { + printk("%s: DMA table too small\n", drive->name); + return 0; /* revert to PIO for this request */ + } + *table++ = cpu_to_le32(0x8000); + *table++ = cpu_to_le32(addr + 0x8000); + xcount = 0x8000; + } *table++ = cpu_to_le32(xcount); addr += bcount; size -= bcount; diff --git a/drivers/block/ide-pmac.c b/drivers/block/ide-pmac.c index 13a7c4684b09..446bb67e9d8d 100644 --- a/drivers/block/ide-pmac.c +++ b/drivers/block/ide-pmac.c @@ -97,7 +97,7 @@ static pmac_ide_timing udma_timings[] = /* Wait 2s for disk to answer on IDE bus after * enable operation. * NOTE: There is at least one case I know of a disk that needs about 10sec - * before anwering on the bus. I beleive we could add a kernel command + * before anwering on the bus. I believe we could add a kernel command * line arg to override this delay for such cases. */ #define IDE_WAKEUP_DELAY_MS 2000 @@ -192,9 +192,10 @@ pmac_ide_get_devnode(ide_drive_t *drive) } #endif -/* Setup timings for the selected drive (master/slave). I still need to verify if this - * is enough, I beleive selectproc will be called whenever an IDE command is started, - * but... */ +/* Setup timings for the selected drive (master/slave). I still need to + * verify if this is enough, I believe selectproc will be called whenever + * an IDE command is started, but... + */ static void pmac_ide_selectproc(ide_drive_t *drive) { diff --git a/drivers/block/ide.c b/drivers/block/ide.c index d706f4506adb..9dc0ab728a74 100644 --- a/drivers/block/ide.c +++ b/drivers/block/ide.c @@ -1298,9 +1298,10 @@ void ide_timer_expiry (unsigned long data) del_timer(&hwgroup->timer); if ((handler = hwgroup->handler) == NULL) { /* - * Either a marginal timeout occured (got the interrupt just as timer expired), - * or we were "sleeping" to give other devices a chance. Either way, we don't - * really want to complain about anything. + * Either a marginal timeout occurred (got the interrupt + * just as timer expired), or we were "sleeping" to give + * other devices a chance. Either way, we don't really + * want to complain about anything. */ if (hwgroup->sleeping) { hwgroup->sleeping = 0; diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index b26377c9053f..4ef89b076394 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -514,12 +514,12 @@ int open_for_data(struct cdrom_device_info * cdi) couldn't close the tray. We only care that there is no disc in the drive, since that is the _REAL_ problem here.*/ - ret=-ENOMEDIUM; + ret = -ENOMEDIUM; goto clean_up_and_return; } } else { cdinfo(CD_OPEN, "bummer. this drive can't close the tray.\n"); - ret=-ENOMEDIUM; + ret = -ENOMEDIUM; goto clean_up_and_return; } /* Ok, the door should be closed now.. Check again */ @@ -527,7 +527,7 @@ int open_for_data(struct cdrom_device_info * cdi) if ((ret == CDS_NO_DISC) || (ret==CDS_TRAY_OPEN)) { cdinfo(CD_OPEN, "bummer. the tray is still not closed.\n"); cdinfo(CD_OPEN, "tray might not contain a medium.\n"); - ret=-ENOMEDIUM; + ret = -ENOMEDIUM; goto clean_up_and_return; } cdinfo(CD_OPEN, "the tray is now closed.\n"); @@ -540,7 +540,7 @@ int open_for_data(struct cdrom_device_info * cdi) cdrom_count_tracks(cdi, &tracks); if (tracks.error == CDS_NO_DISC) { cdinfo(CD_OPEN, "bummer. no disc.\n"); - ret=-ENOMEDIUM; + ret = -ENOMEDIUM; goto clean_up_and_return; } /* CD-Players which don't use O_NONBLOCK, workman @@ -1952,6 +1952,7 @@ static int mmc_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, ra.buf += (CD_FRAMESIZE_RAW * frames); ra.nframes -= frames; lba += frames; + if (frames>ra.nframes) frames=ra.nframes; } kfree(cgc.buffer); return ret; diff --git a/drivers/char/Config.in b/drivers/char/Config.in index 2ed7cd7fdd84..44f2b364c84b 100644 --- a/drivers/char/Config.in +++ b/drivers/char/Config.in @@ -53,8 +53,8 @@ if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then tristate ' Stallion EasyIO or EC8/32 support' CONFIG_STALLION tristate ' Stallion EC8/64, ONboard, Brumby support' CONFIG_ISTALLION fi - dep_tristate 'Microgate SyncLink card support' CONFIG_SYNCLINK m - dep_tristate 'HDLC line discipline support' CONFIG_N_HDLC m + tristate 'Microgate SyncLink card support' CONFIG_SYNCLINK + tristate 'HDLC line discipline support' CONFIG_N_HDLC fi bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then diff --git a/drivers/char/Makefile b/drivers/char/Makefile index c475ded7c1bc..de13451c983b 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile @@ -184,12 +184,20 @@ else endif endif -ifeq ($(CONFIG_SYNCLINK),m) +ifeq ($(CONFIG_SYNCLINK),y) +O_OBJS += synclink.o +else + ifeq ($(CONFIG_SYNCLINK),m) M_OBJS += synclink.o + endif endif -ifeq ($(CONFIG_N_HDLC),m) +ifeq ($(CONFIG_N_HDLC),y) +O_OBJS += n_hdlc.o +else + ifeq ($(CONFIG_N_HDLC),m) M_OBJS += n_hdlc.o + endif endif ifeq ($(CONFIG_SPECIALIX),y) diff --git a/drivers/char/atari_SCC.README b/drivers/char/atari_SCC.README index 30d000b78a3f..566d923c8b97 100644 --- a/drivers/char/atari_SCC.README +++ b/drivers/char/atari_SCC.README @@ -96,7 +96,7 @@ very much to do besides increasing the number of buffers (see below). If you should see a message like: -Sep 26 10:39:32 zaphod kernel: SCC-A: DMA-INT occured, data lost! +Sep 26 10:39:32 zaphod kernel: SCC-A: DMA-INT occurred, data lost! that means that the timer routine itself has been delayed so long that the DMA counter went to zero already. There's not very much to do about this, because diff --git a/drivers/char/atari_SCC.c b/drivers/char/atari_SCC.c index 965beaeaaad1..60d55ae647e1 100644 --- a/drivers/char/atari_SCC.c +++ b/drivers/char/atari_SCC.c @@ -1453,11 +1453,11 @@ static void SCC_timer_int (int irq, void *data, struct pt_regs *fp) } -/* DMA finished before timer occured? +/* DMA finished before timer occurred? */ static void SCC_dma_int (int irq, void *data, struct pt_regs *fp) { - printk ("SCC-A: DMA-INT occured, data lost!\n"); + printk ("SCC-A: DMA-INT occurred, data lost!\n"); #if 0 /* is there any reason why we should call this? if the timer INT was * delayed so long that this happened then this INT was delayed too, so diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 54b0bbde3ff5..41cc91a62c67 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c @@ -149,7 +149,7 @@ static char rcsid[] = * Revision 2.2.1.4 1998/08/04 11:02:50 ivan * /proc/cyclades implementation with great collaboration of * Marc Lewis ; - * cyy_interrupt was changed to avoid occurence of kernel oopses + * cyy_interrupt was changed to avoid occurrence of kernel oopses * during PPP operation. * * Revision 2.2.1.3 1998/06/01 12:09:10 ivan diff --git a/drivers/char/epca.c b/drivers/char/epca.c index 581fd781fcce..6dd868bd64de 100644 --- a/drivers/char/epca.c +++ b/drivers/char/epca.c @@ -953,7 +953,7 @@ static int pc_write(struct tty_struct * tty, int from_user, Remember copy_from_user WILL generate a page fault if the user memory being accessed has been swapped out. This can cause this routine to temporarily sleep while this page - fault is occuring. + fault is occurring. ----------------------------------------------------------------- */ @@ -3601,7 +3601,7 @@ static void pc_start(struct tty_struct *tty) /* ------------------------------------------------------------------ The below routines pc_throttle and pc_unthrottle are used to slow (And resume) the receipt of data into the kernels - receive buffers. The exact occurence of this depends on the + receive buffers. The exact occurrence of this depends on the size of the kernels receive buffer and what the 'watermarks' are set to for that buffer. See the n_ttys.c file for more details. diff --git a/drivers/char/hfmodem/refclock.c b/drivers/char/hfmodem/refclock.c index e98cff8c1bb5..bd3982d22f66 100644 --- a/drivers/char/hfmodem/refclock.c +++ b/drivers/char/hfmodem/refclock.c @@ -133,7 +133,7 @@ hfmodem_time_t hfmodem_refclock_current(struct hfmodem_state *dev, hfmodem_time_ "subl %2,%%eax\n\t" "sbbl %3,%%edx\n\t" : "=&a" (tmp0), "=&d" (tmp1) : "m" (dev->clk.starttime_lo), "m" (dev->clk.starttime_hi)); - __asm__("mull %2" : "=d" (tmp2), "=a" (tmp4) : "m" (scale_rdtsc), "1" (tmp0) : "ax"); + __asm__("mull %2" : "=d" (tmp2), "=a" (tmp4) : "m" (scale_rdtsc), "1" (tmp0)); __asm__("mull %1" : "=a" (tmp3) : "m" (scale_rdtsc), "a" (tmp1) : "dx"); curtime = tmp2 + tmp3; goto time_known; diff --git a/drivers/char/lp.c b/drivers/char/lp.c index 54d5c8751a78..c91cfcf7844b 100644 --- a/drivers/char/lp.c +++ b/drivers/char/lp.c @@ -306,7 +306,7 @@ static inline int lp_char(char lpchar, int minor) } /* * NOTE: if you run with irqs you _must_ use - * `tunelp /dev/lp? -c 1' to be rasonable efficient! + * `tunelp /dev/lp? -c 1' to be reasonably efficient! * * ..but beware that data corruption can happen that way. -Tim */ diff --git a/drivers/char/n_hdlc.c b/drivers/char/n_hdlc.c index abdb4baa1576..109a37f31fc3 100644 --- a/drivers/char/n_hdlc.c +++ b/drivers/char/n_hdlc.c @@ -9,7 +9,7 @@ * Al Longyear , Paul Mackerras * * Original release 01/11/99 - * $Id: n_hdlc.c,v 2.2 2000/11/08 17:08:29 paul Exp $ + * $Id: n_hdlc.c,v 2.3 2001/05/09 14:42:37 paul Exp $ * * This code is released under the GNU General Public License (GPL) * @@ -78,7 +78,7 @@ */ #define HDLC_MAGIC 0x239e -#define HDLC_VERSION "2.2" +#define HDLC_VERSION "$Revision: 2.3 $" #include #include @@ -98,6 +98,7 @@ #include #include #include +#include #include /* used in new tty drivers */ #include /* used in new tty drivers */ #include @@ -986,14 +987,7 @@ N_HDLC_BUF* n_hdlc_buf_get(N_HDLC_BUF_LIST *list) } /* end of n_hdlc_buf_get() */ -/* init_module() - * - * called when module is loading to register line discipline - * - * Arguments: None - * Return Value: 0 if success, otherwise error code - */ -int init_module(void) +int __init n_hdlc_init() { static struct tty_ldisc n_hdlc_ldisc; int status; @@ -1031,16 +1025,14 @@ int init_module(void) if (status) printk(KERN_INFO"N_HDLC: init failure %d\n", status); return (status); - -} /* end of init_module() */ +} + +#ifdef MODULE +int init_module(void) +{ + return n_hdlc_init(); +} -/* cleanup_module() - * - * called when module is unloading to unregister line discipline - * - * Arguments: None - * Return Value: None - */ void cleanup_module(void) { int status; @@ -1050,3 +1042,4 @@ void cleanup_module(void) else printk("N_HDLC: line discipline unregistered\n"); } +#endif diff --git a/drivers/char/sbc60xxwdt.c b/drivers/char/sbc60xxwdt.c index 8a35dcec4a3a..71f9b73f56c8 100644 --- a/drivers/char/sbc60xxwdt.c +++ b/drivers/char/sbc60xxwdt.c @@ -49,7 +49,7 @@ * * Why `V' ? Well, `V' is the character in ASCII for the value 86, * and we all know that 86 is _the_ most random number in the universe. - * Therefore it is the letter that has the slightest chance of occuring + * Therefore it is the letter that has the slightest chance of occurring * by chance, when the system becomes corrupted. * */ diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c index cc9df986dcdf..36d72aa84317 100644 --- a/drivers/char/synclink.c +++ b/drivers/char/synclink.c @@ -1,7 +1,7 @@ /* * linux/drivers/char/synclink.c * - * $Id: synclink.c,v 2.8 2001/03/30 17:30:37 ez Exp $ + * $Id: synclink.c,v 2.12 2001/05/10 20:53:04 paulkf Exp $ * * Device driver for Microgate SyncLink ISA and PCI * high speed multiprotocol serial adapters. @@ -54,7 +54,11 @@ */ #define VERSION(ver,rel,seq) (((ver)<<16) | ((rel)<<8) | (seq)) -#define BREAKPOINT() asm(" int $3"); +#if defined(__i386__) +# define BREAKPOINT() asm(" int $3"); +#else +# define BREAKPOINT() { } +#endif #define MAX_ISA_DEVICES 10 #define MAX_PCI_DEVICES 10 @@ -924,7 +928,7 @@ MODULE_PARM(txdmabufs,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i"); MODULE_PARM(txholdbufs,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i"); static char *driver_name = "SyncLink serial driver"; -static char *driver_version = "2.8"; +static char *driver_version = "$Revision: 2.12 $"; static struct tty_driver serial_driver, callout_driver; static int serial_refcount; @@ -4486,18 +4490,20 @@ void mgsl_add_device( struct mgsl_struct *info ) info->max_frame_size = 65535; if ( info->bus_type == MGSL_BUS_TYPE_PCI ) { - printk( "SyncLink device %s added:PCI bus IO=%04X IRQ=%d Mem=%08X LCR=%08X MaxFrameSize=%u\n", + printk( "SyncLink device %s:PCI IO=%04X IRQ=%d Mem=%08X LCR=%08X MaxFrameSize=%u\n", info->device_name, info->io_base, info->irq_level, info->phys_memory_base, info->phys_lcr_base, info->max_frame_size ); } else { - printk( "SyncLink device %s added:ISA bus IO=%04X IRQ=%d DMA=%d MaxFrameSize=%u\n", + printk( "SyncLink device %s:ISA IO=%04X IRQ=%d DMA=%d MaxFrameSize=%u\n", info->device_name, info->io_base, info->irq_level, info->dma_level, info->max_frame_size ); } #ifdef CONFIG_SYNCLINK_SYNCPPP +#ifdef MODULE if (info->dosyncppp) +#endif mgsl_sppp_init(info); #endif } /* end of mgsl_add_device() */ @@ -4661,7 +4667,7 @@ int __init mgsl_init(void) EXPORT_NO_SYMBOLS; - printk("%s version %s\n", driver_name, driver_version); + printk("%s %s\n", driver_name, driver_version); /* determine how many SyncLink devices are installed */ mgsl_enumerate_devices(); @@ -4729,7 +4735,7 @@ int __init mgsl_init(void) printk("%s(%d):Couldn't register callout driver\n", __FILE__,__LINE__); - printk("%s version %s, tty major#%d callout major#%d\n", + printk("%s %s, tty major#%d callout major#%d\n", driver_name, driver_version, serial_driver.major, callout_driver.major); @@ -4746,6 +4752,7 @@ int __init mgsl_init(void) } /* end of mgsl_init() */ +#ifdef MODULE int __init init_module(void) { /* Uncomment this to kernel debug module. @@ -4796,6 +4803,7 @@ void cleanup_module(void) } } /* end of cleanup_module() */ +#endif /* * usc_RTCmd() @@ -7663,7 +7671,7 @@ BOOLEAN mgsl_dma_test( struct mgsl_struct *info ) status = info->rx_buffer_list[0].status; if ( status & (BIT8 + BIT3 + BIT1) ) { - /* receive error has occured */ + /* receive error has occurred */ rc = FALSE; } else { if ( memcmp( info->tx_buffer_list[0].virt_addr , diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index fe4a15be0c76..473ee35b3f3d 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -2243,6 +2243,12 @@ __initfunc(int tty_init(void)) #endif #ifdef CONFIG_VT vcs_init(); +#endif +#ifdef CONFIG_SYNCLINK + mgsl_init(); +#endif +#ifdef CONFIG_N_HDLC + n_hdlc_init(); #endif return 0; } diff --git a/drivers/char/wdt_pci.c b/drivers/char/wdt_pci.c index 2718f48371b3..2cb9feeff40d 100644 --- a/drivers/char/wdt_pci.c +++ b/drivers/char/wdt_pci.c @@ -149,7 +149,7 @@ static int wdtpci_status(void) * * Handle an interrupt from the board. These are raised when the status * map changes in what the board considers an interesting way. That means - * a failure condition occuring. + * a failure condition occurring. */ static void wdtpci_interrupt(int irq, void *dev_id, struct pt_regs *regs) diff --git a/drivers/i2o/i2o_scsi.c b/drivers/i2o/i2o_scsi.c index 58b300acf5ed..ccf9c0d90e7b 100644 --- a/drivers/i2o/i2o_scsi.c +++ b/drivers/i2o/i2o_scsi.c @@ -266,7 +266,7 @@ static void i2o_scsi_reply(struct i2o_handler *h, struct i2o_controller *c, stru if(st) { - /* An error has occured */ + /* An error has occurred */ dprintk((KERN_DEBUG "SCSI error %08X", m[4])); diff --git a/drivers/isdn/hisax/l3dss1.c b/drivers/isdn/hisax/l3dss1.c index 2ab9ed940e95..2c03a6883139 100644 --- a/drivers/isdn/hisax/l3dss1.c +++ b/drivers/isdn/hisax/l3dss1.c @@ -1599,7 +1599,7 @@ l3dss1_setup(struct l3_process *pc, u_char pr, void *arg) * Bearer Capabilities */ p = skb->data; - /* only the first occurence 'll be detected ! */ + /* only the first occurrence 'll be detected ! */ if ((p = findie(p, skb->len, 0x04, 0))) { if ((p[1] < 2) || (p[1] > 11)) err = 1; diff --git a/drivers/isdn/hisax/l3ni1.c b/drivers/isdn/hisax/l3ni1.c index 86245b474d08..7f230592d590 100644 --- a/drivers/isdn/hisax/l3ni1.c +++ b/drivers/isdn/hisax/l3ni1.c @@ -1458,7 +1458,7 @@ l3ni1_setup(struct l3_process *pc, u_char pr, void *arg) * Bearer Capabilities */ p = skb->data; - /* only the first occurence 'll be detected ! */ + /* only the first occurrence 'll be detected ! */ if ((p = findie(p, skb->len, 0x04, 0))) { if ((p[1] < 2) || (p[1] > 11)) err = 1; diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 3164b9e8dc23..f7bff3d25b6d 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -1356,7 +1356,7 @@ int __openfirmware powerbook_sleep_G3(void) /* Make sure the decrementer won't interrupt us */ asm volatile("mtdec %0" : : "r" (0x7fffffff)); - /* Make sure any pending DEC interrupt occuring while we did + /* Make sure any pending DEC interrupt occurring while we did * the above didn't re-enable the DEC */ mb(); asm volatile("mtdec %0" : : "r" (0x7fffffff)); @@ -1509,7 +1509,7 @@ int __openfirmware powerbook_sleep_Core99(void) /* Make sure the decrementer won't interrupt us */ asm volatile("mtdec %0" : : "r" (0x7fffffff)); - /* Make sure any pending DEC interrupt occuring while we did + /* Make sure any pending DEC interrupt occurring while we did * the above didn't re-enable the DEC */ mb(); asm volatile("mtdec %0" : : "r" (0x7fffffff)); diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index c480895748b3..c4bbf85ef5cb 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c @@ -1603,7 +1603,11 @@ static int rtl8139_thread (void *data) struct rtl8139_private *tp = (struct rtl8139_private *) dev->priv; unsigned long timeout; + lock_kernel(); daemonize (); + exit_files(current); + unlock_kernel(); + spin_lock_irq(¤t->sigmask_lock); sigemptyset(¤t->blocked); recalc_sigpending(current); diff --git a/drivers/net/82596.c b/drivers/net/82596.c index 0ad0a99a7db3..720d10fb2c65 100644 --- a/drivers/net/82596.c +++ b/drivers/net/82596.c @@ -1106,7 +1106,7 @@ __initfunc(int i82596_probe(struct device *dev)) { int i; struct i596_private *lp; - char eth_addr[6]; + char eth_addr[8]; static int probed = 0; if (probed) diff --git a/drivers/net/Config.in b/drivers/net/Config.in index 2145dadc37f4..ba1d0faa3d6c 100644 --- a/drivers/net/Config.in +++ b/drivers/net/Config.in @@ -301,7 +301,7 @@ dep_tristate 'Sealevel Systems 4021 support' CONFIG_SEALEVEL_4021 m # # Microgate Synclink HDLC/SYNCPPP support # -dep_tristate 'SyncLink HDLC/SYNCPPP support' CONFIG_SYNCLINK_SYNCPPP m +tristate 'SyncLink HDLC/SYNCPPP support' CONFIG_SYNCLINK_SYNCPPP # # Lan Media's board. Currently 1000, 1200, 5200, 5245 @@ -344,6 +344,11 @@ if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then fi fi +if [ "$CONFIG_HDLC" = "y" -o "$CONFIG_SYNCLINK_SYNCPPP" = "y" -o \ + "$CONFIG_LANMEDIA" = "y" ] ; then + define_bool CONFIG_SYNCPPP y +fi + tristate 'Frame relay DLCI support' CONFIG_DLCI if [ "$CONFIG_DLCI" != "n" ]; then int ' Max open DLCI' CONFIG_DLCI_COUNT 24 diff --git a/drivers/net/daynaport.c b/drivers/net/daynaport.c index 838ac443ceb5..09b47cea6aac 100644 --- a/drivers/net/daynaport.c +++ b/drivers/net/daynaport.c @@ -447,7 +447,7 @@ __initfunc(int mac8390_probe(struct device *dev)) } /* We should hopefully not get here */ - printk(KERN_ERR "Probe unsucessful.\n"); + printk(KERN_ERR "Probe unsuccessful.\n"); return -ENODEV; membad: diff --git a/drivers/net/macmace.c b/drivers/net/macmace.c index e7bb472cc67a..08c8c1c39446 100644 --- a/drivers/net/macmace.c +++ b/drivers/net/macmace.c @@ -607,7 +607,7 @@ static void mace68k_handle_misc_intrs(struct mace68k_data *mp, int intr) } /* - * A transmit error has occured. (We kick the transmit side from + * A transmit error has occurred. (We kick the transmit side from * the DMA completion) */ @@ -636,7 +636,7 @@ static void mace68k_xmit_error(struct device *dev) } /* - * A receive interrupt occured. + * A receive interrupt occurred. */ static void mace68k_recv_interrupt(struct device *dev) diff --git a/drivers/net/net_init.c b/drivers/net/net_init.c index a356120235ce..894c7fd761f3 100644 --- a/drivers/net/net_init.c +++ b/drivers/net/net_init.c @@ -292,8 +292,8 @@ static int hippi_neigh_setup_dev(struct device *dev, struct neigh_parms *p) void ether_setup(struct device *dev) { int i; - /* Fill in the fields of the device structure with ethernet-generic values. - This should be in a common file instead of per-driver. */ + /* Fill in the fields of the device structure with + ethernet-generic values. */ /* register boot-defined "eth" devices */ if (dev->name && (strncmp(dev->name, "eth", 3) == 0)) { diff --git a/drivers/net/ni52.c b/drivers/net/ni52.c index 5bbfbf17d6d4..2035907fae96 100644 --- a/drivers/net/ni52.c +++ b/drivers/net/ni52.c @@ -33,20 +33,20 @@ * I have also done a look in the following sources: (mail me if you need them) * crynwr-packet-driver by Russ Nelson * Garret A. Wollman's (fourth) i82586-driver for BSD - * (before getting an i82596 (yes 596 not 586) manual, the existing drivers helped - * me a lot to understand this tricky chip.) + * (before getting an i82596 (yes 596 not 586) manual, the existing drivers + * helped me a lot to understand this tricky chip.) * * Known Problems: * The internal sysbus seems to be slow. So we often lose packets because of * overruns while receiving from a fast remote host. - * This can slow down TCP connections. Maybe the newer ni5210 cards are better. - * my experience is, that if a machine sends with more then about 500-600K/s - * the fifo/sysbus overflows. + * This can slow down TCP connections. Maybe the newer ni5210 cards are + * better. My experience is, that if a machine sends with more than + * about 500-600K/s the fifo/sysbus overflows. * * IMPORTANT NOTE: * On fast networks, it's a (very) good idea to have 16K shared memory. With - * 8K, we can store only 4 receive frames, so it can (easily) happen that a remote - * machine 'overruns' our system. + * 8K, we can store only 4 receive frames, so it can (easily) happen that a + * remote machine 'overruns' our system. * * Known i82586/card problems (I'm sure, there are many more!): * Running the NOP-mode, the i82586 sometimes seems to forget to report @@ -60,7 +60,8 @@ * * results from ftp performance tests with Linux 1.2.5 * send and receive about 350-400 KByte/s (peak up to 460 kbytes/s) - * sending in NOP-mode: peak performance up to 530K/s (but better don't run this mode) + * sending in NOP-mode: peak performance up to 530K/s (but better + * don't run this mode) */ /* diff --git a/drivers/net/sbni.c b/drivers/net/sbni.c index 605cb489e7bf..040ac33d6378 100644 --- a/drivers/net/sbni.c +++ b/drivers/net/sbni.c @@ -758,7 +758,7 @@ static inline unsigned short sbni_recv(struct device *dev) */ DP( printk("%s: sbni_recv SendComplete\n",dev->name); ); /* - * We sucessfully sent current packet + * We successfully sent current packet */ if(lp->waitack) diff --git a/drivers/net/sdla_fr.c b/drivers/net/sdla_fr.c index 49d9a347081e..51dd4bc9eb9e 100644 --- a/drivers/net/sdla_fr.c +++ b/drivers/net/sdla_fr.c @@ -77,7 +77,7 @@ * the if clause for it(0,dev->tbusy) * forever. * The code got into this stage due to an -* interrupt occuring within the if clause for +* interrupt occurring within the if clause for * set_bit(0,dev->tbusy). Since an interrupt * disables furhter transmit interrupt and * makes dev->tbusy = 0, this effect was undone @@ -1329,7 +1329,7 @@ static int if_send (struct sk_buff* skb, struct device* dev) /*============================================================================ - * Setup so that a frame can be transmitted on the occurence of a transmit + * Setup so that a frame can be transmitted on the occurrence of a transmit * interrupt. */ static void setup_for_delayed_transmit (struct device* dev, void* buf, @@ -1647,7 +1647,7 @@ static void fr_isr (sdla_t* card) ++card->statistics.isr_intr_test; break; - case FR_INTR_DLC: /* Event interrupt occured */ + case FR_INTR_DLC: /* Event interrupt occurred */ mbox->cmd.command = FR_READ_STATUS; mbox->cmd.length = 0; err = sdla_exec(mbox) ? mbox->cmd.result : CMD_TIMEOUT; @@ -1684,7 +1684,7 @@ static void fr_isr (sdla_t* card) /*============================================================================ * Receive interrupt handler. * When a receive interrupt occurs do the following: - * 1- Find the structure for the dlci that the interrupt occured on + * 1- Find the structure for the dlci that the interrupt occurred on * 2- If it doesn't exist then print appropriate msg and goto step 8. * 3- If it exist then copy data to a skb. * 4- If skb contains Sangoma UDP data then process them diff --git a/drivers/net/sk98lin/h/lm80.h b/drivers/net/sk98lin/h/lm80.h index 0e165bb0bd00..8ac65aba36ed 100644 --- a/drivers/net/sk98lin/h/lm80.h +++ b/drivers/net/sk98lin/h/lm80.h @@ -126,7 +126,7 @@ extern "C" { #define LM80_IS_BTI (1<<1) /* state of BTI# pin */ #define LM80_IS_FAN1 (1<<2) /* count limit exceeded for Fan 1 */ #define LM80_IS_FAN2 (1<<3) /* count limit exceeded for Fan 2 */ -#define LM80_IS_CI (1<<4) /* Chassis Intrusion occured */ +#define LM80_IS_CI (1<<4) /* Chassis Intrusion occurred */ #define LM80_IS_OS (1<<5) /* OS temperature limit exceeded */ /* bit 6 and 7 are reserved in LM80_ISRC_2 */ #define LM80_IS_HT_IRQ_MD (1<<6) /* Hot temperature interrupt mode */ diff --git a/drivers/net/sk98lin/h/skgehw.h b/drivers/net/sk98lin/h/skgehw.h index fc97a511da89..ee33fbda3a58 100644 --- a/drivers/net/sk98lin/h/skgehw.h +++ b/drivers/net/sk98lin/h/skgehw.h @@ -986,7 +986,7 @@ extern "C" { /* B3_RI_TEST 8 bit RAM Iface Test Register */ /* Bit 15..4: reserved */ -#define RI_T_EV (1<<3) /* Bit 3: Timeout Event occured */ +#define RI_T_EV (1<<3) /* Bit 3: Timeout Event occurred */ #define RI_T_ON (1<<2) /* Bit 2: Timeout Timer Test On */ #define RI_T_OFF (1<<1) /* Bit 1: Timeout Timer Test Off */ #define RI_T_STEP (1<<0) /* Bit 0: Timeout Timer Step */ @@ -1036,19 +1036,19 @@ extern "C" { /* B3_MA_RC_TEST 16 bit MAC Arbiter Recovery Test Reg */ /* B3_PA_TEST 16 bit Packet Arbiter Test Register */ /* Bit 15, 11, 7, and 3 are reserved in B3_PA_TEST */ -#define TX2_T_EV (1<<15) /* Bit 15: TX2 Timeout/Recv Event occured*/ +#define TX2_T_EV (1<<15) /* Bit 15: TX2 Timeout/Recv Event occurred*/ #define TX2_T_ON (1<<14) /* Bit 14: TX2 Timeout/Recv Timer Test On*/ #define TX2_T_OFF (1<<13) /* Bit 13: TX2 Timeout/Recv Timer Tst Off*/ #define TX2_T_STEP (1<<12) /* Bit 12: TX2 Timeout/Recv Timer Step */ -#define TX1_T_EV (1<<11) /* Bit 11: TX1 Timeout/Recv Event occured*/ +#define TX1_T_EV (1<<11) /* Bit 11: TX1 Timeout/Recv Event occurred*/ #define TX1_T_ON (1<<10) /* Bit 10: TX1 Timeout/Recv Timer Test On*/ #define TX1_T_OFF (1<<9) /* Bit 9: TX1 Timeout/Recv Timer Tst Off*/ #define TX1_T_STEP (1<<8) /* Bit 8: TX1 Timeout/Recv Timer Step */ -#define RX2_T_EV (1<<7) /* Bit 7: RX2 Timeout/Recv Event occured*/ +#define RX2_T_EV (1<<7) /* Bit 7: RX2 Timeout/Recv Event occurred*/ #define RX2_T_ON (1<<6) /* Bit 6: RX2 Timeout/Recv Timer Test On*/ #define RX2_T_OFF (1<<5) /* Bit 5: RX2 Timeout/Recv Timer Tst Off*/ #define RX2_T_STEP (1<<4) /* Bit 4: RX2 Timeout/Recv Timer Step */ -#define RX1_T_EV (1<<3) /* Bit 3: RX1 Timeout/Recv Event occured*/ +#define RX1_T_EV (1<<3) /* Bit 3: RX1 Timeout/Recv Event occurred*/ #define RX1_T_ON (1<<2) /* Bit 2: RX1 Timeout/Recv Timer Test On*/ #define RX1_T_OFF (1<<1) /* Bit 1: RX1 Timeout/Recv Timer Tst Off*/ #define RX1_T_STEP (1<<0) /* Bit 0: RX1 Timeout/Recv Timer Step */ diff --git a/drivers/net/sk98lin/h/skgehwt.h b/drivers/net/sk98lin/h/skgehwt.h index 0ec53d572e92..bc20ac4892f4 100644 --- a/drivers/net/sk98lin/h/skgehwt.h +++ b/drivers/net/sk98lin/h/skgehwt.h @@ -1,32 +1,23 @@ /****************************************************************************** * * Name: skhwt.h - * Project: Genesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.4 $ - * Date: $Date: 1998/08/19 09:50:58 $ + * Project: GEnesis, PCI Gigabit Ethernet Adapter + * Version: $Revision: 1.5 $ + * Date: $Date: 1999/11/22 13:54:24 $ * Purpose: Defines for the hardware timer functions * ******************************************************************************/ /****************************************************************************** * - * (C)Copyright 1989-1998 SysKonnect, + * (C)Copyright 1998,1999 SysKonnect, * a business unit of Schneider & Koch & Co. Datensysteme GmbH. - * All Rights Reserved * - * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SYSKONNECT - * The copyright notice above does not evidence any - * actual or intended publication of such source code. + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * This Module contains Proprietary Information of SysKonnect - * and should be treated as Confidential. - * - * The information in this file is provided for the exclusive use of - * the licensees of SysKonnect. - * Such users have the right to use, modify, and incorporate this code - * into products for purposes authorized by the license agreement - * provided they include this notice and the associated copyright notice - * with any such product. * The information in this file is provided "AS IS" without warranty. * ******************************************************************************/ @@ -36,6 +27,9 @@ * History: * * $Log: skgehwt.h,v $ + * Revision 1.5 1999/11/22 13:54:24 cgoos + * Changed license header to GPL. + * * Revision 1.4 1998/08/19 09:50:58 gklug * fix: remove struct keyword from c-code (see CCC) add typedefs * diff --git a/drivers/net/sk98lin/h/ski2c.h b/drivers/net/sk98lin/h/ski2c.h index a711fb98edb3..0039730f009e 100644 --- a/drivers/net/sk98lin/h/ski2c.h +++ b/drivers/net/sk98lin/h/ski2c.h @@ -2,8 +2,8 @@ * * Name: ski2c.h * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.29 $ - * Date: $Date: 2000/08/03 14:28:17 $ + * Version: $Revision: 1.30 $ + * Date: $Date: 2001/04/05 11:38:09 $ * Purpose: Defines to access Voltage and Temperature Sensor * (taken from Monalisa (taken from Concentrator)) * @@ -28,6 +28,10 @@ * History: * * $Log: ski2c.h,v $ + * Revision 1.30 2001/04/05 11:38:09 rassmann + * Set SenState to idle in SkI2cWaitIrq(). + * Changed error message in SkI2cWaitIrq(). + * * Revision 1.29 2000/08/03 14:28:17 rassmann * - Added function to wait for I2C being ready before resetting the board. * - Replaced one duplicate "out of range" message with correct one. @@ -182,24 +186,26 @@ typedef struct s_Sensor SK_SENSOR; #define SKERR_I2C_E014MSG "WARNING: fan sensor out of range" #define SKERR_I2C_E015 (SKERR_I2C_E014+1) #define SKERR_I2C_E015MSG "ERROR: fan sensor out of range" +#define SKERR_I2C_E016 (SKERR_I2C_E015+1) +#define SKERR_I2C_E016MSG "I2C: active transfer does not complete.\n" /* * Define Timeout values */ -#define SK_I2C_TIM_LONG 2000000L /* 2 second */ -#define SK_I2C_TIM_SHORT 100000L /* 100 milli second */ +#define SK_I2C_TIM_LONG 2000000L /* 2 seconds */ +#define SK_I2C_TIM_SHORT 100000L /* 100 milliseconds */ /* * Define trap and error log hold times */ #ifndef SK_SEN_ERR_TR_HOLD -#define SK_SEN_ERR_TR_HOLD (4*SK_TICKS_PER_SEC) +#define SK_SEN_ERR_TR_HOLD (4*SK_TICKS_PER_SEC) #endif #ifndef SK_SEN_ERR_LOG_HOLD -#define SK_SEN_ERR_LOG_HOLD (60*SK_TICKS_PER_SEC) +#define SK_SEN_ERR_LOG_HOLD (60*SK_TICKS_PER_SEC) #endif #ifndef SK_SEN_WARN_TR_HOLD -#define SK_SEN_WARN_TR_HOLD (15*SK_TICKS_PER_SEC) +#define SK_SEN_WARN_TR_HOLD (15*SK_TICKS_PER_SEC) #endif #ifndef SK_SEN_WARN_LOG_HOLD #define SK_SEN_WARN_LOG_HOLD (15*60*SK_TICKS_PER_SEC) @@ -268,3 +274,4 @@ extern void SkI2cIsr(SK_AC *pAC, SK_IOC IoC); #endif #endif /* n_SKI2C_H */ + diff --git a/drivers/net/sk98lin/h/skqueue.h b/drivers/net/sk98lin/h/skqueue.h index a45dd215abbc..a6b5a0221612 100644 --- a/drivers/net/sk98lin/h/skqueue.h +++ b/drivers/net/sk98lin/h/skqueue.h @@ -1,32 +1,23 @@ /****************************************************************************** * * Name: skqueue.h - * Project: Genesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.12 $ - * Date: $Date: 1998/09/08 08:48:01 $ + * Project: GEnesis, PCI Gigabit Ethernet Adapter + * Version: $Revision: 1.13 $ + * Date: $Date: 1999/11/22 13:59:05 $ * Purpose: Defines for the Event queue * ******************************************************************************/ /****************************************************************************** * - * (C)Copyright 1989-1998 SysKonnect, + * (C)Copyright 1998,1999 SysKonnect, * a business unit of Schneider & Koch & Co. Datensysteme GmbH. - * All Rights Reserved * - * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SYSKONNECT - * The copyright notice above does not evidence any - * actual or intended publication of such source code. + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * This Module contains Proprietary Information of SysKonnect - * and should be treated as Confidential. - * - * The information in this file is provided for the exclusive use of - * the licensees of SysKonnect. - * Such users have the right to use, modify, and incorporate this code - * into products for purposes authorized by the license agreement - * provided they include this notice and the associated copyright notice - * with any such product. * The information in this file is provided "AS IS" without warranty. * ******************************************************************************/ @@ -36,6 +27,9 @@ * History: * * $Log: skqueue.h,v $ + * Revision 1.13 1999/11/22 13:59:05 cgoos + * Changed license header to GPL. + * * Revision 1.12 1998/09/08 08:48:01 gklug * add: init level handling * diff --git a/drivers/net/sk98lin/h/sktimer.h b/drivers/net/sk98lin/h/sktimer.h index d8b771cfd9d9..3f5cb1b1eaad 100644 --- a/drivers/net/sk98lin/h/sktimer.h +++ b/drivers/net/sk98lin/h/sktimer.h @@ -1,32 +1,23 @@ /****************************************************************************** * * Name: sktimer.h - * Project: Genesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.8 $ - * Date: $Date: 1998/09/08 08:48:02 $ + * Project: GEnesis, PCI Gigabit Ethernet Adapter + * Version: $Revision: 1.9 $ + * Date: $Date: 1999/11/22 14:00:29 $ * Purpose: Defines for the timer functions * ******************************************************************************/ /****************************************************************************** * - * (C)Copyright 1989-1998 SysKonnect, + * (C)Copyright 1998,1999 SysKonnect, * a business unit of Schneider & Koch & Co. Datensysteme GmbH. - * All Rights Reserved * - * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SYSKONNECT - * The copyright notice above does not evidence any - * actual or intended publication of such source code. + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * This Module contains Proprietary Information of SysKonnect - * and should be treated as Confidential. - * - * The information in this file is provided for the exclusive use of - * the licensees of SysKonnect. - * Such users have the right to use, modify, and incorporate this code - * into products for purposes authorized by the license agreement - * provided they include this notice and the associated copyright notice - * with any such product. * The information in this file is provided "AS IS" without warranty. * ******************************************************************************/ @@ -36,6 +27,9 @@ * History: * * $Log: sktimer.h,v $ + * Revision 1.9 1999/11/22 14:00:29 cgoos + * Changed license header to GPL. + * * Revision 1.8 1998/09/08 08:48:02 gklug * add: init level handling * diff --git a/drivers/net/sk98lin/h/skversion.h b/drivers/net/sk98lin/h/skversion.h index f7a973313223..83e0bb14455b 100644 --- a/drivers/net/sk98lin/h/skversion.h +++ b/drivers/net/sk98lin/h/skversion.h @@ -36,11 +36,11 @@ static const char SysKonnectFileId[] = "@(#)" __FILE__ " (C) SysKonnect GmbH."; static const char SysKonnectBuildNumber[] = - "@(#)SK-BUILD: 4.03 PL: 01"; + "@(#)SK-BUILD: 4.07 PL: 01"; -#define BOOT_STRING "sk98lin: Network Device Driver v4.03\n" \ +#define BOOT_STRING "sk98lin: Network Device Driver v4.07\n" \ "Copyright (C) 2000-2001 SysKonnect GmbH." -#define VER_STRING "4.03" +#define VER_STRING "4.07" diff --git a/drivers/net/sk98lin/h/xmac_ii.h b/drivers/net/sk98lin/h/xmac_ii.h index 0044a053a8b7..2ee3b9453cd3 100644 --- a/drivers/net/sk98lin/h/xmac_ii.h +++ b/drivers/net/sk98lin/h/xmac_ii.h @@ -413,7 +413,7 @@ extern "C" { #define XM_ST_BC (1L<<7) /* Bit 7: Broadcast packet */ #define XM_ST_MC (1L<<6) /* Bit 6: Multicast packet */ #define XM_ST_UC (1L<<5) /* Bit 5: Unicast packet */ -#define XM_ST_TX_UR (1L<<4) /* Bit 4: FIFO Underrun occured */ +#define XM_ST_TX_UR (1L<<4) /* Bit 4: FIFO Underrun occurred */ #define XM_ST_CS_ERR (1L<<3) /* Bit 3: Carrier Sense Error */ #define XM_ST_LAT_COL (1L<<2) /* Bit 2: Late Collision Error */ #define XM_ST_MUL_COL (1L<<1) /* Bit 1: Multiple Collisions */ diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c index 9d9d17f882d4..bf617d006bf9 100644 --- a/drivers/net/sk98lin/skge.c +++ b/drivers/net/sk98lin/skge.c @@ -2,8 +2,8 @@ * * Name: skge.c * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.33 $ - * Date: $Date: 2001/03/20 12:26:08 $ + * Version: $Revision: 1.37 $ + * Date: $Date: 2001/05/08 11:25:40 $ * Purpose: The main driver source module * ******************************************************************************/ @@ -50,6 +50,18 @@ * History: * * $Log: skge.c,v $ + * Revision 1.37 2001/05/08 11:25:40 mlindner + * fix: removed VLAN error message + * + * Revision 1.36 2001/05/04 12:02:25 gklug + * fix: compilation bug + * + * Revision 1.35 2001/05/04 11:42:12 gklug + * fix: receive IRQ can now handle invalid frames correctly + * + * Revision 1.34 2001/05/04 11:13:49 gklug + * fix: do not free meassage if ring is full on entry. + * * Revision 1.33 2001/03/20 12:26:08 mlindner * Fix: Memory problem * Fix: proc_unregister fixed @@ -1833,7 +1845,8 @@ int BytesSend; SK_DBGCAT_DRV_TX_PROGRESS, ("XmitFrame failed\n")); /* this message can not be sent now */ - DEV_KFREE_SKB(pMessage); + /* Because tbusy seems to be set, the message should not be freed here */ + /* It will be used by the scheduler of the ethernet handler */ return (-1); } } @@ -2100,33 +2113,71 @@ int Result; rx_start: /* do forever; exit if RX_CTRL_OWN_BMU found */ - while (pRxPort->RxdRingFree < pAC->RxDescrPerRing) { - pRxd = pRxPort->pRxdRingHead; - - Control = pRxd->RBControl; + for ( pRxd = pRxPort->pRxdRingHead ; + pRxPort->RxdRingFree < pAC->RxDescrPerRing ; + pRxd = pRxd->pNextRxd, + pRxPort->pRxdRingHead = pRxd, + pRxPort->RxdRingFree ++) { + /* + * For a better understanding of this loop + * Go through every descriptor beginning at the head + * Please note: the ring might be completely received so the OWN bit + * set is not a good crirteria to leave that loop. + * Therefore the RingFree counter is used. + * On entry of this loop pRxd is a pointer to the Rxd that needs + * to be checked next. + */ + Control = pRxd->RBControl; /* check if this descriptor is ready */ if ((Control & RX_CTRL_OWN_BMU) != 0) { /* this descriptor is not yet ready */ + /* This is the usual end of the loop */ + /* We don't need to start the ring again */ FillRxRing(pAC, pRxPort); return; } /* get length of frame and check it */ FrameLength = Control & RX_CTRL_LEN_MASK; - if (FrameLength > pAC->RxBufSize) + if (FrameLength > pAC->RxBufSize) { goto rx_failed; + } /* check for STF and EOF */ if ((Control & (RX_CTRL_STF | RX_CTRL_EOF)) != - (RX_CTRL_STF | RX_CTRL_EOF)) + (RX_CTRL_STF | RX_CTRL_EOF)) { goto rx_failed; + } /* here we have a complete frame in the ring */ pMsg = pRxd->pMBuf; + + FrameStat = pRxd->FrameStat; + SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 0, + ("Received frame of length %d on port %d\n", + FrameLength, PortIndex)); + SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 0, + ("Number of free rx descriptors: %d\n", + pRxPort->RxdRingFree)); +/*DumpMsg(pMsg, "Rx"); */ + if ((Control & RX_CTRL_STAT_VALID) != RX_CTRL_STAT_VALID || + (FrameStat & (XMR_FS_ANY_ERR | XMR_FS_2L_VLAN)) != 0) { + /* there is a receive error in this frame */ + SK_DBG_MSG(NULL, SK_DBGMOD_DRV, + SK_DBGCAT_DRV_RX_PROGRESS, + ("skge: Error in received frame, dropped!\n" + "Control: %x\nRxStat: %x\n", + Control, FrameStat)); + ReQueueRxBuffer(pAC, pRxPort, pMsg, + pRxd->VDataHigh, pRxd->VDataLow); + + continue; + } + /* * if short frame then copy data to reduce memory waste */ @@ -2177,114 +2228,85 @@ rx_start: } /* IP frame */ } /* frame > SK_COPY_TRESHOLD */ - FrameStat = pRxd->FrameStat; - pRxd = pRxd->pNextRxd; - pRxPort->pRxdRingHead = pRxd; - pRxPort->RxdRingFree ++; - SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 0, - ("Received frame of length %d on port %d\n", - FrameLength, PortIndex)); - SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 0, - ("Number of free rx descriptors: %d\n", - pRxPort->RxdRingFree)); -/*DumpMsg(pMsg, "Rx"); */ - if ((Control & RX_CTRL_STAT_VALID) == RX_CTRL_STAT_VALID && - (FrameStat & - (XMR_FS_ANY_ERR | XMR_FS_2L_VLAN)) - == 0) { - SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 1,("V")); - ForRlmt = SK_RLMT_RX_PROTOCOL; - IsBc = (FrameStat & XMR_FS_BC)==XMR_FS_BC; - SK_RLMT_PRE_LOOKAHEAD(pAC, PortIndex, FrameLength, - IsBc, &Offset, &NumBytes); - if (NumBytes != 0) { - IsMc = (FrameStat & XMR_FS_MC)==XMR_FS_MC; - SK_RLMT_LOOKAHEAD(pAC, PortIndex, - &pMsg->data[Offset], - IsBc, IsMc, &ForRlmt); - } - if (ForRlmt == SK_RLMT_RX_PROTOCOL) { - SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 1,("W")); - /* send up only frames from active port */ - if ((PortIndex == pAC->ActivePort) || - (pAC->RlmtNets == 2)) { - /* frame for upper layer */ - SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 1,("U")); + SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 1,("V")); + ForRlmt = SK_RLMT_RX_PROTOCOL; + IsBc = (FrameStat & XMR_FS_BC)==XMR_FS_BC; + SK_RLMT_PRE_LOOKAHEAD(pAC, PortIndex, FrameLength, + IsBc, &Offset, &NumBytes); + if (NumBytes != 0) { + IsMc = (FrameStat & XMR_FS_MC)==XMR_FS_MC; + SK_RLMT_LOOKAHEAD(pAC, PortIndex, + &pMsg->data[Offset], + IsBc, IsMc, &ForRlmt); + } + if (ForRlmt == SK_RLMT_RX_PROTOCOL) { + SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 1,("W")); +/* send up only frames from active port */ + if ((PortIndex == pAC->ActivePort) || + (pAC->RlmtNets == 2)) { + /* frame for upper layer */ + SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 1,("U")); #ifdef xDEBUG - DumpMsg(pMsg, "Rx"); + DumpMsg(pMsg, "Rx"); #endif - SK_PNMI_CNT_RX_OCTETS_DELIVERED(pAC, - FrameLength, pRxPort->PortIndex); - - pMsg->dev = pAC->dev[pRxPort->PortIndex]; - pMsg->protocol = eth_type_trans(pMsg, - pAC->dev[pRxPort->PortIndex]); - netif_rx(pMsg); - pAC->dev[pRxPort->PortIndex]->last_rx = jiffies; - } - else { - /* drop frame */ - SK_DBG_MSG(NULL, SK_DBGMOD_DRV, - SK_DBGCAT_DRV_RX_PROGRESS, - ("D")); - DEV_KFREE_SKB(pMsg); - } - - } /* if not for rlmt */ + SK_PNMI_CNT_RX_OCTETS_DELIVERED(pAC, + FrameLength, pRxPort->PortIndex); + + pMsg->dev = pAC->dev[pRxPort->PortIndex]; + pMsg->protocol = eth_type_trans(pMsg, + pAC->dev[pRxPort->PortIndex]); + netif_rx(pMsg); + pAC->dev[pRxPort->PortIndex]->last_rx = jiffies; + } else { - /* packet for rlmt */ + /* drop frame */ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, - SK_DBGCAT_DRV_RX_PROGRESS, ("R")); - pRlmtMbuf = SkDrvAllocRlmtMbuf(pAC, - pAC->IoBase, FrameLength); - if (pRlmtMbuf != NULL) { - pRlmtMbuf->pNext = NULL; - pRlmtMbuf->Length = FrameLength; - pRlmtMbuf->PortIdx = PortIndex; - EvPara.pParaPtr = pRlmtMbuf; - memcpy((char*)(pRlmtMbuf->pData), - (char*)(pMsg->data), - FrameLength); - SkEventQueue(pAC, SKGE_RLMT, - SK_RLMT_PACKET_RECEIVED, - EvPara); - pAC->CheckQueue = SK_TRUE; - SK_DBG_MSG(NULL, SK_DBGMOD_DRV, - SK_DBGCAT_DRV_RX_PROGRESS, - ("Q")); - } - if ((pAC->dev[pRxPort->PortIndex]->flags & - (IFF_PROMISC | IFF_ALLMULTI)) != 0 || - (ForRlmt & SK_RLMT_RX_PROTOCOL) == - SK_RLMT_RX_PROTOCOL) { - pMsg->dev = pAC->dev[pRxPort->PortIndex]; - pMsg->protocol = eth_type_trans(pMsg, - pAC->dev[pRxPort->PortIndex]); - netif_rx(pMsg); - pAC->dev[pRxPort->PortIndex]->last_rx = jiffies; - } - else { - DEV_KFREE_SKB(pMsg); - } - - } /* if packet for rlmt */ - } /* if valid frame */ + SK_DBGCAT_DRV_RX_PROGRESS, + ("D")); + DEV_KFREE_SKB(pMsg); + } + + } /* if not for rlmt */ else { - /* there is a receive error in this frame */ - if ((FrameStat & XMR_FS_2L_VLAN) != 0) { - printk("%s: Received frame" - " with VLAN Level 2 header, check" - " switch configuration\n", - pAC->dev[pRxPort->PortIndex]->name); + /* packet for rlmt */ + SK_DBG_MSG(NULL, SK_DBGMOD_DRV, + SK_DBGCAT_DRV_RX_PROGRESS, ("R")); + pRlmtMbuf = SkDrvAllocRlmtMbuf(pAC, + pAC->IoBase, FrameLength); + if (pRlmtMbuf != NULL) { + pRlmtMbuf->pNext = NULL; + pRlmtMbuf->Length = FrameLength; + pRlmtMbuf->PortIdx = PortIndex; + EvPara.pParaPtr = pRlmtMbuf; + memcpy((char*)(pRlmtMbuf->pData), + (char*)(pMsg->data), + FrameLength); + SkEventQueue(pAC, SKGE_RLMT, + SK_RLMT_PACKET_RECEIVED, + EvPara); + pAC->CheckQueue = SK_TRUE; + SK_DBG_MSG(NULL, SK_DBGMOD_DRV, + SK_DBGCAT_DRV_RX_PROGRESS, + ("Q")); } - SK_DBG_MSG(NULL, SK_DBGMOD_DRV, - SK_DBGCAT_DRV_RX_PROGRESS, - ("skge: Error in received frame, dropped!\n" - "Control: %x\nRxStat: %x\n", - Control, FrameStat)); - DEV_KFREE_SKB(pMsg); - } - } /* while */ + if ((pAC->dev[pRxPort->PortIndex]->flags & + (IFF_PROMISC | IFF_ALLMULTI)) != 0 || + (ForRlmt & SK_RLMT_RX_PROTOCOL) == + SK_RLMT_RX_PROTOCOL) { + pMsg->dev = pAC->dev[pRxPort->PortIndex]; + pMsg->protocol = eth_type_trans(pMsg, + pAC->dev[pRxPort->PortIndex]); + netif_rx(pMsg); + pAC->dev[pRxPort->PortIndex]->last_rx = jiffies; + } + else { + DEV_KFREE_SKB(pMsg); + } + + } /* if packet for rlmt */ + } /* for ... scanning the RXD ring */ + + /* RXD ring is empty -> fill and restart */ FillRxRing(pAC, pRxPort); /* do not start if called from Close */ if (pAC->BoardLevel > 0) { diff --git a/drivers/net/sk98lin/skgehwt.c b/drivers/net/sk98lin/skgehwt.c index 26a5dea873c6..8996b7fae7a8 100644 --- a/drivers/net/sk98lin/skgehwt.c +++ b/drivers/net/sk98lin/skgehwt.c @@ -1,32 +1,23 @@ /****************************************************************************** * * Name: skgehwt.c - * Project: PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.12 $ - * Date: $Date: 1998/10/15 15:11:34 $ + * Project: GEnesis, PCI Gigabit Ethernet Adapter + * Version: $Revision: 1.13 $ + * Date: $Date: 1999/11/22 13:31:12 $ * Purpose: Hardware Timer. * ******************************************************************************/ /****************************************************************************** * - * (C)Copyright 1989-1998 SysKonnect, + * (C)Copyright 1998,1999 SysKonnect, * a business unit of Schneider & Koch & Co. Datensysteme GmbH. - * All Rights Reserved * - * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SYSKONNECT - * The copyright notice above does not evidence any - * actual or intended publication of such source code. + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * This Module contains Proprietary Information of SysKonnect - * and should be treated as Confidential. - * - * The information in this file is provided for the exclusive use of - * the licensees of SysKonnect. - * Such users have the right to use, modify, and incorporate this code - * into products for purposes authorized by the license agreement - * provided they include this notice and the associated copyright notice - * with any such product. * The information in this file is provided "AS IS" without warranty. * ******************************************************************************/ @@ -36,6 +27,9 @@ * History: * * $Log: skgehwt.c,v $ + * Revision 1.13 1999/11/22 13:31:12 cgoos + * Changed license header to GPL. + * * Revision 1.12 1998/10/15 15:11:34 gklug * fix: ID_sccs to SysKonnectFileId * @@ -83,7 +77,7 @@ Event queue and dispatcher */ static const char SysKonnectFileId[] = - "$Header: /usr56/projects/ge/schedule/skgehwt.c,v 1.12 1998/10/15 15:11:34 gklug Exp $" ; + "$Header: /usr56/projects/ge/schedule/skgehwt.c,v 1.13 1999/11/22 13:31:12 cgoos Exp $" ; #include "h/skdrv1st.h" /* Driver Specific Definitions */ #include "h/skdrv2nd.h" /* Adapter Control- and Driver specific Def. */ diff --git a/drivers/net/sk98lin/skgeinit.c b/drivers/net/sk98lin/skgeinit.c index 24d5faf6e509..fcb2b3960ed8 100644 --- a/drivers/net/sk98lin/skgeinit.c +++ b/drivers/net/sk98lin/skgeinit.c @@ -2,8 +2,8 @@ * * Name: skgeinit.c * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.62 $ - * Date: $Date: 2001/02/07 07:54:21 $ + * Version: $Revision: 1.63 $ + * Date: $Date: 2001/04/05 11:02:09 $ * Purpose: Contains functions to initialize the GE HW * ******************************************************************************/ @@ -26,6 +26,9 @@ * History: * * $Log: skgeinit.c,v $ + * Revision 1.63 2001/04/05 11:02:09 rassmann + * Stop Port check of the STOP bit did not take 2/18 sec as wanted. + * * Revision 1.62 2001/02/07 07:54:21 rassmann * Corrected copyright. * @@ -297,7 +300,7 @@ /* local variables ************************************************************/ static const char SysKonnectFileId[] = - "@(#)$Id: skgeinit.c,v 1.62 2001/02/07 07:54:21 rassmann Exp $ (C) SK "; + "@(#)$Id: skgeinit.c,v 1.63 2001/04/05 11:02:09 rassmann Exp $ (C) SK "; struct s_QOffTab { int RxQOff; /* Receive Queue Address Offset */ @@ -1216,10 +1219,10 @@ int RstMode)/* Reset Mode (SK_SOFT_RST, SK_HARD_RST) */ SK_U16 Word; SK_U32 XsCsr; SK_U32 XaCsr; - int i; + int i; SK_BOOL AllPortsDis; SK_U64 ToutStart; - int ToutCnt; + int ToutCnt; pPrt = &pAC->GIni.GP[Port]; @@ -1244,7 +1247,7 @@ int RstMode)/* Reset Mode (SK_SOFT_RST, SK_HARD_RST) */ do { /* * Clear packet arbiter timeout to make sure - * this loop will terminate + * this loop will terminate. */ if (Port == MAC_1) { Word = PA_CLR_TO_TX1; @@ -1255,9 +1258,8 @@ int RstMode)/* Reset Mode (SK_SOFT_RST, SK_HARD_RST) */ SK_OUT16(IoC, B3_PA_CTRL, Word); /* - * If the transfer stucks at the XMAC the STOP command - * will not terminate if we don't flush the XMACs - * transmit FIFO ! + * If the transfer stucks at the XMAC the STOP command will not + * terminate if we don't flush the XMAC's transmit FIFO! */ XM_IN32(IoC, Port, XM_MODE, &DWord); DWord |= XM_MD_FTF; @@ -1266,7 +1268,7 @@ int RstMode)/* Reset Mode (SK_SOFT_RST, SK_HARD_RST) */ XsCsr = TestStopBit(pAC, IoC, pPrt->PXsQOff); XaCsr = TestStopBit(pAC, IoC, pPrt->PXaQOff); - if (ToutStart + (SK_TICKS_PER_SEC / 18) >= SkOsGetTime(pAC)) { + if (SkOsGetTime(pAC) - ToutStart > (SK_TICKS_PER_SEC / 18)) { /* * Timeout of 1/18 second reached. * This needs to be checked at 1/18 sec only. @@ -1275,9 +1277,8 @@ int RstMode)/* Reset Mode (SK_SOFT_RST, SK_HARD_RST) */ switch (ToutCnt) { case 1: /* - * Cache Incoherency workaround: - * Assume a start command has been - * lost while sending the frame. + * Cache Incoherency workaround: Assume a start command + * has been lost while sending the frame. */ ToutStart = SkOsGetTime(pAC); if (XsCsr & CSR_STOP) { @@ -1293,6 +1294,7 @@ int RstMode)/* Reset Mode (SK_SOFT_RST, SK_HARD_RST) */ * calls StopPort again. * XXX. */ + /* Fatal Error, Loop aborted */ /* Create an Error Log Entry */ SK_ERR_LOG( @@ -1308,12 +1310,12 @@ int RstMode)/* Reset Mode (SK_SOFT_RST, SK_HARD_RST) */ } } - /* - * Because of the ASIC problem report entry from 21.08.1998 it is - * required to wait until CSR_STOP is reset and CSR_SV_IDLE is set. - */ - } while ((XsCsr & (CSR_STOP|CSR_SV_IDLE)) != CSR_SV_IDLE || - (XaCsr & (CSR_STOP|CSR_SV_IDLE)) != CSR_SV_IDLE); + /* + * Because of the ASIC problem report entry from 21.08.1998 it is + * required to wait until CSR_STOP is reset and CSR_SV_IDLE is set. + */ + } while ((XsCsr & (CSR_STOP | CSR_SV_IDLE)) != CSR_SV_IDLE || + (XaCsr & (CSR_STOP | CSR_SV_IDLE)) != CSR_SV_IDLE); /* reset the XMAC depending on the RstMode */ if (RstMode == SK_SOFT_RST) { @@ -1380,13 +1382,13 @@ int RstMode)/* Reset Mode (SK_SOFT_RST, SK_HARD_RST) */ i--; } - /* finish if CSR_STOP is done or CSR_SV_IDLE is true and i==0 */ - /* - * because of the ASIC problem report entry from 21.08.98 - * it is required to wait until CSR_STOP is reset and - * CSR_SV_IDLE is set. - */ - } while ((DWord & (CSR_STOP|CSR_SV_IDLE)) != CSR_SV_IDLE && + /* finish if CSR_STOP is done or CSR_SV_IDLE is true and i==0 */ + /* + * because of the ASIC problem report entry from 21.08.98 + * it is required to wait until CSR_STOP is reset and + * CSR_SV_IDLE is set. + */ + } while ((DWord & (CSR_STOP | CSR_SV_IDLE)) != CSR_SV_IDLE && ((DWord & CSR_SV_IDLE) == 0 || i != 0)); /* The path data transfer activity is fully stopped now. */ diff --git a/drivers/net/sk98lin/skgepnmi.c b/drivers/net/sk98lin/skgepnmi.c index b4feb257ccfa..a64f88a04560 100644 --- a/drivers/net/sk98lin/skgepnmi.c +++ b/drivers/net/sk98lin/skgepnmi.c @@ -2,8 +2,8 @@ * * Name: skgepnmi.c * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.86 $ - * Date: $Date: 2001/03/09 09:18:03 $ + * Version: $Revision: 1.87 $ + * Date: $Date: 2001/04/06 13:35:09 $ * Purpose: Private Network Management Interface * ****************************************************************************/ @@ -26,6 +26,9 @@ * History: * * $Log: skgepnmi.c,v $ + * Revision 1.87 2001/04/06 13:35:09 mkunz + * -Bugs fixed in handling of OID_SKGE_MTU and the VPD OID's + * * Revision 1.86 2001/03/09 09:18:03 mkunz * Changes in SK_DBG_MSG * @@ -359,7 +362,7 @@ static const char SysKonnectFileId[] = - "@(#) $Id: skgepnmi.c,v 1.86 2001/03/09 09:18:03 mkunz Exp $" + "@(#) $Id: skgepnmi.c,v 1.87 2001/04/06 13:35:09 mkunz Exp $" " (C) SysKonnect."; #include "h/skdrv1st.h" @@ -1636,7 +1639,7 @@ int Level) /* Initialization level */ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed - * SK_PNMI_ERR_GENERAL A general severe internal error occured + * SK_PNMI_ERR_GENERAL A general severe internal error occurred * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to take * the data. * SK_PNMI_ERR_UNKNOWN_OID The requested OID is unknown @@ -1675,7 +1678,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -1719,7 +1722,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -1763,7 +1766,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed - * SK_PNMI_ERR_GENERAL A general severe internal error occured + * SK_PNMI_ERR_GENERAL A general severe internal error occurred * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to take * the data. * SK_PNMI_ERR_UNKNOWN_NET The requested NetIndex doesn't exist @@ -1862,7 +1865,6 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ TableIndex ++) { InstanceNo = IdTable[TableIndex].InstanceNo; - for (InstanceCnt = 1; InstanceCnt <= InstanceNo; InstanceCnt ++) { @@ -1880,8 +1882,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ IdTable[TableIndex].Id == OID_SKGE_VPD_ACCESS || IdTable[TableIndex].Id == OID_SKGE_VPD_ACTION) { - SK_PNMI_READ_U32(KeyArr[InstanceCnt - 1], - Instance); + SK_STRNCPY((char *)&Instance, KeyArr[InstanceCnt - 1], 4); } else { Instance = (SK_U32)InstanceCnt; @@ -1900,7 +1901,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ */ if (Ret == SK_PNMI_ERR_UNKNOWN_INST) { - break; + break; } if (Ret != SK_PNMI_ERR_OK) { @@ -1943,7 +1944,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -1982,7 +1983,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -2933,7 +2934,7 @@ SK_U32 Id) /* Object identifier to be searched */ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -3001,7 +3002,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -3136,7 +3137,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -3279,7 +3280,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -3315,32 +3316,26 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ PhysPortMax = pAC->GIni.GIMacsFound; LogPortMax = SK_PNMI_PORT_PHYS2LOG(PhysPortMax); + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ /* Dual net mode */ + LogPortMax--; + } + if ((Instance != (SK_U32)(-1))) { /* Only one specific instance is queried */ /* Check instance range */ - if ((Instance < 1) || (Instance > LogPortMax)) { + if ((Instance < 1) || (Instance > LogPortMax)) { *pLen = 0; return (SK_PNMI_ERR_UNKNOWN_INST); } LogPortIndex = SK_PNMI_PORT_INST2LOG(Instance); - - if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ /* Dual net mode */ - LogPortMax--; - if(LogPortIndex >= LogPortMax) { - *pLen = 0; - return (SK_PNMI_ERR_UNKNOWN_INST); - } - } + Limit = LogPortIndex + 1; } else { /* Instance == (SK_U32)(-1), get all Instances of that OID */ LogPortIndex = 0; - if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ /* Dual net mode */ - LogPortMax--; - } + Limit = LogPortMax; } - Limit = LogPortMax; /* @@ -3432,7 +3427,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -3472,6 +3467,10 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ PhysPortMax = pAC->GIni.GIMacsFound; LogPortMax = SK_PNMI_PORT_PHYS2LOG(PhysPortMax); + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ /* Dual net mode */ + LogPortMax--; + } + if ((Instance != (SK_U32)(-1))) { /* Only one specific instance is queried */ /* Check instance range */ if ((Instance < 1) || (Instance > LogPortMax)) { @@ -3480,25 +3479,14 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ return (SK_PNMI_ERR_UNKNOWN_INST); } LogPortIndex = SK_PNMI_PORT_INST2LOG(Instance); - - if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ /* Dual net mode */ - LogPortMax--; - if(LogPortIndex >= LogPortMax) { - *pLen = 0; - return (SK_PNMI_ERR_UNKNOWN_INST); - } - } + Limit = LogPortIndex + 1; } else { /* Instance == (SK_U32)(-1), get all Instances of that OID */ LogPortIndex = 0; - if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ /* Dual net mode */ - LogPortMax--; - } + Limit = LogPortMax; } - Limit = LogPortMax; - /* * Perform Action @@ -3651,7 +3639,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -3770,7 +3758,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -4015,7 +4003,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -4058,7 +4046,6 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ Ret = GetVpdKeyArr(pAC, IoC, &KeyArr[0][0], sizeof(KeyArr), &KeyNo); if (Ret != SK_PNMI_ERR_OK) { - *pLen = 0; return (Ret); } @@ -4083,7 +4070,6 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ for (Index = 0; Index < KeyNo; Index ++) { if (SK_STRCMP(KeyStr, KeyArr[Index]) == 0) { - FirstIndex = Index; LastIndex = Index+1; break; @@ -4496,7 +4482,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -5203,7 +5189,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -5512,7 +5498,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -5712,7 +5698,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -5754,6 +5740,10 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ PhysPortMax = pAC->GIni.GIMacsFound; LogPortMax = SK_PNMI_PORT_PHYS2LOG(PhysPortMax); + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ /* Dual net mode */ + LogPortMax--; + } + if ((Instance != (SK_U32)(-1))) { /* Only one specific instance is queried */ /* Check instance range */ if ((Instance < 1) || (Instance > LogPortMax)) { @@ -5762,25 +5752,14 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ return (SK_PNMI_ERR_UNKNOWN_INST); } LogPortIndex = SK_PNMI_PORT_INST2LOG(Instance); - - if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ /* Dual net mode */ - LogPortMax--; - if(LogPortIndex >= LogPortMax) { - *pLen = 0; - return (SK_PNMI_ERR_UNKNOWN_INST); - } - } + Limit = LogPortIndex + 1; } else { /* Instance == (SK_U32)(-1), get all Instances of that OID */ LogPortIndex = 0; - if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ /* Dual net mode */ - LogPortMax--; - } + Limit = LogPortMax; } - Limit = LogPortMax; - /* * Perform action @@ -6383,7 +6362,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -7385,7 +7364,7 @@ SK_U32 NetIndex) * * Description: * The trap buffer stores various events. A user application somehow - * gets notified that an event occured and retrieves the trap buffer + * gets notified that an event occurred and retrieves the trap buffer * contens (or simply polls the buffer). The buffer is organized as * a ring which stores the newest traps at the beginning. The oldest * traps are overwritten by the newest ones. Each trap entry has a diff --git a/drivers/net/sk98lin/skgesirq.c b/drivers/net/sk98lin/skgesirq.c index ae54fa21d2b8..b8306c6b3414 100644 --- a/drivers/net/sk98lin/skgesirq.c +++ b/drivers/net/sk98lin/skgesirq.c @@ -736,14 +736,14 @@ SK_U32 Istatus) /* Interrupt status word */ /* Check whether XMACs are correctly initialized */ if ((Istatus & (IS_PA_TO_RX1 | IS_PA_TO_TX1)) && !pAC->GIni.GP[MAC_1].PState) { - /* XMAC was not initialized but Packet timeout occured */ + /* XMAC was not initialized but Packet timeout occurred */ SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E004, SKERR_SIRQ_E004MSG); } if ((Istatus & (IS_PA_TO_RX2 | IS_PA_TO_TX2)) && !pAC->GIni.GP[MAC_2].PState) { - /* XMAC was not initialized but Packet timeout occured */ + /* XMAC was not initialized but Packet timeout occurred */ SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E005, SKERR_SIRQ_E005MSG); } @@ -1111,7 +1111,7 @@ int Port) /* Which port should be checked */ * otherwise the Linux driver will have a problem. */ /* - * We received a bunch of frames or no CRC error occured on the + * We received a bunch of frames or no CRC error occurred on the * network -> ok. */ pPrt->PPrevRx = RxCts; @@ -1379,7 +1379,7 @@ int Port) /* Which port should be checked */ pPrt->PAutoNegTOCt ++; /* - * Timeout occured. + * Timeout occurred. * What do we need now? */ SK_DBG_MSG(pAC,SK_DBGMOD_HWM, @@ -1389,7 +1389,7 @@ int Port) /* Which port should be checked */ if (pPrt->PLinkModeConf == SK_LMODE_AUTOSENSE && pPrt->PLipaAutoNeg != SK_LIPA_AUTO) { /* - * Timeout occured + * Timeout occurred * Set Link manually up. */ SkHWSenseSetNext(pAC, IoC, Port, SK_LMODE_FULL); @@ -1872,7 +1872,7 @@ int Port) /* Which port should be checked */ pPrt->PAutoNegTimeOut ++; if (pPrt->PAutoNegTimeOut >= SK_AND_MAX_TO) { /* - * Timeout occured. + * Timeout occurred. * What do we need now? */ SK_DBG_MSG(pAC,SK_DBGMOD_HWM, @@ -1882,7 +1882,7 @@ int Port) /* Which port should be checked */ if (pPrt->PLinkModeConf == SK_LMODE_AUTOSENSE && pPrt->PLipaAutoNeg != SK_LIPA_AUTO) { /* - * Timeout occured + * Timeout occurred * Set Link manually up. */ SkHWSenseSetNext(pAC, IoC, Port, diff --git a/drivers/net/sk98lin/ski2c.c b/drivers/net/sk98lin/ski2c.c index ce8790dddaba..f5fbd7642c58 100644 --- a/drivers/net/sk98lin/ski2c.c +++ b/drivers/net/sk98lin/ski2c.c @@ -2,8 +2,8 @@ * * Name: ski2c.c * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.45 $ - * Date: $Date: 2001/03/21 12:12:49 $ + * Version: $Revision: 1.47 $ + * Date: $Date: 2001/04/05 11:38:09 $ * Purpose: Functions to access Voltage and Temperature Sensor * (taken from Monalisa (taken from Concentrator)) * @@ -11,8 +11,7 @@ /****************************************************************************** * - * (C)Copyright 1998-2000 SysKonnect, - * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * (C)Copyright 1998-2001 SysKonnect GmbH. * * 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 @@ -28,15 +27,22 @@ * History: * * $Log: ski2c.c,v $ + * Revision 1.47 2001/04/05 11:38:09 rassmann + * Set SenState to idle in SkI2cWaitIrq(). + * Changed error message in SkI2cWaitIrq(). + * + * Revision 1.46 2001/04/02 14:03:35 rassmann + * Changed pAC to IoC in SK_IN32(). + * * Revision 1.45 2001/03/21 12:12:49 rassmann * Resetting I2C_READY interrupt in SkI2cInit1(). * * Revision 1.44 2000/08/07 15:49:03 gklug - * fix: SK_INFAST only in NetWare driver + * Fix: SK_INFAST only in NetWare driver. * * Revision 1.43 2000/08/03 14:28:17 rassmann - * - Added function to wait for I2C being ready before resetting the board. - * - Replaced one duplicate "out of range" message with correct one. + * Added function to wait for I2C being ready before resetting the board. + * Replaced one duplicate "out of range" message with correct one. * * Revision 1.42 1999/11/22 13:35:12 cgoos * Changed license header to GPL. @@ -183,10 +189,10 @@ /* - I2C Protocol -*/ + * I2C Protocol + */ static const char SysKonnectFileId[] = - "$Id: ski2c.c,v 1.45 2001/03/21 12:12:49 rassmann Exp $"; + "$Id: ski2c.c,v 1.47 2001/04/05 11:38:09 rassmann Exp $"; #include "h/skdrv1st.h" /* Driver Specific Definitions */ #include "h/lm80.h" @@ -194,7 +200,7 @@ static const char SysKonnectFileId[] = #ifdef __C2MAN__ /* - I2C protocol implemetation. + I2C protocol implementation. General Description: @@ -604,13 +610,14 @@ SK_IOC IoC) /* I/O Context */ if (SkOsGetTime(pAC) - StartTime > SK_TICKS_PER_SEC / 8) { SK_I2C_STOP(IoC); #ifndef SK_DIAG - SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_I2C_E002, SKERR_I2C_E002MSG); + SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_I2C_E016, SKERR_I2C_E016MSG); #endif /* !SK_DIAG */ return; } - SK_IN32(pAC, B0_ISRC, &IrqSrc); + SK_IN32(IoC, B0_ISRC, &IrqSrc); } while ((IrqSrc & IS_I2C_READY) == 0); + pSen->SenState = SK_SEN_IDLE; return; } /* SkI2cWaitIrq */ @@ -930,12 +937,13 @@ SK_IOC IoC) /* I/O Context */ * Level 0: * Initialize only the data structures. Do NOT access hardware. * Level 1: - * Initialize hardware through SK_IN?OUT commands. Do NOT use interrupts. + * Initialize hardware through SK_IN / SK_OUT commands. Do NOT use interrupts. * Level 2: * Everything is possible. Interrupts may be used from now on. * - * return: 0 = success - * other = error. + * return: + * 0 = success + * other = error. */ int SkI2cInit( SK_AC *pAC, /* Adapter Context */ diff --git a/drivers/net/sk98lin/skqueue.c b/drivers/net/sk98lin/skqueue.c index 13c7ab90a8a1..58832ea746dd 100644 --- a/drivers/net/sk98lin/skqueue.c +++ b/drivers/net/sk98lin/skqueue.c @@ -1,32 +1,23 @@ /****************************************************************************** * * Name: skqueue.c - * Project: PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.14 $ - * Date: $Date: 1998/10/15 15:11:35 $ + * Project: GEnesis, PCI Gigabit Ethernet Adapter + * Version: $Revision: 1.15 $ + * Date: $Date: 1999/11/22 13:36:29 $ * Purpose: Management of an event queue. * ******************************************************************************/ /****************************************************************************** * - * (C)Copyright 1989-1998 SysKonnect, + * (C)Copyright 1998,1999 SysKonnect, * a business unit of Schneider & Koch & Co. Datensysteme GmbH. - * All Rights Reserved * - * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SYSKONNECT - * The copyright notice above does not evidence any - * actual or intended publication of such source code. + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * This Module contains Proprietary Information of SysKonnect - * and should be treated as Confidential. - * - * The information in this file is provided for the exclusive use of - * the licensees of SysKonnect. - * Such users have the right to use, modify, and incorporate this code - * into products for purposes authorized by the license agreement - * provided they include this notice and the associated copyright notice - * with any such product. * The information in this file is provided "AS IS" without warranty. * ******************************************************************************/ @@ -36,6 +27,9 @@ * History: * * $Log: skqueue.c,v $ + * Revision 1.15 1999/11/22 13:36:29 cgoos + * Changed license header to GPL. + * * Revision 1.14 1998/10/15 15:11:35 gklug * fix: ID_sccs to SysKonnectFileId * @@ -88,7 +82,7 @@ Event queue and dispatcher */ static const char SysKonnectFileId[] = - "$Header: /usr56/projects/ge/schedule/skqueue.c,v 1.14 1998/10/15 15:11:35 gklug Exp $" ; + "$Header: /usr56/projects/ge/schedule/skqueue.c,v 1.15 1999/11/22 13:36:29 cgoos Exp $" ; #include "h/skdrv1st.h" /* Driver Specific Definitions */ #include "h/skqueue.h" /* Queue Definitions */ @@ -153,7 +147,7 @@ SK_EVPARA Para) /* Event parameter */ * send command to state machine * end * return error reported by individual Event function - * 0 if no error occured. + * 0 if no error occurred. */ int SkEventDispatcher( SK_AC *pAC, /* Adapters Context */ diff --git a/drivers/net/sk98lin/sktimer.c b/drivers/net/sk98lin/sktimer.c index 31738dc300ba..e8894d24e759 100644 --- a/drivers/net/sk98lin/sktimer.c +++ b/drivers/net/sk98lin/sktimer.c @@ -1,32 +1,23 @@ /****************************************************************************** * * Name: sktimer.c - * Project: PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.11 $ - * Date: $Date: 1998/12/17 13:24:13 $ + * Project: GEnesis, PCI Gigabit Ethernet Adapter + * Version: $Revision: 1.12 $ + * Date: $Date: 1999/11/22 13:38:51 $ * Purpose: High level timer functions. * ******************************************************************************/ /****************************************************************************** * - * (C)Copyright 1989-1998 SysKonnect, + * (C)Copyright 1998,1999 SysKonnect, * a business unit of Schneider & Koch & Co. Datensysteme GmbH. - * All Rights Reserved * - * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SYSKONNECT - * The copyright notice above does not evidence any - * actual or intended publication of such source code. + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * This Module contains Proprietary Information of SysKonnect - * and should be treated as Confidential. - * - * The information in this file is provided for the exclusive use of - * the licensees of SysKonnect. - * Such users have the right to use, modify, and incorporate this code - * into products for purposes authorized by the license agreement - * provided they include this notice and the associated copyright notice - * with any such product. * The information in this file is provided "AS IS" without warranty. * ******************************************************************************/ @@ -36,6 +27,9 @@ * History: * * $Log: sktimer.c,v $ + * Revision 1.12 1999/11/22 13:38:51 cgoos + * Changed license header to GPL. + * * Revision 1.11 1998/12/17 13:24:13 gklug * fix: restart problem: do NOT destroy timer queue if init 1 is done * @@ -82,7 +76,7 @@ Event queue and dispatcher */ static const char SysKonnectFileId[] = - "$Header: /usr56/projects/ge/schedule/sktimer.c,v 1.11 1998/12/17 13:24:13 gklug Exp $" ; + "$Header: /usr56/projects/ge/schedule/sktimer.c,v 1.12 1999/11/22 13:38:51 cgoos Exp $" ; #include "h/skdrv1st.h" /* Driver Specific Definitions */ #include "h/skdrv2nd.h" /* Adapter Control- and Driver specific Def. */ diff --git a/drivers/net/skfp/drvfbi.c b/drivers/net/skfp/drvfbi.c index 93533c5ef31e..0f473dd93256 100644 --- a/drivers/net/skfp/drvfbi.c +++ b/drivers/net/skfp/drvfbi.c @@ -849,7 +849,7 @@ int dma; #ifdef EISA -/*arrays with io adresses of dma controller length and adress registers*/ +/*arrays with io addresses of dma controller length and address registers*/ static const int cntr[8] = { 0x001,0x003,0x005,0x007,0,0x0c6,0x0ca,0x0ce } ; static const int base[8] = { 0x000,0x002,0x004,0x006,0,0x0c4,0x0c8,0x0cc } ; static const int page[8] = { 0x087,0x083,0x081,0x082,0,0x08b,0x089,0x08a } ; diff --git a/drivers/net/skfp/h/smc.h b/drivers/net/skfp/h/smc.h index b909586bca21..94325915e0d5 100644 --- a/drivers/net/skfp/h/smc.h +++ b/drivers/net/skfp/h/smc.h @@ -297,7 +297,7 @@ struct s_srf { #define RS_NORINGOP (1<< 5) /* no ring op */ #define RS_VERSION (1<< 4) /* SMT version mismatch */ #define RS_STUCKBYPASSS (1<< 3) /* stuck bypass */ -#define RS_EVENT (1<< 2) /* FDDI event occured */ +#define RS_EVENT (1<< 2) /* FDDI event occurred */ #define RS_RINGOPCHANGE (1<< 1) /* ring op changed */ #define RS_RES0 (1<< 0) /* reserved */ @@ -320,7 +320,7 @@ struct s_srf_evc { u_char evc_rep_required ; /* report required */ u_short evc_para ; /* SMT Para Number */ u_char *evc_cond_state ; /* condition state */ - u_char *evc_multiple ; /* multiple occurence */ + u_char *evc_multiple ; /* multiple occurrence */ } ; /* diff --git a/drivers/net/skfp/pcmplc.c b/drivers/net/skfp/pcmplc.c index 5479b27ea0fa..b19b2a81b6ac 100644 --- a/drivers/net/skfp/pcmplc.c +++ b/drivers/net/skfp/pcmplc.c @@ -1722,7 +1722,7 @@ unsigned int cmd; } if (cmd & PL_EBUF_ERR) { /* elastic buff. det. over-|underflow*/ /* - * Check whether the SRF Condition occured. + * Check whether the SRF Condition occurred. */ if (!plc->ebuf_cont && phy->mib->fddiPORTPCMState == PC8_ACTIVE){ /* diff --git a/drivers/net/skfp/srf.c b/drivers/net/skfp/srf.c index d5f091c54d08..ce757a19f361 100644 --- a/drivers/net/skfp/srf.c +++ b/drivers/net/skfp/srf.c @@ -197,7 +197,7 @@ int cond ; struct s_srf_evc *evc ; int cond_asserted = 0 ; int cond_deasserted = 0 ; - int event_occured = 0 ; + int event_occurred = 0 ; int tsr ; int T_Limit = 2*TICKS_PER_SECOND ; @@ -246,7 +246,7 @@ int cond ; *evc->evc_multiple = FALSE ; } smc->srf.any_report = TRUE ; - event_occured = TRUE ; + event_occurred = TRUE ; } #ifdef FDDI_MIB snmp_srf_event(smc,evc) ; @@ -268,7 +268,7 @@ int cond ; break ; } /* SR01c */ - if (event_occured && tsr < T_Limit) { + if (event_occurred && tsr < T_Limit) { smc->srf.sr_state = SR1_HOLDOFF ; break ; } @@ -286,7 +286,7 @@ int cond ; break ; } /* SR00d */ - if (event_occured && tsr >= T_Limit) { + if (event_occurred && tsr >= T_Limit) { smc->srf.TSR = smt_get_time() ; smt_send_srf(smc) ; break ; diff --git a/drivers/net/tulip.c b/drivers/net/tulip.c index 9e9b1a0c637e..708d8c6c382b 100644 --- a/drivers/net/tulip.c +++ b/drivers/net/tulip.c @@ -2742,7 +2742,8 @@ static void tulip_interrupt(int irq, void *dev_instance, struct pt_regs *regs) (tp->link_change)(dev, csr5); } if (csr5 & SytemError) { - printk(KERN_ERR "%s: (%lu) System Error occured\n", dev->name, tp->nir); + printk(KERN_ERR "%s: (%lu) System Error occurred\n", + dev->name, tp->nir); } /* Clear all error sources, included undocumented ones! */ outl(0x0800f7ba, ioaddr + CSR5); diff --git a/drivers/s390/block/dasd_3990_erp.c b/drivers/s390/block/dasd_3990_erp.c index 797fa20948a6..b4568f317719 100644 --- a/drivers/s390/block/dasd_3990_erp.c +++ b/drivers/s390/block/dasd_3990_erp.c @@ -986,7 +986,7 @@ dasd_3990_erp_error_match (ccw_req_t * cqr1, * * RETURN VALUES * erp erp-pointer to the already defined error recovery procedure OR - * NULL if a 'new' error occured. + * NULL if a 'new' error occurred. */ ccw_req_t * dasd_3990_erp_in_erp (ccw_req_t * cqr) @@ -1068,7 +1068,7 @@ dasd_3990_erp_further_erp (ccw_req_t * erp) * DASD_3990_ERP_HANDLE_MATCH_ERP * * DESCRIPTION - * An error occured again and an ERP has been detected which is already + * An error occurred again and an ERP has been detected which is already * used to handle this error (e.g. retries). * All prior ERP's are set to status DONE and the retry counter is * decremented. diff --git a/drivers/s390/net/ctc.c b/drivers/s390/net/ctc.c index a2472548f6f9..d9ca8eb847d4 100644 --- a/drivers/s390/net/ctc.c +++ b/drivers/s390/net/ctc.c @@ -1109,7 +1109,7 @@ static void inline ccw_check_unit_check (net_device *dev, char sense, char *call if (sense & 0x01) printk(KERN_DEBUG "%s: %s: Interface disconnect or Selective reset occurred (remote side)\n", dev->name, caller); else - printk(KERN_DEBUG "%s: %s: System reset occured (remote side)\n", dev->name, caller); + printk(KERN_DEBUG "%s: %s: System reset occurred (remote side)\n", dev->name, caller); #endif } else if (sense & 0x20) { if (sense & 0x04) diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index cb7156446e43..e44bcd082404 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c @@ -239,7 +239,7 @@ static void envctrl_i2c_test_bb(void) printk(KERN_INFO "envctrl: Busy bit will not clear.\n"); } -/* Function Description: Send the adress for a read access. +/* Function Description: Send the address for a read access. * Return : 0 if not acknowledged, otherwise acknowledged. */ static int envctrl_i2c_read_addr(unsigned char addr) @@ -265,7 +265,7 @@ static int envctrl_i2c_read_addr(unsigned char addr) } } -/* Function Description: Send the adress for write mode. +/* Function Description: Send the address for write mode. * Return : None. */ static void envctrl_i2c_write_addr(unsigned char addr) diff --git a/drivers/scsi/NCR53C9x.c b/drivers/scsi/NCR53C9x.c index 2a3497eeca63..02f5495b6f95 100644 --- a/drivers/scsi/NCR53C9x.c +++ b/drivers/scsi/NCR53C9x.c @@ -2813,7 +2813,7 @@ static inline int check_singlebyte_msg(struct NCR_ESP *esp, /* Target negotiates for synchronous transfers before we do, this * is legal although very strange. What is even funnier is that * the SCSI2 standard specifically recommends against targets doing - * this because so many initiators cannot cope with this occuring. + * this because so many initiators cannot cope with this occurring. */ static inline int target_with_ants_in_pants(struct NCR_ESP *esp, Scsi_Cmnd *SCptr, diff --git a/drivers/scsi/README.ibmmca b/drivers/scsi/README.ibmmca index 313690c26bee..6c82a40bf10e 100644 --- a/drivers/scsi/README.ibmmca +++ b/drivers/scsi/README.ibmmca @@ -797,9 +797,9 @@ commandline parameter is added, called 'activity'. 2) Added the READ_CONTROL bit for test_unit_ready SCSI-command. 3) Added some suppress_exception bits to read_device_capacity and - all device_inquiry occurences in the driver code. + all device_inquiry occurrences in the driver code. 4) Complaints about the various KERNEL_VERSION implementations are - taken into account. Every local_LinuxKernelVersion occurence is + taken into account. Every local_LinuxKernelVersion occurrence is now replaced by KERNEL_VERSION, defined in linux/version.h. Corresponding changes were applied to ibmmca.h, too. This was a contribution to all kernel-parts by Philipp Hahn. diff --git a/drivers/scsi/README.ncr53c8xx b/drivers/scsi/README.ncr53c8xx index e1d965b1a5f4..00e214af674b 100644 --- a/drivers/scsi/README.ncr53c8xx +++ b/drivers/scsi/README.ncr53c8xx @@ -1350,7 +1350,7 @@ Field C : SIST io register (SCSI Interrupt Status) Bit 0x04 : UDC Undexpected Disconnection Indicates that the device released the SCSI BUS when the chip was not expecting this to happen. A device may behave so to - indicate the SCSI initiator that an error condition not reportable using the SCSI protocol has occured. + indicate the SCSI initiator that an error condition not reportable using the SCSI protocol has occurred. Bit 0x02 : RST SCSI BUS Reset Generally SCSI targets donnot reset the SCSI BUS, although any device on the BUS can reset it at any time. diff --git a/drivers/scsi/cpqfcTScontrol.c b/drivers/scsi/cpqfcTScontrol.c index bc90b51c3802..a741e97c2303 100644 --- a/drivers/scsi/cpqfcTScontrol.c +++ b/drivers/scsi/cpqfcTScontrol.c @@ -553,7 +553,7 @@ int CpqTsInitializeFrameManager( void *pChip, int opcode) -// This "look ahead" function examines the IMQ for occurence of +// This "look ahead" function examines the IMQ for occurrence of // "type". Returns 1 if found, 0 if not. static int PeekIMQEntry( PTACHYON fcChip, ULONG type) { @@ -1204,7 +1204,7 @@ int CpqTsProcessIMQEntry(void *host) // open Login exchanges, in case the LinkDown happened in the // middle of logins. It's possible that some ports already // ACCepted login commands which we have not processed before - // another LinkDown occured. Any accepted Login exhanges are + // another LinkDown occurred. Any accepted Login exhanges are // invalidated by LinkDown, even before they are acknowledged. // It's also possible for a port to have a Queued Reply or Request // for login which was interrupted by LinkDown; it may come later, diff --git a/drivers/scsi/cpqfcTSworker.c b/drivers/scsi/cpqfcTSworker.c index 3ef41511a071..6e0b4bd618ca 100644 --- a/drivers/scsi/cpqfcTSworker.c +++ b/drivers/scsi/cpqfcTSworker.c @@ -421,7 +421,7 @@ void cpqfcTS_WorkTask( struct Scsi_Host *HostAdapter) // printk(" *ELS %Xh* ", fcLQ->Qitem[QconsumerNdx].Type); // if PortDiscDone is not set, it means the SendLogins routine - // failed to complete -- assume that LDn occured, so login frames + // failed to complete -- assume that LDn occurred, so login frames // are invalid if( !cpqfcHBAdata->PortDiscDone) // cleared by LDn { diff --git a/drivers/scsi/esp.c b/drivers/scsi/esp.c index 27eda75ed6de..e5e8c8718ca6 100644 --- a/drivers/scsi/esp.c +++ b/drivers/scsi/esp.c @@ -3465,7 +3465,7 @@ static int check_singlebyte_msg(struct Sparc_ESP *esp, /* Target negotiates for synchronous transfers before we do, this * is legal although very strange. What is even funnier is that * the SCSI2 standard specifically recommends against targets doing - * this because so many initiators cannot cope with this occuring. + * this because so many initiators cannot cope with this occurring. */ static int target_with_ants_in_pants(struct Sparc_ESP *esp, Scsi_Cmnd *SCptr, diff --git a/drivers/scsi/gdth.h b/drivers/scsi/gdth.h index b8dc32909c58..e1dbec3db51b 100644 --- a/drivers/scsi/gdth.h +++ b/drivers/scsi/gdth.h @@ -891,7 +891,7 @@ typedef struct { unchar ldr_no; /* log. drive no. */ unchar rw_attribs; /* r/w attributes */ unchar cluster_type; /* cluster properties */ - unchar media_changed; /* Flag:MOUNT/UNMOUNT occured */ + unchar media_changed; /* Flag:MOUNT/UNMOUNT occurred */ ulong32 start_sec; /* start sector */ } hdr[MAX_LDRIVES]; /* host drives */ struct { diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index 5fd6222face3..10362ab74582 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -4835,7 +4835,7 @@ ips_init_copperhead(ips_ha_t *ha) { } if (j >= 45) - /* error occured */ + /* error occurred */ return (0); PostByte[i] = inb(ha->io_addr + IPS_REG_ISPR); @@ -4859,7 +4859,7 @@ ips_init_copperhead(ips_ha_t *ha) { } if (j >= 240) - /* error occured */ + /* error occurred */ return (0); ConfigByte[i] = inb(ha->io_addr + IPS_REG_ISPR); @@ -4924,7 +4924,7 @@ ips_init_copperhead_memio(ips_ha_t *ha) { } if (j >= 45) - /* error occured */ + /* error occurred */ return (0); PostByte[i] = readb(ha->mem_ptr + IPS_REG_ISPR); @@ -4948,7 +4948,7 @@ ips_init_copperhead_memio(ips_ha_t *ha) { } if (j >= 240) - /* error occured */ + /* error occurred */ return (0); ConfigByte[i] = readb(ha->mem_ptr + IPS_REG_ISPR); @@ -4965,7 +4965,7 @@ ips_init_copperhead_memio(ips_ha_t *ha) { } if (i >= 240) - /* error occured */ + /* error occurred */ return (0); /* setup CCCR */ @@ -5015,7 +5015,7 @@ ips_init_morpheus(ips_ha_t *ha) { } if (i >= 45) { - /* error occured */ + /* error occurred */ printk(KERN_WARNING "(%s%d) timeout waiting for post.\n", ips_name, ha->host_num); @@ -5046,7 +5046,7 @@ ips_init_morpheus(ips_ha_t *ha) { } if (i >= 240) { - /* error occured */ + /* error occurred */ printk(KERN_WARNING "(%s%d) timeout waiting for config.\n", ips_name, ha->host_num); diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index a79a42351398..1a625c1098d5 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c @@ -1609,7 +1609,7 @@ static int mega_build_sglist (mega_host_config * megaCfg, mega_scb * scb, } /*-------------------------------------------------------------------- - * Initializes the adress of the controller's mailbox register + * Initializes the address of the controller's mailbox register * The mailbox register is used to issue commands to the card. * Format of the mailbox area: * 00 01 command diff --git a/drivers/scsi/sd_ioctl.c b/drivers/scsi/sd_ioctl.c index 168e68e9ac6a..d77a15c1d29f 100644 --- a/drivers/scsi/sd_ioctl.c +++ b/drivers/scsi/sd_ioctl.c @@ -57,6 +57,7 @@ int sd_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigne diskinfo[2] = rscsi_disks[DEVICE_NR(dev)].capacity >> 11; /* override with calculated, extended default, or driver values */ +/* this is the only call of hostt->bios_param() */ if(host->hostt->bios_param != NULL) host->hostt->bios_param(&rscsi_disks[DEVICE_NR(dev)], diff --git a/drivers/scsi/sym53c8xx.c b/drivers/scsi/sym53c8xx.c index 8a8f21e49cff..acecb9b1bbe6 100644 --- a/drivers/scsi/sym53c8xx.c +++ b/drivers/scsi/sym53c8xx.c @@ -3646,7 +3646,7 @@ static struct scripth scripth0 __initdata = { ** some target to reset or some disconnected ** job to abort. Since error recovery is a serious ** busyness, we will really reset the SCSI BUS, if - ** case of a SCSI interrupt occuring in this path. + ** case of a SCSI interrupt occurring in this path. */ /* @@ -8635,7 +8635,7 @@ static void ncr_timeout (ncb_p np) ** si: sist ** ** SCSI bus lines: -** so: control lines as driver by NCR. +** so: control lines as driven by NCR. ** si: control lines as seen by NCR. ** sd: scsi data lines as seen by NCR. ** @@ -8644,7 +8644,7 @@ static void ncr_timeout (ncb_p np) ** scntl3: (see the manual) ** ** current script command: -** dsp: script adress (relative to start of script). +** dsp: script address (relative to start of script). ** dbc: first word of script command. ** ** First 24 register of the chip: diff --git a/drivers/scsi/sym53c8xx_defs.h b/drivers/scsi/sym53c8xx_defs.h index d5b6f0e1b7fd..09876e55a1ff 100644 --- a/drivers/scsi/sym53c8xx_defs.h +++ b/drivers/scsi/sym53c8xx_defs.h @@ -483,7 +483,7 @@ #endif /* - * If the CPU and the NCR use same endian-ness adressing, + * If the CPU and the NCR use same endian-ness addressing, * no byte reordering is needed for script patching. * Macro cpu_to_scr() is to be used for script patching. * Macro scr_to_cpu() is to be used for getting a DWORD @@ -517,7 +517,7 @@ * would have been correctly designed for PCI, this * option would be useless. * - * If the CPU and the NCR use same endian-ness adressing, + * If the CPU and the NCR use same endian-ness addressing, * no byte reordering is needed for accessing chip io * registers. Functions suffixed by '_raw' are assumed * to access the chip over the PCI without doing byte diff --git a/drivers/usb/printer.c b/drivers/usb/printer.c index fb3cf80dc902..6de96ed17071 100644 --- a/drivers/usb/printer.c +++ b/drivers/usb/printer.c @@ -460,7 +460,7 @@ static void *usblp_probe(struct usb_device *dev, unsigned int ifnum) struct usb_endpoint_descriptor *epread, *epwrite; struct usblp *usblp; int minor, i, bidir = 0, quirks; - int alts = dev->actconfig->interface[ifnum].act_altsetting; + int alts = -1; int length, err; char *buf; @@ -474,6 +474,9 @@ static void *usblp_probe(struct usb_device *dev, unsigned int ifnum) (interface->bInterfaceProtocol > 1 && interface->bNumEndpoints < 2)) continue; + if (alts == -1) + alts = i; + if (interface->bInterfaceProtocol > 1) { bidir = 1; alts = i; @@ -481,6 +484,9 @@ static void *usblp_probe(struct usb_device *dev, unsigned int ifnum) } } + if (alts == -1) + return NULL; + interface = &dev->actconfig->interface[ifnum].altsetting[alts]; if (usb_set_interface(dev, ifnum, alts)) err("can't set desired altsetting %d on interface %d", alts, ifnum); diff --git a/drivers/usb/usb-uhci.c b/drivers/usb/usb-uhci.c index 99b5cad95263..7f4d9862b911 100644 --- a/drivers/usb/usb-uhci.c +++ b/drivers/usb/usb-uhci.c @@ -2297,7 +2297,7 @@ _static int process_interrupt (uhci_t *s, urb_t *urb) usb_endpoint_halt (urb->dev, usb_pipeendpoint (urb->pipe), usb_pipeout (urb->pipe)); } - // if any error occured: ignore this td, and continue + // if any error occurred: ignore this td, and continue if (status != 0) { //uhci_show_td (desc); urb->error_count++; diff --git a/drivers/video/atyfb.c b/drivers/video/atyfb.c index df78ab300081..dc68b87bb366 100644 --- a/drivers/video/atyfb.c +++ b/drivers/video/atyfb.c @@ -3268,7 +3268,7 @@ __initfunc(void atyfb_of_init(struct device_node *dp)) addr = dp->addrs[1].address; break; default: - printk("Warning: got %d adresses for ATY:\n", dp->n_addrs); + printk("Warning: got %d addresses for ATY:\n", dp->n_addrs); for (i = 0; i < dp->n_addrs; i++) printk(" %08x-%08x", dp->addrs[i].address, dp->addrs[i].address+dp->addrs[i].size-1); diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index 9e8bd41bbe5c..8e9bd3087ad7 100644 --- a/fs/binfmt_aout.c +++ b/fs/binfmt_aout.c @@ -31,16 +31,16 @@ static int load_aout_binary(struct linux_binprm *, struct pt_regs * regs); static int load_aout_library(int fd); -static int aout_core_dump(long signr, struct pt_regs * regs); +static int aout_core_dump(long signr, struct pt_regs * regs, struct file *); extern void dump_thread(struct pt_regs *, struct user *); static struct linux_binfmt aout_format = { -#ifndef MODULE - NULL, NULL, load_aout_binary, load_aout_library, aout_core_dump -#else - NULL, &__this_module, load_aout_binary, load_aout_library, aout_core_dump -#endif + module: THIS_MODULE, + load_binary: load_aout_binary, + load_shlib: load_aout_library, + core_dump: aout_core_dump, + min_coredump: PAGE_SIZE, }; static void set_brk(unsigned long start, unsigned long end) @@ -88,15 +88,11 @@ if (file->f_op->llseek) { \ * dumping of the process results in another error.. */ -static inline int -do_aout_core_dump(long signr, struct pt_regs * regs) +static int +aout_core_dump(long signr, struct pt_regs * regs, struct file * file) { - struct dentry * dentry = NULL; - struct inode * inode = NULL; - struct file * file; mm_segment_t fs; int has_dumped = 0; - char corefile[6+sizeof(current->comm)]; unsigned long dump_start, dump_size; struct user dump; #if defined(__alpha__) @@ -112,32 +108,8 @@ do_aout_core_dump(long signr, struct pt_regs * regs) # define START_STACK(u) (u.start_stack) #endif - if (!current->dumpable || atomic_read(¤t->mm->count) != 1) - return 0; - current->dumpable = 0; - -/* See if we have enough room to write the upage. */ - if (current->rlim[RLIMIT_CORE].rlim_cur < PAGE_SIZE) - return 0; fs = get_fs(); set_fs(KERNEL_DS); - memcpy(corefile,"core.",5); -#if 0 - memcpy(corefile+5,current->comm,sizeof(current->comm)); -#else - corefile[4] = '\0'; -#endif - file = filp_open(corefile,O_CREAT | 2 | O_TRUNC | O_NOFOLLOW, 0600); - if (IS_ERR(file)) - goto end_coredump; - dentry = file->f_dentry; - inode = dentry->d_inode; - if (!S_ISREG(inode->i_mode)) - goto close_coredump; - if (!inode->i_op || !inode->i_op->default_file_ops) - goto close_coredump; - if (!file->f_op->write) - goto close_coredump; has_dumped = 1; current->flags |= PF_DUMPCORE; strncpy(dump.u_comm, current->comm, sizeof(current->comm)); @@ -217,23 +189,10 @@ do_aout_core_dump(long signr, struct pt_regs * regs) set_fs(KERNEL_DS); DUMP_WRITE(current,sizeof(*current)); close_coredump: - filp_close(file, NULL); -end_coredump: set_fs(fs); return has_dumped; } -static int -aout_core_dump(long signr, struct pt_regs * regs) -{ - int retval; - - MOD_INC_USE_COUNT; - retval = do_aout_core_dump(signr, regs); - MOD_DEC_USE_COUNT; - return retval; -} - /* * create_aout_tables() parses the env- and arg-strings in new user * memory and creates the pointer tables from them, and puts their diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index f8981a3ca0a7..0c1708c98c37 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -54,7 +54,7 @@ extern void dump_thread(struct pt_regs *, struct user *); * don't even try. */ #ifdef USE_ELF_CORE_DUMP -static int elf_core_dump(long signr, struct pt_regs * regs); +static int elf_core_dump(long signr, struct pt_regs * regs, struct file *); #else #define elf_core_dump NULL #endif @@ -64,11 +64,11 @@ static int elf_core_dump(long signr, struct pt_regs * regs); #define ELF_PAGEALIGN(_v) (((_v) + ELF_EXEC_PAGESIZE - 1) & ~(ELF_EXEC_PAGESIZE - 1)) static struct linux_binfmt elf_format = { -#ifndef MODULE - NULL, NULL, load_elf_binary, load_elf_library, elf_core_dump -#else - NULL, &__this_module, load_elf_binary, load_elf_library, elf_core_dump -#endif + module: THIS_MODULE, + load_binary: load_elf_binary, + load_shlib: load_elf_library, + core_dump: elf_core_dump, + min_coredump: ELF_EXEC_PAGESIZE, }; static void set_brk(unsigned long start, unsigned long end) @@ -1078,14 +1078,10 @@ static int writenote(struct memelfnote *men, struct file *file) * and then they are actually written out. If we run out of core limit * we just truncate. */ -static int elf_core_dump(long signr, struct pt_regs * regs) +static int elf_core_dump(long signr, struct pt_regs * regs, struct file * file) { int has_dumped = 0; - struct file *file; - struct dentry *dentry; - struct inode *inode; mm_segment_t fs; - char corefile[6+sizeof(current->comm)]; int segs; int i; size_t size = 0; @@ -1099,16 +1095,6 @@ static int elf_core_dump(long signr, struct pt_regs * regs) elf_fpregset_t fpu; /* NT_PRFPREG */ struct elf_prpsinfo psinfo; /* NT_PRPSINFO */ - if (!current->dumpable || - limit < ELF_EXEC_PAGESIZE || - atomic_read(¤t->mm->count) != 1) - return 0; - current->dumpable = 0; - -#ifndef CONFIG_BINFMT_ELF - MOD_INC_USE_COUNT; -#endif - segs = current->mm->map_count; #ifdef DEBUG @@ -1139,27 +1125,6 @@ static int elf_core_dump(long signr, struct pt_regs * regs) fs = get_fs(); set_fs(KERNEL_DS); - memcpy(corefile,"core.",5); -#if 0 - memcpy(corefile+5,current->comm,sizeof(current->comm)); -#else - corefile[4] = '\0'; -#endif - file = filp_open(corefile, O_CREAT | 2 | O_TRUNC | O_NOFOLLOW, 0600); - if (IS_ERR(file)) - goto end_coredump; - dentry = file->f_dentry; - inode = dentry->d_inode; - if (inode->i_nlink > 1) - goto close_coredump; /* multiple links - don't dump */ - - if (!S_ISREG(inode->i_mode)) - goto close_coredump; - if (!inode->i_op || !inode->i_op->default_file_ops) - goto close_coredump; - if (!file->f_op->write) - goto close_coredump; - has_dumped = 1; current->flags |= PF_DUMPCORE; @@ -1358,13 +1323,8 @@ static int elf_core_dump(long signr, struct pt_regs * regs) } close_coredump: - filp_close(file, NULL); - end_coredump: set_fs(fs); -#ifndef CONFIG_BINFMT_ELF - MOD_DEC_USE_COUNT; -#endif return has_dumped; } #endif /* USE_ELF_CORE_DUMP */ diff --git a/fs/binfmt_em86.c b/fs/binfmt_em86.c index 8d1b97bc7ae2..b84b657bf940 100644 --- a/fs/binfmt_em86.c +++ b/fs/binfmt_em86.c @@ -103,11 +103,8 @@ static int load_em86(struct linux_binprm *bprm,struct pt_regs *regs) } struct linux_binfmt em86_format = { -#ifndef MODULE - NULL, 0, load_em86, NULL, NULL -#else - NULL, &__this_module, load_em86, NULL, NULL -#endif + module: THIS_MODULE, + load_binary: load_em86, }; int __init init_em86_binfmt(void) diff --git a/fs/binfmt_java.c b/fs/binfmt_java.c index 43206da54b23..f34f67c832be 100644 --- a/fs/binfmt_java.c +++ b/fs/binfmt_java.c @@ -150,11 +150,8 @@ static int load_java(struct linux_binprm *bprm,struct pt_regs *regs) } static struct linux_binfmt java_format = { -#ifndef MODULE - NULL, 0, load_java, NULL, NULL -#else - NULL, &__this_module, load_java, NULL, NULL -#endif + module: THIS_MODULE, + load_binary: load_java, }; static int load_applet(struct linux_binprm *bprm,struct pt_regs *regs) @@ -167,11 +164,8 @@ static int load_applet(struct linux_binprm *bprm,struct pt_regs *regs) } static struct linux_binfmt applet_format = { -#ifndef MODULE - NULL, 0, load_applet, NULL, NULL -#else - NULL, &__this_module, load_applet, NULL, NULL -#endif + module: THIS_MODULE, + load_binary: load_applet, }; int __init init_java_binfmt(void) diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index 434048874d95..c893971abb3f 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c @@ -65,11 +65,8 @@ static void entry_proc_cleanup(Node *e); static int entry_proc_setup(Node *e); static struct linux_binfmt misc_format = { -#ifndef MODULE - NULL, 0, load_misc_binary, NULL, NULL -#else - NULL, &__this_module, load_misc_binary, NULL, NULL -#endif + module: THIS_MODULE, + load_binary: load_misc_binary, }; static struct proc_dir_entry *bm_dir = NULL; diff --git a/fs/binfmt_script.c b/fs/binfmt_script.c index 336dc97ff93d..19f2cd6af1c4 100644 --- a/fs/binfmt_script.c +++ b/fs/binfmt_script.c @@ -100,11 +100,8 @@ static int load_script(struct linux_binprm *bprm,struct pt_regs *regs) } struct linux_binfmt script_format = { -#ifndef MODULE - NULL, 0, load_script, NULL, NULL -#else - NULL, &__this_module, load_script, NULL, NULL -#endif + module: THIS_MODULE, + load_binary: load_script, }; int __init init_script_binfmt(void) diff --git a/fs/dcache.c b/fs/dcache.c index f55eb8be7421..3c59a0948812 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -702,7 +702,7 @@ void d_rehash(struct dentry * entry) * Note that we have to be a lot more careful about getting the hash * switched - we have to switch the hash value properly even if it * then no longer matches the actual (corrupted) string of the target. - * The has value has to match the hash queue that the dentry is on.. + * The hash value has to match the hash queue that the dentry is on.. */ static inline void switch_names(struct dentry * dentry, struct dentry * target) { @@ -829,7 +829,7 @@ asmlinkage int sys_getcwd(char *buf, unsigned long size) struct dentry *pwd = current->fs->pwd; error = -ENOENT; - /* Has the current directory has been unlinked? */ + /* Has the current directory been unlinked? */ if (pwd->d_parent == pwd || !list_empty(&pwd->d_hash)) { char *page = (char *) __get_free_page(GFP_USER); error = -ENOMEM; diff --git a/fs/exec.c b/fs/exec.c index 64d49bba48a4..e3782e405478 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -888,3 +888,56 @@ int do_execve(char * filename, char ** argv, char ** envp, struct pt_regs * regs return retval; } + +int do_coredump(long signr, struct pt_regs * regs) +{ + struct linux_binfmt *binfmt; + char corename[6+sizeof(current->comm)]; + struct file * file; + struct inode * inode; + + lock_kernel(); + binfmt = current->binfmt; + if (!binfmt || !binfmt->core_dump) + goto fail; + if (!current->dumpable || atomic_read(¤t->mm->count) != 1) + goto fail; + if (current->rlim[RLIMIT_CORE].rlim_cur < binfmt->min_coredump) + goto fail; + current->dumpable = 0; + + memcpy(corename,"core.", 5); +#if 0 + memcpy(corename+5,current->comm,sizeof(current->comm)); +#else + corename[4] = '\0'; +#endif + file = filp_open(corename, O_CREAT | 2 | O_NOFOLLOW, 0600); + if (IS_ERR(file)) + goto fail; + inode = file->f_dentry->d_inode; + if (inode->i_nlink > 1) + goto close_fail; /* multiple links - don't dump */ + if (list_empty(&file->f_dentry->d_hash)) + goto close_fail; + + if (!S_ISREG(inode->i_mode)) + goto close_fail; + if (!file->f_op) + goto close_fail; + if (!file->f_op->write) + goto close_fail; + if (do_truncate(file->f_dentry, 0) != 0) + goto close_fail; + if (!binfmt->core_dump(signr, regs, file)) + goto close_fail; + filp_close(file, NULL); + unlock_kernel(); + return 1; + +close_fail: + filp_close(file, NULL); +fail: + unlock_kernel(); + return 0; +} diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index d2cde719a170..190e988a657e 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -6,6 +6,11 @@ * Authors: Olaf Kirch (okir@monad.swb.de) * * Copyright (C) 1995-1999 Olaf Kirch + * + * Apr 24, 2001: Added semaphores around nfsd_cache calls + * to protect it since it can yeild the processor + * in its kmalloc call. + * Craig I. Hagan */ #define __NO_VERSION__ @@ -44,6 +49,8 @@ static void nfsd(struct svc_rqst *rqstp); struct timeval nfssvc_boot = { 0, 0 }; static atomic_t nfsd_active = ATOMIC_INIT(0); +static struct semaphore nfsd_cache_sem = MUTEX; + /* * Maximum number of nfsd processes */ @@ -81,8 +88,9 @@ nfsd_svc(unsigned short port, int nrservs) if (error < 0) goto failure; #endif - + down(&nfsd_cache_sem); nfsd_racache_init(); /* Readahead param cache */ + up(&nfsd_cache_sem); while (nrservs--) { error = svc_create_thread(nfsd, serv); @@ -146,7 +154,6 @@ nfsd(struct svc_rqst *rqstp) if (err < 0) break; - /* Lock the export hash tables for reading. */ exp_readlock(); @@ -160,6 +167,7 @@ nfsd(struct svc_rqst *rqstp) recalc_sigpending(current); spin_unlock_irq(¤t->sigmask_lock); + svc_process(serv, rqstp); /* Unlock export hash tables */ @@ -180,8 +188,10 @@ nfsd(struct svc_rqst *rqstp) /* Count active threads */ if (atomic_dec_and_test(&nfsd_active)) { + down(&nfsd_cache_sem); nfsd_export_shutdown(); /* revoke all exports */ nfsd_racache_shutdown(); /* release read-ahead cache */ + up(&nfsd_cache_sem); } /* Release lockd */ @@ -200,13 +210,19 @@ nfsd_dispatch(struct svc_rqst *rqstp, u32 *statp) struct svc_procedure *proc; kxdrproc_t xdr; u32 nfserr; + int res_lookup; dprintk("nfsd_dispatch: vers %d proc %d\n", rqstp->rq_vers, rqstp->rq_proc); proc = rqstp->rq_procinfo; /* Check whether we have this call in the cache. */ - switch (nfsd_cache_lookup(rqstp, proc->pc_cachetype)) { + + down(&nfsd_cache_sem); + res_lookup = nfsd_cache_lookup(rqstp, proc->pc_cachetype); + up(&nfsd_cache_sem); + + switch (res_lookup) { case RC_INTR: case RC_DROPIT: return 0; @@ -220,7 +236,9 @@ nfsd_dispatch(struct svc_rqst *rqstp, u32 *statp) xdr = proc->pc_decode; if (xdr && !xdr(rqstp, rqstp->rq_argbuf.buf, rqstp->rq_argp)) { dprintk("nfsd: failed to decode arguments!\n"); + down(&nfsd_cache_sem); nfsd_cache_update(rqstp, RC_NOCACHE, NULL); + up(&nfsd_cache_sem); *statp = rpc_garbage_args; return 1; } @@ -239,7 +257,9 @@ nfsd_dispatch(struct svc_rqst *rqstp, u32 *statp) if (xdr && !xdr(rqstp, rqstp->rq_resbuf.buf, rqstp->rq_resp)) { /* Failed to encode result. Release cache entry */ dprintk("nfsd: failed to encode result!\n"); + down(&nfsd_cache_sem); nfsd_cache_update(rqstp, RC_NOCACHE, NULL); + up(&nfsd_cache_sem); *statp = rpc_system_err; return 1; } @@ -250,14 +270,18 @@ nfsd_dispatch(struct svc_rqst *rqstp, u32 *statp) && !xdr(rqstp, rqstp->rq_resbuf.buf, rqstp->rq_resp)) { /* Failed to encode result. Release cache entry */ dprintk("nfsd: failed to encode result!\n"); + down(&nfsd_cache_sem); nfsd_cache_update(rqstp, RC_NOCACHE, NULL); + up(&nfsd_cache_sem); *statp = rpc_system_err; return 1; } #endif /* CONFIG_NFSD_V3 */ /* Store reply in cache. */ + down(&nfsd_cache_sem); nfsd_cache_update(rqstp, proc->pc_cachetype, statp + 1); + up(&nfsd_cache_sem); return 1; } diff --git a/fs/nls/nls_koi8-r.c b/fs/nls/nls_koi8-r.c index 22c9b18ab162..86b662adff9f 100644 --- a/fs/nls/nls_koi8-r.c +++ b/fs/nls/nls_koi8-r.c @@ -5,6 +5,7 @@ * Generated automatically from the Unicode and charset * tables from the Unicode Organization (www.unicode.org). * The Unicode to charset table has only exact mappings. + * Patched to include KOI8-U and KOI8-RU support */ #include @@ -66,14 +67,14 @@ static struct nls_unicode charset2uni[256] = { {0xb0, 0x00}, {0xb2, 0x00}, {0xb7, 0x00}, {0xf7, 0x00}, /* 0xa0*/ {0x50, 0x25}, {0x51, 0x25}, {0x52, 0x25}, {0x51, 0x04}, - {0x53, 0x25}, {0x54, 0x25}, {0x55, 0x25}, {0x56, 0x25}, + {0x54, 0x04}, {0x54, 0x25}, {0x56, 0x04}, {0x57, 0x04}, {0x57, 0x25}, {0x58, 0x25}, {0x59, 0x25}, {0x5a, 0x25}, - {0x5b, 0x25}, {0x5c, 0x25}, {0x5d, 0x25}, {0x5e, 0x25}, + {0x5b, 0x25}, {0x91, 0x04}, {0x5e, 0x04}, {0x5e, 0x25}, /* 0xb0*/ {0x5f, 0x25}, {0x60, 0x25}, {0x61, 0x25}, {0x01, 0x04}, - {0x62, 0x25}, {0x63, 0x25}, {0x64, 0x25}, {0x65, 0x25}, + {0x04, 0x04}, {0x63, 0x25}, {0x06, 0x04}, {0x07, 0x04}, {0x66, 0x25}, {0x67, 0x25}, {0x68, 0x25}, {0x69, 0x25}, - {0x6a, 0x25}, {0x6b, 0x25}, {0x6c, 0x25}, {0xa9, 0x00}, + {0x6a, 0x25}, {0x90, 0x04}, {0x0e, 0x04}, {0xa9, 0x00}, /* 0xc0*/ {0x4e, 0x04}, {0x30, 0x04}, {0x31, 0x04}, {0x46, 0x04}, {0x34, 0x04}, {0x35, 0x04}, {0x44, 0x04}, {0x33, 0x04}, @@ -133,8 +134,8 @@ static unsigned char page00[256] = { }; static unsigned char page04[256] = { - 0x00, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ + 0x00, 0xb3, 0x00, 0x00, 0xb4, 0x00, 0xb6, 0xb7, /* 0x00-0x07 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, /* 0x08-0x0f */ 0xe1, 0xe2, 0xf7, 0xe7, 0xe4, 0xe5, 0xf6, 0xfa, /* 0x10-0x17 */ 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, /* 0x18-0x1f */ 0xf2, 0xf3, 0xf4, 0xf5, 0xe6, 0xe8, 0xe3, 0xfe, /* 0x20-0x27 */ @@ -143,8 +144,8 @@ static unsigned char page04[256] = { 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, /* 0x38-0x3f */ 0xd2, 0xd3, 0xd4, 0xd5, 0xc6, 0xc8, 0xc3, 0xde, /* 0x40-0x47 */ 0xdb, 0xdd, 0xdf, 0xd9, 0xd8, 0xdc, 0xc0, 0xd1, /* 0x48-0x4f */ - 0x00, 0xa3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */ + 0x00, 0xa3, 0x00, 0x00, 0xa4, 0x00, 0xa6, 0xa7, /* 0x50-0x57 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xae, 0x00, /* 0x58-0x5f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */ @@ -152,7 +153,7 @@ static unsigned char page04[256] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */ + 0xbd, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */ @@ -306,8 +307,8 @@ static unsigned char charset2upper[256] = { 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, /* 0x88-0x8f */ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, /* 0x90-0x97 */ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, /* 0x98-0x9f */ - 0xa0, 0xa1, 0xa2, 0x00, 0xa4, 0xa5, 0xa6, 0xa7, /* 0xa0-0xa7 */ - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0xa8-0xaf */ + 0xa0, 0xa1, 0xa2, 0x00, 0xb4, 0xa5, 0xb6, 0xb7, /* 0xa0-0xa7 */ + 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xbd, 0xbe, 0xaf, /* 0xa8-0xaf */ 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */ 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, /* 0xb8-0xbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */ diff --git a/fs/ntfs/support.c b/fs/ntfs/support.c index 5ef0a818da0e..955e3e2c890c 100644 --- a/fs/ntfs/support.c +++ b/fs/ntfs/support.c @@ -102,7 +102,7 @@ void ntfs_memmove(void *dest, const void *src, ntfs_size_t n) memmove(dest, src, n); } -/* Warn that an error occured. */ +/* Warn that an error occurred. */ void ntfs_error(const char *fmt,...) { va_list ap; diff --git a/fs/smbfs/proc.c b/fs/smbfs/proc.c index 33b05c0a3a4e..235cda0af37d 100644 --- a/fs/smbfs/proc.c +++ b/fs/smbfs/proc.c @@ -609,7 +609,7 @@ smb_retry(struct smb_sb_info *server) * Check for a valid connection. */ if (server->state == CONN_VALID) { - PARANOIA("sucessful, new pid=%d, generation=%d\n", + PARANOIA("successful, new pid=%d, generation=%d\n", server->conn_pid, server->generation); result = 1; } diff --git a/include/asm-s390/ccwcache.h b/include/asm-s390/ccwcache.h index aae53de150fa..2809d5b24404 100644 --- a/include/asm-s390/ccwcache.h +++ b/include/asm-s390/ccwcache.h @@ -62,7 +62,7 @@ typedef struct ccw_req_t { #define CQR_STATUS_FILLED 0x01 /* request is ready to be preocessed */ #define CQR_STATUS_QUEUED 0x02 /* request is queued to be processed */ #define CQR_STATUS_IN_IO 0x04 /* request is currently in IO */ -#define CQR_STATUS_DONE 0x08 /* request is completed sucessfully */ +#define CQR_STATUS_DONE 0x08 /* request is completed successfully */ #define CQR_STATUS_ERROR 0x10 /* request is completed with error */ #define CQR_STATUS_FAILED 0x20 /* request is finally failed */ #define CQR_STATUS_PENDING 0x07 /* request is waiting for interrupt - ERP only */ diff --git a/include/asm-s390/irq.h b/include/asm-s390/irq.h index 5843fa6f37c7..db2d4782614b 100644 --- a/include/asm-s390/irq.h +++ b/include/asm-s390/irq.h @@ -147,7 +147,7 @@ typedef struct { typedef struct { __u8 cmd_code;/* command code */ - __u8 flags; /* flags, like IDA adressing, etc. */ + __u8 flags; /* flags, like IDA addressing, etc. */ __u16 count; /* byte count */ __u32 cda; /* data address */ } __attribute__ ((packed,aligned(8))) ccw1_t; diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index 8c9c50892dc1..3b5c12197665 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h @@ -711,10 +711,10 @@ extern inline void update_mmu_cache(struct vm_area_struct * vma, } /* - * a page-table entry has only 19 bit for offset and 7 bit for type - * if bits 0, 20 or 23 are set, a translation specification exceptions occures, and it's - * hard to find out the failing address - * therefor, we zero out this bits + * a page-table entry has only 19 bits for offset and 7 bits for type + * if bits 0, 20 or 23 are set, a translation specification exception occurs, + * and it's hard to find out the failing address + * therefore, we zero out these bits */ #define SWP_TYPE(entry) (((entry) >> 1) & 0x3f) diff --git a/include/asm-sparc/asm_offsets.h b/include/asm-sparc/asm_offsets.h index b5abb16dc590..35d2402e841f 100644 --- a/include/asm-sparc/asm_offsets.h +++ b/include/asm-sparc/asm_offsets.h @@ -18,147 +18,149 @@ #define ASIZ_task_exec_domain 0x00000004 #define AOFF_task_need_resched 0x00000014 #define ASIZ_task_need_resched 0x00000004 -#define AOFF_task_counter 0x00000018 +#define AOFF_task_ptrace 0x00000018 +#define ASIZ_task_ptrace 0x00000004 +#define AOFF_task_counter 0x0000001c #define ASIZ_task_counter 0x00000004 -#define AOFF_task_priority 0x0000001c +#define AOFF_task_priority 0x00000020 #define ASIZ_task_priority 0x00000004 -#define AOFF_task_avg_slice 0x00000020 +#define AOFF_task_avg_slice 0x00000024 #define ASIZ_task_avg_slice 0x00000004 -#define AOFF_task_has_cpu 0x00000024 +#define AOFF_task_has_cpu 0x00000028 #define ASIZ_task_has_cpu 0x00000004 -#define AOFF_task_processor 0x00000028 +#define AOFF_task_processor 0x0000002c #define ASIZ_task_processor 0x00000004 -#define AOFF_task_last_processor 0x0000002c +#define AOFF_task_last_processor 0x00000030 #define ASIZ_task_last_processor 0x00000004 -#define AOFF_task_lock_depth 0x00000030 +#define AOFF_task_lock_depth 0x00000034 #define ASIZ_task_lock_depth 0x00000004 -#define AOFF_task_next_task 0x00000034 +#define AOFF_task_next_task 0x00000038 #define ASIZ_task_next_task 0x00000004 -#define AOFF_task_prev_task 0x00000038 +#define AOFF_task_prev_task 0x0000003c #define ASIZ_task_prev_task 0x00000004 -#define AOFF_task_next_run 0x0000003c +#define AOFF_task_next_run 0x00000040 #define ASIZ_task_next_run 0x00000004 -#define AOFF_task_prev_run 0x00000040 +#define AOFF_task_prev_run 0x00000044 #define ASIZ_task_prev_run 0x00000004 -#define AOFF_task_task_exclusive 0x00000044 +#define AOFF_task_task_exclusive 0x00000048 #define ASIZ_task_task_exclusive 0x00000004 -#define AOFF_task_binfmt 0x00000048 +#define AOFF_task_binfmt 0x0000004c #define ASIZ_task_binfmt 0x00000004 -#define AOFF_task_exit_code 0x0000004c +#define AOFF_task_exit_code 0x00000050 #define ASIZ_task_exit_code 0x00000004 -#define AOFF_task_exit_signal 0x00000050 +#define AOFF_task_exit_signal 0x00000054 #define ASIZ_task_exit_signal 0x00000004 -#define AOFF_task_pdeath_signal 0x00000054 +#define AOFF_task_pdeath_signal 0x00000058 #define ASIZ_task_pdeath_signal 0x00000004 -#define AOFF_task_personality 0x00000058 +#define AOFF_task_personality 0x0000005c #define ASIZ_task_personality 0x00000004 -#define AOFF_task_pid 0x00000060 +#define AOFF_task_pid 0x00000064 #define ASIZ_task_pid 0x00000004 -#define AOFF_task_pgrp 0x00000064 +#define AOFF_task_pgrp 0x00000068 #define ASIZ_task_pgrp 0x00000004 -#define AOFF_task_tty_old_pgrp 0x00000068 +#define AOFF_task_tty_old_pgrp 0x0000006c #define ASIZ_task_tty_old_pgrp 0x00000004 -#define AOFF_task_session 0x0000006c +#define AOFF_task_session 0x00000070 #define ASIZ_task_session 0x00000004 -#define AOFF_task_leader 0x00000070 +#define AOFF_task_leader 0x00000074 #define ASIZ_task_leader 0x00000004 -#define AOFF_task_p_opptr 0x00000074 +#define AOFF_task_p_opptr 0x00000078 #define ASIZ_task_p_opptr 0x00000004 -#define AOFF_task_p_pptr 0x00000078 +#define AOFF_task_p_pptr 0x0000007c #define ASIZ_task_p_pptr 0x00000004 -#define AOFF_task_p_cptr 0x0000007c +#define AOFF_task_p_cptr 0x00000080 #define ASIZ_task_p_cptr 0x00000004 -#define AOFF_task_p_ysptr 0x00000080 +#define AOFF_task_p_ysptr 0x00000084 #define ASIZ_task_p_ysptr 0x00000004 -#define AOFF_task_p_osptr 0x00000084 +#define AOFF_task_p_osptr 0x00000088 #define ASIZ_task_p_osptr 0x00000004 -#define AOFF_task_pidhash_next 0x00000088 +#define AOFF_task_pidhash_next 0x0000008c #define ASIZ_task_pidhash_next 0x00000004 -#define AOFF_task_pidhash_pprev 0x0000008c +#define AOFF_task_pidhash_pprev 0x00000090 #define ASIZ_task_pidhash_pprev 0x00000004 -#define AOFF_task_tarray_ptr 0x00000090 +#define AOFF_task_tarray_ptr 0x00000094 #define ASIZ_task_tarray_ptr 0x00000004 -#define AOFF_task_wait_chldexit 0x00000094 +#define AOFF_task_wait_chldexit 0x00000098 #define ASIZ_task_wait_chldexit 0x00000004 -#define AOFF_task_vfork_sem 0x00000098 +#define AOFF_task_vfork_sem 0x0000009c #define ASIZ_task_vfork_sem 0x00000004 -#define AOFF_task_policy 0x0000009c +#define AOFF_task_policy 0x000000a0 #define ASIZ_task_policy 0x00000004 -#define AOFF_task_rt_priority 0x000000a0 +#define AOFF_task_rt_priority 0x000000a4 #define ASIZ_task_rt_priority 0x00000004 -#define AOFF_task_it_real_value 0x000000a4 +#define AOFF_task_it_real_value 0x000000a8 #define ASIZ_task_it_real_value 0x00000004 -#define AOFF_task_it_prof_value 0x000000a8 +#define AOFF_task_it_prof_value 0x000000ac #define ASIZ_task_it_prof_value 0x00000004 -#define AOFF_task_it_virt_value 0x000000ac +#define AOFF_task_it_virt_value 0x000000b0 #define ASIZ_task_it_virt_value 0x00000004 -#define AOFF_task_it_real_incr 0x000000b0 +#define AOFF_task_it_real_incr 0x000000b4 #define ASIZ_task_it_real_incr 0x00000004 -#define AOFF_task_it_prof_incr 0x000000b4 +#define AOFF_task_it_prof_incr 0x000000b8 #define ASIZ_task_it_prof_incr 0x00000004 -#define AOFF_task_it_virt_incr 0x000000b8 +#define AOFF_task_it_virt_incr 0x000000bc #define ASIZ_task_it_virt_incr 0x00000004 -#define AOFF_task_real_timer 0x000000bc +#define AOFF_task_real_timer 0x000000c0 #define ASIZ_task_real_timer 0x00000014 -#define AOFF_task_times 0x000000d0 +#define AOFF_task_times 0x000000d4 #define ASIZ_task_times 0x00000010 -#define AOFF_task_start_time 0x000000e0 +#define AOFF_task_start_time 0x000000e4 #define ASIZ_task_start_time 0x00000004 -#define AOFF_task_per_cpu_utime 0x000000e4 +#define AOFF_task_per_cpu_utime 0x000000e8 #define ASIZ_task_per_cpu_utime 0x00000004 -#define AOFF_task_min_flt 0x000000ec +#define AOFF_task_min_flt 0x000000f0 #define ASIZ_task_min_flt 0x00000004 -#define AOFF_task_maj_flt 0x000000f0 +#define AOFF_task_maj_flt 0x000000f4 #define ASIZ_task_maj_flt 0x00000004 -#define AOFF_task_nswap 0x000000f4 +#define AOFF_task_nswap 0x000000f8 #define ASIZ_task_nswap 0x00000004 -#define AOFF_task_cmin_flt 0x000000f8 +#define AOFF_task_cmin_flt 0x000000fc #define ASIZ_task_cmin_flt 0x00000004 -#define AOFF_task_cmaj_flt 0x000000fc +#define AOFF_task_cmaj_flt 0x00000100 #define ASIZ_task_cmaj_flt 0x00000004 -#define AOFF_task_cnswap 0x00000100 +#define AOFF_task_cnswap 0x00000104 #define ASIZ_task_cnswap 0x00000004 -#define AOFF_task_uid 0x00000106 +#define AOFF_task_uid 0x0000010a #define ASIZ_task_uid 0x00000002 -#define AOFF_task_euid 0x00000108 +#define AOFF_task_euid 0x0000010c #define ASIZ_task_euid 0x00000002 -#define AOFF_task_suid 0x0000010a +#define AOFF_task_suid 0x0000010e #define ASIZ_task_suid 0x00000002 -#define AOFF_task_fsuid 0x0000010c +#define AOFF_task_fsuid 0x00000110 #define ASIZ_task_fsuid 0x00000002 -#define AOFF_task_gid 0x0000010e +#define AOFF_task_gid 0x00000112 #define ASIZ_task_gid 0x00000002 -#define AOFF_task_egid 0x00000110 +#define AOFF_task_egid 0x00000114 #define ASIZ_task_egid 0x00000002 -#define AOFF_task_sgid 0x00000112 +#define AOFF_task_sgid 0x00000116 #define ASIZ_task_sgid 0x00000002 -#define AOFF_task_fsgid 0x00000114 +#define AOFF_task_fsgid 0x00000118 #define ASIZ_task_fsgid 0x00000002 -#define AOFF_task_ngroups 0x00000118 +#define AOFF_task_ngroups 0x0000011c #define ASIZ_task_ngroups 0x00000004 -#define AOFF_task_groups 0x0000011c +#define AOFF_task_groups 0x00000120 #define ASIZ_task_groups 0x00000040 -#define AOFF_task_cap_effective 0x0000015c +#define AOFF_task_cap_effective 0x00000160 #define ASIZ_task_cap_effective 0x00000004 -#define AOFF_task_cap_inheritable 0x00000160 +#define AOFF_task_cap_inheritable 0x00000164 #define ASIZ_task_cap_inheritable 0x00000004 -#define AOFF_task_cap_permitted 0x00000164 +#define AOFF_task_cap_permitted 0x00000168 #define ASIZ_task_cap_permitted 0x00000004 -#define AOFF_task_user 0x0000016c +#define AOFF_task_user 0x00000170 #define ASIZ_task_user 0x00000004 -#define AOFF_task_rlim 0x00000170 +#define AOFF_task_rlim 0x00000174 #define ASIZ_task_rlim 0x00000050 -#define AOFF_task_used_math 0x000001c0 +#define AOFF_task_used_math 0x000001c4 #define ASIZ_task_used_math 0x00000002 -#define AOFF_task_comm 0x000001c2 +#define AOFF_task_comm 0x000001c6 #define ASIZ_task_comm 0x00000010 -#define AOFF_task_link_count 0x000001d4 +#define AOFF_task_link_count 0x000001d8 #define ASIZ_task_link_count 0x00000004 -#define AOFF_task_tty 0x000001d8 +#define AOFF_task_tty 0x000001dc #define ASIZ_task_tty 0x00000004 -#define AOFF_task_semundo 0x000001dc +#define AOFF_task_semundo 0x000001e0 #define ASIZ_task_semundo 0x00000004 -#define AOFF_task_semsleeping 0x000001e0 +#define AOFF_task_semsleeping 0x000001e4 #define ASIZ_task_semsleeping 0x00000004 #define AOFF_task_tss 0x000001e8 #define ASIZ_task_tss 0x00000388 @@ -309,147 +311,149 @@ #define ASIZ_task_exec_domain 0x00000004 #define AOFF_task_need_resched 0x00000014 #define ASIZ_task_need_resched 0x00000004 -#define AOFF_task_counter 0x00000018 +#define AOFF_task_ptrace 0x00000018 +#define ASIZ_task_ptrace 0x00000004 +#define AOFF_task_counter 0x0000001c #define ASIZ_task_counter 0x00000004 -#define AOFF_task_priority 0x0000001c +#define AOFF_task_priority 0x00000020 #define ASIZ_task_priority 0x00000004 -#define AOFF_task_avg_slice 0x00000020 +#define AOFF_task_avg_slice 0x00000024 #define ASIZ_task_avg_slice 0x00000004 -#define AOFF_task_has_cpu 0x00000024 +#define AOFF_task_has_cpu 0x00000028 #define ASIZ_task_has_cpu 0x00000004 -#define AOFF_task_processor 0x00000028 +#define AOFF_task_processor 0x0000002c #define ASIZ_task_processor 0x00000004 -#define AOFF_task_last_processor 0x0000002c +#define AOFF_task_last_processor 0x00000030 #define ASIZ_task_last_processor 0x00000004 -#define AOFF_task_lock_depth 0x00000030 +#define AOFF_task_lock_depth 0x00000034 #define ASIZ_task_lock_depth 0x00000004 -#define AOFF_task_next_task 0x00000034 +#define AOFF_task_next_task 0x00000038 #define ASIZ_task_next_task 0x00000004 -#define AOFF_task_prev_task 0x00000038 +#define AOFF_task_prev_task 0x0000003c #define ASIZ_task_prev_task 0x00000004 -#define AOFF_task_next_run 0x0000003c +#define AOFF_task_next_run 0x00000040 #define ASIZ_task_next_run 0x00000004 -#define AOFF_task_prev_run 0x00000040 +#define AOFF_task_prev_run 0x00000044 #define ASIZ_task_prev_run 0x00000004 -#define AOFF_task_task_exclusive 0x00000044 +#define AOFF_task_task_exclusive 0x00000048 #define ASIZ_task_task_exclusive 0x00000004 -#define AOFF_task_binfmt 0x00000048 +#define AOFF_task_binfmt 0x0000004c #define ASIZ_task_binfmt 0x00000004 -#define AOFF_task_exit_code 0x0000004c +#define AOFF_task_exit_code 0x00000050 #define ASIZ_task_exit_code 0x00000004 -#define AOFF_task_exit_signal 0x00000050 +#define AOFF_task_exit_signal 0x00000054 #define ASIZ_task_exit_signal 0x00000004 -#define AOFF_task_pdeath_signal 0x00000054 +#define AOFF_task_pdeath_signal 0x00000058 #define ASIZ_task_pdeath_signal 0x00000004 -#define AOFF_task_personality 0x00000058 +#define AOFF_task_personality 0x0000005c #define ASIZ_task_personality 0x00000004 -#define AOFF_task_pid 0x00000060 +#define AOFF_task_pid 0x00000064 #define ASIZ_task_pid 0x00000004 -#define AOFF_task_pgrp 0x00000064 +#define AOFF_task_pgrp 0x00000068 #define ASIZ_task_pgrp 0x00000004 -#define AOFF_task_tty_old_pgrp 0x00000068 +#define AOFF_task_tty_old_pgrp 0x0000006c #define ASIZ_task_tty_old_pgrp 0x00000004 -#define AOFF_task_session 0x0000006c +#define AOFF_task_session 0x00000070 #define ASIZ_task_session 0x00000004 -#define AOFF_task_leader 0x00000070 +#define AOFF_task_leader 0x00000074 #define ASIZ_task_leader 0x00000004 -#define AOFF_task_p_opptr 0x00000074 +#define AOFF_task_p_opptr 0x00000078 #define ASIZ_task_p_opptr 0x00000004 -#define AOFF_task_p_pptr 0x00000078 +#define AOFF_task_p_pptr 0x0000007c #define ASIZ_task_p_pptr 0x00000004 -#define AOFF_task_p_cptr 0x0000007c +#define AOFF_task_p_cptr 0x00000080 #define ASIZ_task_p_cptr 0x00000004 -#define AOFF_task_p_ysptr 0x00000080 +#define AOFF_task_p_ysptr 0x00000084 #define ASIZ_task_p_ysptr 0x00000004 -#define AOFF_task_p_osptr 0x00000084 +#define AOFF_task_p_osptr 0x00000088 #define ASIZ_task_p_osptr 0x00000004 -#define AOFF_task_pidhash_next 0x00000088 +#define AOFF_task_pidhash_next 0x0000008c #define ASIZ_task_pidhash_next 0x00000004 -#define AOFF_task_pidhash_pprev 0x0000008c +#define AOFF_task_pidhash_pprev 0x00000090 #define ASIZ_task_pidhash_pprev 0x00000004 -#define AOFF_task_tarray_ptr 0x00000090 +#define AOFF_task_tarray_ptr 0x00000094 #define ASIZ_task_tarray_ptr 0x00000004 -#define AOFF_task_wait_chldexit 0x00000094 +#define AOFF_task_wait_chldexit 0x00000098 #define ASIZ_task_wait_chldexit 0x00000004 -#define AOFF_task_vfork_sem 0x00000098 +#define AOFF_task_vfork_sem 0x0000009c #define ASIZ_task_vfork_sem 0x00000004 -#define AOFF_task_policy 0x0000009c +#define AOFF_task_policy 0x000000a0 #define ASIZ_task_policy 0x00000004 -#define AOFF_task_rt_priority 0x000000a0 +#define AOFF_task_rt_priority 0x000000a4 #define ASIZ_task_rt_priority 0x00000004 -#define AOFF_task_it_real_value 0x000000a4 +#define AOFF_task_it_real_value 0x000000a8 #define ASIZ_task_it_real_value 0x00000004 -#define AOFF_task_it_prof_value 0x000000a8 +#define AOFF_task_it_prof_value 0x000000ac #define ASIZ_task_it_prof_value 0x00000004 -#define AOFF_task_it_virt_value 0x000000ac +#define AOFF_task_it_virt_value 0x000000b0 #define ASIZ_task_it_virt_value 0x00000004 -#define AOFF_task_it_real_incr 0x000000b0 +#define AOFF_task_it_real_incr 0x000000b4 #define ASIZ_task_it_real_incr 0x00000004 -#define AOFF_task_it_prof_incr 0x000000b4 +#define AOFF_task_it_prof_incr 0x000000b8 #define ASIZ_task_it_prof_incr 0x00000004 -#define AOFF_task_it_virt_incr 0x000000b8 +#define AOFF_task_it_virt_incr 0x000000bc #define ASIZ_task_it_virt_incr 0x00000004 -#define AOFF_task_real_timer 0x000000bc +#define AOFF_task_real_timer 0x000000c0 #define ASIZ_task_real_timer 0x00000014 -#define AOFF_task_times 0x000000d0 +#define AOFF_task_times 0x000000d4 #define ASIZ_task_times 0x00000010 -#define AOFF_task_start_time 0x000000e0 +#define AOFF_task_start_time 0x000000e4 #define ASIZ_task_start_time 0x00000004 -#define AOFF_task_per_cpu_utime 0x000000e4 +#define AOFF_task_per_cpu_utime 0x000000e8 #define ASIZ_task_per_cpu_utime 0x00000080 -#define AOFF_task_min_flt 0x000001e4 +#define AOFF_task_min_flt 0x000001e8 #define ASIZ_task_min_flt 0x00000004 -#define AOFF_task_maj_flt 0x000001e8 +#define AOFF_task_maj_flt 0x000001ec #define ASIZ_task_maj_flt 0x00000004 -#define AOFF_task_nswap 0x000001ec +#define AOFF_task_nswap 0x000001f0 #define ASIZ_task_nswap 0x00000004 -#define AOFF_task_cmin_flt 0x000001f0 +#define AOFF_task_cmin_flt 0x000001f4 #define ASIZ_task_cmin_flt 0x00000004 -#define AOFF_task_cmaj_flt 0x000001f4 +#define AOFF_task_cmaj_flt 0x000001f8 #define ASIZ_task_cmaj_flt 0x00000004 -#define AOFF_task_cnswap 0x000001f8 +#define AOFF_task_cnswap 0x000001fc #define ASIZ_task_cnswap 0x00000004 -#define AOFF_task_uid 0x000001fe +#define AOFF_task_uid 0x00000202 #define ASIZ_task_uid 0x00000002 -#define AOFF_task_euid 0x00000200 +#define AOFF_task_euid 0x00000204 #define ASIZ_task_euid 0x00000002 -#define AOFF_task_suid 0x00000202 +#define AOFF_task_suid 0x00000206 #define ASIZ_task_suid 0x00000002 -#define AOFF_task_fsuid 0x00000204 +#define AOFF_task_fsuid 0x00000208 #define ASIZ_task_fsuid 0x00000002 -#define AOFF_task_gid 0x00000206 +#define AOFF_task_gid 0x0000020a #define ASIZ_task_gid 0x00000002 -#define AOFF_task_egid 0x00000208 +#define AOFF_task_egid 0x0000020c #define ASIZ_task_egid 0x00000002 -#define AOFF_task_sgid 0x0000020a +#define AOFF_task_sgid 0x0000020e #define ASIZ_task_sgid 0x00000002 -#define AOFF_task_fsgid 0x0000020c +#define AOFF_task_fsgid 0x00000210 #define ASIZ_task_fsgid 0x00000002 -#define AOFF_task_ngroups 0x00000210 +#define AOFF_task_ngroups 0x00000214 #define ASIZ_task_ngroups 0x00000004 -#define AOFF_task_groups 0x00000214 +#define AOFF_task_groups 0x00000218 #define ASIZ_task_groups 0x00000040 -#define AOFF_task_cap_effective 0x00000254 +#define AOFF_task_cap_effective 0x00000258 #define ASIZ_task_cap_effective 0x00000004 -#define AOFF_task_cap_inheritable 0x00000258 +#define AOFF_task_cap_inheritable 0x0000025c #define ASIZ_task_cap_inheritable 0x00000004 -#define AOFF_task_cap_permitted 0x0000025c +#define AOFF_task_cap_permitted 0x00000260 #define ASIZ_task_cap_permitted 0x00000004 -#define AOFF_task_user 0x00000264 +#define AOFF_task_user 0x00000268 #define ASIZ_task_user 0x00000004 -#define AOFF_task_rlim 0x00000268 +#define AOFF_task_rlim 0x0000026c #define ASIZ_task_rlim 0x00000050 -#define AOFF_task_used_math 0x000002b8 +#define AOFF_task_used_math 0x000002bc #define ASIZ_task_used_math 0x00000002 -#define AOFF_task_comm 0x000002ba +#define AOFF_task_comm 0x000002be #define ASIZ_task_comm 0x00000010 -#define AOFF_task_link_count 0x000002cc +#define AOFF_task_link_count 0x000002d0 #define ASIZ_task_link_count 0x00000004 -#define AOFF_task_tty 0x000002d0 +#define AOFF_task_tty 0x000002d4 #define ASIZ_task_tty 0x00000004 -#define AOFF_task_semundo 0x000002d4 +#define AOFF_task_semundo 0x000002d8 #define ASIZ_task_semundo 0x00000004 -#define AOFF_task_semsleeping 0x000002d8 +#define AOFF_task_semsleeping 0x000002dc #define ASIZ_task_semsleeping 0x00000004 #define AOFF_task_tss 0x000002e0 #define ASIZ_task_tss 0x00000388 diff --git a/include/asm-sparc64/asm_offsets.h b/include/asm-sparc64/asm_offsets.h index 1ef0bede2f60..f295ddf22b78 100644 --- a/include/asm-sparc64/asm_offsets.h +++ b/include/asm-sparc64/asm_offsets.h @@ -18,147 +18,149 @@ #define ASIZ_task_exec_domain 0x00000008 #define AOFF_task_need_resched 0x00000028 #define ASIZ_task_need_resched 0x00000008 -#define AOFF_task_counter 0x00000030 +#define AOFF_task_ptrace 0x00000030 +#define ASIZ_task_ptrace 0x00000008 +#define AOFF_task_counter 0x00000038 #define ASIZ_task_counter 0x00000008 -#define AOFF_task_priority 0x00000038 +#define AOFF_task_priority 0x00000040 #define ASIZ_task_priority 0x00000008 -#define AOFF_task_avg_slice 0x00000040 +#define AOFF_task_avg_slice 0x00000048 #define ASIZ_task_avg_slice 0x00000008 -#define AOFF_task_has_cpu 0x00000048 +#define AOFF_task_has_cpu 0x00000050 #define ASIZ_task_has_cpu 0x00000004 -#define AOFF_task_processor 0x0000004c +#define AOFF_task_processor 0x00000054 #define ASIZ_task_processor 0x00000004 -#define AOFF_task_last_processor 0x00000050 +#define AOFF_task_last_processor 0x00000058 #define ASIZ_task_last_processor 0x00000004 -#define AOFF_task_lock_depth 0x00000054 +#define AOFF_task_lock_depth 0x0000005c #define ASIZ_task_lock_depth 0x00000004 -#define AOFF_task_next_task 0x00000058 +#define AOFF_task_next_task 0x00000060 #define ASIZ_task_next_task 0x00000008 -#define AOFF_task_prev_task 0x00000060 +#define AOFF_task_prev_task 0x00000068 #define ASIZ_task_prev_task 0x00000008 -#define AOFF_task_next_run 0x00000068 +#define AOFF_task_next_run 0x00000070 #define ASIZ_task_next_run 0x00000008 -#define AOFF_task_prev_run 0x00000070 +#define AOFF_task_prev_run 0x00000078 #define ASIZ_task_prev_run 0x00000008 -#define AOFF_task_task_exclusive 0x00000078 +#define AOFF_task_task_exclusive 0x00000080 #define ASIZ_task_task_exclusive 0x00000004 -#define AOFF_task_binfmt 0x00000080 +#define AOFF_task_binfmt 0x00000088 #define ASIZ_task_binfmt 0x00000008 -#define AOFF_task_exit_code 0x00000088 +#define AOFF_task_exit_code 0x00000090 #define ASIZ_task_exit_code 0x00000004 -#define AOFF_task_exit_signal 0x0000008c +#define AOFF_task_exit_signal 0x00000094 #define ASIZ_task_exit_signal 0x00000004 -#define AOFF_task_pdeath_signal 0x00000090 +#define AOFF_task_pdeath_signal 0x00000098 #define ASIZ_task_pdeath_signal 0x00000004 -#define AOFF_task_personality 0x00000098 +#define AOFF_task_personality 0x000000a0 #define ASIZ_task_personality 0x00000008 -#define AOFF_task_pid 0x000000a4 +#define AOFF_task_pid 0x000000ac #define ASIZ_task_pid 0x00000004 -#define AOFF_task_pgrp 0x000000a8 +#define AOFF_task_pgrp 0x000000b0 #define ASIZ_task_pgrp 0x00000004 -#define AOFF_task_tty_old_pgrp 0x000000ac +#define AOFF_task_tty_old_pgrp 0x000000b4 #define ASIZ_task_tty_old_pgrp 0x00000004 -#define AOFF_task_session 0x000000b0 +#define AOFF_task_session 0x000000b8 #define ASIZ_task_session 0x00000004 -#define AOFF_task_leader 0x000000b4 +#define AOFF_task_leader 0x000000bc #define ASIZ_task_leader 0x00000004 -#define AOFF_task_p_opptr 0x000000b8 +#define AOFF_task_p_opptr 0x000000c0 #define ASIZ_task_p_opptr 0x00000008 -#define AOFF_task_p_pptr 0x000000c0 +#define AOFF_task_p_pptr 0x000000c8 #define ASIZ_task_p_pptr 0x00000008 -#define AOFF_task_p_cptr 0x000000c8 +#define AOFF_task_p_cptr 0x000000d0 #define ASIZ_task_p_cptr 0x00000008 -#define AOFF_task_p_ysptr 0x000000d0 +#define AOFF_task_p_ysptr 0x000000d8 #define ASIZ_task_p_ysptr 0x00000008 -#define AOFF_task_p_osptr 0x000000d8 +#define AOFF_task_p_osptr 0x000000e0 #define ASIZ_task_p_osptr 0x00000008 -#define AOFF_task_pidhash_next 0x000000e0 +#define AOFF_task_pidhash_next 0x000000e8 #define ASIZ_task_pidhash_next 0x00000008 -#define AOFF_task_pidhash_pprev 0x000000e8 +#define AOFF_task_pidhash_pprev 0x000000f0 #define ASIZ_task_pidhash_pprev 0x00000008 -#define AOFF_task_tarray_ptr 0x000000f0 +#define AOFF_task_tarray_ptr 0x000000f8 #define ASIZ_task_tarray_ptr 0x00000008 -#define AOFF_task_wait_chldexit 0x000000f8 +#define AOFF_task_wait_chldexit 0x00000100 #define ASIZ_task_wait_chldexit 0x00000008 -#define AOFF_task_vfork_sem 0x00000100 +#define AOFF_task_vfork_sem 0x00000108 #define ASIZ_task_vfork_sem 0x00000008 -#define AOFF_task_policy 0x00000108 +#define AOFF_task_policy 0x00000110 #define ASIZ_task_policy 0x00000008 -#define AOFF_task_rt_priority 0x00000110 +#define AOFF_task_rt_priority 0x00000118 #define ASIZ_task_rt_priority 0x00000008 -#define AOFF_task_it_real_value 0x00000118 +#define AOFF_task_it_real_value 0x00000120 #define ASIZ_task_it_real_value 0x00000008 -#define AOFF_task_it_prof_value 0x00000120 +#define AOFF_task_it_prof_value 0x00000128 #define ASIZ_task_it_prof_value 0x00000008 -#define AOFF_task_it_virt_value 0x00000128 +#define AOFF_task_it_virt_value 0x00000130 #define ASIZ_task_it_virt_value 0x00000008 -#define AOFF_task_it_real_incr 0x00000130 +#define AOFF_task_it_real_incr 0x00000138 #define ASIZ_task_it_real_incr 0x00000008 -#define AOFF_task_it_prof_incr 0x00000138 +#define AOFF_task_it_prof_incr 0x00000140 #define ASIZ_task_it_prof_incr 0x00000008 -#define AOFF_task_it_virt_incr 0x00000140 +#define AOFF_task_it_virt_incr 0x00000148 #define ASIZ_task_it_virt_incr 0x00000008 -#define AOFF_task_real_timer 0x00000148 +#define AOFF_task_real_timer 0x00000150 #define ASIZ_task_real_timer 0x00000028 -#define AOFF_task_times 0x00000170 +#define AOFF_task_times 0x00000178 #define ASIZ_task_times 0x00000020 -#define AOFF_task_start_time 0x00000190 +#define AOFF_task_start_time 0x00000198 #define ASIZ_task_start_time 0x00000008 -#define AOFF_task_per_cpu_utime 0x00000198 +#define AOFF_task_per_cpu_utime 0x000001a0 #define ASIZ_task_per_cpu_utime 0x00000008 -#define AOFF_task_min_flt 0x000001a8 +#define AOFF_task_min_flt 0x000001b0 #define ASIZ_task_min_flt 0x00000008 -#define AOFF_task_maj_flt 0x000001b0 +#define AOFF_task_maj_flt 0x000001b8 #define ASIZ_task_maj_flt 0x00000008 -#define AOFF_task_nswap 0x000001b8 +#define AOFF_task_nswap 0x000001c0 #define ASIZ_task_nswap 0x00000008 -#define AOFF_task_cmin_flt 0x000001c0 +#define AOFF_task_cmin_flt 0x000001c8 #define ASIZ_task_cmin_flt 0x00000008 -#define AOFF_task_cmaj_flt 0x000001c8 +#define AOFF_task_cmaj_flt 0x000001d0 #define ASIZ_task_cmaj_flt 0x00000008 -#define AOFF_task_cnswap 0x000001d0 +#define AOFF_task_cnswap 0x000001d8 #define ASIZ_task_cnswap 0x00000008 -#define AOFF_task_uid 0x000001dc +#define AOFF_task_uid 0x000001e4 #define ASIZ_task_uid 0x00000004 -#define AOFF_task_euid 0x000001e0 +#define AOFF_task_euid 0x000001e8 #define ASIZ_task_euid 0x00000004 -#define AOFF_task_suid 0x000001e4 +#define AOFF_task_suid 0x000001ec #define ASIZ_task_suid 0x00000004 -#define AOFF_task_fsuid 0x000001e8 +#define AOFF_task_fsuid 0x000001f0 #define ASIZ_task_fsuid 0x00000004 -#define AOFF_task_gid 0x000001ec +#define AOFF_task_gid 0x000001f4 #define ASIZ_task_gid 0x00000004 -#define AOFF_task_egid 0x000001f0 +#define AOFF_task_egid 0x000001f8 #define ASIZ_task_egid 0x00000004 -#define AOFF_task_sgid 0x000001f4 +#define AOFF_task_sgid 0x000001fc #define ASIZ_task_sgid 0x00000004 -#define AOFF_task_fsgid 0x000001f8 +#define AOFF_task_fsgid 0x00000200 #define ASIZ_task_fsgid 0x00000004 -#define AOFF_task_ngroups 0x000001fc +#define AOFF_task_ngroups 0x00000204 #define ASIZ_task_ngroups 0x00000004 -#define AOFF_task_groups 0x00000200 +#define AOFF_task_groups 0x00000208 #define ASIZ_task_groups 0x00000080 -#define AOFF_task_cap_effective 0x00000280 +#define AOFF_task_cap_effective 0x00000288 #define ASIZ_task_cap_effective 0x00000004 -#define AOFF_task_cap_inheritable 0x00000284 +#define AOFF_task_cap_inheritable 0x0000028c #define ASIZ_task_cap_inheritable 0x00000004 -#define AOFF_task_cap_permitted 0x00000288 +#define AOFF_task_cap_permitted 0x00000290 #define ASIZ_task_cap_permitted 0x00000004 -#define AOFF_task_user 0x00000290 +#define AOFF_task_user 0x00000298 #define ASIZ_task_user 0x00000008 -#define AOFF_task_rlim 0x00000298 +#define AOFF_task_rlim 0x000002a0 #define ASIZ_task_rlim 0x000000a0 -#define AOFF_task_used_math 0x00000338 +#define AOFF_task_used_math 0x00000340 #define ASIZ_task_used_math 0x00000002 -#define AOFF_task_comm 0x0000033a +#define AOFF_task_comm 0x00000342 #define ASIZ_task_comm 0x00000010 -#define AOFF_task_link_count 0x0000034c +#define AOFF_task_link_count 0x00000354 #define ASIZ_task_link_count 0x00000004 -#define AOFF_task_tty 0x00000350 +#define AOFF_task_tty 0x00000358 #define ASIZ_task_tty 0x00000008 -#define AOFF_task_semundo 0x00000358 +#define AOFF_task_semundo 0x00000360 #define ASIZ_task_semundo 0x00000008 -#define AOFF_task_semsleeping 0x00000360 +#define AOFF_task_semsleeping 0x00000368 #define ASIZ_task_semsleeping 0x00000008 #define AOFF_task_tss 0x00000370 #define ASIZ_task_tss 0x00000470 @@ -320,147 +322,149 @@ #define ASIZ_task_exec_domain 0x00000008 #define AOFF_task_need_resched 0x00000028 #define ASIZ_task_need_resched 0x00000008 -#define AOFF_task_counter 0x00000030 +#define AOFF_task_ptrace 0x00000030 +#define ASIZ_task_ptrace 0x00000008 +#define AOFF_task_counter 0x00000038 #define ASIZ_task_counter 0x00000008 -#define AOFF_task_priority 0x00000038 +#define AOFF_task_priority 0x00000040 #define ASIZ_task_priority 0x00000008 -#define AOFF_task_avg_slice 0x00000040 +#define AOFF_task_avg_slice 0x00000048 #define ASIZ_task_avg_slice 0x00000008 -#define AOFF_task_has_cpu 0x00000048 +#define AOFF_task_has_cpu 0x00000050 #define ASIZ_task_has_cpu 0x00000004 -#define AOFF_task_processor 0x0000004c +#define AOFF_task_processor 0x00000054 #define ASIZ_task_processor 0x00000004 -#define AOFF_task_last_processor 0x00000050 +#define AOFF_task_last_processor 0x00000058 #define ASIZ_task_last_processor 0x00000004 -#define AOFF_task_lock_depth 0x00000054 +#define AOFF_task_lock_depth 0x0000005c #define ASIZ_task_lock_depth 0x00000004 -#define AOFF_task_next_task 0x00000058 +#define AOFF_task_next_task 0x00000060 #define ASIZ_task_next_task 0x00000008 -#define AOFF_task_prev_task 0x00000060 +#define AOFF_task_prev_task 0x00000068 #define ASIZ_task_prev_task 0x00000008 -#define AOFF_task_next_run 0x00000068 +#define AOFF_task_next_run 0x00000070 #define ASIZ_task_next_run 0x00000008 -#define AOFF_task_prev_run 0x00000070 +#define AOFF_task_prev_run 0x00000078 #define ASIZ_task_prev_run 0x00000008 -#define AOFF_task_task_exclusive 0x00000078 +#define AOFF_task_task_exclusive 0x00000080 #define ASIZ_task_task_exclusive 0x00000004 -#define AOFF_task_binfmt 0x00000080 +#define AOFF_task_binfmt 0x00000088 #define ASIZ_task_binfmt 0x00000008 -#define AOFF_task_exit_code 0x00000088 +#define AOFF_task_exit_code 0x00000090 #define ASIZ_task_exit_code 0x00000004 -#define AOFF_task_exit_signal 0x0000008c +#define AOFF_task_exit_signal 0x00000094 #define ASIZ_task_exit_signal 0x00000004 -#define AOFF_task_pdeath_signal 0x00000090 +#define AOFF_task_pdeath_signal 0x00000098 #define ASIZ_task_pdeath_signal 0x00000004 -#define AOFF_task_personality 0x00000098 +#define AOFF_task_personality 0x000000a0 #define ASIZ_task_personality 0x00000008 -#define AOFF_task_pid 0x000000a4 +#define AOFF_task_pid 0x000000ac #define ASIZ_task_pid 0x00000004 -#define AOFF_task_pgrp 0x000000a8 +#define AOFF_task_pgrp 0x000000b0 #define ASIZ_task_pgrp 0x00000004 -#define AOFF_task_tty_old_pgrp 0x000000ac +#define AOFF_task_tty_old_pgrp 0x000000b4 #define ASIZ_task_tty_old_pgrp 0x00000004 -#define AOFF_task_session 0x000000b0 +#define AOFF_task_session 0x000000b8 #define ASIZ_task_session 0x00000004 -#define AOFF_task_leader 0x000000b4 +#define AOFF_task_leader 0x000000bc #define ASIZ_task_leader 0x00000004 -#define AOFF_task_p_opptr 0x000000b8 +#define AOFF_task_p_opptr 0x000000c0 #define ASIZ_task_p_opptr 0x00000008 -#define AOFF_task_p_pptr 0x000000c0 +#define AOFF_task_p_pptr 0x000000c8 #define ASIZ_task_p_pptr 0x00000008 -#define AOFF_task_p_cptr 0x000000c8 +#define AOFF_task_p_cptr 0x000000d0 #define ASIZ_task_p_cptr 0x00000008 -#define AOFF_task_p_ysptr 0x000000d0 +#define AOFF_task_p_ysptr 0x000000d8 #define ASIZ_task_p_ysptr 0x00000008 -#define AOFF_task_p_osptr 0x000000d8 +#define AOFF_task_p_osptr 0x000000e0 #define ASIZ_task_p_osptr 0x00000008 -#define AOFF_task_pidhash_next 0x000000e0 +#define AOFF_task_pidhash_next 0x000000e8 #define ASIZ_task_pidhash_next 0x00000008 -#define AOFF_task_pidhash_pprev 0x000000e8 +#define AOFF_task_pidhash_pprev 0x000000f0 #define ASIZ_task_pidhash_pprev 0x00000008 -#define AOFF_task_tarray_ptr 0x000000f0 +#define AOFF_task_tarray_ptr 0x000000f8 #define ASIZ_task_tarray_ptr 0x00000008 -#define AOFF_task_wait_chldexit 0x000000f8 +#define AOFF_task_wait_chldexit 0x00000100 #define ASIZ_task_wait_chldexit 0x00000008 -#define AOFF_task_vfork_sem 0x00000100 +#define AOFF_task_vfork_sem 0x00000108 #define ASIZ_task_vfork_sem 0x00000008 -#define AOFF_task_policy 0x00000108 +#define AOFF_task_policy 0x00000110 #define ASIZ_task_policy 0x00000008 -#define AOFF_task_rt_priority 0x00000110 +#define AOFF_task_rt_priority 0x00000118 #define ASIZ_task_rt_priority 0x00000008 -#define AOFF_task_it_real_value 0x00000118 +#define AOFF_task_it_real_value 0x00000120 #define ASIZ_task_it_real_value 0x00000008 -#define AOFF_task_it_prof_value 0x00000120 +#define AOFF_task_it_prof_value 0x00000128 #define ASIZ_task_it_prof_value 0x00000008 -#define AOFF_task_it_virt_value 0x00000128 +#define AOFF_task_it_virt_value 0x00000130 #define ASIZ_task_it_virt_value 0x00000008 -#define AOFF_task_it_real_incr 0x00000130 +#define AOFF_task_it_real_incr 0x00000138 #define ASIZ_task_it_real_incr 0x00000008 -#define AOFF_task_it_prof_incr 0x00000138 +#define AOFF_task_it_prof_incr 0x00000140 #define ASIZ_task_it_prof_incr 0x00000008 -#define AOFF_task_it_virt_incr 0x00000140 +#define AOFF_task_it_virt_incr 0x00000148 #define ASIZ_task_it_virt_incr 0x00000008 -#define AOFF_task_real_timer 0x00000148 +#define AOFF_task_real_timer 0x00000150 #define ASIZ_task_real_timer 0x00000028 -#define AOFF_task_times 0x00000170 +#define AOFF_task_times 0x00000178 #define ASIZ_task_times 0x00000020 -#define AOFF_task_start_time 0x00000190 +#define AOFF_task_start_time 0x00000198 #define ASIZ_task_start_time 0x00000008 -#define AOFF_task_per_cpu_utime 0x00000198 +#define AOFF_task_per_cpu_utime 0x000001a0 #define ASIZ_task_per_cpu_utime 0x00000100 -#define AOFF_task_min_flt 0x00000398 +#define AOFF_task_min_flt 0x000003a0 #define ASIZ_task_min_flt 0x00000008 -#define AOFF_task_maj_flt 0x000003a0 +#define AOFF_task_maj_flt 0x000003a8 #define ASIZ_task_maj_flt 0x00000008 -#define AOFF_task_nswap 0x000003a8 +#define AOFF_task_nswap 0x000003b0 #define ASIZ_task_nswap 0x00000008 -#define AOFF_task_cmin_flt 0x000003b0 +#define AOFF_task_cmin_flt 0x000003b8 #define ASIZ_task_cmin_flt 0x00000008 -#define AOFF_task_cmaj_flt 0x000003b8 +#define AOFF_task_cmaj_flt 0x000003c0 #define ASIZ_task_cmaj_flt 0x00000008 -#define AOFF_task_cnswap 0x000003c0 +#define AOFF_task_cnswap 0x000003c8 #define ASIZ_task_cnswap 0x00000008 -#define AOFF_task_uid 0x000003cc +#define AOFF_task_uid 0x000003d4 #define ASIZ_task_uid 0x00000004 -#define AOFF_task_euid 0x000003d0 +#define AOFF_task_euid 0x000003d8 #define ASIZ_task_euid 0x00000004 -#define AOFF_task_suid 0x000003d4 +#define AOFF_task_suid 0x000003dc #define ASIZ_task_suid 0x00000004 -#define AOFF_task_fsuid 0x000003d8 +#define AOFF_task_fsuid 0x000003e0 #define ASIZ_task_fsuid 0x00000004 -#define AOFF_task_gid 0x000003dc +#define AOFF_task_gid 0x000003e4 #define ASIZ_task_gid 0x00000004 -#define AOFF_task_egid 0x000003e0 +#define AOFF_task_egid 0x000003e8 #define ASIZ_task_egid 0x00000004 -#define AOFF_task_sgid 0x000003e4 +#define AOFF_task_sgid 0x000003ec #define ASIZ_task_sgid 0x00000004 -#define AOFF_task_fsgid 0x000003e8 +#define AOFF_task_fsgid 0x000003f0 #define ASIZ_task_fsgid 0x00000004 -#define AOFF_task_ngroups 0x000003ec +#define AOFF_task_ngroups 0x000003f4 #define ASIZ_task_ngroups 0x00000004 -#define AOFF_task_groups 0x000003f0 +#define AOFF_task_groups 0x000003f8 #define ASIZ_task_groups 0x00000080 -#define AOFF_task_cap_effective 0x00000470 +#define AOFF_task_cap_effective 0x00000478 #define ASIZ_task_cap_effective 0x00000004 -#define AOFF_task_cap_inheritable 0x00000474 +#define AOFF_task_cap_inheritable 0x0000047c #define ASIZ_task_cap_inheritable 0x00000004 -#define AOFF_task_cap_permitted 0x00000478 +#define AOFF_task_cap_permitted 0x00000480 #define ASIZ_task_cap_permitted 0x00000004 -#define AOFF_task_user 0x00000480 +#define AOFF_task_user 0x00000488 #define ASIZ_task_user 0x00000008 -#define AOFF_task_rlim 0x00000488 +#define AOFF_task_rlim 0x00000490 #define ASIZ_task_rlim 0x000000a0 -#define AOFF_task_used_math 0x00000528 +#define AOFF_task_used_math 0x00000530 #define ASIZ_task_used_math 0x00000002 -#define AOFF_task_comm 0x0000052a +#define AOFF_task_comm 0x00000532 #define ASIZ_task_comm 0x00000010 -#define AOFF_task_link_count 0x0000053c +#define AOFF_task_link_count 0x00000544 #define ASIZ_task_link_count 0x00000004 -#define AOFF_task_tty 0x00000540 +#define AOFF_task_tty 0x00000548 #define ASIZ_task_tty 0x00000008 -#define AOFF_task_semundo 0x00000548 +#define AOFF_task_semundo 0x00000550 #define ASIZ_task_semundo 0x00000008 -#define AOFF_task_semsleeping 0x00000550 +#define AOFF_task_semsleeping 0x00000558 #define ASIZ_task_semsleeping 0x00000008 #define AOFF_task_tss 0x00000560 #define ASIZ_task_tss 0x00000470 @@ -620,147 +624,149 @@ #define ASIZ_task_exec_domain 0x00000008 #define AOFF_task_need_resched 0x00000028 #define ASIZ_task_need_resched 0x00000008 -#define AOFF_task_counter 0x00000030 +#define AOFF_task_ptrace 0x00000030 +#define ASIZ_task_ptrace 0x00000008 +#define AOFF_task_counter 0x00000038 #define ASIZ_task_counter 0x00000008 -#define AOFF_task_priority 0x00000038 +#define AOFF_task_priority 0x00000040 #define ASIZ_task_priority 0x00000008 -#define AOFF_task_avg_slice 0x00000040 +#define AOFF_task_avg_slice 0x00000048 #define ASIZ_task_avg_slice 0x00000008 -#define AOFF_task_has_cpu 0x00000048 +#define AOFF_task_has_cpu 0x00000050 #define ASIZ_task_has_cpu 0x00000004 -#define AOFF_task_processor 0x0000004c +#define AOFF_task_processor 0x00000054 #define ASIZ_task_processor 0x00000004 -#define AOFF_task_last_processor 0x00000050 +#define AOFF_task_last_processor 0x00000058 #define ASIZ_task_last_processor 0x00000004 -#define AOFF_task_lock_depth 0x00000054 +#define AOFF_task_lock_depth 0x0000005c #define ASIZ_task_lock_depth 0x00000004 -#define AOFF_task_next_task 0x00000058 +#define AOFF_task_next_task 0x00000060 #define ASIZ_task_next_task 0x00000008 -#define AOFF_task_prev_task 0x00000060 +#define AOFF_task_prev_task 0x00000068 #define ASIZ_task_prev_task 0x00000008 -#define AOFF_task_next_run 0x00000068 +#define AOFF_task_next_run 0x00000070 #define ASIZ_task_next_run 0x00000008 -#define AOFF_task_prev_run 0x00000070 +#define AOFF_task_prev_run 0x00000078 #define ASIZ_task_prev_run 0x00000008 -#define AOFF_task_task_exclusive 0x00000078 +#define AOFF_task_task_exclusive 0x00000080 #define ASIZ_task_task_exclusive 0x00000004 -#define AOFF_task_binfmt 0x00000080 +#define AOFF_task_binfmt 0x00000088 #define ASIZ_task_binfmt 0x00000008 -#define AOFF_task_exit_code 0x00000088 +#define AOFF_task_exit_code 0x00000090 #define ASIZ_task_exit_code 0x00000004 -#define AOFF_task_exit_signal 0x0000008c +#define AOFF_task_exit_signal 0x00000094 #define ASIZ_task_exit_signal 0x00000004 -#define AOFF_task_pdeath_signal 0x00000090 +#define AOFF_task_pdeath_signal 0x00000098 #define ASIZ_task_pdeath_signal 0x00000004 -#define AOFF_task_personality 0x00000098 +#define AOFF_task_personality 0x000000a0 #define ASIZ_task_personality 0x00000008 -#define AOFF_task_pid 0x000000a4 +#define AOFF_task_pid 0x000000ac #define ASIZ_task_pid 0x00000004 -#define AOFF_task_pgrp 0x000000a8 +#define AOFF_task_pgrp 0x000000b0 #define ASIZ_task_pgrp 0x00000004 -#define AOFF_task_tty_old_pgrp 0x000000ac +#define AOFF_task_tty_old_pgrp 0x000000b4 #define ASIZ_task_tty_old_pgrp 0x00000004 -#define AOFF_task_session 0x000000b0 +#define AOFF_task_session 0x000000b8 #define ASIZ_task_session 0x00000004 -#define AOFF_task_leader 0x000000b4 +#define AOFF_task_leader 0x000000bc #define ASIZ_task_leader 0x00000004 -#define AOFF_task_p_opptr 0x000000b8 +#define AOFF_task_p_opptr 0x000000c0 #define ASIZ_task_p_opptr 0x00000008 -#define AOFF_task_p_pptr 0x000000c0 +#define AOFF_task_p_pptr 0x000000c8 #define ASIZ_task_p_pptr 0x00000008 -#define AOFF_task_p_cptr 0x000000c8 +#define AOFF_task_p_cptr 0x000000d0 #define ASIZ_task_p_cptr 0x00000008 -#define AOFF_task_p_ysptr 0x000000d0 +#define AOFF_task_p_ysptr 0x000000d8 #define ASIZ_task_p_ysptr 0x00000008 -#define AOFF_task_p_osptr 0x000000d8 +#define AOFF_task_p_osptr 0x000000e0 #define ASIZ_task_p_osptr 0x00000008 -#define AOFF_task_pidhash_next 0x000000e0 +#define AOFF_task_pidhash_next 0x000000e8 #define ASIZ_task_pidhash_next 0x00000008 -#define AOFF_task_pidhash_pprev 0x000000e8 +#define AOFF_task_pidhash_pprev 0x000000f0 #define ASIZ_task_pidhash_pprev 0x00000008 -#define AOFF_task_tarray_ptr 0x000000f0 +#define AOFF_task_tarray_ptr 0x000000f8 #define ASIZ_task_tarray_ptr 0x00000008 -#define AOFF_task_wait_chldexit 0x000000f8 +#define AOFF_task_wait_chldexit 0x00000100 #define ASIZ_task_wait_chldexit 0x00000008 -#define AOFF_task_vfork_sem 0x00000100 +#define AOFF_task_vfork_sem 0x00000108 #define ASIZ_task_vfork_sem 0x00000008 -#define AOFF_task_policy 0x00000108 +#define AOFF_task_policy 0x00000110 #define ASIZ_task_policy 0x00000008 -#define AOFF_task_rt_priority 0x00000110 +#define AOFF_task_rt_priority 0x00000118 #define ASIZ_task_rt_priority 0x00000008 -#define AOFF_task_it_real_value 0x00000118 +#define AOFF_task_it_real_value 0x00000120 #define ASIZ_task_it_real_value 0x00000008 -#define AOFF_task_it_prof_value 0x00000120 +#define AOFF_task_it_prof_value 0x00000128 #define ASIZ_task_it_prof_value 0x00000008 -#define AOFF_task_it_virt_value 0x00000128 +#define AOFF_task_it_virt_value 0x00000130 #define ASIZ_task_it_virt_value 0x00000008 -#define AOFF_task_it_real_incr 0x00000130 +#define AOFF_task_it_real_incr 0x00000138 #define ASIZ_task_it_real_incr 0x00000008 -#define AOFF_task_it_prof_incr 0x00000138 +#define AOFF_task_it_prof_incr 0x00000140 #define ASIZ_task_it_prof_incr 0x00000008 -#define AOFF_task_it_virt_incr 0x00000140 +#define AOFF_task_it_virt_incr 0x00000148 #define ASIZ_task_it_virt_incr 0x00000008 -#define AOFF_task_real_timer 0x00000148 +#define AOFF_task_real_timer 0x00000150 #define ASIZ_task_real_timer 0x00000028 -#define AOFF_task_times 0x00000170 +#define AOFF_task_times 0x00000178 #define ASIZ_task_times 0x00000020 -#define AOFF_task_start_time 0x00000190 +#define AOFF_task_start_time 0x00000198 #define ASIZ_task_start_time 0x00000008 -#define AOFF_task_per_cpu_utime 0x00000198 +#define AOFF_task_per_cpu_utime 0x000001a0 #define ASIZ_task_per_cpu_utime 0x00000100 -#define AOFF_task_min_flt 0x00000398 +#define AOFF_task_min_flt 0x000003a0 #define ASIZ_task_min_flt 0x00000008 -#define AOFF_task_maj_flt 0x000003a0 +#define AOFF_task_maj_flt 0x000003a8 #define ASIZ_task_maj_flt 0x00000008 -#define AOFF_task_nswap 0x000003a8 +#define AOFF_task_nswap 0x000003b0 #define ASIZ_task_nswap 0x00000008 -#define AOFF_task_cmin_flt 0x000003b0 +#define AOFF_task_cmin_flt 0x000003b8 #define ASIZ_task_cmin_flt 0x00000008 -#define AOFF_task_cmaj_flt 0x000003b8 +#define AOFF_task_cmaj_flt 0x000003c0 #define ASIZ_task_cmaj_flt 0x00000008 -#define AOFF_task_cnswap 0x000003c0 +#define AOFF_task_cnswap 0x000003c8 #define ASIZ_task_cnswap 0x00000008 -#define AOFF_task_uid 0x000003cc +#define AOFF_task_uid 0x000003d4 #define ASIZ_task_uid 0x00000004 -#define AOFF_task_euid 0x000003d0 +#define AOFF_task_euid 0x000003d8 #define ASIZ_task_euid 0x00000004 -#define AOFF_task_suid 0x000003d4 +#define AOFF_task_suid 0x000003dc #define ASIZ_task_suid 0x00000004 -#define AOFF_task_fsuid 0x000003d8 +#define AOFF_task_fsuid 0x000003e0 #define ASIZ_task_fsuid 0x00000004 -#define AOFF_task_gid 0x000003dc +#define AOFF_task_gid 0x000003e4 #define ASIZ_task_gid 0x00000004 -#define AOFF_task_egid 0x000003e0 +#define AOFF_task_egid 0x000003e8 #define ASIZ_task_egid 0x00000004 -#define AOFF_task_sgid 0x000003e4 +#define AOFF_task_sgid 0x000003ec #define ASIZ_task_sgid 0x00000004 -#define AOFF_task_fsgid 0x000003e8 +#define AOFF_task_fsgid 0x000003f0 #define ASIZ_task_fsgid 0x00000004 -#define AOFF_task_ngroups 0x000003ec +#define AOFF_task_ngroups 0x000003f4 #define ASIZ_task_ngroups 0x00000004 -#define AOFF_task_groups 0x000003f0 +#define AOFF_task_groups 0x000003f8 #define ASIZ_task_groups 0x00000080 -#define AOFF_task_cap_effective 0x00000470 +#define AOFF_task_cap_effective 0x00000478 #define ASIZ_task_cap_effective 0x00000004 -#define AOFF_task_cap_inheritable 0x00000474 +#define AOFF_task_cap_inheritable 0x0000047c #define ASIZ_task_cap_inheritable 0x00000004 -#define AOFF_task_cap_permitted 0x00000478 +#define AOFF_task_cap_permitted 0x00000480 #define ASIZ_task_cap_permitted 0x00000004 -#define AOFF_task_user 0x00000480 +#define AOFF_task_user 0x00000488 #define ASIZ_task_user 0x00000008 -#define AOFF_task_rlim 0x00000488 +#define AOFF_task_rlim 0x00000490 #define ASIZ_task_rlim 0x000000a0 -#define AOFF_task_used_math 0x00000528 +#define AOFF_task_used_math 0x00000530 #define ASIZ_task_used_math 0x00000002 -#define AOFF_task_comm 0x0000052a +#define AOFF_task_comm 0x00000532 #define ASIZ_task_comm 0x00000010 -#define AOFF_task_link_count 0x0000053c +#define AOFF_task_link_count 0x00000544 #define ASIZ_task_link_count 0x00000004 -#define AOFF_task_tty 0x00000540 +#define AOFF_task_tty 0x00000548 #define ASIZ_task_tty 0x00000008 -#define AOFF_task_semundo 0x00000548 +#define AOFF_task_semundo 0x00000550 #define ASIZ_task_semundo 0x00000008 -#define AOFF_task_semsleeping 0x00000550 +#define AOFF_task_semsleeping 0x00000558 #define ASIZ_task_semsleeping 0x00000008 #define AOFF_task_tss 0x00000560 #define ASIZ_task_tss 0x00000470 diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 909d687e28aa..6a4639e9ff09 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h @@ -32,6 +32,8 @@ struct linux_binprm{ int priv_change; }; +struct file; + /* * This structure defines the functions that are used to load the binary formats that * linux accepts. @@ -41,9 +43,11 @@ struct linux_binfmt { struct module *module; int (*load_binary)(struct linux_binprm *, struct pt_regs * regs); int (*load_shlib)(int fd); - int (*core_dump)(long signr, struct pt_regs * regs); + int (*core_dump)(long signr, struct pt_regs * regs, struct file *file); + unsigned long min_coredump; }; +extern int do_coredump(long, struct pt_regs *); extern int register_binfmt(struct linux_binfmt *); extern int unregister_binfmt(struct linux_binfmt *); diff --git a/include/linux/fd.h b/include/linux/fd.h index c0ed2792ba8b..04701c645715 100644 --- a/include/linux/fd.h +++ b/include/linux/fd.h @@ -216,8 +216,8 @@ struct floppy_drive_struct { /* Prevent "aliased" accesses. */ int fd_ref; int fd_device; - unsigned long last_checked; /* when was the drive last checked for a disk - * change? */ + unsigned long last_checked; /* when was the drive last checked + * for a disk change? */ char *dmabuf; int bufblocks; diff --git a/include/linux/tty.h b/include/linux/tty.h index 161bac4c2682..ff3bbfaefb2b 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -364,6 +364,8 @@ extern int riscom8_init(void); extern int specialix_init(void); extern int espserial_init(void); extern int macserial_init(void); +extern int mgsl_init(void); +extern int n_hdlc_init(void); extern int tty_paranoia_check(struct tty_struct *tty, kdev_t device, const char *routine); diff --git a/mm/swapfile.c b/mm/swapfile.c index ac3949768cbd..cd8b01288517 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -448,7 +448,7 @@ int get_swaparea_info(char *buf) len += sprintf(buf, "Filename\t\t\tType\t\tSize\tUsed\tPriority\n"); for (i = 0 ; i < nr_swapfiles ; i++, ptr++) { - if (ptr->flags & SWP_USED) { + if ((ptr->flags & SWP_USED) && ptr->swap_map) { char * path = d_path(ptr->swap_file, page, PAGE_SIZE); len += sprintf(buf + len, "%-31s ", path); diff --git a/net/core/dev.c b/net/core/dev.c index adfaae99d74a..26804821354d 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2105,7 +2105,7 @@ __initfunc(int net_dev_init(void)) #ifdef CONFIG_PC300 cpc_init(); #endif -#ifdef CONFIG_HDLC +#ifdef CONFIG_SYNCPPP sync_ppp_init(); #endif diff --git a/net/core/sock.c b/net/core/sock.c index e7d6067e7f8a..8a61c9e384c1 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -7,7 +7,7 @@ * handler for protocols to use and generic option handler. * * - * Version: $Id: sock.c,v 1.80.2.4 2001/02/20 04:21:46 davem Exp $ + * Version: $Id: sock.c,v 1.80.2.5 2001/05/11 02:07:23 davem Exp $ * * Authors: Ross Biro, * Fred N. van Kempen, @@ -752,9 +752,11 @@ struct sk_buff *sock_alloc_send_skb(struct sock *sk, unsigned long size, break; try_size = fallback; } - skb = sock_wmalloc(sk, try_size, 0, sk->allocation); + skb = sock_wmalloc_err(sk, try_size, 0, sk->allocation, &err); if (skb) break; + if (err) + goto failure; /* * This means we have too many buffers for this socket already. diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index d9f69c095b89..41ff441940c8 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -877,7 +877,8 @@ static int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) case SIOCGSTAMP: if(sk->stamp.tv_sec==0) return -ENOENT; - err = copy_to_user((void *)arg,&sk->stamp,sizeof(struct timeval)); + err = copy_to_user((void *)arg, &sk->stamp, + sizeof(struct timeval)); if (err) err = -EFAULT; return err; diff --git a/net/ipv4/ip_masq_vdolive.c b/net/ipv4/ip_masq_vdolive.c index 4724e3b93418..bbe5a2e7df06 100644 --- a/net/ipv4/ip_masq_vdolive.c +++ b/net/ipv4/ip_masq_vdolive.c @@ -242,7 +242,7 @@ __initfunc(int ip_masq_vdolive_init(void)) ports[i]))) { return j; } - IP_MASQ_DEBUG(1-debug, "RealAudio: loaded support on port[%d] = %d\n", i, ports[i]); + IP_MASQ_DEBUG(1-debug, "VDOlive: loaded support on port[%d] = %d\n", i, ports[i]); } else { /* To be safe, force the incarnation table entry to NULL */ masq_incarnations[i] = NULL; diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 7d7210a8f91d..ee598527c883 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -5,7 +5,7 @@ * * Implementation of the Transmission Control Protocol(TCP). * - * Version: $Id: tcp_input.c,v 1.164.2.22 2001/04/10 19:58:43 davem Exp $ + * Version: $Id: tcp_input.c,v 1.164.2.25 2001/05/24 22:33:21 davem Exp $ * * Authors: Ross Biro, * Fred N. van Kempen, @@ -1441,8 +1441,8 @@ static void tcp_data_queue(struct sock *sk, struct sk_buff *skb) if (!after(TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt)) { /* A retransmit, 2nd most common case. Force an imediate ack. */ SOCK_DEBUG(sk, "retransmit received: seq %X\n", TCP_SKB_CB(skb)->seq); - tcp_enter_quickack_mode(tp); out_of_window: + tcp_enter_quickack_mode(tp); tp->delayed_acks++; kfree_skb(skb); return; @@ -1538,7 +1538,7 @@ static int tcp_data(struct sk_buff *skb, struct sock *sk, unsigned int len) skb_pull(skb, th->doff*4); skb_trim(skb, len - (th->doff*4)); - if (skb->len == 0 && !th->fin) + if (TCP_SKB_CB(skb)->seq == TCP_SKB_CB(skb)->end_seq) return(0); /* @@ -1961,7 +1961,7 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb, * Dave!!! Phrase above (and all about rcv_mss) has * nothing to do with reality. rcv_mss must measure TOTAL * size, including sacks, IP options etc. Hence, measure_rcv_mss - * must occure before pulling etc, otherwise it will flap + * must occur before pulling etc, otherwise it will flap * like hell. Even putting it before tcp_data is wrong, * it should use skb->tail - skb->nh.raw instead. * --ANK (980805) @@ -2280,10 +2280,8 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, tcp_sync_mss(sk, tp->pmtu_cookie); tp->rcv_mss = tp->mss_cache; - if (sk->state == TCP_SYN_RECV) - goto discard; - - goto step6; + /* Discard data/urg received with SYN. Safety is the first. */ + goto discard; } /* Parse the tcp_options present on this header. @@ -2418,7 +2416,6 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, } else goto discard; -step6: /* step 6: check the URG bit */ tcp_urg(sk, th, len); diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index d404818376ec..b7ed4b6bed1b 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -364,9 +364,23 @@ void ndisc_send_ns(struct device *dev, struct neighbour *neigh, struct nd_msg *msg; int len; int err; + int send_llinfo; + + if (saddr == NULL) { + struct inet6_ifaddr *ifa; + + /* use link local address */ + ifa = ipv6_get_lladdr(dev); + + if (ifa) + saddr = &ifa->addr; + else + return; + } len = sizeof(struct icmp6hdr) + sizeof(struct in6_addr); - if (dev->addr_len) + send_llinfo = dev->addr_len && ipv6_addr_type(saddr) != IPV6_ADDR_ANY; + if (send_llinfo) len += NDISC_OPT_SPACE(dev->addr_len); skb = sock_alloc_send_skb(sk, MAX_HEADER + len + dev->hard_header_len + 15, @@ -376,15 +390,6 @@ void ndisc_send_ns(struct device *dev, struct neighbour *neigh, return; } - if (saddr == NULL) { - struct inet6_ifaddr *ifa; - - /* use link local address */ - ifa = ipv6_get_lladdr(dev); - - if (ifa) - saddr = &ifa->addr; - } if (ndisc_build_ll_hdr(skb, dev, daddr, neigh, len) == 0) { kfree_skb(skb); @@ -402,7 +407,7 @@ void ndisc_send_ns(struct device *dev, struct neighbour *neigh, /* Set the target address. */ ipv6_addr_copy(&msg->target, solicit); - if (dev->addr_len) + if (send_llinfo) ndisc_fill_option((void*)&msg->opt, ND_OPT_SOURCE_LL_ADDR, dev->dev_addr, dev->addr_len); /* checksum */ -- 2.39.5