Import 1.1.431.1.43
authorLinus Torvalds<torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:09:38 +0000 (23 15:09 -0500)
committerLinus Torvalds<torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:09:38 +0000 (23 15:09 -0500)
185 files changed:
CREDITS
Makefile
boot/bootsect.S
boot/setup.S
config.in
drivers/block/cdu31a.c
drivers/block/floppy.c
drivers/block/hd.c
drivers/block/ll_rw_blk.c
drivers/block/mcd.c
drivers/block/ramdisk.c
drivers/block/sbpcd.c
drivers/block/xd.c
drivers/char/atixlmouse.c
drivers/char/busmouse.c
drivers/char/console.c
drivers/char/keyboard.c
drivers/char/lp.c
drivers/char/msbusmouse.c
drivers/char/n_tty.c
drivers/char/psaux.c
drivers/char/pty.c
drivers/char/serial.c
drivers/char/tpqic02.c
drivers/char/tty_io.c
drivers/net/3c501.c
drivers/net/3c503.c
drivers/net/3c505.c
drivers/net/3c507.c
drivers/net/3c509.c
drivers/net/8390.c
drivers/net/8390.h
drivers/net/CONFIG
drivers/net/MODULES
drivers/net/Makefile
drivers/net/README.DLINK
drivers/net/README1.PLIP
drivers/net/README2.PLIP
drivers/net/Space.c
drivers/net/ac3200.c
drivers/net/apricot.c
drivers/net/at1700.c
drivers/net/atp.c
drivers/net/atp.h
drivers/net/auto_irq.c
drivers/net/de600.c
drivers/net/de620.c
drivers/net/de620.h
drivers/net/depca.c
drivers/net/e2100.c
drivers/net/eexpress.c
drivers/net/hp-plus.c
drivers/net/hp.c
drivers/net/lance.c
drivers/net/ne.c
drivers/net/net_init.c
drivers/net/plip.c
drivers/net/ppp.c
drivers/net/sk_g16.c
drivers/net/sk_g16.h
drivers/net/skeleton.c
drivers/net/slhc.c
drivers/net/slhc.h
drivers/net/smc-ultra.c
drivers/net/wd.c
drivers/net/znet.c
drivers/scsi/53c7,8xx.c
drivers/scsi/53c7,8xx.h
drivers/scsi/53c7,8xx.scr
drivers/scsi/53c8xx_d.h
drivers/scsi/ChangeLog
drivers/scsi/NCR5380.c
drivers/scsi/aha152x.c
drivers/scsi/aha1542.c
drivers/scsi/aha1740.c
drivers/scsi/buslogic.c
drivers/scsi/buslogic.h
drivers/scsi/fdomain.c
drivers/scsi/g_NCR5380.c
drivers/scsi/pas16.c
drivers/scsi/scsi.c
drivers/scsi/seagate.c
drivers/scsi/t128.c
drivers/scsi/ultrastor.c
drivers/scsi/wd7000.c
drivers/sound/soundcard.c
fs/dcache.c
fs/devices.c
fs/ext2/CHANGES
fs/ext2/balloc.c
fs/ext2/namei.c
fs/ext2/super.c
fs/hpfs/hpfs.h
fs/hpfs/hpfs_fs.c
fs/isofs/file.c
fs/isofs/inode.c
fs/isofs/rock.c
fs/isofs/rock.h
fs/msdos/mmap.c
fs/nfs/sock.c
fs/proc/array.c
fs/proc/base.c
fs/proc/inode.c
fs/proc/link.c
fs/proc/mem.c
fs/proc/net.c
fs/proc/root.c
fs/sysv/truncate.c
fs/umsdos/README
fs/umsdos/dir.c
fs/umsdos/emd.c
fs/umsdos/file.c
fs/umsdos/inode.c
fs/umsdos/ioctl.c
fs/umsdos/mangle.c
fs/umsdos/namei.c
fs/umsdos/symlink.c
fs/xiafs/xiafs_mac.h
include/asm/bitops.h
include/asm/segment.h
include/asm/string.h
include/linux/cdrom.h
include/linux/cdu31a.h
include/linux/coff.h
include/linux/config.h
include/linux/elf.h
include/linux/ext2_fs.h
include/linux/fd.h
include/linux/fdreg.h
include/linux/fs.h
include/linux/if_ether.h
include/linux/inet.h
include/linux/kd.h
include/linux/msdos_fs_i.h
include/linux/netdevice.h
include/linux/nfs_fs.h
include/linux/nfs_mount.h
include/linux/pci.h
include/linux/ppp.h
include/linux/proc_fs.h
include/linux/route.h
include/linux/sbpcd.h
include/linux/sched.h
include/linux/serial.h
include/linux/serial_reg.h
include/linux/socket.h
include/linux/sockios.h
include/linux/soundcard.h
include/linux/termios.h
include/linux/tpqic02.h
include/linux/tqueue.h
include/linux/tty.h
include/linux/tty_driver.h
include/linux/ultrasound.h
include/linux/umsdos_fs_i.h
kernel/bios32.c
kernel/exec_domain.c
kernel/irq.c
kernel/ksyms.c
kernel/ptrace.c
kernel/sched.c
modules/NET_MODULES
net/inet/Makefile
net/inet/af_inet.c
net/inet/arp.c
net/inet/datagram.c
net/inet/dev.c
net/inet/eth.c
net/inet/icmp.c
net/inet/ip.c
net/inet/ipx.c
net/inet/ipxcall.h
net/inet/p8022call.h
net/inet/packet.c
net/inet/protocol.c
net/inet/sock.c
net/inet/tcp.c
net/inet/tcp.h
net/inet/timer.c
net/inet/udp.c
net/socket.c
net/unix/Makefile
net/unix/unix.h
tools/build.c
zBoot/Makefile

index 2f00332..d0f696d 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -455,6+455,13 @@ S: Gaildorfer Str. 27
 S: 7000 Stuttgart 50
 S: Germany
 
+N: Stephen Rothwell
+E: sfr@pdact.pd.necisa.oz.au
+D: Boot/setup/build work for setup > 2K
+S: 59 Bugden Ave
+S: Gowrie ACT 2904
+S: Australia
+
 N: Robert Sanders
 E: gt8134b@prism.gatech.edu
 D: Dosemu
index a28f268..e7943d4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6+1,6 @@
 VERSION = 1
 PATCHLEVEL = 1
-SUBLEVEL = 42
+SUBLEVEL = 43
 
 all:   Version zImage
 
index 3d319b7..f6a0d31 100644 (file)
@@ -68,8+68,9 @@ _main:
        movsw
        jmpi    go,INITSEG
 
-go:    mov     ax,cs           
-       mov     di,#0x4000-12   ! 0x4000 is arbitrary value >= length of
+! ax and es already contain INITSEG
+
+go:    mov     di,#0x4000-12   ! 0x4000 is arbitrary value >= length of
                                ! bootsect + length of setup + room for stack
                                ! 12 is disk parm size
 
@@ -80,7+81,6 @@ go:   mov     ax,cs
 ! drive table.
 
        mov     ds,ax
-       mov     es,ax
        mov     ss,ax           ! put stack at INITSEG:0x4000-12.
        mov     sp,di
 /*
@@ -100,14+100,15 @@ go:       mov     ax,cs
  *             fs = 0, gs is unused.
  */
 
-       push    #0
-       pop     fs
+! cx contains 0 from rep movsw above
+
+       mov     fs,cx
        mov     bx,#0x78                ! fs:bx is parameter table address
        push    ds
        seg fs
        lds     si,(bx)                 ! ds:si is source
 
-       mov     cx,#6                   ! copy 12 bytes
+       mov     cl,#6                   ! copy 12 bytes
        cld
        push    di
 
@@ -124,19+125,20 @@ go:       mov     ax,cs
        seg fs
        mov     2(bx),es
 
-       xor     ah,ah                   ! reset FDC 
-       xor     dl,dl
-       int     0x13    
-
 ! load the setup-sectors directly after the bootblock.
 ! Note that 'es' is already set up.
+! Also cx is 0 from rep movsw above.
 
 load_setup:
+       xor     ah,ah                   ! reset FDC 
+       xor     dl,dl
+       int     0x13    
+
        xor     dx, dx                  ! drive 0, head 0
-       mov     cx,#0x0002              ! sector 2, track 0
+       mov     cl,#0x02                ! sector 2, track 0
        mov     bx,#0x0200              ! address = 512, in INITSEG
-       mov     ax,#0x0200+SETUPSECS    ! service 2, nr of sectors
-                                       ! (assume all on head 0, track 0)
+       mov     ah,#0x02                ! service 2, nr of sectors
+       mov     al,setup_sects          ! (assume all on head 0, track 0)
        int     0x13                    ! read it
        jnc     ok_load_setup           ! ok - continue
 
@@ -146,9+148,6 @@ load_setup:
        call    print_hex
        pop     ax      
        
-       xor     dl, dl                  ! reset FDC
-       xor     ah, ah
-       int     0x13
        jmp     load_setup
 
 ok_load_setup:
@@ -176,13+175,15 @@ ok_load_setup:
 probe_loop:
        lodsb
        cbw                             ! extend to word
-       seg cs
        mov     sectors, ax
        cmp     si,#disksizes+4
        jae     got_sectors             ! if all else fails, try 9
        xchg    ax, cx                  ! cx = track and sector
        xor     dx, dx                  ! drive 0, head 0
-       mov     bx,#0x0200+SETUPSECS*0x200  ! address after setup (es = cs)
+       xor     bl, bl
+       mov     bh,setup_sects
+       inc     bh
+       shl     bh,#1                   ! address after setup (es = cs)
        mov     ax,#0x0201              ! service 2, 1 sector
        int     0x13
        jc      probe_loop              ! try next value
@@ -254,11+255,14 @@ root_defined:
 !
 ! in:  es - starting address segment (normally 0x1000)
 !
-sread: .word 1+SETUPSECS       ! sectors read of current track
+sread: .word 0                 ! sectors read of current track
 head:  .word 0                 ! current head
 track: .word 0                 ! current track
 
 read_it:
+       mov     al,setup_sects
+       inc     al
+       mov     sread,al
        mov ax,es
        test ax,#0x0fff
 die:   jne die                 ! es must be at 64kB boundary
@@ -270,7+274,6 @@ rp_read:
        jbe ok1_read
        ret
 ok1_read:
-       seg cs
        mov ax,sectors
        sub ax,sread
        mov cx,ax
@@ -285,7+288,6 @@ ok2_read:
        call read_track
        mov cx,ax
        add ax,sread
-       seg cs
        cmp ax,sectors
        jne ok3_read
        mov ax,#1
@@ -439,7+441,9 @@ msg1:
        .byte 13,10
        .ascii "Loading"
 
-.org 498
+.org 497
+setup_sects:
+       .byte SETUPSECS
 root_flags:
        .word CONFIG_ROOT_RDONLY
 syssize:
index e584bc2..02bf897 100644 (file)
 #define SVGA_MODE ASK_VGA
 #endif
 
+! Signature words to ensure LILO loaded us right
+#define SIG1   0xAA55
+#define SIG2   0x5A5A
+
 INITSEG  = DEF_INITSEG ! we move boot here - out of the way
 SYSSEG   = DEF_SYSSEG  ! system loaded at 0x10000 (65536).
 SETUPSEG = DEF_SETUPSEG        ! this is the current segment
@@ -41,11+45,86 @@ begbss:
 
 entry start
 start:
+! Check signature at end of setup
+       mov     ax,#SETUPSEG
+       mov     ds,ax
+       cmp     setup_sig1,#SIG1
+       jne     bad_sig
+       cmp     setup_sig2,#SIG2
+       jne     bad_sig
+       jmp     good_sig1
+
+! Routine to print asciiz-string at DS:SI
+
+prtstr:        lodsb
+       and     al,al
+       jz      fin
+       call    prnt1
+       jmp     prtstr
+fin:   ret
+
+! Part of above routine, this one just prints ascii al
+
+prnt1: push    ax
+       push    cx
+       xor     bh,bh
+       mov     cx,#0x01
+       mov     ah,#0x0e
+       int     0x10
+       pop     cx
+       pop     ax
+       ret
 
-! ok, the read went well so we get current cursor position and save it for
-! posterity.
+beep:  mov     al,#0x07
+       jmp     prnt1
+       
+no_sig_mess:   .ascii  "No setup signature found ..."
+               db      0x00
+start_sys_seg: .word   SYSSEG
+
+good_sig1:
+       jmp     good_sig
 
-       mov     ax,#INITSEG     ! this is done in bootsect already, but...
+! We now have to find the rest of the setup code/data
+bad_sig:
+       mov     ax,#INITSEG
+       mov     ds,ax
+       xor     bh,bh
+       mov     bl,[497]        ! get setup sects from boot sector
+       sub     bx,#4           ! LILO loads 4 sectors of setup
+       shl     bx,#8           ! convert to words
+       mov     cx,bx
+       shr     bx,#3           ! convert to segment
+       add     bx,#SYSSEG
+       seg cs
+       mov     start_sys_seg,bx
+
+! Move rest of setup code/data to here
+       mov     di,#2048        ! four sectors loaded by LILO
+       sub     si,si
+       mov     ax,#SETUPSEG
+       mov     es,ax
+       mov     ax,#SYSSEG
+       mov     ds,ax
+       rep
+       movsw
+
+       mov     ax,#SETUPSEG
+       mov     ds,ax
+       cmp     setup_sig1,#SIG1
+       jne     no_sig
+       cmp     setup_sig2,#SIG2
+       jne     no_sig
+       jmp     good_sig
+
+no_sig:
+       lea     si,no_sig_mess
+       call    prtstr
+no_sig_loop:
+       jmp     no_sig_loop
+
+good_sig:
+       mov     ax,#INITSEG
        mov     ds,ax
 
 ! Get memory size (extended mem, kB)
@@ -155,7+234,8 @@ no_psmouse:
 ! first we move the system to its rightful place
 
        mov     ax,#0x100       ! start of destination segment
-       mov     bx,#0x1000      ! start of source segment
+       seg cs
+       mov     bx,start_sys_seg        ! start of source segment
        cld                     ! 'direction'=0, movs moves forward
 do_move:
        mov     es,ax           ! destination segment
@@ -790,15+870,6 @@ inidx:     out     dx,al
        dec     dx
        ret
 
-! Routine to print asciiz-string at DS:SI
-
-prtstr:        lodsb
-       and     al,al
-       jz      fin
-       call    prnt1
-       jmp     prtstr
-fin:   ret
-
 ! Routine to print a decimal value on screen, the value to be
 ! printed is put in al (i.e 0-255). 
 
@@ -840,21+911,6 @@ digit:     add     al,#0x30
        pop     ax
        ret
 
-! Part of above routine, this one just prints ascii al
-
-prnt1: push    ax
-       push    cx
-       xor     bh,bh
-       mov     cx,#0x01
-       mov     ah,#0x0e
-       int     0x10
-       pop     cx
-       pop     ax
-       ret
-
-beep:  mov     al,#0x07
-       jmp     prnt1
-       
 gdt:
        .word   0,0,0,0         ! dummy
 
@@ -937,7+993,10 @@ dsc_S3:            .word   0x5032, 0x501c, 0x842b, 0x8419
 dsunknown:     .word   0x5032, 0x501c
 modesave:      .word   SVGA_MODE
 
-       
+! This must be last
+setup_sig1:    .word   SIG1
+setup_sig2:    .word   SIG2
+
 .text
 endtext:
 .data
index 8106bbc..440c577 100644 (file)
--- a/config.in
+++ b/config.in
@@ -151,7+151,9 @@ bool 'Extended fs support' CONFIG_EXT_FS n
 bool 'Second extended fs support' CONFIG_EXT2_FS y
 bool 'xiafs filesystem support' CONFIG_XIA_FS n
 bool 'msdos fs support' CONFIG_MSDOS_FS y
+if [ "$CONFIG_MSDOS_FS" = "y" ]; then
 bool 'umsdos: Unix like fs on top of std MSDOS FAT fs' CONFIG_UMSDOS_FS n
+fi
 bool '/proc filesystem support' CONFIG_PROC_FS y
 if [ "$CONFIG_INET" = "y" ]; then
 bool 'NFS filesystem support' CONFIG_NFS_FS y
index 3c75973..6f84428 100644 (file)
  * include/linux/cdrom.h).  With this interface, CDROMs can be
  * accessed and standard audio CDs can be played back normally.
  *
- * This interface is (unfortunatly) a polled interface.  This is
+ * This interface is (unfortunately) a polled interface.  This is
  * because most Sony interfaces are set up with DMA and interrupts
  * disables.  Some (like mine) do not even have the capability to
  * handle interrupts or DMA.  For this reason you will see a lot of
  *
  * This ugly hack waits for something to happen, sleeping a little
  * between every try.  it also handles attentions, which are
- * asyncronous events from the drive informing the driver that a disk
+ * asynchronous events from the drive informing the driver that a disk
  * has been inserted, removed, etc.
  *
  * NEWS FLASH - The driver now supports interrupts and DMA, but they are
@@ -578,7+578,7 @@ get_result(unsigned char *result_buffer,
 
    /*
     * 0x20 means an error occured.  Byte 2 will have the error code.
-    * Otherwise, the command succeded, byte 2 will have the count of
+    * Otherwise, the command succeeded, byte 2 will have the count of
     * how many more status bytes are coming.
     *
     * The result register can be read 10 bytes at a time, a wait for
@@ -875,7+875,7 @@ retry_data_operation:
       size_to_buf(1, &params[3]);
 
       num_retries++;
-      /* Issue a reset on an error (the second time), othersize just delay */
+      /* Issue a reset on an error (the second time), otherwise just delay */
       if (num_retries == 2)
       {
          restart_on_error();
@@ -1278,7+1278,7 @@ try_read_again:
          break;
             
       default:
-         panic("Unkown SONY CD cmd");
+         panic("Unknown SONY CD cmd");
       }
    }
 
@@ -1952,13+1952,6 @@ get_drive_configuration(unsigned short base_io,
 }
 
 
-static struct sigaction cdu31a_sigaction = {
-       cdu31a_interrupt,
-       0,
-       SA_INTERRUPT,
-       NULL
-};
-
 static int cdu31a_block_size;
 
 /*
@@ -2032,7+2025,7 @@ cdu31a_init(unsigned long mem_start, unsigned long mem_end)
 
          if (irq_used > 0)
          {
-           if (irqaction(irq_used,&cdu31a_sigaction))
+           if (request_irq(irq_used, cdu31a_interrupt, SA_INTERRUPT, "cdu31a"))
             {
                irq_used = 0;
               printk("Unable to grab IRQ%d for the CDU31A driver\n", irq_used);
index 8c36fdb..adadc82 100644 (file)
@@ -655,7+655,7 @@ static void setup_DMA(void)
            (current_addr < floppy_track_buffer ||
             current_addr + raw_cmd.length >
             floppy_track_buffer + 1024 * MAX_BUFFER_SECTORS)){
-               printk("bad adrress. start=%p lg=%lx tb=%p\n",
+               printk("bad address. start=%p lg=%lx tb=%p\n",
                       current_addr, raw_cmd.length, floppy_track_buffer);
                if ( CURRENT ){
                        printk("buffer=%p nr=%lx cnr=%lx\n",
@@ -943,7+943,7 @@ static int interpret_errors(void)
        char bad;
 
        if (inr!=7) {
-               printk(DEVICE_NAME ": -- FDC reply errror");
+               printk(DEVICE_NAME ": -- FDC reply error");
                FDCS->reset = 1;
                return 1;
        }
@@ -2395,7+2395,8 @@ static int invalidate_drive(int rdev)
 static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
     unsigned long param)
 {
-#define IOCTL_ALLOWED (filp && (filp->f_mode & 8 ))
+#define IOCTL_MODE_BIT 8
+#define IOCTL_ALLOWED (filp && (filp->f_mode & IOCTL_MODE_BIT))
 
        struct floppy_struct newparams;
        struct format_descr tmp_format_req;
@@ -2669,7+2670,8 @@ static int floppy_open(struct inode * inode, struct file * filp)
 
        if (exclusive)
                return -EBUSY;
-       if ( !filp ){
+
+       if (!filp) {
                printk(DEVICE_NAME ": Weird, open called with filp=0\n");
                return -EIO;
        }
@@ -2678,15+2680,15 @@ static int floppy_open(struct inode * inode, struct file * filp)
        if ( drive >= N_DRIVE )
                return -ENXIO;
 
-       if (command_status == FD_COMMAND_DETECT && drive >= current_drive){
+       if (command_status == FD_COMMAND_DETECT && drive >= current_drive) {
                lock_fdc(-1);
                unlock_fdc();
        }
 
-       if ( TYPE(inode->i_rdev) >= NUMBER(floppy_type))
-         return -ENXIO;
+       if (TYPE(inode->i_rdev) >= NUMBER(floppy_type))
+               return -ENXIO;
 
-       if (filp->f_mode & 3){
+       if (filp->f_mode & 3) {
                if ( !(UDRS->flags & FD_DRIVE_PRESENT))
                        return -ENXIO;
        }
@@ -2694,67+2696,49 @@ static int floppy_open(struct inode * inode, struct file * filp)
        old_dev = UDRS->fd_device;
        if (UDRS->fd_ref && old_dev != inode->i_rdev)
                return -EBUSY;
-       if (floppy_grab_irq_and_dma())
-               return -EBUSY;
 
-       if (filp->f_flags & O_EXCL ){
-               if (usage_count>1){
-                       floppy_release_irq_and_dma();
+       if (filp->f_flags & O_EXCL) {
+               if (usage_count)
                        return -EBUSY;
-               }else
-                       exclusive=1;
+               else
+                       exclusive = 1;
        }
 
-       /* filp->f_op is NULL if the disk is mounted, and non-NULL if opened */
-       if (filp->f_op){
-               if (UDRS->fd_ref == -1)
-                       return -EBUSY;
-               UDRS->fd_ref++;
-               UDRS->fd_device = inode->i_rdev;
-       } else {
-               if (UDRS->fd_ref ){
-                       floppy_release_irq_and_dma();
-                       return -EBUSY;
-               }
-               UDRS->fd_ref=-1;
-       }
+       if (floppy_grab_irq_and_dma())
+               return -EBUSY;
 
-       if (old_dev && old_dev != inode->i_rdev){
-               if ( buffer_drive == drive )
+       UDRS->fd_ref++;
+       UDRS->fd_device = inode->i_rdev;
+
+       if (old_dev && old_dev != inode->i_rdev) {
+               if (buffer_drive == drive)
                        buffer_track = -1;
                invalidate_buffers(old_dev);
        }
 
-       if (filp->f_mode & 2 || permission(inode,2))
-               filp->f_mode |= 8; /* keep mtools working */
+       /* Allow ioctls if we have write-permissions even if read-only open */
+       if ((filp->f_mode & 2) || permission(inode,2))
+               filp->f_mode |= IOCTL_MODE_BIT;
 
        if (UFDCS->rawcmd == 1)
               UFDCS->rawcmd = 2;
 
        if (filp->f_flags & O_NDELAY)
                return 0;
+
        if (filp->f_mode && !(UDRS->flags & FD_DRIVE_PRESENT))
                RETERR(ENXIO);
-       if(user_reset_fdc(drive, FD_RESET_IF_NEEDED))
+
+       if (user_reset_fdc(drive, FD_RESET_IF_NEEDED))
                RETERR(EIO);
 
-       if (filp->f_mode & 3){
+       if (filp->f_mode & 3) {
                check_disk_change(inode->i_rdev);
-               if ( changed_floppies & ( 1 << drive )){
-                       if ( suser() && filp->f_op)
-                               /* prevent dosemu from crashing */
-                               filp->f_mode &= ~3;
-                       else
-                               RETERR(ENXIO);
-               }
-       }
-       if ((filp->f_mode & 2) && UDRS->flags < FD_DISK_WRITABLE){
-               if ( suser() && filp->f_op)
-                       /* prevent dosemu from crashing */
-                       filp->f_mode &= ~2;
-               else
-                       RETERR(EROFS);
+               if (changed_floppies & ( 1 << drive ))
+                       RETERR(ENXIO);
        }
+       if ((filp->f_mode & 2) && !(UDRS->flags & FD_DISK_WRITABLE))
+               RETERR(EROFS);
        return 0;
 #undef RETERR
 }
@@ -2914,17+2898,6 @@ static struct cont_t detect_cont={
        empty,
        (done_f) empty };
 
-/*
- * This is the floppy IRQ description. The SA_INTERRUPT in sa_flags
- * means we run the IRQ-handler with interrupts disabled.
- */
-static struct sigaction floppy_sigaction = {
-       floppy_interrupt,
-       0,
-       SA_INTERRUPT,
-       NULL
-};
-
 void floppy_init(void)
 {
        int i;
@@ -2999,7+2972,7 @@ int floppy_grab_irq_and_dma(void)
 {
        if (usage_count++)
                return 0;
-       if (irqaction(FLOPPY_IRQ,&floppy_sigaction)) {
+       if (request_irq(FLOPPY_IRQ, floppy_interrupt, SA_INTERRUPT, "floppy")) {
                printk(DEVICE_NAME
                       ": Unable to grab IRQ%d for the floppy driver\n",
                       FLOPPY_IRQ);
index 7f62c59..4064c32 100644 (file)
@@ -932,13+932,6 @@ static void hd_interrupt(int unused)
  * We enable interrupts in some of the routines after making sure it's
  * safe.
  */
-static struct sigaction hd_sigaction = {
-       hd_interrupt,
-       0,
-       SA_INTERRUPT,
-       NULL
-};
-
 static void hd_geninit(void)
 {
        int drive, i;
@@ -962,13+955,13 @@ static void hd_geninit(void)
                }
 
        /*
-               We querry CMOS about hard disks : it could be that 
+               We query CMOS about hard disks : it could be that 
                we have a SCSI/ESDI/etc controller that is BIOS
-               compatable with ST-506, and thus showing up in our
-               BIOS table, but not register compatable, and therefore
+               compatible with ST-506, and thus showing up in our
+               BIOS table, but not register compatible, and therefore
                not present in CMOS.
 
-               Furthurmore, we will assume that our ST-506 drives
+               Furthermore, we will assume that our ST-506 drives
                <if any> are the primary drives in the system, and 
                the ones reflected as drive 1 or 2.
 
@@ -1013,7+1006,7 @@ static void hd_geninit(void)
                special_op[i] = 1;
        }
        if (NR_HD) {
-               if (irqaction(HD_IRQ,&hd_sigaction)) {
+               if (request_irq(HD_IRQ, hd_interrupt, SA_INTERRUPT, "hd")) {
                        printk("hd.c: unable to get IRQ%d for the harddisk driver\n",HD_IRQ);
                        NR_HD = 0;
                }
index 2e2c262..d255f7e 100644 (file)
@@ -373,7+373,7 @@ void ll_rw_block(int rw, int nr, struct buffer_head * bh[])
                        correct_size = i;
        }
 
-       /* Verify requested block sizees.  */
+       /* Verify requested block sizes.  */
        for (i = 0; i < nr; i++) {
                if (bh[i] && bh[i]->b_size != correct_size) {
                        printk(
index d544eea..b661dfe 100644 (file)
        0.3     Audio support added
        0.3.1 Changes for mitsumi CRMC LU005S march version
                   (stud11@cc4.kuleuven.ac.be)
-        0.3.2 bug fixes to the ioclts and merged with ALPHA0.99-pl12
+        0.3.2 bug fixes to the ioctls and merged with ALPHA0.99-pl12
                   (Jon Tombs <jon@robots.ox.ac.uk>)
         0.3.3 Added more #defines and mcd_setup()
                   (Jon Tombs <jon@gtex02.us.es>)
@@ -530,7+530,7 @@ printk("VOL %d %d\n", volctrl.channel0 & 0xFF, volctrl.channel1 & 0xFF);
                return 0;
 
        case CDROMEJECT:
-              /* all drives can atleast stop! */
+              /* all drives can at least stop! */
                if (audioStatus == CDROM_AUDIO_PLAY) {
                  outb(MCMD_STOP, MCDPORT(0));
                  i = getMcdStatus(MCD_STATUS_DELAY);
@@ -695,7+695,7 @@ mcd_poll(void)
 
 
 
- immediatly:
+ immediately:
   switch (mcd_state) {
 
 
@@ -733,14+733,14 @@ mcd_poll(void)
        mcd_invalidate_buffers();
       }
 
-    set_mode_immediatly:
+    set_mode_immediately:
 
       if ((st & MST_DOOR_OPEN) || !(st & MST_READY)) {
        mcdDiskChanged = 1;
        tocUpToDate = 0;
        if (mcd_transfer_is_active) {
          mcd_state = MCD_S_START;
-         goto immediatly;
+         goto immediately;
        }
        printk((st & MST_DOOR_OPEN) ? "mcd: door open\n" : "mcd: disk removed\n");
        mcd_state = MCD_S_IDLE;
@@ -773,14+773,14 @@ mcd_poll(void)
        mcd_invalidate_buffers();
       }
 
-    read_immediatly:
+    read_immediately:
 
       if ((st & MST_DOOR_OPEN) || !(st & MST_READY)) {
        mcdDiskChanged = 1;
        tocUpToDate = 0;
        if (mcd_transfer_is_active) {
          mcd_state = MCD_S_START;
-         goto immediatly;
+         goto immediately;
        }
        printk((st & MST_DOOR_OPEN) ? "mcd: door open\n" : "mcd: disk removed\n");
        mcd_state = MCD_S_IDLE;
@@ -801,7+801,7 @@ mcd_poll(void)
        McdTimeout = READ_TIMEOUT;
       } else {
        mcd_state = MCD_S_STOP;
-       goto immediatly;
+       goto immediately;
       }
 
     }
@@ -814,7+814,7 @@ mcd_poll(void)
 #endif
 
     st = inb(MCDPORT(1)) & (MFL_STATUSorDATA);
-  data_immediatly:
+  data_immediately:
 #ifdef TEST5
     printk("Status %02x\n",st);
 #endif
@@ -837,7+837,7 @@ mcd_poll(void)
       }
       mcd_state = MCD_S_START;
       McdTimeout = READ_TIMEOUT;
-      goto immediatly;
+      goto immediately;
 
     case MFL_STATUSorDATA:
       break;
@@ -846,7+846,7 @@ mcd_poll(void)
       McdTries = 5;
       if (!CURRENT_VALID && mcd_buf_in == mcd_buf_out) {
        mcd_state = MCD_S_STOP;
-       goto immediatly;
+       goto immediately;
       }
       mcd_buf_bn[mcd_buf_in] = -1;
       READ_DATA(MCDPORT(0), mcd_buf + 2048 * mcd_buf_in, 2048);
@@ -868,7+868,7 @@ mcd_poll(void)
          && (CURRENT -> sector / 4 < mcd_next_bn || 
              CURRENT -> sector / 4 > mcd_next_bn + 16)) {
        mcd_state = MCD_S_STOP;
-       goto immediatly;
+       goto immediately;
       }
       McdTimeout = READ_TIMEOUT;
 #ifdef DOUBLE_QUICK_ONLY
@@ -883,7+883,7 @@ mcd_poll(void)
 /*         printk("Quickloop success at %d\n",QUICK_LOOP_COUNT-count); */
            printk(" %d ",QUICK_LOOP_COUNT-count);
 #   endif
-           goto data_immediatly;
+           goto data_immediately;
          }
        }
 #   ifdef TEST4
@@ -979,9+979,9 @@ mcd_poll(void)
     if (CURRENT_VALID) {
       if (st != -1) {
        if (mcd_mode == 1)
-         goto read_immediatly;
+         goto read_immediately;
        else
-         goto set_mode_immediatly;
+         goto set_mode_immediately;
       } else {
        mcd_state = MCD_S_START;
        McdTimeout = 1;
@@ -1090,18+1090,6 @@ static struct file_operations mcd_fops = {
 
 
 /*
- * MCD interrupt descriptor
- */
-
-static struct sigaction mcd_sigaction = {
-       mcd_interrupt,
-       0,
-       SA_INTERRUPT,
-       NULL
-};
-
-
-/*
  * Test for presence of drive and initialize it.  Called at boot time.
  */
 
@@ -1175,7+1163,7 @@ mcd_init(unsigned long mem_start, unsigned long mem_end)
 
        /* don't get the IRQ until we know for sure the drive is there */
 
-       if (irqaction(mcd_irq,  &mcd_sigaction))
+       if (request_irq(mcd_irq, mcd_interrupt, SA_INTERRUPT, "Mitsumi CD"))
        {
                printk("Unable to get IRQ%d for Mitsumi CD-ROM\n", mcd_irq);
                return mem_start;
@@ -1395,7+1383,7 @@ GetQChannelInfo(struct mcd_Toc *qp)
 
 
 /*
- * Read the table of contents (TOC) and TOC header if neccessary
+ * Read the table of contents (TOC) and TOC header if necessary
  */
 
 static int
index a3ac8f2..236727b 100644 (file)
@@ -107,7+107,7 @@ static void do_load(void)
         * Check for a super block on the diskette.
         * The old-style boot/root diskettes had their RAM image
         * starting at block 512 of the boot diskette.  LINUX/Pro
-        * uses the enire diskette as a file system, so in that
+        * uses the entire diskette as a file system, so in that
         * case, we have to look at block 0.  Be intelligent about
         * this, and check both... - FvK
         */
index 30a57be..1741d4c 100644 (file)
  *       return only zeroes. Is there no UPC/EAN code written?
  *
  *  1.5  Laborate with UPC/EAN code (not better yet).
- *       Adapt to kernel 1.1.8 change (have to explicitely include
+ *       Adapt to kernel 1.1.8 change (have to explicitly include
  *       <linux/string.h> now).
  *
  *  1.6  Trying to read audio frames as data. Impossible with the current
  *       Changed CDROMSTOP routine (stop somewhat "softer" so that Workman
  *       won't get confused).
  *       Added a third interface type: Sequoia S-1000, as used with the SPEA
- *       Media FX sound card. This interface (useable for Sony and Mitsumi 
+ *       Media FX sound card. This interface (usable for Sony and Mitsumi 
  *       drives, too) needs a special configuration setup and behaves like a 
  *       LaserMate type after that. Still experimental - I do not have such
  *       an interface.
@@ -2646,7+2646,7 @@ static int sbpcd_ioctl(struct inode *inode, struct file *file, u_int cmd,
       DriveStruct[d].mode=READ_M1;
       return (0);
 
-    case CDROMREADMODE2: /* not useable at the moment */
+    case CDROMREADMODE2: /* not usable at the moment */
       DPRINTF((DBG_IOC,"SBPCD: ioctl: CDROMREADMODE2 requested.\n"));
       xx_ModeSelect(CD_FRAMESIZE_XA);
       xx_ModeSense();
index 973a902..313afe3 100644 (file)
@@ -166,7+166,7 @@ static void xd_geninit (void)
                for (i = 0; i < xd_drives; i++)
                        printk("xd_geninit: drive %d geometry - heads = %d, cylinders = %d, sectors = %d\n",i,xd_info[i].heads,xd_info[i].cylinders,xd_info[i].sectors);
 
-               if (!request_irq(xd_irq,xd_interrupt_handler)) {
+               if (!request_irq(xd_irq,xd_interrupt_handler, 0, "XT harddisk")) {
                        if (request_dma(xd_dma)) {
                                printk("xd_geninit: unable to get DMA%d\n",xd_dma);
                                free_irq(xd_irq);
index c9952fc..649ce6d 100644 (file)
@@ -104,7+104,7 @@ static int open_mouse(struct inode * inode, struct file * file)
        mouse.dx = 0;
        mouse.dy = 0;
        mouse.buttons = mouse.latch_buttons = 0;
-       if (request_irq(ATIXL_MOUSE_IRQ, mouse_interrupt)) {
+       if (request_irq(ATIXL_MOUSE_IRQ, mouse_interrupt, 0, "ATIXL mouse")) {
                mouse.active = 0;
                return -EBUSY;
        }
index 0d7a3be..0c6373a 100644 (file)
@@ -112,7+112,7 @@ static int open_mouse(struct inode * inode, struct file * file)
        mouse.dx = 0;
        mouse.dy = 0;
        mouse.buttons = 0x87;
-       if (request_irq(mouse_irq, mouse_interrupt))
+       if (request_irq(mouse_irq, mouse_interrupt, 0, "Busmouse"))
                return -EBUSY;
        mouse.active = 1;
        MSE_INT_ON();
index 0d0c464..abe9af4 100644 (file)
@@ -9,7+9,7 @@
  *
  * This module exports the console io functions:
  * 
- *     'long console_init(long, long)'
+ *     'long con_init(long)'
  *     'int con_open(struct tty_struct *tty, struct file * filp)'
  *     'void update_screen(int new_console)'
  *     'void blank_screen(void)'
@@ -1521,16+1521,16 @@ static void con_unthrottle(struct tty_struct *tty)
 }
 
 /*
- *  long console_init(long, long);
+ *  long con_init(long);
  *
- * This routine initalizes console interrupts, and does nothing
+ * This routine initializes console interrupts, and does nothing
  * else. If you want the screen to clear, call tty_write with
- * the appropriate escape-sequece.
+ * the appropriate escape-sequence.
  *
  * Reads the information preserved by setup.s to determine the current display
  * type and sets everything accordingly.
  */
-long console_init(long kmem_start, long kmem_end)
+long con_init(long kmem_start)
 {
        char *display_desc = "????";
        int currcons = 0;
@@ -1867,7+1867,7 @@ static inline int inword(const char c) {
    return ( inwordLut[(c>>5)&3] >> (c&0x1F) ) & 1;
 }
 
-/* set inwordLut conntents. Invoked by ioctl(). */
+/* set inwordLut contents. Invoked by ioctl(). */
 int sel_loadlut(const int arg)
 {
     memcpy_fromfs(inwordLut,(unsigned long *)(arg+4),16);
@@ -2155,7+2155,7 @@ static int set_get_font(char * arg, int set)
                        put_fs_byte(*(charmap+i), arg+i);
 
        cli();
-       outb_p( 0x00, seq_port_reg );   /* Frist, the sequencer */
+       outb_p( 0x00, seq_port_reg );   /* First, the sequencer */
        outb_p( 0x01, seq_port_val );   /* Synchronous reset */
        outb_p( 0x02, seq_port_reg );
        outb_p( 0x03, seq_port_val );   /* CPU writes to maps 0 and 1 */
index f021eef..698ed92 100644 (file)
@@ -437,7+437,7 @@ static void hold(void)
                return;
 
        /*
-        * Note: SCROLLOCK wil be set (cleared) by stop_tty (start_tty);
+        * Note: SCROLLOCK will be set (cleared) by stop_tty (start_tty);
         * these routines are also activated by ^S/^Q.
         * (And SCROLLOCK can also be set by the ioctl KDSETLED.)
         */
@@ -893,7+893,7 @@ unsigned long kbd_init(unsigned long kmem_start)
        ttytab = console_driver.table;
 
        bh_base[KEYBOARD_BH].routine = kbd_bh;
-       request_irq(KEYBOARD_IRQ,keyboard_interrupt);
+       request_irq(KEYBOARD_IRQ, keyboard_interrupt, 0, "keyboard");
        mark_bh(KEYBOARD_BH);
        return kmem_start;
 }
index 7d420a8..5184872 100644 (file)
@@ -282,7+282,6 @@ static int lp_open(struct inode * inode, struct file * file)
        unsigned int minor = MINOR(inode->i_rdev);
        int ret;
        unsigned int irq;
-       struct sigaction sa;
 
        if (minor >= LP_NO)
                return -ENODEV;
@@ -296,11+295,7 @@ static int lp_open(struct inode * inode, struct file * file)
                if (!lp_table[minor].lp_buffer)
                        return -ENOMEM;
 
-               sa.sa_handler = lp_interrupt;
-               sa.sa_flags = SA_INTERRUPT;
-               sa.sa_mask = 0;
-               sa.sa_restorer = NULL;
-               ret = irqaction(irq, &sa);
+               ret = request_irq(irq, lp_interrupt, SA_INTERRUPT, "printer");
                if (ret) {
                        kfree_s(lp_table[minor].lp_buffer, LP_BUFFER_SIZE);
                        lp_table[minor].lp_buffer = NULL;
@@ -362,7+357,6 @@ static int lp_ioctl(struct inode *inode, struct file *file,
                        int oldirq;
                        int newirq = arg;
                        struct lp_struct *lp = &lp_table[minor];
-                       struct sigaction sa;
 
                        if (!suser())
                                return -EPERM;
@@ -381,14+375,10 @@ static int lp_ioctl(struct inode *inode, struct file *file,
                        }
                        if (newirq) {
                                /* Install new irq */
-                               sa.sa_handler = lp_interrupt;
-                               sa.sa_flags = SA_INTERRUPT;
-                               sa.sa_mask = 0;
-                               sa.sa_restorer = NULL;
-                               if ((retval = irqaction(newirq, &sa))) {
+                               if ((retval = request_irq(newirq, lp_interrupt, SA_INTERRUPT, "printer"))) {
                                        if (oldirq) {
                                                /* restore old irq */
-                                               irqaction(oldirq, &sa);
+                                               request_irq(oldirq, lp_interrupt, SA_INTERRUPT, "printer");
                                        } else {
                                                /* We don't need the buffer */
                                                kfree_s(lp->lp_buffer, LP_BUFFER_SIZE);
index 6db02c0..c5be7f0 100644 (file)
  * Modified by Christoph Niemann (niemann@rubdv15.etdv.ruhr-uni-bochum.de)
  * Changes:  Better interrupt-handler (like in busmouse.c).
  *          Some changes to reduce code-size.
- *          Changed dectection code to use inb_p() instead of doing empty
+ *          Changed detection code to use inb_p() instead of doing empty
  *          loops to delay i/o.
  *
  * version 0.3a
@@ -86,7+86,7 @@ static int open_mouse(struct inode * inode, struct file * file)
        mouse.active = 1;
        mouse.ready = mouse.dx = mouse.dy = 0;  
        mouse.buttons = 0x80;
-       if (request_irq(MOUSE_IRQ, ms_mouse_interrupt)) {
+       if (request_irq(MOUSE_IRQ, ms_mouse_interrupt, 0, "MS Busmouse")) {
                mouse.active = 0;
                return -EBUSY;
        }
index 5f52da4..b0313fd 100644 (file)
@@ -1,5+1,5 @@
 /*
- * n_tty.c --- implements the N_TTY line discpline.
+ * n_tty.c --- implements the N_TTY line discipline.
  * 
  * This code used to be in tty_io.c, but things are getting hairy
  * enough that it made sense to split things off.  (The N_TTY
@@ -8,7+8,7 @@
  *
  * Note that the open routine for N_TTY is guaranteed never to return
  * an error.  This is because Linux will fall back to setting a line
- * to N_TTY if it can not switch to any other line discpline.  
+ * to N_TTY if it can not switch to any other line discipline.  
  *
  * Written by Theodore Ts'o, Copyright 1994.
  * 
@@ -85,7+85,7 @@ void n_tty_flush_buffer(struct tty_struct * tty)
 }
 
 /*
- * Return number of characters buffered to be delievered to user
+ * Return number of characters buffered to be delivered to user
  */
 int n_tty_chars_in_buffer(struct tty_struct *tty)
 {
index 57d1005..9f43a1a 100644 (file)
@@ -272,7+272,7 @@ static int open_aux(struct inode * inode, struct file * file)
                return -EBUSY;
        aux_busy = 1;
        queue->head = queue->tail = 0;          /* Flush input queue */
-       if (request_irq(AUX_IRQ, aux_interrupt)) {
+       if (request_irq(AUX_IRQ, aux_interrupt, 0, "PS/2 Mouse")) {
                aux_busy = 0;
                return -EBUSY;
        }
@@ -302,7+302,7 @@ static int open_qp(struct inode * inode, struct file * file)
        if (qp_busy)
                return -EBUSY;
 
-       if (request_irq(QP_IRQ, qp_interrupt))
+       if (request_irq(QP_IRQ, qp_interrupt, 0, "PS/2 Mouse"))
                return -EBUSY;
 
        qp_busy = 1;
index 2cea733..f091af3 100644 (file)
@@ -88,7+88,7 @@ static void pty_close(struct tty_struct * tty, struct file * filp)
 /*
  * The unthrottle routine is called by the line discipline to signal
  * that it can receive more characters.  For PTY's, the TTY_THROTTLED
- * flag is always set, to force the line discpline to always call the
+ * flag is always set, to force the line discipline to always call the
  * unthrottle routine when there are fewer than TTY_THRESHOLD_UNTHROTTLE 
  * characters in the queue.  This is necessary since each time this
  * happens, we need to wake up any sleeping processes that could be
index 958dd8a..4aaa21d 100644 (file)
@@ -115,7+115,7 @@ static void change_speed(struct async_struct *info);
  * While the access port and interrupt is configurable, the default
  * port locations are 0x302 for the port control register, and 0x303
  * for the data read/write register. Normally, the interrupt is at irq3
- * but can be anything from 3 to 7 inclusive. Note tht using 3 will
+ * but can be anything from 3 to 7 inclusive. Note that using 3 will
  * require disabling com2.
  */
 
@@ -221,7+221,7 @@ static inline int serial_paranoia_check(struct async_struct *info,
 }
 
 /*
- * This is used to figure out the divsor speeds and the timeouts
+ * This is used to figure out the divisor speeds and the timeouts
  */
 static int baud_table[] = {
        0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800,
@@ -720,7+720,7 @@ static void do_softint(void *private)
 /*
  * This subroutine is called when the RS_TIMER goes off.  It is used
  * by the serial driver to handle ports that do not have an interrupt
- * (irq=0).  This doesn't work very well for 16450's, but gives bearly
+ * (irq=0).  This doesn't work very well for 16450's, but gives barely
  * passable results for a 16550A.  (Although at the expense of much
  * CPU overhead).
  */
@@ -781,15+781,9 @@ static int grab_all_interrupts(int dontgrab)
 {
        int                     irq_lines = 0;
        int                     i, mask;
-       struct sigaction        sa;
-       
-       sa.sa_handler = rs_probe;
-       sa.sa_flags = (SA_INTERRUPT);
-       sa.sa_mask = 0;
-       sa.sa_restorer = NULL;
        
        for (i = 0, mask = 1; i < 16; i++, mask <<= 1) {
-               if (!(mask & dontgrab) && !irqaction(i, &sa)) {
+               if (!(mask & dontgrab) && !request_irq(i, rs_probe, SA_INTERRUPT, "serial probe")) {
                        irq_lines |= mask;
                }
        }
@@ -838,8+832,8 @@ static int startup(struct async_struct * info)
 {
        unsigned short ICP;
        unsigned long flags;
-       int                     retval;
-       struct sigaction        sa;
+       int     retval;
+       void (*handler)(int);
 
        if (info->flags & ASYNC_INITIALIZED)
                return 0;
@@ -895,14+889,11 @@ static int startup(struct async_struct * info)
                          !IRQ_ports[info->irq]->next_port)) {
                if (IRQ_ports[info->irq]) {
                        free_irq(info->irq);
-                       sa.sa_handler = rs_interrupt;
+                       handler = rs_interrupt;
                } else 
-                       sa.sa_handler = rs_interrupt_single;
+                       handler = rs_interrupt_single;
 
-               sa.sa_flags = (SA_INTERRUPT);
-               sa.sa_mask = 0;
-               sa.sa_restorer = NULL;
-               retval = irqaction(info->irq,&sa);
+               retval = request_irq(info->irq, handler, SA_INTERRUPT, "serial");
                if (retval) {
                        restore_flags(flags);
                        if (suser()) {
@@ -995,7+986,6 @@ static int startup(struct async_struct * info)
  */
 static void shutdown(struct async_struct * info)
 {
-       struct sigaction        sa;
        unsigned long   flags;
        unsigned long timeout;
        int             retval;
@@ -1028,14+1018,10 @@ static void shutdown(struct async_struct * info)
                          !IRQ_ports[info->irq]->next_port)) {
                if (IRQ_ports[info->irq]) {
                        free_irq(info->irq);
-                       sa.sa_flags = (SA_INTERRUPT);
-                       sa.sa_mask = 0;
-                       sa.sa_restorer = NULL;
-                       sa.sa_handler = rs_interrupt_single;
-                       retval = irqaction(info->irq, &sa);
+                       retval = request_irq(info->irq, rs_interrupt_single, 0, "serial");
                        
                        if (retval)
-                               printk("serial shutdown: irqaction: error %d"
+                               printk("serial shutdown: request_irq: error %d"
                                       "  Couldn't reacquire IRQ.\n", retval);
                } else
                        free_irq(info->irq);
@@ -1054,7+1040,7 @@ static void shutdown(struct async_struct * info)
        }
        
        /*
-        * Bebore we drop DTR, make sure the UART transmitter has
+        * Before we drop DTR, make sure the UART transmitter has
         * completely drained; this is especially important if there
         * is a transmit FIFO!
         * 
@@ -1975,8+1961,8 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
 /*
  * This routine is called whenever a serial port is opened.  It
  * enables interrupts for a serial port, linking in its async structure into
- * the IRQ chain.   It also performs the serial-speicific
- * initalization for the tty structure.
+ * the IRQ chain.   It also performs the serial-specific
+ * initialization for the tty structure.
  */
 int rs_open(struct tty_struct *tty, struct file * filp)
 {
@@ -2200,7+2186,7 @@ static void autoconfig(struct async_struct * info)
         * test, because they apparently don't implement the loopback
         * test mode.  So this test is skipped on the COM 1 through
         * COM 4 ports.  This *should* be safe, since no board
-        * manufactucturer would be stupid enough to design a board
+        * manufacturer would be stupid enough to design a board
         * that conflicts with COM 1-4 --- we hope!
         */
        if (!(info->flags & ASYNC_SKIP_TEST)) {
index 01ca1fd..0b01200 100644 (file)
@@ -2796,20+2796,6 @@ static struct file_operations qic02_tape_fops = {
        NULL                            /* fsync */
 };
 
-
-/* Attribute `SA_INTERRUPT' makes the interrupt atomic with
- * interrupts disabled. We could do without the atomic stuff, but
- * then dma_transfer() would have to disable interrupts explicitly.
- * System load is high enough as it is :-(
- */
-static struct sigaction qic02_tape_sigaction = {
-       qic02_tape_interrupt,
-       0,
-       SA_INTERRUPT,
-       NULL
-};
-
-
 /* align `a' at `size' bytes. `size' must be a power of 2 */
 static inline unsigned long const align_buffer(unsigned long a, unsigned size)
 {
@@ -2846,7+2832,7 @@ static int qic02_get_resources(void)
         */
 
        /* get IRQ */
-       if (irqaction(QIC02_TAPE_IRQ, &qic02_tape_sigaction)) {
+       if (request_irq(QIC02_TAPE_IRQ, qic02_tape_interrupt, SA_INTERRUP, "QIC-02")) {
                printk(TPQIC02_NAME ": can't allocate IRQ%d for QIC-02 tape\n",
                        QIC02_TAPE_IRQ);
                status_zombie = YES;
index 3ab306a..6c670c3 100644 (file)
  * which can be dynamically activated and de-activated by the line
  * discipline handling modules (like SLIP).
  *
- * NOTE: pay no attention to the line discpline code (yet); its
+ * NOTE: pay no attention to the line discipline code (yet); its
  * interface is still subject to change in this version...
  * -- TYT, 1/31/92
  *
@@ -390,7+390,7 @@ int tty_hung_up_p(struct file * filp)
 
 /*
  * This function is typically called only by the session leader, when
- * it wants to dissassociate itself from its controlling tty.
+ * it wants to disassociate itself from its controlling tty.
  *
  * It performs the following functions:
  *     (1)  Sends a SIGHUP and SIGCONT to the foreground process group
@@ -1464,7+1464,7 @@ void do_SAK( struct tty_struct *tty)
 
 /*
  * This routine is called out of the software interrupt to flush data
- * from the flip buffer to the line discpline.
+ * from the flip buffer to the line discipline.
  */
 static void flush_to_ldisc(void *private)
 {
@@ -1548,15+1548,14 @@ int tty_register_driver(struct tty_driver *driver)
        return 0;
 }
 
-long tty_init(long kmem_start)
+/*
+ * Initialize the console device. This is called *early*, so
+ * we can't necessarily depend on lots of kernel help here.
+ * Jus do some early initializations, and do the complex setup
+ * later.
+ */
+long console_init(long kmem_start, long kmem_end)
 {
-       if (sizeof(struct tty_struct) > PAGE_SIZE)
-               panic("size of tty structure > PAGE_SIZE!");
-       if (register_chrdev(TTY_MAJOR,"tty",&tty_fops))
-               panic("unable to get major %d for tty device", TTY_MAJOR);
-       if (register_chrdev(TTYAUX_MAJOR,"tty",&tty_fops))
-               panic("unable to get major %d for tty device", TTYAUX_MAJOR);
-
        /* Setup the default TTY line discipline. */
        memset(ldiscs, 0, sizeof(ldiscs));
        (void) tty_register_ldisc(N_TTY, &tty_ldisc_N_TTY);
@@ -1572,7+1571,27 @@ long tty_init(long kmem_start)
        tty_std_termios.c_cflag = B38400 | CS8 | CREAD;
        tty_std_termios.c_lflag = ISIG | ICANON | ECHO | ECHOE | ECHOK |
                ECHOCTL | ECHOKE | IEXTEN;
-       
+
+       /*
+        * set up the console device so that later boot sequences can 
+        * inform about problems etc..
+        */
+       return con_init(kmem_start);
+}
+
+/*
+ * Ok, now we can initialize the rest of the tty devices and can count
+ * on memory allocations, interrupts etc..
+ */
+long tty_init(long kmem_start)
+{
+       if (sizeof(struct tty_struct) > PAGE_SIZE)
+               panic("size of tty structure > PAGE_SIZE!");
+       if (register_chrdev(TTY_MAJOR,"tty",&tty_fops))
+               panic("unable to get major %d for tty device", TTY_MAJOR);
+       if (register_chrdev(TTYAUX_MAJOR,"tty",&tty_fops))
+               panic("unable to get major %d for tty device", TTYAUX_MAJOR);
+
        kmem_start = kbd_init(kmem_start);
        kmem_start = rs_init(kmem_start);
        kmem_start = pty_init(kmem_start);
index 77a9c84..eeacb2d 100644 (file)
@@ -214,7+214,7 @@ el_open(struct device *dev)
   if (el_debug > 2)
       printk("%s: Doing el_open()...", dev->name);
 
-  if (request_irq(dev->irq, &el_interrupt)) {
+  if (request_irq(dev->irq, &el_interrupt, 0, "3c501")) {
       if (el_debug > 2)
          printk("interrupt busy, exiting el_open().\n");
       return -EAGAIN;
index 1feabaf..79e5aed 100644 (file)
@@ -111,7+111,7 @@ el2_pio_autoprobe(struct device *dev)
 }
 
 /* Probe for the Etherlink II card at I/O port base IOADDR,
-   returning non-zero on sucess.  If found, set the station
+   returning non-zero on success.  If found, set the station
    address and memory parameters in DEVICE. */
 int
 el2probe1(int ioaddr, struct device *dev)
@@ -247,13+247,13 @@ el2_open(struct device *dev)
 
        outb(EGACFR_NORM, E33G_GACFR);  /* Enable RAM and interrupts. */
        do {
-           if (request_irq (*irqp, NULL) != -EBUSY) {
+           if (request_irq (*irqp, NULL, 0, "bogus") != -EBUSY) {
                /* Twinkle the interrupt, and check if it's seen. */
                autoirq_setup(0);
                outb_p(0x04 << ((*irqp == 9) ? 2 : *irqp), E33G_IDCFR);
                outb_p(0x00, E33G_IDCFR);
                if (*irqp == autoirq_report(0)   /* It's a good IRQ line! */
-                   && request_irq (dev->irq = *irqp, &ei_interrupt) == 0)
+                   && request_irq (dev->irq = *irqp, &ei_interrupt, 0, "3c503") == 0)
                    break;
            }
        } while (*++irqp);
@@ -262,7+262,7 @@ el2_open(struct device *dev)
            return -EAGAIN;
        }
     } else {
-       if (request_irq(dev->irq, &ei_interrupt)) {
+       if (request_irq(dev->irq, &ei_interrupt, 0, "3c503")) {
            return -EAGAIN;
        }
     }
index 34022ff..657e2ac 100644 (file)
  *                             Donald Becker, <becker@super.org>
  *             Crynwr packet driver by
  *                     Krishnan Gopalan and Gregg Stefancik,
- *                        Clemson Univesity Engineering Computer Operations.
+ *                        Clemson University Engineering Computer Operations.
  *                     Portions of the code have been adapted from the 3c505
  *                        driver for NCSA Telnet by Bruce Orchard and later
  *                        modified by Warren Van Houten and krus@diku.dk.
@@ -888,7+888,7 @@ static int elp_open (struct device *dev)
   /*
    * install our interrupt service routine
    */
-  if (request_irq(dev->irq, &elp_interrupt))  
+  if (request_irq(dev->irq, &elp_interrupt, 0, "3c505"))
     return -EAGAIN;
 
   /*
@@ -902,7+902,7 @@ static int elp_open (struct device *dev)
   OUTB(CONTROL_CMDE, adapter->io_addr+PORT_CONTROL);
 
   /*
-   * device is now offically open!
+   * device is now officially open!
    */
   dev->start = 1;
 
index 7b0fa92..d923f45 100644 (file)
@@ -4,7+4,7 @@
        Copyright 1993 United States Government as represented by the Director,
        National Security Agency.  This software may only be used and distributed
        according to the terms of the GNU Public License as modified by SRC,
-       incorported herein by reference.
+       incorporated herein by reference.
 
        The author may be reached as becker@super.org or
        C/O Supercomputing Research Ctr., 17100 Science Dr., Bowie MD 20715
@@ -29,7+29,7 @@ static char *version =
   Sources:
        This driver wouldn't have been written with the availability of the
        Crynwr driver source code.      It provided a known-working implementation
-       that filled in the gaping holes of the Intel documention.  Three cheers
+       that filled in the gaping holes of the Intel documentation.  Three cheers
        for Russ Nelson.
 
        Intel Microcommunications Databook, Vol. 1, 1990. It provides just enough
@@ -66,10+66,10 @@ static unsigned int net_debug = NET_DEBUG;
                        Details of the i82586.
 
    You'll really need the databook to understand the details of this part,
-   but the outline is that the i82586 has two seperate processing units.
+   but the outline is that the i82586 has two separate processing units.
    Both are started from a list of three configuration tables, of which only
    the last, the System Control Block (SCB), is used after reset-time.  The SCB
-   has the following fileds:
+   has the following fields:
                Status word
                Command word
                Tx/Command block addr.
@@ -142,7+142,7 @@ struct net_local {
 
 /*  Since the 3c507 maps the shared memory window so that the last byte is
        at 82586 address FFFF, the first byte is at 82586 address 0, 16K, 32K, or
-       48K cooresponding to window sizes of 64K, 48K, 32K and 16K respectively. 
+       48K corresponding to window sizes of 64K, 48K, 32K and 16K respectively. 
        We can account for this be setting the 'SBC Base' entry in the ISCP table
        below for all the 16 bit offset addresses, and also adding the 'SCB Base'
        value to all 24 bit physical addresses (in the SCP table and the TX and RX
@@ -282,7+282,7 @@ void init_82586_mem(struct device *dev);
 /* Check for a network adaptor of this type, and return '0' iff one exists.
        If dev->base_addr == 0, probe all likely locations.
        If dev->base_addr == 1, always return failure.
-       If dev->base_addr == 2, (detachable devices only) alloate space for the
+       If dev->base_addr == 2, (detachable devices only) allocate space for the
        device and return success.
        */
 int
@@ -340,11+340,11 @@ int el16_probe1(struct device *dev, short ioaddr)
        printk("%s: 3c507 at %#x,", dev->name, ioaddr);
 
        /* We should make a few more checks here, like the first three octets of
-          the S.A. for the manufactor's code. */ 
+          the S.A. for the manufacturer's code. */ 
 
        irq = inb(ioaddr + IRQ_CONFIG) & 0x0f;
 
-       irqval = request_irq(irq, &el16_interrupt);
+       irqval = request_irq(irq, &el16_interrupt, 0, "3c507");
        if (irqval) {
                printk ("unable to get IRQ %d (irqval=%d).\n", irq, irqval);
                return EAGAIN;
index e21b3e5..752c998 100644 (file)
@@ -153,7+153,7 @@ int el3_probe(struct device *dev)
        /* Next check for all ISA bus boards by sending the ID sequence to the
           ID_PORT.  We find cards past the first by setting the 'current_tag'
           on cards as they are found.  Cards with their tag set will not
-          respond to subseqent ID seqences. */
+          respond to subsequent ID sequences. */
        outb(0x00, ID_PORT);
        outb(0x00, ID_PORT);
        for(i = 0; i < 255; i++) {
@@ -283,7+283,7 @@ el3_open(struct device *dev)
        int ioaddr = dev->base_addr;
        int i;
 
-       if (request_irq(dev->irq, &el3_interrupt)) {
+       if (request_irq(dev->irq, &el3_interrupt, 0, "3c509")) {
                return -EAGAIN;
        }
 
@@ -367,7+367,7 @@ el3_start_xmit(struct sk_buff *skb, struct device *dev)
                return 0;
 
        if (el3_debug > 4) {
-               printk("%s: el3_start_xmit(lenght = %ld) called, status %4.4x.\n",
+               printk("%s: el3_start_xmit(length = %ld) called, status %4.4x.\n",
                           dev->name, skb->len, inw(ioaddr + EL3_STATUS));
        }
 #ifndef final_version
index 57029c8..aae2bdd 100644 (file)
@@ -53,6+53,11 @@ static char *version =
 
 #include "8390.h"
 
+#ifdef MODULE
+#include <linux/module.h>
+#include "../../tools/version.h"
+#endif
+
 /* These are the operational function interfaces to board-specific
    routines.
        void reset_8390(struct device *dev)
@@ -96,7+101,6 @@ static void NS8390_trigger_send(struct device *dev, unsigned int length,
 static void set_multicast_list(struct device *dev, int num_addrs, void *addrs);
 #endif
 
-struct sigaction ei_sigaction = { ei_interrupt, 0, 0, NULL, };
 \f
 /* Open/initialize the board.  This routine goes all-out, setting everything
    up anew at each open, even though many of these registers should only
@@ -130,12+134,15 @@ static int ei_start_xmit(struct sk_buff *skb, struct device *dev)
           the board has died and kick it. */
 
     if (dev->tbusy) {  /* Do timeouts, just like the 8003 driver. */
-               int txsr = inb(e8390_base+EN0_TSR), isr;
+               int txsr = inb(e8390_base+EN0_TSR), isr, cmd;
                int tickssofar = jiffies - dev->trans_start;
                if (tickssofar < 10     ||      (tickssofar < 15 && ! (txsr & ENTSR_PTX))) {
                        return 1;
                }
                isr = inb(e8390_base+EN0_ISR);
+               cmd = inb(e8390_base+E8390_CMD) & (E8390_STOP|E8390_START);
+               if ((cmd == 0) || (cmd == (E8390_STOP|E8390_START)))
+                       return 1;
                printk(KERN_DEBUG "%s: transmit timed out, TX status %#2x, ISR %#2x.\n",
                           dev->name, txsr, isr);
                /* Does the 8390 thinks it has posted an interrupt? */
@@ -238,7+245,7 @@ void ei_interrupt(int reg_ptr)
     int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
     struct device *dev = (struct device *)(irq2dev_map[irq]);
     int e8390_base;
-    int interrupts, boguscount = 0;
+    int interrupts, cmd, boguscount = 0;
     struct ei_device *ei_local;
     
     if (dev == NULL) {
@@ -270,6+277,12 @@ void ei_interrupt(int reg_ptr)
     /* !!Assumption!! -- we stay in page 0.     Don't break this. */
     while ((interrupts = inb_p(e8390_base + EN0_ISR)) != 0
                   && ++boguscount < 9) {
+               cmd = inb(e8390_base+E8390_CMD) & (E8390_STOP|E8390_START);
+               if ((cmd == 0) || (cmd == (E8390_STOP|E8390_START))) {
+                       printk("%s: card not present\n", dev->name);
+                       interrupts = 0;
+                       break;
+                       }
                if (interrupts & ENISR_RDC) {
                        /* Ack meaningless DMA complete. */
                        outb_p(ENISR_RDC, e8390_base + EN0_ISR);
@@ -669,6+682,19 @@ static void NS8390_trigger_send(struct device *dev, unsigned int length,
     return;
 }
 
+#ifdef MODULE
+char kernel_version[] = UTS_RELEASE;
+
+int init_module(void)
+{
+     return 0;
+}
+
+void
+cleanup_module(void)
+{
+}
+#endif /* MODULE */
 \f
 /*
  * Local variables:
index 08e763e..d5c7196 100644 (file)
@@ -154,6+154,6 @@ struct ei_device {
 struct e8390_pkt_hdr {
   unsigned char status; /* status */
   unsigned char next;   /* pointer to next packet. */
-  unsigned short count; /* header + packet lenght in bytes */
+  unsigned short count; /* header + packet length in bytes */
 };
 #endif /* _8390_h */
index 01ab266..eaa1bdd 100644 (file)
 
 
 # Most drivers also have a *_DEBUG setting that may be adjusted.
-# The 8390 drivers share the EI_DEBUG settting.
+# The 8390 drivers share the EI_DEBUG setting.
 
 # General options for Space.c
 OPTS           = # -DETH0_ADDR=0x300 -DETH0_IRQ=11
index 8bb7d95..d9c8ca4 100644 (file)
@@ -3,6+3,5 @@ MODULES = \
        de600.o \
        de620.o \
        3c501.o \
-       plip.o
-
-
+       plip.o \
+       8390.o
index 783b0ce..eeaa058 100644 (file)
@@ -12,11+12,15 @@ NETDRV_OBJS := Space.o auto_irq.o net_init.o loopback.o
 CFLAGS := $(CFLAGS) -I../../net/inet
 CPP := $(CPP) -I../../net/inet
 
+.c.o:
+       $(CC) $(CFLAGS) -c $<
+
+
 # The point of the makefile...
 all: net.a modules
 
 Space.o: Space.c ../../include/linux/autoconf.h
-       $(CC) $(CFLAGS) $(OPTS) -c $< -o $@
+       $(CC) $(CFLAGS) $(OPTS) -c $<
 
 net_init.o: ../../include/linux/autoconf.h
 
index 7810a6d..dba5dbc 100644 (file)
@@ -131,7+131,7 @@ Released 1994-06-13
 
          DE-600:
          - The adapter is not recognized at boot, i.e. an Ethernet
-           adress of 00:80:c8:... is not shown, try to add another
+           address of 00:80:c8:... is not shown, try to add another
              "; SLOW_DOWN_IO"
            at DE600_SLOW_DOWN in the "tuning" section. As a last resort,
            uncomment: "#define REALLY_SLOW_IO" (see <asm/io.h> for hints).
index d68745b..9d33f79 100644 (file)
@@ -61,7+61,7 @@ nibbles into bytes.  This cable should not be used on unidirectional
 isn't configured for PLIP, as it will result in output driver
 conflicts and the (unlikely) possibility of damage.
 
-The cable for this tranfer mode should be constructed as follows:
+The cable for this transfer mode should be constructed as follows:
 
     STROBE->BUSY 1 - 11
     D0->D0     2 - 2
@@ -83,7+83,7 @@ The cable for this tranfer mode should be constructed as follows:
 Once again, if the cable you are using has a metallic shield it should
 be connected to the metallic DB-25 shell at one end only.
 
-\section{PLIP Mode 0 tranfer protocol}
+\section{PLIP Mode 0 transfer protocol}
 The PLIP driver is compatible with the "Crynwr" parallel port transfer
 standard in Mode 0.  That standard specifies the following protocol:
 
index 63b4754..c1d2a82 100644 (file)
@@ -4,7+4,7 @@ Hi again
 
 About my previous mail: I've looked into parallel.asm, and I'm
 rather confused. Looks like the code agrees with you, but not
-the protocol description preceeding it?? I got to look more
+the protocol description preceding it?? I got to look more
 careful, but it wont be for a while (approx a week).
 
 >From plip.c (v0.04):
@@ -17,13+17,13 @@ careful, but it wont be for a while (approx a week).
 I saw you removed 1 and 14 from the cable description, but not
 16 and 17. Why is that?
 
-Have been succesful in getting parallel.com working (the Messy-Loss
+Have been successful in getting parallel.com working (the Messy-Loss
 software). Using the pksend on the sender and pkall/pkwatch/whatnot
 gives me a hung receiver. (The cable works, I've tried unet11, a DOS
 cheap-net prog.)
 
 Using PLIP v0.03 and trying to ping the other end gives
-  88 timeout 88 timeout....(more) 2386 bogous packet size, dropped
+  88 timeout 88 timeout....(more) 2386 bogus packet size, dropped
 on the receiver, and on the sender lots of timeout, but of
 course I don't know how much is supposed to work.
 
@@ -32,7+32,7 @@ long time ago. Use it for whatever you like, or dump it in the bin. ;^)
 
 /Tommy
 -----
-Becker [& Co] provdly presents PLIP
+Becker [& Co] proudly presents PLIP
 
 What is PLIP?
 =============
@@ -47,7+47,7 @@ initiated by Crynwr.]
 Advantages of PLIP
 ==================
 
-It's cheap, it's availble everywhere, and it's easy.
+It's cheap, it's available everywhere, and it's easy.
 
 The PLIP cable is all that's needed to connect two Linux boxes, and it
 can be build for very bucks.
@@ -55,7+55,7 @@ can be build for very bucks.
 Connecting two Linux boxes takes only a seconds decision and a few
 minutes work, no need to search for a [supported] netcard. This might
 even be especially important in the case of notebooks, where netcard
-are not easily availble.
+are not easily available.
 
 Not requiring a netcard also means that apart from connecting the
 cables, everything else is software configuration [which in principle
@@ -69,7+69,7 @@ Can only be used to connect three (?) Linux boxes. Doesn't connect to
 an exiting ethernet. Isn't standard (not even de facto standard, like
 SLIP).
 
-Performens
+Performance
 ==========
 
 PLIP easily outperforms ethernet cards....(ups, I was dreaming, but
index 4a48e51..0d2251e 100644 (file)
 #define        NEXT_DEV        NULL
 
 
-/* A unifed ethernet device probe.  This is the easiest way to have every
+/* A unified ethernet device probe.  This is the easiest way to have every
    ethernet adaptor have the name "eth[0123...]".
    */
 
index 5b2a24d..27f9a80 100644 (file)
@@ -139,7+139,7 @@ static int ac_probe1(int ioaddr, struct device *dev)
        else if (dev->irq == 2)
                dev->irq = 9;
 
-       if (irqaction (dev->irq, &ei_sigaction)) {
+       if (request_irq(dev->irq, ei_interrupt, 0, "ac3200")) {
                printk (" unable to get IRQ %d.\n", dev->irq);
                return 0;
        }
@@ -194,7+194,7 @@ static int ac_open(struct device *dev)
        /* Someday we may enable the IRQ and shared memory here. */
        int ioaddr = dev->base_addr;
 
-       if (irqaction(dev->irq, &ei_sigaction))
+       if (request_irq(dev->irq, ei_interrupt, 0, "ac3200"))
                return -EAGAIN;
 #endif
 
index 96609b5..15609dc 100644 (file)
@@ -63,7+63,7 @@ int i596_debug = 1;
 #define CMD_SUSP       0x4000  /* Suspend after doing cmd. */
 #define CMD_INTR       0x2000  /* Interrupt after doing cmd. */
 
-#define CMD_FLEX       0x0008  /* Enable flexable memory model */
+#define CMD_FLEX       0x0008  /* Enable flexible memory model */
 
 enum commands {
        CmdNOp = 0, CmdSASetup = 1, CmdConfigure = 2, CmdMulticastList = 3,
@@ -488,7+488,7 @@ static void i596_cleanup_cmd(struct i596_private *lp)
 static int
 i596_open(struct device *dev)
 {
-    if (request_irq(dev->irq, &i596_interrupt)) {
+    if (request_irq(dev->irq, &i596_interrupt, 0, "apricot")) {
        return -EAGAIN;
     }
 
@@ -819,7+819,7 @@ i596_interrupt(int reg_ptr)
        if (dev->start) ack_cmd |= RX_START;
     }
 
-    /* acknowlage the interrupt */
+    /* acknowledge the interrupt */
 
 /*
     if ((lp->scb.cmd != (struct i596_cmd *) -1) && (dev->start)) ack_cmd |= CUC_START;
index 39fd07a..91d1384 100644 (file)
@@ -8,7+8,7 @@
    C/O Supercomputing Research Ctr., 17100 Science Dr., Bowie MD 20715
 
    This is a device driver for the Allied Telesis AT1700, which is a
-   straight-foward Fujitsu MB86965 implementation.
+   straightforward Fujitsu MB86965 implementation.
 */
 
 static char *version =
@@ -121,7+121,7 @@ static void set_multicast_list(struct device *dev, int num_addrs, void *addrs);
 /* Check for a network adaptor of this type, and return '0' iff one exists.
    If dev->base_addr == 0, probe all likely locations.
    If dev->base_addr == 1, always return failure.
-   If dev->base_addr == 2, alloate space for the device and return success
+   If dev->base_addr == 2, allocate space for the device and return success
    (detachable devices only).
    */
 int
@@ -184,7+184,7 @@ int at1700_probe1(struct device *dev, short ioaddr)
                                 | (read_eeprom(ioaddr, 0)>>14)];
 
        /* Snarf the interrupt vector now. */
-       if (request_irq(irq, &net_interrupt)) {
+       if (request_irq(irq, &net_interrupt, 0, "at1700")) {
                printk ("AT1700 found at %#3x, but it's unusable due to a conflict on"
                                "IRQ %d.\n", ioaddr, irq);
                return EAGAIN;
@@ -204,7+204,7 @@ int at1700_probe1(struct device *dev, short ioaddr)
        }
 
        /* The EEPROM word 12 bit 0x0400 means use regular 100 ohm 10baseT signals,
-          rather than 150 ohm shielded twisted pair compansation.
+          rather than 150 ohm shielded twisted pair compensation.
           0x0000 == auto-sense the interface
           0x0800 == use TP interface
           0x1800 == use coax interface
index 49154d8..94e345e 100644 (file)
@@ -4,7+4,7 @@
        Copyright 1993 United States Government as represented by the Director,
        National Security Agency.  This software may only be used and distributed
        according to the terms of the GNU Public License as modified by SRC,
-       incorported herein by reference.
+       incorporated herein by reference.
 
        The author may be reached as becker@super.org or
        C/O Supercomputing Research Ctr., 17100 Science Dr., Bowie MD 20715
@@ -65,7+65,7 @@ static char *version =
        it to stabilize.  This delay seems to be needed on most machines.
 
        The data transfer mode is stored in the 'dev->if_port' field.  Its default
-       value is '4'.  It may be overriden at boot-time using the third parameter
+       value is '4'.  It may be overridden at boot-time using the third parameter
        to the "ether=..." initialization.
 
        The header file <atp.h> provides inline functions that encapsulate the
@@ -149,7+149,7 @@ static void set_multicast_list(struct device *dev, int num_addrs, void *addrs);
 /* Check for a network adaptor of this type, and return '0' iff one exists.
    If dev->base_addr == 0, probe all likely locations.
    If dev->base_addr == 1, always return failure.
-   If dev->base_addr == 2, alloate space for the device and return success
+   If dev->base_addr == 2, allocate space for the device and return success
    (detachable devices only).
    */
 int
@@ -208,7+208,7 @@ static int atp_probe1(struct device *dev, short ioaddr)
                dev->irq = 7;
        else
                dev->irq = 5;
-       write_reg_high(ioaddr, CMR1, CMR1h_TxRxOFF); /* Diable Tx and Rx units. */
+       write_reg_high(ioaddr, CMR1, CMR1h_TxRxOFF); /* Disable Tx and Rx units. */
        write_reg(ioaddr, CMR2, CMR2_NULL);
 
        dev->base_addr = ioaddr;
@@ -323,7+323,7 @@ static int net_open(struct device *dev)
           port or interrupt may be shared. */
        if (irq2dev_map[dev->irq] != 0
                || (irq2dev_map[dev->irq] = dev) == 0
-               || request_irq(dev->irq, &net_interrupt)) {
+               || request_irq(dev->irq, &net_interrupt, 0, "atp")) {
                return -EAGAIN;
        }
 
@@ -333,7+333,7 @@ static int net_open(struct device *dev)
 }
 
 /* This routine resets the hardware.  We initialize everything, assuming that
-   the hardware may have been temporarily detacted. */
+   the hardware may have been temporarily detached. */
 static void hardware_init(struct device *dev)
 {
        struct net_local *lp = (struct net_local *)dev->priv;
@@ -459,7+459,7 @@ net_send_packet(struct sk_buff *skb, struct device *dev)
                lp->pac_cnt_in_tx_buf++;
                if (lp->tx_unit_busy == 0) {
                        trigger_send(ioaddr, length);
-                       lp->saved_tx_size = 0;                          /* Redundent */
+                       lp->saved_tx_size = 0;                          /* Redundant */
                        lp->re_tx = 0;
                        lp->tx_unit_busy = 1;
                } else
index 6988eae..e58f8c1 100644 (file)
@@ -89,7+89,7 @@ extern inline unsigned char inbyte(unsigned short port)
 }
 
 /* Read register OFFSET.
-   This command should aways be terminated with read_end(). */
+   This command should always be terminated with read_end(). */
 extern inline unsigned char read_nibble(short port, unsigned char offset)
 {
     unsigned char retval;
index ba59187..1efa2d0 100644 (file)
@@ -55,7+55,6 @@ static void autoirq_probe(int irq)
        set_bit(irq, (void *)&irq_bitmap);      /* irq_bitmap |= 1 << irq; */
        return;
 }
-struct sigaction autoirq_sigaction = { autoirq_probe, 0, SA_INTERRUPT, NULL};
 
 int autoirq_setup(int waittime)
 {
@@ -64,7+63,7 @@ int autoirq_setup(int waittime)
 
     irq_handled = 0;
     for (i = 0; i < 16; i++) {
-       if (!irqaction(i, &autoirq_sigaction))
+       if (!request_irq(i, autoirq_probe, SA_INTERRUPT, "irq probe"))
            set_bit(i, (void *)&irq_handled);   /* irq_handled |= 1 << i;*/
     }
     /* Update our USED lists. */
index f03b711..b34af4a 100644 (file)
@@ -194,9+194,9 @@ typedef unsigned char byte;
 /*
  * command register, accessed through DATA_PORT with low bits = COMMAND
  */
-#define RX_ALL         0x01 /* PROMISCIOUS */
-#define RX_BP          0x02 /* default: BROADCAST & PHYSICAL ADRESS */
-#define RX_MBP         0x03 /* MULTICAST, BROADCAST & PHYSICAL ADRESS */
+#define RX_ALL         0x01 /* PROMISCUOUS */
+#define RX_BP          0x02 /* default: BROADCAST & PHYSICAL ADDRESS */
+#define RX_MBP         0x03 /* MULTICAST, BROADCAST & PHYSICAL ADDRESS */
 
 #define TX_ENABLE      0x04 /* bit 2 */
 #define RX_ENABLE      0x08 /* bit 3 */
@@ -340,7+340,7 @@ de600_read_byte(unsigned char type, struct device *dev) { /* dev used by macros
 static int
 de600_open(struct device *dev)
 {
-       if (request_irq(DE600_IRQ, de600_interrupt)) {
+       if (request_irq(DE600_IRQ, de600_interrupt, 0, "de600")) {
                printk ("%s: unable to get IRQ %d\n", dev->name, DE600_IRQ);
                return 1;
        }
@@ -795,7+795,7 @@ adapter_init(struct device *dev)
  * Note that the returned window info will never be smaller than
  * DE600_MIN_WINDOW, i.e. 1024
  * This differs from the standard function, that can return an
- * arbitraily small window!
+ * arbitrarily small window!
  */
 #define min(a,b)       ((a)<(b)?(a):(b))
 static unsigned long
index 15cac65..9f1d2b8 100644 (file)
@@ -401,7+401,7 @@ de620_get_register(byte reg)
 static int
 de620_open(struct device *dev)
 {
-       if (request_irq(DE620_IRQ, de620_interrupt)) {
+       if (request_irq(DE620_IRQ, de620_interrupt, 0, "de620")) {
                printk ("%s: unable to get IRQ %d\n", dev->name, DE620_IRQ);
                return 1;
        }
@@ -917,7+917,7 @@ read_eeprom(void)
 {
        unsigned short wrd;
 
-       /* D-Link Ethernet adresses are in the series  00:80:c8:7X:XX:XX:XX */
+       /* D-Link Ethernet addresses are in the series  00:80:c8:7X:XX:XX:XX */
        wrd = ReadAWord(0x1aa); /* bytes 0 + 1 of NodeID */
        if (wrd != htons(0x0080)) /* Valid D-Link ether sequence? */
                return -1; /* Nope, not a DE-620 */
index 22cf5f4..e8d9a88 100644 (file)
 /* DE-620 DIC Command */
 #define W_DUMMY                0x00    /* DIC reserved command */
 #define W_CR           0x20    /* DIC write command register */
-#define W_NPR          0x40    /* DIC write Nect Page Register */
+#define W_NPR          0x40    /* DIC write Next Page Register */
 #define W_TBR          0x60    /* DIC write Tx Byte Count 1 reg */
 #define W_RSA          0x80    /* DIC write Remote Start Addr 1 */
 
 #define        W_SCR           0xa7    /* write system configuration register */
 #define        W_TCR           0xa8    /* write Transceiver Configuration reg */
 #define        W_EIP           0xa9    /* write EEPM Interface port */
-#define        W_PAR0          0xaa    /* write physical address registr 0 */
-#define        W_PAR1          0xab    /* write physical address registr 1 */
-#define        W_PAR2          0xac    /* write physical address registr 2 */
-#define        W_PAR3          0xad    /* write physical address registr 3 */
-#define        W_PAR4          0xae    /* write physical address registr 4 */
-#define        W_PAR5          0xaf    /* write physical address registr 5 */
+#define        W_PAR0          0xaa    /* write physical address register 0 */
+#define        W_PAR1          0xab    /* write physical address register 1 */
+#define        W_PAR2          0xac    /* write physical address register 2 */
+#define        W_PAR3          0xad    /* write physical address register 3 */
+#define        W_PAR4          0xae    /* write physical address register 4 */
+#define        W_PAR5          0xaf    /* write physical address register 5 */
 
 /* IDC 2 Command */
 #define        R_STS           0xc0    /* read status register */
 #define AUTOFFSET      0x02    /* auto shift address to TPR+12 */
 #define AUTOTX         0x01    /* auto tx when leave RW mode */
 
-/* Tranceiver Configuration Register */
+/* Transceiver Configuration Register */
 #define JABBER         0x80    /* generate jabber condition */
 #define TXSUCINT       0x40    /* enable tx success interrupt */
 #define T16INT         0x20    /* enable T16 interrupt */
index f19c69c..917a22a 100644 (file)
@@ -394,7+394,7 @@ depca_probe1(struct device *dev, short ioaddr)
     struct depca_private *lp;
     int i,j, status=0;
     unsigned long mem_start, mem_base[] = DEPCA_RAM_BASE_ADDRESSES;
-    char *name=(char *)NULL;
+    char *name = NULL;
     unsigned int nicsr, offset, netRAM;
 
 
@@ -420,7+420,7 @@ depca_probe1(struct device *dev, short ioaddr)
        if (((mem_chkd >> i) & 0x01) == 0) { /* has the memory been checked? */
          name = DepcaSignature(mem_base[i]);/* check for a DEPCA here */
          mem_chkd |= (0x01 << i);           /* mark location checked */
-         if (*name != (char)NULL) {         /* one found? */
+         if (*name != '\0') {                  /* one found? */
            j = 1;                           /* set exit flag */
          } else {
            i++;                             /* increment search index */
@@ -428,7+428,7 @@ depca_probe1(struct device *dev, short ioaddr)
        }
       }
 
-      if (*name != (char)NULL) {             /* found a DEPCA device */
+      if (*name != '\0') {             /* found a DEPCA device */
        mem_start = mem_base[i];
        dev->base_addr = ioaddr;
 
@@ -448,7+448,7 @@ depca_probe1(struct device *dev, short ioaddr)
         read the ROM info.
       */
 
-       if (strstr(name,"DE100")!=(char *)NULL) {
+       if (strstr(name,"DE100") != NULL) {
          j = 1;
        } else {
          j = 0;
@@ -471,7+471,7 @@ depca_probe1(struct device *dev, short ioaddr)
        /*
        ** Set up the maximum amount of network RAM(kB)
        */
-       if (strstr(name,"DEPCA")==(char *)NULL) {
+       if (strstr(name,"DEPCA") == NULL) {
          netRAM=64;
        } else {
          netRAM=48;
@@ -500,7+500,7 @@ depca_probe1(struct device *dev, short ioaddr)
        /*
        ** Enable the shadow RAM.
        */
-       if (strstr(name,"DEPCA")==(char *)NULL) {
+       if (strstr(name,"DEPCA") == NULL) {
          nicsr |= SHE;
          outb(nicsr, DEPCA_NICSR);
        }
@@ -662,7+662,7 @@ depca_open(struct device *dev)
     struct depca_private *lp = (struct depca_private *)dev->priv;
     int i,nicsr,ioaddr = dev->base_addr;
 
-    if (request_irq(dev->irq, &depca_interrupt)) {
+    if (request_irq(dev->irq, &depca_interrupt, 0, "depca")) {
         printk("depca_open(): Requested IRQ%d is busy\n",dev->irq);
        return -EAGAIN;
     }
@@ -1289,8+1289,7 @@ static void SetMulticastFilter(int num_addrs, char *addrs, char *multicast_table
 /*
 ** ISA bus I/O device probe
 */
-static struct device *isa_probe(dev)
-struct device *dev;
+static struct device *isa_probe(struct device *dev)
 {
   int *port, ports[] = DEPCA_IO_PORTS;
   int status;
@@ -1317,8+1316,7 @@ struct device *dev;
 ** EISA bus I/O device probe. Probe from slot 1 since slot 0 is usually
 ** the motherboard.
 */
-static struct device *eisa_probe(dev)
-struct device *dev;
+static struct device *eisa_probe(struct device *dev)
 {
   int i, ioaddr = DEPCA_EISA_IO_PORTS;
   int status;
@@ -1344,14+1342,12 @@ struct device *dev;
 ** Allocate the device by pointing to the next available space in the
 ** device structure. Should one not be available, it is created.
 */
-static struct device *alloc_device(dev, ioaddr)
-struct device *dev;
-int ioaddr;
+static struct device *alloc_device(struct device *dev, int ioaddr)
 {
   /*
   ** Check the device structures for an end of list or unused device
   */
-  while (dev->next != (struct device *)NULL) {
+  while (dev->next != NULL) {
     if (dev->next->base_addr == 0xffe0) break;
     dev = dev->next;         /* walk through eth device list */
     num_eth++;               /* increment eth device number */
@@ -1361,10+1357,10 @@ int ioaddr;
   ** If no more device structures, malloc one up. If memory could
   ** not be allocated, print an error message.
   */
-  if (dev->next == (struct device *)NULL) {
+  if (dev->next == NULL) {
     dev->next = (struct device *)kmalloc(sizeof(struct device) + 8,
                                         GFP_KERNEL);
-    if (dev->next == (struct device *)NULL) {
+    if (dev->next == NULL) {
       printk("eth%d: Device not initialised, insufficient memory\n",
             num_eth);
     }
@@ -1375,14+1371,14 @@ int ioaddr;
   ** and initialize it (name, I/O address, next device (NULL) and
   ** initialisation probe routine).
   */
-  if ((dev->next != (struct device *)NULL) &&
+  if ((dev->next != NULL) &&
       (num_eth > 0) && (num_eth < 9999)) {
-    dev = dev->next;                    /* point to the new device */
-    dev->name = (char *)(dev + sizeof(struct device));
+    dev = dev->next;                   /* point to the new device */
+    dev->name = (char *)(dev + 1);
     sprintf(dev->name,"eth%d", num_eth);/* New device name */
-    dev->base_addr = ioaddr;            /* assign the io address */
-    dev->next = (struct device *)NULL;  /* mark the end of list */
-    dev->init = &depca_probe;           /* initialisation routine */
+    dev->base_addr = ioaddr;           /* assign the io address */
+    dev->next = NULL;                  /* mark the end of list */
+    dev->init = &depca_probe;          /* initialisation routine */
     num_depcas++;
   }
 
@@ -1405,10+1401,10 @@ static char *DepcaSignature(unsigned long mem_addr)
   for (i=0;i<16;i++) {                  /* copy the first 16 bytes of ROM to */
     tmpstr[i] = *(unsigned char *)(mem_addr+0xc000+i); /* a temporary string */
   }
-  tmpstr[i]=(char)NULL;
+  tmpstr[i] = '\0';
 
   strcpy(thisName,"");
-  for (i=0;*signatures[i]!=(char)NULL && *thisName==(char)NULL;i++) {
+  for (i = 0 ; *signatures[i] != '\0' && *thisName == '\0' ; i++) {
     for (j=0,k=0;j<16 && k<strlen(signatures[i]);j++) {
       if (signatures[i][k] == tmpstr[j]) {              /* track signature */
        k++;
@@ -1463,7+1459,7 @@ static int DevicePresent(short ioaddr)
 ** Convert the ascii signature to a hex equivalent & pack in place 
 */
   if (fp) {                               /* only do this once!... */
-    for (i=0,j=0;devSig[i]!=(char)NULL && !status;i+=2,j++) {
+    for (i=0,j=0;devSig[i] != '\0' && !status;i+=2,j++) {
       if ((devSig[i]=asc2hex(devSig[i]))>=0) {
        devSig[i]<<=4;
        if((devSig[i+1]=asc2hex(devSig[i+1]))>=0){
index fc143a7..42df4d1 100644 (file)
        registers are set: first you do an inb() in what is normally the
        station address region, and the low three bits of next outb() *address*
        is used as the write value for that register.  Either someone wasn't
-       too used to dem bit en bites, or they were trying to obfusicate the
+       too used to dem bit en bites, or they were trying to obfuscate the
        programming     interface.
 
        There is an additional complication when setting the window on the packet
@@ -50,7+50,7 @@ static int e21_probe_list[] = {0x300, 0x280, 0x380, 0x220, 0};
 
 /* Offsets from the base_addr.
    Read from the ASIC register, and the low three bits of the next outb()
-   address is used to set the cooresponding register. */
+   address is used to set the corresponding register. */
 #define E21_NIC_OFFSET  0              /* Offset to the 8390 NIC. */
 #define E21_ASIC               0x10
 #define E21_MEM_ENABLE 0x10
@@ -164,7+164,7 @@ int e21_probe1(struct device *dev, int ioaddr)
        if (dev->irq < 2) {
                int irqlist[] = {15,11,10,12,5,9,3,4}, i;
                for (i = 0; i < 8; i++)
-                       if (request_irq (irqlist[i], NULL) != -EBUSY) {
+                       if (request_irq (irqlist[i], NULL, 0, "bogus") != -EBUSY) {
                                dev->irq = irqlist[i];
                                break;
                        }
@@ -235,7+235,7 @@ e21_open(struct device *dev)
 {
        short ioaddr = dev->base_addr;
 
-       if (irqaction (dev->irq, &ei_sigaction)) {
+       if (request_irq(dev->irq, ei_interrupt, 0, "e2100")) {
                return EBUSY;
        }
        irq2dev_map[dev->irq] = dev;
@@ -299,7+299,7 @@ e21_block_output(struct device *dev, int count, const unsigned char *buf,
        volatile char *shared_mem = (char *)dev->mem_start;
 
        /* Set the shared memory window start by doing a read, with the low address
-          bits specifing the starting page. */
+          bits specifying the starting page. */
        *(shared_mem + start_page);
        mem_on(ioaddr, shared_mem, start_page);
 
index ca9f664..dde116f 100644 (file)
@@ -5,7+5,7 @@
        Copyright 1993 United States Government as represented by the Director,
        National Security Agency.  This software may only be used and distributed
        according to the terms of the GNU Public License as modified by SRC,
-       incorported herein by reference.
+       incorporated herein by reference.
 
        The author may be reached as becker@super.org or
        C/O Supercomputing Research Ctr., 17100 Science Dr., Bowie MD 20715
@@ -28,7+28,7 @@ static char *version =
   Sources:
        This driver wouldn't have been written with the availability of the
        Crynwr driver source code.      It provided a known-working implementation
-       that filled in the gaping holes of the Intel documention.  Three cheers
+       that filled in the gaping holes of the Intel documentation.  Three cheers
        for Russ Nelson.
 
        Intel Microcommunications Databook, Vol. 1, 1990. It provides just enough
@@ -66,7+66,7 @@ static unsigned int net_debug = NET_DEBUG;
                        Details of the i82586.
 
    You'll really need the databook to understand the details of this part,
-   but the outline is that the i82586 has two seperate processing units.
+   but the outline is that the i82586 has two separate processing units.
 
    The Rx unit uses a list of frame descriptors and a list of data buffer
    descriptors.  We use full-sized (1518 byte) data buffers, so there is
@@ -298,7+298,7 @@ static void init_rx_bufs(struct device *dev);
 /* Check for a network adaptor of this type, and return '0' iff one exists.
    If dev->base_addr == 0, probe all likely locations.
    If dev->base_addr == 1, always return failure.
-   If dev->base_addr == 2, (detachable devices only) alloate space for the
+   If dev->base_addr == 2, (detachable devices only) allocate space for the
    device and return success.
    */
 int
@@ -348,7+348,7 @@ int eexp_probe1(struct device *dev, short ioaddr)
        station_addr[1] = read_eeprom(ioaddr, 3);
        station_addr[2] = read_eeprom(ioaddr, 4);
 
-       /* Check the first three octets of the S.A. for the manufactor's code. */
+       /* Check the first three octets of the S.A. for the manufacturer's code. */
        if (station_addr[2] != 0x00aa || (station_addr[1] & 0xff00) != 0x0000) {
                printk(" rejected (invalid address %04x%04x%04x).\n",
                           station_addr[2], station_addr[1], station_addr[0]);
@@ -422,7+422,7 @@ eexp_open(struct device *dev)
        if (irq2dev_map[dev->irq] != 0
                /* This is always true, but avoid the false IRQ. */
                || (irq2dev_map[dev->irq] = dev) == 0
-               || request_irq(dev->irq, &eexp_interrupt)) {
+               || request_irq(dev->irq, &eexp_interrupt, 0, "EExpress")) {
                return -EAGAIN;
        }
 
index d60b6b1..d1c0077 100644 (file)
@@ -42,7+42,7 @@ static char *version =
 /*
    The HP EtherTwist chip implementation is a fairly routine DP8390
    implementation.  It allows both shared memory and programmed-I/O buffer
-   access, using a custom interface for both.  The programed-I/O mode is
+   access, using a custom interface for both.  The programmed-I/O mode is
    entirely implemented in the HP EtherTwist chip, bypassing the problem
    ridden built-in 8390 facilities used on NE2000 designs.  The shared
    memory mode is likewise special, with an offset register used to make
@@ -235,7+235,7 @@ hpp_open(struct device *dev)
        int ioaddr = dev->base_addr - NIC_OFFSET;
        int option_reg;
 
-       if (request_irq(dev->irq, &ei_interrupt)) {
+       if (request_irq(dev->irq, &ei_interrupt, 0, "hp-plus")) {
            return -EAGAIN;
        }
 
index 1aee030..315a4f1 100644 (file)
@@ -124,13+124,13 @@ int hpprobe1(struct device *dev, int ioaddr)
                int *irqp = wordmode ? irq_16list : irq_8list;
                do {
                        int irq = *irqp;
-                       if (request_irq (irq, NULL) != -EBUSY) {
+                       if (request_irq (irq, NULL, 0, "bogus") != -EBUSY) {
                                autoirq_setup(0);
                                /* Twinkle the interrupt, and check if it's seen. */
                                outb_p(irqmap[irq] | HP_RUN, ioaddr + HP_CONFIGURE);
                                outb_p( 0x00 | HP_RUN, ioaddr + HP_CONFIGURE);
                                if (irq == autoirq_report(0)             /* It's a good IRQ line! */
-                                       && request_irq (irq, &ei_interrupt) == 0) {
+                                       && request_irq (irq, &ei_interrupt, 0, "hp") == 0) {
                                        printk(" selecting IRQ %d.\n", irq);
                                        dev->irq = *irqp;
                                        break;
@@ -144,7+144,7 @@ int hpprobe1(struct device *dev, int ioaddr)
        } else {
                if (dev->irq == 2)
                        dev->irq = 9;
-               if (irqaction(dev->irq, &ei_sigaction)) {
+               if (request_irq(dev->irq, ei_interrupt, 0, "hp")) {
                        printk (" unable to get IRQ %d.\n", dev->irq);
                        return EBUSY;
                }
index 798dcc7..4c036c2 100644 (file)
@@ -106,7+106,7 @@ the buffers are only used when needed as low-memory bounce buffers.
 IIIB. 16M memory limitations.
 For the ISA bus master mode all structures used directly by the LANCE,
 the initialization block, Rx and Tx rings, and data buffers, must be
-accessable from the ISA bus, i.e. in the lower 16M of real memory.
+accessible from the ISA bus, i.e. in the lower 16M of real memory.
 This is a problem for current Linux kernels on >16M machines. The network
 devices are initialized after memory initialization, and the kernel doles out
 memory from the top of memory downward.  The current solution is to have a
@@ -367,7+367,7 @@ lance_open(struct device *dev)
     int ioaddr = dev->base_addr;
     int i;
 
-    if (request_irq(dev->irq, &lance_interrupt)) {
+    if (request_irq(dev->irq, &lance_interrupt, 0, "lance")) {
        return -EAGAIN;
     }
 
index 442b781..c86d82e 100644 (file)
@@ -57,7+57,7 @@ static void ne_block_output(struct device *dev, const int count,
    SA prefix.
 
    Reading the SAPROM from a word-wide card with the 8390 set in byte-wide
-   mode results in doubled values, which can be detected and compansated for.
+   mode results in doubled values, which can be detected and compensated for.
 
    The probe is also responsible for initializing the card and filling
    in the 'dev' and 'ei_status' structures.
@@ -218,7+218,7 @@ static int neprobe1(int ioaddr, struct device *dev, int verbose)
     /* Snarf the interrupt now.  There's no point in waiting since we cannot
        share and the board will usually be enabled. */
     {
-       int irqval = irqaction (dev->irq, &ei_sigaction);
+       int irqval = request_irq (dev->irq, ei_interrupt, 0, "ne");
        if (irqval) {
            printk (" unable to get IRQ %d (irqval=%d).\n", dev->irq, irqval);
            return 0;
@@ -311,7+311,7 @@ ne_block_input(struct device *dev, int count, char *buf, int ring_offset)
 
     /* This was for the ALPHA version only, but enough people have
        encountering problems that it is still here.  If you see
-       this message you either 1) have an slightly imcompatible clone
+       this message you either 1) have a slightly incompatible clone
        or 2) have noise/speed problems with your bus. */
     if (ei_debug > 1) {                /* DMA termination address check... */
        int addr, tries = 20;
@@ -360,7+360,7 @@ ne_block_output(struct device *dev, int count,
 #if defined(rw_bugfix)
     /* Handle the read-before-write bug the same way as the
        Crynwr packet driver -- the NatSemi method doesn't work.
-       Actually this doesn't aways work either, but if you have
+       Actually this doesn't always work either, but if you have
        problems with your NEx000 this is better than nothing! */
     outb_p(0x42, nic_base + EN0_RCNTLO);
     outb_p(0x00,   nic_base + EN0_RCNTHI);
index c2237f4..72c7cbd 100644 (file)
@@ -4,7+4,7 @@
        Copyright 1993 United States Government as represented by the Director,
        National Security Agency.  This software may only be used and distributed
        according to the terms of the GNU Public License as modified by SRC,
-       incorported herein by reference.
+       incorporated herein by reference.
 
        The author may be reached as becker@super.org or
        C/O Supercomputing Research Ctr., 17100 Science Dr., Bowie MD 20715
index 0bea83c..7b3d105 100644 (file)
@@ -360,7+360,7 @@ plip_open(struct device *dev)
     rcv->skb->len = dev->mtu;
     rcv->skb->dev = dev;
     cli();
-    if (request_irq(dev->irq , plip_interrupt) != 0) {
+    if (request_irq(dev->irq , plip_interrupt, 0, "plip") != 0) {
        sti();
        printk("%s: couldn't get IRQ %d.\n", dev->name, dev->irq);
        return -EAGAIN;
@@ -433,7+433,7 @@ plip_rebuild_header(void *buff, struct device *dev, unsigned long dst,
     int i;
 
     if (eth->h_proto != htons(ETH_P_IP)) {
-       printk("plip_rebuild_header: Don't know how to resolve type %d addreses?\n",(int)eth->h_proto);
+       printk("plip_rebuild_header: Don't know how to resolve type %d addresses?\n",(int)eth->h_proto);
        memcpy(eth->h_source, dev->dev_addr, dev->addr_len);
        return 0;
     }
index a73e192..0bfdd71 100644 (file)
 
    Flags for this module (any combination is acceptable for testing.):
 
-   NET02D            - Define if using Net-2-Debugged in kernels earler
+   NET02D            - Define if using Net-2-Debugged in kernels earlier
                        than v1.1.4.
 
    NEW_TTY_DRIVERS    -        Define if using new Ted Ts'o's alpha TTY drivers
 int ppp_debug = 2;
 int ppp_debug_netpackets = 0;
 
-/* Define this string only once for all macro envocations */
+/* Define this string only once for all macro invocations */
 static char ppp_warning[] = KERN_WARNING "PPP: ALERT! not INUSE! %d\n";
 
 int ppp_init(struct device *);
@@ -1218,7+1218,7 @@ ppp_read(struct tty_struct *tty, struct file *file, unsigned char *buf, unsigned
   int len, i;
 
   if (!ppp || ppp->magic != PPP_MAGIC) {
-    PRINTKN (1,(KERN_ERR "ppp_read: cannnot find ppp channel\n"));
+    PRINTKN (1,(KERN_ERR "ppp_read: cannot find ppp channel\n"));
     return -EIO;
   }
 
index e63c486..550b2c0 100644 (file)
@@ -171,7+171,7 @@ static char *rcsid = "$Id: sk_g16.c,v 1.1 1994/06/30 16:25:15 root Exp $";
  */
 
 /* 
- * Scheider & Koch manufactorer code (00:00:a5).
+ * Scheider & Koch manufacturer code (00:00:a5).
  * This must be checked, that we are sure it is a SK card.
  */
 
@@ -227,7+227,7 @@ static char *rcsid = "$Id: sk_g16.c,v 1.1 1994/06/30 16:25:15 root Exp $";
 
 /* 
  * Register transfer: 0 = no transfer
- *                    1 = transfering data between LANCE and I/O reg 
+ *                    1 = transferring data between LANCE and I/O reg 
  */
 #define SK_IORUN        0x20   
 
@@ -260,7+260,7 @@ static char *rcsid = "$Id: sk_g16.c,v 1.1 1994/06/30 16:25:15 root Exp $";
 #define SK_DOIO         0x80   /* Do Transfer */ 
  
 /* 
- * LANCE RAP (Register Adress Port). 
+ * LANCE RAP (Register Address Port). 
  * ---------------------------------
  */
 
@@ -271,7+271,7 @@ static char *rcsid = "$Id: sk_g16.c,v 1.1 1994/06/30 16:25:15 root Exp $";
  * CSR0 - Status and Control flags 
  * CSR1 - Low order bits of initialize block (bits 15:00)
  * CSR2 - High order bits of initialize block (bits 07:00, 15:08 are reserved)
- * CSR3 - Allows redifinition of the Bus Master Interface.
+ * CSR3 - Allows redefinition of the Bus Master Interface.
  *        This register must be set to 0x0002, which means BSWAP = 0,
  *        ACON = 1, BCON = 0;
  *
@@ -356,7+356,7 @@ static char *rcsid = "$Id: sk_g16.c,v 1.1 1994/06/30 16:25:15 root Exp $";
  * Normal way of live is: 
  *
  * For the whole thing get going let both symbolic constants
- * undefined. If you face any problems and you know whats going
+ * undefined. If you face any problems and you know what's going
  * on (you know something about the card and you can interpret some
  * hex LANCE register output) then define SK_DEBUG
  * 
@@ -388,7+388,7 @@ static char *rcsid = "$Id: sk_g16.c,v 1.1 1994/06/30 16:25:15 root Exp $";
  *
  * dual ported RAM: This is the only memory region which the LANCE chip
  *      has access to. From the Lance it is addressed from 0x0000 to
- *      0x3fbf. The host accesses it normaly.
+ *      0x3fbf. The host accesses it normally.
  *
  * PROM: The PROM obtains the ETHERNET-MAC-Address. It is realised as a
  *       8-Bit PROM, this means only the 16 even addresses are used of the
@@ -514,8+514,8 @@ int    SK_rread_reg(void);
 void   SK_write_reg(int reg_number, int value);
 
 /* 
- * Debuging functions
- * ------------------
+ * Debugging functions
+ * -------------------
  */
 
 void SK_print_pos(struct device *dev, char *text);
@@ -546,7+546,7 @@ void SK_print_ram(struct device *dev);
  * Check for a network adaptor of this type, and return '0' if one exists.
  * If dev->base_addr == 0, probe all likely locations.
  * If dev->base_addr == 1, always return failure.
- * If dev->base_addr == 2, alloate space for the device and return success
+ * If dev->base_addr == 2, allocate space for the device and return success
  *                         (detachable devices only).
  */
 
@@ -624,7+624,7 @@ int SK_init(struct device *dev)
  *                  
  * Parameters     : I : struct device *dev - SK_G16 device structure
  *                  I : short ioaddr       - I/O Port address where POS is.
- * Return Value   : 0 = Initilization done             
+ * Return Value   : 0 = Initialization done             
  * Errors         : ENODEV - No SK_G16 found
  *                  -1     - Configuration problem
  * Globals        : irq2dev_map - Which device uses which IRQ
@@ -761,7+761,7 @@ int SK_probe(struct device *dev, short ioaddr)
        dev->dev_addr[i] = board->rom[j];          
     }
 
-    /* Check for manufactorer code */
+    /* Check for manufacturer code */
     if (!(dev->dev_addr[0] == SK_MAC0 &&
          dev->dev_addr[1] == SK_MAC1 &&
          dev->dev_addr[2] == SK_MAC2) )
@@ -782,7+782,7 @@ int SK_probe(struct device *dev, short ioaddr)
            dev->dev_addr[4],
            dev->dev_addr[5]);
 
-    /* Grap the I/O Port region */
+    /* Grab the I/O Port region */
     snarf_region(ioaddr, ETHERCARD_TOTAL_SIZE);
 
     /* Initialize device structure */
@@ -841,11+841,11 @@ int SK_probe(struct device *dev, short ioaddr)
  * Date Created   : 94/05/26
  *
  * Description    : This function is called sometimes after booting 
- *                  when ifconfig programm is run.
+ *                  when ifconfig program is run.
  *
  *                  This function requests an IRQ, sets the correct
  *                  IRQ in the card. Then calls SK_lance_init() to 
- *                  init and start the LANCE chip. Then if everthing is 
+ *                  init and start the LANCE chip. Then if everything is 
  *                  ok returns with 0 (OK), which means SK_G16 is now
  *                  opened and operational.
  *
@@ -888,7+888,7 @@ static int SK_open(struct device *dev)
 
        do
        {
-         irqval = request_irq(irqtab[i], &SK_interrupt);
+         irqval = request_irq(irqtab[i], &SK_interrupt, 0, "sk_g16");
          i++;
        } while (irqval && irqtab[i]);
 
@@ -905,7+905,7 @@ static int SK_open(struct device *dev)
     }
     else if (dev->irq == 2) /* IRQ2 is always IRQ9 */
     {
-       if (request_irq(9, &SK_interrupt))
+       if (request_irq(9, &SK_interrupt, 0, "sk_g16"))
        {
            printk("%s: unable to get IRQ 9\n", dev->name);
            return -EAGAIN;
@@ -926,7+926,7 @@ static int SK_open(struct device *dev)
 
        /* check if IRQ free and valid. Then install Interrupt handler */
 
-       if (request_irq(dev->irq, &SK_interrupt))
+       if (request_irq(dev->irq, &SK_interrupt, 0, "sk_g16"))
        {
            printk("%s: unable to get selected IRQ\n", dev->name);
            return -EAGAIN;
@@ -1071,7+1071,7 @@ static int SK_lance_init(struct device *dev, unsigned short mode)
 
        rmdp->u.s.status = RX_OWN;  
 
-       rmdp->blen = -PKT_BUF_SZ;    /* Buffer Size in a two's comliment */
+       rmdp->blen = -PKT_BUF_SZ;    /* Buffer Size in a two's complement */
 
        rmdp->mlen = 0;              /* init message length */       
        
@@ -1086,7+1086,7 @@ static int SK_lance_init(struct device *dev, unsigned short mode)
        (p->ram)->ib.paddr[i] = dev->dev_addr[i]; 
     }
 
-    for (i = 0; i < 8; i++)          /* Set multicast, logical adress */
+    for (i = 0; i < 8; i++)          /* Set multicast, logical address */
     {
        (p->ram)->ib.laddr[i] = 0;   /* We do not use logical addressing */
     } 
@@ -1096,7+1096,7 @@ static int SK_lance_init(struct device *dev, unsigned short mode)
     (p->ram)->ib.rdrp = (int)  p->rmdhead | RMDNUMMASK;
     (p->ram)->ib.tdrp = (int)  p->tmdhead | TMDNUMMASK;
 
-    /* Prepare LANCE Controll and Status Registers */
+    /* Prepare LANCE Control and Status Registers */
 
     cli();
 
@@ -1107,7+1107,7 @@ static int SK_lance_init(struct device *dev, unsigned short mode)
      * PC Memory locations.
      *
      * In structure SK_ram is defined that the first thing in ram
-     * is the initalization block. So his address is for LANCE always
+     * is the initialization block. So his address is for LANCE always
      * 0x0000
      *
      * CSR1 contains low order bits 15:0 of initialization block address
@@ -1127,7+1127,7 @@ static int SK_lance_init(struct device *dev, unsigned short mode)
     /* Initialize LANCE */
 
     /* 
-     * INIT = Initialize, when set, cuases the LANCE to begin the
+     * INIT = Initialize, when set, causes the LANCE to begin the
      * initialization procedure and access the Init Block.
      */
 
@@ -1429,7+1429,7 @@ static void SK_txintr(struct device *dev)
             p->stats.tx_fifo_errors++;
 
             /* 
-             * If UFLO error occurs it will turn tranmitter of.
+             * If UFLO error occurs it will turn transmitter of.
              * So we must reinit LANCE
              */
 
@@ -1582,7+1582,7 @@ static void SK_rxintr(struct device *dev)
                 * to Lance, update statistics and go ahead.
                 */
 
-               rmdp->u.s.status = RX_OWN;  /* Reliquish ownershipt to LANCE */
+               rmdp->u.s.status = RX_OWN;  /* Relinquish ownership to LANCE */
                printk("%s: Couldn't allocate sk_buff, deferring packet.\n",
                       dev->name);
                p->stats.rx_dropped++;
@@ -1662,7+1662,7 @@ static int SK_close(struct device *dev)
     dev->tbusy = 1;                /* Transmitter busy */
     dev->start = 0;                /* Card down */
 
-    printk("%s: Shuting %s down CSR0 %#06x\n", dev->name, SK_NAME, 
+    printk("%s: Shutting %s down CSR0 %#06x\n", dev->name, SK_NAME, 
            (int) SK_read_reg(CSR0));
 
     SK_write_reg(CSR0, CSR0_STOP); /* STOP the LANCE */
@@ -1670,7+1670,7 @@ static int SK_close(struct device *dev)
     free_irq(dev->irq);            /* Free IRQ */
     irq2dev_map[dev->irq] = 0;     /* Mark IRQ as unused */
 
-    return 0; /* always succed */
+    return 0; /* always succeed */
     
 } /* End of SK_close() */
 
@@ -1710,14+1710,14 @@ static struct enet_statistics *SK_get_stats(struct device *dev)
  * Author         : Patrick J.D. Weichmann
  * Date Created   : 94/05/26
  *
- * Description    : This function gets called when a programm performs
+ * Description    : This function gets called when a program performs
  *                  a SIOCSIFFLAGS call. Ifconfig does this if you call
- *                  'ifconfig [-]allmultie' which enables or disables the
- *                  Promiscous mode.
- *                  Promiscous mode is when the Network card accepts all
+ *                  'ifconfig [-]allmulti' which enables or disables the
+ *                  Promiscuous mode.
+ *                  Promiscuous mode is when the Network card accepts all
  *                  packets, not only the packets which match our MAC 
  *                  Address. It is useful for writing a network monitor,
- *                  but it is also a security problem. You have to remeber
+ *                  but it is also a security problem. You have to remember
  *                  that all information on the net is not encrypted.
  *
  * Parameters     : I : struct device *dev - SK_G16 device Structure
@@ -1733,7+1733,7 @@ static struct enet_statistics *SK_get_stats(struct device *dev)
 
 /* Set or clear the multicast filter for SK_G16.
  *
- * num_addrs == -1      Promiscous mode, receive all packets
+ * num_addrs == -1      Promiscuous mode, receive all packets
  * num_addrs == 0       Normal mode, clear multicast list
  * num_addrs > 0        Multicast mode, receive normal and MC packets
  */
@@ -1853,7+1853,7 @@ void SK_reset_board(void)
 {
     int i;
 
-    SK_PORT = 0x00;           /* Reset aktiv */
+    SK_PORT = 0x00;           /* Reset active */
     for (i = 0; i < 10 ; i++) /* Delay min 5ms */
        ;
     SK_PORT = SK_RESET;       /* Set back to normal operation */
@@ -1867,7+1867,7 @@ void SK_reset_board(void)
  * Date Created   : 94/05/25
  *
  * Description    : Set LANCE Register Address Port to register
- *                  for later data trasfer.
+ *                  for later data transfer.
  *
  * Parameters     : I : reg_number - which CSR to read/write from/to
  * Return Value   : None
@@ -2067,7+2067,7 @@ void SK_print_dev(struct device *dev, char *text)
  *
  * Description    : This function is used to check how are things set up
  *                  in the 16KB RAM. Also the pointers to the receive and 
- *                  transmit descriptor rings and rx und tx buffers locations.
+ *                  transmit descriptor rings and rx and tx buffers locations.
  *                  It contains a minor bug in printing, but has no effect to the values
  *                  only newlines are not correct.
  *
index 96b70f9..d71ecb2 100644 (file)
 #define CSR0_CERR      0x2000  /* Collision Error (RC) */
 #define CSR0_MISS      0x1000  /* Missed packet (RC) */
 #define CSR0_MERR      0x0800  /* Memory Error  (RC) */ 
-#define CSR0_RINT      0x0400  /* Reciever Interrupt (RC) */
+#define CSR0_RINT      0x0400  /* Receiver Interrupt (RC) */
 #define CSR0_TINT       0x0200 /* Transmit Interrupt (RC) */ 
 #define CSR0_IDON      0x0100  /* Initialization Done (RC) */
 #define CSR0_INTR      0x0080  /* Interrupt Flag (R) */
 #define MODE_DTCR      0x0008  /* Disable Transmit CRC) */
 #define MODE_LOOP      0x0004  /* Loopback */
 #define MODE_DTX       0x0002  /* Disable the Transmitter */ 
-#define MODE_DRX       0x0001  /* Disable the Reciever */
+#define MODE_DRX       0x0001  /* Disable the Receiver */
 
 #define MODE_NORMAL    0x0000  /* Normal operation mode */
 
index 45dd2f0..fd3ae9d 100644 (file)
@@ -116,7+116,7 @@ extern void chipset_init(struct device *dev, int startp);
 /* Check for a network adaptor of this type, and return '0' iff one exists.
    If dev->base_addr == 0, probe all likely locations.
    If dev->base_addr == 1, always return failure.
-   If dev->base_addr == 2, alloate space for the device and return success
+   If dev->base_addr == 2, allocate space for the device and return success
    (detachable devices only).
    */
 int
@@ -154,7+154,7 @@ int netcard_probe1(struct device *dev, short ioaddr)
        for (i = 0; i < 6; i++) {
                station_addr[i] = inb(ioaddr + i);
        }
-       /* Check the first three octets of the S.A. for the manufactor's code. */ 
+       /* Check the first three octets of the S.A. for the manufacturer's code. */ 
        if (station_addr[0] != SA_ADDR0
                ||       station_addr[1] != SA_ADDR1 || station_addr[2] != SA_ADDR2) {
                return ENODEV;
@@ -166,7+166,7 @@ int netcard_probe1(struct device *dev, short ioaddr)
 #ifdef jumpered_interrupts
        /* If this board has jumpered interrupts, snarf the interrupt vector
           now.  There is no point in waiting since no other device can use
-          the interrupt, and this marks the 'irqaction' as busy. */
+          the interrupt, and this marks the irq as busy. */
 
        if (dev->irq == -1)
                ;                       /* Do nothing: a user-level program will set it. */
@@ -182,7+182,7 @@ int netcard_probe1(struct device *dev, short ioaddr)
         or don't know which one to set. */
          dev->irq = 9;
 
-       {        int irqval = request_irq(dev->irq, &net_interrupt);
+       {        int irqval = request_irq(dev->irq, &net_interrupt, 0, "skeleton");
                 if (irqval) {
                         printk ("%s: unable to get IRQ %d (irqval=%d).\n", dev->name,
                                         dev->irq, irqval);
@@ -230,7+230,7 @@ net_open(struct device *dev)
 
        /* This is used if the interrupt line can turned off (shared).
           See 3c503.c for an example of selecting the IRQ at config-time. */
-       if (request_irq(dev->irq, &net_interrupt)) {
+       if (request_irq(dev->irq, &net_interrupt, 0, "skeleton")) {
                return -EAGAIN;
        }
 
index 3735028..9063a97 100644 (file)
  * from this software without specific prior written permission.
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
  *     Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:
  *     - Initial distribution.
index 0044b02..387b848 100644 (file)
  * from this software without specific prior written permission.
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
  *     Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:
  *     - Initial distribution.
  *
  * There are 5 numbers which can change (they are always inserted
  * in the following order): TCP urgent pointer, window,
- * acknowlegement, sequence number and IP ID.  (The urgent pointer
+ * acknowledgment, sequence number and IP ID.  (The urgent pointer
  * is different from the others in that its value is sent, not the
  * change in value.)  Since typical use of SLIP links is biased
  * toward small packets (see comments on MTU/MSS below), changes
index 8b2b7a7..3296f4a 100644 (file)
@@ -178,7+178,7 @@ ultra_open(struct device *dev)
 {
   int ioaddr = dev->base_addr - ULTRA_NIC_OFFSET; /* ASIC addr */
 
-  if (irqaction(dev->irq, &ei_sigaction))
+  if (request_irq(dev->irq, ei_interrupt, 0, "SMC Ultra"))
       return -EAGAIN;
 
   outb(ULTRA_MEMENB, ioaddr);  /* Enable memory, 16 bit mode. */
index 0faff32..6a11be4 100644 (file)
@@ -216,7+216,7 @@ int wdprobe1(int ioaddr, struct device *dev)
        
        /* Snarf the interrupt now.  There's no point in waiting since we cannot
           share and the board will usually be enabled. */
-       if (irqaction (dev->irq, &ei_sigaction)) {
+       if (request_irq(dev->irq, ei_interrupt, 0, "wd")) {
                printk (" unable to get IRQ %d.\n", dev->irq);
                return 0;
        }
index ca79a94..95317e1 100644 (file)
@@ -28,8+28,8 @@ static char *version = "znet.c:v1.01 7/1/94 becker@cesdis.gsfc.nasa.gov\n";
        DMA     channels, one interrupt, and one 8-bit I/O port.
 
        While there     several ways to configure '593 DMA system, I chose the one
-       that seemed commesurate with the highest system performance in the face
-       of moderate interrupt latency: Both DMA channels are configued as
+       that seemed commensurate with the highest system performance in the face
+       of moderate interrupt latency: Both DMA channels are configured as
        recirculating ring buffers, with one channel (#0) dedicated to Rx and
        the other channel (#1) to Tx and configuration.  (Note that this is
        different than the Crynwr driver, where the Tx DMA channel is initialized
@@ -126,7+126,7 @@ struct znet_private {
        /* The starting, current, and end pointers for the packet buffers. */
        ushort *rx_start, *rx_cur, *rx_end;
        ushort *tx_start, *tx_cur, *tx_end;
-       ushort tx_buf_len;                      /* Tx buffer lenght, in words. */
+       ushort tx_buf_len;                      /* Tx buffer length, in words. */
 };
 
 /* Only one can be built-in;-> */
@@ -136,14+136,14 @@ static ushort dma_buffer2[DMA_BUF_SIZE/2];
 static ushort dma_buffer3[DMA_BUF_SIZE/2 + 8];
 
 /* The configuration block.  What an undocumented nightmare.  The first
-   set of values are those suggested (without explaination) for ethernet
+   set of values are those suggested (without explanation) for ethernet
    in the Intel 82586 databook.         The rest appear to be completely undocumented,
    except for cryptic notes in the Crynwr packet driver.  This driver uses
    the Crynwr values verbatim. */
 
 static unsigned char i593_init[] = {
   0xAA,                                        /* 0: 16-byte input & 80-byte output FIFO. */
-                                               /*        threshhold, 96-byte FIFO, 82593 mode. */
+                                               /*        threshold, 96-byte FIFO, 82593 mode. */
   0x88,                                        /* 1: Continuous w/interrupts, 128-clock DMA.*/
   0x2E,                                        /* 2: 8-byte preamble, NO address insertion, */
                                                /*        6-byte Ethernet address, loopback off.*/
@@ -247,7+247,7 @@ int znet_probe(struct device *dev)
        zn.tx_dma = netinfo->dma2;
 
        /* These should never fail.  You can't add devices to a sealed box! */
-       if (request_irq(dev->irq, &znet_interrupt)
+       if (request_irq(dev->irq, &znet_interrupt, 0, "ZNet")
                || request_dma(zn.rx_dma)
                || request_dma(zn.tx_dma)) {
                printk(KERN_WARNING "%s: Not opened -- resource busy?!?\n", dev->name);
index dece0fa..03aba1d 100644 (file)
 
 /*
  * Design issues : 
- * The cumulative latency needed to propogate a read/write request 
+ * The cumulative latency needed to propagate a read/write request 
  * through the filesystem, buffer cache, driver stacks, SCSI host, and 
  * SCSI device is ultimately the limiting factor in throughput once we 
  * have a sufficiently fast host adapter.
  * So, to maximize performance we want to keep the ratio of latency to data 
  * transfer time to a minimum by
  * 1.  Minimizing the total number of commands sent (typical command latency
- *     including drive and busmatering host overhead is as high as 4.5ms)
+ *     including drive and busmastering host overhead is as high as 4.5ms)
  *     to transfer a given amount of data.  
  *
  *      This is accomplished by placing no arbitrary limit on the number
  *             means that we must service an interrupt for each 
  *             disconnect/reconnect.
  * 
- * 3.  Eliminating latency by piplining operations at the different levels.
+ * 3.  Eliminating latency by pipelining operations at the different levels.
  *     
  *     This driver allows a configurable number of commands to be enqueued
  *     for each target/lun combination (experimentally, I have discovered
  *     
  *
  * Architecture : 
- * This driver is built arround two queues of commands waiting to 
+ * This driver is built around two queues of commands waiting to 
  * be executed - the Linux issue queue, and the shared Linux/NCR  
  * queue which are manipulated by the NCR53c7xx_queue_command and 
  * NCR53c7x0_intr routines.
@@ -192,7+192,7 @@ static void NCR53c8x0_soft_reset (struct Scsi_Host *host);
 static struct Scsi_Host *first_host = NULL;    /* Head of list of NCR boards */
 static Scsi_Host_Template *the_template = NULL;        
 
-/* Alocate storage space for constant messages, etc. */
+/* Allocate storage space for constant messages, etc. */
 
 static long NCR53c7xx_zero = 0;                        
 static long NCR53c7xx_sink;
@@ -231,14+231,14 @@ static char scan_scsis_buf[512];
  *             programmed on selection, so we need to add more code.
  * 
  *     NCR53c700/700-66 - need to add code to refix addresses on 
- *             every nexus change, elimate all table indirect code.
+ *             every nexus change, eliminate all table indirect code.
  *
  * 3.  The NCR53c7x0 series is very popular on other platforms that 
  *     could be running Linux - ie, some high performance AMIGA SCSI 
  *     boards use it.  
  *     
  *     So, I should include #ifdef'd code so that it is 
- *     compatable with these systems.
+ *     compatible with these systems.
  *     
  *     Specifically, the little Endian assumptions I made in my 
  *     bit fields need to change, and if the NCR doesn't see memory
@@ -257,7+257,7 @@ static char scan_scsis_buf[512];
  * different defines.
  *
  *
- * Allow for simultaneous existance of mutliple SCSI scripts so we 
+ * Allow for simultaneous existence of multiple SCSI scripts so we 
  * can have a single driver binary for all of the family.
  *
  * - one for NCR53c700 and NCR53c700-66 chips  (not yet supported)
@@ -327,7+327,7 @@ static int no_overrides = 0;
  * Purpose : LILO command line initialization of the overrides array,
  * 
  * Inputs : board - currently, unsupported.  chip - 700, 70066, 710, 720
- *     810, 815, 820, 825, allthough currently only the NCR53c810 is 
+ *     810, 815, 820, 825, although currently only the NCR53c810 is 
  *     supported.
  * 
  */
@@ -390,9+390,6 @@ setup_wrapper(815)
 setup_wrapper(820)
 setup_wrapper(825)
 
-static struct sigaction NCR53c7x0_sigaction =  { NCR53c7x0_intr, 0, 
-    SA_INTERRUPT , NULL };
-
 /* 
  * Function : static int NCR53c7x0_init (struct Scsi_Host *host)
  *
@@ -433,7+430,7 @@ static int NCR53c7x0_init (struct Scsi_Host *host) {
     }
 
     /*
-     * Set up an interrupt handler if we aren't allready sharing an IRQ
+     * Set up an interrupt handler if we aren't already sharing an IRQ
      * with another board.
      */
 
@@ -441,7+438,7 @@ static int NCR53c7x0_init (struct Scsi_Host *host) {
        (search->irq != host->irq); search=search->next);
 
     if (!search) {
-       if (irqaction (host->irq, &NCR53c7x0_sigaction)) {
+       if (request_irq(host->irq, NCR53c7x0_intr, SA_INTERRUPT, "53c7,8xx")) {
            printk("scsi%d : IRQ%d not free, detaching\n", 
                host->host_no, host->irq);
            scsi_unregister (host);
@@ -463,7+460,7 @@ static int NCR53c7x0_init (struct Scsi_Host *host) {
 
 /* 
  * XXX - the NCR53c700 uses bitfielded registers for SCID, SDID, etc,
- *     as does the 710 with one bit per SCSI ID.  Conversly, the NCR
+ *     as does the 710 with one bit per SCSI ID.  Conversely, the NCR
  *     uses a normal, 3 bit binary representation of these values.
  *
  * Get the rest of the NCR documentation, and FIND OUT where the change
@@ -499,7+496,7 @@ static int NCR53c7x0_init (struct Scsi_Host *host) {
     }
 
     /*
-     * On NCR53c700 series chips, DCNTL controls the SCSI clock dvisior,
+     * On NCR53c700 series chips, DCNTL controls the SCSI clock divisor,
      * on 800 series chips, it allows for a totem-pole IRQ driver.
      */
     hostdata->saved_dcntl = NCR53c7x0_read8(DCNTL_REG);
@@ -578,7+575,7 @@ static int NCR53c7x0_init (struct Scsi_Host *host) {
            hostdata->busy[i][j] = 0;
        /* 
         * NCR53c700 and NCR53c700-66 chips lack the DSA and use a 
-        * different architecture.  For chips using the DSA architecutre,
+        * different architecture.  For chips using the DSA architecture,
         * initialize the per-target synchronous parameters. 
         */
        if (hostdata->chip != 700 && hostdata->chip != 70066) {
@@ -652,7+649,7 @@ static int NCR53c7x0_init (struct Scsi_Host *host) {
  * Purpose : initializes a NCR53c7,8x0 based on base addresses,
  *     IRQ, and DMA channel.   
  *     
- *     Useful where a new NCR chip is backwards compatable with
+ *     Useful where a new NCR chip is backwards compatible with
  *     a supported chip, but the DEVICE ID has changed so it 
  *     doesn't show up when the autoprobe does a pcibios_find_device.
  *
@@ -724,11+721,11 @@ static int normal_init (Scsi_Host_Template *tpnt, int board, int chip,
     }
 
     /*
-     * Being memory mapped is more desireable, since 
+     * Being memory mapped is more desirable, since 
      *
      * - Memory accesses may be faster.
      *
-     * - The destination and source addresse spaces are the same for 
+     * - The destination and source address spaces are the same for 
      *  all instructions, meaning we don't have to twiddle dmode or 
      *  any other registers.
      *
@@ -780,7+777,7 @@ static int normal_init (Scsi_Host_Template *tpnt, int board, int chip,
  *     reprogramming of latency timer and determining addresses
  *     and weather bus mastering, etc. are OK.
  *     
- *     Useful where a new NCR chip is backwards compatable with
+ *     Useful where a new NCR chip is backwards compatible with
  *     a supported chip, but the DEVICE ID has changed so it 
  *     doesn't show up when the autoprobe does a pcibios_find_device.
  *
@@ -825,7+822,7 @@ static int pci_init (Scsi_Host_Template *tpnt, int board, int chip,
        (error = pcibios_read_config_byte (bus, device_fn, PCI_INTERRUPT_LINE,
            &irq))) {
        printk ("scsi-ncr53c7,8xx : error %s not initializing due to error reading configuration space\n"
-               "        perhaps you specied an incorrect PCI bus, device, or function.\n"
+               "        perhaps you specified an incorrect PCI bus, device, or function.\n"
                , pcibios_strerror(error));
        return -1;
     }
@@ -904,7+901,7 @@ static int pci_init (Scsi_Host_Template *tpnt, int board, int chip,
  * Function : int NCR53c7xx_detect(Scsi_Host_Template *tpnt)
  *
  * Purpose : detects and initializes NCR53c7,8x0 SCSI chips
- *     that were autoprobed, overriden on the LILO command line, 
+ *     that were autoprobed, overridden on the LILO command line, 
  *     or specified at compile time.
  *
  * Inputs : tpnt - template for this SCSI adapter
@@ -1028,9+1025,9 @@ static void NCR53c8x0_init_fixup (struct Scsi_Host *host) {
     patch_abs_32 (hostdata->script, 0, addr_temp, base + TEMP_REG);
 
     /*
-     * I needed some variables in the script to be accessable to 
+     * I needed some variables in the script to be accessible to 
      * both the NCR chip and the host processor. For these variables,
-     * I made the arbitrary decession to store them directly in the 
+     * I made the arbitrary decision to store them directly in the 
      * hostdata structure rather than in the RELATIVE area of the 
      * SCRIPTS.
      */
@@ -1111,7+1108,7 @@ static void NCR53c8x0_init_fixup (struct Scsi_Host *host) {
  * Function : static int NCR53c8xx_run_tests (struct Scsi_Host *host)
  *
  * Purpose : run various verification tests on the NCR chip, 
- *     including interrupt generation, and propper bus mastering
+ *     including interrupt generation, and proper bus mastering
  *     operation.
  * 
  * Inputs : host - a properly initialized Scsi_Host structure
@@ -1393,7+1390,7 @@ static void abnormal_finished (struct NCR53c7x0_cmd *cmd, int result) {
  * Function : static void intr_break (struct Scsi_Host *host,
  *     struct NCR53c7x0_cmd *cmd)
  *
- * Purpose :  Handler for breakpoint interrutps from a SCSI script
+ * Purpose :  Handler for breakpoint interrupts from a SCSI script
  *
  * Inputs : host - pointer to this host adapter's structure,
  *     cmd - pointer to the command (if any) dsa was pointing 
@@ -1516,11+1513,11 @@ static const struct {
  * Purpose : reprogram transfers between the selected SCSI initiator and 
  *     target for synchronous SCSI transfers such that the synchronous 
  *     offset is less than that requested and period at least as long 
- *     as that requestion.  Also modify *msg such that it contains 
+ *     as that requested.  Also modify *msg such that it contains 
  *     an appropriate response. 
  *
  * Inputs : host - NCR53c7,8xx SCSI host, target - number SCSI target id,
- *     msg - synchronous tranfer request.
+ *     msg - synchronous transfer request.
  */
 
 
@@ -1531,7+1528,7 @@ static void synchronous (struct Scsi_Host *host, int target, char *msg) {
     unsigned long *script;
     unsigned char scntl3, sxfer;
    
-/* Scale divisor by 10 to accomodate fractions */ 
+/* Scale divisor by 10 to accommodate fractions */ 
     desire = 1000000000L / (msg[3] * 4);
     divisor = desire / (hostdata->scsi_clock / 10);
 
@@ -1625,7+1622,7 @@ static int NCR53c8x0_dstat_sir_intr (struct Scsi_Host *host, struct
            hostdata->dsp_changed = 1;
            break;
        case INITIATE_RECOVERY:
-           printk ("scsi%d : extended contingent allegience not supported yet, rejecting\n",
+           printk ("scsi%d : extended contingent allegiance not supported yet, rejecting\n",
                host->host_no);
            hostdata->dsp = hostdata->script + hostdata->E_reject_message /
                sizeof(long);
@@ -1709,7+1706,7 @@ static int NCR53c8x0_dstat_sir_intr (struct Scsi_Host *host, struct
        hostdata->dsp_changed = 1;
        return SPECIFIC_INT_NOTHING;
 /*
- * Since contingent allegience conditions are cleared by the next 
+ * Since contingent allegiance conditions are cleared by the next 
  * command issued to a target, we must issue a REQUEST SENSE 
  * command after receiving a CHECK CONDITION status, before
  * another command is issued.
@@ -1729,7+1726,7 @@ static int NCR53c8x0_dstat_sir_intr (struct Scsi_Host *host, struct
        }
 
 /*
- * When a contingent allegience condition is created, the target 
+ * When a contingent allegiance condition is created, the target 
  * reverts to asynchronous transfers.
  */
 
@@ -1737,12+1734,12 @@ static int NCR53c8x0_dstat_sir_intr (struct Scsi_Host *host, struct
 
        /* 
         * Use normal one-byte selection message, with no attempts to 
-        * restablish synchronous or wide messages since this may
+        * reestablish synchronous or wide messages since this may
         * be the crux of our problem.
         *
-        * XXX - once SCSI-II tagged queing is implemented, we'll
+        * XXX - once SCSI-II tagged queuing is implemented, we'll
         *      have to set this up so that the rest of the DSA
-        *      aggrees with this being an untagged queue'd command.
+        *      agrees with this being an untagged queue'd command.
         */
 
        patch_dsa_32 (cmd->dsa, dsa_msgout, 0, 1);
@@ -1781,7+1778,7 @@ static int NCR53c8x0_dstat_sir_intr (struct Scsi_Host *host, struct
         * Currently, this command is flagged as completed, ie 
         * it has valid status and message data.  Reflag it as
         * incomplete.  Q - need to do something so that original
-        * status, etc are uesed.
+        * status, etc are used.
         */
 
         cmd->cmd->result = 0xffff;             
@@ -2388,7+2385,7 @@ static struct NCR53c7x0_cmd *create_cmd (Scsi_Cmnd *cmd) {
     tmp->prev = NULL;
 
     /* 
-     * Calculate addresses of dynamnic code to fill in DSA
+     * Calculate addresses of dynamic code to fill in DSA
      */
 
     tmp->data_transfer_start = tmp->dsa + (hostdata->dsa_end - 
@@ -2475,7+2472,7 @@ static struct NCR53c7x0_cmd *create_cmd (Scsi_Cmnd *cmd) {
  * In any case, this is how it _must_ be done for 53c700/700-66 chips,
  * so this stays even when we come up with something better.
  *
- * When we're limited to 1 simultaenous command, no overlapping processing,
+ * When we're limited to 1 simultaneous command, no overlapping processing,
  * we're seeing 630K/sec, with 7% CPU usage on a slow Syquest 45M
  * drive.
  *
@@ -2623,7+2620,7 @@ int NCR53c7xx_queue_command (Scsi_Cmnd *cmd, void (* done)(Scsi_Cmnd *)) {
     }
 
     cmd->scsi_done = done;
-    cmd->result = 0xffff;              /* The NCR will overwite message
+    cmd->result = 0xffff;              /* The NCR will overwrite message
                                           and status with valid data */
     
     cmd->host_scribble = (unsigned char *) tmp = create_cmd (cmd);
@@ -2648,8+2645,8 @@ int NCR53c7xx_queue_command (Scsi_Cmnd *cmd, void (* done)(Scsi_Cmnd *)) {
     
     /*
      * REQUEST sense commands need to be executed before all other 
-     * commands since any command will clear the contingent allegience 
-     * condition that exists and the sense data is only guranteed to be 
+     * commands since any command will clear the contingent allegiance 
+     * condition that exists and the sense data is only guaranteed to be 
      * valid while the condition exists.
      */
 
@@ -3002,12+2999,12 @@ restart:
                        Scsi_Cmnd *tmp;
 
                        if (!cmd) {
-                           printk("scsi%d : very wierd.\n", host->host_no);
+                           printk("scsi%d : very weird.\n", host->host_no);
                            break;
                        }
 
                        if (!(tmp = cmd->cmd)) {
-                           printk("scsi%d : wierd.  NCR53c7x0_cmd has no Scsi_Cmnd\n",
+                           printk("scsi%d : weird.  NCR53c7x0_cmd has no Scsi_Cmnd\n",
                                host->host_no);
                                continue;
                        }
@@ -3023,7+3020,7 @@ restart:
                        search_found = 1;
 
                        /* Important - remove from list _before_ done is called */
-                       /* XXX - SLL.  Seems like DLL is unecessary */
+                       /* XXX - SLL.  Seems like DLL is unnecessary */
                        if (cmd->prev)
                            cmd->prev->next = cmd->next;
                        if (cmd_prev_ptr)
@@ -3341,7+3338,7 @@ static void intr_phase_mismatch (struct Scsi_Host *host, struct NCR53c7x0_cmd
        /*
         * MSGOUT phase - shouldn't happen, because we haven't 
         *              asserted ATN.
-        * CMDOUT phase - shouldn't happen, since we've allready
+        * CMDOUT phase - shouldn't happen, since we've already
         *              sent a valid command.
         * DATAIN/DATAOUT - other one shouldn't happen, since 
         *              SCSI commands can ONLY have one or the other.
@@ -3408,7+3405,7 @@ static void intr_dma (struct Scsi_Host *host, struct NCR53c7x0_cmd *cmd) {
     dsa = (unsigned long *) NCR53c7x0_read32(DSA_REG);
 
     /*
-     * DSTAT_ABRT is the aborted interrupt.  This is set whenver the 
+     * DSTAT_ABRT is the aborted interrupt.  This is set whenever the 
      * SCSI chip is aborted.  
      * 
      * With NCR53c700 and NCR53c700-66 style chips, we should only 
@@ -3623,7+3620,7 @@ static int print_insn (struct Scsi_Host *host, unsigned long *insn,
 /*
  * Function : int NCR53c7xx_abort (Scsi_Cmnd *cmd)
  * 
- * Purpose : Abort an erratant SCSI command, doing all necessary
+ * Purpose : Abort an errant SCSI command, doing all necessary
  *     cleanup of the issue_queue, running_list, shared Linux/NCR
  *     dsa issue and reconnect queues.
  *
@@ -3676,7+3673,7 @@ int NCR53c7xx_abort (Scsi_Cmnd *cmd) {
     }
 
 /* 
- * That failing, the command could be in our list of allready executing 
+ * That failing, the command could be in our list of already executing 
  * commands.  If this is the case, drastic measures are called for.  
  */ 
 
index 273da7e..7793f99 100644 (file)
@@ -137,7+137,7 @@ extern int NCR53c7xx_reset(Scsi_Cmnd *);
 #define SIEN_REG_700           0x03    
 #define SIEN0_REG_800          0x40
 #define SIEN_MA                        0x80    /* Phase mismatch (ini) or ATN (tgt) */
-#define SIEN_FC                        0x40    /* Functin complete */
+#define SIEN_FC                        0x40    /* Function complete */
 #define SIEN_700_STO           0x20    /* Selection or reselection timeout */
 #define SIEN_800_SEL           0x20    /* Selected */
 #define SIEN_700_SEL           0x10    /* Selected or reselected */
@@ -224,7+224,7 @@ extern int NCR53c7xx_reset(Scsi_Cmnd *);
 #define SBCL_PHASE_MASK                (SBCL_CD|SBCL_IO|SBCL_MSG)
 
 /* 
- * SCSI first byte recieved latch ro 
+ * SCSI first byte received latch ro 
  * This register contains the first byte received during a block MOVE 
  * SCSI SCRIPTS instruction, including
  * 
@@ -252,7+252,7 @@ extern int NCR53c7xx_reset(Scsi_Cmnd *);
 
 /* 
  * SCSI bus data lines ro 
- * This register reflects the instantenous status of the SCSI data 
+ * This register reflects the instantaneous status of the SCSI data 
  * lines.  Note that SCNTL0 must be set to disable parity checking, 
  * otherwise reading this register will latch new parity.
  */
@@ -278,7+278,7 @@ extern int NCR53c7xx_reset(Scsi_Cmnd *);
 #define SOCL_CD                        0x02    /*  C/D ro */
 #define SOCL_IO                        0x01    /*  I/O ro */
 /* 
- * Syncronous SCSI Clock Control bits 
+ * Synchronous SCSI Clock Control bits 
  * 0 - set by DCNTL 
  * 1 - SCLK / 1.0
  * 2 - SCLK / 1.5
@@ -333,7+333,7 @@ extern int NCR53c7xx_reset(Scsi_Cmnd *);
 #define SSTAT1_SDP             0x01    /* Instant readout of SDP/ */
 
 #define SSTAT2_REG             0x0f    /* SCSI status 2 ro */
-#define SSTAT2_FF3             0x80    /* number of bytes in syncronous */
+#define SSTAT2_FF3             0x80    /* number of bytes in synchronous */
 #define SSTAT2_FF2             0x40    /* data FIFO */
 #define SSTAT2_FF1             0x20    
 #define SSTAT2_FF0             0x10
@@ -386,7+386,7 @@ extern int NCR53c7xx_reset(Scsi_Cmnd *);
 
 /* 0x80 - 0x40 are reserved on 700 series chips */
 #define CTEST2_700_SOFF                0x20    /* SCSI Offset Compare,
-                                        * As an initator, this bit is 
+                                        * As an initiator, this bit is 
                                         * one when the synchronous offset
                                         * is zero, as a target this bit 
                                         * is one when the synchronous 
@@ -474,11+474,11 @@ extern int NCR53c7xx_reset(Scsi_Cmnd *);
  */
 #define CTEST5_BBCK            0x40
 /*
- * Reset SCSI Offset.  Setting this bit to 1 cleares the current offset
+ * Reset SCSI Offset.  Setting this bit to 1 clears the current offset
  * pointer in the SCSI synchronous offset counter (SSTAT).  This bit
  * is set to 1 if a SCSI Gross Error Condition occurs.  The offset should
  * be cleared when a synchronous transfer fails.  When written, it is 
- * automatically cleared after the SCSI syncrnous offset counter is 
+ * automatically cleared after the SCSI synchronous offset counter is 
  * reset.
  */
 /* Bit 5 is reserved on 800 series chips */
@@ -562,7+562,7 @@ extern int NCR53c7xx_reset(Scsi_Cmnd *);
 #define ISTAT_700_PRE          0x04    /* Pointer register empty.
                                         * Set to 1 when DSPS and DSP
                                         * registers are empty in pipeline
-                                        * mode, allways set otherwise.
+                                        * mode, always set otherwise.
                                         */
 #define ISTAT_SIP              0x02    /* SCSI interrupt pending from
                                         * SCSI portion of SIOP see
@@ -618,14+618,14 @@ extern int NCR53c7xx_reset(Scsi_Cmnd *);
 
 
 /* 
- * The CTEST9 register may be used to diffentiate between a
+ * The CTEST9 register may be used to differentiate between a
  * NCR53c700 and a NCR53c710.  
  *
  * Write 0xff to this register.
  * Read it.
  * If the contents are 0xff, it is a NCR53c700
  * If the contents are 0x00, it is a NCR53c700-66 first revision
- * If the contents are zome other value, it is some other NCR53c700-66
+ * If the contents are some other value, it is some other NCR53c700-66
  */
 #define CTEST9_REG_00          0x23    /* Chip test 9 ro */
 #define LCRC_REG_10            0x23    
@@ -635,7+635,7 @@ extern int NCR53c7xx_reset(Scsi_Cmnd *);
  * write their high 8 bits into the DCMD register, the low 24 bits into
  * the DBC register.
  *
- * Function is dependant on the command type being executed.
+ * Function is dependent on the command type being executed.
  */
 
  
@@ -643,7+643,7 @@ extern int NCR53c7xx_reset(Scsi_Cmnd *);
 /* 
  * For Block Move Instructions, DBC is a 24 bit quantity representing 
  *     the number of bytes to transfer.
- * For Transfer Control Intructions, DBC is bit fielded as follows : 
+ * For Transfer Control Instructions, DBC is bit fielded as follows : 
  */
 /* Bits 20 - 23 should be clear */
 #define DBC_TCI_TRUE           (1 << 19)       /* Jump when true */
@@ -694,7+694,7 @@ extern int NCR53c7xx_reset(Scsi_Cmnd *);
 #define DCMD_RWRI_OPC_MASK     0x38    /* Opcode mask */
 #define DCMD_RWRI_OPC_WRITE    0x28    /* Write SFBR to register */
 #define DCMD_RWRI_OPC_READ     0x30    /* Read register to SFBR */
-#define DCMD_RWRI_OPC_MODIFY   0x38    /* Modify inplace */
+#define DCMD_RWRI_OPC_MODIFY   0x38    /* Modify in place */
 
 #define DCMD_RWRI_OP_MASK      0x07
 #define DCMD_RWRI_OP_MOVE      0x00
@@ -795,7+795,7 @@ extern int NCR53c7xx_reset(Scsi_Cmnd *);
                                         * but 286 mode bit  in DMODE. On the
                                         * NCR53c710, this bit moved to CTEST8
                                         */
-#define DCNTL_10_COM           0x01    /* 700 software compatability mode */
+#define DCNTL_10_COM           0x01    /* 700 software compatibility mode */
 
 #define DCNTL_700_SAVE ( DCNTL_CF_MASK | DCNTL_S16)
 
@@ -854,7+854,7 @@ extern int NCR53c7xx_reset(Scsi_Cmnd *);
 #define STEST2_REG_800         0x4e    
 #define STEST2_800_SCE         0x80    /* Enable SOCL/SODL */
 #define STEST2_800_ROF         0x40    /* Reset SCSI sync offset */
-#define STEST2_800_SLB         0x10    /* Enable SCSI looback mode */
+#define STEST2_800_SLB         0x10    /* Enable SCSI loopback mode */
 #define STEST2_800_SZM         0x08    /* SCSI high impedance mode */
 #define STEST2_800_EXT         0x02    /* Extend REQ/ACK filter 30 to 60ns */
 #define STEST2_800_LOW         0x01    /* SCSI low level mode */
@@ -874,7+874,7 @@ extern int NCR53c7xx_reset(Scsi_Cmnd *);
 
 #define OPTION_PARITY          0x1     /* Enable parity checking */
 #define OPTION_TAGGED_QUEUE    0x2     /* Enable SCSI-II tagged queuing */
-#define OPTION_700             0x8     /* Allways run NCR53c700 scripts */
+#define OPTION_700             0x8     /* Always run NCR53c700 scripts */
 #define OPTION_INTFLY          0x10    /* Use INTFLY interrupts */
 #define OPTION_DEBUG_INTR      0x20    /* Debug interrupts */
 #define OPTION_DEBUG_INIT_ONLY 0x40    /* Run initialization code and 
@@ -922,7+922,7 @@ struct NCR53c7x0_synchronous {
 
 #define CMD_FLAG_SDTR          1       /* Initiating synchronous 
                                           transfer negotiation */
-#define CMD_FLAG_WDTR          2       /* Initiating wide tranfer
+#define CMD_FLAG_WDTR          2       /* Initiating wide transfer
                                           negotiation */
 #define CMD_FLAG_DID_SDTR      4       /* did SDTR */
 
@@ -980,7+980,7 @@ struct NCR53c7x0_break {
 #define STATE_HALTED   0               
 /* 
  * Indicates that the NCR is executing the wait for select / reselect 
- * script.  Only used when running NCR53c700 compatable scripts, only 
+ * script.  Only used when running NCR53c700 compatible scripts, only 
  * state during which an ABORT is _not_ considered an error condition.
  */
 #define STATE_WAITING  1               
@@ -988,7+988,7 @@ struct NCR53c7x0_break {
 #define STATE_RUNNING  2               
 /* 
  * Indicates that the NCR was being aborted.  Only used when running 
- * NCR53c700 compatable scripts.  
+ * NCR53c700 compatible scripts.  
  */
 #define STATE_ABORTING 3
     
@@ -1208,7+1208,7 @@ struct NCR53c7x0_hostdata {
                                                   executing on each target
                                                 */
     /* 
-     * Eventually, I'll switch to a corroutine for calling 
+     * Eventually, I'll switch to a coroutine for calling 
      * cmd->done(cmd), etc. so that we can overlap interrupt
      * processing with this code for maximum performance.
      */
index eb6aa41..0174526 100644 (file)
 ;
 ; While the NCR53c700 and NCR53c700-66 lacked the facilities to fully
 ; automate SCSI transfers without host processor intervention, this 
-; isnt the case with the NCR53c710 and newer chips which allow 
+; isn't the case with the NCR53c710 and newer chips which allow 
 ;
 ; - reads and writes to the internal registers from within the SCSI
 ;      scripts, allowing the SCSI SCRIPTS(tm) code to save processor
 ; where the same piece of code is run to handle I/O for multiple threads
 ; at once minimizing our need to relocate code.  Since the NCR53c700/
 ; NCR53c800 series have a unique combination of features, making a 
-; a standard ingoing/outgoing mailbox system, costly, Ive modified it.
+; a standard ingoing/outgoing mailbox system, costly, I've modified it.
 ;
 ; - Commands are stored in a linked list, rather than placed in 
-;      arbitrary mailboxes.  This simiplifies the amount of processing
+;      arbitrary mailboxes.  This simplifies the amount of processing
 ;      that must be done by the NCR53c810.
 ;
 ; - Mailboxes are a mixture of code and data.  This lets us greatly
@@ -189,7+189,7 @@ ABSOLUTE addr_temp = 0x0
 ; 4    testing interrupt 
 ; Next byte indicates specific error
 
-; XXX not yet implemented, Im not sure if I want to - 
+; XXX not yet implemented, I'm not sure if I want to - 
 ; Next byte indicates the routine the error occurred in
 ; The LSB indicates the specific place the error occurred
  
@@ -234,14+234,14 @@ ABSOLUTE reselected_identify = 0
 ABSOLUTE reselected_tag = 0
 
 ; Request sense command pointer, its a 6 byte command, should
-; be constant for all commands since we allways want 16 bytes of 
-; sense and we dont need to change any fields as we did under 
+; be constant for all commands since we always want 16 bytes of 
+; sense and we don't need to change any fields as we did under 
 ; SCSI-I when we actually cared about the LUN field.
 ;EXTERNAL NCR53c7xx_sense              ; Request sense command
 
 #if (CHIP != 700) && (CHIP != 70066)
 ; dsa_schedule  
-; PURPOSE : after a DISCONNECT message has been recieved, and pointers
+; PURPOSE : after a DISCONNECT message has been received, and pointers
 ;      saved, insert the current DSA structure at the head of the 
 ;      disconnected queue and fall through to the scheduler.
 ;
@@ -252,7+252,7 @@ ABSOLUTE reselected_tag = 0
 ;
 ; MODIFIES : SCRATCH, reconnect_dsa_head
 ; 
-; EXITS : allways passes control to schedule
+; EXITS : always passes control to schedule
 
 ENTRY dsa_schedule
 dsa_schedule:
@@ -263,7+263,7 @@ dsa_schedule:
 ;
     CALL dsa_to_scratch
 ; XXX - we need to deal with the NCR53c710, which lacks an add with
-;      carry instruction, by moving arround the DSA alignment to avoid
+;      carry instruction, by moving around the DSA alignment to avoid
 ;      carry in situations like this.
     MOVE SCRATCH0 + dsa_next TO SCRATCH0
     MOVE SCRATCH1 + 0 TO SCRATCH1 WITH CARRY
@@ -332,7+332,7 @@ schedule:
 ; PURPOSE : establish a nexus for the SCSI command referenced by DSA.
 ;      On success, the current DSA structure is removed from the issue 
 ;      queue.  Usually, this is entered as a fall-through from schedule,
-;      although the contingent allegience handling code will write
+;      although the contingent allegiance handling code will write
 ;      the select entry address to the DSP to restart a command as a 
 ;      REQUEST SENSE.  A message is sent (usually IDENTIFY, although
 ;      additional SDTR or WDTR messages may be sent).  COMMAND OUT
@@ -365,7+365,7 @@ select:
 ;
 ; So, for more performance, we could overlap the code which removes 
 ; the command from the NCRs issue queue with the selection, but 
-; at this point I dont want to deal with the error recovery.
+; at this point I don't want to deal with the error recovery.
 ;
 
 #if (CHIP != 700) && (CHIP != 70066)
@@ -468,7+468,7 @@ cmdout_cmdout:
 ; MODIFIES : SCRATCH
 ;
 ; EXITS : if STATUS IN is detected, signifying command completion,
-;      the NCR jumpst to command_complete.  If MSG IN occurs, a 
+;      the NCR jumps to command_complete.  If MSG IN occurs, a 
 ;      CALL is made to msg_in.  Otherwise, other_transfer runs in 
 ;      an infinite loop.
 ;      
@@ -542,7+542,7 @@ other_transfer:
 ; munge_msg
 ;
 ; PURPOSE : process messages from a target.  msg_in is called when the 
-;      caller hasnt read the first byte of the message.  munge_message
+;      caller hasn't read the first byte of the message.  munge_message
 ;      is called when the caller has read the first byte of the message,
 ;      and left it in SFBR.
 ;
@@ -551,7+551,7 @@ other_transfer:
 ;      INITIATE RECOVERY messages.
 ;
 ;      When the host system handles one of these interrupts,
-;      it can respond by rentering at reject_message, 
+;      it can respond by reentering at reject_message, 
 ;      which rejects the message and returns control to
 ;      the caller of msg_in or munge_msg, accept_message
 ;      which clears ACK and returns control, or reply_message
@@ -567,7+567,7 @@ other_transfer:
 ; INPUTS : DSA - SCSI COMMAND, SFBR - first byte of message (munge_msg
 ;      only)
 ;
-; CALLS : NO.  The TEMP register isnt backed up to allow nested calls.
+; CALLS : NO.  The TEMP register isn't backed up to allow nested calls.
 ;
 ; MODIFIES : SCRATCH, DSA on DISCONNECT
 ;
@@ -584,12+584,12 @@ munge_msg:
     JUMP munge_extended, IF 0x01               ; EXTENDED MESSAGE
     JUMP munge_2, IF 0x20, AND MASK 0xdf       ; two byte message
 ;
-; Ive seen a handful of broken SCSI devices which fail to issue
+; I've seen a handful of broken SCSI devices which fail to issue
 ; a SAVE POINTERS message before disconnecting in the middle of 
 ; a transfer, assuming that the DATA POINTER will be implicitly 
 ; restored.  So, we treat the SAVE DATA POINTER message as a NOP.
 ;
-; Ive also seen SCSI devices which dont issue a RESTORE DATA
+; I've also seen SCSI devices which don't issue a RESTORE DATA
 ; POINTER message and assume that thats implicit.
 ;
     JUMP accept_message, IF 0x02               ; SAVE DATA POINTER
@@ -690,7+690,7 @@ msg_respond:
 ;      Abnormal (CHECK_CONDITION) termination results in an
 ;      int_err_check_condition interrupt so that a REQUEST SENSE
 ;      command can be issued out-of-order so that no other command
-;      clears the contingent allegience condition.
+;      clears the contingent allegiance condition.
 ;      
 ;
 ; INPUTS : DSA - command       
@@ -728,7+728,7 @@ command_complete_msgin:
 ; interrupt the host processor to get them changed, or change them ourselves.
 ;
 ; Once SCSI-II tagged queueing is implemented, things will be even more
-; hairy, since contingent allegience conditions exist on a per-target/lun
+; hairy, since contingent allegiance conditions exist on a per-target/lun
 ; basis, and issuing a new command with a different tag would clear it.
 ; In these cases, we must interrupt the host processor to get a request 
 ; added to the HEAD of the queue with the request sense command, or we
@@ -757,7+757,7 @@ command_failed:
 ;      waits for reselection, selection, and new commands.
 ;
 ;      When a successful reselection occurs, with the aid 
-;      of fixedup code in each DSA, wait_reselect walks the 
+;      of fixed up code in each DSA, wait_reselect walks the 
 ;      reconnect_dsa_queue, asking each dsa if the target ID
 ;      and LUN match its.
 ;
@@ -774,7+774,7 @@ command_failed:
 ;
 ; EXITS : On successful reselection, control is returned to the 
 ;      DSA which called reselected_ok.  If the WAIT RESELECT
-;      was interrupted by a new commands arival signalled by 
+;      was interrupted by a new commands arrival signaled by 
 ;      SIG_P, control is passed to schedule.  If the NCR is 
 ;      selected, the host system is interrupted with an 
 ;      int_err_selected which is usually responded to by
@@ -787,11+787,11 @@ wait_reselect:
     WAIT RESELECT wait_reselect_failed
 
 reselected:
-    ; Read all data needed to restablish the nexus - 
+    ; Read all data needed to reestablish the nexus - 
     MOVE 1, reselected_identify, WHEN MSG_IN
 #if (CHIP != 700) && (CHIP != 70066)
     ; Well add a jump to here after some how determining that 
-    ; tagged queueing isnt in use on this device.
+    ; tagged queueing isn't in use on this device.
 reselected_notag:    
     MOVE MEMORY 1, NCR53c7xx_zero, reselected_tag
 
@@ -830,11+830,11 @@ reselected_not_end:
     ; XXX the ALU is only eight bits wide, and the assembler
     ; wont do the dirt work for us.  As long as dsa_check_reselect
     ; is negative, we need to sign extend with 1 bits to the full
-    ; 32 bit width oof the address.
+    ; 32 bit width os the address.
     ;
-    ; A potential work arround would be to have a known alignment 
+    ; A potential work around would be to have a known alignment 
     ; of the DSA structure such that the base address plus 
-    ; dsa_check_reselect doesnt require carryin from bytes 
+    ; dsa_check_reselect doesn't require carrying from bytes 
     ; higher than the LSB.
     ;
 
@@ -903,7+903,7 @@ select_failed:
 ;      DSA on entry, and is useful for miscellaneous experimentation.
 ;
 
-; Verify that interrupts are working correctly and that we dont 
+; Verify that interrupts are working correctly and that we don'
 ; have a cache invalidation problem.
 
 ABSOLUTE test_src = 0, test_dest = 0
@@ -992,8+992,8 @@ no_source_data:
 ;      as the source or destination.  So, we provide a couple of subroutines
 ;      that let us switch between the DSA register and scratch register.
 ;
-;      Memory moves to/from the DSPS  register also dont work, but we 
-;      dont use them.
+;      Memory moves to/from the DSPS  register also don't work, but we 
+;      don't use them.
 ;
 ;
 
index 7ff3e1a..9a9c5c2 100644 (file)
@@ -54,7+54,7 @@ unsigned long SCRIPT[] = {
 ;
 ; While the NCR53c700 and NCR53c700-66 lacked the facilities to fully
 ; automate SCSI transfers without host processor intervention, this 
-; isnt the case with the NCR53c710 and newer chips which allow 
+; isn't the case with the NCR53c710 and newer chips which allow 
 ;
 ; - reads and writes to the internal registers from within the SCSI
 ;      scripts, allowing the SCSI SCRIPTS(tm) code to save processor
@@ -69,10+69,10 @@ unsigned long SCRIPT[] = {
 ; where the same piece of code is run to handle I/O for multiple threads
 ; at once minimizing our need to relocate code.  Since the NCR53c700/
 ; NCR53c800 series have a unique combination of features, making a 
-; a standard ingoing/outgoing mailbox system, costly, Ive modified it.
+; a standard ingoing/outgoing mailbox system, costly, I've modified it.
 ;
 ; - Commands are stored in a linked list, rather than placed in 
-;      arbitrary mailboxes.  This simiplifies the amount of processing
+;      arbitrary mailboxes.  This simplifies the amount of processing
 ;      that must be done by the NCR53c810.
 ;
 ; - Mailboxes are a mixture of code and data.  This lets us greatly
@@ -251,7+251,7 @@ ABSOLUTE addr_temp = 0x0
 ; 4    testing interrupt 
 ; Next byte indicates specific error
 
-; XXX not yet implemented, Im not sure if I want to - 
+; XXX not yet implemented, I'm not sure if I want to - 
 ; Next byte indicates the routine the error occurred in
 ; The LSB indicates the specific place the error occurred
  
@@ -296,14+296,14 @@ ABSOLUTE reselected_identify = 0
 ABSOLUTE reselected_tag = 0
 
 ; Request sense command pointer, its a 6 byte command, should
-; be constant for all commands since we allways want 16 bytes of 
-; sense and we dont need to change any fields as we did under 
+; be constant for all commands since we allays want 16 bytes of 
+; sense and we don't need to change any fields as we did under 
 ; SCSI-I when we actually cared about the LUN field.
 ;EXTERNAL NCR53c7xx_sense              ; Request sense command
 
 
 ; dsa_schedule  
-; PURPOSE : after a DISCONNECT message has been recieved, and pointers
+; PURPOSE : after a DISCONNECT message has been received, and pointers
 ;      saved, insert the current DSA structure at the head of the 
 ;      disconnected queue and fall through to the scheduler.
 ;
@@ -314,7+314,7 @@ ABSOLUTE reselected_tag = 0
 ;
 ; MODIFIES : SCRATCH, reconnect_dsa_head
 ; 
-; EXITS : allways passes control to schedule
+; EXITS : allays passes control to schedule
 
 ENTRY dsa_schedule
 dsa_schedule:
@@ -328,7+328,7 @@ dsa_schedule:
 at 0x0000002d : */     0x88080000,0x000007b8,
 /*
 ; XXX - we need to deal with the NCR53c710, which lacks an add with
-;      carry instruction, by moving arround the DSA alignment to avoid
+;      carry instruction, by moving around the DSA alignment to avoid
 ;      carry in situations like this.
     MOVE SCRATCH0 + dsa_next TO SCRATCH0
 
@@ -472,7+472,7 @@ at 0x00000063 : */  0x800c0000,0x00000560,
 ; PURPOSE : establish a nexus for the SCSI command referenced by DSA.
 ;      On success, the current DSA structure is removed from the issue 
 ;      queue.  Usually, this is entered as a fall-through from schedule,
-;      although the contingent allegience handling code will write
+;      although the contingent allegiance handling code will write
 ;      the select entry address to the DSP to restart a command as a 
 ;      REQUEST SENSE.  A message is sent (usually IDENTIFY, although
 ;      additional SDTR or WDTR messages may be sent).  COMMAND OUT
@@ -508,7+508,7 @@ at 0x00000065 : */  0x60000200,0x00000000,
 ;
 ; So, for more performance, we could overlap the code which removes 
 ; the command from the NCRs issue queue with the selection, but 
-; at this point I dont want to deal with the error recovery.
+; at this point I don't want to deal with the error recovery.
 ;
 
 
@@ -665,7+665,7 @@ at 0x0000008b : */  0x1a000000,0x00000048,
 ; MODIFIES : SCRATCH
 ;
 ; EXITS : if STATUS IN is detected, signifying command completion,
-;      the NCR jumpst to command_complete.  If MSG IN occurs, a 
+;      the NCR jumps to command_complete.  If MSG IN occurs, a 
 ;      CALL is made to msg_in.  Otherwise, other_transfer runs in 
 ;      an infinite loop.
 ;      
@@ -841,7+841,7 @@ at 0x000000d3 : */  0x80080000,0x0000031c,
 ; munge_msg
 ;
 ; PURPOSE : process messages from a target.  msg_in is called when the 
-;      caller hasnt read the first byte of the message.  munge_message
+;      caller hasn't read the first byte of the message.  munge_message
 ;      is called when the caller has read the first byte of the message,
 ;      and left it in SFBR.
 ;
@@ -850,7+850,7 @@ at 0x000000d3 : */  0x80080000,0x0000031c,
 ;      INITIATE RECOVERY messages.
 ;
 ;      When the host system handles one of these interrupts,
-;      it can respond by rentering at reject_message, 
+;      it can respond by reentering at reject_message, 
 ;      which rejects the message and returns control to
 ;      the caller of msg_in or munge_msg, accept_message
 ;      which clears ACK and returns control, or reply_message
@@ -866,7+866,7 @@ at 0x000000d3 : */  0x80080000,0x0000031c,
 ; INPUTS : DSA - SCSI COMMAND, SFBR - first byte of message (munge_msg
 ;      only)
 ;
-; CALLS : NO.  The TEMP register isnt backed up to allow nested calls.
+; CALLS : NO.  The TEMP register isn't backed up to allow nested calls.
 ;
 ; MODIFIES : SCRATCH, DSA on DISCONNECT
 ;
@@ -892,12+892,12 @@ at 0x000000d7 : */        0x800c0001,0x00000428,
 at 0x000000d9 : */     0x800cdf20,0x0000039c,
 /*
 ;
-; Ive seen a handful of broken SCSI devices which fail to issue
+; I've seen a handful of broken SCSI devices which fail to issue
 ; a SAVE POINTERS message before disconnecting in the middle of 
 ; a transfer, assuming that the DATA POINTER will be implicitly 
 ; restored.  So, we treat the SAVE DATA POINTER message as a NOP.
 ;
-; Ive also seen SCSI devices which dont issue a RESTORE DATA
+; I've also seen SCSI devices which don't issue a RESTORE DATA
 ; POINTER message and assume that thats implicit.
 ;
     JUMP accept_message, IF 0x02               ; SAVE DATA POINTER
@@ -1151,7+1151,7 @@ at 0x00000140 : */        0x90080000,0x00000000,
 ;      Abnormal (CHECK_CONDITION) termination results in an
 ;      int_err_check_condition interrupt so that a REQUEST SENSE
 ;      command can be issued out-of-order so that no other command
-;      clears the contingent allegience condition.
+;      clears the contingent allegiance condition.
 ;      
 ;
 ; INPUTS : DSA - command       
@@ -1207,7+1207,7 @@ at 0x0000014c : */        0x72340000,0x00000000,
 ; interrupt the host processor to get them changed, or change them ourselves.
 ;
 ; Once SCSI-II tagged queueing is implemented, things will be even more
-; hairy, since contingent allegience conditions exist on a per-target/lun
+; hairy, since contingent allegiance conditions exist on a per-target/lun
 ; basis, and issuing a new command with a different tag would clear it.
 ; In these cases, we must interrupt the host processor to get a request 
 ; added to the HEAD of the queue with the request sense command, or we
@@ -1251,7+1251,7 @@ at 0x00000156 : */        0x98080000,0x00030000,
 ;      waits for reselection, selection, and new commands.
 ;
 ;      When a successful reselection occurs, with the aid 
-;      of fixedup code in each DSA, wait_reselect walks the 
+;      of fixed up code in each DSA, wait_reselect walks the 
 ;      reconnect_dsa_queue, asking each dsa if the target ID
 ;      and LUN match its.
 ;
@@ -1268,7+1268,7 @@ at 0x00000156 : */        0x98080000,0x00030000,
 ;
 ; EXITS : On successful reselection, control is returned to the 
 ;      DSA which called reselected_ok.  If the WAIT RESELECT
-;      was interrupted by a new commands arival signalled by 
+;      was interrupted by a new commands arrival signaled by 
 ;      SIG_P, control is passed to schedule.  If the NCR is 
 ;      selected, the host system is interrupted with an 
 ;      int_err_selected which is usually responded to by
@@ -1284,14+1284,14 @@ at 0x00000158 : */      0x50000000,0x0000067c,
 /*
 
 reselected:
-    ; Read all data needed to restablish the nexus - 
+    ; Read all data needed to reestablish the nexus - 
     MOVE 1, reselected_identify, WHEN MSG_IN
 
 at 0x0000015a : */     0x0f000001,0x00000000,
 /*
 
     ; Well add a jump to here after some how determining that 
-    ; tagged queueing isnt in use on this device.
+    ; tagged queueing isn't in use on this device.
 reselected_notag:    
     MOVE MEMORY 1, NCR53c7xx_zero, reselected_tag
 
@@ -1378,11+1378,11 @@ at 0x0000017d : */      0x72100000,0x00000000,
     ; XXX the ALU is only eight bits wide, and the assembler
     ; wont do the dirt work for us.  As long as dsa_check_reselect
     ; is negative, we need to sign extend with 1 bits to the full
-    ; 32 bit width oof the address.
+    ; 32 bit width of the address.
     ;
-    ; A potential work arround would be to have a known alignment 
+    ; A potential work around would be to have a known alignment 
     ; of the DSA structure such that the base address plus 
-    ; dsa_check_reselect doesnt require carryin from bytes 
+    ; dsa_check_reselect doesn't require carrying from bytes 
     ; higher than the LSB.
     ;
 
@@ -1517,7+1517,7 @@ at 0x000001ab : */        0x80080000,0x00000130,
 ;      DSA on entry, and is useful for miscellaneous experimentation.
 ;
 
-; Verify that interrupts are working correctly and that we dont 
+; Verify that interrupts are working correctly and that we don'
 ; have a cache invalidation problem.
 
 ABSOLUTE test_src = 0, test_dest = 0
@@ -1702,8+1702,8 @@ at 0x000001ec : */        0x98080000,0x02040000,
 ;      as the source or destination.  So, we provide a couple of subroutines
 ;      that let us switch between the DSA register and scratch register.
 ;
-;      Memory moves to/from the DSPS  register also dont work, but we 
-;      dont use them.
+;      Memory moves to/from the DSPS  register also don't work, but we 
+;      don't use them.
 ;
 ;
 
index 6732612..8e87692 100644 (file)
@@ -258,7+258,7 @@ Mon Mar 21 16:36:20 1994
        * Linux 1.0, patchlevel3 released.
 
        * sd.c, st.c, sr.c, sg.c: Return -ENXIO, not -ENODEV if we attempt
-       to open a non-existant device.
+       to open a non-existent device.
 
        * scsi.c: Add Chinon cdrom to blacklist.
 
index 4abd0b7..462760b 100644 (file)
@@ -598,8+598,6 @@ static int probe_irq;
 static void probe_intr (int sig) {
     probe_irq = sig;
 };
-static struct sigaction probe_sigaction = { probe_intr, 0, SA_INTERRUPT,
-    NULL};
 
 static int NCR5380_probe_irq (struct Scsi_Host *instance, int possible) {
     NCR5380_local_declare();
@@ -610,7+608,7 @@ static int NCR5380_probe_irq (struct Scsi_Host *instance, int possible) {
     NCR5380_setup(instance);
 
     for (trying_irqs = i = 0, mask = 1; i < 16; ++i, mask <<= 1) 
-       if ((mask & possible) &&  (irqaction (i, &probe_sigaction
+       if ((mask & possible) &&  (request_irq(i, &probe_intr, SA_INTERRUPT, "NCR-probe"
            == 0)) 
            trying_irqs |= mask;
 
index 48d2ba2..d73c761 100644 (file)
@@ -507,7+507,6 @@ int aha152x_detect(Scsi_Host_Template * tpnt)
 {
   int                 i, j,  ok;
   aha152x_config      conf;
-  struct sigaction    sa;
   int                 interrupt_level;
   
   if(setup_called)
@@ -625,12+624,7 @@ int aha152x_detect(Scsi_Host_Template * tpnt)
 
   printk("detection complete\n");
  
-  sa.sa_handler  = aha152x_intr;
-  sa.sa_flags    = SA_INTERRUPT;
-  sa.sa_mask     = 0;
-  sa.sa_restorer = NULL;
-  
-  ok = irqaction( interrupt_level, &sa);
+  ok = request_irq(interrupt_level, aha152x_intr, SA_INTERRUPT, "aha152x");
   
   if(ok<0)
     {
index 695b460..c93e369 100644 (file)
@@ -328,11+328,11 @@ static void aha1542_intr_handle(int foo)
     irqno = *irqp;
 
     shost = aha_host[irqno - 9];
+    if(!shost) panic("Splunge!");
+
     mb = HOSTDATA(shost)->mb;
     ccb = HOSTDATA(shost)->ccb;
 
-    if(!shost) panic("Splunge!");
-
 #ifdef DEBUG
     {
     flag = inb(INTRFLAGS(shost->io_port));
@@ -608,7+608,7 @@ int aha1542_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
     ccb[mbo].linkptr[0] = ccb[mbo].linkptr[1] = ccb[mbo].linkptr[2] = 0;
     ccb[mbo].commlinkid = 0;
 
-#ifdef DEBUGd
+#ifdef DEBUG
     { int i;
     printk("aha1542_command: sending.. ");
     for (i = 0; i < sizeof(ccb[mbo])-10; i++)
@@ -870,7+870,7 @@ int aha1542_detect(Scsi_Host_Template * tpnt)
                    
                    DEB(printk("aha1542_detect: enable interrupt channel %d\n", irq_level));
                    cli();
-                   if (request_irq(irq_level,aha1542_intr_handle)) {
+                   if (request_irq(irq_level,aha1542_intr_handle, 0, "aha1542")) {
                            printk("Unable to allocate IRQ for adaptec controller.\n");
                            goto unregister;
                    }
index a60280b..69751a6 100644 (file)
@@ -457,7+457,7 @@ int aha1740_detect(Scsi_Host_Template * tpnt)
 
     DEB(printk("aha1740_detect: enable interrupt channel %d\n", irq_level));
 
-    if (request_irq(irq_level,aha1740_intr_handle))
+    if (request_irq(irq_level,aha1740_intr_handle, 0, "aha1740"))
     {
         printk("Unable to allocate IRQ for adaptec controller.\n");
         return 0;
index c65b82c..fefc131 100644 (file)
@@ -1,5+1,5 @@
 /*
- *     buslogic.c      (C) 1993 David B. Gentzel
+ *     buslogic.c      (C) 1993, 1994 David B. Gentzel
  *     Low-level scsi driver for BusLogic adapters
  *     by David B. Gentzel, Whitfield Software Services, Carnegie, PA
  *         (gentzel@nova.enet.dec.com)
  *     4. See if we can make good use of having more than one command per lun.
  *     5. Test/improve/fix abort & reset functions.
  *     6. Look at command linking.
+ *     7. Allow multiple boards to share an IRQ if the bus allows (e.g. EISA).
  */
 
 /*
 #include <linux/head.h>
 #include <linux/types.h>
 #include <linux/ioport.h>
+#include <linux/delay.h>
 
 #include <asm/io.h>
 #include <asm/system.h>
 #include "../block/blk.h"
 #include "scsi.h"
 #include "hosts.h"
-# include "sd.h"
+#include "sd.h"
 #define BUSLOGIC_PRIVATE_H     /* Get the "private" stuff */
 #include "buslogic.h"
 
 
 #define BUSLOGIC_VERSION "1.00"
 
-/* ??? This *MAY* work to properly report the geometry of disks > 1G when the
-   alternate geometry is enabled on the host adapter.  It is completely
-   untested as I have no such disk to experiment with.  I rarely refuse gifts,
-   however... */
-/* Check out the stuff in aha1542.c - is this the same as how buslogic does
-   it? - ERY */
-/* ??? Not Yet Implemented */
-/*#ifdef BUSLOGIC_ALTERNATE_MAPPING*/
-
 /* Not a random value - if this is too large, the system hangs for a long time
    waiting for something to happen if a board is not installed. */
 #define WAITNEXTTIMEOUT 3000000
 /* BusLogic boards can be configured for quite a number of port addresses (six
    to be exact), but I generally do not want the driver poking around at
    random.  We allow two port addresses - this allows people to use a BusLogic
-   with a MIDI card, which frequently also used 0x330.  If different port
+   with a MIDI card, which frequently also uses 0x330.  If different port
    addresses are needed (e.g. to install more than two cards), you must define
    BUSLOGIC_PORT_OVERRIDE to be a list of the addresses which will be checked.
    This can also be used to resolve a conflict if the port-probing at a
@@ -131,15+124,15 @@ static const unsigned int bases[] = {
 #endif
 };
 
-#define BIOS_TRANSLATION_6432 1                /* Default case */
-#define BIOS_TRANSLATION_25563 2       /* Big disk case */
+#define BIOS_TRANSLATION_6432 0                /* Default case */
+#define BIOS_TRANSLATION_25563 1       /* Big disk case */
 
 struct hostdata {
     unsigned char bus_type;
     int bios_translation;      /* Mapping bios uses - for compatibility */
     size_t last_mbi_used;
     size_t last_mbo_used;
-    Scsi_Cmnd *SCint[BUSLOGIC_MAILBOXES];
+    Scsi_Cmnd *sc[BUSLOGIC_MAILBOXES];
     struct mailbox mb[2 * BUSLOGIC_MAILBOXES];
     struct ccb ccbs[BUSLOGIC_MAILBOXES];
 };
@@ -149,7+142,8 @@ struct hostdata {
 /* One for each IRQ level (9-15), although 13 will never be used. */
 static struct Scsi_Host *host[7] = { NULL, };
 
-static int setup_mailboxes(unsigned int base, struct Scsi_Host *SHpnt);
+static int setup_mailboxes(unsigned int base, struct Scsi_Host *shpnt);
+static int restart(struct Scsi_Host *shpnt);
 
 #define INTR_RESET(base) outb(RINT, CONTROL(base))
 
@@ -157,24+151,32 @@ static int setup_mailboxes(unsigned int base, struct Scsi_Host *SHpnt);
 
 #define CHECK(cond) if (cond) ; else goto fail
 
-#define WAIT(port, mask, allof, noneof) CHECK(wait(port, mask, allof, noneof))
+#define WAIT(port, mask, allof, noneof) \
+    CHECK(wait(port, mask, allof, noneof, WAITNEXTTIMEOUT, FALSE))
 #define WAIT_WHILE(port, mask) WAIT(port, mask, 0, mask)
 #define WAIT_UNTIL(port, mask) WAIT(port, mask, mask, 0)
+#define WAIT_FAST(port, mask, allof, noneof) \
+    CHECK(wait(port, mask, allof, noneof, 100, TRUE))
+#define WAIT_WHILE_FAST(port, mask) WAIT_FAST(port, mask, 0, mask)
+#define WAIT_UNTIL_FAST(port, mask) WAIT_FAST(port, mask, mask, 0)
 
+/* If delay != 0, we use the udelay call to regulate the amount of time we
+   wait. */
 static __inline__ int wait(unsigned short port, unsigned char mask,
-                          unsigned char allof, unsigned char noneof)
+                          unsigned char allof, unsigned char noneof,
+                          unsigned int timeout, int delay)
 {
     int bits;
-    unsigned int timeout = WAITNEXTTIMEOUT;
 
     for (;;) {
        bits = inb(port) & mask;
        if ((bits & allof) == allof && (bits & noneof) == 0)
-           break;
+           return TRUE;
+       if (delay)
+           udelay(1000);
        if (--timeout == 0)
            return FALSE;
     }
-    return TRUE;
 }
 
 static void buslogic_prefix(void)
@@ -182,7+184,7 @@ static void buslogic_prefix(void)
     printk("BusLogic SCSI: ");
 }
 
-#if 0
+#if BUSLOGIC_DEBUG
 static void buslogic_stat(unsigned int base)
 {
     int s = inb(STATUS(base)), i = inb(INTERRUPT(base));
@@ -197,7+199,8 @@ static void buslogic_stat(unsigned int base)
    routine does not send something out while we are in the middle of this.
    Fortunately, it is only at boot time that multi-byte messages are ever
    sent. */
-static int buslogic_out(unsigned int base, const unsigned char *cmdp, size_t len)
+static int buslogic_out(unsigned int base, const unsigned char *cmdp,
+                       size_t len)
 {
     if (len == 1) {
        for (;;) {
@@ -226,6+229,8 @@ static int buslogic_out(unsigned int base, const unsigned char *cmdp, size_t len
     return TRUE;
 }
 
+/* Only used at boot time, so we do not need to worry about latency as much
+   here. */
 static int buslogic_in(unsigned int base, unsigned char *cmdp, size_t len)
 {
     cli();
@@ -242,6+247,25 @@ static int buslogic_in(unsigned int base, unsigned char *cmdp, size_t len)
     return TRUE;
 }
 
+#if 0
+/* Similar to buslogic_in, except that we wait a very short period of time.
+   We use this if we know the board is alive and awake, but we are not sure
+   whether the board will respond the the command we are about to send. */
+static int buslogic_in_fast(unsigned int base, unsigned char *cmdp, size_t len)
+{
+    cli();
+    while (len--) {
+       WAIT_UNTIL_FAST(STATUS(base), DIRRDY);
+       *cmdp++ = inb(DATA_IN(base));
+    }
+    sti();
+    return FALSE;
+  fail:
+    sti();
+    return TRUE;
+}
+#endif
+
 static unsigned int makecode(unsigned int hosterr, unsigned int scsierr)
 {
     switch (hosterr) {
@@ -264,7+288,7 @@ static unsigned int makecode(unsigned int hosterr, unsigned int scsierr)
                           target.  The host adapter will generate a SCSI
                           Reset Condition, notifying the host with a RSTS
                           interrupt. */
-       hosterr = DID_RESET;    /* ??? Is this right? */
+       hosterr = DID_RESET;
        break;
 
       case 0x12:       /* Data overrun/underrun: the target attempted to
@@ -315,7+339,7 @@ static unsigned int makecode(unsigned int hosterr, unsigned int scsierr)
     return (hosterr << 16) | scsierr;
 }
 
-static int test_port(unsigned int base, struct Scsi_Host *SHpnt)
+static int test_port(unsigned int base, struct Scsi_Host *shpnt)
 {
     unsigned int i;
     unsigned char inquiry_cmd[] = { CMD_INQUIRY };
@@ -335,6+359,9 @@ static int test_port(unsigned int base, struct Scsi_Host *SHpnt)
     buslogic_printk("test_port called\n");
 #endif
 
+    /* In case some other card was probing here, reset interrupts. */
+    INTR_RESET(base);  /* reset interrupts, so they don't block */
+
     outb(RSOFT | RINT/* | RSBUS*/, CONTROL(base));
 
     /* Wait a little bit for things to settle down. */
@@ -396,50+423,67 @@ static void buslogic_interrupt(int junk)
     void (*my_done)(Scsi_Cmnd *) = NULL;
     int errstatus, mbistatus = 0, number_serviced, found;
     size_t mbi, mbo = 0;
-    struct Scsi_Host *SHpnt;
-    Scsi_Cmnd *SCtmp;
-    int irqno, base;
+    struct Scsi_Host *shpnt;
+    Scsi_Cmnd *sctmp;
+    int irqno, base, flag;
+    int needs_restart;
     struct mailbox *mb;
     struct ccb *ccb;
 
     /* Magic - this -2 is only required for slow interrupt handlers */
     irqno = ((int *)junk)[-2];
 
-    SHpnt = host[irqno - 9];
-    if (!SHpnt)
+    shpnt = host[irqno - 9];
+    if (!shpnt)
        panic("buslogic.c: NULL SCSI host entry");
 
-    mb = HOSTDATA(SHpnt)->mb;
-    ccb = HOSTDATA(SHpnt)->ccbs;
-    base = SHpnt->io_port;
+    mb = HOSTDATA(shpnt)->mb;
+    ccb = HOSTDATA(shpnt)->ccbs;
+    base = shpnt->io_port;
 
 #if BUSLOGIC_DEBUG
-    {
-       int flag = inb(INTERRUPT(base));
-
-       buslogic_printk("buslogic_interrupt: ");
-       if (!(flag & INTV))
-           printk("no interrupt? ");
-       if (flag & IMBL)
-           printk("IMBL ");
-       if (flag & MBOR)
-           printk("MBOR ");
-       if (flag & CMDC)
-           printk("CMDC ");
-       if (flag & RSTS)
-           printk("RSTS ");
-       printk("status %02X\n", inb(STATUS(base)));
-    }
+    flag = inb(INTERRUPT(base));
+
+    buslogic_printk("buslogic_interrupt: ");
+    if (!(flag & INTV))
+       printk("no interrupt? ");
+    if (flag & IMBL)
+       printk("IMBL ");
+    if (flag & MBOR)
+       printk("MBOR ");
+    if (flag & CMDC)
+       printk("CMDC ");
+    if (flag & RSTS)
+       printk("RSTS ");
+    printk("status %02X\n", inb(STATUS(base)));
 #endif
 
     number_serviced = 0;
+    needs_restart = 0;
 
     for (;;) {
+       flag = inb(INTERRUPT(base));
+
+       /* Check for unusual interrupts.  If any of these happen, we should
+          probably do something special, but for now just printing a message
+          is sufficient.  A SCSI reset detected is something that we really
+          need to deal with in some way. */
+       if (flag & ~IMBL) {
+           if (flag & MBOR)
+               printk("MBOR ");
+           if (flag & CMDC)
+               printk("CMDC ");
+           if (flag & RSTS) {
+               needs_restart = 1;
+               printk("RSTS ");
+           }
+       }
+
        INTR_RESET(base);
 
        cli();
 
-       mbi = HOSTDATA(SHpnt)->last_mbi_used + 1;
+       mbi = HOSTDATA(shpnt)->last_mbi_used + 1;
        if (mbi >= 2 * BUSLOGIC_MAILBOXES)
            mbi = BUSLOGIC_MAILBOXES;
 
@@ -455,22+499,25 @@ static void buslogic_interrupt(int junk)
            mbi++;
            if (mbi >= 2 * BUSLOGIC_MAILBOXES)
                mbi = BUSLOGIC_MAILBOXES;
-       } while (mbi != HOSTDATA(SHpnt)->last_mbi_used);
+       } while (mbi != HOSTDATA(shpnt)->last_mbi_used);
 
        if (found) {
            mbo = (struct ccb *)mb[mbi].ccbptr - ccb;
            mbistatus = mb[mbi].status;
            mb[mbi].status = MBX_NOT_IN_USE;
-           HOSTDATA(SHpnt)->last_mbi_used = mbi;
+           HOSTDATA(shpnt)->last_mbi_used = mbi;
        }
 
        sti();
 
        if (!found) {
            /* Hmm, no mail.  Must have read it the last time around. */
-           if (number_serviced)
-               return;
-           buslogic_printk("interrupt received, but no mail\n");
+           if (!number_serviced && !needs_restart)
+               buslogic_printk("interrupt received, but no mail.\n");
+           /* We detected a reset.  Restart all pending commands for devices
+              that use the hard reset option. */
+           if (needs_restart)
+               restart(shpnt);
            return;
        }
 
@@ -488,16+535,28 @@ static void buslogic_interrupt(int junk)
        buslogic_printk("...done %u %u\n", mbo, mbi);
 #endif
 
-       SCtmp = HOSTDATA(SHpnt)->SCint[mbo];
+       sctmp = HOSTDATA(shpnt)->sc[mbo];
 
-       if (!SCtmp || !SCtmp->scsi_done) {
+       if (!sctmp || !sctmp->scsi_done) {
            buslogic_printk("buslogic_interrupt: Unexpected interrupt\n");
+           buslogic_printk("tarstat=%02X, hastat=%02X id=%d lun=%d ccb#=%d\n",
+                           ccb[mbo].tarstat, ccb[mbo].hastat,
+                           ccb[mbo].id, ccb[mbo].lun, mbo);
            return;
        }
 
-       my_done = SCtmp->scsi_done;
-       if (SCtmp->host_scribble)
-           scsi_free(SCtmp->host_scribble, BUSLOGIC_SG_MALLOC);
+       my_done = sctmp->scsi_done;
+       if (sctmp->host_scribble)
+           scsi_free(sctmp->host_scribble, BUSLOGIC_SG_MALLOC);
+
+#if 0  /* ??? */
+       /* Fetch the sense data, and tuck it away, in the required slot.  The
+          BusLogic automatically fetches it, and there is no guarantee that we
+          will still have it in the cdb when we come back. */
+       if (ccb[mbo].tarstat == 2)      /* ??? */
+           memcpy(sctmp->sense_buffer, &ccb[mbo].cdb[ccb[mbo].cdblen],
+                  sizeof sctmp->sense_buffer);
+#endif
 
        /* ??? more error checking left out here */
        if (mbistatus != 1)
@@ -514,9+573,9 @@ static void buslogic_interrupt(int junk)
        if (status_byte(ccb[mbo].tarstat) == CHECK_CONDITION) {
            size_t i;
 
-           buslogic_printk("buslogic_interrupt: sense: ");
-           for (i = 0; i < sizeof SCtmp->sense_buffer; i++)
-               printk(" %02X", SCtmp->sense_buffer[i]);
+           buslogic_printk("buslogic_interrupt: sense:");
+           for (i = 0; i < sizeof sctmp->sense_buffer; i++)
+               printk(" %02X", sctmp->sense_buffer[i]);
            printk("\n");
        }
 
@@ -524,45+583,47 @@ static void buslogic_interrupt(int junk)
            buslogic_printk("buslogic_interrupt: returning %08X\n", errstatus);
 #endif
 
-       SCtmp->result = errstatus;
-       HOSTDATA(SHpnt)->SCint[mbo] = NULL;     /* This effectively frees up
+       sctmp->result = errstatus;
+       HOSTDATA(shpnt)->sc[mbo] = NULL;        /* This effectively frees up
                                                   the mailbox slot, as far as
-                                                  queuecommand is concerned. */
-       my_done(SCtmp);
+                                                  queuecommand is
+                                                  concerned. */
+       my_done(sctmp);
        number_serviced++;
     }
 }
 
-int buslogic_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
+int buslogic_queuecommand(Scsi_Cmnd *scpnt, void (*done)(Scsi_Cmnd *))
 {
     static const unsigned char buscmd[] = { CMD_START_SCSI };
     unsigned char direction;
-    unsigned char *cmd = (unsigned char *)SCpnt->cmnd;
-    unsigned char target = SCpnt->target;
-    unsigned char lun = SCpnt->lun;
-    void *buff = SCpnt->request_buffer;
-    int bufflen = SCpnt->request_bufflen;
+    unsigned char *cmd = (unsigned char *)scpnt->cmnd;
+    unsigned char target = scpnt->target;
+    unsigned char lun = scpnt->lun;
+    void *buff = scpnt->request_buffer;
+    int bufflen = scpnt->request_bufflen;
     int mbo;
     struct mailbox *mb;
     struct ccb *ccb;
 
 #if BUSLOGIC_DEBUG
     if (target > 1) {
-       SCpnt->result = DID_TIME_OUT << 16;
-       done(SCpnt);
+       scpnt->result = DID_TIME_OUT << 16;
+       done(scpnt);
        return 0;
     }
 #endif
 
     if (*cmd == REQUEST_SENSE) {
 #ifndef DEBUG
-       if (bufflen != sizeof SCpnt->sense_buffer) {
-           buslogic_printk("Wrong buffer length supplied for request sense (%d)\n",
+       if (bufflen != sizeof scpnt->sense_buffer) {
+           buslogic_printk("Wrong buffer length supplied for request sense"
+                           " (%d)\n",
                            bufflen);
        }
 #endif
-       SCpnt->result = 0;
-       done(SCpnt);
+       scpnt->result = 0;
+       done(scpnt);
        return 0;
     }
 
@@ -570,16+631,16 @@ int buslogic_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
     {
        int i;
 
-       if (*cmd == READ_10 || *cmd == WRITE_10)
-           i = xscsi2int(cmd + 2);
-       else if (*cmd == READ_6 || *cmd == WRITE_6)
-           i = scsi2int(cmd + 2);
+       if (*cmd == READ_10 || *cmd == WRITE_10
+           || *cmd == READ_6 || *cmd == WRITE_6)
+           i = *(int *)(cmd + 2);
        else
            i = -1;
-       buslogic_printk("buslogic_queuecommand: dev %d cmd %02X pos %d len %d ",
+       buslogic_printk("buslogic_queuecommand:"
+                       " dev %d cmd %02X pos %d len %d ",
                        target, *cmd, i, bufflen);
-       buslogic_stat(SCpnt->host->io_port);
-       buslogic_printk("buslogic_queuecommand: dumping scsi cmd: ");
+       buslogic_stat(scpnt->host->io_port);
+       buslogic_printk("buslogic_queuecommand: dumping scsi cmd:");
        for (i = 0; i < (COMMAND_SIZE(*cmd)); i++)
            printk(" %02X", cmd[i]);
        printk("\n");
@@ -588,38+649,39 @@ int buslogic_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
     }
 #endif
 
-    mb = HOSTDATA(SCpnt->host)->mb;
-    ccb = HOSTDATA(SCpnt->host)->ccbs;
+    mb = HOSTDATA(scpnt->host)->mb;
+    ccb = HOSTDATA(scpnt->host)->ccbs;
 
     /* Use the outgoing mailboxes in a round-robin fashion, because this
        is how the host adapter will scan for them. */
 
     cli();
 
-    mbo = HOSTDATA(SCpnt->host)->last_mbo_used + 1;
+    mbo = HOSTDATA(scpnt->host)->last_mbo_used + 1;
     if (mbo >= BUSLOGIC_MAILBOXES)
        mbo = 0;
 
     do {
        if (mb[mbo].status == MBX_NOT_IN_USE
-           && HOSTDATA(SCpnt->host)->SCint[mbo] == NULL)
+           && HOSTDATA(scpnt->host)->sc[mbo] == NULL)
            break;
        mbo++;
        if (mbo >= BUSLOGIC_MAILBOXES)
            mbo = 0;
-    } while (mbo != HOSTDATA(SCpnt->host)->last_mbo_used);
+    } while (mbo != HOSTDATA(scpnt->host)->last_mbo_used);
 
-    if (mb[mbo].status != MBX_NOT_IN_USE || HOSTDATA(SCpnt->host)->SCint[mbo]) {
-       /* ??? Instead of panicing, we should enable OMBR interrupts and
-          sleep until we get one. */
+    if (mb[mbo].status != MBX_NOT_IN_USE
+       || HOSTDATA(scpnt->host)->sc[mbo]) {
+       /* ??? Instead of panicing, should we enable OMBR interrupts and
+          sleep until we get one? */
        panic("buslogic.c: unable to find empty mailbox");
     }
 
-    HOSTDATA(SCpnt->host)->SCint[mbo] = SCpnt; /* This will effectively
+    HOSTDATA(scpnt->host)->sc[mbo] = scpnt;    /* This will effectively
                                                   prevent someone else from
                                                   screwing with this cdb. */
 
-    HOSTDATA(SCpnt->host)->last_mbo_used = mbo;
+    HOSTDATA(scpnt->host)->last_mbo_used = mbo;
 
     sti();
 
@@ -643,33+705,36 @@ int buslogic_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
 
     memcpy(ccb[mbo].cdb, cmd, ccb[mbo].cdblen);
 
-    if (SCpnt->use_sg) {
+    if (scpnt->use_sg) {
        struct scatterlist *sgpnt;
        struct chain *cptr;
        size_t i;
 
-       ccb[mbo].op = CCB_OP_INIT_SG;   /* SCSI Initiator Command w/scatter-gather */
-       SCpnt->host_scribble = (unsigned char *)scsi_malloc(BUSLOGIC_SG_MALLOC);
-       if (SCpnt->host_scribble == NULL)
+       ccb[mbo].op = CCB_OP_INIT_SG;   /* SCSI Initiator Command
+                                          w/scatter-gather */
+       scpnt->host_scribble
+           = (unsigned char *)scsi_malloc(BUSLOGIC_SG_MALLOC);
+       if (scpnt->host_scribble == NULL)
            panic("buslogic.c: unable to allocate DMA memory");
-       sgpnt = (struct scatterlist *)SCpnt->request_buffer;
-       cptr = (struct chain *)SCpnt->host_scribble;
-       if (SCpnt->use_sg > SCpnt->host->sg_tablesize) {
-           buslogic_printk("buslogic_queuecommand bad segment list, %d > %d\n",
-                           SCpnt->use_sg, SCpnt->host->sg_tablesize);
+       sgpnt = (struct scatterlist *)scpnt->request_buffer;
+       cptr = (struct chain *)scpnt->host_scribble;
+       if (scpnt->use_sg > scpnt->host->sg_tablesize) {
+           buslogic_printk("buslogic_queuecommand: bad segment list,"
+                           " %d > %d\n",
+                           scpnt->use_sg, scpnt->host->sg_tablesize);
            panic("buslogic.c: bad segment list");
        }
-       for (i = 0; i < SCpnt->use_sg; i++) {
+       for (i = 0; i < scpnt->use_sg; i++) {
            cptr[i].dataptr = sgpnt[i].address;
            cptr[i].datalen = sgpnt[i].length;
        }
-       ccb[mbo].datalen = SCpnt->use_sg * sizeof (struct chain);
+       ccb[mbo].datalen = scpnt->use_sg * sizeof (struct chain);
        ccb[mbo].dataptr = cptr;
 #if BUSLOGIC_DEBUG
        {
            unsigned char *ptr;
 
-           buslogic_printk("cptr %08X: ", cptr);
+           buslogic_printk("cptr %08X:", cptr);
            ptr = (unsigned char *)cptr;
            for (i = 0; i < 18; i++)
                printk(" %02X", ptr[i]);
@@ -678,15+743,15 @@ int buslogic_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
 #endif
     } else {
        ccb[mbo].op = CCB_OP_INIT;      /* SCSI Initiator Command */
-       SCpnt->host_scribble = NULL;
+       scpnt->host_scribble = NULL;
        ccb[mbo].datalen = bufflen;
        ccb[mbo].dataptr = buff;
     }
     ccb[mbo].id = target;
     ccb[mbo].lun = lun;
     ccb[mbo].dir = direction;
-    ccb[mbo].rsalen = sizeof SCpnt->sense_buffer;
-    ccb[mbo].senseptr = SCpnt->sense_buffer;
+    ccb[mbo].rsalen = sizeof scpnt->sense_buffer;
+    ccb[mbo].senseptr = scpnt->sense_buffer;
     ccb[mbo].linkptr = NULL;
     ccb[mbo].commlinkid = 0;
 
@@ -695,7+760,7 @@ int buslogic_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
        size_t i;
 
        buslogic_printk("buslogic_queuecommand: sending...");
-       for (i = 0; i < sizeof ccb[mbo]; i++)
+       for (i = 0; i < sizeof ccb[mbo] - 10; i++)
            printk(" %02X", ((unsigned char *)&ccb[mbo])[i]);
        printk("\n");
     }
@@ -704,15+769,14 @@ int buslogic_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
     if (done) {
 #if BUSLOGIC_DEBUG
        buslogic_printk("buslogic_queuecommand: now waiting for interrupt: ");
-       buslogic_stat(SCpnt->host->io_port);
+       buslogic_stat(scpnt->host->io_port);
 #endif
-       SCpnt->scsi_done = done;
+       scpnt->scsi_done = done;
        mb[mbo].status = MBX_ACTION_START;
        /* start scsi command */
-       buslogic_out(SCpnt->host->io_port, buscmd, sizeof buscmd);
+       buslogic_out(scpnt->host->io_port, buscmd, sizeof buscmd);
 #if BUSLOGIC_DEBUG
-       buslogic_printk("buslogic_queuecommand: status: ");
-       buslogic_stat(SCpnt->host->io_port);
+       buslogic_stat(scpnt->host->io_port);
 #endif
     } else
        buslogic_printk("buslogic_queuecommand: done can't be NULL\n");
@@ -721,34+785,33 @@ int buslogic_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
 }
 
 #if 0
-static void internal_done(Scsi_Cmnd *SCpnt)
+static void internal_done(Scsi_Cmnd *scpnt)
 {
-    SCpnt->SCp.Status++;
+    scpnt->SCp.Status++;
 }
 
-int buslogic_command(Scsi_Cmnd *SCpnt)
+int buslogic_command(Scsi_Cmnd *scpnt)
 {
 #if BUSLOGIC_DEBUG
     buslogic_printk("buslogic_command: ..calling buslogic_queuecommand\n");
 #endif
 
-    buslogic_queuecommand(SCpnt, internal_done);
+    buslogic_queuecommand(scpnt, internal_done);
 
-    SCpnt->SCp.Status = 0;
-    while (!SCpnt->SCp.Status)
+    scpnt->SCp.Status = 0;
+    while (!scpnt->SCp.Status)
        continue;
-    return SCpnt->result;
-    return internal_done_errcode;
+    return scpnt->result;
 }
 #endif
 
 /* Initialize mailboxes. */
-static int setup_mailboxes(unsigned int base, struct Scsi_Host *SHpnt)
+static int setup_mailboxes(unsigned int base, struct Scsi_Host *shpnt)
 {
     size_t i;
     int ok = FALSE;            /* Innocent until proven guilty... */
-    struct mailbox *mb = HOSTDATA(SHpnt)->mb;
-    struct ccb *ccb = HOSTDATA(SHpnt)->ccbs;
+    struct mailbox *mb = HOSTDATA(shpnt)->mb;
+    struct ccb *ccb = HOSTDATA(shpnt)->ccbs;
     struct {
        unsigned char cmd, count;
        void *base PACKED;
@@ -777,10+840,11 @@ static int setup_mailboxes(unsigned int base, struct Scsi_Host *SHpnt)
        buslogic_printk("buslogic_detect: failed setting up mailboxes\n");
     }
     ok = TRUE;
-    return ok;
   must_be_adaptec:
     INTR_RESET(base);
-    printk("- must be Adaptec\n"); /* So that the adaptec detect looks clean */
+    if (!ok)
+       printk("- must be Adaptec\n");  /* So that the adaptec detect looks
+                                          clean */
     return ok;
 }
 
@@ -822,7+886,8 @@ static int getconfig(unsigned int base, unsigned char *irq,
        *irq = 15;
        break;
       default:
-       buslogic_printk("Unable to determine BusLogic IRQ level.  Disabling board.\n");
+       buslogic_printk("Unable to determine BusLogic IRQ level."
+                       "  Disabling board.\n");
        return TRUE;
     }
     *id = inquiry_result[2] & 0x7;
@@ -854,7+919,7 @@ static int getconfig(unsigned int base, unsigned char *irq,
        DMA channel).  We ignore this. */
     if (*bus_type == 'A')
        switch (*dma) {
-         case 0:       /* This indicates that no DMA channel is used. */
+         case 0:       /* This indicates that no DMA channel is used. */
            *dma = 0;
            break;
          case 0x20:
@@ -867,7+932,8 @@ static int getconfig(unsigned int base, unsigned char *irq,
            *dma = 7;
            break;
          default:
-           buslogic_printk("Unable to determine BusLogic DMA channel.  Disabling board.\n");
+           buslogic_printk("Unable to determine BusLogic DMA channel."
+                           "  Disabling board.\n");
            return TRUE;
        }
     else
@@ -882,10+948,18 @@ static int getconfig(unsigned int base, unsigned char *irq,
     return FALSE;
 }
 
+static int get_translation(unsigned int base)
+{
+    /* ??? This is wrong if disk is configured for > 1G mapping.
+       Unfortunately, unlike UltraStor, I see know way of determining whether
+       > 1G mapping has been enabled. */
+    return BIOS_TRANSLATION_6432;
+}
+
 /* Query the board to find out the model. */
 static int buslogic_query(unsigned int base, int *trans)
 {
-    unsigned const char inquiry_cmd[] = { CMD_INQUIRY };
+    static const unsigned char inquiry_cmd[] = { CMD_INQUIRY };
     unsigned char inquiry_result[4];
     int i;
 
@@ -897,22+971,25 @@ static int buslogic_query(unsigned int base, int *trans)
     WAIT_UNTIL(INTERRUPT(base), CMDC);
     INTR_RESET(base);
 
-    buslogic_printk("Inquiry Bytes: %X %X %X %X\n",
-                   inquiry_result[0],inquiry_result[1],
-                   inquiry_result[2],inquiry_result[3]);
+#if 1 /* ??? Temporary */
+    buslogic_printk("Inquiry Bytes: %02X %02X %02X %02X\n",
+                   inquiry_result[0], inquiry_result[1],
+                   inquiry_result[2], inquiry_result[3]);
+#endif
+
     while (0) {
       fail:
        buslogic_printk("buslogic_query: query board settings\n");
        return TRUE;
     }
 
-    *trans = BIOS_TRANSLATION_6432;     /* Default case */
+    *trans = get_translation(base);
 
     return FALSE;
 }
 
 /* return non-zero on detection */
-int buslogic_detect(Scsi_Host_Template * tpnt)
+int buslogic_detect(Scsi_Host_Template *tpnt)
 {
     unsigned char dma;
     unsigned char irq;
@@ -921,10+998,9 @@ int buslogic_detect(Scsi_Host_Template * tpnt)
     unsigned char bus_type;
     unsigned short max_sg;
     int trans;
-    struct Scsi_Host *SHpnt = NULL;
+    struct Scsi_Host *shpnt = NULL;
     int count = 0;
     int indx;
-    int val;
 
 #if BUSLOGIC_DEBUG
     buslogic_printk("buslogic_detect:\n");
@@ -932,11+1008,11 @@ int buslogic_detect(Scsi_Host_Template * tpnt)
 
     for (indx = 0; indx < ARRAY_SIZE(bases); indx++)
        if (!check_region(bases[indx], 3)) {
-           SHpnt = scsi_register(tpnt, sizeof (struct hostdata));
+           shpnt = scsi_register(tpnt, sizeof (struct hostdata));
 
            base = bases[indx];
 
-           if (test_port(base, SHpnt))
+           if (test_port(base, shpnt))
                goto unregister;
 
            /* Set the Bus on/off-times as not to ruin floppy performance. */
@@ -956,7+1032,8 @@ int buslogic_detect(Scsi_Host_Template * tpnt)
                WAIT_UNTIL(INTERRUPT(base), CMDC);
                while (0) {
                  fail:
-                   buslogic_printk("buslogic_detect: setting bus on/off-time failed\n");
+                   buslogic_printk("buslogic_detect:"
+                                   " setting bus on/off-time failed\n");
                }
                INTR_RESET(base);
            }
@@ -972,7+1049,7 @@ int buslogic_detect(Scsi_Host_Template * tpnt)
 #endif
            /* Here is where we tell the men from the boys (i.e. an Adaptec
               will fail in setup_mailboxes, the men will not :-) */
-           if (!setup_mailboxes(base, SHpnt))
+           if (!setup_mailboxes(base, shpnt))
                goto unregister;
 
            printk("Configuring BusLogic %s HA at port 0x%03X, IRQ %u",
@@ -993,8+1070,7 @@ int buslogic_detect(Scsi_Host_Template * tpnt)
 #endif
 
            cli();
-           val = request_irq(irq, buslogic_interrupt);
-           if (val) {
+           if (request_irq(irq, buslogic_interrupt, 0, "buslogic")) {
                buslogic_printk("Unable to allocate IRQ for "
                                "BusLogic controller.\n");
                sti();
@@ -1016,31+1092,32 @@ int buslogic_detect(Scsi_Host_Template * tpnt)
                }
            }
 
-           host[irq - 9] = SHpnt;
-           SHpnt->this_id = id;
+           host[irq - 9] = shpnt;
+           shpnt->this_id = id;
 #ifdef CONFIG_NO_BUGGY_BUSLOGIC
            /* Only type 'A' (AT/ISA) bus adapters use unchecked DMA. */
-           SHpnt->unchecked_isa_dma = (bus_type == 'A');
+           shpnt->unchecked_isa_dma = (bus_type == 'A');
 #else
-           /* bugs in the firmware with 16M+. Gaah */
-           SHpnt->unchecked_isa_dma = 1;
+           /* Bugs in the firmware of the 445S with >16M.  This does not seem
+              to affect Revision E boards with firmware 3.37. */
+           shpnt->unchecked_isa_dma = 1;
 #endif
-           SHpnt->sg_tablesize = max_sg;
-           if (SHpnt->sg_tablesize > BUSLOGIC_MAX_SG)
-               SHpnt->sg_tablesize = BUSLOGIC_MAX_SG;
+           shpnt->sg_tablesize = max_sg;
+           if (shpnt->sg_tablesize > BUSLOGIC_MAX_SG)
+               shpnt->sg_tablesize = BUSLOGIC_MAX_SG;
            /* ??? If we can dynamically allocate the mailbox arrays, I'll
               probably bump up this number. */
-           SHpnt->hostt->can_queue = BUSLOGIC_MAILBOXES;
-           /*SHpnt->base = ???;*/
-           SHpnt->io_port = base;
-           SHpnt->dma_channel = dma;
-           SHpnt->irq = irq;
-           HOSTDATA(SHpnt)->bios_translation = trans;
+           shpnt->hostt->can_queue = BUSLOGIC_MAILBOXES;
+           /*shpnt->base = ???;*/
+           shpnt->io_port = base;
+           shpnt->dma_channel = dma;
+           shpnt->irq = irq;
+           HOSTDATA(shpnt)->bios_translation = trans;
            if (trans == BIOS_TRANSLATION_25563)
                buslogic_printk("Using extended bios translation.\n");
-           HOSTDATA(SHpnt)->last_mbi_used  = 2 * BUSLOGIC_MAILBOXES - 1;
-           HOSTDATA(SHpnt)->last_mbo_used  = BUSLOGIC_MAILBOXES - 1;
-           memset(HOSTDATA(SHpnt)->SCint, 0, sizeof HOSTDATA(SHpnt)->SCint);
+           HOSTDATA(shpnt)->last_mbi_used = 2 * BUSLOGIC_MAILBOXES - 1;
+           HOSTDATA(shpnt)->last_mbo_used = BUSLOGIC_MAILBOXES - 1;
+           memset(HOSTDATA(shpnt)->sc, 0, sizeof HOSTDATA(shpnt)->sc);
            sti();
 
 #if 0
@@ -1057,9+1134,9 @@ int buslogic_detect(Scsi_Host_Template * tpnt)
                    buf[i] = 0x87;
                for (i = 0; i < 2; i++)
                    if (!buslogic_command(i, cmd, buf, sizeof buf)) {
-                       buslogic_printk("bus_detect: LU %u sector_size %d "
-                                       "device_size %d\n",
-                                       i, xscsi2int(buf + 4), xscsi2int(buf));
+                       buslogic_printk("buslogic_detect: LU %u "
+                                       "sector_size %d device_size %d\n",
+                                       i, *(int *)(buf + 4), *(int *)buf);
                    }
 
 #if BUSLOGIC_DEBUG
@@ -1085,28+1162,57 @@ int buslogic_detect(Scsi_Host_Template * tpnt)
            count++;
            continue;
          unregister:
-           scsi_unregister(SHpnt);
+           scsi_unregister(shpnt);
        }
     return count;
 }
 
+static int restart(struct Scsi_Host *shpnt)
+{
+    unsigned int i;
+    unsigned int count = 0;
+#if 0
+    static const unsigned char buscmd[] = { CMD_START_SCSI };
+#endif
+
+    for (i = 0; i < BUSLOGIC_MAILBOXES; i++)
+       if (HOSTDATA(shpnt)->sc[i]
+           && !HOSTDATA(shpnt)->sc[i]->device->soft_reset) {
+#if 0
+           HOSTDATA(shpnt)->mb[i].status = 1;  /* Indicate ready to
+                                                  restart... */
+#endif
+           count++;
+       }
+
+    buslogic_printk("Potential to restart %d stalled commands...\n", count);
+#if 0
+    /* start scsi command */
+    if (count)
+       buslogic_out(shpnt->host->io_port, buscmd, sizeof buscmd);
+#endif
+    return 0;
+}
+
 /* ??? The abort command for the aha1542 does not leave the device in a clean
    state where it is available to be used again.  As it is not clear whether
    the same problem exists with BusLogic boards, we will enable this and see
    if it works. */
-int buslogic_abort(Scsi_Cmnd *SCpnt)
+int buslogic_abort(Scsi_Cmnd *scpnt)
 {
+#if 1
     static const unsigned char buscmd[] = { CMD_START_SCSI };
     struct mailbox *mb;
-    int mbi, mbo, i;
+    size_t mbi, mbo;
+    unsigned int i;
 
     buslogic_printk("buslogic_abort: %X %X\n",
-                   inb(STATUS(SCpnt->host->io_port)),
-                   inb(INTERRUPT(SCpnt->host->io_port)));
+                   inb(STATUS(scpnt->host->io_port)),
+                   inb(INTERRUPT(scpnt->host->io_port)));
 
     cli();
-    mb = HOSTDATA(SCpnt->host)->mb;
-    mbi = HOSTDATA(SCpnt->host)->last_mbi_used + 1;
+    mb = HOSTDATA(scpnt->host)->mb;
+    mbi = HOSTDATA(scpnt->host)->last_mbi_used + 1;
     if (mbi >= 2 * BUSLOGIC_MAILBOXES)
        mbi = BUSLOGIC_MAILBOXES;
 
@@ -1116,16+1222,17 @@ int buslogic_abort(Scsi_Cmnd *SCpnt)
        mbi++;
        if (mbi >= 2 * BUSLOGIC_MAILBOXES)
            mbi = BUSLOGIC_MAILBOXES;
-    } while (mbi != HOSTDATA(SCpnt->host)->last_mbi_used);
+    } while (mbi != HOSTDATA(scpnt->host)->last_mbi_used);
     sti();
 
     if (mb[mbi].status != MBX_NOT_IN_USE) {
-       buslogic_printk("Lost interrupt discovered on irq %d - attempting to recover\n",
-                       SCpnt->host->irq);
+       buslogic_printk("Lost interrupt discovered on irq %d"
+                       " - attempting to recover\n",
+                       scpnt->host->irq);
        {
            int intval[3];
 
-           intval[0] = SCpnt->host->irq;
+           intval[0] = scpnt->host->irq;
            buslogic_interrupt((int)&intval[2]);
            return SCSI_ABORT_SUCCESS;
        }
@@ -1134,18+1241,19 @@ int buslogic_abort(Scsi_Cmnd *SCpnt)
     /* OK, no lost interrupt.  Try looking to see how many pending commands we
        think we have. */
     for (i = 0; i < BUSLOGIC_MAILBOXES; i++)
-       if (HOSTDATA(SCpnt->host)->SCint[i]) {
-           if (HOSTDATA(SCpnt->host)->SCint[i] == SCpnt) {
+       if (HOSTDATA(scpnt->host)->sc[i]) {
+           if (HOSTDATA(scpnt->host)->sc[i] == scpnt) {
                buslogic_printk("Timed out command pending for %4.4X\n",
-                               SCpnt->request.dev);
-               if (HOSTDATA(SCpnt->host)->mb[i].status != MBX_NOT_IN_USE) {
+                               scpnt->request.dev);
+               if (HOSTDATA(scpnt->host)->mb[i].status != MBX_NOT_IN_USE) {
                    buslogic_printk("OGMB still full - restarting\n");
-                   buslogic_out(SCpnt->host->io_port, buscmd, sizeof buscmd);
+                   buslogic_out(scpnt->host->io_port, buscmd, sizeof buscmd);
                }
            } else
                buslogic_printk("Other pending command %4.4X\n",
-                               SCpnt->request.dev);
+                               scpnt->request.dev);
        }
+#endif
 
 #if (BUSLOGIC_DEBUG & BD_ABORT)
     buslogic_printk("buslogic_abort\n");
@@ -1156,37+1264,86 @@ int buslogic_abort(Scsi_Cmnd *SCpnt)
        abort a command, and this merely makes it worse. */
     cli();
     for (mbo = 0; mbo < BUSLOGIC_MAILBOXES; mbo++)
-       if (SCpnt == HOSTDATA(SCpnt->host)->SCint[mbo]) {
-           HOSTDATA(SCpnt->host)->mb[mbo].status = MBX_ACTION_ABORT;
-           buslogic_out(SCpnt->host->io_port, buscmd, sizeof buscmd);
+       if (scpnt == HOSTDATA(scpnt->host)->sc[mbo]) {
+           mb[mbo].status = MBX_ACTION_ABORT;
+           buslogic_out(scpnt->host->io_port, buscmd, sizeof buscmd);
            break;
        }
     sti();
 #endif
 
-    return SCSI_ABORT_PENDING;
+    return SCSI_ABORT_SNOOZE;
 }
 
 /* We do not implement a reset function here, but the upper level code assumes
-   that it will get some kind of response for the command in SCpnt.  We must
-   oblige, or the command will hang the SCSI system. */
-int buslogic_reset(Scsi_Cmnd *SCpnt)
+   that it will get some kind of response for the command in scpnt.  We must
+   oblige, or the command will hang the SCSI system.  For a first go, we assume
+   that the BusLogic notifies us with all of the pending commands (it does
+   implement soft reset, after all). */
+int buslogic_reset(Scsi_Cmnd *scpnt)
 {
+    static const unsigned char buscmd[] = { CMD_START_SCSI };
+    unsigned int i;
+
 #if BUSLOGIC_DEBUG
     buslogic_printk("buslogic_reset\n");
 #endif
+#if 0
+    /* This does a scsi reset for all devices on the bus. */
+    outb(RSBUS, CONTROL(scpnt->host->io_port));
+#else
+    /* This does a selective reset of just the one device. */
+    /* First locate the ccb for this command. */
+    for (i = 0; i < BUSLOGIC_MAILBOXES; i++)
+       if (HOSTDATA(scpnt->host)->sc[i] == scpnt) {
+           HOSTDATA(scpnt->host)->ccbs[i].op = 0x81;   /* ??? BUS DEVICE
+                                                          RESET */
+
+           /* Now tell the BusLogic to flush all pending commands for this
+              target. */
+           buslogic_out(scpnt->host->io_port, buscmd, sizeof buscmd);
+
+           /* Here is the tricky part.  What to do next.  Do we get an
+              interrupt for the commands that we aborted with the specified
+              target, or do we generate this on our own?  Try it without first
+              and see what happens. */
+           buslogic_printk("Sent BUS DEVICE RESET to target %d\n",
+                           scpnt->target);
+
+           /* If the first does not work, then try the second.  I think the
+              first option is more likely to be correct.  Free the command
+              block for all commands running on this target... */
+#if 1
+           for (i = 0; i < BUSLOGIC_MAILBOXES; i++)
+               if (HOSTDATA(scpnt->host)->sc[i]
+                   && HOSTDATA(scpnt->host)->sc[i]->target == scpnt->target) {
+                   Scsi_Cmnd *sctmp = HOSTDATA(scpnt->host)->sc[i];
+
+                   sctmp->result = DID_RESET << 16;
+                   if (sctmp->host_scribble)
+                       scsi_free(sctmp->host_scribble, BUSLOGIC_SG_MALLOC);
+                   printk("Sending DID_RESET for target %d\n", scpnt->target);
+                   sctmp->scsi_done(scpnt);
+
+                   HOSTDATA(scpnt->host)->sc[i] = NULL;
+                   HOSTDATA(scpnt->host)->mb[i].status = MBX_NOT_IN_USE;
+               }
+           return SCSI_RESET_SUCCESS;
+#else
+           return SCSI_RESET_PENDING;
+#endif
+       }
+#endif
+    /* No active command at this time, so this means that each time we got some
+       kind of response the last time through.  Tell the mid-level code to
+       request sense information in order to decide what to do next. */
     return SCSI_RESET_PUNT;
 }
 
-int buslogic_biosparam(Disk * disk, int dev, int *ip)
+int buslogic_biosparam(Disk *disk, int dev, int *ip)
 {
-  int size = disk->capacity;
-  int translation_algorithm;
-
-  /* ??? This is wrong if disk is configured for > 1G mapping.
-     Unfortunately, unlike UltraStor, I see know way of determining whether
-     > 1G mapping has been enabled. */
-
+    int size = disk->capacity;
+    int translation_algorithm;
 
     translation_algorithm = HOSTDATA(disk->device->host)->bios_translation;
     /* ??? Should this be > 1024, or >= 1024?  Enquiring minds want to know. */
index c745c19..af509c3 100644 (file)
@@ -19,7+19,7 @@ const char *buslogic_info(void);
 int buslogic_reset(Scsi_Cmnd *);
 int buslogic_biosparam(Disk *, int, int *);
 
-#define BUSLOGIC_CMDLUN 1      /* ??? */
+#define BUSLOGIC_CMDLUN 4      /* ??? */
 
 #define BUSLOGIC { NULL,                       \
                   "BusLogic",                  \
index 8ca2af3..be88267 100644 (file)
@@ -488,7+488,6 @@ int fdomain_16x0_detect( Scsi_Host_Template *tpnt )
 {
    int              i, j;
    int              flag = 0;
-   struct sigaction sa;
    int              retcode;
 #if DO_DETECT
    const int        buflen = 255;
@@ -651,12+650,7 @@ int fdomain_16x0_detect( Scsi_Host_Template *tpnt )
    } else {
       /* Register the IRQ with the kernel */
 
-      sa.sa_handler  = fdomain_16x0_intr;
-      sa.sa_flags    = SA_INTERRUPT;
-      sa.sa_mask     = 0;
-      sa.sa_restorer = NULL;
-      
-      retcode = irqaction( interrupt_level, &sa );
+      retcode = request_irq( interrupt_level, fdomain_16x0_intr, SA_INTERRUPT, "FDomain");
 
       if (retcode < 0) {
         if (retcode == -EINVAL) {
index 11e3fd7..eea7bbb 100644 (file)
@@ -104,9+104,6 @@ void generic_NCR5380_setup(char *str, int *ints) {
        }
 }
 
-static struct sigaction sa =  { generic_NCR5380_intr, 0, 
-    SA_INTERRUPT , NULL };
-
 /* 
  * Function : int generic_NCR5380_detect(Scsi_Host_Templace * tpnt)
  *
@@ -139,7+136,7 @@ int generic_NCR5380_detect(Scsi_Host_Template * tpnt) {
            instance->irq = NCR5380_probe_irq(instance, 0xffff);
 
        if (instance->irq != IRQ_NONE) 
-           if (irqaction (instance->irq, &sa)) {
+           if (request_irq(instance->irq, generic_NCR5380_intr, SA_INTERRUPT, "NCR5380")) {
                printk("scsi%d : IRQ%d not free, interrupts disabled\n", 
                    instance->host_no, instance->irq);
                instance->irq = IRQ_NONE;
index b5153e4..a6c63f7 100644 (file)
@@ -303,8+303,6 @@ void pas16_setup(char *str, int *ints) {
        }
 }
 
-static struct sigaction pas16_sigaction =  { pas16_intr, 0, SA_INTERRUPT , NULL };
-
 /* 
  * Function : int pas16_detect(Scsi_Host_Template * tpnt)
  *
@@ -368,7+366,7 @@ int pas16_detect(Scsi_Host_Template * tpnt) {
            instance->irq = NCR5380_probe_irq(instance, PAS16_IRQS);
 
        if (instance->irq != IRQ_NONE) 
-           if (irqaction (instance->irq, &pas16_sigaction)) {
+           if (request_irq(instance->irq, pas16_intr, SA_INTERRUPT, "pas16")) {
                printk("scsi%d : IRQ%d not free, interrupts disabled\n", 
                    instance->host_no, instance->irq);
                instance->irq = IRQ_NONE;
index 77a5353..1ca8746 100644 (file)
@@ -328,7+328,7 @@ static void scan_scsis (struct Scsi_Host * shpnt)
          if (!the_result)
            printk("scsi: INQUIRY successful\n");
          else
-           printk("scsi: INQUIRY failed with code %08x\n");
+           printk("scsi: INQUIRY failed with code %08x\n", the_result);
 #endif
          
          if(the_result) break; 
index 043aa2a..a8c6738 100644 (file)
@@ -276,12+276,6 @@ int seagate_st0x_detect (Scsi_Host_Template * tpnt)
 #ifndef OVERRIDE
        int i,j;
 #endif 
-static struct sigaction seagate_sigaction = {
-       &seagate_reconnect_intr,
-       0,
-       SA_INTERRUPT,
-       NULL
-};
 
 /*
  *     First, we try for the manual override.
@@ -350,7+344,7 @@ static struct sigaction seagate_sigaction = {
  */
                instance = scsi_register(tpnt, 0);
                hostno = instance->host_no;
-               if (irqaction((int) irq, &seagate_sigaction)) {
+               if (request_irq((int) irq, seagate_reconnect_intr, SA_INTERRUPT, "seagate")) {
                        printk("scsi%d : unable to allocate IRQ%d\n",
                                hostno, (int) irq);
                        return 0;
@@ -1589,7+1583,7 @@ int seagate_st0x_reset (Scsi_Cmnd * SCpnt)
 #ifdef DEBUG
        printk("SCSI bus reset.\n");
 #endif
-       return SCSI_RESET_PENDING;
+       return SCSI_RESET_WAKEUP;
        }
 
 #include <asm/segment.h>
index 4d8eedc..5ad3679 100644 (file)
@@ -178,8+178,6 @@ void t128_setup(char *str, int *ints) {
        }
 }
 
-static struct sigaction t128_sigaction =  { t128_intr, 0, SA_INTERRUPT , NULL };
-
 /* 
  * Function : int t128_detect(Scsi_Host_Template * tpnt)
  *
@@ -239,7+237,7 @@ int t128_detect(Scsi_Host_Template * tpnt) {
            instance->irq = NCR5380_probe_irq(instance, T128_IRQS);
 
        if (instance->irq != IRQ_NONE) 
-           if (irqaction (instance->irq, &t128_sigaction)) {
+           if (request_irq(instance->irq, t128_intr, SA_INTERRUPT, "t128")) {
                printk("scsi%d : IRQ%d not free, interrupts disabled\n", 
                    instance->host_no, instance->irq);
                instance->irq = IRQ_NONE;
index 4cd54da..bb25ba6 100644 (file)
@@ -493,7+493,7 @@ static int ultrastor_14f_detect(Scsi_Host_Template * tpnt)
     config.mscp_free = ~0;
 #endif
 
-    if (request_irq(config.interrupt, ultrastor_interrupt)) {
+    if (request_irq(config.interrupt, ultrastor_interrupt, 0, "Ultrastor")) {
        printk("Unable to allocate IRQ%u for UltraStor controller.\n",
               config.interrupt);
        return FALSE;
@@ -563,7+563,7 @@ static int ultrastor_24f_detect(Scsi_Host_Template * tpnt)
          printk("U24F: invalid IRQ\n");
          return FALSE;
        }
-      if (request_irq(config.interrupt, ultrastor_interrupt))
+      if (request_irq(config.interrupt, ultrastor_interrupt, 0, "Ultrastor"))
        {
          printk("Unable to allocate IRQ%u for UltraStor controller.\n",
                 config.interrupt);
index 7c98636..1ccaa8b 100644 (file)
@@ -172,9+172,8 @@ typedef struct adapter {
 /*
  * The following is set up by wd7000_detect, and used thereafter by
  * wd7000_intr_handle to map the irq level to the corresponding Adapter.
- * Note that if request_irq instead of irqaction to allocate the IRQ,
- * or if SA_INTERRUPT is not used, wd7000_intr_handle must be changed 
- * to pick up the IRQ level correctly.
+ * Note that if SA_INTERRUPT is not used, wd7000_intr_handle must be
+ * changed to pick up the IRQ level correctly.
  */
 Adapter *irq2host[16] = {NULL};  /* Possible IRQs are 0-15 */
 
@@ -802,8+801,8 @@ void wd7000_intr_handle(int irq)
 {
 #ifdef 0
     /*
-     * Use irqp as the parm, and the following declaration, if request_irq
-     * is used or if SA_INTERRUPT is not used.
+     * Use irqp as the parm, and the following declaration, if
+     * SA_INTERRUPT is not used.
      */
     register int irq = *(((int *)irqp)-2);
 #endif
@@ -993,7+992,6 @@ int wd7000_init( Adapter *host )
     InitCmd init_cmd = {
         INITIALIZATION, 7, BUS_ON, BUS_OFF, 0, 0,0,0, OGMB_CNT, ICMB_CNT
     };
-    struct sigaction sa = {wd7000_intr_handle, 0, SA_INTERRUPT, NULL};
     int diag;
 
     /*
@@ -1045,7+1043,7 @@ int wd7000_init( Adapter *host )
     }
     WAIT(host->iobase+ASC_STAT, ASC_STATMASK, ASC_INIT, 0);
 
-    if (irqaction(host->irq, &sa))  {
+    if (request_irq(host->irq, wd7000_intr_handle, SA_INTERRUPT, "wd7000")) {
         printk("wd7000_init: can't get IRQ %d.\n", host->irq);
        return 0;
     }
index bdacb52..15eeca8 100644 (file)
@@ -219,20+219,13 @@ snd_set_irq_handler (int interrupt_level, void (*hndlr) (int))
 {
   int             retcode;
 
-  struct sigaction sa;
-
-  sa.sa_handler = hndlr;
-
+  retcode = request_irq(interrupt_level, &hndlr,
 #ifdef SND_SA_INTERRUPT
-  sa.sa_flags = SA_INTERRUPT;
+       SA_INTERRUPT,
 #else
-  sa.sa_flags = 0;
+       0,
 #endif
-
-  sa.sa_mask = 0;
-  sa.sa_restorer = NULL;
-
-  retcode = irqaction (interrupt_level, &sa);
+       "sound");
 
   if (retcode < 0)
     {
index 00be726..a40bdf3 100644 (file)
@@ -194,6+194,7 @@ void dcache_add(struct inode * dir, const char * name, int len, unsigned long in
                return;
        hash = hash_table + hash_fn(dir->i_dev, dir->i_ino, namehash(name,len));
        if ((de = find_entry(dir, name, len, hash)) != NULL) {
+               de->ino = ino;
                update_lru(de);
                return;
        }
index ef24b3b..e79ea07 100644 (file)
@@ -64,6+64,20 @@ struct file_operations * get_chrfops(unsigned int major)
 
 int register_chrdev(unsigned int major, const char * name, struct file_operations *fops)
 {
+       if (major == 0) {
+               for (major = MAX_CHRDEV-1; major > 0; major--) {
+                       if (chrdevs[major].fops == fops)
+                               return major;
+               }
+               for (major = MAX_CHRDEV-1; major > 0; major--) {
+                       if (chrdevs[major].fops == NULL) {
+                               chrdevs[major].name = name;
+                               chrdevs[major].fops = fops;
+                               return major;
+                       }
+               }
+               return -EBUSY;
+       }
        if (major >= MAX_CHRDEV)
                return -EINVAL;
        if (chrdevs[major].fops && chrdevs[major].fops != fops)
@@ -75,6+89,20 @@ int register_chrdev(unsigned int major, const char * name, struct file_operation
 
 int register_blkdev(unsigned int major, const char * name, struct file_operations *fops)
 {
+       if (major == 0) {
+               for (major = MAX_BLKDEV-1; major > 0; major--) {
+                       if (blkdevs[major].fops == fops)
+                               return major;
+               }
+               for (major = MAX_BLKDEV-1; major > 0; major--) {
+                       if (blkdevs[major].fops == NULL) {
+                               blkdevs[major].name = name;
+                               blkdevs[major].fops = fops;
+                               return major;
+                       }
+               }
+               return -EBUSY;
+       }
        if (major >= MAX_BLKDEV)
                return -EINVAL;
        if (blkdevs[major].fops && blkdevs[major].fops != fops)
index 433655e..2c37a2f 100644 (file)
@@ -26,7+26,7 @@ Changes from version 0.4a to version 0.4b
          `grpid', `bsdgroups'
          `nocheck'
          `nogrpid', `sysvgroups'
-       - truncate() now tries to deallocate contigous blocks in a single call
+       - truncate() now tries to deallocate contiguous blocks in a single call
          to ext2_free_blocks().
        - lots of cosmetic changes.
 
@@ -80,7+80,7 @@ Changes from version 0.3 to version 0.4
           incremented each time the file system is mounted read/write.   When
           this counter becomes bigger than a maximal mount counts (also stored
           in the super block), e2fsck checks the file system, even if it had
-          been unmounted cleany, and resets this counter to 0.
+          been unmounted cleanly, and resets this counter to 0.
         - File attributes are now supported.  One can associate a set of
           attributes to a file.  Three attributes are defined:
           `c': the file is marked for automatic compression,
index 156cb73..67b10c4 100644 (file)
@@ -418,7+418,7 @@ repeat:
                 * the bitmap and then for any free bit.
                 * 
                 * Search first in the remainder of the current group; then,
-                * cyclicly search throught the rest of the groups.
+                * cyclicly search through the rest of the groups.
                 */
                p = ((char *) bh->b_data) + (j >> 3);
                r = find_first_zero_byte (p, 
index 78fc27b..a2f35d2 100644 (file)
@@ -1014,13+1014,13 @@ start_up:
         * ok, that's it
         */
        new_de->inode = old_inode->i_ino;
+       new_dir->i_version = ++event;
        dcache_add(new_dir, new_de->name, new_de->name_len, new_de->inode);
        retval = ext2_delete_entry (old_de, old_bh);
        if (retval == -ENOENT)
                goto try_again;
        if (retval)
                goto end_rename;
-       new_dir->i_version = ++event;
        old_dir->i_version = ++event;
        if (new_inode) {
                new_inode->i_nlink--;
@@ -1031,6+1031,7 @@ start_up:
        old_dir->i_dirt = 1;
        if (dir_bh) {
                PARENT_INO(dir_bh->b_data) = new_dir->i_ino;
+               dcache_add(old_inode, "..", 2, new_dir->i_ino);
                mark_buffer_dirty(dir_bh, 1);
                old_dir->i_nlink--;
                old_dir->i_dirt = 1;
index 9bd3790..f5607c4 100644 (file)
@@ -316,7+316,7 @@ static int ext2_check_descriptors (struct super_block * sb)
                if (gdp->bg_block_bitmap < block ||
                    gdp->bg_block_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb))
                {
-                       ext2_error (sb, "ext2_check_desciptors",
+                       ext2_error (sb, "ext2_check_descriptors",
                                    "Block bitmap for group %d"
                                    " not in group (block %lu)!",
                                    i, gdp->bg_block_bitmap);
@@ -325,7+325,7 @@ static int ext2_check_descriptors (struct super_block * sb)
                if (gdp->bg_inode_bitmap < block ||
                    gdp->bg_inode_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb))
                {
-                       ext2_error (sb, "ext2_check_desciptors",
+                       ext2_error (sb, "ext2_check_descriptors",
                                    "Inode bitmap for group %d"
                                    " not in group (block %lu)!",
                                    i, gdp->bg_inode_bitmap);
@@ -335,7+335,7 @@ static int ext2_check_descriptors (struct super_block * sb)
                    gdp->bg_inode_table + sb->u.ext2_sb.s_itb_per_group >=
                    block + EXT2_BLOCKS_PER_GROUP(sb))
                {
-                       ext2_error (sb, "ext2_check_desciptors",
+                       ext2_error (sb, "ext2_check_descriptors",
                                    "Inode table for group %d"
                                    " not in group (block %lu)!",
                                    i, gdp->bg_inode_table);
index cfd5ef6..19c9849 100644 (file)
@@ -119,7+119,7 @@ struct hpfs_spare_block
        secno from[n_spares];
        secno to[n_spares];
 
-   The to[] list is initalized to point to n_spares preallocated empty
+   The to[] list is initialized to point to n_spares preallocated empty
    sectors.  The from[] list contains the sector numbers of bad blocks
    which have been remapped to corresponding sectors in the to[] list.
    n_spares_used gives the length of the from[] list. */
index d967932..0e33711 100644 (file)
@@ -720,7+720,7 @@ static void hpfs_put_super(struct super_block *s)
 
 /*
  * statfs.  For free inode counts we report the count of dnodes in the
- * directory band -- not exactly right but pretty analagous.
+ * directory band -- not exactly right but pretty analogous.
  */
 
 static void hpfs_statfs(struct super_block *s, struct statfs *buf)
index 05c6804..fe7d6b8 100644 (file)
@@ -68,7+68,7 @@ struct inode_operations isofs_file_inode_operations = {
 
 /* This is a heuristic to determine if a file is text of binary.  If it
  * is text, then we translate all 0x0d characters to spaces.  If the 0x0d
- * character is not preceeded or followed by a 0x0a, then we turn it into
+ * character is not preceded or followed by a 0x0a, then we turn it into
  * a 0x0a.  A control-Z is also turned into a linefeed.
  */
 
index dc38d22..8ec650c 100644 (file)
@@ -510,7+510,7 @@ void isofs_read_inode(struct inode * inode)
        inode->i_size = 0;
        inode->i_nlink = 1;
        inode->i_uid = inode->i_gid = 0;
-       inode->i_mode = S_IFREG;  /*Regular file, noone gets to read*/
+       inode->i_mode = S_IFREG;  /*Regular file, no one gets to read*/
        inode->i_op = NULL;
        return;
 }
@@ -519,7+519,7 @@ void isofs_read_inode(struct inode * inode)
    a particular directory.  When control passes through a routine that
    has access to the parent information, it fills it into the inode structure,
    but sometimes the inode gets flushed out of the queue, and someone
-   remmembers the number.  When they try to open up again, we have lost
+   remembers the number.  When they try to open up again, we have lost
    the information.  The '..' entry on the disc points to the data area
    for a particular inode, so we can follow these links back up, but since
    we do not know the inode number, we do not actually know how large the
index f145951..b77ab90 100644 (file)
       if(rr->u.SP.magic[1] != 0xef) FAIL;
 
 /* We define a series of macros because each function must do exactly the
-   same thing in certain places.  We use the macros to ensure that everyting
+   same thing in certain places.  We use the macros to ensure that everything
    is done correctly */
 
 #define CONTINUE_DECLS \
index 5f1d28e..36057b8 100644 (file)
@@ -1,5+1,5 @@
 /* These structs are used by the system-use-sharing protocol, in which the
-   Rock Ridge extensions are imbedded.  It is quite possible that other
+   Rock Ridge extensions are embedded.  It is quite possible that other
    extensions are present on the disk, and this is fine as long as they
    all use SUSP */
 
index 17b9715..0e85584 100644 (file)
@@ -39,7+39,7 @@ static unsigned long msdos_file_mmap_nopage(
        clear = 0;
        gap = inode->i_size - pos;
        if (gap <= 0){
-               /* mmaping beyong end of file */
+               /* mmaping beyond end of file */
                clear = PAGE_SIZE;
        }else{
                int cur_read;
index 9f97f62..d47635e 100644 (file)
@@ -203,7+203,7 @@ static int do_nfs_rpc_call(struct nfs_server *server, int *start, int *end)
         * same. 
         *
         * If they are not the same then a reply to a write request will be
-        * a small acknowledgement, so even if wsize < rsize we should never
+        * a small acknowledgment, so even if wsize < rsize we should never
         * cause data to be written past the end of the buffer (unless some
         * brain damaged implementation sends out a large write acknowledge).
         *
@@ -218,7+218,7 @@ static int do_nfs_rpc_call(struct nfs_server *server, int *start, int *end)
 }
 
 /*
- * For now we lock out other simulaneous nfs calls for the same filesytem
+ * For now we lock out other simultaneous nfs calls for the same filesystem
  * because we are single-threaded and don't want to get mismatched
  * RPC replies.
  */
index 0b50f6e..8d3a222 100644 (file)
  *
  * Pauline Middelink :  Made cmdline,envline only break at '\0's, to
  *                      make sure SET_PROCTITLE works. Also removed
- *                      bad '!' which forced addres recalculation for
+ *                      bad '!' which forced address recalculation for
  *                      EVERY character on the current page.
  *                      <middelin@calvin.iaf.nl>
  */
 #include <linux/a.out.h>
 #include <linux/string.h>
 #include <linux/mman.h>
+#include <linux/proc_fs.h>
 
 #include <asm/segment.h>
 #include <asm/io.h>
@@ -81,6+82,15 @@ static int read_core(struct inode * inode, struct file * file,char * buf, int co
        return read;
 }
 
+static struct file_operations proc_kcore_operations = {
+       NULL,           /* lseek */
+       read_core,
+};
+
+struct inode_operations proc_kcore_inode_operations = {
+       &proc_kcore_operations, 
+};
+
 static int get_loadavg(char * buffer)
 {
        int a, b, c;
@@ -224,7+234,7 @@ static int get_array(struct task_struct ** p, unsigned long start, unsigned long
                } while (addr & ~PAGE_MASK);
        }
 ready:
-       /* remove the trailing blanks, used to fillout argv,envp space */
+       /* remove the trailing blanks, used to fill out argv,envp space */
        while (result>0 && buffer[result-1]==' ')
                result--;
        return result;
@@ -452,85+462,102 @@ extern int get_module_list(char *);
 extern int get_device_list(char *);
 extern int get_filesystem_list(char *);
 extern int get_ksyms_list(char *);
+extern int get_irq_list(char *);
+
+static int get_root_array(char * page, int type)
+{
+       switch (type) {
+               case PROC_LOADAVG:
+                       return get_loadavg(page);
+
+               case PROC_UPTIME:
+                       return get_uptime(page);
+
+               case PROC_MEMINFO:
+                       return get_meminfo(page);
+
+               case PROC_VERSION:
+                       return get_version(page);
+
+#ifdef CONFIG_DEBUG_MALLOC
+               case PROC_MALLOC:
+                       return get_malloc(page);
+#endif
+
+               case PROC_MODULES:
+                       return get_module_list(page);
+
+               case PROC_STAT:
+                       return get_kstat(page);
+
+               case PROC_DEVICES:
+                       return get_device_list(page);
+
+               case PROC_INTERRUPTS:
+                       return get_irq_list(page);
+
+               case PROC_FILESYSTEMS:
+                       return get_filesystem_list(page);
+
+               case PROC_KSYMS:
+                       return get_ksyms_list(page);
+       }
+       return -EBADF;
+}
+
+static int get_process_array(char * page, int pid, int type)
+{
+       switch (type) {
+               case PROC_PID_ENVIRON:
+                       return get_env(pid, page);
+               case PROC_PID_CMDLINE:
+                       return get_arg(pid, page);
+               case PROC_PID_STAT:
+                       return get_stat(pid, page);
+               case PROC_PID_STATM:
+                       return get_statm(pid, page);
+               case PROC_PID_MAPS:
+                       return get_maps(pid, page);
+       }
+       return -EBADF;
+}
+
+
+static inline int fill_array(char * page, int pid, int type)
+{
+       if (pid)
+               return get_process_array(page, pid, type);
+       return get_root_array(page, type);
+}
 
 static int array_read(struct inode * inode, struct file * file,char * buf, int count)
 {
-       char * page;
+       unsigned long page;
        int length;
        int end;
        unsigned int type, pid;
 
        if (count < 0)
                return -EINVAL;
-       if (!(page = (char*) __get_free_page(GFP_KERNEL)))
+       if (!(page = __get_free_page(GFP_KERNEL)))
                return -ENOMEM;
        type = inode->i_ino;
        pid = type >> 16;
        type &= 0x0000ffff;
-       switch (type) {
-               case 2:
-                       length = get_loadavg(page);
-                       break;
-               case 3:
-                       length = get_uptime(page);
-                       break;
-               case 4:
-                       length = get_meminfo(page);
-                       break;
-               case 6:
-                       length = get_version(page);
-                       break;
-               case 9:
-                       length = get_env(pid, page);
-                       break;
-               case 10:
-                       length = get_arg(pid, page);
-                       break;
-               case 11:
-                       length = get_stat(pid, page);
-                       break;
-               case 12:
-                       length = get_statm(pid, page);
-                       break;
-#ifdef CONFIG_DEBUG_MALLOC
-               case 13:
-                       length = get_malloc(page);
-                       break;
-#endif
-               case 14:
-                       free_page((unsigned long) page);
-                       return read_core(inode, file, buf, count);
-               case 15:
-                       length = get_maps(pid, page);
-                       break;
-               case 16:
-                       length = get_module_list(page);
-                       break;
-               case 17:
-                       length = get_kstat(page);
-                       break;
-               case 18:
-                       length = get_device_list(page);
-                       break;
-               case 19:
-                       length = get_filesystem_list(page);
-                       break;
-               case 20:
-                       length = get_ksyms_list(page);
-                       break;
-               default:
-                       free_page((unsigned long) page);
-                       return -EBADF;
+       length = fill_array((char *) page, pid, type);
+       if (length < 0) {
+               free_page(page);
+               return length;
        }
        if (file->f_pos >= length) {
-               free_page((unsigned long) page);
+               free_page(page);
                return 0;
        }
        if (count + file->f_pos > length)
                count = length - file->f_pos;
        end = count + file->f_pos;
-       memcpy_tofs(buf, page + file->f_pos, count);
-       free_page((unsigned long) page);
+       memcpy_tofs(buf, (char *) page + file->f_pos, count);
+       free_page(page);
        file->f_pos = end;
        return count;
 }
index 80e0109..2ca380a 100644 (file)
@@ -51,18+51,18 @@ struct inode_operations proc_base_inode_operations = {
 };
 
 static struct proc_dir_entry base_dir[] = {
-       { 1,2,".." },
-       { 2,1,"." },
-       { 3,3,"mem" },
-       { 4,3,"cwd" },
-       { 5,4,"root" },
-       { 6,3,"exe" },
-       { 7,2,"fd" },
-       { 9,7,"environ" },
-       { 10,7,"cmdline" },
-       { 11,4,"stat" },
-       { 12,5,"statm" },
-       { 15,4,"maps" }
+       { PROC_PID_INO,         1, "." },
+       { PROC_ROOT_INO,        2, ".." },
+       { PROC_PID_MEM,         3, "mem" },
+       { PROC_PID_CWD,         3, "cwd" },
+       { PROC_PID_ROOT,        4, "root" },
+       { PROC_PID_EXE,         3, "exe" },
+       { PROC_PID_FD,          2, "fd" },
+       { PROC_PID_ENVIRON,     7, "environ" },
+       { PROC_PID_CMDLINE,     7, "cmdline" },
+       { PROC_PID_STAT,        4, "stat" },
+       { PROC_PID_STATM,       5, "statm" },
+       { PROC_PID_MAPS,        4, "maps" }
 };
 
 #define NR_BASE_DIRENTRY ((sizeof (base_dir))/(sizeof (base_dir[0])))
index 60c9db9..1e75365 100644 (file)
@@ -103,25+103,28 @@ void proc_read_inode(struct inode * inode)
                inode->i_op = &proc_root_inode_operations;
                return;
        }
-       if ((ino >= 128) && (ino <= 160)) { /* files within /proc/net */
+
+       /* files within /proc/net */
+       if ((ino >= PROC_NET_UNIX) && (ino < PROC_NET_LAST)) {
                inode->i_mode = S_IFREG | S_IRUGO;
                inode->i_op = &proc_net_inode_operations;
                return;
        }
+
        if (!pid) {
                switch (ino) {
-                       case 5:
+                       case PROC_KMSG:
                                inode->i_mode = S_IFREG | S_IRUGO;
                                inode->i_op = &proc_kmsg_inode_operations;
                                break;
-                       case 8: /* for the net directory */
+                       case PROC_NET:
                                inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO;
                                inode->i_nlink = 2;
                                inode->i_op = &proc_net_inode_operations;
                                break;
-                       case 14:
+                       case PROC_KCORE:
                                inode->i_mode = S_IFREG | S_IRUSR;
-                               inode->i_op = &proc_array_inode_operations;
+                               inode->i_op = &proc_kcore_inode_operations;
                                inode->i_size = high_memory + PAGE_SIZE;
                                break;
                        default:
@@ -135,38+138,38 @@ void proc_read_inode(struct inode * inode)
        inode->i_uid = p->euid;
        inode->i_gid = p->egid;
        switch (ino) {
-               case 2:
+               case PROC_PID_INO:
                        inode->i_nlink = 4;
                        inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO;
                        inode->i_op = &proc_base_inode_operations;
                        return;
-               case 3:
+               case PROC_PID_MEM:
                        inode->i_op = &proc_mem_inode_operations;
                        inode->i_mode = S_IFREG | S_IRUSR | S_IWUSR;
                        return;
-               case 4:
-               case 5:
-               case 6:
+               case PROC_PID_CWD:
+               case PROC_PID_ROOT:
+               case PROC_PID_EXE:
                        inode->i_op = &proc_link_inode_operations;
                        inode->i_size = 64;
                        inode->i_mode = S_IFLNK | S_IRWXU;
                        return;
-               case 7:
+               case PROC_PID_FD:
                        inode->i_mode = S_IFDIR | S_IRUSR | S_IXUSR;
                        inode->i_op = &proc_fd_inode_operations;
                        inode->i_nlink = 2;
                        return;
-               case 9:
-               case 10:
-               case 11:
-               case 12:
-               case 15:
+               case PROC_PID_ENVIRON:
+               case PROC_PID_CMDLINE:
+               case PROC_PID_STAT:
+               case PROC_PID_STATM:
+               case PROC_PID_MAPS:
                        inode->i_mode = S_IFREG | S_IRUGO;
                        inode->i_op = &proc_array_inode_operations;
                        return;
        }
        switch (ino >> 8) {
-               case 1:
+               case PROC_PID_FD_DIR:
                        ino &= 0xff;
                        if (ino >= NR_OPEN || !p->files->fd[ino])
                                return;
@@ -174,21+177,6 @@ void proc_read_inode(struct inode * inode)
                        inode->i_size = 64;
                        inode->i_mode = S_IFLNK | S_IRWXU;
                        return;
-               case 2:
-                       ino &= 0xff;
-                       {
-                               int j = 0;
-                               struct vm_area_struct * mpnt;
-                               for (mpnt = p->mm->mmap ; mpnt ; mpnt = mpnt->vm_next)
-                                       if(mpnt->vm_inode)
-                                               j++;
-                               if (ino >= j)
-                                       return;
-                       }
-                       inode->i_op = &proc_link_inode_operations;
-                       inode->i_size = 64;
-                       inode->i_mode = S_IFLNK | S_IRWXU;
-                       return;
        }
        return;
 }
index b1eb8e8..d173cb0 100644 (file)
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/fs.h>
-#include <linux/minix_fs.h>
+#include <linux/proc_fs.h>
 #include <linux/stat.h>
 
 static int proc_readlink(struct inode *, char *, int);
@@ -65,13+65,13 @@ static int proc_follow_link(struct inode * dir, struct inode * inode,
                return -ENOENT;
        inode = NULL;
        switch (ino) {
-               case 4:
+               case PROC_PID_CWD:
                        inode = p->fs->pwd;
                        break;
-               case 5:
+               case PROC_PID_ROOT:
                        inode = p->fs->root;
                        break;
-               case 6: {
+               case PROC_PID_EXE: {
                        struct vm_area_struct * vma = p->mm->mmap;
                        while (vma) {
                                if (vma->vm_flags & VM_EXECUTABLE) {
@@ -84,26+84,11 @@ static int proc_follow_link(struct inode * dir, struct inode * inode,
                }
                default:
                        switch (ino >> 8) {
-                               case 1:
+                               case PROC_PID_FD_DIR:
                                        ino &= 0xff;
                                        if (ino < NR_OPEN && p->files->fd[ino])
                                                inode = p->files->fd[ino]->f_inode;
                                        break;
-                               case 2:
-                                       ino &= 0xff;
-                                       { int j = ino;
-                                         struct vm_area_struct * mpnt;
-                                         for(mpnt = p->mm->mmap; mpnt && j >= 0;
-                                             mpnt = mpnt->vm_next){
-                                           if(mpnt->vm_inode) {
-                                             if(j == 0) {
-                                               inode = mpnt->vm_inode;
-                                               break;
-                                             };
-                                             j--;
-                                           }
-                                         }
-                                       };
                        }
        }
        if (!inode)
index 28fd4be..f386ee7 100644 (file)
@@ -8,6+8,8 @@
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/page.h>
 
 #include <asm/segment.h>
 #include <asm/io.h>
@@ -138,6+140,94 @@ static int mem_lseek(struct inode * inode, struct file * file, off_t offset, int
        }
 }
 
+int
+mem_mmap(struct inode * inode, struct file * file,
+            struct vm_area_struct * vma)
+{
+  unsigned long *src_table, *dest_table, stmp, dtmp, cr3;
+  struct vm_area_struct *src_vma = 0;
+  int i;
+
+  /* Get the source's task information */
+
+  cr3 = 0;
+  for (i = 1 ; i < NR_TASKS ; i++)
+    if (task[i] && task[i]->pid == (inode->i_ino >> 16)) {
+      cr3     = task[i]->tss.cr3;
+      src_vma = task[i]->mm->mmap;
+      break;
+    }
+
+  if (!cr3)
+    return -EACCES;
+
+/* Ensure that we have a valid source area.  (Has to be mmap'ed and
+   have valid page information.)  We can't map shared memory at the
+   moment because working out the vm_area_struct & nattach stuff isn't
+   worth it. */
+
+  stmp = vma->vm_offset;
+  while (stmp < vma->vm_offset + (vma->vm_end - vma->vm_start)) {
+    while (src_vma && stmp > src_vma->vm_end)
+      src_vma = src_vma->vm_next;
+    if (!src_vma || (src_vma->vm_flags & VM_SHM))
+      return -EINVAL;
+
+    src_table = PAGE_DIR_OFFSET(cr3, stmp);
+    if (!*src_table)
+      return -EINVAL;
+    src_table = (unsigned long *)((*src_table & PAGE_MASK) + PAGE_PTR(stmp));
+    if (!*src_table)
+      return -EINVAL;
+
+    if (stmp < src_vma->vm_start) {
+      if (!(src_vma->vm_flags & VM_GROWSDOWN))
+       return -EINVAL;
+      if (src_vma->vm_end - stmp > current->rlim[RLIMIT_STACK].rlim_cur)
+       return -EINVAL;
+    }
+    stmp += PAGE_SIZE;
+  }
+
+  src_vma = task[i]->mm->mmap;
+  stmp    = vma->vm_offset;
+  dtmp    = vma->vm_start;
+
+  while (dtmp < vma->vm_end) {
+    while (src_vma && stmp > src_vma->vm_end)
+      src_vma = src_vma->vm_next;
+
+    src_table = PAGE_DIR_OFFSET(cr3, stmp);
+    src_table = (unsigned long *)((*src_table & PAGE_MASK) + PAGE_PTR(stmp));
+
+    dest_table = PAGE_DIR_OFFSET(current->tss.cr3, dtmp);
+
+    if (!*dest_table) {
+      *dest_table = get_free_page(GFP_KERNEL);
+      if (!*dest_table) { oom(current); *dest_table=BAD_PAGE; }
+      else *dest_table |= PAGE_TABLE;
+    }
+    
+    dest_table = (unsigned long *)((*dest_table & PAGE_MASK) + PAGE_PTR(dtmp));
+
+    if (!(*src_table & PAGE_PRESENT)) 
+      do_no_page(src_vma, stmp, PAGE_PRESENT);
+
+    if ((vma->vm_flags & VM_WRITE) && !(*src_table & PAGE_RW))
+      do_wp_page(src_vma, stmp, PAGE_RW | PAGE_PRESENT);
+
+    *src_table |= PAGE_DIRTY;
+    *dest_table = *src_table;
+    mem_map[MAP_NR(*src_table)]++;
+
+    stmp += PAGE_SIZE;
+    dtmp += PAGE_SIZE;
+  }
+
+  invalidate();
+  return 0;
+}
+
 static struct file_operations proc_mem_operations = {
        mem_lseek,
        mem_read,
@@ -145,7+235,7 @@ static struct file_operations proc_mem_operations = {
        NULL,           /* mem_readdir */
        NULL,           /* mem_select */
        NULL,           /* mem_ioctl */
-       NULL,           /* mmap */
+       mem_mmap,       /* mmap */
        NULL,           /* no special open code */
        NULL,           /* no special release code */
        NULL            /* can't fsync */
index 4d6bfea..601f590 100644 (file)
@@ -101,44+101,43 @@ struct inode_operations proc_net_inode_operations = {
 };
 
 static struct proc_dir_entry net_dir[] = {
-       { 1,2,".." },
-       { 8,1,"." },
-       { 128,4,"unix" }
+       { PROC_NET,             1, "." },
+       { PROC_ROOT_INO,        2, ".." },
+       { PROC_NET_UNIX,        4, "unix" },
 #ifdef CONFIG_INET
-       ,{ 129,3,"arp" },
-       { 130,5,"route" },
-       { 131,3,"dev" },
-       { 132,3,"raw" },
-       { 133,3,"tcp" },
-       { 134,3,"udp" },
-       { 135,4,"snmp" }
+       { PROC_NET_ARP,         3, "arp" },
+       { PROC_NET_ROUTE,       5, "route" },
+       { PROC_NET_DEV,         3, "dev" },
+       { PROC_NET_RAW,         3, "raw" },
+       { PROC_NET_TCP,         3, "tcp" },
+       { PROC_NET_UDP,         3, "udp" },
+       { PROC_NET_SNMP,        4, "snmp" },
 #ifdef CONFIG_INET_RARP
-       ,{ 136,4,"rarp"}
+       { PROC_NET_RARP,        4, "rarp"},
 #endif
 #endif /* CONFIG_INET */
 #ifdef CONFIG_IPX
-       ,{ 137,9,"ipx_route" },
-       { 138,3,"ipx" }
+       { PROC_NET_IPX_ROUTE,   9, "ipx_route" },
+       { PROC_NET_IPX,         3, "ipx" },
 #endif /* CONFIG_IPX */
 #ifdef CONFIG_AX25
-       ,{ 139,10,"ax25_route" },
-       { 140,4,"ax25" }
+       { PROC_NET_AX25_ROUTE,  10, "ax25_route" },
+       { PROC_NET_AX25,        4, "ax25" },
 #ifdef CONFIG_NETROM
-       ,{ 141,8,"nr_nodes" },
-       { 142,8,"nr_neigh" },
-       { 143,2,"nr" }
+       { PROC_NET_NR_NODES,    8, "nr_nodes" },
+       { PROC_NET_NR_NEIGH,    8, "nr_neigh" },
+       { PROC_NET_NR,          2, "nr" },
 #endif /* CONFIG_NETROM */
 #endif /* CONFIG_AX25 */
+       { 0, 0, NULL }
 };
 
-#define NR_NET_DIRENTRY ((sizeof (net_dir))/(sizeof (net_dir[0])))
-
+#define NR_NET_DIRENTRY ((sizeof (net_dir))/(sizeof (net_dir[0])) - 1)
 
 static int proc_lookupnet(struct inode * dir,const char * name, int len,
        struct inode ** result)
 {
-       unsigned int ino;
-       int i;
+       struct proc_dir_entry *de;
 
        *result = NULL;
        if (!dir)
@@ -147,20+146,16 @@ static int proc_lookupnet(struct inode * dir,const char * name, int len,
                iput(dir);
                return -ENOENT;
        }
-       i = NR_NET_DIRENTRY;
-       while (i-- > 0 && !proc_match(len,name,net_dir+i))
-               /* nothing */;
-       if (i < 0) {
+       for (de = net_dir ; de->name ; de++) {
+               if (!proc_match(len, name, de))
+                       continue;
+               *result = iget(dir->i_sb, de->low_ino);
                iput(dir);
-               return -ENOENT;
+               if (!*result)
+                       return -ENOENT;
+               return 0;
        }
-       ino = net_dir[i].low_ino;
-       if (!(*result = iget(dir->i_sb,ino))) {
-               iput(dir);
-               return -ENOENT;
-       }
-       iput(dir);
-       return 0;
+       return -ENOENT;
 }
 
 static int proc_readnetdir(struct inode * inode, struct file * filp,
@@ -217,60+212,60 @@ static int proc_readnet(struct inode * inode, struct file * file,
 
                switch (ino) 
                {
-                       case 128:
+                       case PROC_NET_UNIX:
                                length = unix_get_info(page,&start,file->f_pos,thistime);
                                break;
 #ifdef CONFIG_INET
-                       case 129:
+                       case PROC_NET_ARP:
                                length = arp_get_info(page,&start,file->f_pos,thistime);
                                break;
-                       case 130:
+                       case PROC_NET_ROUTE:
                                length = rt_get_info(page,&start,file->f_pos,thistime);
                                break;
-                       case 131:
+                       case PROC_NET_DEV:
                                length = dev_get_info(page,&start,file->f_pos,thistime);
                                break;
-                       case 132:
+                       case PROC_NET_RAW:
                                length = raw_get_info(page,&start,file->f_pos,thistime);
                                break;
-                       case 133:
+                       case PROC_NET_TCP:
                                length = tcp_get_info(page,&start,file->f_pos,thistime);
                                break;
-                       case 134:
+                       case PROC_NET_UDP:
                                length = udp_get_info(page,&start,file->f_pos,thistime);
                                break;
-                       case 135:
+                       case PROC_NET_SNMP:
                                length = snmp_get_info(page, &start, file->f_pos,thistime);
                                break;
 #ifdef CONFIG_INET_RARP                                
-                       case 136:
+                       case PROC_NET_RARP:
                                length = rarp_get_info(page,&start,file->f_pos,thistime);
                                break;
 #endif /* CONFIG_INET_RARP */                          
 #endif /* CONFIG_INET */
 #ifdef CONFIG_IPX
-                       case 137:
+                       case PROC_NET_IPX_ROUTE:
                                length = ipx_rt_get_info(page,&start,file->f_pos,thistime);
                                break;
-                       case 138:
+                       case PROC_NET_IPX:
                                length = ipx_get_info(page,&start,file->f_pos,thistime);
                                break;
 #endif /* CONFIG_IPX */
 #ifdef CONFIG_AX25
-                       case 139:
+                       case PROC_NET_AX25_ROUTE:
                                length = ax25_rt_get_info(page,&start,file->f_pos,thistime);
                                break;
-                       case 140:
+                       case PROC_NET_AX25:
                                length = ax25_get_info(page,&start,file->f_pos,thistime);
                                break;
 #ifdef CONFIG_NETROM
-                       case 141:
+                       case PROC_NET_NR_NODES:
                                length = nr_nodes_get_info(page,&start,file->f_pos,thistime);
                                break;
-                       case 142:
+                       case PROC_NET_NR_NEIGH:
                                length = nr_neigh_get_info(page,&start,file->f_pos,thistime);
                                break;
-                       case 143:
+                       case PROC_NET_NR:
                                length = nr_get_info(page,&start,file->f_pos,thistime);
                                break;
 #endif /* CONFIG_NETROM */
index 7da96da..69156c0 100644 (file)
@@ -52,24+52,25 @@ struct inode_operations proc_root_inode_operations = {
 };
 
 static struct proc_dir_entry root_dir[] = {
-       { 1,1,"." },
-       { 1,2,".." },
-       { 2,7,"loadavg" },
-       { 3,6,"uptime" },
-       { 4,7,"meminfo" },
-       { 5,4,"kmsg" },
-       { 6,7,"version" },
-       { 7,4,"self" }, /* will change inode # */
-       { 8,3,"net" },
+       { PROC_ROOT_INO,        1, "." },
+       { PROC_ROOT_INO,        2, ".." },
+       { PROC_LOADAVG,         7, "loadavg" },
+       { PROC_UPTIME,          6, "uptime" },
+       { PROC_MEMINFO,         7, "meminfo" },
+       { PROC_KMSG,            4, "kmsg" },
+       { PROC_VERSION,         7, "version" },
+       { PROC_SELF,            4, "self" },    /* will change inode # */
+       { PROC_NET,             3, "net" },
 #ifdef CONFIG_DEBUG_MALLOC
-       {13,6,"malloc" },
+       { PROC_MALLOC,          6, "malloc" },
 #endif
-       {14,5,"kcore" },
-       {16,7,"modules" },
-       {17,4,"stat" },
-       {18,7,"devices" },
-       {19,11,"filesystems" },
-       {20,5,"ksyms" },
+       { PROC_KCORE,           5, "kcore" },
+       { PROC_MODULES,         7, "modules" },
+       { PROC_STAT,            4, "stat" },
+       { PROC_DEVICES,         7, "devices" },
+       { PROC_INTERRUPTS,      10,"interrupts" },
+       { PROC_FILESYSTEMS,     11,"filesystems" },
+       { PROC_KSYMS,           5, "ksyms" },
 };
 
 #define NR_ROOT_DIRENTRY ((sizeof (root_dir))/(sizeof (root_dir[0])))
index b8f802a..10cac96 100644 (file)
 
 
 /* There are two different implementations of truncate() here.
- * One (by Bruno) needs to do locking to ensure that noone is writing
+ * One (by Bruno) needs to do locking to ensure that no one is writing
  * to a block being truncated away and incorporated into the free list.
  * The better one (by Linus) doesn't need locking because it can tell from
  * looking at bh->b_count whether a given block is in use elsewhere.
index 20d6909..4ce8b41 100644 (file)
@@ -9,7+9,7 @@ one into a useful one.
 It gives you:
 
        long file name
-       Permisssions and owner
+       Permissions and owner
        Links
        Special files (devices, pipe...)
        All is need to be a linux root fs.
@@ -37,7+37,7 @@ happen. This is why all mount options are passed to the Msdos fs driver.
 Umsdos use a special DOS file --linux-.--- to store the information
 which can't be handle by the normal MsDOS file system. This is the trick.
 
---linux-.--- is optionnal. There is one per directory.
+--linux-.--- is optional. There is one per directory.
 
 **** If --linux-.--- is missing, then Umsdos process the directory the
      same way the msdos driver do. Short file name, no goodies, default
index 8bd2e0e..a1b4d2b 100644 (file)
@@ -47,7+47,7 @@ static int umsdos_readdir_x(
     struct dirent *dirent,     /* Will hold count directory entry */
        int dirent_in_fs,               /* dirent point in user's space ? */
        int count,
-       struct umsdos_dirent *u_entry,  /* Optionnal umsdos entry */
+       struct umsdos_dirent *u_entry,  /* Optional umsdos entry */
        int follow_hlink,
        off_t *pt_f_pos)                /* will hold the offset of the entry in EMD */
 {
@@ -272,7+272,7 @@ void umsdos_lookup_patch (
        /*
                A lookup of a mount point directory yield the inode into
                the other fs, so we don't care about initialising it. iget()
-               does this automaticly.
+               does this automatically.
        */
        if (inode->i_sb == dir->i_sb && !umsdos_isinit(inode)){
                if (S_ISDIR(inode->i_mode)) umsdos_lockcreate(inode);
@@ -583,7+583,7 @@ static int umsdos_lookup_x (
                                        */
                                        /*
                                                This has to be allowed for resolving hard link
-                                               which are recorded independantly of the pseudo-root
+                                               which are recorded independently of the pseudo-root
                                                mode.
                                        */
                                        iput (pseudo_root);
index c0e9803..2c5652e 100644 (file)
@@ -82,7+82,7 @@ int umsdos_emd_dir_write (
 /*
        Read a block of bytes from one EMD file.
        The block of data is NOT in user space.
-       Retourne 0 if ok, -EIO if any error.
+       Return 0 if ok, -EIO if any error.
 */
 int umsdos_emd_dir_read (
        struct inode *emd_dir,
@@ -102,7+102,7 @@ int umsdos_emd_dir_read (
 
 }
 /*
-       Locate the EMD file in a directory and optionnally, creates it.
+       Locate the EMD file in a directory and optionally, creates it.
 
        Return NULL if error. If ok, dir->u.umsdos_i.emd_inode 
 */
@@ -180,7+180,7 @@ int umsdos_writeentry (
                /* #Specification: EMD file / empty entries
                        Unused entry in the EMD file are identify
                        by the name_len field equal to 0. However to
-                       help future extension (or bug corretion :-( ),
+                       help future extension (or bug correction :-( ),
                        empty entries are filled with 0.
                */
                memset (&entry0,0,sizeof(entry0));
@@ -219,7+219,7 @@ struct find_buffer{
        Fill the read buffer and take care of the byte remaining inside.
        Unread bytes are simply move to the beginning.
 
-       Return -ENOENT if EOF, 0 if ok, a negativ error code if any problem.
+       Return -ENOENT if EOF, 0 if ok, a negative error code if any problem.
 */
 static int umsdos_fillbuf (
        struct inode *inode,
index 3836c43..8d97bd6 100644 (file)
@@ -2,7+2,7 @@
  *  linux/fs/umsdos/file.c
  *
  *  Written 1993 by Jacques Gelinas
- *     inpired from linux/fs/msdos/file.c Werner Almesberger
+ *     inspired from linux/fs/msdos/file.c Werner Almesberger
  *
  *  Extended MS-DOS regular file handling primitives
  */
@@ -61,10+61,10 @@ static void UMSDOS_truncate(struct inode *inode)
 /*
        See inode.c
        
-       Some entry point are filled dynamicly with function pointers
+       Some entry point are filled dynamically with function pointers
        from the msdos file_operations and file_inode_operations.
        
-       The idea is to have the code as independant as possible from
+       The idea is to have the code as independent as possible from
        the msdos file system.
 */
 
index 566539e..c813d41 100644 (file)
@@ -59,7+59,7 @@ void UMSDOS_statfs(struct super_block *sb,struct statfs *buf)
 
 /*
        Call msdos_lookup, but set back the original msdos function table.
-       Retourne 0 if ok, or a negative error code if not.
+       Return 0 if ok, or a negative error code if not.
 */
 int umsdos_real_lookup (
        struct inode *dir,
@@ -106,7+106,7 @@ void umsdos_set_dirinfo(
 }
 /*
        Tells if an Umsdos inode has been "patched" once.
-       Returne != 0 if so.
+       Return != 0 if so.
 */
 int umsdos_isinit (struct inode *inode)
 {
@@ -134,7+134,7 @@ void umsdos_patch_inode (
                will be done when dir != NULL only.
 
                UMSDOS do run piggy back on top of msdos fs. It looks like something
-               is missing in the VFS to accomodate stacked fs. Still unclear what
+               is missing in the VFS to accommodate stacked fs. Still unclear what
                (quite honestly).
 
                Well, maybe one! A new entry "may_unmount" which would allow
@@ -149,7+149,7 @@ void umsdos_patch_inode (
                        if (!is_init){
                                /*
                                        I don't want to change the msdos file system code
-                                       so I get the adress of some subroutine dynamicly
+                                       so I get the address of some subroutine dynamically
                                        once.
                                */
                                umsdos_file_inode_operations.bmap = inode->i_op->bmap;
@@ -237,7+237,7 @@ void UMSDOS_read_inode(struct inode *inode)
                        ,inode->u.umsdos_i.u.dir_info.p));
        }
        /* #Specification: Inode / post initialisation
-               To completly initialise an inode, we need access to the owner
+               To completely initialise an inode, we need access to the owner
                directory, so we can locate more info in the EMD file. This is
                not available the first time the inode is access, we use
                a value in the inode to tell if it has been finally initialised.
@@ -381,7+381,7 @@ struct super_block *UMSDOS_read_super(
                Umsdos run on top of msdos. Currently, it supports no
                mount option, but happily pass all option received to
                the msdos driver. I am not sure if all msdos mount option
-               make sens with Umsdos. Here are at least those who
+               make sense with Umsdos. Here are at least those who
                are useful.
                        uid=
                        gid=
index 2bf5eb1..9725717 100644 (file)
@@ -50,8+50,8 @@ int UMSDOS_ioctl_dir (
                        all this.
 
                        These ioctl generally allow one to work on the EMD or the
-                       DOS directory independantly. These are essential to implement
-                       the synchroniser.
+                       DOS directory independently. These are essential to implement
+                       the synchronise.
                */
                PRINTK (("ioctl %d ",cmd));
                if (cmd == UMSDOS_GETVERSION){
@@ -237,7+237,7 @@ int UMSDOS_ioctl_dir (
 
                                        Be aware that this apply ONLY to MsDOS directory
                                        (those without EMD --linux-.---). Umsdos directory
-                                       have independant (standard) permission for each
+                                       have independent (standard) permission for each
                                        and every file.
 
                                        The field umsdos_dirent provide the information needed.
index 7b7dba7..1f59447 100644 (file)
@@ -54,7+54,7 @@ void umsdos_manglename (struct umsdos_info *info)
                        -The mangling is deterministic. Just by the extension, we
                         are able to locate the entry in the EMD file.
 
-                       -By keeping to beginning of the file name almost unchange,
+                       -By keeping to beginning of the file name almost unchanged,
                         we are helping the MSDOS user.
 
                        -The mangling produces names not too ugly, so an msdos user
@@ -146,7+146,7 @@ int umsdos_parse (
                const char *firstpt=NULL;       /* First place we saw a . in fname */
                /* #Specification: file name / non MSDOS conforming / base length 0
                        file name beginning with a period '.' are invalid for MsDOS.
-                       It needs absolutly a base name. So the file name is mangled
+                       It needs absolutely a base name. So the file name is mangled
                */
                int ivldchar = fname[0] == '.';/* At least one invalid character */
                int msdos_len = len;
@@ -183,7+183,7 @@ int umsdos_parse (
                        while (*spc != '\0') lkp[(unsigned char)(*spc++)] = '#';
                }
                /*      GLU
-                       file name wich are longer than 8+'.'+3 are invalid for MsDOS.
+                       file name which are longer than 8+'.'+3 are invalid for MsDOS.
                        So the file name is to be mangled no more test needed.
                        This Speed Up for long and very long name.
                        The position of the last point is no more necessary anyway.
@@ -280,7+280,7 @@ int umsdos_parse (
                        base_len = msdos_len = (msdos_len>8) ? 8 : msdos_len;
                        /*
                                There is no '.' any more so we know for a fact that
-                               the base lenght is the lenght.
+                               the base length is the length.
                        */
                        memcpy (info->fake.fname,fname,msdos_len);
                        for (i=0; i<msdos_len; i++, pt++) *pt = lkp[(unsigned char)(*pt)];
@@ -401,9+401,9 @@ struct MANG_TEST tb[]={
        et de tester apres si il y a d'autres caracters "mechants".
        Bon, je ne l'ai pas fait, parceque ce n'est pas si facilement
        modifiable que ca. Mais c'est pour le principe.
-       Evidemment cela augmente les chances de "Colision",
+       Evidemment cela augmente les chances de "Collision",
        par exemple: entre "HELLO" et "Hello", mais ces problemes
-       peuvent etre traiter ailleur avec les autres colisions.
+       peuvent etre traiter ailleur avec les autres collisions.
 */
        "HELLO",                1,      "hello",
        "Hello.1",              1,      "hello_1",
index 9df0832..7cfac9e 100644 (file)
@@ -76,7+76,7 @@ void umsdos_lockcreate (struct inode *dir)
 
                For some operation like hard link, things even get worse. Many
                creation must occur at once (atomic). To simplify the design
-               a process is allowed to recursivly lock the directory for
+               a process is allowed to recursively lock the directory for
                creation. The pid of the locking process is kept along with
                a counter so a second level of locking is granted or not.
        */
@@ -191,7+191,7 @@ static int umsdos_nevercreat(
        
 /*
        Add a new file (ordinary or special) into the alternate directory.
-       The file is added to the real MSDOS directory. If successfull, it
+       The file is added to the real MSDOS directory. If successful, it
        is then added to the EDM file.
 
        Return the status of the operation. 0 mean success.
@@ -469,11+469,11 @@ int UMSDOS_link (
        /* #Specification: hard link / strategy
                Well ... hard link are difficult to implement on top of an
                MsDOS fat file system. Unlike UNIX file systems, there are no
-               inode. A directory entry hold the functionnality of the inode
+               inode. A directory entry hold the functionality of the inode
                and the entry.
 
                We will used the same strategy as a normal Unix file system
-               (with inode) except we will do it symbolicly (using paths).
+               (with inode) except we will do it symbolically (using paths).
 
                Because anything can happen during a DOS session (defragment,
                directory sorting, etc...), we can't rely on MsDOS pseudo
@@ -493,7+493,7 @@ int UMSDOS_link (
 
                Using this strategy, we can operate on /foo/file or /foo/file2.
                We can remove one and keep the other, like a normal Unix hard link.
-               We can rename /foo/file ou /tmp/file2 independantly.
+               We can rename /foo/file or /tmp/file2 independently.
                        
                The entry -LINK1 will be hidden. It will hold a link count.
                When all link are erased, the hidden file is erased too.
@@ -554,7+554,7 @@ int UMSDOS_link (
                                        /* #Specification: hard link / first hard link
                                                The first time a hard link is done on a file, this
                                                file must be renamed and hidden. Then an internal
-                                               simbolic link must be done on the hidden file.
+                                               symbolic link must be done on the hidden file.
 
                                                The second link is done after on this hidden file.
 
@@ -627,7+627,7 @@ int UMSDOS_link (
 }
 /*
        Add a new file into the alternate directory.
-       The file is added to the real MSDOS directory. If successfull, it
+       The file is added to the real MSDOS directory. If successful, it
        is then added to the EDM file.
 
        Return the status of the operation. 0 mean success.
@@ -682,7+682,7 @@ int UMSDOS_mkdir(
                                        /* #Specification: mkdir / umsdos directory / create EMD
                                                When we created a new sub-directory in a UMSDOS
                                                directory (one with full UMSDOS semantic), we
-                                               create immediatly an EMD file in the new
+                                               create immediately an EMD file in the new
                                                sub-directory so it inherit UMSDOS semantic.
                                        */
                                        struct inode *subdir;
@@ -722,7+722,7 @@ int UMSDOS_mknod(
                Device special file, pipes, etc ... are created like normal
                file in the msdos file system. Of course they remain empty.
 
-               One strategy was to create thoses files only in the EMD file
+               One strategy was to create those files only in the EMD file
                since they were not important for MSDOS. The problem with
                that, is that there were not getting inode number allocated.
                The MSDOS filesystems is playing a nice game to fake inode
@@ -758,7+758,7 @@ int UMSDOS_rmdir(
                code.
 
                The coding style I use all around is one where I am trying
-               to provide independant flow logic (I don't know how to
+               to provide independent flow logic (I don't know how to
                name this). With this style, code is easier to understand
                but you rapidly get iput() all around. Here is an exemple
                of what I am trying to avoid.
@@ -770,7+770,7 @@ int UMSDOS_rmdir(
                        }
                        ...
                        if (c){
-                               // Complexe state. Was b true ? 
+                               // Complex state. Was b true ? 
                                ...
                        }
                        ...
@@ -824,7+824,7 @@ int UMSDOS_rmdir(
                return status;
 
                Note that the umsdos_lockcreate() and umsdos_unlockcreate() function
-               paire goes against this practice of "forgetting" the inode as soon
+               pair goes against this practice of "forgetting" the inode as soon
                as possible.
        */              
        int ret = umsdos_nevercreat(dir,name,len,-EPERM);
@@ -895,7+895,7 @@ int UMSDOS_unlink (
                                if (info.entry.flags & UMSDOS_HLINK){
                                        /* #Specification: hard link / deleting a link
                                                When we deletes a file, and this file is a link
-                                               we must substract 1 to the nlink field of the
+                                               we must subtract 1 to the nlink field of the
                                                hidden link.
 
                                                If the count goes to 0, we delete this hidden
index aee2a48..f3bee81 100644 (file)
@@ -2,7+2,7 @@
  *  linux/fs/umsdos/file.c
  *
  *  Written 1992 by Jacques Gelinas
- *     inpired from linux/fs/msdos/file.c Werner Almesberger
+ *     inspired from linux/fs/msdos/file.c Werner Almesberger
  *
  *  Extended MS-DOS regular file handling primitives
  */
 #define Printk(x)      printk x
 /*
        Read the data associate with the symlink.
-       Return lenght read in buffer or  a negative error code.
+       Return length read in buffer or  a negative error code.
 */
 static int umsdos_readlink_x (
        struct inode *inode,
@@ -41,7+41,7 @@ static int umsdos_readlink_x (
        return ret;
 }
 /*
-       Follow a symbolic link chain by calling open_namei recursivly
+       Follow a symbolic link chain by calling open_namei recursively
        until an inode is found.
 
        Return 0 if ok, or a negative error code if not.
index 2c3509e..05af6e4 100644 (file)
@@ -18,7+18,7 @@ extern char internal_error_message[];
 #define XIAFS_INODES_PER_Z(sp) (_XIAFS_INODES_PER_BLOCK << XIAFS_ZSHIFT(sp))
 
 /* Use the most significant bytes of zone pointers to store block counter. */
-/* This is ugly, but it works. Note, We have another 7 bytes for "expension". */
+/* This is ugly, but it works. Note, We have another 7 bytes for "expansion". */
 
 #define XIAFS_GET_BLOCKS(row_ip, blocks)  \
   blocks=((((row_ip)->i_zone[0] >> 24) & 0xff )|\
index b66b4c7..aae57ab 100644 (file)
@@ -7,7+7,7 @@
 #ifdef i386
 /*
  * These have to be done with inline assembly: that way the bit-setting
- * is guaranteed to be atomic. All bitoperations return 0 if the bit
+ * is guaranteed to be atomic. All bit operations return 0 if the bit
  * was cleared before the operation and != 0 if it was not.
  *
  * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
@@ -67,7+67,7 @@ extern __inline__ int test_bit(int nr, void * addr)
 /*
  * For the benefit of those who are trying to port Linux to another
  * architecture, here are some C-language equivalents.  You should
- * recode these in the native assmebly language, if at all possible.
+ * recode these in the native assembly language, if at all possible.
  * To guarantee atomicity, these routines call cli() and sti() to
  * disable interrupts while they operate.  (You have to provide inline
  * routines to cli() and sti().)
index ec85292..76dfe64 100644 (file)
@@ -191,7+191,7 @@ __asm__("cld\n\t" \
  __generic_memcpy_tofs((to),(from),(n)))
 
 /*
- * Someone who knows GNU asm better than I should double check the followig.
+ * Someone who knows GNU asm better than I should double check the following.
  * It seems to work, but I don't know if I'm doing something subtly wrong.
  * --- TYT, 11/24/91
  * [ nothing wrong here, Linus: I just changed the ax to be any reg ]
index e4a52fb..fd774d4 100644 (file)
@@ -295,7+295,7 @@ __asm__ __volatile__(
        "scasb\n\t"
        "notl %%ecx\n\t"
        "decl %%ecx\n\t"
-       "je 7f\n\t"                     /* empty delimeter-string */
+       "je 7f\n\t"                     /* empty delimiter-string */
        "movl %%ecx,%%edx\n"
        "2:\tlodsb\n\t"
        "testb %%al,%%al\n\t"
index 69d279e..7588dcb 100644 (file)
@@ -313,7+313,7 @@ struct cdrom_read
        };
 
 /*
- * preliminary extensions for transfering audio frames
+ * preliminary extensions for transferring audio frames
  * currently used by sbpcd.c
  * (still may change if other drivers will use it, too):
  */
@@ -365,7+365,7 @@ struct cdrom_read_audio
 #define        CDROMEJECT              0x5309          /* eject CD-ROM media           */
 
 #define        CDROMVOLCTRL            0x530a          /* (struct cdrom_volctrl)       */
-                                                /* vlume control               */
+                                                /* volume control              */
 
 #define        CDROMSUBCHNL            0x530b          /* (struct cdrom_subchnl)       */
                                                 /* read Q sub-channel data     */
@@ -376,7+376,7 @@ struct cdrom_read_audio
 #define        CDROMREADMODE1          0x530d          /* (struct cdrom_read)          */
                                                 /* read type-1 data            */
 /*
- * preliminary extension for transfering audio frames
+ * preliminary extension for transferring audio frames
  * currently used by sbpcd.c
  * (still may change if other drivers will use it, too):
  */
index 48f9c40..050567b 100644 (file)
 
 
 /*
- * The following are command paramters for the set drive parameter command
+ * The following are command parameters for the set drive parameter command
  */
 #define SONY_SD_DECODE_PARAM           0x00
 #define SONY_SD_INTERFACE_PARAM                0x01
@@ -284,7+284,7 @@ struct s_sony_toc
 
 
 /*
- * The following are attention code for asyncronous events from the drive.
+ * The following are attention code for asynchronous events from the drive.
  */
 
 /* Standard attention group */
index e376521..a1ba466 100644 (file)
-/* This file is derrived from the GAS 2.1.4 assembler control file.
+/* This file is derived from the GAS 2.1.4 assembler control file.
    The GAS product is under the GNU Public License, version 2 or later.
-   As such, this file is also uder that license.
+   As such, this file is also under that license.
 
    If the file format changes in the COFF object, this file should be
    subsequently updated to reflect the changes.
 
    The actual loader module only uses a few of these structures. The full
    set is documented here because I received the full set. If you wish
-   more information about COFF, then O'Rielly has a very excellent book.
+   more information about COFF, then O'Reilly has a very excellent book.
 */
 
 #define  E_SYMNMLEN  8   /* Number of characters in a symbol name         */
 #define  E_DIMNUM    4   /* Number of array dimensions in auxiliary entry */
 
 /*
- * These defines are byte order independant. There is no alignment of fields
+ * These defines are byte order independent. There is no alignment of fields
  * permitted in the structures. Therefore they are declared as characters
  * and the values loaded from the character positions. It also makes it
- * nice to have it "endian" independant.
+ * nice to have it "endian" independent.
  */
  
 /* Load a short int from the following tables with little-endian formats */
                                 ((unsigned long)((unsigned char)ps[2])<<8)  |\
                                 ((unsigned long)((unsigned char)ps[3])))))
 
-/* These may be overriden later by brain dead implementations which generate
+/* These may be overridden later by brain dead implementations which generate
    a big-endian header with little-endian data. In that case, generate a
    replacement macro which tests a flag and uses either of the two above
    as appropriate. */
@@ -67,9+67,9 @@ struct COFF_filehdr {
  *   Bits for f_flags:
  *
  *     F_RELFLG        relocation info stripped from file
- *     F_EXEC          file is executable  (i.e. no unresolved externel
+ *     F_EXEC          file is executable  (i.e. no unresolved external
  *                     references)
- *     F_LNNO          line nunbers stripped from file
+ *     F_LNNO          line numbers stripped from file
  *     F_LSYMS         local symbols stripped from file
  *     F_MINMAL        this is a minimal object file (".m") output of fextract
  *     F_UPDATE        this is a fully bound update file, output of ogen
@@ -145,7+145,7 @@ COFF_AOUTHDR;
 #define COFF_OMAGIC     0404
 #define COFF_JMAGIC     0407    /* dirty text and data image, can't share  */
 #define COFF_DMAGIC     0410    /* dirty text segment, data aligned        */
-#define COFF_ZMAGIC     0413    /* The proper magic number for executabls  */
+#define COFF_ZMAGIC     0413    /* The proper magic number for executables  */
 #define COFF_SHMAGIC   0443    /* shared library header                   */
 
 /********************** SECTION HEADER **********************/
@@ -347,5+347,5 @@ struct COFF_reloc {
 #define COFF_DEF_BSS_SECTION_ALIGNMENT   4
 #define COFF_DEF_TEXT_SECTION_ALIGNMENT  4
 
-/* For new sections we havn't heard of before */
+/* For new sections we haven't heard of before */
 #define COFF_DEF_SECTION_ALIGNMENT       4
index f4ed908..a22241e 100644 (file)
  *
  * #define HD_TYPE { head, sect, cyl, wpcom, lzone, ctl}
  *
- * In case of two harddisks, the info should be sepatated by
+ * In case of two harddisks, the info should be separated by
  * commas:
  *
  * #define HD_TYPE { h,s,c,wpcom,lz,ctl },{ h,s,c,wpcom,lz,ctl }
index fbad2da..b1a7164 100644 (file)
@@ -1,7+1,7 @@
 #ifndef _ELF_H
 #define _ELF_H
 
-/* THese constants are for the segment types stored in the image headers */
+/* These constants are for the segment types stored in the image headers */
 #define PT_NULL    0
 #define PT_LOAD    1
 #define PT_DYNAMIC 2
@@ -83,7+83,7 @@ struct dynamic{
   } d_un;
 };
 
-/* THe following are used with relocations */
+/* The following are used with relocations */
 #define ELF32_R_SYM(x) ((x) >> 8)
 #define ELF32_R_TYPE(x) ((x) & 0xff)
 
index 7dbd284..6792b45 100644 (file)
@@ -233,7+233,7 @@ struct ext2_inode {
 /*
  * File system states
  */
-#define        EXT2_VALID_FS                   0x0001  /* Unmounted cleany */
+#define        EXT2_VALID_FS                   0x0001  /* Unmounted cleanly */
 #define        EXT2_ERROR_FS                   0x0002  /* Errors detected */
 
 /*
index 939aaa0..11d52cf 100644 (file)
 #define FDFMTBEG 6 /* begin formatting a disk */
 #define        FDFMTTRK 7 /* format the specified track */
 #define FDFMTEND 8 /* end formatting a disk */
-#define FDSETEMSGTRESH 10      /* set fdc error reporting treshold */
+#define FDSETEMSGTRESH 10      /* set fdc error reporting threshold */
 #define FDFLUSH  11 /* flush buffers for media; either for verifying media, or for
                        handling a media change without closing the file
                       descriptor */
-#define FDSETMAXERRS 12 /* set abortion and read_track treshold */
-#define FDGETMAXERRS 14 /* get abortion and read_track treshold */
+#define FDSETMAXERRS 12 /* set abortion and read_track threshold */
+#define FDGETMAXERRS 14 /* get abortion and read_track threshold */
 #define FDGETDRVTYP 16          /* get drive type: 5 1/4 or 3 1/2 */
 
 #define FDSETDRVPRM 20 /* set drive parameters */
index 343c6ac..0a72109 100644 (file)
 #define ST1_EOC                0x80            /* End Of Cylinder */
 
 /* Bits of FD_ST2 */
-#define ST2_MAM                0x01            /* Missing Addess Mark (again) */
+#define ST2_MAM                0x01            /* Missing Address Mark (again) */
 #define ST2_BC         0x02            /* Bad Cylinder */
 #define ST2_SNS                0x04            /* Scan Not Satisfied */
 #define ST2_SEH                0x08            /* Scan Equal Hit */
index 693906d..c01b34d 100644 (file)
@@ -85,7+85,7 @@ extern unsigned long name_cache_init(unsigned long start, unsigned long end);
 /*
  * Note that read-only etc flags are inode-specific: setting some file-system
  * flags just means all the inodes inherit those flags by default. It might be
- * possible to overrride it sevelctively if you really wanted to with some
+ * possible to override it selectively if you really wanted to with some
  * ioctl() that is not currently implemented.
  *
  * Exception: MS_RDONLY is always applied to the entire file system.
@@ -111,7+111,7 @@ extern unsigned long name_cache_init(unsigned long start, unsigned long end);
 
 #define SCSI_IOCTL_GET_IDLUN 0x5382
 
-/* Used to turn on and off tagged queueing for scsi devices */
+/* Used to turn on and off tagged queuing for scsi devices */
 
 #define SCSI_IOCTL_TAGGED_ENABLE 0x5383
 #define SCSI_IOCTL_TAGGED_DISABLE 0x5384
index e89d1ba..336184f 100644 (file)
@@ -3,7+3,7 @@
  *             operating system.  INET is implemented using the  BSD Socket
  *             interface as the means of communication with the user level.
  *
- *             Global definitions for the Ethernet IEE 802.3 interface.
+ *             Global definitions for the Ethernet IEEE 802.3 interface.
  *
  * Version:    @(#)if_ether.h  1.0.1a  02/08/94
  *
index f17a430..d710d81 100644 (file)
@@ -5,7+5,7 @@
  *     from NET2D which was written by:
  *             Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  *
- *             This work was derived friom Ross Biro's inspirational work
+ *             This work was derived from Ross Biro's inspirational work
  *             for the LINUX operating system.  His version numbers were:
  *
  *             $Id: Space.c,v     0.8.4.5  1992/12/12 19:25:04 bir7 Exp $
index c67c539..2de678a 100644 (file)
@@ -133,7+133,7 @@ struct kd_quemode {
 
 #define KDSBORDER      0x4B39  /* set screen boarder in ega text mode */
 
-#define KDSETMODE      0x4B3A  /* set text/grahics mode */
+#define KDSETMODE      0x4B3A  /* set text/graphics mode */
 #define                KD_TEXT         0x00
 #define                KD_GRAPHICS     0x01
 #define                KD_TEXT0        0x02    /* ? */
index 427c449..f74cd2b 100644 (file)
@@ -22,7+22,7 @@ struct msdos_inode_info {
                the ext2_inode_info. So it does not change anything to
                the total size of a struct inode.
 
-               I have not put it conditionnal. With the advent of loadable
+               I have not put it conditional. With the advent of loadable
                file system drivers, it would be very easy to compile
                a MsDOS FS driver unaware of UMSDOS and then later to
                load a (then incompatible) UMSDOS FS driver.
index 650b75e..a11a93b 100644 (file)
@@ -100,7+100,7 @@ struct device
   /* Interface address info. */
   unsigned char                  broadcast[MAX_ADDR_LEN];      /* hw bcast add */
   unsigned char                  dev_addr[MAX_ADDR_LEN];       /* hw address   */
-  unsigned char                  addr_len;     /* harfware address length      */
+  unsigned char                  addr_len;     /* hardware address length      */
   unsigned long                  pa_addr;      /* protocol address             */
   unsigned long                  pa_brdaddr;   /* protocol broadcast addr      */
   unsigned long                  pa_dstaddr;   /* protocol P-P other side addr */
index 27699a4..a0c103f 100644 (file)
 
 /*
  * Size of the lookup cache in units of number of entries cached.
- * It is better not to make this too large although the optimimum
+ * It is better not to make this too large although the optimum
  * depends on a usage and environment.
  */
 
index 24eff62..beb5f1d 100644 (file)
  * WARNING!  Do not delete or change the order of these fields.  If
  * a new field is required then add it to the end.  The version field
  * tracks which fields are present.  This will ensure some measure of
- * mount-to-kernel version compatibilty.  Some of these aren't used yet
+ * mount-to-kernel version compatibility.  Some of these aren't used yet
  * but here they are anyway.
  */
 
index 29f2629..b6658de 100644 (file)
 #define PCI_BIST_CAPABLE       0x80    /* 1 if BIST capable */
 
 /*
- * Base adddresses specify locations in memory or I/O space.
+ * Base addresses specify locations in memory or I/O space.
  * Decoded size can be determined by writing a value of 
  * 0xffffffff to the register, and reading it back.  Only 
  * 1 bits are decoded.
index 03b34f8..eaa15f9 100644 (file)
 #define PPP_ADDRESS    0xFF    /* first character of frame   <--  (may be   */
 #define PPP_CONTROL    0x03    /* second character of frame  <-- compressed)*/
 #define        PPP_TRANS       0x20    /* Asynchronous transparency modifier */
-#define PPP_ESC                0x7d    /* escape charecter -- next character is
+#define PPP_ESC                0x7d    /* escape character -- next character is
                                   data, and the PPP_TRANS bit should be
                                   toggled. PPP_ESC PPP_FLAG is illegal */
 
@@ -98,7+98,7 @@ struct ppp_lqp_packet_hdr {
   unsigned long                PeerInPackets;  /* Copied from SavedInPackets    */
   unsigned long                PeerInDiscards; /* Copied from SavedInDiscards   */
   unsigned long                PeerInErrors;   /* Copied from SavedInErrors     */
-  unsigned long                PeerInOctets;   /* Copeid from SavedInOctets     */
+  unsigned long                PeerInOctets;   /* Copied from SavedInOctets     */
   unsigned long                PeerOutLQRs;    /* Copied from OutLQRs, plus 1   */
   unsigned long                PeerOutPackets; /* Current ifOutUniPackets, + 1  */
   unsigned long                PeerOutOctets;  /* Current ifOutOctets + LQR     */
@@ -110,7+110,7 @@ struct ppp_lqp_packet_hdr {
  */
 
 struct ppp_lqp_packet_trailer {
-  unsigned long                SaveInLQRs;     /* Current InLQRs on receiption  */
+  unsigned long                SaveInLQRs;     /* Current InLQRs on reception   */
   unsigned long                SaveInPackets;  /* Current ifInUniPackets        */
   unsigned long                SaveInDiscards; /* Current ifInDiscards          */
   unsigned long                SaveInErrors;   /* Current ifInErrors            */
@@ -119,7+119,7 @@ struct ppp_lqp_packet_trailer {
 
 /*
  * PPP LQP packet. The packet is changed by the driver immediately prior
- * to transmission and updated upon receiption with the current values.
+ * to transmission and updated upon reception with the current values.
  * So, it must be known to the driver as well as the pppd software.
  */
 
index 345a628..760c9cd 100644 (file)
@@ -5,7+5,74 @@
  * The proc filesystem constants/structures
  */
 
-#define PROC_ROOT_INO 1
+enum root_directory_inos {
+       PROC_ROOT_INO = 1,
+       PROC_LOADAVG,
+       PROC_UPTIME,
+       PROC_MEMINFO,
+       PROC_KMSG,
+       PROC_VERSION,
+       PROC_SELF,      /* will change inode # */
+       PROC_NET,
+#ifdef CONFIG_DEBUG_MALLOC
+       PROC_MALLOC,
+#endif
+       PROC_KCORE,
+       PROC_MODULES,
+       PROC_STAT,
+       PROC_DEVICES,
+       PROC_INTERRUPTS,
+       PROC_FILESYSTEMS,
+       PROC_KSYMS
+};
+
+enum pid_directory_inos {
+       PROC_PID_INO = 2,
+       PROC_PID_MEM,
+       PROC_PID_CWD,
+       PROC_PID_ROOT,
+       PROC_PID_EXE,
+       PROC_PID_FD,
+       PROC_PID_ENVIRON,
+       PROC_PID_CMDLINE,
+       PROC_PID_STAT,
+       PROC_PID_STATM,
+       PROC_PID_MAPS
+};
+
+enum pid_subdirectory_inos {
+       PROC_PID_FD_DIR = 1
+};
+
+enum net_directory_inos {
+       PROC_NET_UNIX = 128,
+#ifdef CONFIG_INET
+       PROC_NET_ARP,
+       PROC_NET_ROUTE,
+       PROC_NET_DEV,
+       PROC_NET_RAW,
+       PROC_NET_TCP,
+       PROC_NET_UDP,
+       PROC_NET_SNMP,
+#ifdef CONFIG_INET_RARP
+       PROC_NET_RARP,
+#endif
+#endif
+#ifdef CONFIG_IPX
+       PROC_NET_IPX_ROUTE,
+       PROC_NET_IPX,
+#endif
+#ifdef CONFIG_AX25
+       PROC_NET_AX25_ROUTE,
+       PROC_NET_AX25,
+#ifdef CONFIG_NETROM
+       PROC_NET_NR_NODES,
+       PROC_NET_NR_NEIGH,
+       PROC_NET_NR,
+#endif
+#endif
+       PROC_NET_LAST
+};
 
 #define PROC_SUPER_MAGIC 0x9fa0
 
@@ -28,6+95,7 @@ extern struct inode_operations proc_base_inode_operations;
 extern struct inode_operations proc_net_inode_operations;
 extern struct inode_operations proc_mem_inode_operations;
 extern struct inode_operations proc_array_inode_operations;
+extern struct inode_operations proc_kcore_inode_operations;
 extern struct inode_operations proc_kmsg_inode_operations;
 extern struct inode_operations proc_link_inode_operations;
 extern struct inode_operations proc_fd_inode_operations;
index 454917a..3cadd20 100644 (file)
@@ -50,10+50,10 @@ struct rtentry {
 };
 
 
-#define        RTF_UP          0x0001          /* route useable                  */
+#define        RTF_UP          0x0001          /* route usable           */
 #define        RTF_GATEWAY     0x0002          /* destination is a gateway       */
 #define        RTF_HOST        0x0004          /* host entry (net otherwise)     */
-#define RTF_REINSTATE  0x0008          /* re-instate route after tmout   */
+#define RTF_REINSTATE  0x0008          /* reinstate route after tmout    */
 #define        RTF_DYNAMIC     0x0010          /* created dyn. (by redirect)     */
 #define        RTF_MODIFIED    0x0020          /* modified dyn. (by redirect)    */
 #define RTF_MSS                0x0040          /* specific MSS for this route    */
index c4881eb..a70a952 100644 (file)
  * and specify the type of your interface in SBPRO.
  *
  * SBPRO addresses typically are 0x0230 (=0x220+0x10), 0x0250, ...
- * LASERMATE (CI-101P, WDH-7001C) adresses typically are 0x0300, 0x0310, ...
+ * LASERMATE (CI-101P, WDH-7001C) addresses typically are 0x0300, 0x0310, ...
  * SPEA addresses are 0x320, 0x330, 0x340, 0x350
  * there are some soundcards on the market with 0x0630, 0x0650, ...
  *
index e417e98..8a70321 100644 (file)
@@ -372,9+372,8 @@ extern void notify_parent(struct task_struct * tsk);
 extern int send_sig(unsigned long sig,struct task_struct * p,int priv);
 extern int in_group_p(gid_t grp);
 
-extern int request_irq(unsigned int irq,void (*handler)(int));
+extern int request_irq(unsigned int irq,void (*handler)(int), unsigned long flags, const char *device);
 extern void free_irq(unsigned int irq);
-extern int irqaction(unsigned int irq,struct sigaction * sa);
 
 /*
  * Entry into gdt where to find first TSS. GDT layout:
index de08f38..1877f42 100644 (file)
@@ -93,7+93,7 @@ struct async_struct {
        int                     timeout;
        int                     xmit_fifo_size;
        int                     custom_divisor;
-       int                     x_char; /* xon/xoff characater */
+       int                     x_char; /* xon/xoff character */
        int                     close_delay;
        int                     IER;    /* Interrupt Enable Register */
        int                     MCR;    /* Modem control register */
index 67824de..5e983fc 100644 (file)
 
 #define UART_RX                0       /* In:  Receive buffer (DLAB=0) */
 #define UART_TX                0       /* Out: Transmit buffer (DLAB=0) */
-#define UART_DLL       0       /* Out: Devisor Latch Low (DLAB=1) */
-#define UART_DLM       1       /* Out: Devisor Latch High (DLAB=1) */
+#define UART_DLL       0       /* Out: Divisor Latch Low (DLAB=1) */
+#define UART_DLM       1       /* Out: Divisor Latch High (DLAB=1) */
 #define UART_IER       1       /* Out: Interrupt Enable Register */
 #define UART_IIR       2       /* In:  Interrupt ID Register */
 #define UART_FCR       2       /* Out: FIFO Control Register */
  * Note: if the word length is 5 bits (UART_LCR_WLEN5), then setting 
  * UART_LCR_STOP will select 1.5 stop bits, not 2 stop bits.
  */
-#define UART_LCR_DLAB  0x80    /* Devisor latch access bit */
+#define UART_LCR_DLAB  0x80    /* Divisor latch access bit */
 #define UART_LCR_SBC   0x40    /* Set break control */
 #define UART_LCR_SPAR  0x20    /* Stick parity (?) */
-#define UART_LCR_EPAR  0x10    /* Even paraity select */
+#define UART_LCR_EPAR  0x10    /* Even parity select */
 #define UART_LCR_PARITY        0x08    /* Parity Enable */
 #define UART_LCR_STOP  0x04    /* Stop bits: 0=1 stop bit, 1= 2 stop bits */
 #define UART_LCR_WLEN5  0x00   /* Wordlength: 5 bits */
 #define UART_LSR_DR    0x01    /* Receiver data ready */
 
 /*
- * These are the definitions for the Interrupt Indentification Register
+ * These are the definitions for the Interrupt Identification Register
  */
 #define UART_IIR_NO_INT        0x01    /* No interrupts pending */
 #define UART_IIR_ID    0x06    /* Mask for the interrupt ID */
index 33dfba6..08cb0f9 100644 (file)
@@ -23,7+23,7 @@ struct linger {
 #define SOCK_PACKET    10              /* linux specific way of        */
                                        /* getting packets at the dev   */
                                        /* level.  For writing rarp and */
-                                       /* other similiar things on the */
+                                       /* other similar things on the  */
                                        /* user level.                  */
 
 /* Supported address families. */
index c8ca537..f416149 100644 (file)
 /*
  *     These 16 ioctls are available to devices via the do_ioctl() device
  *     vector. Each device should include this file and redefine these names
- *     as their own. Because these are device dependant it is a good idea
+ *     as their own. Because these are device dependent it is a good idea
  *     _NOT_ to issue them to random objects and hope.
  */
  
index 0916bb9..da873dd 100644 (file)
  /* 
   * If you make modifications to this file, please contact me before
   * distributing the modified version. There is already enough 
-  * divercity in the world.
+  * diversity in the world.
   *
   * Regards,
   * Hannu Savolainen
 #define SNDCARD_GUS16          9
 #define SNDCARD_MSS            10
 #define SNDCARD_PSS            11
+#define SNDCARD_SSCAPE         12
 
 /***********************************
  * IOCTL Commands for /dev/sequencer
  *     Sample loading mechanism for internal synthesizers (/dev/sequencer)
  *     The following patch_info structure has been designed to support
  *     Gravis UltraSound. It tries to be universal format for uploading
- *     sample based patches but is propably too limited.
+ *     sample based patches but is probably too limited.
  */
 
 struct patch_info {
@@ -888,12+889,22 @@ void seqbuf_dump(void);   /* This function must be provided by programs */
 #define SEQ_BENDER(dev, chn, value) \
                _CHN_COMMON(dev, MIDI_PITCH_BEND, chn, 0, 0, value)
 
+
+#define SEQ_V2_X_CONTROL(dev, voice, controller, value)        {_SEQ_NEEDBUF(8);\
+                                       _seqbuf[_seqbufptr] = SEQ_EXTENDED;\
+                                       _seqbuf[_seqbufptr+1] = SEQ_CONTROLLER;\
+                                       _seqbuf[_seqbufptr+2] = (dev);\
+                                       _seqbuf[_seqbufptr+3] = (voice);\
+                                       _seqbuf[_seqbufptr+4] = (controller);\
+                                       *(short *)&_seqbuf[_seqbufptr+5] = (value);\
+                                       _seqbuf[_seqbufptr+7] = 0;\
+                                       _SEQ_ADVBUF(8);}
 /*
  * The following 5 macros are incorrectly implemented and obsolete.
  * Use SEQ_BENDER and SEQ_CONTROL (with proper controller) instead.
  */
-#define SEQ_PITCHBEND(dev, voice, value) SEQ_CONTROL(dev, voice, CTRL_PITCH_BENDER, value)
-#define SEQ_BENDER_RANGE(dev, voice, value) SEQ_CONTROL(dev, voice, CTRL_PITCH_BENDER_RANGE, value)
+#define SEQ_PITCHBEND(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER, value)
+#define SEQ_BENDER_RANGE(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER_RANGE, value)
 #define SEQ_EXPRESSION(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_EXPRESSION, value*128)
 #define SEQ_MAIN_VOLUME(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_MAIN_VOLUME, (value*16383)/100)
 #define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2)
@@ -911,7+922,7 @@ void seqbuf_dump(void);     /* This function must be provided by programs */
 #endif
 
 /*
- * Timing and syncronization macros
+ * Timing and synchronization macros
  */
 
 #define _TIMER_EVENT(ev, parm)         {_SEQ_NEEDBUF(8);\
index 87bcc36..df9985d 100644 (file)
@@ -3,7+3,7 @@
 
 #include <linux/types.h>
 
-/* 0x54 is just a magic number to make these relatively uniqe ('T') */
+/* 0x54 is just a magic number to make these relatively unique ('T') */
 
 #define TCGETS         0x5401
 #define TCSETS         0x5402
index 6b998bf..ff67a7e 100644 (file)
 /* #define QIC02_TAPE_IFC              ARCHIVE */
 /* #define QIC02_TAPE_IFC              MOUNTAIN */
 
-#define QIC02_TAPE_PORT        0x300   /* controller port adress */
+#define QIC02_TAPE_PORT        0x300   /* controller port address */
 #define QIC02_TAPE_IRQ         5       /* For IRQ2, use 9 here, others normal. */
 #define QIC02_TAPE_DMA         1       /* either 1 or 3, because 2 is used by the floppy */
 
index 5d1a3b8..14afba5 100644 (file)
  *   of them, as you want.
  * - No more scanning of a bit field is required upon call of a bottom half.
  * - Support for chained bottom half lists.  The run_task_queue() function can be
- *   used as a bottom half handler.  This is for example usefull for bottom
+ *   used as a bottom half handler.  This is for example useful for bottom
  *   halfs, which want to be delayed until the next clock tick.
  *
  * Problems:
index 999df74..b5bc72c 100644 (file)
@@ -60,14+60,14 @@ extern struct screen_info screen_info;
 /*
  * This character is the same as _POSIX_VDISABLE: it cannot be used as
  * a c_cc[] character, but indicates that a particular special character
- * isn't in use (eg VINTR ahs no character etc)
+ * isn't in use (eg VINTR has no character etc)
  */
 #define __DISABLED_CHAR '\0'
 
 /*
  * This is the flip buffer used for the tty driver.  The buffer is
  * located in the tty structure, and is used as a high speed interface
- * between the tty driver and the tty line discpline.
+ * between the tty driver and the tty line discipline.
  */
 #define TTY_FLIPBUF_SIZE 512
 
@@ -211,7+211,7 @@ struct tty_struct {
 #define N_TTY_BUF_SIZE 4096
        
        /*
-        * The following is data for the N_TTY line discpline.  For
+        * The following is data for the N_TTY line discipline.  For
         * historical reasons, this is included in the tty structure.
         */
        unsigned int column;
@@ -237,7+237,7 @@ struct tty_struct {
  * These bits are used in the flags field of the tty structure.
  * 
  * So that interrupts won't be able to mess up the queues,
- * copy_to_cooked must be atomic with repect to itself, as must
+ * copy_to_cooked must be atomic with respect to itself, as must
  * tty->write.  Thus, you must use the inline functions set_bit() and
  * clear_bit() to make things atomic.
  */
index efecd6a..5244dc8 100644 (file)
  * int  (*write_room)(struct tty_struct *tty);
  *
  *     This routine returns the numbers of characters the tty driver
- *     will accept for queueing to be writen.  This number is subject
+ *     will accept for queuing to be written.  This number is subject
  *     to change as output buffers get emptied, or if the output flow
  *     control is acted.
  * 
  *         unsigned int cmd, unsigned long arg);
  *
  *     This routine allows the tty driver to implement
- *     device-specific iotctl's.  If the ioctl number passed in cmd
+ *     device-specific ioctl's.  If the ioctl number passed in cmd
  *     is not recognized by the driver, it should return ENOIOCTLCMD.
  * 
  * void (*set_termios)(struct tty_struct *tty, struct termios * old);
  * void (*throttle)(struct tty_struct * tty);
  *
  *     This routine notifies the tty driver that input buffers for
- *     the line discpline are close to full, and it should somehow
+ *     the line discipline are close to full, and it should somehow
  *     signal that no more characters should be sent to the tty.
  * 
  * void (*unthrottle)(struct tty_struct * tty);
  *
  *     This routine notifies the tty drivers that it should signals
  *     that characters can now be sent to the tty without fear of
- *     overrunning the input buffers of the line discplines.
+ *     overrunning the input buffers of the line disciplines.
  * 
  * void (*stop)(struct tty_struct *tty);
  *
- *     This routine notfies the tty driver that it should stop
+ *     This routine notifies the tty driver that it should stop
  *     outputting characters to the tty device.  
  * 
  * void (*start)(struct tty_struct *tty);
index 40e2443..5571ca0 100644 (file)
  *             _GUS_VOICEOFF   - Stops voice (no parameters)
  *             _GUS_VOICEFADE  - Stops the voice smoothly.
  *             _GUS_VOICEMODE  - Alters the voice mode, don't start or stop voice (P1=voice mode)
- *             _GUS_VOICEBALA  - Sets voice balence (P1, 0=left, 7=middle and 15=right, default 7)
+ *             _GUS_VOICEBALA  - Sets voice balance (P1, 0=left, 7=middle and 15=right, default 7)
  *             _GUS_VOICEFREQ  - Sets voice (sample) playback frequency (P1=Hz)
  *             _GUS_VOICEVOL   - Sets voice volume (P1=volume, 0xfff=max, 0xeff=half, 0x000=off)
  *             _GUS_VOICEVOL2  - Sets voice volume (P1=volume, 0xfff=max, 0xeff=half, 0x000=off)
index 44eab28..36a5f47 100644 (file)
@@ -49,7+49,7 @@ struct dir_locking_info {
        short int looking;              /* How many process doing a lookup */
        short int creating;             /* Is there any creation going on here */
                                                        /* Only one at a time, although one */
-                                                       /* may recursivly lock, so it is a counter */
+                                                       /* may recursively lock, so it is a counter */
        long pid;                               /* pid of the process owning the creation */
                                                        /* lock */
 };
@@ -119,7+119,7 @@ struct dir_locking_info {
        short int looking;              /* How many process doing a lookup */
        short int creating;             /* Is there any creation going on here */
                                                        /* Only one at a time, although one */
-                                                       /* may recursivly lock, so it is a counter */
+                                                       /* may recursively lock, so it is a counter */
        long pid;                               /* pid of the process owning the creation */
                                                        /* lock */
 };
index d75eafa..d306991 100644 (file)
  *
  *
  * CHANGELOG :
- * Jun 17, 1994 : Modified to accomodate the broken pre-PCI BIOS SPECIFICATION
+ * Jun 17, 1994 : Modified to accommodate the broken pre-PCI BIOS SPECIFICATION
  *     Revision 2.0 present on <thys@dennis.ee.up.ac.za>'s ASUS mainboard.
  */
 
  *     Revision 0.4 May 24, 1993
  *     Phoenix Technologies Ltd.
  *     Norwood, MA
- * and the PCI BIOS specfication.
+ * and the PCI BIOS specification.
  */
 
 union bios32 {
@@ -425,8+425,8 @@ unsigned long bios32_init(unsigned long memory_start, unsigned long memory_end)
        int i, length;
 
        /*
-        * Follow the standard procedure for locating the BIOS32 Serivce
-        * directory by scanning the permissable address range from
+        * Follow the standard procedure for locating the BIOS32 Service
+        * directory by scanning the permissible address range from
         * 0xe0000 through 0xfffff for a valid BIOS32 structure.
         *
         * The PCI BIOS doesn't seem to work too well on many machines,
index 6e24d04..c804233 100644 (file)
@@ -17,7+17,7 @@ struct exec_domain default_exec_domain = {
        "Linux",        /* name */
        no_lcall7,      /* lcall7 causes a seg fault. */
        0, 0xff,        /* All personalities. */
-       ident_map,      /* Identify map signals. */
+       ident_map,      /* Identity map signals. */
        ident_map,      /*  - both ways. */
        NULL,           /* No usage counter. */
        NULL            /* Nothing after this in the list. */
index f1cfdab..2de16db 100644 (file)
  * is a SA_INTERRUPT flag etc). Naturally it's not a 1:1 relation, but there
  * are similarities.
  *
- * sa_handler(int irq_NR) is the default function called.
- * sa_mask is 0 if nothing uses this IRQ
+ * sa_handler(int irq_NR) is the default function called (0 if no).
+ * sa_mask is horribly ugly (I won't even mention it)
  * sa_flags contains various info: SA_INTERRUPT etc
  * sa_restorer is the unused
  */
@@ -190,6+190,22 @@ static struct sigaction irq_sigaction[16] = {
        { NULL, 0, 0, NULL }, { NULL, 0, 0, NULL }
 };
 
+int get_irq_list(char *buf)
+{
+       int i, len = 0;
+       struct sigaction * sa = irq_sigaction;
+
+       for (i = 0 ; i < 16 ; i++, sa++) {
+               if (!sa->sa_handler)
+                       continue;
+               len += sprintf(buf+len, "%2d: %8d %c %s\n",
+                       i, kstat.interrupts[i],
+                       (sa->sa_flags & SA_INTERRUPT) ? '+' : ' ',
+                       (char *) sa->sa_mask);
+       }
+       return len;
+}
+
 /*
  * do_IRQ handles IRQ's that have been installed without the
  * SA_INTERRUPT flag: it uses the full signal-handling return
@@ -218,7+234,11 @@ asmlinkage void do_fast_IRQ(int irq)
        sa->sa_handler(irq);
 }
 
-int irqaction(unsigned int irq, struct sigaction * new_sa)
+/*
+ * Using "struct sigaction" is slightly silly, but there
+ * are historical reasons and it works well, so..
+ */
+static int irqaction(unsigned int irq, struct sigaction * new_sa)
 {
        struct sigaction * sa;
        unsigned long flags;
@@ -226,14+246,13 @@ int irqaction(unsigned int irq, struct sigaction * new_sa)
        if (irq > 15)
                return -EINVAL;
        sa = irq + irq_sigaction;
-       if (sa->sa_mask)
+       if (sa->sa_handler)
                return -EBUSY;
        if (!new_sa->sa_handler)
                return -EINVAL;
        save_flags(flags);
        cli();
        *sa = *new_sa;
-       sa->sa_mask = 1;
        if (sa->sa_flags & SA_INTERRUPT)
                set_intr_gate(0x20+irq,fast_interrupt[irq]);
        else
@@ -251,13+270,14 @@ int irqaction(unsigned int irq, struct sigaction * new_sa)
        return 0;
 }
                
-int request_irq(unsigned int irq, void (*handler)(int))
+int request_irq(unsigned int irq, void (*handler)(int),
+       unsigned long flags, const char * devname)
 {
        struct sigaction sa;
 
        sa.sa_handler = handler;
-       sa.sa_flags = 0;
-       sa.sa_mask = 0;
+       sa.sa_flags = flags;
+       sa.sa_mask = (unsigned long) devname;
        sa.sa_restorer = NULL;
        return irqaction(irq,&sa);
 }
@@ -271,7+291,7 @@ void free_irq(unsigned int irq)
                printk("Trying to free IRQ%d\n",irq);
                return;
        }
-       if (!sa->sa_mask) {
+       if (!sa->sa_handler) {
                printk("Trying to free free IRQ%d\n",irq);
                return;
        }
@@ -313,22+333,15 @@ static void math_error_irq(int cpl)
 
 static void no_action(int cpl) { }
 
-static struct sigaction ignore_IRQ = {
-       no_action,
-       0,
-       SA_INTERRUPT,
-       NULL
-};
-
 void init_IRQ(void)
 {
        int i;
 
        for (i = 0; i < 16 ; i++)
                set_intr_gate(0x20+i,bad_interrupt[i]);
-       if (irqaction(2,&ignore_IRQ))
+       if (request_irq(2, no_action, SA_INTERRUPT, "cascade"))
                printk("Unable to get IRQ2 for cascade\n");
-       if (request_irq(13,math_error_irq))
+       if (request_irq(13,math_error_irq, 0, "math error"))
                printk("Unable to get IRQ13 for math-error handler\n");
 
        /* initialize the bottom half routines. */
index 243256b..16f3737 100644 (file)
 #include <linux/sys.h>
 #include <linux/utsname.h>
 #include <linux/interrupt.h>
+#include <linux/ioport.h>
 #include <linux/timer.h>
 #include <linux/binfmts.h>
 #include <linux/personality.h>
@@ -49,12+50,6 @@ extern int do_signal(unsigned long oldmask, struct pt_regs * regs);
 
 extern void (* iABI_hook)(struct pt_regs * regs);
 
-#ifdef CONFIG_INET
-extern void snarf_region(unsigned int, unsigned int);
-extern struct device *irq2dev_map[];
-#endif
-
-
 struct symbol_table symbol_table = { 0, 0, 0, /* for stacked module support */
        {
        /* stackable module support */
@@ -95,6+90,7 @@ struct symbol_table symbol_table = { 0, 0, 0, /* for stacked module support */
        X(unregister_chrdev),
        X(register_blkdev),
        X(unregister_blkdev),
+
        /* Module creation of serial units */
        X(register_serial),
        X(unregister_serial),
@@ -113,7+109,6 @@ struct symbol_table symbol_table = { 0, 0, 0, /* for stacked module support */
        X(unregister_exec_domain),
 
        /* interrupt handling */
-       X(irqaction),
        X(request_irq),
        X(free_irq),
        X(enable_irq),
@@ -125,8+120,8 @@ struct symbol_table symbol_table = { 0, 0, 0, /* for stacked module support */
 
        /* dma handling */
        X(request_dma),
-       X(free_dma),    
-       
+       X(free_dma),
+
        /* process management */
        X(wake_up),
        X(wake_up_interruptible),
@@ -173,6+168,7 @@ struct symbol_table symbol_table = { 0, 0, 0, /* for stacked module support */
        X(ether_setup),
        X(alloc_skb),
        X(kfree_skb),
+       X(dev_kfree_skb),
        X(snarf_region),
        X(netif_rx),
        X(dev_rint),
index 69e6ba9..cade047 100644 (file)
@@ -447,7+447,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
 
 /*
  * make the child exit.  Best I can do is send it a sigkill. 
- * perhaps it should be put in the status that it want's to 
+ * perhaps it should be put in the status that it wants to 
  * exit.
  */
                case PTRACE_KILL: {
index 3b62613..f5a3bc1 100644 (file)
@@ -828,6+828,6 @@ void sched_init(void)
        outb_p(0x34,0x43);              /* binary, mode 2, LSB/MSB, ch 0 */
        outb_p(LATCH & 0xff , 0x40);    /* LSB */
        outb(LATCH >> 8 , 0x40);        /* MSB */
-       if (request_irq(TIMER_IRQ,(void (*)(int)) do_timer)!=0)
+       if (request_irq(TIMER_IRQ,(void (*)(int)) do_timer, 0, "timer") != 0)
                panic("Could not allocate timer IRQ!");
 }
index d7da201..0d0b18b 100644 (file)
@@ -1+1 @@
-3c509.o de600.o de620.o 3c501.o plip.o
+3c509.o de600.o de620.o 3c501.o plip.o 8390.o
index f4b8cee..95af292 100644 (file)
@@ -1,5+1,5 @@
 #
-# Makefile for the Linix TCP/IP (INET) layer.
+# Makefile for the Linux TCP/IP (INET) layer.
 #
 # Note! Dependencies are done automagically by 'make dep', which also
 # removes any old dependencies. DON'T put your own dependencies here
 # Note 2! The CFLAGS definition is now in the main makefile...
 
 .c.o:
-       $(CC) $(CFLAGS) -c -o $*.o $<
+       $(CC) $(CFLAGS) -c $<
 .s.o:
        $(AS) -o $*.o $<
 .c.s:
-       $(CC) $(CFLAGS) -S -o $*.s $<
+       $(CC) $(CFLAGS) -S $<
 
 
 OBJS   := sock.o eth.o dev.o skbuff.o datagram.o
index 5875fb7..f10996f 100644 (file)
@@ -148,7+148,7 @@ void put_sock(unsigned short num, struct sock *sk)
        sk->next = NULL;
        num = num &(SOCK_ARRAY_SIZE -1);
 
-       /* We can't have an interupt re-enter here. */
+       /* We can't have an interrupt re-enter here. */
        cli();
        if (sk->prot->sock_array[num] == NULL) 
        {
@@ -514,7+514,7 @@ static int inet_create(struct socket *sock, int protocol)
                        sk->reuse = 1;
                        sk->no_check = 0;       /*
                                                 * Doesn't matter no checksum is
-                                                * preformed anyway.
+                                                * performed anyway.
                                                 */
                        sk->num = protocol;
                        break;
@@ -533,7+533,7 @@ static int inet_create(struct socket *sock, int protocol)
                        prot = &packet_prot;
                        sk->reuse = 1;
                        sk->no_check = 0;       /* Doesn't matter no checksum is
-                                                * preformed anyway.
+                                                * performed anyway.
                                                 */
                        sk->num = protocol;
                        break;
@@ -735,7+735,7 @@ static int inet_release(struct socket *sock, struct socket *peer)
 }
 
 
-/* this needs to be changed to dissallow
+/* this needs to be changed to disallow
    the rebinding of sockets.   What error
    should it return? */
 
@@ -833,7+833,7 @@ static int inet_error(struct sock *sk)
 }
 
 /*
- *     Connect to a remote host. There is regretably still a little
+ *     Connect to a remote host. There is regrettably still a little
  *     TCP 'magic' in here.
  */
  
@@ -1146,7+1146,7 @@ static int inet_select(struct socket *sock, int sel_type, select_table *wait )
  *
  *     NOTE: I like the idea of a module for the config stuff. ie ifconfig
  *     loads the devconfigure module does its configuring and unloads it.
- *     Theres a good 20K of config code hanging around the kernel.
+ *     There's a good 20K of config code hanging around the kernel.
  */
 
 static int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
@@ -1230,7+1230,7 @@ static int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
 
 /*
  * This routine must find a socket given a TCP or UDP header.
- * Everyhting is assumed to be in net order.
+ * Everything is assumed to be in net order.
  */
 
 struct sock *get_sock(struct proto *prot, unsigned short num,
index 2412335..339d95c 100644 (file)
  *
  *
  * Fixes:
- *             Alan Cox        :       Removed the ethernet assumptions in Florians code
+ *             Alan Cox        :       Removed the ethernet assumptions in Florian's code
  *             Alan Cox        :       Fixed some small errors in the ARP logic
  *             Alan Cox        :       Allow >4K in /proc
  *             Alan Cox        :       Make ARP add its own protocol entry
index b41b998..116c16e 100644 (file)
  *             Florian  La Roche:      Changed for my new skbuff handling.
  *
  *     Note:
- *             A lot of this will change when the protocol/socket seperation
+ *             A lot of this will change when the protocol/socket separation
  *     occurs. Using this will make things reasonably clean.
  */
 
@@ -107,7+107,7 @@ restart:
                        }
                        if(sk->err != 0)        /* Error while waiting for packet
                                                   eg an icmp sent earlier by the
-                                                  peer has finaly turned up now */
+                                                  peer has finally turned up now */
                        {
                                *err = -sk->err;
                                sti();
@@ -119,7+119,7 @@ restart:
                sti();
          }
          /* Again only user level code calls this function, so nothing interrupt level
-            will suddenely eat the receive_queue */
+            will suddenly eat the receive_queue */
          if (!(flags & MSG_PEEK))
          {
                skb=skb_dequeue(&sk->receive_queue);
index 8914d88..7d5f0a1 100644 (file)
@@ -1,5+1,5 @@
 /*
- *     NET3    Protocol independant device support routines.
+ *     NET3    Protocol independent device support routines.
  *
  *             This program is free software; you can redistribute it and/or
  *             modify it under the terms of the GNU General Public License
@@ -222,7+222,7 @@ void dev_remove_pack(struct packet_type *pt)
 
 /*****************************************************************************************
 
-                           Device Inteface Subroutines
+                           Device Interface Subroutines
 
 ******************************************************************************************/
 
@@ -340,7+340,7 @@ void dev_queue_xmit(struct sk_buff *skb, struct device *dev, int pri)
        struct packet_type *ptype;
        int where = 0;          /* used to say if the packet should go  */
                                /* at the front or the back of the      */
-                               /* queue - front is a retranmsit try    */
+                               /* queue - front is a retransmit try    */
 
        if (dev == NULL) 
        {
@@ -480,7+480,7 @@ void netif_rx(struct sk_buff *skb)
                skb->stamp = xtime;
 
        /*
-        *      Check that we aren't oevrdoing things.
+        *      Check that we aren't overdoing things.
         */
 
        if (!backlog_size)
@@ -626,12+626,12 @@ void dev_transmit(void)
 ***********************************************************************************/
 
 /*
- *     This is a single non-rentrant routine which takes the received packet
+ *     This is a single non-reentrant routine which takes the received packet
  *     queue and throws it at the networking layers in the hope that something
  *     useful will emerge.
  */
  
-volatile char in_bh = 0;       /* Non-rentrant remember */
+volatile char in_bh = 0;       /* Non-reentrant remember */
 
 int in_net_bh()        /* Used by timer.c */
 {
@@ -967,7+967,7 @@ static int sprintf_stats(char *buffer, struct device *dev)
 }
 
 /*
- *     Called from the PROCfs module. This now uses the new arbitary sized /proc/net interface
+ *     Called from the PROCfs module. This now uses the new arbitrary sized /proc/net interface
  *     to create /proc/net/dev
  */
  
@@ -1114,7+1114,7 @@ static int dev_ifsioc(void *arg, unsigned int getset)
                                         *      Check the flags.
                                         */
                                        if(ret<0)
-                                               dev->flags&=~IFF_UP;    /* Didnt open so down the if */
+                                               dev->flags&=~IFF_UP;    /* Didn't open so down the if */
                                }
                        }
                        break;
@@ -1204,7+1204,7 @@ static int dev_ifsioc(void *arg, unsigned int getset)
                        }
                        break;
                        
-               case SIOCGIFMETRIC:     /* Get the metric on the inteface (currently unused) */
+               case SIOCGIFMETRIC:     /* Get the metric on the interface (currently unused) */
                        
                        ifr.ifr_metric = dev->metric;
                        memcpy_tofs(arg, &ifr, sizeof(struct ifreq));
index ad4c428..cd7ca1e 100644 (file)
@@ -73,7+73,7 @@ void eth_setup(char *str, int *ints)
 
 
 /*
- *      Create the Ethernet MAC header for an arbitary protocol layer 
+ *      Create the Ethernet MAC header for an arbitrary protocol layer 
  *
  *     saddr=NULL      means use device source address
  *     daddr=NULL      means leave destination address (eg unresolved arp)
@@ -141,7+141,7 @@ int eth_rebuild_header(void *buff, struct device *dev, unsigned long dst,
         
        if(eth->h_proto != htons(ETH_P_IP)) 
        {
-               printk("eth_rebuild_header: Don't know how to resolve type %d addreses?\n",(int)eth->h_proto);
+               printk("eth_rebuild_header: Don't know how to resolve type %d addresses?\n",(int)eth->h_proto);
                memcpy(eth->h_source, dev->dev_addr, dev->addr_len);
                return 0;
        }
index f7619bf..24fc614 100644 (file)
@@ -324,7+324,7 @@ static void icmp_redirect(struct icmphdr *icmph, struct sk_buff *skb,
                                break;
                        if (rt->rt_gateway != source)
                                break;
-                       printk("redirect from %08lx\n", source);
+                       printk("redirect from %s\n", in_ntoa(source));
                        ip_rt_add((RTF_DYNAMIC | RTF_MODIFIED | RTF_HOST | RTF_GATEWAY),
                                ip, 0, icmph->un.gateway, dev,0, 0);
                        break;
@@ -501,7+501,7 @@ static void icmp_info(struct icmphdr *icmph, struct sk_buff *skb, struct device
 
 
 /* 
- *     Handle ICMP_ADRESS_MASK requests. 
+ *     Handle ICMP_ADDRESS_MASK requests. 
  */
  
 static void icmp_address(struct icmphdr *icmph, struct sk_buff *skb, struct device *dev,
index 25835cb..d11e9f5 100644 (file)
@@ -543,7+543,7 @@ int ip_csum(struct iphdr *iph)
 }
 
 /*
- *     Generate a checksym for an outgoing IP datagram.
+ *     Generate a checksum for an outgoing IP datagram.
  */
 
 static void ip_send_check(struct iphdr *iph)
@@ -739,7+739,7 @@ static struct ipq *ip_create(struct sk_buff *skb, struct iphdr *iph, struct devi
        }
 
        /*
-        *      Allocate memory for the IP header (plus 8 octects for ICMP).
+        *      Allocate memory for the IP header (plus 8 octets for ICMP).
         */
 
        ihlen = (iph->ihl * sizeof(unsigned long));
@@ -834,7+834,7 @@ static struct sk_buff *ip_glue(struct ipq *qp)
        if ((skb = alloc_skb(len,GFP_ATOMIC)) == NULL)
        {
                ip_statistics.IpReasmFails++;
-               printk("IP: queue_glue: no memory for glueing queue 0x%X\n", (int) qp);
+               printk("IP: queue_glue: no memory for gluing queue 0x%X\n", (int) qp);
                ip_free(qp);
                return(NULL);
        }
@@ -981,7+981,7 @@ static struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct
 
        /*
         *      We found where to put this one.
-        *      Check for overlap with preceeding fragment, and, if needed,
+        *      Check for overlap with preceding fragment, and, if needed,
         *      align things so that any overlaps are eliminated.
         */
        if (prev != NULL && offset < prev->end)
@@ -1190,7+1190,7 @@ void ip_fragment(struct sock *sk, struct sk_buff *skb, struct device *dev, int i
                skb2->h.raw=(char *) skb2->data;
                /*
                 *      Charge the memory for the fragment to any owner
-                *      it might posess
+                *      it might possess
                 */
 
                save_flags(flags);
@@ -1470,7+1470,7 @@ int ip_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt)
        skb->len=ntohs(iph->tot_len);
 
        /*
-        *      Next anaylse the packet for options. Studies show under one packet in
+        *      Next analyse the packet for options. Studies show under one packet in
         *      a thousand have options....
         */
 
@@ -1501,7+1501,7 @@ int ip_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt)
         *
         *      This is inefficient. While finding out if it is for us we could also compute
         *      the routing table entry. This is where the great unified cache theory comes
-        *      in as and when someone impliments it
+        *      in as and when someone implements it
         */
 
        if ((brd = ip_chk_addr(iph->daddr)) == 0)
@@ -1622,7+1622,7 @@ int ip_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt)
  * Queues a packet to be sent, and starts the transmitter
  * if necessary.  if free = 1 then we free the block after
  * transmit, otherwise we don't. If free==2 we not only
- * free the block but also dont assign a new ip seq number.
+ * free the block but also don't assign a new ip seq number.
  * This routine also needs to put in the total length,
  * and compute the checksum
  */
@@ -1716,7+1716,7 @@ void ip_queue_xmit(struct sock *sk, struct device *dev,
        /*
         *      If a sender wishes the packet to remain unfreed
         *      we add it to his send queue. This arguably belongs
-        *      in the TCP level since nobody elses uses it. BUT
+        *      in the TCP level since nobody else uses it. BUT
         *      remember IPng might change all the rules.
         */
 
@@ -1916,7+1916,7 @@ void ip_retransmit(struct sock *sk, int all)
  *     Socket option code for IP. This is the end of the line after any TCP,UDP etc options on
  *     an IP socket.
  *
- *     We impliment IP_TOS (type of service), IP_TTL (time to live).
+ *     We implement IP_TOS (type of service), IP_TTL (time to live).
  *
  *     Next release we will sort out IP_OPTIONS since for some people are kind of important.
  */
index b48d596..1578707 100644 (file)
@@ -180,7+180,7 @@ int ipx_get_info(char *buffer, char **start, off_t offset, int length)
        
        /* The data in question runs from begin to begin+len */
        *start=buffer+(offset-begin);   /* Start of wanted data */
-       len-=(offset-begin);            /* Remove unwanted header data from lenth */
+       len-=(offset-begin);            /* Remove unwanted header data from length */
        if(len>length)
                len=length;             /* Remove unwanted tail data from length */
        
index 9baefb5..eb5bd2b 100644 (file)
@@ -1,2+1,2 @@
-/* Seperate to keep compilation of protocols.c simpler */
+/* Separate to keep compilation of protocols.c simpler */
 extern void ipx_proto_init(struct net_proto *pro);
index 4dc65c5..14f0c2c 100644 (file)
@@ -1,2+1,2 @@
-/* Seperate to keep compilation of Space.c simpler */
+/* Separate to keep compilation of Space.c simpler */
 extern void p8022_proto_init(struct net_proto *);
index 467d7cd..c1311b3 100644 (file)
@@ -69,7+69,7 @@ int packet_rcv(struct sk_buff *skb, struct device *dev,  struct packet_type *pt)
        struct sock *sk;
        
        /*
-        *      When we registered the protcol we saved the socket in the data
+        *      When we registered the protocol we saved the socket in the data
         *      field for just this event.
         */
 
@@ -87,7+87,7 @@ int packet_rcv(struct sk_buff *skb, struct device *dev,  struct packet_type *pt)
        skb->sk = sk;
 
        /*
-        *      Charge the memory to the socket. This is done specificially
+        *      Charge the memory to the socket. This is done specifically
         *      to prevent sockets using all the memory up.
         */
         
@@ -260,7+260,7 @@ static int packet_init(struct sock *sk)
 
 /*
  *     Pull a packet from our receive queue and hand it to the user.
- *     If neccessary we block.
+ *     If necessary we block.
  */
  
 int packet_recvfrom(struct sock *sk, unsigned char *to, int len,
index 9d91946..57e552e 100644 (file)
@@ -137,7+137,7 @@ inet_del_protocol(struct inet_protocol *prot)
        /*
         * We have to worry if the protocol being deleted is
         * the last one on the list, then we may need to reset
-        * someones copied bit.
+        * someone's copied bit.
         */
        if (p->next != NULL && p->next == prot) {
                /*
index a07e864..27a5187 100644 (file)
  *             Alan Cox        :       for new sk_buff allocations wmalloc/rmalloc now call alloc_skb
  *             Alan Cox        :       kfree_s calls now are kfree_skbmem so we can track skb resources
  *             Alan Cox        :       Supports socket option broadcast now as does udp. Packet and raw need fixing.
- *             Alan Cox        :       Added RCVBUF,SNDBUF size setting. It suddenely occured to me how easy it was so...
+ *             Alan Cox        :       Added RCVBUF,SNDBUF size setting. It suddenly occured to me how easy it was so...
  *             Rick Sladkey    :       Relaxed UDP rules for matching packets.
  *             C.E.Hawkins     :       IFF_PROMISC/SIOCGHWADDR support
  *     Pauline Middelink       :       Pidentd support
index 9c673e5..a2bc8ef 100644 (file)
@@ -648,7+648,7 @@ static void tcp_send_skb(struct sock *sk, struct sk_buff *skb)
             sk->packets_out >= sk->cong_window) 
        {
                /* checksum will be supplied by tcp_write_xmit.  So
-                * we shouldn't need to set it at all.  I'm being paraoid */
+                * we shouldn't need to set it at all.  I'm being paranoid */
                th->check = 0;
                if (skb->next != NULL) 
                {
@@ -1003,7+1003,7 @@ static int tcp_write(struct sock *sk, unsigned char *from,
         * If window < 1/2 the maximum window we've seen from this
         *   host, don't use it.  This is sender side
         *   silly window prevention, as specified in RFC1122.
-        *   (Note that this is diffferent than earlier versions of
+        *   (Note that this is different than earlier versions of
         *   SWS prevention, e.g. RFC813.).  What we actually do is 
         *   use the whole MSS.  Since the results in the right
         *   edge of the packet being outside the window, it will
@@ -1148,7+1148,7 @@ static int tcp_write(struct sock *sk, unsigned char *from,
        sk->err = 0;
 
 /*
- *     Nagles rule. Turn Nagle off with TCP_NODELAY for highly
+ *     Nagle's rule. Turn Nagle off with TCP_NODELAY for highly
  *     interactive fast network servers. It's meant to be on and
  *     it really improves the throughput though not the echo time
  *     on my slow slip link - Alan
@@ -1312,9+1312,9 @@ static void cleanup_rbuf(struct sock *sk)
                 * is to simply do nothing if the other end has room to send at
                 * least 3 full packets, because the ack from those will auto-
                 * matically update the window.  If the other end doesn't think
-                * we have much space left, but we have room for atleast 1 more
+                * we have much space left, but we have room for at least 1 more
                 * complete packet than it thinks we do, we will send an ack
-                * immediatedly.  Otherwise we will wait up to .5 seconds in case
+                * immediately.  Otherwise we will wait up to .5 seconds in case
                 * the user reads some more.
                 */
                sk->ack_backlog++;
@@ -2042,7+2042,7 @@ static void tcp_conn_request(struct sock *sk, struct sk_buff *skb,
                newsk->mtu = rt->rt_mss - HEADER_SIZE;
        else 
        {
-#ifdef CONFIG_INET_SNARL       /* Sub Nets ARe Local */
+#ifdef CONFIG_INET_SNARL       /* Sub Nets Are Local */
                if ((saddr ^ daddr) & default_mask(saddr))
 #else
                if ((saddr ^ daddr) & dev->pa_mask)
@@ -2921,7+2921,7 @@ static int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int
        }
 
        /*
-        * Incomming ACK to a FIN we sent in the case of our initiating the close.
+        * Incoming ACK to a FIN we sent in the case of our initiating the close.
         *
         * Move to FIN_WAIT2 to await a FIN from the other end.
         */
@@ -2947,7+2947,7 @@ static int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int
        }
 
        /*
-        *      Incoming ACK to a FIN we sent in the case of a simultanious close.
+        *      Incoming ACK to a FIN we sent in the case of a simultaneous close.
         *
         *      Move to TIME_WAIT
         */
@@ -2981,7+2981,7 @@ static int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int
         * would not be true.  If you look at the pattern of timing, you can
         * show that rto is increased fast enough that the next packet would
         * almost never be retransmitted immediately.  Then you'd end up
-        * waiting for a timeout to send each packet on the retranmission
+        * waiting for a timeout to send each packet on the retransmission
         * queue.  With my implementation of the Karn sampling algorithm,
         * the timeout would double each time.  The net result is that it would
         * take a hideous amount of time to recover from a single dropped packet.
@@ -3365,7+3365,7 @@ static inline int tcp_urg(struct sock *sk, struct tcphdr *th,
  *  (and thence onto LAST-ACK and finally, CLOSE, we never enter
  *  TIME-WAIT)
  *
- *  If we are in FINWAIT-1, a received FIN indicates simultanious
+ *  If we are in FINWAIT-1, a received FIN indicates simultaneous
  *  close and we go into CLOSING (and later onto TIME-WAIT)
  *
  *  If we are in FINWAIT-2, a received FIN moves us to TIME-WAIT.
@@ -3415,7+3415,7 @@ static int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th,
                        return(0);
                case TCP_FIN_WAIT1:
                        /*
-                        * This case occurs when a simultanious close
+                        * This case occurs when a simultaneous close
                         * happens, we must ack the received FIN and
                         * enter the CLOSING state.
                         *
@@ -3585,7+3585,7 @@ static int tcp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len)
        
 
        /*
-        *      We need to build the routing stuff fromt the things saved in skb. 
+        *      We need to build the routing stuff from the things saved in skb. 
         */
 
        tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev,
@@ -3875,7+3875,7 @@ tcp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt,
  *     speed although further optimizing here is possible.
  */
  
-       /* Im trusting gcc to optimise this sensibly... might need judicious application of a software mallet */
+       /* I'm trusting gcc to optimise this sensibly... might need judicious application of a software mallet */
        if(!(sk->shutdown & RCV_SHUTDOWN) && sk->state==TCP_ESTABLISHED && !th->urg && !th->syn && !th->fin && !th->rst)
        {       
                /* Packets in order. Fits window */
@@ -4279,7+4279,7 @@ static void tcp_write_wakeup(struct sock *sk)
        int tmp;
 
        if (sk->zapped)
-               return; /* Afer a valid reset we can send no more */
+               return; /* After a valid reset we can send no more */
 
        /*
         * Write data can still be transmitted/retransmitted in the
@@ -4349,7+4349,7 @@ void
 tcp_send_probe0(struct sock *sk)
 {
        if (sk->zapped)
-               return;         /* Afer a valid reset we can send no more */
+               return;         /* After a valid reset we can send no more */
 
        tcp_write_wakeup(sk);
 
index a6f3073..2dcb22c 100644 (file)
 #define URG_READ       0x0400
 
 #define TCP_RETR1      7       /*
-                                * This is howmany retries it does before it
+                                * This is how many retries it does before it
                                 * tries to figure out if the gateway is
                                 * down.
                                 */
                                 */
 
 #define TCP_TIMEOUT_LEN        (15*60*HZ) /* should be about 15 mins           */
-#define TCP_TIMEWAIT_LEN (60*HZ) /* how long to wait to sucessfully 
+#define TCP_TIMEWAIT_LEN (60*HZ) /* how long to wait to successfully 
                                  * close the socket, about 60 seconds  */
 #define TCP_ACK_TIME   (3*HZ)  /* time to delay before sending an ACK  */
 #define TCP_DONE_TIME  250     /* maximum time to wait before actually
index a155df9..78a7a2b 100644 (file)
  *             Alan Cox        :       To avoid destroying a wait queue as we use it
  *                                     we defer destruction until the destroy timer goes
  *                                     off.
- *             Alan Cox        :       Destroy socket doesnt write a status value to the
+ *             Alan Cox        :       Destroy socket doesn't write a status value to the
  *                                     socket buffer _AFTER_ freeing it! Also sock ensures
  *                                     the socket will get removed BEFORE this is called
  *                                     otherwise if the timer TIME_DESTROY occurs inside
@@ -150,13+150,13 @@ void net_timer (unsigned long data)
                 */
                        if(sk->wmem_alloc!=0 || sk->rmem_alloc!=0)
                        {
-                               sk->wmem_alloc++;       /* So it DOESNT go away */
+                               sk->wmem_alloc++;       /* So it DOESN'T go away */
                                destroy_sock (sk);
                                sk->wmem_alloc--;       /* Might now have hit 0 - fall through and do it again if so */
                                sk->inuse = 0;  /* This will be ok, the destroy won't totally work */
                        }
                        if(sk->wmem_alloc==0 && sk->rmem_alloc==0)
-                               destroy_sock(sk);       /* Socket gone, DONT update sk->inuse! */
+                               destroy_sock(sk);       /* Socket gone, DON'T update sk->inuse! */
                                break;
                case TIME_CLOSE:
                        /* We've waited long enough, close the socket. */
index 978f959..118352a 100644 (file)
  *                                     select and read wake correctly on errors
  *             Alan Cox        :       udp_send verify_area moved to avoid mem leak
  *             Alan Cox        :       UDP can count its memory
- *             Alan Cox        :       send to an uknown connection causes
+ *             Alan Cox        :       send to an unknown connection causes
  *                                     an ECONNREFUSED off the icmp, but
  *                                     does NOT close.
  *             Alan Cox        :       Switched to new sk_buff handlers. No more backlog!
@@ -104,7+104,7 @@ void udp_err(int err, unsigned char *header, unsigned long daddr,
        header += 4*ip->ihl;
 
        /*
-        *      Find the 8 bytes of post IP header ICMP included for usA
+        *      Find the 8 bytes of post IP header ICMP included for us
         */  
        
        th = (struct udphdr *)header;  
index c6a1577..773fcc0 100644 (file)
@@ -169,7+169,7 @@ static int get_fd(struct inode *inode)
                current->files->fd[fd] = file;
        file->f_op = &socket_file_ops;
        file->f_mode = 3;
-       file->f_flags = 0;
+       file->f_flags = O_RDWR;
        file->f_count = 1;
        file->f_inode = inode;
        if (inode) 
index ceb8aad..e4fb629 100644 (file)
 # Note 2! The CFLAGS definition is now in the main makefile...
 
 .c.o:
-       $(CC) $(CFLAGS) \
-       -c -o $*.o $<
+       $(CC) $(CFLAGS) -c $<
 .s.o:
        $(AS) -o $*.o $<
 .c.s:
-       $(CC) $(CFLAGS) \
-       -S -o $*.s $<
+       $(CC) $(CFLAGS) -S $<
 
 OBJS   = sock.o proc.o
 
index 4d0a821..4d9ee25 100644 (file)
@@ -4,7+4,7 @@
  *             BSD Socket interface as the means of communication with
  *             the user level.
  *
- *             This file descibes some things of the UNIX protocol family
+ *             This file describes some things of the UNIX protocol family
  *             module.  It is mainly used for the "proc" sub-module now,
  *             but it may be useful for cleaning up the UNIX module as a
  *             whole later.
index 38e622e..32e71bd 100644 (file)
@@ -7,8+7,8 @@
 /*
  * This file builds a disk-image from three different files:
  *
- * - bootsect: max 510 bytes of 8086 machine code, loads the rest
- * - setup: max 4 sectors of 8086 machine code, sets up system parm
+ * - bootsect: exactly 512 bytes of 8086 machine code, loads the rest
+ * - setup: 8086 machine code, sets up system parm
  * - system: 80386 code for actual system
  *
  * It does some checking that all files are of the correct type, and
@@ -92,6+92,7 @@ int main(int argc, char ** argv)
        struct exec *ex = (struct exec *)buf;
        char major_root, minor_root;
        struct stat sb;
+       unsigned char setup_sectors;
 
        if ((argc < 4) || (argc > 5))
                usage();
@@ -171,14+172,15 @@ int main(int argc, char ** argv)
        if (c != 0)
                die("read-error on 'setup'");
        close (id);
-       if (i > SETUP_SECTS*512)
-               die("Setup exceeds " STRINGIFY(SETUP_SECTS)
-                       " sectors - rewrite build/boot/setup");
+       setup_sectors = (unsigned char)((i + 511) / 512);
+       /* for compatibility with LILO */
+       if (setup_sectors < SETUP_SECTS)
+               setup_sectors = SETUP_SECTS;
        fprintf(stderr,"Setup is %d bytes.\n",i);
        for (c=0 ; c<sizeof(buf) ; c++)
                buf[c] = '\0';
-       while (i<SETUP_SECTS*512) {
-               c = SETUP_SECTS*512-i;
+       while (i < setup_sectors * 512) {
+               c = setup_sectors * 512 - i;
                if (c > sizeof(buf))
                        c = sizeof(buf);
                if (write(1,buf,c) != c)
@@ -222,6+224,10 @@ int main(int argc, char ** argv)
                sz -= l;
        }
        close(id);
+       if (lseek(1, 497, 0) == 497) {
+               if (write(1, &setup_sectors, 1) != 1)
+                       die("Write of setup sectors failed");
+       }
        if (lseek(1,500,0) == 500) {
                buf[0] = (sys_size & 0xff);
                buf[1] = ((sys_size >> 8) & 0xff);
index ca1f22a..5d209de 100644 (file)
@@ -9,11+9,11 @@ zOBJECTS = $(HEAD) inflate.o unzip.o misc.o
 CFLAGS = -O2 -DSTDC_HEADERS $(TEST)
 
 .c.s:
-       $(CC) $(CFLAGS) -S -o $*.s $<
+       $(CC) $(CFLAGS) -S $<
 .s.o:
        $(AS) -o $*.o $<
 .c.o:
-       $(CC) $(CFLAGS) -c -o $*.o $<
+       $(CC) $(CFLAGS) -c $<
 
 all:   zSystem
 
close