]> git.neil.brown.name Git - history.git/commitdiff
Linux 2.2.13pre12 2.2.13pre12
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:19:54 +0000 (15:19 -0500)
committerAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:19:54 +0000 (15:19 -0500)
o Sktr driver should now work (Adam Fritzler)

20 files changed:
Makefile
arch/alpha/config.in
arch/alpha/kernel/Makefile
arch/alpha/kernel/alpha_ksyms.c
arch/alpha/kernel/bios32.c
arch/alpha/kernel/head.S
arch/alpha/kernel/process.c
arch/alpha/kernel/proto.h
arch/alpha/kernel/setup.c
arch/alpha/kernel/sys_dp264.c
arch/alpha/kernel/sys_takara.c
arch/alpha/math-emu/fp-emul.c
arch/alpha/math-emu/sfp-machine.h
drivers/block/ide-cd.h
drivers/net/sktr.c
drivers/net/sktr.h
include/asm-alpha/delay.h
include/asm-alpha/hwrpb.h
include/asm-alpha/irq.h
include/linux/pci.h

index 883f368207c9fb4bfc2a7e09355385136b7b8855..dc9006b8f57d5b5c0962b9ed225ccfd5fc587656 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 2
 SUBLEVEL = 13
-EXTRAVERSION = pre11
+EXTRAVERSION = pre12
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
index e9e2f15b06a4c1e4596d63d16f3fbc14195365a9..4a0da0cbcb3044d30a2005a9e34921a05c1f6737 100644 (file)
@@ -33,7 +33,6 @@ choice 'Alpha system type' \
         EB64+                  CONFIG_ALPHA_EB64P              \
         EB66                   CONFIG_ALPHA_EB66               \
         EB66+                  CONFIG_ALPHA_EB66P              \
-        Eiger                  CONFIG_ALPHA_EIGER              \
         Jensen                 CONFIG_ALPHA_JENSEN             \
         LX164                  CONFIG_ALPHA_LX164              \
         Miata                  CONFIG_ALPHA_MIATA              \
@@ -118,7 +117,7 @@ then
        define_bool CONFIG_ALPHA_EV5 y
        define_bool CONFIG_ALPHA_PYXIS y
 fi
-if [ "$CONFIG_ALPHA_DP264" = "y" -o "$CONFIG_ALPHA_EIGER" = "y" ]
+if [ "$CONFIG_ALPHA_DP264" = "y" ]
 then
        define_bool CONFIG_PCI y
        define_bool CONFIG_ALPHA_EV6 y
@@ -148,8 +147,7 @@ if [ "$CONFIG_ALPHA_CABRIOLET" = "y" -o "$CONFIG_ALPHA_AVANTI" = "y" \
        -o "$CONFIG_ALPHA_SABLE" = "y" -o "$CONFIG_ALPHA_MIATA" = "y" \
        -o "$CONFIG_ALPHA_NORITAKE" = "y" -o "$CONFIG_ALPHA_PC164" = "y" \
        -o "$CONFIG_ALPHA_LX164" = "y" -o "$CONFIG_ALPHA_SX164" = "y" \
-       -o "$CONFIG_ALPHA_DP264" = "y" -o "$CONFIG_ALPHA_RAWHIDE" = "y" \
-       -o "$CONFIG_ALPHA_EIGER" = "y" ]
+       -o "$CONFIG_ALPHA_DP264" = "y" -o "$CONFIG_ALPHA_RAWHIDE" = "y" ]
 then
   bool 'Use SRM as bootloader' CONFIG_ALPHA_SRM
   if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
index f65d3e68d5a0819bc5d35cc7db25ebbf5cc3c9cf..9b1553cfe580e62954e60d6bd7d26f0500628f10 100644 (file)
@@ -64,7 +64,7 @@ endif
 ifneq ($(CONFIG_ALPHA_CABRIOLET)$(CONFIG_ALPHA_EB164)$(CONFIG_ALPHA_EB66P)$(CONFIG_ALPHA_LX164)$(CONFIG_ALPHA_PC164),)
 O_OBJS   += sys_cabriolet.o
 endif
-ifneq ($(CONFIG_ALPHA_DP264)$(CONFIG_ALPHA_EIGER),)
+ifdef CONFIG_ALPHA_DP264
 O_OBJS   += sys_dp264.o
 endif
 ifneq ($(CONFIG_ALPHA_EB64P)$(CONFIG_ALPHA_EB66),)
index b79ff1f7ec3f6224e3ddda791714d07ffd14b360..bfc2248db7eb24c1d9a66e56203d9dcc5564a2ab 100644 (file)
@@ -30,7 +30,6 @@
 #include <asm/machvec.h>
 #include <asm/pgtable.h>
 #include <asm/semaphore.h>
-#include <asm/delay.h>
 
 #define __KERNEL_SYSCALLS__
 #include <asm/unistd.h>
@@ -99,7 +98,6 @@ EXPORT_SYMBOL(__memcpy);
 EXPORT_SYMBOL(__memset);
 EXPORT_SYMBOL(__memsetw);
 EXPORT_SYMBOL(__constant_c_memset);
-EXPORT_SYMBOL(___delay);
 
 EXPORT_SYMBOL(dump_thread);
 EXPORT_SYMBOL(dump_fpu);
index 2a0394781f365418bf801e3481e338006a198a8e..1c7823397b7ff6b70a08b79c907e80c0b6689600 100644 (file)
@@ -639,11 +639,11 @@ layout_dev(struct pci_dev *dev)
                                /* Bypass hi reg in the loop.  */
                                dev->base_address[++idx] = 0;
 
