]> git.neil.brown.name Git - history.git/commitdiff
Import 2.0.25 2.0.25
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:11:22 +0000 (15:11 -0500)
committerAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:11:22 +0000 (15:11 -0500)
36 files changed:
CREDITS
Makefile
arch/i386/kernel/entry.S
arch/i386/kernel/irq.c
arch/i386/kernel/time.c
arch/i386/kernel/traps.c
drivers/block/ide-tape.c
drivers/block/ide-tape.h
drivers/block/ide.c
drivers/char/console.c
drivers/char/keyb_m68k.c
drivers/char/keyboard.c
drivers/char/misc.c
drivers/net/3c501.c
drivers/net/3c59x.c
drivers/net/Space.c
drivers/net/net_init.c
drivers/net/ni65.c
drivers/net/ni65.h
drivers/net/tulip.c
drivers/pci/pci.c
drivers/sbus/char/sunkbd.c
drivers/scsi/aha1542.c
drivers/scsi/fdomain.c
drivers/scsi/hosts.c
drivers/scsi/scsicam.c
fs/smbfs/inode.c
include/linux/keyboard.h
include/linux/locks.h
include/linux/pci.h
include/net/sock.h
kernel/fork.c
net/bridge/br.c
net/core/dev.c
net/ipv4/icmp.c
net/ipv4/tcp.c

diff --git a/CREDITS b/CREDITS
index 5fbf48f00ae385689c830bbde0b6a990d504d8cf..df5e734fd3835583889bb4288cdd5559e7c9566c 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -667,7 +667,7 @@ S: Chapel Hill, North Carolina 27514-4818
 S: USA
 
 N: Bernhard Kaindl
-E: bartelt@computerhaus.at
+E: edv@bartelt.via.at
 D: Author of a menu based configuration tool, kmenu, which 
 D: is the predecessor of 'make menuconfig' and 'make xconfig'.
 S: Tallak 95
index c2e6513542fb05a2626bfdfe9045cac91fc421a8..a0d0784d661a88927cb3bcbbb9f915e9ab245020 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION = 2
 PATCHLEVEL = 0
-SUBLEVEL = 24
+SUBLEVEL = 25
 
 ARCH = i386
 
index 61eb608f839a1b0f14b73283bd39b6d992fe3e71..921f122e0b859bcdf5ed57fb43f3100488670747 100644 (file)
@@ -503,6 +503,11 @@ ENTRY(page_fault)
        pushl $ SYMBOL_NAME(do_page_fault)
        jmp error_code
 
+ENTRY(spurious_interrupt_bug)
+       pushl $0
+       pushl $ SYMBOL_NAME(do_spurious_interrupt_bug)
+       jmp error_code
+
 .data
 ENTRY(sys_call_table)
        .long SYMBOL_NAME(sys_setup)            /* 0 */
index 44c7dff962ef7459466583dbcbd0a3ede8609a69..7fa61649b00e1c5456ea79f3e57b4958987231d8 100644 (file)
@@ -522,7 +522,7 @@ int probe_irq_off (unsigned long irqs)
 
        irqmask = (((unsigned int)cache_A1)<<8) | (unsigned int)cache_21;
 #ifdef DEBUG
-       printk("probe_irq_off: irqs=0x%04x irqmask=0x%04x\n", irqs, irqmask);
+       printk("probe_irq_off: irqs=0x%04lx irqmask=0x%04x\n", irqs, irqmask);
 #endif
        irqs &= irqmask;
        if (!irqs)
index fab5069dfe1bf0e0e3c04cb5a2b6f03976d55694..827d86c341c2282ecdafca33f44ff984e2973a77 100644 (file)
 #include <linux/string.h>
 #include <linux/mm.h>
 #include <linux/interrupt.h>
+#include <linux/time.h>
+#include <linux/delay.h>
 
 #include <asm/segment.h>
 #include <asm/io.h>
 #include <asm/irq.h>
+#include <asm/delay.h>
 
 #include <linux/mc146818rtc.h>
 #include <linux/timex.h>
@@ -462,6 +465,21 @@ void time_init(void)
                                    needs more debugging. */
        if (x86_capability & 16) {
                do_gettimeoffset = do_fast_gettimeoffset;
+
+               if( strcmp( x86_vendor_id, "AuthenticAMD" ) == 0 ) {
+                       if( x86 == 5 ) {
+                               if( x86_model == 0 ) {
+                                       /* turn on cycle counters during power down */
+                                       __asm__ __volatile__ (" movl $0x83, %%ecx \n \
+                                                               rdmsr \n \
+                                                               orl $1,%%eax \n \
+                                                               wrmsr \n " 
+                                                                : : : "ax", "cx", "dx" );
+                                       udelay(500);
+                               }
+                       }
+               }
+
                /* read Pentium cycle counter */
                __asm__(".byte 0x0f,0x31"
                        :"=a" (init_timer_cc.low),
index 86b4b6a8c0721d661e8a9d0baf52c488dcdfd660..34b4623d5abcaa6df1f6c30a1d1b5fca54c3c9fd 100644 (file)
@@ -81,6 +81,7 @@ asmlinkage void page_fault(void);
 asmlinkage void coprocessor_error(void);
 asmlinkage void reserved(void);
 asmlinkage void alignment_check(void);
+asmlinkage void spurious_interrupt_bug(void);
 
 int kstack_depth_to_print = 24;
 
@@ -173,8 +174,8 @@ DO_ERROR( 9, SIGFPE,  "coprocessor segment overrun", coprocessor_segment_overrun
 DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS, current)
 DO_ERROR(11, SIGBUS,  "segment not present", segment_not_present, current)
 DO_ERROR(12, SIGBUS,  "stack segment", stack_segment, current)
-DO_ERROR(15, SIGSEGV, "reserved", reserved, current)
 DO_ERROR(17, SIGSEGV, "alignment check", alignment_check, current)
+DO_ERROR(18, SIGSEGV, "reserved", reserved, current)
 
 asmlinkage void do_general_protection(struct pt_regs * regs, long error_code)
 {
@@ -258,6 +259,12 @@ asmlinkage void do_coprocessor_error(struct pt_regs * regs, long error_code)
        math_error();
 }
 
+asmlinkage void do_spurious_interrupt_bug(struct pt_regs * regs,
+                                         long error_code)
+{
+       printk("Ignoring P6 Local APIC Spurious Interrupt Bug...\n");
+}
+
 /*
  *  'math_state_restore()' saves the current math information in the
  * old math state array, and gets the new ones from the current task
@@ -343,7 +350,7 @@ void trap_init(void)
        set_trap_gate(12,&stack_segment);
        set_trap_gate(13,&general_protection);
        set_trap_gate(14,&page_fault);
-       set_trap_gate(15,&reserved);
+       set_trap_gate(15,&spurious_interrupt_bug);
        set_trap_gate(16,&coprocessor_error);
        set_trap_gate(17,&alignment_check);
        for (i=18;i<48;i++)
index 4fafda17c8ff9552d1ecfa8f0f87e04fbd932288..d397a17eb7cb0c1d3c5a45eee4a61100aac69d51 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/block/ide-tape.c      Version 1.8 - ALPHA     Sep  26, 1996
+ * linux/drivers/block/ide-tape.c      Version 1.9 - ALPHA     Nov   5, 1996
  *
  * Copyright (C) 1995, 1996 Gadi Oxman <gadio@netvision.net.il>
  *
  * Ver 1.7   Sep 10 96   Minor changes for the CONNER CTT8000-A model.
  * Ver 1.8   Sep 26 96   Attempt to find a better balance between good
  *                        interactive response and high system throughput.
+ * Ver 1.9   Nov  5 96   Automatically cross encountered filemarks rather
+ *                        than requiring an explicit FSF command.
+ *                       Abort pending requests at end of media.
+ *                       MTTELL was sometimes returning incorrect results.
+ *                       Return the real block size in the MTIOCGET ioctl.
+ *                       Some error recovery bug fixes.
  *
  * We are currently in an *alpha* stage. The driver is not complete and not
  * much tested. I would strongly suggest to:
 
 #define        IDETAPE_READ_REQUEST                    92
 #define        IDETAPE_WRITE_REQUEST                   93
+#define        IDETAPE_ABORTED_WRITE_REQUEST           94
 
-#define IDETAPE_LAST_REQUEST                   93
+#define        IDETAPE_LAST_REQUEST                    94
 
 /*
  *     A macro which can be used to check if a we support a given
@@ -1205,10 +1212,6 @@ void idetape_register_chrdev (void)
                printk ("Unable to register character device interface !\n");
                /* ??? */
        }
-       else {
-               printk ("ide-tape: %s <-> %s : Character device interface on major = %d\n",
-                       drive->name,idetape_chrdev.name,major);
-       }
 }
 
 /*
@@ -1260,10 +1263,8 @@ void idetape_setup (ide_drive_t *drive)
        
 #if IDETAPE_PIPELINE
        tape->max_number_of_stages=IDETAPE_MIN_PIPELINE_STAGES;
-       printk ("ide-tape: Operating in pipelined (fast and tricky) operation mode.\n");
 #else
        tape->max_number_of_stages=0;
-       printk ("ide-tape: Operating in non-pipelined (slow and safe) operation mode.\n");
 #endif /* IDETAPE_PIPELINE */
 
        idetape_get_mode_sense_results (drive);