-                               DBG_DEVS(("bios32 WARNING: "
-                                         "handling 64-bit device in "
-                                         "slot %d, function %d: \n",
-                                         PCI_SLOT(dev->devfn),
-                                         PCI_FUNC(dev->devfn)));
+                               printk("bios32 WARNING: "
+                                      "handling 64-bit device in "
+                                      "slot %d, function %d: \n",
+                                      PCI_SLOT(dev->devfn),
+                                      PCI_FUNC(dev->devfn));
                        }
 
                        DBG_DEVS(("layout_dev: dev 0x%x MEM @ 0x%lx (0x%x)\n",
index f330847443b7e90e330f2f4a11ebf98c1eb9578c..3b004b7f615e50529b82fbaf9c2e5585faee0c90 100644 (file)
@@ -95,21 +95,3 @@ halt:
        .prologue 0
        call_pal PAL_halt
        .end    halt
-
-       #
-       # Having the delay loop out of line guarantees that we wont
-       # run into weird alignment conditions (on new processors)
-       # that vary the speed of the loop.
-       #
-       .align 5
-       .globl  ___delay
-       .ent    ___delay
-___delay:
-       .set noat
-       .frame  $30,0,$28,0
-       .prologue 0
-1:     subq    $0,1,$0
-       bge     $0,1b
-       ret     $31,($28),0
-       .set at
-       .end    ___delay
index 0140f2ce64e283acd025cf19854335c55f55b65e..19109d12e1a12ca385f63de9007b52c7296f95a6 100644 (file)
@@ -117,46 +117,58 @@ sys_idle(void)
        }
 }
 
-struct halt_info {
-       int     mode;
-       char *  restart_cmd;
-};
-
-static void
-halt_processor(void * generic_ptr)
+void
+generic_kill_arch (int mode, char *restart_cmd)
 {
-       struct percpu_struct * cpup;
-       struct halt_info * how = (struct halt_info *)generic_ptr;
-       unsigned long *flags, dummy = 0;
-       int cpuid = smp_processor_id();
-
-       /* No point in taking interrupts anymore. */
-       cli();
+       /* The following currently only has any effect on SRM.  We should
+          fix MILO to understand it.  Should be pretty easy.  Also we can
+          support RESTART2 via the ipc_buffer machinations pictured below,
+          which SRM ignores.  */
 
        if (alpha_using_srm) {
+               struct percpu_struct *cpup;
+               unsigned long flags;
+       
                cpup = (struct percpu_struct *)
-                       ((unsigned long)hwrpb + hwrpb->processor_offset
-                        + hwrpb->processor_size * cpuid);
-               flags = &cpup->flags;
-       } else
-               flags = &dummy;
+                 ((unsigned long)hwrpb + hwrpb->processor_offset);
 
-       /* Clear reason to "default"; clear "bootstrap in progress". */
-       *flags &= ~0x00ff0001UL;
+               flags = cpup->flags;
 
-#ifdef __SMP__
-       /* Secondaries halt here. */
-       if (cpuid != smp_boot_cpuid) {
-               *flags |= 0x00040000UL;
-               clear_bit(cpuid, &cpu_present_mask);
-               halt();
+               /* Clear reason to "default"; clear "bootstrap in progress". */
+               flags &= ~0x00ff0001UL;
+
+               if (mode == LINUX_REBOOT_CMD_RESTART) {
+                       if (!restart_cmd) {
+                               flags |= 0x00020000UL; /* "cold bootstrap" */
+                               cpup->ipc_buffer[0] = 0;
+                       } else {
+                               flags |=  0x00030000UL; /* "warm bootstrap" */
+                               strncpy((char *)cpup->ipc_buffer, restart_cmd,
+                                       sizeof(cpup->ipc_buffer));
+                       }
+               } else {
+                       flags |=  0x00040000UL; /* "remain halted" */
+               }
+                       
+               cpup->flags = flags;                                           
+               mb();                                           
+
+               reset_for_srm();
+               set_hae(srm_hae);
+
+#ifdef CONFIG_DUMMY_CONSOLE
+               /* This has the effect of reseting the VGA video origin.  */
+               take_over_console(&dummy_con, 0, MAX_NR_CONSOLES-1, 1);
+#endif
        }
-#endif /* __SMP__ */
+
 #ifdef CONFIG_RTC
        /* Reset rtc to defaults.  */
        {
                unsigned char control;
 
+               cli();
+
                /* Reset periodic interrupt frequency.  */
                CMOS_WRITE(0x26, RTC_FREQ_SELECT);
 
@@ -165,53 +177,22 @@ halt_processor(void * generic_ptr)
                control |= RTC_PIE;
                CMOS_WRITE(control, RTC_CONTROL);       
                CMOS_READ(RTC_INTR_FLAGS);
-       }
-#endif /* CONFIG_RTC */
-       if (alpha_using_srm) {
-               if (how->mode == LINUX_REBOOT_CMD_RESTART) {
-                       if (!how->restart_cmd) {
-                               *flags |= 0x00020000UL; /* "cold bootstrap" */
-                               cpup->ipc_buffer[0] = 0;
-                       } else {
-                               *flags |=  0x00030000UL; /* "warm bootstrap" */
-                               strncpy((char *)cpup->ipc_buffer,
-                                       how->restart_cmd,
-                                       sizeof(cpup->ipc_buffer));
-                       }
-               } else
-                       *flags |=  0x00040000UL; /* "remain halted" */
 
-               reset_for_srm();
-               set_hae(srm_hae);
-
-#ifdef CONFIG_DUMMY_CONSOLE
-               /* This has the effect of reseting the VGA video origin.  */
-               take_over_console(&dummy_con, 0, MAX_NR_CONSOLES-1, 1);
+               sti();
+       }
 #endif
-#ifdef __SMP__
-               /* Wait for the secondaries to halt. */
-               clear_bit(smp_boot_cpuid, &cpu_present_mask);
-               while (cpu_present_mask)
-                       /* Make sure we sample memory and not a register. */
-                       barrier();
-#endif /* __SMP__ */
+
+       if (!alpha_using_srm && mode != LINUX_REBOOT_CMD_RESTART) {
+               /* Unfortunately, since MILO doesn't currently understand
+                  the hwrpb bits above, we can't reliably halt the 
+                  processor and keep it halted.  So just loop.  */
+               return;
        }
-       /* PRIMARY */
-       halt();
-}
 