@@ -2474,7 +2475,12 @@ void idetape_analyze_error (ide_drive_t *drive,idetape_request_sense_result_t *r
                        pc->abort=1;
                }
        }
-
+       if (pc->c[0] == IDETAPE_WRITE_CMD) {
+               if (result->eom || (result->sense_key == 0xd && result->asc == 0x0 && result->ascq == 0x2)) {
+                       pc->error = IDETAPE_RQ_ERROR_EOD;
+                       pc->abort = 1;
+               }
+       }
        if (pc->c[0] == IDETAPE_READ_CMD || pc->c[0] == IDETAPE_WRITE_CMD) {
                if (result->sense_key == 8) {
                        pc->error=IDETAPE_RQ_ERROR_EOD;
@@ -2853,6 +2859,17 @@ int idetape_blkdev_ioctl (ide_drive_t *drive, struct inode *inode, struct file *
        }
 }
 
+static void idetape_abort_pipeline (ide_drive_t *drive)
+{
+       idetape_tape_t *tape = &drive->tape;
+       idetape_pipeline_stage_t *stage = tape->next_stage;
+
+       while (stage) {
+               stage->rq.cmd = IDETAPE_ABORTED_WRITE_REQUEST;
+               stage = stage->next;
+       }
+}
+
 /*
  *     Functions which handle requests.
  */
@@ -2880,7 +2897,9 @@ void idetape_end_request (byte uptodate, ide_hwgroup_t *hwgroup)
        if (!rq->errors)                                /* In case rq->errors is already set, */
                rq->errors=!uptodate;                   /* we won't change it. */
        error=rq->errors;
-               
+       if (error)
+               tape->failed_pc = NULL;
+
        if (tape->active_data_request == rq) {          /* The request was a pipelined data transfer request */
 
                if (rq->cmd == IDETAPE_READ_REQUEST) {
@@ -2896,8 +2915,11 @@ void idetape_end_request (byte uptodate, ide_hwgroup_t *hwgroup)
                tape->active_data_request=NULL;
 
                if (rq->cmd == IDETAPE_WRITE_REQUEST) {
-                       if (rq->errors)
+                       if (rq->errors) {
                                tape->error_in_pipeline_stage=rq->errors;
+                               if (error == IDETAPE_RQ_ERROR_EOD)
+                                       idetape_abort_pipeline (drive);
+                       }
                        idetape_remove_stage_head (drive);
                }
                
@@ -3078,6 +3100,12 @@ void idetape_do_request (ide_drive_t *drive, struct request *rq, unsigned long b
                        idetape_issue_packet_command (drive,pc,&idetape_pc_intr);
                        return;
                                        
+               case IDETAPE_ABORTED_WRITE_REQUEST:
+                       rq->cmd = IDETAPE_WRITE_REQUEST;
+                       rq->errors = IDETAPE_RQ_ERROR_EOD;
+                       idetape_end_request (1, HWGROUP(drive));
+                       return;
+
                case IDETAPE_PACKET_COMMAND_REQUEST_TYPE1:
                case IDETAPE_PACKET_COMMAND_REQUEST_TYPE2:
 /*
@@ -3282,8 +3310,11 @@ int idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks,char *buffer)
        bytes_read=tape->tape_block_size*(rq_ptr->nr_sectors-rq_ptr->current_nr_sectors);
        rq_ptr->nr_sectors=rq_ptr->current_nr_sectors=0;
        idetape_copy_buffer_from_stage (tape->first_stage,buffer);
-       if (rq_ptr->errors != IDETAPE_RQ_ERROR_FILEMARK)
+       if (rq_ptr->errors != IDETAPE_RQ_ERROR_FILEMARK) {
+               tape->filemark = 0;
                idetape_remove_stage_head (drive);
+       } else
+               tape->filemark = 1;
 #if IDETAPE_DEBUG_BUGS
        if (bytes_read > blocks*tape->tape_block_size) {
                printk ("ide-tape: bug: trying to return more bytes than requested\n");
@@ -3686,7 +3717,7 @@ int idetape_chrdev_read (struct inode *inode, struct file *file, char *buf, int
        ide_drive_t *drive=idetape_chrdev.drive;
        idetape_tape_t *tape=&(drive->tape);
        char *buf_ptr=buf;
-       int bytes_read,temp,actually_read=0;
+       int bytes_read,temp,actually_read=0, original_count = count;
 
 #if IDETAPE_DEBUG_LOG
        printk ("Reached idetape_chrdev_read\n");
@@ -3730,7 +3761,7 @@ int idetape_chrdev_read (struct inode *inode, struct file *file, char *buf, int
        while (count >= tape->data_buffer_size) {
                bytes_read=idetape_add_chrdev_read_request (drive,tape->capabilities.ctl,tape->merge_buffer);
                if (bytes_read <= 0)
-                       return (actually_read);
+                       goto finish;
                memcpy_tofs (buf_ptr,tape->merge_buffer,bytes_read);
                buf_ptr+=bytes_read;count-=bytes_read;actually_read+=bytes_read;
        }
@@ -3738,13 +3769,16 @@ int idetape_chrdev_read (struct inode *inode, struct file *file, char *buf, int
        if (count) {
                bytes_read=idetape_add_chrdev_read_request (drive,tape->capabilities.ctl,tape->merge_buffer);
                if (bytes_read <= 0)
-                       return (actually_read);
+                       goto finish;
                temp=IDETAPE_MIN (count,bytes_read);
                memcpy_tofs (buf_ptr,tape->merge_buffer,temp);
                actually_read+=temp;
                tape->merge_buffer_offset=temp;
                tape->merge_buffer_size=bytes_read-temp;
        }
+finish:
+       if (actually_read < original_count && tape->filemark)
+               idetape_space_over_filemarks (drive, MTFSF, 1);
        return (actually_read);
 }
  
@@ -3817,6 +3851,26 @@ int idetape_chrdev_write (struct inode *inode, struct file *file, const char *bu
        return (actually_written);
 }
 
+static int idetape_pipeline_size (ide_drive_t *drive)
+{
+       idetape_tape_t *tape = &drive->tape;
+       idetape_pipeline_stage_t *stage;
+       struct request *rq;
+       int size = 0;
+
+       idetape_wait_for_pipeline (drive);
+       stage = tape->first_stage;
+       while (stage != NULL) {
+               rq = &stage->rq;
+               size += tape->tape_block_size * (rq->nr_sectors-rq->current_nr_sectors);
+               if (rq->errors == IDETAPE_RQ_ERROR_FILEMARK)
+                       size += tape->tape_block_size;
+               stage = stage->next;
+       }
+       size += tape->merge_buffer_size;
+       return size;
+}
+
 /*
  *     Our character device ioctls.
  *
@@ -3827,17 +3881,7 @@ int idetape_chrdev_write (struct inode *inode, struct file *file, const char *bu
  *
  *     MTIOCTOP -      Refer to idetape_mtioctop for detailed description.
  *
- *     MTIOCGET -      The mt_dsreg field in the returned mtget structure
- *                     will be set to (recommended block size <<
- *                     MT_ST_BLKSIZE_SHIFT) & MT_ST_BLKSIZE_MASK, which
- *                     is currently equal to the size itself.
- *                     The other mtget fields are not supported.
- *
- *                     Note that we do not actually return the tape's
- *                     block size. Rather, we provide the recommended
- *                     number of bytes which should be used as a "user
- *                     block size" with the character device read/write
- *                     functions to maximize throughput.
+ *     MTIOCGET -      Some of the fields are not supported.
  *
  *     MTIOCPOS -      The current tape "position" is returned.
  *                     (A unique number which can be used with the MTSEEK
@@ -3857,7 +3901,7 @@ int idetape_chrdev_ioctl (struct inode *inode, struct file *file, unsigned int c
        struct mtop mtop;
        struct mtget mtget;
        struct mtpos mtpos;
-       int retval;
+       int retval, block_offset = 0;
 
 #if IDETAPE_DEBUG_LOG
        printk ("Reached idetape_chrdev_ioctl, cmd=%u\n",cmd);
@@ -3867,14 +3911,16 @@ int idetape_chrdev_ioctl (struct inode *inode, struct file *file, unsigned int c
                idetape_empty_write_pipeline (drive);
                idetape_flush_tape_buffers (drive);
        }
-
-       if (tape->chrdev_direction == idetape_direction_read && cmd != MTIOCTOP)
-               idetape_discard_read_pipeline (drive);
-       
        pc.buffer=pc.temp_buffer;
        pc.buffer_size=IDETAPE_TEMP_BUFFER_SIZE;
        pc.current_position=pc.temp_buffer;
 
+       if (cmd == MTIOCGET || cmd == MTIOCPOS) {
+               block_offset = idetape_pipeline_size (drive) / tape->tape_block_size;
+               idetape_create_read_position_cmd (&pc);
+               retval=idetape_queue_pc_tail (drive,&pc);
+               if (retval) return (retval);
+       }
        switch (cmd) {
                case MTIOCTOP:
                        retval=verify_area (VERIFY_READ,(char *) arg,sizeof (struct mtop));
@@ -3882,16 +3928,15 @@ int idetape_chrdev_ioctl (struct inode *inode, struct file *file, unsigned int c
                        memcpy_fromfs ((char *) &mtop, (char *) arg, sizeof (struct mtop));
                        return (idetape_mtioctop (drive,mtop.mt_op,mtop.mt_count));
                case MTIOCGET:
+                       memset (&mtget, 0, sizeof (struct mtget));
+                       mtget.mt_blkno = tape->block_address - block_offset;
                        mtget.mt_dsreg=(tape->data_buffer_size << MT_ST_BLKSIZE_SHIFT) & MT_ST_BLKSIZE_MASK;
                        retval=verify_area (VERIFY_WRITE,(char *) arg,sizeof (struct mtget));
                        if (retval) return (retval);
                        memcpy_tofs ((char *) arg,(char *) &mtget, sizeof (struct mtget));
                        return (0);
                case MTIOCPOS:
-                       idetape_create_read_position_cmd (&pc);
-                       retval=idetape_queue_pc_tail (drive,&pc);
-                       if (retval) return (retval);
-                       mtpos.mt_blkno=tape->block_address;
+                       mtpos.mt_blkno = tape->block_address - block_offset;
                        retval=verify_area (VERIFY_WRITE,(char *) arg,sizeof (struct mtpos));
                        if (retval) return (retval);
                        memcpy_tofs ((char *) arg,(char *) &mtpos, sizeof (struct mtpos));
@@ -4052,6 +4097,7 @@ int idetape_space_over_filemarks (ide_drive_t *drive,short mt_op,int mt_count)
                 */
 
                tape->merge_buffer_size=tape->merge_buffer_offset=0;
+               tape->filemark = 0;
                while (tape->first_stage != NULL) {
                        
                        /*
index 971c63ec4ef23c8ce763171479b4c26594c2601f..27f46a6673dcabddc866004afb68554cc67cfb8b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/block/ide-tape.h      Version 1.8 - ALPHA     Sep  26, 1996
+ * linux/drivers/block/ide-tape.h      Version 1.9 - ALPHA     Nov   5, 1996
  *
  * Copyright (C) 1995, 1996 Gadi Oxman <gadio@netvision.net.il>
  */
@@ -466,6 +466,7 @@ typedef struct {
        /* Character device operation */
 
        chrdev_direction_t chrdev_direction;    /* Current character device data transfer direction */
+       int filemark;                           /* Currently on a filemark */
        byte busy;                              /* Device already opened */
 
        /* Device information */
index bedc17b38ed24d479abe83c56ca85a94893fd29e..ddd80004942ebd2d56fa42a3d3f18ef374c9823b 100644 (file)
@@ -811,6 +811,10 @@ static void do_reset1 (ide_drive_t *drive, int  do_not_try_atapi)
         */
        for (unit = 0; unit < MAX_DRIVES; ++unit) {
                ide_drive_t *rdrive = &hwif->drives[unit];
+#ifdef CONFIG_BLK_DEV_IDETAPE
+               if (rdrive->media == ide_tape)
+                       rdrive->tape.reset_issued = 1;
+#endif /* CONFIG_BLK_DEV_IDETAPE */
                rdrive->special.all = 0;
                rdrive->special.b.set_geometry = 1;
                rdrive->special.b.recalibrate  = 1;
index 5c5fdba8475d9577091b910f12eaaca8f81791b5..6df46a8f5d83ac694cdc92a9ca7880ad59ef8910 100644 (file)
@@ -1446,7 +1446,8 @@ static int con_write(struct tty_struct * tty, int from_user,
                 ok = tc && (c >= 32 ||
                             (!utf && !(((disp_ctrl ? CTRL_ALWAYS
                                          : CTRL_ACTION) >> c) & 1)))
-                        && (c != 127 || disp_ctrl);
+                        && (c != 127 || disp_ctrl)
+                       && (c != 128+27);
 
                if (vc_state == ESnormal && ok) {
                        /* Now try to find out how to display it */
@@ -1486,6 +1487,8 @@ static int con_write(struct tty_struct * tty, int from_user,
                 *  of an escape sequence.
                 */
                switch (c) {
+                       case 0:
+                               continue;
                        case 7:
                                if (bell_duration)
                                        kd_mksound(bell_pitch, bell_duration);
index a0531f08c9aaf5c20d8d9b09f5cf7b249fe20bbd..446456a2d4bded26a9d0415ff60bcf6f993c8e93 100644 (file)
@@ -508,8 +508,9 @@ static void do_self(unsigned char value, char up_flag)
 #define A_CFLEX  '^'
 #define A_TILDE  '~'
 #define A_DIAER  '"'
-static unsigned char ret_diacr[] =
-        {A_GRAVE, A_ACUTE, A_CFLEX, A_TILDE, A_DIAER };
+#define A_CEDIL  ','
+static unsigned char ret_diacr[NR_DEAD] =
+        {A_GRAVE, A_ACUTE, A_CFLEX, A_TILDE, A_DIAER, A_CEDIL };
 
 /* If a dead key pressed twice, output a character corresponding to it, */
 /* otherwise just remember the dead key.                               */
index 0737c500a9e2b163f80b6063c7b7b4675dc891f5..63b5dc6850a5c25cd8411988a9047324a5d19842 100644 (file)
@@ -822,8 +822,9 @@ static void do_self(unsigned char value, char up_flag)
 #define A_CFLEX  '^'
 #define A_TILDE  '~'
 #define A_DIAER  '"'
-static unsigned char ret_diacr[] =
-       {A_GRAVE, A_ACUTE, A_CFLEX, A_TILDE, A_DIAER };
+#define A_CEDIL  ','
+static unsigned char ret_diacr[NR_DEAD] =
+       {A_GRAVE, A_ACUTE, A_CFLEX, A_TILDE, A_DIAER, A_CEDIL };
 
 /* If a dead key pressed twice, output a character corresponding to it,        */
 /* otherwise just remember the dead key.                               */
index d44c30e77f33f125b97ddab72ce348b897a30624..82f729fc3bb6e80cc3901dc603c0f208d0a3dbd9 100644 (file)
@@ -67,6 +67,7 @@ extern int ms_bus_mouse_init(void);
 extern int atixl_busmouse_init(void);
 extern int sun_mouse_init(void);
 extern void watchdog_init(void);
+extern void wdt_init(void);
 extern void pcwatchdog_init(void);
 extern int rtc_init(void);
 
@@ -218,7 +219,10 @@ int misc_init(void)
 #endif
 #ifdef CONFIG_SOFT_WATCHDOG
        watchdog_init();
-#endif 
+#endif
+#ifdef CONFIG_WDT
+       wdt_init();
+#endif
 #ifdef CONFIG_PCWATCHDOG
        pcwatchdog_init();
 #endif
index 4c8e7c940a9938156a8efbaefe7ffdd4c64f0cd7..200b95c79401a4b17f2c4df31b80b2b28ac606df 100644 (file)
@@ -237,8 +237,6 @@ int el1_probe(struct device *dev)
 
 static int el1_probe1(struct device *dev, int ioaddr)
 {
-#ifndef MODULE
-
        const char *mname;              /* Vendor name */
        unsigned char station_addr[6];
        int autoirq = 0;
@@ -344,8 +342,6 @@ static int el1_probe1(struct device *dev, int ioaddr)
 
        ether_setup(dev);
 
-#endif /* !MODULE */
-
        return 0;
 }
 
index 36b58bff9e77cfbe789422804ac5dbcf07b0cfe4..0b6a7f0009ddda3a4901bd17395df69e9aa6eb2f 100644 (file)
@@ -634,7 +634,7 @@ vortex_open(struct device *dev)
        /* Switch to register set 7 for normal use. */
        EL3WINDOW(7);
 
-       /* Set reciever mode: presumably accept b-case and phys addr only. */
+       /* Set receiver mode: presumably accept b-case and phys addr only. */
        set_rx_mode(dev);
        outw(StatsEnable, ioaddr + EL3_CMD); /* Turn on statistics. */
 
index a5901fcd9eb229779358069fab745761866d19b0..a49ef6667d9bce58487f96bc6cf9e5006ef8bc08 100644 (file)
@@ -195,6 +195,9 @@ ethif_probe(struct device *dev)
 #ifdef CONFIG_NI52
        && ni52_probe(dev)
 #endif
+#ifdef CONFIG_NI65
+       && ni65_probe(dev)
+#endif
 #ifdef CONFIG_ATARILANCE       /* Lance-based Atari ethernet boards */
        && atarilance_probe(dev)
 #endif
index 0bb45b1a878403f56eb6841cdd8b065fdca73205..9e19cae59fac8fa2c03ebd149926a0480781c115 100644 (file)
@@ -163,12 +163,12 @@ static int eth_change_mtu(struct device *dev, int new_mtu)
 #ifdef CONFIG_FDDI
 
 static int fddi_change_mtu(struct device *dev, int new_mtu)
-       {
+{
        if ((new_mtu < FDDI_K_SNAP_HLEN) || (new_mtu > FDDI_K_SNAP_DLEN))
                return(-EINVAL);
        dev->mtu = new_mtu;
        return(0);
-       }
+}
 
 #endif
 
index 2a32225e2c46f42aa2398b37f57d611190b9c975..75e891477d228beb4c7afddbc47549dd9b1d9205 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ni6510 (am7990 'lance' chip) driver for Linux-net-3
- * BETAcode v0.70 (96/04/07) for 1.3.66 (or later)
+ * BETAcode v0.71 (96/09/29) for 2.0.0 (or later)
  * copyrights (c) 1994,1995,1996 by M.Hipp
  * 
  * This driver can handle the old ni6510 board and the newer ni6510 
  *   and from the original drivers by D.Becker
  *
  * known problems:
- *   on some PCI boards (including my own) the card/board/ISA-bridge has
- *   problems with bus master DMA. This results in lotsa overruns.
- *   It may help to '#define RCV_PARANOIA_CHECK' or try to #undef
- *   the XMT and RCV_VIA_SKB option .. this reduces driver performance.
- *   Or just play with your BIOS options to optimize ISA-DMA access.
- *   Maybe you also wanna play with the LOW_PERFORAMCE and MID_PERFORMANCE
- *   defines -> please report me your experience then
+ *   - on some PCI boards (including my own) the card/board/ISA-bridge has
+ *     problems with bus master DMA. This results in lotsa overruns.
+ *     It may help to '#define RCV_PARANOIA_CHECK' or try to #undef
+ *     the XMT and RCV_VIA_SKB option .. this reduces driver performance.
+ *     Or just play with your BIOS options to optimize ISA-DMA access.
+ *     Maybe you also wanna play with the LOW_PERFORAMCE and MID_PERFORMANCE
+ *     defines -> please report me your experience then
+ *   - Harald reported for ASUS SP3G mainboards, that you should use
+ *     the 'optimal settings' from the user's manual on page 3-12!
  *
  * credits:
  *   thanx to Jason Sullivan for sending me a ni6510 card!
+ *   lot of debug runs with ASUS SP3G Boards (Intel Saturn) by Harald Koenig
  *
  * simple performance test: (486DX-33/Ni6510-EB receives from 486DX4-100/Ni6510-EB)
  *    average: FTP -> 8384421 bytes received in 8.5 seconds
  */
 
 /*
+ * 96.Sept.29: virt_to_bus stuff added for new memory modell
+ * 96.April.29: Added Harald Koenig's Patches (MH)
  * 96.April.13: enhanced error handling .. more tests (MH)
- * 96.April.5/6: a lot of performance tests .. got it stable now (hopefully) (MH)
+ * 96.April.5/6: a lot of performance tests. Got it stable now (hopefully) (MH)
  * 96.April.1: (no joke ;) .. added EtherBlaster and Module support (MH)
  * 96.Feb.19: fixed a few bugs .. cleanups .. tested for 1.3.66 (MH)
  *            hopefully no more 16MB limit
@@ -52,7 +57,7 @@
  *
  * 94.Aug.22: changes in xmit_intr (ack more than one xmitted-packet), ni65_send_packet (p->lock) (MH)
  *
- * 94,July.16: fixed bugs in recv_skb and skb-alloc stuff  (MH)
+ * 94.July.16: fixed bugs in recv_skb and skb-alloc stuff  (MH)
  */
 
 #include <linux/kernel.h>
@@ -84,8 +89,8 @@
  * 'invert' the defines for max. performance. This may cause DMA problems
  * on some boards (e.g on my ASUS SP3G)
  */
-#define XMT_VIA_SKB
-#define RCV_VIA_SKB
+#undef XMT_VIA_SKB
+#undef RCV_VIA_SKB
 #define RCV_PARANOIA_CHECK
 
 #define MID_PERFORMANCE
 #define RMDNUMMASK 0x60000000 /* log2(RMDNUM)<<29 */
 #endif
 
-#if 1
+#if 0
 #define TMDNUM 1
-#define TMDNUMMASK 0x00000000 /* log2(TMDNUM)<<29 */
+#define TMDNUMMASK 0x00000000
 #else
-#define TMDNUM 2
-#define TMDNUMMASK 0x20000000 /* log2(TMDNUM)<<29 */
+#define TMDNUM 4
+#define TMDNUMMASK 0x40000000 /* log2(TMDNUM)<<29 */
 #endif
 
 /* slightly oversized */
@@ -239,7 +244,7 @@ static void ni65_set_performance(struct priv *p)
 {
   writereg(CSR0_STOP | CSR0_CLRALL,CSR0); /* STOP */
 
-  if(!test_bit(1,&cards[p->cardno].config))
+  if( !(cards[p->cardno].config & 0x02) )
     return;
  
   outw(80,PORT+L_ADDRREG);
@@ -487,6 +492,7 @@ static int ni65_probe1(struct device *dev,int ioaddr)
 static void ni65_init_lance(struct priv *p,unsigned char *daddr,int filter,int mode) 
 {
   int i;
+  u32 pib;
 
   writereg(CSR0_CLRALL|CSR0_STOP,CSR0);
 
@@ -497,11 +503,12 @@ static void ni65_init_lance(struct priv *p,unsigned char *daddr,int filter,int m
     p->ib.filter[i] = filter;
   p->ib.mode = mode;
 
-  p->ib.trp = (unsigned long) p->tmdhead | TMDNUMMASK;
-  p->ib.rrp = (unsigned long) p->rmdhead | RMDNUMMASK;
+  p->ib.trp = (u32) virt_to_bus(p->tmdhead) | TMDNUMMASK;
+  p->ib.rrp = (u32) virt_to_bus(p->rmdhead) | RMDNUMMASK;
   writereg(0,CSR3);  /* busmaster/no word-swap */
-  writereg((unsigned short) (((unsigned long) &(p->ib)) & 0xffff),CSR1);
-  writereg((unsigned short) (((unsigned long) &(p->ib))>>16),CSR2);
+  pib = (u32) virt_to_bus(&p->ib);
+  writereg(pib & 0xffff,CSR1);
+  writereg(pib >> 16,CSR2);
 
   writereg(CSR0_INIT,CSR0); /* this changes L_ADDRREG to CSR0 */
 
@@ -540,7 +547,7 @@ static void *ni65_alloc_mem(struct device *dev,char *what,int size,int type)
       return NULL;
     }
   }
-  if( (unsigned long) (ptr+size) > 0x1000000) {
+  if( (u32) virt_to_bus(ptr+size) > 0x1000000) {
     printk("%s: unable to allocate %s memory in lower 16MB!\n",dev->name,what);
     if(type)
       kfree_skb(skb,FREE_WRITE);
@@ -672,7 +679,7 @@ static void ni65_stop_start(struct device *dev,struct priv *p)
 #ifdef XMT_VIA_SKB
       skb_save[i] = p->tmd_skb[i];
 #endif
-      buffer[i] = tmdp->u.buffer;
+      buffer[i] = (u32) bus_to_virt(tmdp->u.buffer);
       blen[i] = tmdp->blen;
       tmdp->u.s.status = 0x0;
     }
@@ -686,10 +693,10 @@ static void ni65_stop_start(struct device *dev,struct priv *p)
 
     for(i=0;i<TMDNUM;i++) {
       int num = (i + p->tmdlast) & (TMDNUM-1);
-      p->tmdhead[i].u.buffer = buffer[num]; /* status is part of buffer field */
+      p->tmdhead[i].u.buffer = (u32) virt_to_bus((char *)buffer[num]); /* status is part of buffer field */
       p->tmdhead[i].blen = blen[num];
       if(p->tmdhead[i].u.s.status & XMIT_OWN) {
-        p->tmdnum = (p->tmdnum + 1) & (TMDNUM-1);
+         p->tmdnum = (p->tmdnum + 1) & (TMDNUM-1);
          p->xmit_queued = 1;
         writedatareg(CSR0_TDMD | CSR0_INEA | csr0);
       }
@@ -749,9 +756,9 @@ static int ni65_lance_reinit(struct device *dev)
    {
      struct rmd *rmdp = p->rmdhead + i;
 #ifdef RCV_VIA_SKB
-     rmdp->u.buffer = (unsigned long) p->recv_skb[i]->data;
+     rmdp->u.buffer = (u32) virt_to_bus(p->recv_skb[i]->data);
 #else
-     rmdp->u.buffer = (unsigned long) p->recvbounce[i];
+     rmdp->u.buffer = (u32) virt_to_bus(p->recvbounce[i]);
 #endif
      rmdp->blen = -(R_BUF_SIZE-8);
      rmdp->mlen = 0;
@@ -822,8 +829,8 @@ static void ni65_interrupt(int irq, void * dev_id, struct pt_regs * regs)
     if(csr0 & CSR0_ERR)
     {
       struct priv *p = (struct priv *) dev->priv;
-      if (debuglevel > 1)
-       printk("%s: general error: %04x.\n",dev->name,csr0);
+      if(debuglevel > 1)
+        printk("%s: general error: %04x.\n",dev->name,csr0);
       if(csr0 & CSR0_BABL)
         p->stats.tx_errors++;
       if(csr0 & CSR0_MISS) {
@@ -834,8 +841,8 @@ static void ni65_interrupt(int irq, void * dev_id, struct pt_regs * regs)
         p->stats.rx_errors++;
       }
       if(csr0 & CSR0_MERR) {
-       if (debuglevel > 1)
-         printk("%s: Ooops .. memory error: %04x.\n",dev->name,csr0);
+        if(debuglevel > 1)
+          printk("%s: Ooops .. memory error: %04x.\n",dev->name,csr0);
         ni65_stop_start(dev,p);
       }
     }
@@ -887,7 +894,7 @@ static void ni65_interrupt(int irq, void * dev_id, struct pt_regs * regs)
 }
 #endif
 
-  if(csr0 & (CSR0_RXON | CSR0_TXON) != (CSR0_RXON | CSR0_TXON) ) {
+  if( (csr0 & (CSR0_RXON | CSR0_TXON)) != (CSR0_RXON | CSR0_TXON) ) {
     printk("%s: RX or TX was offline -> restart\n",dev->name);
     ni65_stop_start(dev,p);
   }
@@ -1024,7 +1031,7 @@ static void ni65_recv_intr(struct device *dev,int csr0)
           struct sk_buff *skb1 = p->recv_skb[p->rmdnum];
           skb_put(skb,R_BUF_SIZE);
           p->recv_skb[p->rmdnum] = skb;
-          rmdp->u.buffer = (unsigned long) skb->data;
+          rmdp->u.buffer = (u32) virt_to_bus(skb->data);
           skb = skb1;
           skb_trim(skb,len);
         }
@@ -1068,14 +1075,12 @@ static int ni65_send_packet(struct sk_buff *skb, struct device *dev)
       return 1;
 
     printk(KERN_ERR "%s: xmitter timed out, try to restart!\n",dev->name);
-#if 0
 {
   int i;
   for(i=0;i<TMDNUM;i++)
     printk("%02x ",p->tmdhead[i].u.s.status);
   printk("\n");
 }
-#endif
     ni65_lance_reinit(dev);
     dev->tbusy=0;
     dev->trans_start = jiffies;
@@ -1115,7 +1120,7 @@ static int ni65_send_packet(struct sk_buff *skb, struct device *dev)
       cli();
 
       tmdp = p->tmdhead + p->tmdnum;
-      tmdp->u.buffer = (unsigned long ) p->tmdbounce[p->tmdbouncenum];
+      tmdp->u.buffer = (u32) virt_to_bus(p->tmdbounce[p->tmdbouncenum]);
       p->tmdbouncenum = (p->tmdbouncenum + 1) & (TMDNUM - 1);
 
 #ifdef XMT_VIA_SKB
@@ -1125,7 +1130,7 @@ static int ni65_send_packet(struct sk_buff *skb, struct device *dev)
       cli();
  
       tmdp = p->tmdhead + p->tmdnum;
-      tmdp->u.buffer = (unsigned long) skb->data;
+      tmdp->u.buffer = (u32) virt_to_bus(skb->data);
       p->tmd_skb[p->tmdnum] = skb;
     }
 #endif
@@ -1178,9 +1183,9 @@ static struct device dev_ni65 = {
   0, 0, 0, NULL, ni65_probe };
 
 /* set: io,irq,dma or set it when calling insmod */
-int irq=0;
-int io=0;
-int dma=0;
+static int irq=0;
+static int io=0;
+static int dma=0;
 
 int init_module(void)
 {
index 013bcf75c7e2cb23227d5612e4e3ebfbe2b4faeb..64380951e5aff70aad804dba47c0a139253df4ca 100644 (file)
@@ -1,6 +1,6 @@
 /* am7990 (lance) definitions
  * 
- * This is a extension to the Linux operating system, and is covered by
+ * This is an extension to the Linux operating system, and is covered by
  * same Gnu Public License that covers that work.
  * 
  * Michael Hipp
@@ -92,16 +92,16 @@ struct init_block
   unsigned char eaddr[6];
   unsigned char filter[8];
   /* bit 29-31: number of rmd's (power of 2) */
-  unsigned long rrp;   /* receive ring pointer (align 8) */
+  u32 rrp;   /* receive ring pointer (align 8) */
   /* bit 29-31: number of tmd's (power of 2) */
-  unsigned long trp;   /* transmit ring pointer (align 8) */
+  u32 trp;   /* transmit ring pointer (align 8) */
 };
 
 struct rmd /* Receive Message Descriptor */
 { 
   union
   {
-    volatile unsigned long buffer;
+    volatile u32 buffer;
     struct 
     {
       volatile unsigned char dummy[3];
@@ -116,7 +116,7 @@ struct tmd
 {
   union 
   {
-    volatile unsigned long buffer;
+    volatile u32 buffer;
     struct 
     {
       volatile unsigned char dummy[3];
index 0da8bd638bf78e9f23114204368b861ad0661fb5..7eb8adbe83d03e2c86bdf56c3de8e16bd8a01515 100644 (file)
@@ -1145,7 +1145,7 @@ static void set_multicast_list(struct device *dev)
                        tp->tx_skbuff[entry] = 0;
                        /* Put the setup frame on the Tx list. */
                        tp->tx_ring[entry].length = 192 |
-                             (entry == TX_RING_SIZE-1 ? 0x0a000000 : 0x08000);
+                             (entry == TX_RING_SIZE-1 ? 0x0a000000 : 0x08000000);
                        tp->tx_ring[entry].buffer1 = virt_to_bus((char *)tp->setup_frame);
                        tp->tx_ring[entry].buffer2 = 0;
                        tp->tx_ring[entry].status = TRING_OWN;
index 38089be8dcd74e93751f96e367732066994be6f7..723c34b31513690cc5525140ba716fc028a62054 100644 (file)
@@ -70,6 +70,7 @@ struct pci_dev_info dev_info[] = {
        DEVICE( DEC,            DEC_FDDI,       "DEFPA"),
        DEVICE( DEC,            DEC_TULIP_PLUS, "DC21041"),
        DEVICE( DEC,            DEC_21052_AB,   "DC21052-AB"),
+       DEVICE( DEC,            DEC_21152_AA,   "DC21152-AA"),
        DEVICE( CIRRUS,         CIRRUS_5430,    "GD 5430"),
        DEVICE( CIRRUS,         CIRRUS_5434_4,  "GD 5434"),
        DEVICE( CIRRUS,         CIRRUS_5434_8,  "GD 5434"),
index d52a3b574a00e08420096f4721e658876d28d12e..b5d3c42eada5872c39cd63d9096a1a207fbfb1c6 100644 (file)
@@ -735,8 +735,9 @@ static void do_self(unsigned char value, char up_flag)
 #define A_CFLEX  '^'
 #define A_TILDE  '~'
 #define A_DIAER  '"'
-static unsigned char ret_diacr[] =
-       {A_GRAVE, A_ACUTE, A_CFLEX, A_TILDE, A_DIAER };
+#define A_CEDIL  ','
+static unsigned char ret_diacr[NR_DEAD] =
+       {A_GRAVE, A_ACUTE, A_CFLEX, A_TILDE, A_DIAER, A_CEDIL };
 
 /* If a dead key pressed twice, output a character corresponding to it,        */
 /* otherwise just remember the dead key.                               */
index 6daa16e76c84f277ad1039b634f5d728dbf585b1..2054a9cd9029215cc1092cdc8543cc88232b0671 100644 (file)
@@ -1027,7 +1027,7 @@ int aha1542_detect(Scsi_Host_Template * tpnt)
                    shpnt->dma_channel = dma_chan;
                    shpnt->irq = irq_level;
                    HOSTDATA(shpnt)->bios_translation  = trans;
-                   if(trans == 2
+                   if(trans == BIOS_TRANSLATION_25563
                      printk("aha1542.c: Using extended bios translation\n");
                    HOSTDATA(shpnt)->aha1542_last_mbi_used  = (2*AHA1542_MAILBOXES - 1);
                    HOSTDATA(shpnt)->aha1542_last_mbo_used  = (AHA1542_MAILBOXES - 1);
@@ -1300,8 +1300,8 @@ int aha1542_biosparam(Scsi_Disk * disk, kdev_t dev, int * ip)
   int size = disk->capacity;
 
   translation_algorithm = HOSTDATA(disk->device->host)->bios_translation;
-  /* Should this be > 1024, or >= 1024?  Enquiring minds want to know. */
-  if((size>>11) > 1024 && translation_algorithm == 2) {
+
+  if((size>>11) > 1024 && translation_algorithm == BIOS_TRANSLATION_25563) {
     /* Please verify that this is the same as what DOS returns */
     ip[0] = 255;
     ip[1] = 63;
@@ -1310,8 +1310,8 @@ int aha1542_biosparam(Scsi_Disk * disk, kdev_t dev, int * ip)
     ip[0] = 64;
     ip[1] = 32;
     ip[2] = size >> 11;
-  };
-/*  if (ip[2] >= 1024) ip[2] = 1024; */
+  }
+
   return 0;
 }
 
index 1f4f245a73c9fac8327eb8ff473d58029a40ca91..76fe3f4c24dbeccf3462e6d6e4e4d639e890ff44 100644 (file)
@@ -1,6 +1,6 @@
 /* fdomain.c -- Future Domain TMC-16x0 SCSI driver
  * Created: Sun May  3 18:53:19 1992 by faith@cs.unc.edu
- * Revised: Thu Aug  8 14:58:51 1996 by r.faith@ieee.org
+ * Revised: Sat Nov  2 09:27:47 1996 by root@cs.unc.edu
  * Author: Rickard E. Faith, faith@cs.unc.edu
  * Copyright 1992, 1993, 1994, 1995, 1996 Rickard E. Faith
  *
@@ -461,7 +461,7 @@ struct signature {
    { "IBM F1 P2 BIOS v1.0104/29/93",                        5, 28,  3, -1, 0 },
    { "Future Domain Corp. V1.0008/18/93",                   5, 33,  3,  4, 0 },
    { "Future Domain Corp. V1.0008/18/93",                  26, 33,  3,  4, 1 },
-   { "Adaptec AHA-2920 PCI-SCSI Card",                     42, 31,  3,  0, 1 },
+   { "Adaptec AHA-2920 PCI-SCSI Card",                     42, 31,  3, -1, 1 },
                                /* This next signature may not be a 3.5 bios */
    { "Future Domain Corp. V2.0108/18/93",                   5, 33,  3,  5, 0 },
    { "FUTURE DOMAIN CORP.  V3.5008/18/93",                  5, 34,  3,  5, 0 },
index 0fa74718cf38c8d35623a0b0243c9672f6f0907c..a77fe820f8c71f47de260297cf8aafe92e62319f 100644 (file)
@@ -224,12 +224,6 @@ static Scsi_Host_Template builtin_scsi_hosts[] =
 #ifdef CONFIG_SCSI_ADVANSYS
        ADVANSYS,
 #endif
-#ifdef CONFIG_SCSI_EATA_DMA
-    EATA_DMA,
-#endif
-#ifdef CONFIG_SCSI_EATA_PIO
-    EATA_PIO,
-#endif
 /* BusLogic must come before aha1542.c */
 #ifdef CONFIG_SCSI_BUSLOGIC
     BUSLOGIC,
@@ -288,6 +282,12 @@ static Scsi_Host_Template builtin_scsi_hosts[] =
 #ifdef CONFIG_SCSI_NCR53C8XX
     NCR53C8XX,
 #endif
+#ifdef CONFIG_SCSI_EATA_DMA
+    EATA_DMA,
+#endif
+#ifdef CONFIG_SCSI_EATA_PIO
+    EATA_PIO,
+#endif
 #ifdef CONFIG_SCSI_7000FASST
     WD7000,
 #endif
index 15247acd0a731c61e07292d2896e1364bad1d7ef..e45d80f4e754724f84275c9e82436dc6a38f2a61 100644 (file)
@@ -54,22 +54,28 @@ int scsicam_bios_param (Disk *disk, /* SCSI disk */
     if (!(bh = bread(MKDEV(MAJOR(dev), MINOR(dev)&~0xf), 0, 1024)))
        return -1;
 
-#ifdef DEBUG
-       printk ("scsicam_bios_param : trying existing mapping\n");
-#endif
+    /* try to infer mapping from partition table */
     ret_code = partsize (bh, (unsigned long) size, (unsigned int *) ip + 2, 
        (unsigned int *) ip + 0, (unsigned int *) ip + 1);
     brelse (bh);
 
     if (ret_code == -1) {
-#ifdef DEBUG
-       printk ("scsicam_bios_param : trying optimal mapping\n");
-#endif
+       /* pick some standard mapping with at most 1024 cylinders,
+          and at most 62 sectors per track - this works up to
+          7905 MB */
        ret_code = setsize ((unsigned long) size, (unsigned int *) ip + 2, 
            (unsigned int *) ip + 0, (unsigned int *) ip + 1);
     }
 
-    return ret_code;
+    /* if something went wrong, then apparently we have to return
+       a geometry with more than 1024 cylinders */
+    if (ret_code || ip[0] > 255 || ip[1] > 63) {
+        ip[0] = 64;
+        ip[1] = 32;
+        ip[2] = size / (ip[0] * ip[1]);
+    }
+
+    return 0;
 }
 
 /*
index 1beb6f8cd4dc08a868389408c72536dad97fdde9..c8e923205768c7a9751182adfac1052d092f044a 100644 (file)
@@ -126,7 +126,7 @@ smb_put_inode(struct inode *inode)
        struct smb_inode_info *info = SMB_INOP(inode);
 
        int opened        = finfo->opened;
-       int mtime         = finfo->mtime;
+       int mtime         = inode->i_mtime;
        int file_id       = finfo->fileid;
        int isdir         = S_ISDIR(inode->i_mode);
        unsigned long ino = inode->i_ino;
index 3757ddb69631da4fa2aaf797be98090218e208f5..57a5323e150761d7db3bcfb8cdef5525e28c8d9d 100644 (file)
@@ -352,8 +352,9 @@ extern unsigned short plain_map[NR_KEYS];
 #define K_DCIRCM       K(KT_DEAD,2)
 #define K_DTILDE       K(KT_DEAD,3)
 #define K_DDIERE       K(KT_DEAD,4)
+#define K_DCEDIL       K(KT_DEAD,5)
 
-#define NR_DEAD                5
+#define NR_DEAD                6
 
 #define K_DOWN         K(KT_CUR,0)
 #define K_LEFT         K(KT_CUR,1)
index cff2d9769ee31465fc0dfe1297752d4a2d233e1d..9735bc630ee9b9db83e18a756bb24376ca16cba3 100644 (file)
@@ -28,7 +28,7 @@ extern inline void wait_on_buffer(struct buffer_head * bh)
 
 extern inline void lock_buffer(struct buffer_head * bh)
 {
-       if (set_bit(BH_Lock, &bh->b_state))
+       while (set_bit(BH_Lock, &bh->b_state))
                __wait_on_buffer(bh);
 }
 
index 0cf05e266e33ded43261ff4fe116efb0432674e6..fb6eea7e15822635c49fb8ab969f43d4c76bc06e 100644 (file)
 #define PCI_DEVICE_ID_DEC_FDDI         0x000F
 #define PCI_DEVICE_ID_DEC_TULIP_PLUS   0x0014
 #define PCI_DEVICE_ID_DEC_21052_AB     0x0021
+#define PCI_DEVICE_ID_DEC_21152_AA     0x0024
 
 #define PCI_VENDOR_ID_CIRRUS           0x1013
 #define PCI_DEVICE_ID_CIRRUS_5430      0x00a0
index 35716e971560f3f4a5006603d184a3589eebfa53..686b2e7898f80a769f4916712401e81d965a4628 100644 (file)
@@ -252,8 +252,8 @@ struct sock
        unsigned char           max_ack_backlog;
        unsigned char           priority;
        unsigned char           debug;
-       unsigned int            rcvbuf;
-       unsigned int            sndbuf;
+       int                     rcvbuf;
+       int                     sndbuf;
        unsigned short          type;
        unsigned char           localroute;     /* Route locally only */
 #ifdef CONFIG_AX25
index 540162e3c88135843f31259b6e5ba19046fc86f7..3ef52cdef884e1efa20baf882162fa16f8629e8a 100644 (file)
@@ -253,7 +253,7 @@ int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs)
        p->it_real_incr = p->it_virt_incr = p->it_prof_incr = 0;
        init_timer(&p->real_timer);
        p->real_timer.data = (unsigned long) p;
-       p->leader = 0;          /* process leadership doesn't inherit */
+       p->leader = 0;          /* session leadership doesn't inherit */
        p->tty_old_pgrp = 0;
        p->utime = p->stime = 0;
        p->cutime = p->cstime = 0;
index 60ef256b3b2975b2e971ad982b815d2884989ce3..f22bbce757d97b288fce4b21dda0ec644e5518cf 100644 (file)
@@ -267,7 +267,7 @@ void root_selection(void)
                                  (((port_info[port_no].designated_cost
                                     + port_info[port_no].path_cost
                                     )
-                                   ==
+                                   <
                                    (port_info[root_port].designated_cost
                                     + port_info[root_port].path_cost
                                     )            /* (4.6.8.3.1(2)) */
index ad1f067c196a52652e3571233d468f8629787520..6616243d09af0152ffefc23fa6a8589178588e17 100644 (file)
@@ -1110,7 +1110,7 @@ static int dev_ifsioc(void *arg, unsigned int getset)
 
 #ifdef CONFIG_NET_ALIAS
                                if (net_alias_is(dev))
-                               net_alias_dev_rehash(dev ,&ifr.ifr_addr);
+                                       net_alias_dev_rehash(dev ,&ifr.ifr_addr);
 #endif
                                dev->pa_addr = new_pa_addr;
                                dev->family = new_family;
@@ -1200,7 +1200,7 @@ static int dev_ifsioc(void *arg, unsigned int getset)
                case SIOCSIFMTU:        /* Set the MTU of a device */
                
                        if (dev->change_mtu)
-                               ret = (*dev->change_mtu)(dev, ifr.ifr_mtu);
+                               ret = dev->change_mtu(dev, ifr.ifr_mtu);
                        else
                        {
                                /*
@@ -1367,7 +1367,6 @@ int dev_ioctl(unsigned int cmd, void *arg)
  *
  */
 extern int lance_init(void);
-extern int ni65_init(void);
 extern int pi_init(void);
 extern void sdla_setup(void);
 extern int dlci_setup(void);
@@ -1398,9 +1397,6 @@ int net_dev_init(void)
 #if defined(CONFIG_LANCE)
        lance_init();
 #endif
-#if defined(CONFIG_NI65)
-       ni65_init();
-#endif
 #if defined(CONFIG_PI)
        pi_init();
 #endif 
index 1a825cd3d9b412515dab7db2e56659cf1f36f3db..1aeea41f8d61f9e108dce1ecb36ada2108548631 100644 (file)
@@ -38,6 +38,7 @@
  *                                     path MTU bug.
  *             Thomas Quinot   :       ICMP Dest Unreach codes up to 15 are
  *                                     valid (RFC 1812).
+ *             Alan Cox        :       Spoofing and junk icmp protections.
  *
  *
  * RFC1122 (Host Requirements -- Comm. Layer) Status:
@@ -639,6 +640,7 @@ static void icmp_unreach(struct icmphdr *icmph, struct sk_buff *skb, struct devi
        int hash;
        struct inet_protocol *ipprot;
        unsigned char *dp;      
+       int match_addr=0;
        
        iph = (struct iphdr *) (icmph + 1);
        
@@ -655,8 +657,9 @@ static void icmp_unreach(struct icmphdr *icmph, struct sk_buff *skb, struct devi
                        case ICMP_PROT_UNREACH:
 /*                             printk(KERN_INFO "ICMP: %s:%d: protocol unreachable.\n",
                                        in_ntoa(iph->daddr), (int)iph->protocol);*/
-                               break;
+                       /* Drop through */
                        case ICMP_PORT_UNREACH:
+                               match_addr=1;
                                break;
                        case ICMP_FRAG_NEEDED:
 #ifdef CONFIG_NO_PATH_MTU_DISCOVERY
@@ -747,42 +750,46 @@ static void icmp_unreach(struct icmphdr *icmph, struct sk_buff *skb, struct devi
         *      RFC 1122: 3.2.2 MUST extract the protocol ID from the passed header.
         *      RFC 1122: 3.2.2.1 MUST pass ICMP unreach messages to the transport layer.
         *      RFC 1122: 3.2.2.2 MUST pass ICMP time expired messages to transport layer.
-        */
-
-       /*
-        *      Get the protocol(s). 
-        */
-        
-       hash = iph->protocol & (MAX_INET_PROTOS -1);
-
-       /*
-        *      This can't change while we are doing it. 
         *
-        *      FIXME: Deliver to appropriate raw sockets too.
+        *      Rule: Require port unreachable and protocol unreachable come
+        *              from the host in question. Stop junk spoofs.
         */
-        
-       ipprot = (struct inet_protocol *) inet_protos[hash];
-       while(ipprot != NULL) 
-       {
-               struct inet_protocol *nextip;
-
-               nextip = (struct inet_protocol *) ipprot->next;
        
-               /* 
-                *      Pass it off to everyone who wants it. 
+       if(!match_addr || saddr == iph->daddr)
+       {
+               /*
+                *      Get the protocol(s). 
                 */
+        
+               hash = iph->protocol & (MAX_INET_PROTOS -1);
 
-               /* RFC1122: OK. Passes appropriate ICMP errors to the */
-               /* appropriate protocol layer (MUST), as per 3.2.2. */
-
-               if (iph->protocol == ipprot->protocol && ipprot->err_handler) 
+               /*
+                *      This can't change while we are doing it. 
+                */
+        
+               ipprot = (struct inet_protocol *) inet_protos[hash];
+               while(ipprot != NULL) 
                {
-                       ipprot->err_handler(icmph->type, icmph->code, dp,
+                       struct inet_protocol *nextip;
+       
+                       nextip = (struct inet_protocol *) ipprot->next;
+               
+                       /* 
+                        *      Pass it off to everyone who wants it. 
+                        */
+       
+                       /* RFC1122: OK. Passes appropriate ICMP errors to the */
+                       /* appropriate protocol layer (MUST), as per 3.2.2. */
+       
+                       if (iph->protocol == ipprot->protocol && ipprot->err_handler) 
+                       {
+                               ipprot->err_handler(icmph->type, icmph->code, dp,
                                            iph->daddr, iph->saddr, ipprot);
-               }
+                       }
 
-               ipprot = nextip;
-       }
+                       ipprot = nextip;
+               }
+       }
        kfree_skb(skb, FREE_READ);
 }
 
index e27ae0c8384e70d8e36d0fcac70facacadd32ebb..e6f1fde3864bce684bf413642c971bba53d53c02 100644 (file)
@@ -2058,21 +2058,6 @@ static int tcp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len)
 
        sk->mtu = min(sk->mtu, dev->mtu - sizeof(struct iphdr) - sizeof(struct tcphdr));
 
-#ifdef CONFIG_SKIP
-
-       /*
-        *      SKIP devices set their MTU to 65535. This is so they can take packets
-        *      unfragmented to security process then fragment. They could lie to the
-        *      TCP layer about a suitable MTU, but it's easier to let skip sort it out
-        *      simply because the final package we want unfragmented is going to be
-        *
-        *      [IPHDR][IPSP][Security data][Modified TCP data][Security data]
-        */
-
-       if(skip_pick_mtu!=NULL)         /* If SKIP is loaded.. */
-               sk->mtu=skip_pick_mtu(sk->mtu,dev);
-#endif
-
        /*
         *      Put in the TCP options to say MTU.
         */