-void
-generic_kill_arch(int mode, char * restart_cmd)
-{
-       struct halt_info copy_of_args;
+       if (alpha_using_srm)
+               srm_paging_stop();
 
-       copy_of_args.mode = mode;
-       copy_of_args.restart_cmd = restart_cmd;
-#ifdef __SMP__
-       /* A secondary can't wait here for the primary to finish, can it now? */
-       smp_call_function(halt_processor, (void *)&copy_of_args, 1, 0);
-#endif /* __SMP__ */
-       halt_processor(&copy_of_args);
+       halt();
 }
 
 void
index 743fc1d64eb4a4d895c3b475fe2db7543b0bba15..12f181b98c3de3080cac3859c4d2a83adae50b75 100644 (file)
@@ -153,7 +153,6 @@ extern int smp_info(char *buffer);
 extern void handle_ipi(struct pt_regs *);
 extern void smp_percpu_timer_interrupt(struct pt_regs *);
 extern int smp_boot_cpuid;
-extern unsigned long cpu_present_mask;
 
 /* bios32.c */
 extern void reset_for_srm(void);
index 5894310729b57f108f1d5aba64173d28e705f562..b52d386baf3fd5293811ee22f0b3781eadc4592b 100644 (file)
@@ -112,7 +112,6 @@ WEAK(eb164_mv);
 WEAK(eb64p_mv);
 WEAK(eb66_mv);
 WEAK(eb66p_mv);
-WEAK(eiger_mv);
 WEAK(jensen_mv);
 WEAK(lx164_mv);
 WEAK(miata_mv);
@@ -359,7 +358,7 @@ static char systype_names[][16] = {
        "Mikasa", "EB64", "EB66", "EB64+", "AlphaBook1",
        "Rawhide", "K2", "Lynx", "XL", "EB164", "Noritake",
        "Cortex", "29", "Miata", "XXM", "Takara", "Yukon",
-       "Tsunami", "Wildfire", "CUSCO", "Eiger"
+       "Tsunami", "Wildfire", "CUSCO"
 };
 
 static char unofficial_names[][8] = {"100", "Ruffian"};
@@ -430,7 +429,6 @@ get_sysvec(long type, long variation, long cpu)
                NULL,           /* Tsunami -- see variation.  */
                NULL,           /* Wildfire */
                NULL,           /* CUSCO */
-               &eiger_mv,      /* Eiger */
        };
 
        static struct alpha_machine_vector *unofficial_vecs[] __initlocaldata =
@@ -560,7 +558,6 @@ get_sysvec_byname(const char *name)
                &eb64p_mv,
                &eb66_mv,
                &eb66p_mv,
-               &eiger_mv,
                &jensen_mv,
                &lx164_mv,
                &miata_mv,
index 1467a26017ab434f7a400a8977169ba00719e17c..1c4ecf3ade5fc3fd1c12ba5ec7ad95a8998eab47 100644 (file)
@@ -92,24 +92,6 @@ clipper_update_irq_hw(unsigned long irq, unsigned long mask, int unmask_p)
                outb(mask, 0x21);       /* ISA PIC1 */
 }
 
-static void
-eiger_update_irq_hw(unsigned long irq, unsigned long mask, int unmask_p)
-{
-       if (irq >= 16) {
-               volatile unsigned long *csr;
-
-               csr = &TSUNAMI_cchip->dim0.csr;
-               
-               *csr = ~mask;
-               mb();
-               *csr;
-       }
-       else if (irq >= 8)
-               outb(mask >> 8, 0xA1);  /* ISA PIC2 */
-       else
-               outb(mask, 0x21);       /* ISA PIC1 */
-}
-
 static void
 dp264_device_interrupt(unsigned long vector, struct pt_regs * regs)
 {
@@ -187,21 +169,6 @@ clipper_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
        handle_irq(irq, ack, regs);
 }
 
-static void 
-eiger_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
-{
-       int irq, ack;
-
-       ack = irq = (vector - 0x800) >> 4;
-
-       /* This is just like TAKARA rather than like the other TSUNAMIs. */
-       /* ??? Is this really correct??? */
-       if (irq > 15)     
-               ack = irq = ((vector - 0x800) >> 6) + 12;   
-
-       handle_irq(irq, ack, regs);
-}
-
 static void __init
 dp264_init_irq(void)
 {
@@ -236,25 +203,6 @@ clipper_init_irq(void)
        enable_irq(2);
 }
 
-static void __init
-eiger_init_irq(void)
-{
-       outb(0, DMA1_RESET_REG);
-       outb(0, DMA2_RESET_REG);
-       outb(DMA_MODE_CASCADE, DMA2_MODE_REG);
-       outb(0, DMA2_MASK_REG);
-
-       if (alpha_using_srm)
-               alpha_mv.device_interrupt = eiger_srm_device_interrupt;
-
-       eiger_update_irq_hw(16, alpha_irq_mask, 0);
-
-#if 0
-        enable_irq(55);     /* Enable ISA interrupt controller.  */
-#endif
-       enable_irq(2);
-}
-
 
 /*
  * PCI Fixup configuration.
@@ -454,6 +402,7 @@ webbrick_pci_fixup(void)
 {
        layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE);
        common_pci_fixup(webbrick_map_irq, common_swizzle);
+       SMC669_Init(0);
 }
 
 static void __init
@@ -463,13 +412,6 @@ clipper_pci_fixup(void)
        common_pci_fixup(clipper_map_irq, common_swizzle);
 }
 
-static void __init
-eiger_pci_fixup(void)
-{
-       layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE);
-       common_pci_fixup(monet_map_irq, monet_swizzle);
-}
-
 
 /*
  * The System Vectors
@@ -563,29 +505,6 @@ struct alpha_machine_vector clipper_mv __initmv = {
        pci_fixup:              clipper_pci_fixup,
        kill_arch:              generic_kill_arch,
 };
+
 /* No alpha_mv alias for webbrick/monet/clipper, since we compile them
    in unconditionally with DP264; setup_arch knows how to cope.  */
-
-struct alpha_machine_vector eiger_mv __initmv = {
-       vector_name:            "Eiger",
-       DO_EV6_MMU,
-       DO_DEFAULT_RTC,
-       DO_TSUNAMI_IO,
-       DO_TSUNAMI_BUS,
-       machine_check:          tsunami_machine_check,
-       max_dma_address:        ALPHA_MAX_DMA_ADDRESS,
-
-       nr_irqs:                64,
-       irq_probe_mask:         _PROBE_MASK(64),
-       update_irq_hw:          eiger_update_irq_hw,
-       ack_irq:                generic_ack_irq,
-       device_interrupt:       dp264_device_interrupt,
-
-       init_arch:              tsunami_init_arch,
-       init_irq:               eiger_init_irq,
-       init_pit:               generic_init_pit,
-       pci_fixup:              eiger_pci_fixup,
-       kill_arch:              generic_kill_arch,
-};
-ALIAS_MV(eiger)
-
index 677ccf8e9ebc3d2ca1063b2e61a49e19f96dff43..c554a9fa1a07057b738a52a5fbdc48d6081a7aad 100644 (file)
@@ -42,7 +42,7 @@ takara_update_irq_hw(unsigned long irq, unsigned long mask, int unmask_p)
                        outb(mask >> 8, 0xA1);  /* ISA PIC2 */
        } else if (irq <= 31) {
                regaddr = 0x510 + ((irq - 16) & 0x0c);
-               outl((mask >> ((irq - 16) & 0x0c)) & 0x000f0000UL, regaddr);
+               outl((mask >> ((irq - 16) & 0x0c)) & 0xf0000Ul, regaddr);
        }
 }
 
@@ -101,7 +101,8 @@ takara_init_irq(void)
 
        if (alpha_using_srm)
                alpha_mv.device_interrupt = takara_srm_device_interrupt;
-       else {
+
+       if (!alpha_using_srm) {
                unsigned int ctlreg = inl(0x500);
 
                /* Return to non-accelerated mode.  */
@@ -128,7 +129,7 @@ takara_init_irq(void)
 static int __init
 takara_map_irq(struct pci_dev *dev, int slot, int pin)
 {
-       static char arc_irq_tab[15][5] __initlocaldata = {
+       static char irq_tab[15][5] __initlocaldata = {
                { 16+3, 16+3, 16+3, 16+3, 16+3},   /* slot  6 == device 3 */
                { 16+2, 16+2, 16+2, 16+2, 16+2},   /* slot  7 == device 2 */
                { 16+1, 16+1, 16+1, 16+1, 16+1},   /* slot  8 == device 1 */
@@ -145,32 +146,8 @@ takara_map_irq(struct pci_dev *dev, int slot, int pin)
                { 16+2, 16+2, 16+2, 16+2, 16+2},   /* slot 19 == device 2 */
                { 16+1, 16+1, 16+1, 16+1, 16+1},   /* slot 20 == device 1 */
        };
-       static char srm_irq_tab[15][5] __initlocaldata = {
-               { 16+3, 16+3, 16+3, 16+3, 16+3},   /* slot  6 == device 3 */
-               { 16+2, 16+2, 16+2, 16+2, 16+2},   /* slot  7 == device 2 */
-               { 16+1, 16+1, 16+1, 16+1, 16+1},   /* slot  8 == device 1 */
-               {   -1,   -1,   -1,   -1,   -1},   /* slot  9 == nothing */
-               {   -1,   -1,   -1,   -1,   -1},   /* slot 10 == nothing */
-               {   -1,   -1,   -1,   -1,   -1},   /* slot 11 == nothing */
-               {   -1,   -1,   -1,   -1,   -1},   /* slot 12 == nothing */
-               {   -1,   -1,   -1,   -1,   -1},   /* slot 13 == nothing */
-               {   -1,   -1,   -1,   -1,   -1},   /* slot 14 == nothing */
-               {   -1,   -1,   -1,   -1,   -1},   /* slot 15 == nothing */
-               {   -1,   -1,   -1,   -1,   -1},   /* slot 16 == nothing */
-               {16+12,16+12,16+13,16+14,16+15},   /* slot 17= device 4 */
-               {16+ 8, 16+8, 16+9,16+10,16+11},   /* slot 18= device 3 */
-               {16+ 4, 16+4, 16+5, 16+6, 16+7},   /* slot 19= device 2 */
-               {16+ 0, 16+0, 16+1, 16+2, 16+3},   /* slot 20= device 1 */
-       };
        const long min_idsel = 6, max_idsel = 20, irqs_per_slot = 5;
-
-       if (slot >= min_idsel && slot <= max_idsel && pin < irqs_per_slot) {
-               if (alpha_using_srm)
-                       return srm_irq_tab[slot - min_idsel][pin];
-               else
-                       return arc_irq_tab[slot - min_idsel][pin];
-       } else
-               return -1;
+       return COMMON_TABLE_LOOKUP;
 }
 
 static int __init
@@ -182,18 +159,14 @@ takara_swizzle(struct pci_dev *dev, int *pinp)
        unsigned int busslot = PCI_SLOT(dev->bus->self->devfn);
 
        /* Check first for built-in bridges.  */
-       if (busslot > 16 && ((1U << (36 - busslot)) & ctlreg)) {
+       if (busslot > 16 && ((1<<(36-busslot)) & ctlreg)) {
                if (pin == 1)
                        pin += (20 - busslot);
                else {
-                       /* Can only handle INTA pins currently.  */
-                       printk(KERN_WARNING "takara_swizzle: cannot only "
-                              "handle cards with INTA IRQ pin now.\n");
+                       /* Must be a card-based bridge.  */
+                       printk(KERN_WARNING "takara_swizzle: cannot handle "
+                              "card-bridge behind builtin bridge yet.\n");
                }
-       } else {
-               /* Must be a card-based bridge.  */
-               printk(KERN_WARNING "takara_swizzle: cannot handle "
-                      "card-bridge behind builtin bridge yet.\n");
        }
 
        *pinp = pin;
@@ -205,7 +178,7 @@ takara_pci_fixup(void)
 {
        layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE);
        common_pci_fixup(takara_map_irq, takara_swizzle);
-       enable_ide(0x26e);
+       /* enable_ide(0x26e); */
 }
 
 
@@ -222,8 +195,8 @@ struct alpha_machine_vector takara_mv __initmv = {
        machine_check:          cia_machine_check,
        max_dma_address:        ALPHA_MAX_DMA_ADDRESS,
 
-       nr_irqs:                32,
-       irq_probe_mask:         _PROBE_MASK(32),
+       nr_irqs:                20,
+       irq_probe_mask:         _PROBE_MASK(20),
        update_irq_hw:          takara_update_irq_hw,
        ack_irq:                generic_ack_irq,
        device_interrupt:       takara_device_interrupt,
index 16651b09643bec7a1e22e1a432de8e9fd8addcfd..9ab3b710b2bc9ec3e55d7602da7dcd81f2e1720e 100644 (file)
@@ -85,15 +85,15 @@ void cleanup_module(void)
 
 /* For 128-bit division.  */
 
-void
+__complex__ unsigned long
 udiv128(unsigned long divisor_f0, unsigned long divisor_f1,
-       unsigned long dividend_f0, unsigned long dividend_f1,
-       unsigned long *quot, unsigned long *remd)
+       unsigned long dividend_f0, unsigned long dividend_f1)
 {
        _FP_FRAC_DECL_2(quo);
        _FP_FRAC_DECL_2(rem);
        _FP_FRAC_DECL_2(tmp);
        unsigned long i, num_bits, bit;
+       __complex__ unsigned long ret;
 
        _FP_FRAC_SET_2(rem, _FP_ZEROFRAC_2);
        _FP_FRAC_SET_2(quo, _FP_ZEROFRAC_2);
@@ -139,9 +139,9 @@ udiv128(unsigned long divisor_f0, unsigned long divisor_f1,
        }
 
 out:
-       *quot = quo_f1;
-       *remd = rem_f1;
-       return;
+       __real__ ret = quo_f1;
+       __imag__ ret = rem_f1;
+       return ret;
 }
 
 /*
index 710eade038d9f475c270760b6acd5ae6e08290e2..9557f5aa6dda792cf0252d34ecb7489a8a0573b5 100644 (file)
@@ -552,17 +552,15 @@ do {                                                      \
           : "r" ((UDItype)(u)),                \
             "r" ((UDItype)(v)))
 
-extern void udiv128(unsigned long, unsigned long,
-                   unsigned long, unsigned long,
-                   unsigned long *,
-                   unsigned long *);
-
-#define udiv_qrnnd(q, r, n1, n0, d)            \
-  do {                                         \
-    unsigned long xr, xi;                      \
-    udiv128((n0), (n1), 0, (d), &xr, &xi);     \
-    (q) = xr;                                  \
-    (r) = xi;                                  \
+extern __complex__ unsigned long udiv128(unsigned long, unsigned long,
+                                        unsigned long, unsigned long);
+
+#define udiv_qrnnd(q, r, n1, n0, d)    \
+  do {                                 \
+    __complex__ unsigned long x_;      \
+    x_ = udiv128((n0), (n1), 0, (d));  \
+    (q) = __real__ x_;                 \
+    (r) = __imag__ x_;                 \
   } while (0)
 
 #define UDIV_NEEDS_NORMALIZATION 1  
index 95bd483c39efd5c8bad1f771befd3a05db11ee3f..42f9387d793c0aa9f15bb9232b94b3766907ce45 100644 (file)
@@ -523,7 +523,7 @@ struct atapi_mechstat_header {
        __u8 door_open     : 1;
        __u8 reserved1     : 4;
 #elif defined(__LITTLE_ENDIAN_BITFIELD)
-       __u8 reserved1     : 5;
+       __u8 reserved1     : 4;
        __u8 door_open     : 1;
        __u8 mech_state    : 3;
 #else
index 7bc4f256f095e49e15a92a1d9b86f2b16a18bad6..84203fc90057195675540d999b5e0bb85e80a87a 100644 (file)
@@ -24,7 +24,8 @@
  *
  *  Maintainer(s):
  *    JS        Jay Schulist            jschlst@samba.anu.edu.au
- *    CG       Christoph Goos          cgoos@syskonnect.de
+ *    CG       Christoph Goos          cgoos@syskonnect.de
+ *    AF       Adam Fritzler           mid@auk.cx
  *
  *  Modification History:
  *     29-Aug-97       CG      Created
  *     27-May-98       JS      Formated to Linux Kernel Format
  *     31-May-98       JS      Hacked in PCI support
  *     16-Jun-98       JS      Modulized for multiple cards with one driver
+ *     21-Sep-99       CG      Fixed source routing issues for 2.2 kernels
+ *     21-Sep-99       AF      Added multicast changes recommended by 
+ *                               Jochen Friedrich <jochen@nwe.de> (untested)
+ *                             Added detection of compatible Compaq PCI card  
  *
  *  To do:
  *    1. Selectable 16 Mbps or 4Mbps
- *    2. Multi/Broadcast packet handling
+ *    2. Multi/Broadcast packet handling (might be done)
  *
  */
 
@@ -135,7 +140,6 @@ static void         sktr_enable_interrupts(struct device *dev);
 static void    sktr_exec_cmd(struct device *dev, unsigned short Command);
 static void    sktr_exec_sifcmd(struct device *dev, unsigned int WriteValue);
 /* "F" */
-static unsigned char *sktr_fix_srouting(unsigned char *buf, short *FrameLen);
 /* "G" */
 static struct enet_statistics *sktr_get_stats(struct device *dev);
 /* "H" */
@@ -254,10 +258,17 @@ __initfunc(static int sktr_pci_chk_card(struct device *dev))
                /* Remove I/O space marker in bit 0. */
                pci_ioaddr &= ~3;
 
-               if(vendor != PCI_VENDOR_ID_SK)
+               if((vendor != PCI_VENDOR_ID_SK) &&
+                  (vendor != PCI_VENDOR_ID_COMPAQ))
                        continue;
-               if(device != PCI_DEVICE_ID_SK_TR)
+
+               if((vendor == PCI_VENDOR_ID_SK) && 
+                  (device != PCI_DEVICE_ID_SK_TR))
+                       continue;
+               else if((vendor == PCI_VENDOR_ID_COMPAQ) && 
+                       (device != PCI_DEVICE_ID_COMPAQ_TOKENRING))
                        continue;
+     
                if(check_region(pci_ioaddr, SKTR_IO_EXTENT))
                        continue;
                request_region(pci_ioaddr, SKTR_IO_EXTENT, pci_cardname);
@@ -390,6 +401,7 @@ __initfunc(static int sktr_probe1(struct device *dev, int ioaddr))
 {
        static unsigned version_printed = 0;
        struct net_local *tp;
+       int DeviceType = SK_PCI;
        int err;
 
        if(sktr_debug && version_printed++ == 0)
@@ -407,6 +419,7 @@ __initfunc(static int sktr_probe1(struct device *dev, int ioaddr))
                err = sktr_isa_chk_card(dev, ioaddr);
                if(err < 0)
                        return (-ENODEV);
+               DeviceType = SK_ISA;
        }
 
        /* Setup this devices private information structure */
@@ -414,6 +427,7 @@ __initfunc(static int sktr_probe1(struct device *dev, int ioaddr))
        if(tp == NULL)
                return (-ENOMEM);
        memset(tp, 0, sizeof(struct net_local));
+       tp->DeviceType = DeviceType;
 
        dev->priv               = tp;
        dev->init               = sktr_init_card;
@@ -690,7 +704,9 @@ static void sktr_init_net_local(struct device *dev)
                        skb_put(tp->Rpl[i].Skb, tp->MaxPacketSize);
 
                        /* data unreachable for DMA ? then use local buffer */
-                       if(virt_to_bus(tp->Rpl[i].Skb->data) + tp->MaxPacketSize > ISA_MAX_ADDRESS)
+                       if(tp->DeviceType == SK_ISA &&
+                               virt_to_bus(tp->Rpl[i].Skb->data) +
+                               tp->MaxPacketSize > ISA_MAX_ADDRESS)
                        {
                                tp->Rpl[i].SkbStat = SKB_DATA_COPY;
                                tp->Rpl[i].FragList[0].DataAddr = htonl(virt_to_bus(tp->LocalRxBuffers[i]));
@@ -748,7 +764,7 @@ static void sktr_init_opb(struct net_local *tp)
 
        tp->ocpl.OPENOptions     = 0;
        tp->ocpl.OPENOptions    |= ENABLE_FULL_DUPLEX_SELECTION;
-       tp->ocpl.OPENOptions    |= PAD_ROUTING_FIELD;
+/*     tp->ocpl.OPENOptions    |= PAD_ROUTING_FIELD; no more needed */
        tp->ocpl.FullDuplex      = 0;
        tp->ocpl.FullDuplex     |= OPEN_FULL_DUPLEX_OFF;
 
@@ -825,32 +841,6 @@ static void sktr_exec_cmd(struct device *dev, unsigned short Command)
        return;
 }
 
-/*
- * Linux always gives 18 byte of source routing information in the frame header.
- * But the length field can indicate shorter length. Then cut header
- * appropriate.
- */
-static unsigned char *sktr_fix_srouting(unsigned char *buf, short *FrameLen)
-{
-       struct trh_hdr *trh = (struct trh_hdr *)buf;
-       int len;
-        
-       if(buf[8] & TR_RII)
-       {
-               trh->rcf &= ~SWAPB((unsigned short) TR_RCF_LONGEST_FRAME_MASK);
-               trh->rcf |= SWAPB((unsigned short) TR_RCF_FRAME4K);
-               len = (SWAPB(trh->rcf) & TR_RCF_LEN_MASK) >> 8;
-               if(len < 18)
-               {
-                       memcpy(&buf[18-len],buf,sizeof(struct trh_hdr)-18+len);
-                       *FrameLen -= (18 - len);
-               }
-               return (&buf[18-len]);
-       }
-
-       return (buf);
-}
-
 /*
  * Gets skb from system, queues it and checks if it can be sent
  */
@@ -933,7 +923,8 @@ static void sktr_hardware_send_packet(struct device *dev, struct net_local* tp)
 
                tp->QueueSkb++;
                /* Is buffer reachable for Busmaster-DMA? */
-               if(virt_to_bus((void*)(((long) skb->data) + skb->len))
+               if(tp->DeviceType == SK_ISA && 
+                       virt_to_bus((void*)(((long) skb->data) + skb->len))
                        > ISA_MAX_ADDRESS)
                {
                        /* Copy frame to local buffer */
@@ -941,13 +932,13 @@ static void sktr_hardware_send_packet(struct device *dev, struct net_local* tp)
                        length  = skb->len;
                        buf     = tp->LocalTxBuffers[i];
                        memcpy(buf, skb->data, length);
-                       newbuf  = sktr_fix_srouting(buf, &length);
+                       newbuf  = buf;
                }
                else
                {
                        /* Send direct from skb->data */
                        length = skb->len;
-                       newbuf = sktr_fix_srouting(skb->data, &length);
+                       newbuf = skb->data;
                }
 
                /* Source address in packet? */
@@ -1485,53 +1476,64 @@ static struct enet_statistics *sktr_get_stats(struct device *dev)
 static void sktr_set_multicast_list(struct device *dev)
 {
        struct net_local *tp = (struct net_local *)dev->priv;
-       unsigned int OpenOptions;
-
-       OpenOptions = tp->ocpl.OPENOptions &
-               ~(PASS_ADAPTER_MAC_FRAMES
-               | PASS_ATTENTION_FRAMES
-               | PASS_BEACON_MAC_FRAMES
-               | COPY_ALL_MAC_FRAMES
-               | COPY_ALL_NON_MAC_FRAMES);
-
-       if(dev->flags & IFF_PROMISC)
-               /* Enable promiscuous mode */
-               OpenOptions |= COPY_ALL_NON_MAC_FRAMES | COPY_ALL_MAC_FRAMES;
-       else
-       {
-               if(dev->flags & IFF_ALLMULTI)
-                       /* || dev->mc_count > HW_MAX_ADDRS) */
-               {
-                       /* Disable promiscuous mode, use normal mode. */
-               }
-               else
-               {
-                       if(dev->mc_count)
-                       {
-                               /* Walk the address list, and load the filter */
-                       }
-               }
-       }
-
-       tp->ocpl.OPENOptions = OpenOptions;
-       sktr_exec_cmd(dev, OC_MODIFY_OPEN_PARMS);
-
-       return;
+        unsigned int OpenOptions;
+       
+        OpenOptions = tp->ocpl.OPENOptions &
+                ~(PASS_ADAPTER_MAC_FRAMES
+                 | PASS_ATTENTION_FRAMES
+                 | PASS_BEACON_MAC_FRAMES
+                 | COPY_ALL_MAC_FRAMES
+                 | COPY_ALL_NON_MAC_FRAMES);
+       
+        tp->ocpl.FunctAddr = 0;
+       
+        if(dev->flags & IFF_PROMISC)
+                /* Enable promiscuous mode */
+                OpenOptions |= COPY_ALL_NON_MAC_FRAMES |
+                       COPY_ALL_MAC_FRAMES;
+        else
+        {
+                if(dev->flags & IFF_ALLMULTI)
+                {
+                        /* Disable promiscuous mode, use normal mode. */
+                        tp->ocpl.FunctAddr = 0xFFFFFFFF;
+                       
+                }
+                else
+                {
+                        int i;
+                        struct dev_mc_list *mclist = dev->mc_list;
+                        for (i=0; i< dev->mc_count; i++)
+                        {
+                                ((char *)(&tp->ocpl.FunctAddr))[0] |=
+                                       mclist->dmi_addr[2];
+                                ((char *)(&tp->ocpl.FunctAddr))[1] |=
+                                       mclist->dmi_addr[3];
+                                ((char *)(&tp->ocpl.FunctAddr))[2] |=
+                                       mclist->dmi_addr[4];
+                                ((char *)(&tp->ocpl.FunctAddr))[3] |=
+                                       mclist->dmi_addr[5];
+                                mclist = mclist->next;
+                        }
+                }
+                sktr_exec_cmd(dev, OC_SET_FUNCT_ADDR);
+        }
+       
+        tp->ocpl.OPENOptions = OpenOptions;
+        sktr_exec_cmd(dev, OC_MODIFY_OPEN_PARMS);
+        return;
 }
 
 /*
  * Wait for some time (microseconds)
+ *
+ * udelay() is a bit harsh, but using a looser timer causes
+ * the bring-up-diags to stall indefinitly.  
+ *
  */
 static void sktr_wait(unsigned long time)
 {
-       long tmp;
-
-       tmp = jiffies + time/(1000000/HZ);
-       do {
-               current->state          = TASK_INTERRUPTIBLE;
-               tmp = schedule_timeout(tmp);
-       } while(time_after(tmp, jiffies));
-
+       udelay(time);
        return;
 }
 
@@ -2450,8 +2452,6 @@ static void sktr_rcv_status_irq(struct device *dev)
                        /* Drop frames sent by myself */
                        if(sktr_chk_frame(dev, rpl->MData))
                        {
-                               printk(KERN_INFO "%s: Received my own frame\n",
-                                       dev->name);
                                if(rpl->Skb != NULL)
                                        dev_kfree_skb(rpl->Skb);
                        }
@@ -2463,9 +2463,10 @@ static void sktr_rcv_status_irq(struct device *dev)
                                        printk("%s: Packet Length %04X (%d)\n",
                                                dev->name, Length, Length);
 
-                               /* Indicate the received frame to system the
-                                * adapter does the Source-Routing padding for 
-                                * us. See: OpenOptions in sktr_init_opb()
+                               /* Indicate the received frame to system.
+                                * The source routing padding is no more
+                                * necessary with 2.2.x kernel.
+                                * See: OpenOptions in sktr_init_opb()
                                 */
                                skb = rpl->Skb;
                                if(rpl->SkbStat == SKB_UNAVAILABLE)
@@ -2528,7 +2529,8 @@ static void sktr_rcv_status_irq(struct device *dev)
                        skb_put(rpl->Skb, tp->MaxPacketSize);
 
                        /* Data unreachable for DMA ? then use local buffer */
-                       if(virt_to_bus(rpl->Skb->data) + tp->MaxPacketSize
+                       if(tp->DeviceType == SK_ISA &&
+                               virt_to_bus(rpl->Skb->data) + tp->MaxPacketSize
                                > ISA_MAX_ADDRESS)
                        {
                                rpl->SkbStat = SKB_DATA_COPY;
index e0fe718e7a4971e92f24674783765c69dbd8bc34..fee24be8eaa55039472c830c44ca0c8fa4b86908 100644 (file)
@@ -16,6 +16,9 @@
 #define TR_RCF_LONGEST_FRAME_MASK 0x0070
 #define TR_RCF_FRAME4K 0x0030
 
+#define SK_ISA 0
+#define SK_PCI 1
+
 /*------------------------------------------------------------------*/
 /*  Bit order for adapter communication with DMA                   */
 /*  --------------------------------------------------------------  */
@@ -1063,6 +1066,8 @@ typedef struct net_local {
        unsigned char ScbInUse;
        unsigned short CMDqueue;
 
+       unsigned int DeviceType;
+
        unsigned long AdapterOpenFlag:1;
        unsigned long AdapterVirtOpenFlag:1;
        unsigned long OpenCommandIssued:1;
index 1b63e672b74db9b9bc17c38e8fe963bf999844c1..a55752abb0e9b8d3d1bcb99bac2e360ee2e9443d 100644 (file)
@@ -9,22 +9,12 @@
  * Delay routines, using a pre-computed "loops_per_second" value.
  */
 
-/* We must make the innermost loop external, ie called via "jsr/bsr", so
-   that timings will be consistent accross ALL invocations, which is not
-   the case for a completely inline implementation. */
-
-extern void ___delay(void);
-
 extern __inline__ void
 __delay(unsigned long loops)
 {
-        register unsigned long r0 __asm__("$0") = loops;
-#ifdef MODULE
-        __asm__ __volatile__("lda $28,___delay; jsr $28,($28),0"
-                             : "=r"(r0) : "r"(r0) : "$28");
-#else
-        __asm__ __volatile__("bsr $28,___delay" : "=r"(r0) : "r"(r0) : "$28");
-#endif
+       __asm__ __volatile__(".align 3\n"
+               "1:\tsubq %0,1,%0\n\t"
+               "bge %0,1b": "=r" (loops) : "0" (loops));
 }
 
 /*
index d67700d10440bc83a506ceef865790cb81fe59dd..69823af357c43fa1b42013f6e40206f566299a6e 100644 (file)
@@ -55,7 +55,6 @@
 #define ST_DEC_TSUNAMI          34     /* Tsunami systype      */
 #define ST_DEC_WILDFIRE                 35     /* Wildfire systype     */
 #define ST_DEC_CUSCO            36     /* CUSCO systype        */
-#define ST_DEC_EIGER            37     /* Eiger systype        */
 
 /* UNOFFICIAL!!! */
 #define ST_UNOFFICIAL_BIAS     100
index b47f09eb379a5e1d8b34f21d3ee1cdbb05d5ced9..ad1c917a36b62df8cf4c71d8887f335d86c9df8e 100644 (file)
@@ -27,8 +27,7 @@
 
 #elif defined(CONFIG_ALPHA_EB66)      || \
       defined(CONFIG_ALPHA_EB64P)     || \
-      defined(CONFIG_ALPHA_MIKASA)    || \
-      defined(CONFIG_ALPHA_TAKARA)
+      defined(CONFIG_ALPHA_MIKASA)
 # define NR_IRQS       32
 
 #elif defined(CONFIG_ALPHA_ALCOR)     || \
       defined(CONFIG_ALPHA_SX164)
 # define NR_IRQS       40
 
-#elif defined(CONFIG_ALPHA_DP264)     || \
-      defined(CONFIG_ALPHA_RAWHIDE)   || \
-      defined(CONFIG_ALPHA_EIGER)
+#elif defined(CONFIG_ALPHA_DP264) || \
+      defined(CONFIG_ALPHA_RAWHIDE)
 # define NR_IRQS       64
 
+#elif defined(CONFIG_ALPHA_TAKARA)
+# define NR_IRQS       20
+
 #else /* everyone else */
 # define NR_IRQS       16
 #endif
index d579eaaa2354e735b8e182e3c9a69b217240b521..a656235f418ad742d17b7397adf8d546264fc68d 100644 (file)
  * <linux-pcisupport@cck.uni-kl.de>.
  */
 #define PCI_VENDOR_ID_COMPAQ           0x0e11
+#define PCI_DEVICE_ID_COMPAQ_TOKENRING 0x0508
 #define PCI_DEVICE_ID_COMPAQ_1280      0x3033
 #define PCI_DEVICE_ID_COMPAQ_TRIFLEX   0x4000
 #define PCI_DEVICE_ID_COMPAQ_SMART2P   0xae10