]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge master.kernel.org:/home/rmk/linux-2.6-mmc
authorLinus Torvalds <torvalds@g5.osdl.org>
Thu, 29 Dec 2005 18:27:28 +0000 (10:27 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 29 Dec 2005 18:27:28 +0000 (10:27 -0800)
78 files changed:
Makefile
arch/powerpc/mm/hash_utils_64.c
arch/powerpc/platforms/pseries/xics.c
arch/sparc/Kconfig
arch/sparc/kernel/sys_sunos.c
arch/sparc/kernel/vmlinux.lds.S
arch/sparc64/Kconfig
arch/sparc64/kernel/sys_sunos32.c
arch/sparc64/kernel/vmlinux.lds.S
arch/sparc64/solaris/misc.c
arch/um/os-Linux/start_up.c
arch/um/os-Linux/user_syms.c
arch/um/sys-i386/Makefile
arch/um/sys-x86_64/Makefile
arch/x86_64/mm/init.c
drivers/acpi/processor_thermal.c
drivers/acpi/utilities/utmisc.c
drivers/char/Kconfig
drivers/char/drm/radeon_cp.c
drivers/char/keyboard.c
drivers/char/vc_screen.c
drivers/fc4/Kconfig
drivers/input/misc/Kconfig
drivers/input/mouse/sermouse.c
drivers/input/serio/i8042.h
drivers/media/video/saa7127.c
drivers/media/video/saa7134/Kconfig
drivers/media/video/saa7134/Makefile
drivers/media/video/saa7134/saa7134-alsa.c
drivers/media/video/saa7134/saa7134-oss.c
drivers/mtd/maps/Kconfig
drivers/net/forcedeth.c
drivers/net/phy/phy_device.c
drivers/net/ppp_generic.c
drivers/net/sungem.c
drivers/net/tg3.c
drivers/net/tg3.h
drivers/net/wireless/orinoco_nortel.c
drivers/s390/net/qeth_eddp.c
drivers/s390/net/qeth_main.c
drivers/s390/net/qeth_mpc.c
drivers/s390/net/qeth_mpc.h
drivers/s390/net/qeth_proc.c
drivers/s390/net/qeth_sys.c
drivers/s390/net/qeth_tso.h
drivers/scsi/libata-scsi.c
drivers/scsi/scsi_scan.c
drivers/serial/Kconfig
drivers/serial/amba-pl011.c
drivers/usb/input/aiptek.c
drivers/video/Kconfig
drivers/video/console/Kconfig
drivers/video/logo/Kconfig
drivers/video/sbuslib.c
fs/hostfs/hostfs_kern.c
fs/nfs/file.c
fs/partitions/Kconfig
include/acpi/acglobal.h
include/asm-ia64/topology.h
include/asm-x86_64/rwlock.h
include/asm-x86_64/topology.h
include/linux/ipv6_route.h
include/linux/n_r3964.h
include/linux/preempt.h
include/net/if_inet6.h
ipc/sem.c
kernel/futex.c
net/8021q/vlan.c
net/bridge/br_netfilter.c
net/core/filter.c
net/dccp/ipv4.c
net/ipv6/addrconf.c
net/ipv6/icmp.c
net/ipv6/mcast.c
net/ipv6/route.c
net/netrom/nr_in.c
net/xfrm/xfrm_policy.c
sound/sparc/Kconfig

index f4218b5db827cc28f29d4aac842dac360a0d436d..f937f1f4595e84b8397f74c3ceaf493b46f80f79 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 15
-EXTRAVERSION =-rc6
+EXTRAVERSION =-rc7
 NAME=Sliding Snow Leopard
 
 # *DOCUMENTATION*
index a33583f3b0e7d0e2c7f07b5ccc3bec039bf3f14e..a606504678bd5aa318d3af992c4a117d96e41c66 100644 (file)
@@ -514,7 +514,7 @@ void __init htab_initialize(void)
 #undef KB
 #undef MB
 
-void __init htab_initialize_secondary(void)
+void htab_initialize_secondary(void)
 {
        if (!platform_is_lpar())
                mtspr(SPRN_SDR1, _SDR1);
index 72ac18067ecef58c4af36c49502e387be119d3fd..0377decc07190a4f6b7629f41ad73a43a82e921a 100644 (file)
@@ -48,11 +48,6 @@ static struct hw_interrupt_type xics_pic = {
        .set_affinity = xics_set_affinity
 };
 
-static struct hw_interrupt_type xics_8259_pic = {
-       .typename = " XICS/8259",
-       .ack = xics_mask_and_ack_irq,
-};
-
 /* This is used to map real irq numbers to virtual */
 static struct radix_tree_root irq_map = RADIX_TREE_INIT(GFP_ATOMIC);
 
@@ -367,12 +362,7 @@ int xics_get_irq(struct pt_regs *regs)
        /* for sanity, this had better be < NR_IRQS - 16 */
        if (vec == xics_irq_8259_cascade_real) {
                irq = i8259_irq(regs);
-               if (irq == -1) {
-                       /* Spurious cascaded interrupt.  Still must ack xics */
-                       xics_end_irq(irq_offset_up(xics_irq_8259_cascade));
-
-                       irq = -1;
-               }
+               xics_end_irq(irq_offset_up(xics_irq_8259_cascade));
        } else if (vec == XICS_IRQ_SPURIOUS) {
                irq = -1;
        } else {
@@ -542,6 +532,7 @@ nextnode:
                xics_irq_8259_cascade_real = *ireg;
                xics_irq_8259_cascade
                        = virt_irq_create_mapping(xics_irq_8259_cascade_real);
+               i8259_init(0, 0);
                of_node_put(np);
        }
 
@@ -565,12 +556,7 @@ nextnode:
 #endif /* CONFIG_SMP */
        }
 
-       xics_8259_pic.enable = i8259_pic.enable;
-       xics_8259_pic.disable = i8259_pic.disable;
-       xics_8259_pic.end = i8259_pic.end;
-       for (i = 0; i < 16; ++i)
-               get_irq_desc(i)->handler = &xics_8259_pic;
-       for (; i < NR_IRQS; ++i)
+       for (i = irq_offset_value(); i < NR_IRQS; ++i)
                get_irq_desc(i)->handler = &xics_pic;
 
        xics_setup_cpu();
@@ -590,7 +576,6 @@ static int __init xics_setup_i8259(void)
                                no_action, 0, "8259 cascade", NULL))
                        printk(KERN_ERR "xics_setup_i8259: couldn't get 8259 "
                                        "cascade\n");
-               i8259_init(0, 0);
        }
        return 0;
 }
index 3cfb8be3ff6d0f9fe5be0c600a9f035787f767d4..56c34e7fd4ee8f6b0bd7481c438eaa19f66b6eb9 100644 (file)
@@ -55,6 +55,10 @@ config NR_CPUS
        depends on SMP
        default "32"
 
+config SPARC
+       bool
+       default y
+
 # Identify this as a Sparc32 build
 config SPARC32
        bool
index 81c894acd0db617be71e0f37ddc1a618405b7ee8..d07ae02101add23f16aae1209d4a569ce9edb3e2 100644 (file)
@@ -894,7 +894,7 @@ asmlinkage long sunos_sysconf (int name)
                ret = ARG_MAX;
                break;
        case _SC_CHILD_MAX:
-               ret = CHILD_MAX;
+               ret = -1; /* no limit */
                break;
        case _SC_CLK_TCK:
                ret = HZ;
index 38938d2e63aa2352edfda6e16043f0c6c53298b5..346c19a949fd0245c2ca29fe3d9f0f72e7a2219f 100644 (file)
@@ -85,19 +85,9 @@ SECTIONS
   }
   _end = . ;
   PROVIDE (end = .);
-  /* Stabs debugging sections.  */
-  .stab 0 : { *(.stab) }
-  .stabstr 0 : { *(.stabstr) }
-  .stab.excl 0 : { *(.stab.excl) }
-  .stab.exclstr 0 : { *(.stab.exclstr) }
-  .stab.index 0 : { *(.stab.index) }
-  .stab.indexstr 0 : { *(.stab.indexstr) }
-  .comment 0 : { *(.comment) }
-  .debug          0 : { *(.debug) }
-  .debug_srcinfo  0 : { *(.debug_srcinfo) }
-  .debug_aranges  0 : { *(.debug_aranges) }
-  .debug_pubnames 0 : { *(.debug_pubnames) }
-  .debug_sfnames  0 : { *(.debug_sfnames) }
-  .line           0 : { *(.line) }
   /DISCARD/ : { *(.exit.text) *(.exit.data) *(.exitcall.exit) }
+
+  STABS_DEBUG
+
+  DWARF_DEBUG
 }
index 3fded69b19228ca4a81013149b638d97b554143d..c4b7ad70cd7c5d1b756d46987ae90c5e536324ac 100644 (file)
@@ -5,6 +5,10 @@
 
 mainmenu "Linux/UltraSPARC Kernel Configuration"
 
+config SPARC
+       bool
+       default y
+
 config SPARC64
        bool
        default y
index d0592ed54ea5699c77251e09d23fc595bc865d93..bfa4aa68312dcabd6d4c080c5ea4dbf14e117a46 100644 (file)
@@ -854,7 +854,7 @@ asmlinkage s32 sunos_sysconf (int name)
                ret = ARG_MAX;
                break;
        case _SC_CHILD_MAX:
-               ret = CHILD_MAX;
+               ret = -1; /* no limit */
                break;
        case _SC_CLK_TCK:
                ret = HZ;
index 2af0cf0a86409fbc288f61061ebd953c19d91950..467d13a0d5c1314fa99c645ac62f5699ee7cb3d3 100644 (file)
@@ -90,19 +90,9 @@ SECTIONS
   }
   _end = . ;
   PROVIDE (end = .);
-  /* Stabs debugging sections.  */
-  .stab 0 : { *(.stab) }
-  .stabstr 0 : { *(.stabstr) }
-  .stab.excl 0 : { *(.stab.excl) }
-  .stab.exclstr 0 : { *(.stab.exclstr) }
-  .stab.index 0 : { *(.stab.index) }
-  .stab.indexstr 0 : { *(.stab.indexstr) }
-  .comment 0 : { *(.comment) }
-  .debug          0 : { *(.debug) }
-  .debug_srcinfo  0 : { *(.debug_srcinfo) }
-  .debug_aranges  0 : { *(.debug_aranges) }
-  .debug_pubnames 0 : { *(.debug_pubnames) }
-  .debug_sfnames  0 : { *(.debug_sfnames) }
-  .line           0 : { *(.line) }
   /DISCARD/ : { *(.exit.text) *(.exit.data) *(.exitcall.exit) }
+
+  STABS_DEBUG
+
+  DWARF_DEBUG
 }
index 302efbcba70e85208d1fa8ba7387da963b8f8181..3ab4677395f217d9c637339fea1efce426f1f867 100644 (file)
@@ -353,7 +353,7 @@ asmlinkage int solaris_sysconf(int id)
 {
        switch (id) {
        case SOLARIS_CONFIG_NGROUPS:    return NGROUPS_MAX;
-       case SOLARIS_CONFIG_CHILD_MAX:  return CHILD_MAX;
+       case SOLARIS_CONFIG_CHILD_MAX:  return -1; /* no limit */
        case SOLARIS_CONFIG_OPEN_FILES: return OPEN_MAX;
        case SOLARIS_CONFIG_POSIX_VER:  return 199309;
        case SOLARIS_CONFIG_PAGESIZE:   return PAGE_SIZE;
index 37517d49c4aea948054a70a17ec36c8f6b255b57..29a9e3f4376368caa56610e423d9e189eec79e4d 100644 (file)
@@ -116,16 +116,16 @@ static int stop_ptraced_child(int pid, void *stack, int exitcode,
        if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) {
                int exit_with = WEXITSTATUS(status);
                if (exit_with == 2)
-                       printk("check_ptrace : child exited with status 2. "
+                       printf("check_ptrace : child exited with status 2. "
                               "Serious trouble happening! Try updating your "
                               "host skas patch!\nDisabling SYSEMU support.");
-               printk("check_ptrace : child exited with exitcode %d, while "
+               printf("check_ptrace : child exited with exitcode %d, while "
                      "expecting %d; status 0x%x", exit_with,
                      exitcode, status);
                if (mustpanic)
                        panic("\n");
                else
-                       printk("\n");
+                       printf("\n");
                ret = -1;
        }
 
@@ -183,7 +183,7 @@ static void __init check_sysemu(void)
        void *stack;
        int pid, n, status, count=0;
 
-       printk("Checking syscall emulation patch for ptrace...");
+       printf("Checking syscall emulation patch for ptrace...");
        sysemu_supported = 0;
        pid = start_ptraced_child(&stack);
 
@@ -207,10 +207,10 @@ static void __init check_sysemu(void)
                goto fail_stopped;
 
        sysemu_supported = 1;
-       printk("OK\n");
+       printf("OK\n");
        set_using_sysemu(!force_sysemu_disabled);
 
-       printk("Checking advanced syscall emulation patch for ptrace...");
+       printf("Checking advanced syscall emulation patch for ptrace...");
        pid = start_ptraced_child(&stack);
 
        if(ptrace(PTRACE_OLDSETOPTIONS, pid, 0,
@@ -246,7 +246,7 @@ static void __init check_sysemu(void)
                goto fail_stopped;
 
        sysemu_supported = 2;
-       printk("OK\n");
+       printf("OK\n");
 
        if ( !force_sysemu_disabled )
                set_using_sysemu(sysemu_supported);
@@ -255,7 +255,7 @@ static void __init check_sysemu(void)
 fail:
        stop_ptraced_child(pid, stack, 1, 0);
 fail_stopped:
-       printk("missing\n");
+       printf("missing\n");
 }
 
 static void __init check_ptrace(void)
@@ -263,7 +263,7 @@ static void __init check_ptrace(void)
        void *stack;
        int pid, syscall, n, status;
 
-       printk("Checking that ptrace can change system call numbers...");
+       printf("Checking that ptrace can change system call numbers...");
        pid = start_ptraced_child(&stack);
 
        if(ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0)
@@ -292,7 +292,7 @@ static void __init check_ptrace(void)
                }
        }
        stop_ptraced_child(pid, stack, 0, 1);
-       printk("OK\n");
+       printf("OK\n");
        check_sysemu();
 }
 
@@ -472,6 +472,8 @@ int can_do_skas(void)
 
 int have_devanon = 0;
 
+/* Runs on boot kernel stack - already safe to use printk. */
+
 void check_devanon(void)
 {
        int fd;
index 56d3f870926b8214a99899135d1f87f777a6b463..8da6ab31152ad47918fa75bfa73437859e01eebe 100644 (file)
@@ -34,6 +34,11 @@ EXPORT_SYMBOL(strstr);
        int sym(void);                  \
        EXPORT_SYMBOL(sym);
 
+extern void readdir64(void) __attribute__((weak));
+EXPORT_SYMBOL(readdir64);
+extern void truncate64(void) __attribute__((weak));
+EXPORT_SYMBOL(truncate64);
+
 #ifdef SUBARCH_i386
 EXPORT_SYMBOL(vsyscall_ehdr);
 EXPORT_SYMBOL(vsyscall_end);
index 150059dbee12fc6e90ac8d18652fefa7698eeaad..f5fd5b0156d02a7f0a39882596c2b3bdb1e18de5 100644 (file)
@@ -1,6 +1,8 @@
-obj-y = bitops.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \
-       ptrace_user.o semaphore.o signal.o sigcontext.o stub.o stub_segv.o \
-       syscalls.o sysrq.o sys_call_table.o
+obj-y := bitops.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \
+       ptrace_user.o semaphore.o signal.o sigcontext.o syscalls.o sysrq.o \
+       sys_call_table.o
+
+obj-$(CONFIG_MODE_SKAS) += stub.o stub_segv.o
 
 obj-$(CONFIG_HIGHMEM) += highmem.o
 obj-$(CONFIG_MODULES) += module.o
index 00b2025427df0cd0dedeb8cfc1e65b8491635faf..a351091fbd99c0287b14e6775d60b717f401cb2a 100644 (file)
@@ -6,8 +6,9 @@
 
 #XXX: why into lib-y?
 lib-y = bitops.o bugs.o csum-partial.o delay.o fault.o ldt.o mem.o memcpy.o \
-       ptrace.o ptrace_user.o sigcontext.o signal.o stub.o \
-       stub_segv.o syscalls.o syscall_table.o sysrq.o thunk.o
+       ptrace.o ptrace_user.o sigcontext.o signal.o syscalls.o \
+       syscall_table.o sysrq.o thunk.o
+lib-$(CONFIG_MODE_SKAS) += stub.o stub_segv.o
 
 obj-y := ksyms.o
 obj-$(CONFIG_MODULES) += module.o um_module.o
index 286f6a624c3ace5d3f33c5fb36258979c57dc80f..c016dfe8478414b9751b4588657b00e4206bf23f 100644 (file)
@@ -348,7 +348,7 @@ size_zones(unsigned long *z, unsigned long *h,
        }
 
        /* Compute holes */
-       w = 0;
+       w = start_pfn;
        for (i = 0; i < MAX_NR_ZONES; i++) {
                unsigned long s = w;
                w += z[i];
index f37584015324ac54b3471351dc4964170c467204..dc9817cfb882a87f6b640640aeb243988e059c3d 100644 (file)
@@ -102,8 +102,8 @@ static int cpu_has_cpufreq(unsigned int cpu)
 {
        struct cpufreq_policy policy;
        if (!acpi_thermal_cpufreq_is_init || cpufreq_get_policy(&policy, cpu))
-               return -ENODEV;
-       return 0;
+               return 0;
+       return 1;
 }
 
 static int acpi_thermal_cpufreq_increase(unsigned int cpu)
index 0c5abc536c7ad1deb1f7db7e55c410ccf289a591..2ce872d75890b99f44e5aa4712d828ba6ee0ff9c 100644 (file)
@@ -84,14 +84,14 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id)
 
        /* Find a free owner ID */
 
-       for (i = 0; i < 32; i++) {
-               if (!(acpi_gbl_owner_id_mask & (1 << i))) {
+       for (i = 0; i < 64; i++) {
+               if (!(acpi_gbl_owner_id_mask & (1ULL << i))) {
                        ACPI_DEBUG_PRINT((ACPI_DB_VALUES,
-                                         "Current owner_id mask: %8.8X New ID: %2.2X\n",
+                                         "Current owner_id mask: %16.16LX New ID: %2.2X\n",
                                          acpi_gbl_owner_id_mask,
                                          (unsigned int)(i + 1)));
 
-                       acpi_gbl_owner_id_mask |= (1 << i);
+                       acpi_gbl_owner_id_mask |= (1ULL << i);
                        *owner_id = (acpi_owner_id) (i + 1);
                        goto exit;
                }
@@ -106,7 +106,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id)
         */
        *owner_id = 0;
        status = AE_OWNER_ID_LIMIT;
-       ACPI_REPORT_ERROR(("Could not allocate new owner_id (32 max), AE_OWNER_ID_LIMIT\n"));
+       ACPI_REPORT_ERROR(("Could not allocate new owner_id (64 max), AE_OWNER_ID_LIMIT\n"));
 
       exit:
        (void)acpi_ut_release_mutex(ACPI_MTX_CACHES);
@@ -123,7 +123,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id)
  *              control method or unloading a table. Either way, we would
  *              ignore any error anyway.
  *
- * DESCRIPTION: Release a table or method owner ID.  Valid IDs are 1 - 32
+ * DESCRIPTION: Release a table or method owner ID.  Valid IDs are 1 - 64
  *
  ******************************************************************************/
 
@@ -140,7 +140,7 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr)
 
        /* Zero is not a valid owner_iD */
 
-       if ((owner_id == 0) || (owner_id > 32)) {
+       if ((owner_id == 0) || (owner_id > 64)) {
                ACPI_REPORT_ERROR(("Invalid owner_id: %2.2X\n", owner_id));
                return_VOID;
        }
@@ -158,8 +158,8 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr)
 
        /* Free the owner ID only if it is valid */
 
-       if (acpi_gbl_owner_id_mask & (1 << owner_id)) {
-               acpi_gbl_owner_id_mask ^= (1 << owner_id);
+       if (acpi_gbl_owner_id_mask & (1ULL << owner_id)) {
+               acpi_gbl_owner_id_mask ^= (1ULL << owner_id);
        }
 
        (void)acpi_ut_release_mutex(ACPI_MTX_CACHES);
index 696f72787fe851126b836709af51e18e84d6092c..84e68cdd451b4e2f9fe8c5705d88185d1b55499f 100644 (file)
@@ -687,7 +687,7 @@ config NVRAM
 
 config RTC
        tristate "Enhanced Real Time Clock Support"
-       depends on !PPC32 && !PARISC && !IA64 && !M68K && (!(SPARC32 || SPARC64) || PCI)
+       depends on !PPC32 && !PARISC && !IA64 && !M68K && (!SPARC || PCI)
        ---help---
          If you say Y here and create a character special file /dev/rtc with
          major number 10 and minor number 135 using mknod ("man mknod"), you
@@ -735,7 +735,7 @@ config SGI_IP27_RTC
 
 config GEN_RTC
        tristate "Generic /dev/rtc emulation"
-       depends on RTC!=y && !IA64 && !ARM && !M32R && !SPARC32 && !SPARC64
+       depends on RTC!=y && !IA64 && !ARM && !M32R && !SPARC
        ---help---
          If you say Y here and create a character special file /dev/rtc with
          major number 10 and minor number 135 using mknod ("man mknod"), you
index 501e557cbc868f6feba2210cc16de25131b6c087..b517ae515801bb39260d398e784d703979435d0c 100644 (file)
@@ -1312,7 +1312,7 @@ static void radeon_set_pcigart(drm_radeon_private_t * dev_priv, int on)
 static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
 {
        drm_radeon_private_t *dev_priv = dev->dev_private;
-       unsigned int mem_size;
+       unsigned int mem_size, aper_size;
 
        DRM_DEBUG("\n");
 
@@ -1527,7 +1527,9 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
        mem_size = RADEON_READ(RADEON_CONFIG_MEMSIZE);
        if (mem_size == 0)
                mem_size = 0x800000;
-       dev_priv->gart_vm_start = dev_priv->fb_location + mem_size;
+       aper_size = max(RADEON_READ(RADEON_CONFIG_APER_SIZE), mem_size);
+
+       dev_priv->gart_vm_start = dev_priv->fb_location + aper_size;
 
 #if __OS_HAS_AGP
        if (!dev_priv->is_pci)
index 449d029ad4f40abc936fb85f6ee66f60511201a6..8b603b2d1c4211ebedb7a4e575db84278b75c276 100644 (file)
@@ -930,8 +930,8 @@ static void kbd_refresh_leds(struct input_handle *handle)
 }
 
 #if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) ||\
-    defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC32) ||\
-    defined(CONFIG_SPARC64) || defined(CONFIG_PARISC) || defined(CONFIG_SUPERH) ||\
+    defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC) ||\
+    defined(CONFIG_PARISC) || defined(CONFIG_SUPERH) ||\
     (defined(CONFIG_ARM) && defined(CONFIG_KEYBOARD_ATKBD) && !defined(CONFIG_ARCH_RPC))
 
 #define HW_RAW(dev) (test_bit(EV_MSC, dev->evbit) && test_bit(MSC_RAW, dev->mscbit) &&\
@@ -958,7 +958,7 @@ static unsigned short x86_keycodes[256] =
 extern int mac_hid_mouse_emulate_buttons(int, int, int);
 #endif /* CONFIG_MAC_EMUMOUSEBTN */
 
-#if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64)
+#ifdef CONFIG_SPARC
 static int sparc_l1_a_state = 0;
 extern void sun_do_break(void);
 #endif
@@ -1045,7 +1045,7 @@ static void kbd_keycode(unsigned int keycode, int down,
 
        if (keycode == KEY_LEFTALT || keycode == KEY_RIGHTALT)
                sysrq_alt = down;
-#if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64)
+#ifdef CONFIG_SPARC
        if (keycode == KEY_STOP)
                sparc_l1_a_state = down;
 #endif
@@ -1072,7 +1072,7 @@ static void kbd_keycode(unsigned int keycode, int down,
                return;
        }
 #endif
-#if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64)
+#ifdef CONFIG_SPARC
        if (keycode == KEY_A && sparc_l1_a_state) {
                sparc_l1_a_state = 0;
                sun_do_break();
index f66c7ad6fd387772b78799fad82464f0971d773d..3c1dafaa3441eacbeae9e2f924219fd5fea5e5fe 100644 (file)
@@ -419,7 +419,7 @@ vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
                        while (this_round > 1) {
                                unsigned short w;
 
-                               w = get_unaligned(((const unsigned short *)con_buf0));
+                               w = get_unaligned(((unsigned short *)con_buf0));
                                vcs_scr_writew(vc, w, org++);
                                con_buf0 += 2;
                                this_round -= 2;
index f00c02a13ed687be66a2c876dff0ceffa421b621..345dbe6f10dff0cf1acae16b4454a708717da7bf 100644 (file)
@@ -26,7 +26,7 @@ comment "FC4 drivers"
 
 config FC4_SOC
        tristate "Sun SOC/Sbus"
-       depends on FC4!=n && (SPARC32 || SPARC64)
+       depends on FC4!=n && SPARC
        help
          Serial Optical Channel is an interface card with one or two Fibre
          Optic ports, each of which can be connected to a disk array. Note
@@ -38,7 +38,7 @@ config FC4_SOC
 
 config FC4_SOCAL
        tristate "Sun SOC+ (aka SOCAL)"
-       depends on FC4!=n && (SPARC32 || SPARC64)
+       depends on FC4!=n && SPARC
        ---help---
          Serial Optical Channel Plus is an interface card with up to two
          Fibre Optic ports. This card supports FC Arbitrated Loop (usually
@@ -62,7 +62,7 @@ config SCSI_PLUTO
          be called pluto.
 
 config SCSI_FCAL
-       tristate "Sun Enterprise Network Array (A5000 and EX500)" if SPARC32 || SPARC64
+       tristate "Sun Enterprise Network Array (A5000 and EX500)" if SPARC
        depends on FC4!=n && SCSI
        help
          This driver drives FC-AL disks connected through a Fibre Channel
@@ -75,7 +75,7 @@ config SCSI_FCAL
 
 config SCSI_FCAL
        prompt "Generic FC-AL disk driver"
-       depends on FC4!=n && SCSI && !SPARC32 && !SPARC64
+       depends on FC4!=n && SCSI && !SPARC
 
 endmenu
 
index 07813fc0523f8504a8102fb432fe1999fa42a20f..e08dbe08f46dd0100b7f31d1b3a82ce2e640b5c0 100644 (file)
@@ -26,7 +26,7 @@ config INPUT_PCSPKR
 
 config INPUT_SPARCSPKR
        tristate "SPARC Speaker support"
-       depends on PCI && (SPARC32 || SPARC64)
+       depends on PCI && SPARC
        help
          Say Y here if you want the standard Speaker on Sparc PCI systems
          to be used for bells and whistles.
index 4bf584364d28303ee49a53822c7a668f35bab49b..2f9a04ae725fa0024735f9864886b0853921efd0 100644 (file)
@@ -95,7 +95,7 @@ static void sermouse_process_msc(struct sermouse *sermouse, signed char data, st
 
        input_sync(dev);
 
-       if (++sermouse->count == (5 - ((sermouse->type == SERIO_SUN) << 1)))
+       if (++sermouse->count == 5)
                sermouse->count = 0;
 }
 
index 13835039a2a798dfeaf9b859ed78d2f1fca1e0e6..cbbf3842da5bb353703757beeeaf8ff6da5967dc 100644 (file)
@@ -21,7 +21,7 @@
 #include "i8042-ip22io.h"
 #elif defined(CONFIG_PPC)
 #include "i8042-ppcio.h"
-#elif defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64)
+#elif defined(CONFIG_SPARC)
 #include "i8042-sparcio.h"
 #elif defined(CONFIG_X86) || defined(CONFIG_IA64)
 #include "i8042-x86ia64io.h"
index 3428e1ed00329f53a48c7b9620a13205178159e1..c36f014f1fdf21bb63c78521608e64e36a60d251 100644 (file)
@@ -389,7 +389,7 @@ static int saa7127_set_vps(struct i2c_client *client, struct v4l2_sliced_vbi_dat
 static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data *data)
 {
        struct saa7127_state *state = i2c_get_clientdata(client);
-       u16 cc = data->data[0] << 8 | data->data[1];
+       u16 cc = data->data[1] << 8 | data->data[0];
        int enable = (data->line != 0);
 
        if (enable && (data->field != 0 || data->line != 21))
@@ -397,7 +397,7 @@ static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data
        if (state->cc_enable != enable) {
                saa7127_dbg("Turn CC %s\n", enable ? "on" : "off");
                saa7127_write(client, SAA7127_REG_CLOSED_CAPTION,
-                               (enable << 6) | 0x11);
+                               (state->xds_enable << 7) | (enable << 6) | 0x11);
                state->cc_enable = enable;
        }
        if (!enable)
@@ -423,7 +423,7 @@ static int saa7127_set_xds(struct i2c_client *client, struct v4l2_sliced_vbi_dat
        if (state->xds_enable != enable) {
                saa7127_dbg("Turn XDS %s\n", enable ? "on" : "off");
                saa7127_write(client, SAA7127_REG_CLOSED_CAPTION,
-                               (enable << 7) | 0x11);
+                               (enable << 7) | (state->cc_enable << 6) | 0x11);
                state->xds_enable = enable;
        }
        if (!enable)
index c512c4411b38319b513b9bc9bfb7ac80bfda2c59..86e1bb391a4e1ea9a62d73e74245e0d24e852297 100644 (file)
@@ -1,11 +1,10 @@
 config VIDEO_SAA7134
        tristate "Philips SAA7134 support"
-       depends on VIDEO_DEV && PCI && I2C && SOUND && SND
+       depends on VIDEO_DEV && PCI && I2C
        select VIDEO_BUF
        select VIDEO_IR
        select VIDEO_TUNER
        select CRC32
-       select SND_PCM_OSS
        ---help---
          This is a video4linux driver for Philips SAA713x based
          TV cards.
@@ -13,6 +12,29 @@ config VIDEO_SAA7134
          To compile this driver as a module, choose M here: the
          module will be called saa7134.
 
+config VIDEO_SAA7134_ALSA
+       tristate "Philips SAA7134 DMA audio support"
+       depends on VIDEO_SAA7134 && SND
+       select SND_PCM_OSS
+       ---help---
+         This is a video4linux driver for direct (DMA) audio in
+         Philips SAA713x based TV cards using ALSA
+
+         To compile this driver as a module, choose M here: the
+         module will be called saa7134-alsa.
+
+config VIDEO_SAA7134_OSS
+       tristate "Philips SAA7134 DMA audio support (OSS, DEPRECATED)"
+       depends on VIDEO_SAA7134 && SOUND_PRIME && (!VIDEO_SAA7134_ALSA || (VIDEO_SAA7134_ALSA=m && m))
+       ---help---
+         This is a video4linux driver for direct (DMA) audio in
+         Philips SAA713x based TV cards using OSS
+
+         This is deprecated in favor of the ALSA module
+
+         To compile this driver as a module, choose M here: the
+         module will be called saa7134-oss.
+
 config VIDEO_SAA7134_DVB
        tristate "DVB/ATSC Support for saa7134 based TV cards"
        depends on VIDEO_SAA7134 && DVB_CORE
index 134f83a962188f7d8da5b0d45db4c5cb380455a3..1ba998424bbdcb376fbf6901028f765031aa1e32 100644 (file)
@@ -4,8 +4,11 @@ saa7134-objs :=        saa7134-cards.o saa7134-core.o saa7134-i2c.o    \
                saa7134-video.o saa7134-input.o
 
 obj-$(CONFIG_VIDEO_SAA7134) +=  saa7134.o saa7134-empress.o \
-                               saa6752hs.o saa7134-alsa.o \
-                               saa7134-oss.o
+                               saa6752hs.o
+
+obj-$(CONFIG_VIDEO_SAA7134_ALSA) += saa7134-alsa.o
+obj-$(CONFIG_VIDEO_SAA7134_OSS) += saa7134-oss.o
+
 obj-$(CONFIG_VIDEO_SAA7134_DVB) += saa7134-dvb.o
 
 EXTRA_CFLAGS += -I$(src)/..
index 6752dd1c1e8a48c4401fc2aa511657603fb78f77..ade05f75fdb05d2c23165c42091913ca56f67859 100644 (file)
@@ -989,6 +989,14 @@ static int saa7134_alsa_init(void)
        struct saa7134_dev *dev = NULL;
        struct list_head *list;
 
+       if (!dmasound_init && !dmasound_exit) {
+               dmasound_init = alsa_device_init;
+               dmasound_exit = alsa_device_exit;
+       } else {
+               printk(KERN_WARNING "saa7134 ALSA: can't load, DMA sound handler already assigned (probably to OSS)\n");
+               return -EBUSY;
+       }
+
        printk(KERN_INFO "saa7134 ALSA driver for DMA sound loaded\n");
 
        list_for_each(list,&saa7134_devlist) {
@@ -1001,9 +1009,6 @@ static int saa7134_alsa_init(void)
                }
        }
 
-       dmasound_init = alsa_device_init;
-       dmasound_exit = alsa_device_exit;
-
        if (dev == NULL)
                printk(KERN_INFO "saa7134 ALSA: no saa7134 cards found\n");
 
@@ -1023,6 +1028,8 @@ static void saa7134_alsa_exit(void)
                snd_card_free(snd_saa7134_cards[idx]);
        }
 
+       dmasound_init = NULL;
+       dmasound_exit = NULL;
        printk(KERN_INFO "saa7134 ALSA driver for DMA sound unloaded\n");
 
        return;
index c450d57b294971bfaff29e6024c6a99fc42fe8ff..8badd2a9cb2ff08d1e5fe07661999c245e6708eb 100644 (file)
@@ -959,8 +959,17 @@ static int saa7134_oss_init(void)
        struct saa7134_dev *dev = NULL;
        struct list_head *list;
 
+       if (!dmasound_init && !dmasound_exit) {
+               dmasound_init = oss_device_init;
+               dmasound_exit = oss_device_exit;
+       } else {
+               printk(KERN_WARNING "saa7134 OSS: can't load, DMA sound handler already assigned (probably to ALSA)\n");
+               return -EBUSY;
+       }
+
        printk(KERN_INFO "saa7134 OSS driver for DMA sound loaded\n");
 
+
        list_for_each(list,&saa7134_devlist) {
                dev = list_entry(list, struct saa7134_dev, devlist);
                if (dev->dmasound.priv_data == NULL) {
@@ -974,9 +983,6 @@ static int saa7134_oss_init(void)
        if (dev == NULL)
                printk(KERN_INFO "saa7134 OSS: no saa7134 cards found\n");
 
-       dmasound_init = oss_device_init;
-       dmasound_exit = oss_device_exit;
-
        return 0;
 
 }
@@ -997,6 +1003,9 @@ static void saa7134_oss_exit(void)
 
        }
 
+       dmasound_init = NULL;
+       dmasound_exit = NULL;
+
        printk(KERN_INFO "saa7134 OSS driver for DMA sound unloaded\n");
 
        return;
index 452ccd5037c3638e4f6d6fcc5ed21ba09b8b9b4f..b9b77cf39a18af4460f85c1e13d514da0c9f8848 100644 (file)
@@ -62,7 +62,7 @@ config MTD_PHYSMAP_BANKWIDTH
 
 config MTD_SUN_UFLASH
        tristate "Sun Microsystems userflash support"
-       depends on (SPARC32 || SPARC64) && MTD_CFI
+       depends on SPARC && MTD_CFI
        help
          This provides a 'mapping' driver which supports the way in
          which user-programmable flash chips are connected on various
index 525624fc03b47016c2d1f1586d49d92e83c4dbba..c39344adecce590376c848311856122c63c77c2c 100644 (file)
@@ -10,7 +10,7 @@
  * trademarks of NVIDIA Corporation in the United States and other
  * countries.
  *
- * Copyright (C) 2003,4 Manfred Spraul
+ * Copyright (C) 2003,4,5 Manfred Spraul
  * Copyright (C) 2004 Andrew de Quincey (wol support)
  * Copyright (C) 2004 Carl-Daniel Hailfinger (invalid MAC handling, insane
  *             IRQ rate fixes, bigendian fixes, cleanups, verification)
  *     0.45: 18 Sep 2005: Remove nv_stop/start_rx from every link check
  *     0.46: 20 Oct 2005: Add irq optimization modes.
  *     0.47: 26 Oct 2005: Add phyaddr 0 in phy scan.
+ *     0.48: 24 Dec 2005: Disable TSO, bugfix for pci_map_single
  *
  * Known bugs:
  * We suspect that on some hardware no TX done interrupts are generated.
  * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few
  * superfluous timer interrupts from the nic.
  */
-#define FORCEDETH_VERSION              "0.47"
+#define FORCEDETH_VERSION              "0.48"
 #define DRV_NAME                       "forcedeth"
 
 #include <linux/module.h>
@@ -871,8 +872,8 @@ static int nv_alloc_rx(struct net_device *dev)
                } else {
                        skb = np->rx_skbuff[nr];
                }
-               np->rx_dma[nr] = pci_map_single(np->pci_dev, skb->data, skb->len,
-                                               PCI_DMA_FROMDEVICE);
+               np->rx_dma[nr] = pci_map_single(np->pci_dev, skb->data,
+                                       skb->end-skb->data, PCI_DMA_FROMDEVICE);
                if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) {
                        np->rx_ring.orig[nr].PacketBuffer = cpu_to_le32(np->rx_dma[nr]);
                        wmb();
@@ -999,7 +1000,7 @@ static void nv_drain_rx(struct net_device *dev)
                wmb();
                if (np->rx_skbuff[i]) {
                        pci_unmap_single(np->pci_dev, np->rx_dma[i],
-                                               np->rx_skbuff[i]->len,
+                                               np->rx_skbuff[i]->end-np->rx_skbuff[i]->data,
                                                PCI_DMA_FROMDEVICE);
                        dev_kfree_skb(np->rx_skbuff[i]);
                        np->rx_skbuff[i] = NULL;
@@ -1334,7 +1335,7 @@ static void nv_rx_process(struct net_device *dev)
                 * the performance.
                 */
                pci_unmap_single(np->pci_dev, np->rx_dma[i],
-                               np->rx_skbuff[i]->len,
+                               np->rx_skbuff[i]->end-np->rx_skbuff[i]->data,
                                PCI_DMA_FROMDEVICE);
 
                {
@@ -2455,7 +2456,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
                np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK;
                dev->features |= NETIF_F_HW_CSUM | NETIF_F_SG;
 #ifdef NETIF_F_TSO
-               dev->features |= NETIF_F_TSO;
+               /* disabled dev->features |= NETIF_F_TSO; */
 #endif
        }
 
index 16bebe7a7ce1fdf43c45334b826bb919d7cb9444..7da0e3dd5fe3ee44c5830761a77f7a1979e4a203 100644 (file)
 #include <asm/irq.h>
 #include <asm/uaccess.h>
 
+MODULE_DESCRIPTION("PHY library");
+MODULE_AUTHOR("Andy Fleming");
+MODULE_LICENSE("GPL");
+
 static struct phy_driver genphy_driver;
 extern int mdio_bus_init(void);
 extern void mdio_bus_exit(void);
index 50430f79f8cf8190541e47495d625cae0cd7a765..1c6d328165bb066bd132b44c1fe4d4cbbbc0a096 100644 (file)
@@ -524,9 +524,6 @@ static int get_filter(void __user *arg, struct sock_filter **p)
        if (copy_from_user(&uprog, arg, sizeof(uprog)))
                return -EFAULT;
 
-       if (uprog.len > BPF_MAXINSNS)
-               return -EINVAL;
-
        if (!uprog.len) {
                *p = NULL;
                return 0;
index 081717d01374349ce68386496f0eb079c064be18..28ce47a02408e9946c2e3941c491b5313ca56db2 100644 (file)
@@ -2907,7 +2907,7 @@ static int __devinit gem_get_device_address(struct gem *gp)
        return 0;
 }
 
-static void __devexit gem_remove_one(struct pci_dev *pdev)
+static void gem_remove_one(struct pci_dev *pdev)
 {
        struct net_device *dev = pci_get_drvdata(pdev);
 
@@ -3181,7 +3181,7 @@ static struct pci_driver gem_driver = {
        .name           = GEM_MODULE_NAME,
        .id_table       = gem_pci_tbl,
        .probe          = gem_init_one,
-       .remove         = __devexit_p(gem_remove_one),
+       .remove         = gem_remove_one,
 #ifdef CONFIG_PM
        .suspend        = gem_suspend,
        .resume         = gem_resume,
index cefb0c08a68d4999c2cb6cf6790f0349e75b9d2a..2fc9893d69e10532bfe50c707c0f0ee816e586b9 100644 (file)
@@ -68,8 +68,8 @@
 
 #define DRV_MODULE_NAME                "tg3"
 #define PFX DRV_MODULE_NAME    ": "
-#define DRV_MODULE_VERSION     "3.46"
-#define DRV_MODULE_RELDATE     "Dec 19, 2005"
+#define DRV_MODULE_VERSION     "3.47"
+#define DRV_MODULE_RELDATE     "Dec 28, 2005"
 
 #define TG3_DEF_MAC_MODE       0
 #define TG3_DEF_RX_MODE                0
@@ -7151,8 +7151,13 @@ do {     p = (u32 *)(orig_p + (reg));            \
        GET_REG32_LOOP(BUFMGR_MODE, 0x58);
        GET_REG32_LOOP(RDMAC_MODE, 0x08);
        GET_REG32_LOOP(WDMAC_MODE, 0x08);
-       GET_REG32_LOOP(RX_CPU_BASE, 0x280);
-       GET_REG32_LOOP(TX_CPU_BASE, 0x280);
+       GET_REG32_1(RX_CPU_MODE);
+       GET_REG32_1(RX_CPU_STATE);
+       GET_REG32_1(RX_CPU_PGMCTR);
+       GET_REG32_1(RX_CPU_HWBKPT);
+       GET_REG32_1(TX_CPU_MODE);
+       GET_REG32_1(TX_CPU_STATE);
+       GET_REG32_1(TX_CPU_PGMCTR);
        GET_REG32_LOOP(GRCMBOX_INTERRUPT_0, 0x110);
        GET_REG32_LOOP(FTQ_RESET, 0x120);
        GET_REG32_LOOP(MSGINT_MODE, 0x0c);
index 94dbcf3537ec290e5b11e4481ce589fd673dcde5..890e1635996b56294fdaca69a9bb37e78ea7ce94 100644 (file)
 /* 0x280 --> 0x400 unused */
 
 #define RX_CPU_BASE                    0x00005000
+#define RX_CPU_MODE                    0x00005000
+#define RX_CPU_STATE                   0x00005004
+#define RX_CPU_PGMCTR                  0x0000501c
+#define RX_CPU_HWBKPT                  0x00005034
 #define TX_CPU_BASE                    0x00005400
+#define TX_CPU_MODE                    0x00005400
+#define TX_CPU_STATE                   0x00005404
+#define TX_CPU_PGMCTR                  0x0000541c
 
 /* Mailboxes */
 #define GRCMBOX_INTERRUPT_0            0x00005800 /* 64-bit */
index d8afd51ff8a59010dd89f26dddcc38ff2e20496c..d1a670b35338e54eaec7548309819b1d1985eb6c 100644 (file)
@@ -1,6 +1,8 @@
 /* orinoco_nortel.c
  * 
  * Driver for Prism II devices which would usually be driven by orinoco_cs,
+ * but are connected to the PCI bus by a PCI-to-PCMCIA adapter used in
+ * Nortel emobility, Symbol LA-4113 and Symbol LA-4123.
  * but are connected to the PCI bus by a Nortel PCI-PCMCIA-Adapter. 
  *
  * Copyright (C) 2002 Tobias Hoffmann
@@ -165,7 +167,7 @@ static int nortel_pci_init_one(struct pci_dev *pdev,
                goto fail_resources;
        }
 
-       iomem = pci_iomap(pdev, 3, 0);
+       iomem = pci_iomap(pdev, 2, 0);
        if (!iomem) {
                err = -ENOMEM;
                goto fail_map_io;
@@ -265,6 +267,8 @@ static void __devexit nortel_pci_remove_one(struct pci_dev *pdev)
 static struct pci_device_id nortel_pci_id_table[] = {
        /* Nortel emobility PCI */
        {0x126c, 0x8030, PCI_ANY_ID, PCI_ANY_ID,},
+       /* Symbol LA-4123 PCI */
+       {0x1562, 0x0001, PCI_ANY_ID, PCI_ANY_ID,},
        {0,},
 };
 
index 011915d5e243c885eccca9e7e3d1131e08963b29..f94f1f25eec60a8e57ba9d311a90c47b2df58594 100644 (file)
@@ -62,7 +62,8 @@ qeth_eddp_free_context(struct qeth_eddp_context *ctx)
        for (i = 0; i < ctx->num_pages; ++i)
                free_page((unsigned long)ctx->pages[i]);
        kfree(ctx->pages);
-       kfree(ctx->elements);
+       if (ctx->elements != NULL)
+               kfree(ctx->elements);
        kfree(ctx);
 }
 
index 99cceb242ec4e31e4d815d8b623cc65f68363bfe..f8f55cc468bacdbe2d386b06dc7ad5e72751b5a5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- * linux/drivers/s390/net/qeth_main.c ($Revision: 1.242 $)
+ * linux/drivers/s390/net/qeth_main.c ($Revision: 1.251 $)
  *
  * Linux on zSeries OSA Express and HiperSockets support
  *
@@ -12,7 +12,7 @@
  *                       Frank Pavlic (fpavlic@de.ibm.com) and
  *                       Thomas Spatzier <tspat@de.ibm.com>
  *
- *    $Revision: 1.242 $        $Date: 2005/05/04 20:19:18 $
+ *    $Revision: 1.251 $        $Date: 2005/05/04 20:19:18 $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -72,7 +72,7 @@
 #include "qeth_eddp.h"
 #include "qeth_tso.h"
 
-#define VERSION_QETH_C "$Revision: 1.242 $"
+#define VERSION_QETH_C "$Revision: 1.251 $"
 static const char *version = "qeth S/390 OSA-Express driver";
 
 /**
@@ -518,7 +518,8 @@ __qeth_set_offline(struct ccwgroup_device *cgdev, int recovery_mode)
 
        QETH_DBF_TEXT(setup, 3, "setoffl");
        QETH_DBF_HEX(setup, 3, &card, sizeof(void *));
-
+       
+       netif_carrier_off(card->dev);
        recover_flag = card->state;
        if (qeth_stop_card(card, recovery_mode) == -ERESTARTSYS){
                PRINT_WARN("Stopping card %s interrupted by user!\n",
@@ -1020,7 +1021,6 @@ void
 qeth_schedule_recovery(struct qeth_card *card)
 {
        QETH_DBF_TEXT(trace,2,"startrec");
-
        if (qeth_set_thread_start_bit(card, QETH_RECOVER_THREAD) == 0)
                schedule_work(&card->kernel_thread_starter);
 }
@@ -1710,7 +1710,6 @@ qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob)
                                           "IP address reset.\n",
                                           QETH_CARD_IFNAME(card),
                                           card->info.chpid);
-                               netif_carrier_on(card->dev);
                                qeth_schedule_recovery(card);
                                return NULL;
                        case IPA_CMD_MODCCID:
@@ -1959,7 +1958,7 @@ qeth_osn_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob,
 {
        u16 s1, s2;
 
-QETH_DBF_TEXT(trace,4,"osndipa");
+       QETH_DBF_TEXT(trace,4,"osndipa");
 
        qeth_prepare_ipa_cmd(card, iob, QETH_PROT_OSN2);
        s1 = (u16)(IPA_PDU_HEADER_SIZE + data_len);
@@ -2203,24 +2202,21 @@ qeth_ulp_setup(struct qeth_card *card)
 }
 
 static inline int
-qeth_check_for_inbound_error(struct qeth_qdio_buffer *buf,
-                            unsigned int qdio_error,
-                            unsigned int siga_error)
+qeth_check_qdio_errors(struct qdio_buffer *buf, unsigned int qdio_error,
+                      unsigned int siga_error, const char *dbftext)
 {
-       int rc = 0;
-
        if (qdio_error || siga_error) {
-               QETH_DBF_TEXT(trace, 2, "qdinerr");
-               QETH_DBF_TEXT(qerr, 2, "qdinerr");
+               QETH_DBF_TEXT(trace, 2, dbftext);
+               QETH_DBF_TEXT(qerr, 2, dbftext);
                QETH_DBF_TEXT_(qerr, 2, " F15=%02X",
-                              buf->buffer->element[15].flags & 0xff);
+                              buf->element[15].flags & 0xff);
                QETH_DBF_TEXT_(qerr, 2, " F14=%02X",
-                              buf->buffer->element[14].flags & 0xff);
+                              buf->element[14].flags & 0xff);
                QETH_DBF_TEXT_(qerr, 2, " qerr=%X", qdio_error);
                QETH_DBF_TEXT_(qerr, 2, " serr=%X", siga_error);
-               rc = 1;
+               return 1;
        }
-       return rc;
+       return 0;
 }
 
 static inline struct sk_buff *
@@ -2769,8 +2765,9 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status,
        for (i = first_element; i < (first_element + count); ++i) {
                index = i % QDIO_MAX_BUFFERS_PER_Q;
                buffer = &card->qdio.in_q->bufs[index];
-               if (!((status == QDIO_STATUS_LOOK_FOR_ERROR) &&
-                     qeth_check_for_inbound_error(buffer, qdio_err, siga_err)))
+               if (!((status & QDIO_STATUS_LOOK_FOR_ERROR) &&
+                     qeth_check_qdio_errors(buffer->buffer, 
+                                            qdio_err, siga_err,"qinerr")))
                        qeth_process_inbound_buffer(card, buffer, index);
                /* clear buffer and give back to hardware */
                qeth_put_buffer_pool_entry(card, buffer->pool_entry);
@@ -2785,12 +2782,13 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status,
 static inline int
 qeth_handle_send_error(struct qeth_card *card,
                       struct qeth_qdio_out_buffer *buffer,
-                      int qdio_err, int siga_err)
+                      unsigned int qdio_err, unsigned int siga_err)
 {
        int sbalf15 = buffer->buffer->element[15].flags & 0xff;
        int cc = siga_err & 3;
 
        QETH_DBF_TEXT(trace, 6, "hdsnderr");
+       qeth_check_qdio_errors(buffer->buffer, qdio_err, siga_err, "qouterr");
        switch (cc) {
        case 0:
                if (qdio_err){
@@ -3047,7 +3045,8 @@ qeth_qdio_output_handler(struct ccw_device * ccwdev, unsigned int status,
        for(i = first_element; i < (first_element + count); ++i){
                buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q];
                /*we only handle the KICK_IT error by doing a recovery */
-               if (qeth_handle_send_error(card, buffer, qdio_error, siga_error)
+               if (qeth_handle_send_error(card, buffer,
+                                          qdio_error, siga_error)
                                == QETH_SEND_ERROR_KICK_IT){
                        netif_stop_queue(card->dev);
                        qeth_schedule_recovery(card);
@@ -3289,7 +3288,6 @@ qeth_init_qdio_info(struct qeth_card *card)
        card->qdio.in_buf_pool.buf_count = card->qdio.init_pool.buf_count;
        INIT_LIST_HEAD(&card->qdio.in_buf_pool.entry_list);
        INIT_LIST_HEAD(&card->qdio.init_pool.entry_list);
-       /* outbound */
 }
 
 static int
@@ -3731,6 +3729,9 @@ qeth_verify_vlan_dev(struct net_device *dev, struct qeth_card *card)
                        break;
                }
        }
+       if (rc && !(VLAN_DEV_INFO(dev)->real_dev->priv == (void *)card))
+               return 0;
+
 #endif
        return rc;
 }
@@ -3807,10 +3808,8 @@ qeth_open(struct net_device *dev)
        card->data.state = CH_STATE_UP;
        card->state = CARD_STATE_UP;
 
-       if (!card->lan_online){
-               if (netif_carrier_ok(dev))
-                       netif_carrier_off(dev);
-       }
+       if (!card->lan_online && netif_carrier_ok(dev))
+               netif_carrier_off(dev);
        return 0;
 }
 
@@ -5870,10 +5869,8 @@ qeth_add_multicast_ipv6(struct qeth_card *card)
        struct inet6_dev *in6_dev;
 
        QETH_DBF_TEXT(trace,4,"chkmcv6");
-       if ((card->options.layer2 == 0) &&
-           (!qeth_is_supported(card, IPA_IPV6)) )
+       if (!qeth_is_supported(card, IPA_IPV6)) 
                return ;
-
        in6_dev = in6_dev_get(card->dev);
        if (in6_dev == NULL)
                return;
@@ -7936,8 +7933,8 @@ __qeth_set_online(struct ccwgroup_device *gdev, int recovery_mode)
                QETH_DBF_TEXT_(setup, 2, "6err%d", rc);
                goto out_remove;
        }
-/*maybe it was set offline without ifconfig down
- * we can also use this state for recovery purposes*/
+       netif_carrier_on(card->dev);
+
        qeth_set_allowed_threads(card, 0xffffffff, 0);
        if (recover_flag == CARD_STATE_RECOVER)
                qeth_start_again(card, recovery_mode);
index f0a080a9e5155cdc9cde20731586065a756b7b0c..5f8754addc14fe62fc0f4d675fc6822594644579 100644 (file)
@@ -11,7 +11,7 @@
 #include <asm/cio.h>
 #include "qeth_mpc.h"
 
-const char *VERSION_QETH_MPC_C = "$Revision: 1.12 $";
+const char *VERSION_QETH_MPC_C = "$Revision: 1.13 $";
 
 unsigned char IDX_ACTIVATE_READ[]={
        0x00,0x00,0x80,0x00, 0x00,0x00,0x00,0x00,
index 5f71486e708cf0ee4cf96e4640aac699ad3aacd7..864cec5f6c62c516aa91ed360ee5fd80f3f0c899 100644 (file)
 
 #include <asm/qeth.h>
 
-#define VERSION_QETH_MPC_H "$Revision: 1.44 $"
+#define VERSION_QETH_MPC_H "$Revision: 1.46 $"
 
 extern const char *VERSION_QETH_MPC_C;
 
 #define IPA_PDU_HEADER_SIZE    0x40
 #define QETH_IPA_PDU_LEN_TOTAL(buffer) (buffer+0x0e)
 #define QETH_IPA_PDU_LEN_PDU1(buffer) (buffer+0x26)
-#define QETH_IPA_PDU_LEN_PDU2(buffer) (buffer+0x2a)
+#define QETH_IPA_PDU_LEN_PDU2(buffer) (buffer+0x29)
 #define QETH_IPA_PDU_LEN_PDU3(buffer) (buffer+0x3a)
 
 extern unsigned char IPA_PDU_HEADER[];
index f2ccfea8fdb89cabe2bf65a7885c3fbcde3b4798..7bf35098831e50603107d74befd95314d4062893 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- * linux/drivers/s390/net/qeth_fs.c ($Revision: 1.13 $)
+ * linux/drivers/s390/net/qeth_fs.c ($Revision: 1.16 $)
  *
  * Linux on zSeries OSA Express and HiperSockets support
  * This file contains code related to procfs.
@@ -21,7 +21,7 @@
 #include "qeth_mpc.h"
 #include "qeth_fs.h"
 
-const char *VERSION_QETH_PROC_C = "$Revision: 1.13 $";
+const char *VERSION_QETH_PROC_C = "$Revision: 1.16 $";
 
 /***** /proc/qeth *****/
 #define QETH_PROCFILE_NAME "qeth"
@@ -30,30 +30,26 @@ static struct proc_dir_entry *qeth_procfile;
 static int
 qeth_procfile_seq_match(struct device *dev, void *data)
 {
-       return 1;
+       return(dev ? 1 : 0);
 }
 
 static void *
 qeth_procfile_seq_start(struct seq_file *s, loff_t *offset)
 {
-       struct device *dev;
-       loff_t nr;
-
+       struct device *dev = NULL;
+       loff_t nr = 0;
+       
        down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem);
-
-       nr = *offset;
-       if (nr == 0)
+       if (*offset == 0)
                return SEQ_START_TOKEN;
-
-       dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL,
-                                NULL, qeth_procfile_seq_match);
-
-       /* get card at pos *offset */
-       nr = *offset;
-       while (nr-- > 1 && dev)
+       while (1) {
                dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev,
                                         NULL, qeth_procfile_seq_match);
-       return (void *) dev;
+               if (++nr == *offset)
+                       break;
+               put_device(dev);
+       }
+       return dev;
 }
 
 static void
@@ -66,19 +62,14 @@ static void *
 qeth_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset)
 {
        struct device *prev, *next;
-
-       if (it == SEQ_START_TOKEN) {
-               next = driver_find_device(&qeth_ccwgroup_driver.driver,
-                                         NULL, NULL, qeth_procfile_seq_match);
-               if (next)
-                       (*offset)++;
-               return (void *) next;
-       }
-       prev = (struct device *) it;
+       
+       if (it == SEQ_START_TOKEN) 
+               prev = NULL;
+       else
+               prev = (struct device *) it;
        next = driver_find_device(&qeth_ccwgroup_driver.driver,
                                  prev, NULL, qeth_procfile_seq_match);
-       if (next)
-               (*offset)++;
+       (*offset)++;
        return (void *) next;
 }
 
@@ -87,7 +78,7 @@ qeth_get_router_str(struct qeth_card *card, int ipv)
 {
        int routing_type = 0;
 
-       if (ipv == 4){
+       if (ipv == 4) {
                routing_type = card->options.route4.type;
        } else {
 #ifdef CONFIG_QETH_IPV6
@@ -154,6 +145,7 @@ qeth_procfile_seq_show(struct seq_file *s, void *it)
                                        card->qdio.in_buf_pool.buf_count);
                else
                        seq_printf(s, "  +++ LAN OFFLINE +++\n");
+               put_device(device);
        }
        return 0;
 }
@@ -184,51 +176,16 @@ static struct file_operations qeth_procfile_fops = {
 static struct proc_dir_entry *qeth_perf_procfile;
 
 #ifdef CONFIG_QETH_PERF_STATS
-
-static void *
-qeth_perf_procfile_seq_start(struct seq_file *s, loff_t *offset)
-{
-       struct device *dev = NULL;
-       int nr;
-
-       down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem);
-       /* get card at pos *offset */
-       dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL, NULL,
-                                qeth_procfile_seq_match);
-
-       /* get card at pos *offset */
-       nr = *offset;
-       while (nr-- > 1 && dev)
-               dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev,
-                                        NULL, qeth_procfile_seq_match);
-       return (void *) dev;
-}
-
-static void
-qeth_perf_procfile_seq_stop(struct seq_file *s, void* it)
-{
-       up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem);
-}
-
-static void *
-qeth_perf_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset)
-{
-       struct device *prev, *next;
-
-       prev = (struct device *) it;
-       next = driver_find_device(&qeth_ccwgroup_driver.driver, prev,
-                                 NULL, qeth_procfile_seq_match);
-       if (next)
-               (*offset)++;
-       return (void *) next;
-}
-
 static int
 qeth_perf_procfile_seq_show(struct seq_file *s, void *it)
 {
        struct device *device;
        struct qeth_card *card;
 
+       
+       if (it == SEQ_START_TOKEN)
+               return 0;
+
        device = (struct device *) it;
        card = device->driver_data;
        seq_printf(s, "For card with devnos %s/%s/%s (%s):\n",
@@ -295,13 +252,14 @@ qeth_perf_procfile_seq_show(struct seq_file *s, void *it)
                        card->perf_stats.outbound_do_qdio_time,
                        card->perf_stats.outbound_do_qdio_cnt
                  );
+       put_device(device);
        return 0;
 }
 
 static struct seq_operations qeth_perf_procfile_seq_ops = {
-       .start = qeth_perf_procfile_seq_start,
-       .stop  = qeth_perf_procfile_seq_stop,
-       .next  = qeth_perf_procfile_seq_next,
+       .start = qeth_procfile_seq_start,
+       .stop  = qeth_procfile_seq_stop,
+       .next  = qeth_procfile_seq_next,
        .show  = qeth_perf_procfile_seq_show,
 };
 
@@ -324,93 +282,6 @@ static struct file_operations qeth_perf_procfile_fops = {
 #define qeth_perf_procfile_created 1
 #endif /* CONFIG_QETH_PERF_STATS */
 
-/***** /proc/qeth_ipa_takeover *****/
-#define QETH_IPATO_PROCFILE_NAME "qeth_ipa_takeover"
-static struct proc_dir_entry *qeth_ipato_procfile;
-
-static void *
-qeth_ipato_procfile_seq_start(struct seq_file *s, loff_t *offset)
-{
-       struct device *dev;
-       loff_t nr;
-
-       down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem);
-       /* TODO: finish this */
-       /*
-        * maybe SEQ_SATRT_TOKEN can be returned for offset 0
-        * output driver settings then;
-        * else output setting for respective card
-        */
-
-       dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL, NULL,
-                                qeth_procfile_seq_match);
-
-       /* get card at pos *offset */
-       nr = *offset;
-       while (nr-- > 1 && dev)
-               dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev,
-                                        NULL, qeth_procfile_seq_match);
-       return (void *) dev;
-}
-
-static void
-qeth_ipato_procfile_seq_stop(struct seq_file *s, void* it)
-{
-       up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem);
-}
-
-static void *
-qeth_ipato_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset)
-{
-       struct device *prev, *next;
-
-       prev = (struct device *) it;
-       next = driver_find_device(&qeth_ccwgroup_driver.driver, prev,
-                                 NULL, qeth_procfile_seq_match);
-       if (next)
-               (*offset)++;
-       return (void *) next;
-}
-
-static int
-qeth_ipato_procfile_seq_show(struct seq_file *s, void *it)
-{
-       struct device *device;
-       struct qeth_card *card;
-
-       /* TODO: finish this */
-       /*
-        * maybe SEQ_SATRT_TOKEN can be returned for offset 0
-        * output driver settings then;
-        * else output setting for respective card
-        */
-       device = (struct device *) it;
-       card = device->driver_data;
-
-       return 0;
-}
-
-static struct seq_operations qeth_ipato_procfile_seq_ops = {
-       .start = qeth_ipato_procfile_seq_start,
-       .stop  = qeth_ipato_procfile_seq_stop,
-       .next  = qeth_ipato_procfile_seq_next,
-       .show  = qeth_ipato_procfile_seq_show,
-};
-
-static int
-qeth_ipato_procfile_open(struct inode *inode, struct file *file)
-{
-       return seq_open(file, &qeth_ipato_procfile_seq_ops);
-}
-
-static struct file_operations qeth_ipato_procfile_fops = {
-       .owner   = THIS_MODULE,
-       .open    = qeth_ipato_procfile_open,
-       .read    = seq_read,
-       .llseek  = seq_lseek,
-       .release = seq_release,
-};
-
 int __init
 qeth_create_procfs_entries(void)
 {
@@ -426,13 +297,7 @@ qeth_create_procfs_entries(void)
                qeth_perf_procfile->proc_fops = &qeth_perf_procfile_fops;
 #endif /* CONFIG_QETH_PERF_STATS */
 
-       qeth_ipato_procfile = create_proc_entry(QETH_IPATO_PROCFILE_NAME,
-                                          S_IFREG | 0444, NULL);
-       if (qeth_ipato_procfile)
-               qeth_ipato_procfile->proc_fops = &qeth_ipato_procfile_fops;
-
        if (qeth_procfile &&
-           qeth_ipato_procfile &&
            qeth_perf_procfile_created)
                return 0;
        else
@@ -446,62 +311,5 @@ qeth_remove_procfs_entries(void)
                remove_proc_entry(QETH_PROCFILE_NAME, NULL);
        if (qeth_perf_procfile)
                remove_proc_entry(QETH_PERF_PROCFILE_NAME, NULL);
-       if (qeth_ipato_procfile)
-               remove_proc_entry(QETH_IPATO_PROCFILE_NAME, NULL);
 }
 
-
-/* ONLY FOR DEVELOPMENT! -> make it as module */
-/*
-static void
-qeth_create_sysfs_entries(void)
-{
-       struct device *dev;
-
-       down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem);
-
-       list_for_each_entry(dev, &qeth_ccwgroup_driver.driver.devices,
-                       driver_list)
-               qeth_create_device_attributes(dev);
-
-       up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem);
-}
-
-static void
-qeth_remove_sysfs_entries(void)
-{
-       struct device *dev;
-
-       down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem);
-
-       list_for_each_entry(dev, &qeth_ccwgroup_driver.driver.devices,
-                       driver_list)
-               qeth_remove_device_attributes(dev);
-
-       up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem);
-}
-
-static int __init
-qeth_fs_init(void)
-{
-       printk(KERN_INFO "qeth_fs_init\n");
-       qeth_create_procfs_entries();
-       qeth_create_sysfs_entries();
-
-       return 0;
-}
-
-static void __exit
-qeth_fs_exit(void)
-{
-       printk(KERN_INFO "qeth_fs_exit\n");
-       qeth_remove_procfs_entries();
-       qeth_remove_sysfs_entries();
-}
-
-
-module_init(qeth_fs_init);
-module_exit(qeth_fs_exit);
-
-MODULE_LICENSE("GPL");
-*/
index ddd6019ba0926a7272b3b1090147b3c5fca4a678..0ea185f70f75277f49a26221640db8c3bbf8859c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.58 $)
+ * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.60 $)
  *
  * Linux on zSeries OSA Express and HiperSockets support
  * This file contains code related to sysfs.
@@ -20,7 +20,7 @@
 #include "qeth_mpc.h"
 #include "qeth_fs.h"
 
-const char *VERSION_QETH_SYS_C = "$Revision: 1.58 $";
+const char *VERSION_QETH_SYS_C = "$Revision: 1.60 $";
 
 /*****************************************************************************/
 /*                                                                           */
@@ -160,7 +160,7 @@ qeth_dev_portname_store(struct device *dev, struct device_attribute *attr, const
                return -EPERM;
 
        tmp = strsep((char **) &buf, "\n");
-       if ((strlen(tmp) > 8) || (strlen(tmp) < 2))
+       if ((strlen(tmp) > 8) || (strlen(tmp) == 0))
                return -EINVAL;
 
        card->info.portname[0] = strlen(tmp);
index e245af3c4cbdfdb65bf2dfa83c75a801df4da043..3c50b6f24f5170aaa3093bbe3fc86f6c68feaaa5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/s390/net/qeth_tso.h ($Revision: 1.7 $)
+ * linux/drivers/s390/net/qeth_tso.h ($Revision: 1.8 $)
  *
  * Header file for qeth TCP Segmentation Offload support.
  *
@@ -7,7 +7,7 @@
  *
  *    Author(s): Frank Pavlic <fpavlic@de.ibm.com>
  *
- *    $Revision: 1.7 $  $Date: 2005/05/04 20:19:18 $
+ *    $Revision: 1.8 $  $Date: 2005/05/04 20:19:18 $
  *
  */
 #ifndef __QETH_TSO_H__
index 72ddba98f8fb562241bd263777a97867bc2fd1a2..2282c04fee4635097c0f3566f4251e6bd7cc5238 100644 (file)
@@ -2044,7 +2044,7 @@ static int atapi_qc_complete(struct ata_queued_cmd *qc, unsigned int err_mask)
        else {
                u8 *scsicmd = cmd->cmnd;
 
-               if (scsicmd[0] == INQUIRY) {
+               if ((scsicmd[0] == INQUIRY) && ((scsicmd[1] & 0x03) == 0)) {
                        u8 *buf = NULL;
                        unsigned int buflen;
 
@@ -2057,9 +2057,6 @@ static int atapi_qc_complete(struct ata_queued_cmd *qc, unsigned int err_mask)
         * to indicate to the Linux scsi midlayer this is a modern
         * device.  2) Ensure response data format / ATAPI information
         * are always correct.
-        */
-       /* FIXME: do we ever override EVPD pages and the like, with
-        * this code?
         */
                        if (buf[2] == 0) {
                                buf[2] = 0x5;
index e36c21e06d31e7b40e2599992082f98492c72c9b..4e6709f448e198b6299204730c0771a03cf7a064 100644 (file)
@@ -418,8 +418,9 @@ static void scsi_target_reap_work(void *data) {
        if (--starget->reap_ref == 0 && list_empty(&starget->devices)) {
                list_del_init(&starget->siblings);
                spin_unlock_irqrestore(shost->host_lock, flags);
+               transport_remove_device(&starget->dev);
                device_del(&starget->dev);
-               transport_unregister_device(&starget->dev);
+               transport_destroy_device(&starget->dev);
                put_device(&starget->dev);
                return;
 
index ad47c1b84c3f0677f0d6459c89294e4eb912d331..812bae62c8ecffdf653900c786ecf03a1373c999 100644 (file)
@@ -10,7 +10,7 @@ menu "Serial drivers"
 # The new 8250/16550 serial drivers
 config SERIAL_8250
        tristate "8250/16550 and compatible serial support"
-       depends on (BROKEN || !(SPARC64 || SPARC32))
+       depends on (BROKEN || !SPARC)
        select SERIAL_CORE
        ---help---
          This selects whether you want to include the driver for the standard
@@ -469,14 +469,14 @@ config SERIAL_IMX_CONSOLE
 
 config SERIAL_SUNCORE
        bool
-       depends on SPARC32 || SPARC64
+       depends on SPARC
        select SERIAL_CORE
        select SERIAL_CORE_CONSOLE
        default y
 
 config SERIAL_SUNZILOG
        tristate "Sun Zilog8530 serial support"
-       depends on SPARC32 || SPARC64
+       depends on SPARC
        help
          This driver supports the Zilog8530 serial ports found on many Sparc
          systems.  Say Y or M if you want to be able to these serial ports.
@@ -491,7 +491,7 @@ config SERIAL_SUNZILOG_CONSOLE
 
 config SERIAL_SUNSU
        tristate "Sun SU serial support"
-       depends on (SPARC32 || SPARC64) && PCI
+       depends on SPARC && PCI
        help
          This driver supports the 8250 serial ports that run the keyboard and
          mouse on (PCI) UltraSPARC systems.  Say Y or M if you want to be able
@@ -547,7 +547,7 @@ config PDC_CONSOLE
 
 config SERIAL_SUNSAB
        tristate "Sun Siemens SAB82532 serial support"
-       depends on (SPARC32 || SPARC64) && PCI
+       depends on SPARC && PCI
        help
          This driver supports the Siemens SAB82532 DUSCC serial ports on newer
          (PCI) UltraSPARC systems.  Say Y or M if you want to be able to these
index 89d7bd3eaee39272c7ede6175ab4c26d478b7bac..d84476ee65923d85a4ce5043b162565324c6db79 100644 (file)
@@ -160,7 +160,7 @@ pl011_rx_chars(struct uart_amba_port *uap)
                                flag = TTY_FRAME;
                }
 
-               if (uart_handle_sysrq_char(&uap->port, ch, regs))
+               if (uart_handle_sysrq_char(&uap->port, ch & 255, regs))
                        goto ignore_char;
 
                uart_insert_char(&uap->port, ch, UART011_DR_OE, ch, flag);
index 1c3b472a3bca9acdb54f2125380f514e420f75da..0e2505c073db31d559039e884c2190f8c939fbae 100644 (file)
@@ -2103,7 +2103,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
         * values.
         */
        input_set_abs_params(inputdev, ABS_X, 0, 2999, 0, 0);
-       input_set_abs_params(inputdev, ABS_X, 0, 2249, 0, 0);
+       input_set_abs_params(inputdev, ABS_Y, 0, 2249, 0, 0);
        input_set_abs_params(inputdev, ABS_PRESSURE, 0, 511, 0, 0);
        input_set_abs_params(inputdev, ABS_TILT_X, AIPTEK_TILT_MIN, AIPTEK_TILT_MAX, 0, 0);
        input_set_abs_params(inputdev, ABS_TILT_Y, AIPTEK_TILT_MIN, AIPTEK_TILT_MAX, 0, 0);
index 3e470c8b4193a56564ce39d3dc11ec919afc7260..cc8e3bf5001b44e5393ae7783427fe2ad3204cbf 100644 (file)
@@ -536,13 +536,13 @@ config FB_SUN3
 
 config FB_SBUS
        bool "SBUS and UPA framebuffers"
-       depends on (FB = y) && (SPARC32 || SPARC64)
+       depends on (FB = y) && SPARC
        help
          Say Y if you want support for SBUS or UPA based frame buffer device.
 
 config FB_BW2
        bool "BWtwo support"
-       depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3)
+       depends on (FB = y) && (SPARC && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3)
        select FB_CFB_FILLRECT
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
@@ -551,7 +551,7 @@ config FB_BW2
 
 config FB_CG3
        bool "CGthree support"
-       depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3)
+       depends on (FB = y) && (SPARC && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3)
        select FB_CFB_FILLRECT
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
@@ -560,7 +560,7 @@ config FB_CG3
 
 config FB_CG6
        bool "CGsix (GX,TurboGX) support"
-       depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3)
+       depends on (FB = y) && (SPARC && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3)
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
        help
@@ -1268,7 +1268,7 @@ config FB_LEO
 
 config FB_PCI
        bool "PCI framebuffers"
-       depends on (FB = y) && PCI && (SPARC64 || SPARC32)
+       depends on (FB = y) && PCI && SPARC
 
 config FB_IGA
        bool "IGA 168x display support"
index 5f74df993406073c883453364855da7281ca8ff8..a5d09e159cd111d80d12754e1f08afccc39e8268 100644 (file)
@@ -6,7 +6,7 @@ menu "Console display driver support"
 
 config VGA_CONSOLE
        bool "VGA text console" if EMBEDDED || !X86
-       depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC32 && !SPARC64 && !M68K && !PARISC && !ARCH_VERSATILE
+       depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC && !M68K && !PARISC && !ARCH_VERSATILE
        default y
        help
          Saying Y here will allow you to use Linux in text mode through a
@@ -68,7 +68,7 @@ config SGI_NEWPORT_CONSOLE
 
 config PROM_CONSOLE
        bool "PROM console"
-       depends on SPARC32 || SPARC64
+       depends on SPARC
        help
          Say Y to build a console driver for Sun machines that uses the
          terminal emulation built into their console PROMS.
@@ -136,7 +136,7 @@ config FONTS
 config FONT_8x8
        bool "VGA 8x8 font" if FONTS
        depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE
-       default y if !SPARC32 && !SPARC64 && !FONTS
+       default y if !SPARC && !FONTS
        help
          This is the "high resolution" font for the VGA frame buffer (the one
          provided by the text console 80x50 (and higher) modes).
@@ -150,7 +150,7 @@ config FONT_8x8
 config FONT_8x16
        bool "VGA 8x16 font" if FONTS
        depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE=y || STI_CONSOLE || USB_SISUSBVGA_CON 
-       default y if !SPARC32 && !SPARC64 && !FONTS
+       default y if !SPARC && !FONTS
        help
          This is the "high resolution" font for the VGA frame buffer (the one
          provided by the VGA text console 80x25 mode.
@@ -160,7 +160,7 @@ config FONT_8x16
 config FONT_6x11
        bool "Mac console 6x11 font (not supported by all drivers)" if FONTS
        depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE
-       default y if !SPARC32 && !SPARC64 && !FONTS && MAC
+       default y if !SPARC && !FONTS && MAC
        help
          Small console font with Macintosh-style high-half glyphs.  Some Mac
          framebuffer drivers don't support this one at all.
@@ -176,7 +176,7 @@ config FONT_7x14
 config FONT_PEARL_8x8
        bool "Pearl (old m68k) console 8x8 font" if FONTS
        depends on FRAMEBUFFER_CONSOLE
-       default y if !SPARC32 && !SPARC64 && !FONTS && AMIGA
+       default y if !SPARC && !FONTS && AMIGA
        help
          Small console font with PC-style control-character and high-half
          glyphs.
@@ -184,24 +184,24 @@ config FONT_PEARL_8x8
 config FONT_ACORN_8x8
        bool "Acorn console 8x8 font" if FONTS
        depends on FRAMEBUFFER_CONSOLE
-       default y if !SPARC32 && !SPARC64 && !FONTS && ARM && ARCH_ACORN
+       default y if !SPARC && !FONTS && ARM && ARCH_ACORN
        help
          Small console font with PC-style control characters and high-half
          glyphs.
 
 config FONT_MINI_4x6
        bool "Mini 4x6 font"
-       depends on !SPARC32 && !SPARC64 && FONTS
+       depends on !SPARC && FONTS
 
 config FONT_SUN8x16
        bool "Sparc console 8x16 font"
-       depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64)
+       depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC)
        help
          This is the high resolution console font for Sun machines. Say Y.
 
 config FONT_SUN12x22
        bool "Sparc console 12x22 font (not supported by all drivers)"
-       depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64)
+       depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC)
        help
          This is the high resolution console font for Sun machines with very
          big letters (like the letters used in the SPARC PROM). If the
index 8cb7fb4db4418b8815b6be81d374ef65343afa35..f0e6512c87ff4bd8e0acfdb3e7576c4e5405b428 100644 (file)
@@ -47,7 +47,7 @@ config LOGO_SGI_CLUT224
 
 config LOGO_SUN_CLUT224
        bool "224-color Sun Linux logo"
-       depends on LOGO && (SPARC32 || SPARC64)
+       depends on LOGO && SPARC
        default y
 
 config LOGO_SUPERH_MONO
index 646c43f921c55b3bc0774fecbd92cb38778b3b33..3a74a63dd4f228a4cb0691d24d796b65b25348d9 100644 (file)
@@ -46,6 +46,9 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map,
        unsigned long off;
        int i;
                                         
+       if (!(vma->vm_flags & (VM_SHARED | VM_MAYSHARE)))
+               return -EINVAL;
+
        size = vma->vm_end - vma->vm_start;
        if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT))
                return -EINVAL;
index 4684eb7d48c6ff15338083b4797558094b61be30..b3ad0bd0312f2ecc7e9ab8ea2dc37639a3a7b0d0 100644 (file)
@@ -501,11 +501,16 @@ int hostfs_commit_write(struct file *file, struct page *page, unsigned from,
        long long start;
        int err = 0;
 
-       start = (long long) (page->index << PAGE_CACHE_SHIFT) + from;
+       start = (((long long) page->index) << PAGE_CACHE_SHIFT) + from;
        buffer = kmap(page);
        err = write_file(FILE_HOSTFS_I(file)->fd, &start, buffer + from,
                         to - from);
        if(err > 0) err = 0;
+
+       /* Actually, if !err, write_file has added to-from to start, so, despite
+        * the appearance, we are comparing i_size against the _last_ written
+        * location, as we should. */
+
        if(!err && (start > inode->i_size))
                inode->i_size = start;
 
@@ -910,10 +915,8 @@ static struct inode_operations hostfs_dir_iops = {
 int hostfs_link_readpage(struct file *file, struct page *page)
 {
        char *buffer, *name;
-       long long start;
        int err;
 
-       start = page->index << PAGE_CACHE_SHIFT;
        buffer = kmap(page);
        name = inode_name(page->mapping->host, 0);
        if(name == NULL) return(-ENOMEM);
index eb5cd4c3bbfdbf3aae12b0f367f544fcc4c4a13b..7a79fbe9f5394c67dd53b01526d37e29fae0ce4e 100644 (file)
@@ -509,7 +509,8 @@ static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl)
                return -EINVAL;
 
        /* No mandatory locks over NFS */
-       if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
+       if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID &&
+           fl->fl_type != F_UNLCK)
                return -ENOLCK;
 
        if (IS_GETLK(cmd))
index deb25b661f048467f828f6a671c988d1acf1cf10..656bc43431b9cb362829a150bf7532bbebd087bd 100644 (file)
@@ -203,7 +203,7 @@ config ULTRIX_PARTITION
 
 config SUN_PARTITION
        bool "Sun partition tables support" if PARTITION_ADVANCED
-       default y if (SPARC32 || SPARC64 || SUN3 || SUN3X)
+       default y if (SPARC || SUN3 || SUN3X)
        ---help---
          Like most systems, SunOS uses its own hard disk partition table
          format, incompatible with all others. Saying Y here allows you to
index e9c2790139ecfa47165f006afd285705618e34d9..4ab2ca18b8df483bb672cc34e6129ad3b516955e 100644 (file)
@@ -211,7 +211,7 @@ ACPI_EXTERN u32 acpi_gbl_original_mode;
 ACPI_EXTERN u32 acpi_gbl_rsdp_original_location;
 ACPI_EXTERN u32 acpi_gbl_ns_lookup_count;
 ACPI_EXTERN u32 acpi_gbl_ps_find_count;
-ACPI_EXTERN u32 acpi_gbl_owner_id_mask;
+ACPI_EXTERN u64 acpi_gbl_owner_id_mask;
 ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save;
 ACPI_EXTERN u16 acpi_gbl_global_lock_handle;
 ACPI_EXTERN u8 acpi_gbl_debugger_configuration;
index a9f738bf18a7e739325a4221269128fa0857ba2b..f7c330467e7e92247993d6b1fe3b1b3c7ed950a6 100644 (file)
@@ -38,7 +38,7 @@
 /*
  * Returns the number of the first CPU on Node 'node'.
  */
-#define node_to_first_cpu(node) (__ffs(node_to_cpumask(node)))
+#define node_to_first_cpu(node) (first_cpu(node_to_cpumask(node)))
 
 /*
  * Determines the node for a given pci bus
index 8a78a4ace53c5e6294b3de06d8a0b96e4851fccd..9942cc393064a825d6f64159b9135b599f592b44 100644 (file)
@@ -64,7 +64,7 @@
                     ::"a" (rw) : "memory")
 
 #define __build_write_lock_const(rw, helper) \
-       asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \
+       asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",%0\n\t" \
                     "jnz 2f\n" \
                     "1:\n" \
                    LOCK_SECTION_START("") \
index d39ebd5263ed4ff1fdf98739c93fe1a51750d903..7d82bc56b9fae2f123326a936699819b4a5effa3 100644 (file)
@@ -23,7 +23,7 @@ extern int __node_distance(int, int);
 
 #define cpu_to_node(cpu)               (cpu_to_node[cpu])
 #define parent_node(node)              (node)
-#define node_to_first_cpu(node)        (__ffs(node_to_cpumask[node]))
+#define node_to_first_cpu(node)        (first_cpu(node_to_cpumask[node]))
 #define node_to_cpumask(node)          (node_to_cpumask[node])
 #define pcibus_to_node(bus)            ((long)(bus->sysdata))  
 #define pcibus_to_cpumask(bus)         node_to_cpumask(pcibus_to_node(bus));
index e2f935038013b745252dd4ac6670c18474ec1e99..d7c41d1d706a30d592d6183079627afb101d42f8 100644 (file)
@@ -18,6 +18,7 @@
                                           fallback, no routers on link */
 #define RTF_ADDRCONF   0x00040000      /* addrconf route - RA          */
 #define RTF_PREFIX_RT  0x00080000      /* A prefix only route - RA     */
+#define RTF_ANYCAST    0x00100000      /* Anycast                      */
 
 #define RTF_NONEXTHOP  0x00200000      /* route with no nexthop        */
 #define RTF_EXPIRES    0x00400000
index 2352bcd31a06f15874e3d2f735178f1af05a2827..db4f3776978aafe81c36caf263f001d195e28311 100644 (file)
  * L. Haag
  *
  * $Log: r3964.h,v $
+ * Revision 1.4  2005/12/21 19:54:24  Kurt Huwig <kurt huwig de>
+ * Fixed HZ usage on 2.6 kernels
+ * Removed unnecessary include
+ *
  * Revision 1.3  2001/03/18 13:02:24  dwmw2
  * Fix timer usage, use spinlocks properly.
  *
 #define __LINUX_N_R3964_H__
 
 /* line disciplines for r3964 protocol */
-#include <asm/termios.h>
 
 #ifdef __KERNEL__
+
+#include <linux/param.h>
+
 /*
  * Common ascii handshake characters:
  */
 #define NAK 0x15
 
 /*
- * Timeouts (msecs/10 msecs per timer interrupt):
+ * Timeouts (from milliseconds to jiffies)
  */
 
-#define R3964_TO_QVZ 550/10
-#define R3964_TO_ZVZ 220/10
-#define R3964_TO_NO_BUF 400/10
-#define R3964_NO_TX_ROOM 100/10
-#define R3964_TO_RX_PANIC 4000/10
+#define R3964_TO_QVZ ((550)*HZ/1000)
+#define R3964_TO_ZVZ ((220)*HZ/1000)
+#define R3964_TO_NO_BUF ((400)*HZ/1000)
+#define R3964_NO_TX_ROOM ((100)*HZ/1000)
+#define R3964_TO_RX_PANIC ((4000)*HZ/1000)
 #define R3964_MAX_RETRIES 5
 
 #endif
index d9a2f5254a51194858091bec44bf6bfb43cb9168..5769d14d1e6ab658b7ab8b2a2c9de117ec2b4838 100644 (file)
@@ -48,6 +48,7 @@ do { \
 #define preempt_enable() \
 do { \
        preempt_enable_no_resched(); \
+       barrier(); \
        preempt_check_resched(); \
 } while (0)
 
index e97a9accb71df31630d5c4d4455ef52bec535991..eb8afe3499a92766245e59c17ab70bfd84da3ffb 100644 (file)
@@ -24,6 +24,7 @@
 #define IF_RA_MANAGED  0x40
 #define IF_RA_RCVD     0x20
 #define IF_RS_SENT     0x10
+#define IF_READY       0x80000000
 
 /* prefix flags */
 #define IF_PREFIX_ONLINK       0x01
@@ -82,6 +83,7 @@ struct ipv6_mc_socklist
        struct in6_addr         addr;
        int                     ifindex;
        struct ipv6_mc_socklist *next;
+       rwlock_t                sflock;
        unsigned int            sfmode;         /* MCAST_{INCLUDE,EXCLUDE} */
        struct ip6_sf_socklist  *sflist;
 };
index 19af028a3e380d251d31e4b8ec4cd96ee679a1cb..cb5bb2a5df96f417f5c44b1108e8483ee3a10585 100644 (file)
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -381,6 +381,7 @@ static void update_queue (struct sem_array * sma)
                        /* hands-off: q will disappear immediately after
                         * writing q->status.
                         */
+                       smp_wmb();
                        q->status = error;
                        q = n;
                } else {
@@ -461,6 +462,7 @@ static void freeary (struct sem_array *sma, int id)
                n = q->next;
                q->status = IN_WAKEUP;
                wake_up_process(q->sleeper); /* doesn't sleep */
+               smp_wmb();
                q->status = -EIDRM;     /* hands-off q */
                q = n;
        }
index 5872e3507f356bc61c71fa65c7e58d7866df316c..5e71a6bf6f6b47fb9b93cc1540e0632b5dd5b4e7 100644 (file)
@@ -270,7 +270,13 @@ static void wake_futex(struct futex_q *q)
        /*
         * The waiting task can free the futex_q as soon as this is written,
         * without taking any locks.  This must come last.
+        *
+        * A memory barrier is required here to prevent the following store
+        * to lock_ptr from getting ahead of the wakeup. Clearing the lock
+        * at the end of wake_up_all() does not prevent this store from
+        * moving.
         */
+       wmb();
        q->lock_ptr = NULL;
 }
 
index 91e412b0ab005b439e328cf8800f4ee08fb7bdeb..67465b65abe4345181f1029360ac8654e189eaf0 100644 (file)
@@ -753,6 +753,8 @@ static int vlan_ioctl_handler(void __user *arg)
                break;
        case GET_VLAN_REALDEV_NAME_CMD:
                err = vlan_dev_get_realdev_name(args.device1, args.u.device2);
+               if (err)
+                       goto out;
                if (copy_to_user(arg, &args,
                                 sizeof(struct vlan_ioctl_args))) {
                        err = -EFAULT;
@@ -761,6 +763,8 @@ static int vlan_ioctl_handler(void __user *arg)
 
        case GET_VLAN_VID_CMD:
                err = vlan_dev_get_vid(args.device1, &vid);
+               if (err)
+                       goto out;
                args.u.VID = vid;
                if (copy_to_user(arg, &args,
                                 sizeof(struct vlan_ioctl_args))) {
@@ -774,7 +778,7 @@ static int vlan_ioctl_handler(void __user *arg)
                        __FUNCTION__, args.cmd);
                return -EINVAL;
        };
-
+out:
        return err;
 }
 
index 43a0b35dfe6f7acf7c33f64e3bf3b0569b35f04c..23422bd53a5e04192d9f452ed3bd36cd0f54ac71 100644 (file)
@@ -369,6 +369,7 @@ static unsigned int br_nf_pre_routing_ipv6(unsigned int hook,
        if (hdr->nexthdr == NEXTHDR_HOP && check_hbh_len(skb))
                        goto inhdr_error;
 
+       nf_bridge_put(skb->nf_bridge);
        if ((nf_bridge = nf_bridge_alloc(skb)) == NULL)
                return NF_DROP;
        setup_pre_routing(skb);
@@ -452,6 +453,7 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff **pskb,
                        skb->ip_summed = CHECKSUM_NONE;
        }
 
+       nf_bridge_put(skb->nf_bridge);
        if ((nf_bridge = nf_bridge_alloc(skb)) == NULL)
                return NF_DROP;
        setup_pre_routing(skb);
index 2841bfce29d6a5d52433d0812362eb994f1f2765..3a10e0bc90e8a51ae4542ee4258f60f0d4509c64 100644 (file)
@@ -293,7 +293,7 @@ int sk_chk_filter(struct sock_filter *filter, int flen)
        struct sock_filter *ftest;
        int pc;
 
-       if (((unsigned int)flen >= (~0U / sizeof(struct sock_filter))) || flen == 0)
+       if (flen == 0 || flen > BPF_MAXINSNS)
                return -EINVAL;
 
        /* check the filter code now */
@@ -360,7 +360,7 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk)
        int err;
 
        /* Make sure new filter is there and in the right amounts. */
-        if (fprog->filter == NULL || fprog->len > BPF_MAXINSNS)
+        if (fprog->filter == NULL)
                 return -EINVAL;
 
        fp = sock_kmalloc(sk, fsize+sizeof(*fp), GFP_KERNEL);
index ca03521112c52bfa4e279b351aee54c980105e71..656e13e38cfb69622e02df1d54aadd08e334bdfc 100644 (file)
@@ -1251,7 +1251,7 @@ static int dccp_v4_destroy_sock(struct sock *sk)
        struct dccp_sock *dp = dccp_sk(sk);
 
        /*
-        * DCCP doesn't use sk_qrite_queue, just sk_send_head
+        * DCCP doesn't use sk_write_queue, just sk_send_head
         * for retransmissions
         */
        if (sk->sk_send_head != NULL) {
index 4ea8cf7c0cc443bab3fe8cfa5c860e8e6592f12c..a60585fd85ad0207ff28d3345b6b53839a15a5b3 100644 (file)
@@ -137,6 +137,7 @@ static int addrconf_ifdown(struct net_device *dev, int how);
 static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags);
 static void addrconf_dad_timer(unsigned long data);
 static void addrconf_dad_completed(struct inet6_ifaddr *ifp);
+static void addrconf_dad_run(struct inet6_dev *idev);
 static void addrconf_rs_timer(unsigned long data);
 static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa);
 static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa);
@@ -388,6 +389,9 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
                }
 #endif
 
+               if (netif_carrier_ok(dev))
+                       ndev->if_flags |= IF_READY;
+
                write_lock_bh(&addrconf_lock);
                dev->ip6_ptr = ndev;
                write_unlock_bh(&addrconf_lock);
@@ -415,6 +419,7 @@ static struct inet6_dev * ipv6_find_idev(struct net_device *dev)
                if ((idev = ipv6_add_dev(dev)) == NULL)
                        return NULL;
        }
+
        if (dev->flags&IFF_UP)
                ipv6_mc_up(idev);
        return idev;
@@ -634,8 +639,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
        }
 #endif
 
-       for (ifap = &idev->addr_list; (ifa=*ifap) != NULL;
-            ifap = &ifa->if_next) {
+       for (ifap = &idev->addr_list; (ifa=*ifap) != NULL;) {
                if (ifa == ifp) {
                        *ifap = ifa->if_next;
                        __in6_ifa_put(ifp);
@@ -643,6 +647,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
                        if (!(ifp->flags & IFA_F_PERMANENT) || onlink > 0)
                                break;
                        deleted = 1;
+                       continue;
                } else if (ifp->flags & IFA_F_PERMANENT) {
                        if (ipv6_prefix_equal(&ifa->addr, &ifp->addr,
                                              ifp->prefix_len)) {
@@ -666,6 +671,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
                                }
                        }
                }
+               ifap = &ifa->if_next;
        }
        write_unlock_bh(&idev->lock);
 
@@ -903,11 +909,18 @@ int ipv6_dev_get_saddr(struct net_device *daddr_dev,
 
                        score.addr_type = __ipv6_addr_type(&ifa->addr);
 
-                       /* Rule 0: Candidate Source Address (section 4)
+                       /* Rule 0:
+                        * - Tentative Address (RFC2462 section 5.4)
+                        *  - A tentative address is not considered
+                        *    "assigned to an interface" in the traditional
+                        *    sense.
+                        * - Candidate Source Address (section 4)
                         *  - In any case, anycast addresses, multicast
                         *    addresses, and the unspecified address MUST
                         *    NOT be included in a candidate set.
                         */
+                       if (ifa->flags & IFA_F_TENTATIVE)
+                               continue;
                        if (unlikely(score.addr_type == IPV6_ADDR_ANY ||
                                     score.addr_type & IPV6_ADDR_MULTICAST)) {
                                LIMIT_NETDEBUG(KERN_DEBUG
@@ -1215,10 +1228,8 @@ int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2)
 
 /* Gets referenced address, destroys ifaddr */
 
-void addrconf_dad_failure(struct inet6_ifaddr *ifp)
+void addrconf_dad_stop(struct inet6_ifaddr *ifp)
 {
-       if (net_ratelimit())
-               printk(KERN_INFO "%s: duplicate address detected!\n", ifp->idev->dev->name);
        if (ifp->flags&IFA_F_PERMANENT) {
                spin_lock_bh(&ifp->lock);
                addrconf_del_timer(ifp);
@@ -1244,6 +1255,12 @@ void addrconf_dad_failure(struct inet6_ifaddr *ifp)
                ipv6_del_addr(ifp);
 }
 
+void addrconf_dad_failure(struct inet6_ifaddr *ifp)
+{
+       if (net_ratelimit())
+               printk(KERN_INFO "%s: duplicate address detected!\n", ifp->idev->dev->name);
+       addrconf_dad_stop(ifp);
+}
 
 /* Join to solicited addr multicast group. */
 
@@ -2133,9 +2150,42 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
 {
        struct net_device *dev = (struct net_device *) data;
        struct inet6_dev *idev = __in6_dev_get(dev);
+       int run_pending = 0;
 
        switch(event) {
        case NETDEV_UP:
+       case NETDEV_CHANGE:
+               if (event == NETDEV_UP) {
+                       if (!netif_carrier_ok(dev)) {
+                               /* device is not ready yet. */
+                               printk(KERN_INFO
+                                       "ADDRCONF(NETDEV_UP): %s: "
+                                       "link is not ready\n",
+                                       dev->name);
+                               break;
+                       }
+               } else {
+                       if (!netif_carrier_ok(dev)) {
+                               /* device is still not ready. */
+                               break;
+                       }
+
+                       if (idev) {
+                               if (idev->if_flags & IF_READY) {
+                                       /* device is already configured. */
+                                       break;
+                               }
+                               idev->if_flags |= IF_READY;
+                       }
+
+                       printk(KERN_INFO
+                                       "ADDRCONF(NETDEV_CHANGE): %s: "
+                                       "link becomes ready\n",
+                                       dev->name);
+
+                       run_pending = 1;
+               }
+
                switch(dev->type) {
                case ARPHRD_SIT:
                        addrconf_sit_config(dev);
@@ -2152,6 +2202,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
                        break;
                };
                if (idev) {
+                       if (run_pending)
+                               addrconf_dad_run(idev);
+
                        /* If the MTU changed during the interface down, when the
                           interface up, the changed MTU must be reflected in the
                           idev as well as routers.
@@ -2186,8 +2239,7 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
                 */
                addrconf_ifdown(dev, event != NETDEV_DOWN);
                break;
-       case NETDEV_CHANGE:
-               break;
+
        case NETDEV_CHANGENAME:
 #ifdef CONFIG_SYSCTL
                if (idev) {
@@ -2268,7 +2320,7 @@ static int addrconf_ifdown(struct net_device *dev, int how)
 
        /* Step 3: clear flags for stateless addrconf */
        if (how != 1)
-               idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD);
+               idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD|IF_READY);
 
        /* Step 4: clear address list */
 #ifdef CONFIG_IPV6_PRIVACY
@@ -2377,11 +2429,20 @@ out:
 /*
  *     Duplicate Address Detection
  */
+static void addrconf_dad_kick(struct inet6_ifaddr *ifp)
+{
+       unsigned long rand_num;
+       struct inet6_dev *idev = ifp->idev;
+
+       rand_num = net_random() % (idev->cnf.rtr_solicit_delay ? : 1);
+       ifp->probes = idev->cnf.dad_transmits;
+       addrconf_mod_timer(ifp, AC_DAD, rand_num);
+}
+
 static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags)
 {
        struct inet6_dev *idev = ifp->idev;
        struct net_device *dev = idev->dev;
-       unsigned long rand_num;
 
        addrconf_join_solict(dev, &ifp->addr);
 
@@ -2390,7 +2451,6 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags)
                                        flags);
 
        net_srandom(ifp->addr.s6_addr32[3]);
-       rand_num = net_random() % (idev->cnf.rtr_solicit_delay ? : 1);
 
        read_lock_bh(&idev->lock);
        if (ifp->dead)
@@ -2407,9 +2467,19 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags)
                return;
        }
 
-       ifp->probes = idev->cnf.dad_transmits;
-       addrconf_mod_timer(ifp, AC_DAD, rand_num);
-
+       if (!(idev->if_flags & IF_READY)) {
+               spin_unlock_bh(&ifp->lock);
+               read_unlock_bh(&idev->lock);
+               /*
+                * If the defice is not ready:
+                * - keep it tentative if it is a permanent address.
+                * - otherwise, kill it.
+                */
+               in6_ifa_hold(ifp);
+               addrconf_dad_stop(ifp);
+               return;
+       }
+       addrconf_dad_kick(ifp);
        spin_unlock_bh(&ifp->lock);
 out:
        read_unlock_bh(&idev->lock);
@@ -2492,6 +2562,22 @@ static void addrconf_dad_completed(struct inet6_ifaddr *ifp)
        }
 }
 
+static void addrconf_dad_run(struct inet6_dev *idev) {
+       struct inet6_ifaddr *ifp;
+
+       read_lock_bh(&idev->lock);
+       for (ifp = idev->addr_list; ifp; ifp = ifp->if_next) {
+               spin_lock_bh(&ifp->lock);
+               if (!(ifp->flags & IFA_F_TENTATIVE)) {
+                       spin_unlock_bh(&ifp->lock);
+                       continue;
+               }
+               spin_unlock_bh(&ifp->lock);
+               addrconf_dad_kick(ifp);
+       }
+       read_unlock_bh(&idev->lock);
+}
+
 #ifdef CONFIG_PROC_FS
 struct if6_iter_state {
        int bucket;
@@ -2697,6 +2783,9 @@ restart:
                                                in6_ifa_hold(ifpub);
                                                spin_unlock(&ifp->lock);
                                                read_unlock(&addrconf_hash_lock);
+                                               spin_lock(&ifpub->lock);
+                                               ifpub->regen_count = 0;
+                                               spin_unlock(&ifpub->lock);
                                                ipv6_create_tempaddr(ifpub, ifp);
                                                in6_ifa_put(ifpub);
                                                in6_ifa_put(ifp);
index 34a332225c1749f215f126d46788404f5e5e9850..6ec6a2b549bbd6d6930230d8bb8ca00d0e208f1f 100644 (file)
@@ -328,8 +328,10 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
                iif = skb->dev->ifindex;
 
        /*
-        *      Must not send if we know that source is Anycast also.
-        *      for now we don't know that.
+        *      Must not send error if the source does not uniquely
+        *      identify a single node (RFC2463 Section 2.4).
+        *      We check unspecified / multicast addresses here,
+        *      and anycast addresses will be checked later.
         */
        if ((addr_type == IPV6_ADDR_ANY) || (addr_type & IPV6_ADDR_MULTICAST)) {
                LIMIT_NETDEBUG(KERN_DEBUG "icmpv6_send: addr_any/mcast source\n");
@@ -373,6 +375,16 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
        err = ip6_dst_lookup(sk, &dst, &fl);
        if (err)
                goto out;
+
+       /*
+        * We won't send icmp if the destination is known
+        * anycast.
+        */
+       if (((struct rt6_info *)dst)->rt6i_flags & RTF_ANYCAST) {
+               LIMIT_NETDEBUG(KERN_DEBUG "icmpv6_send: acast source\n");
+               goto out_dst_release;
+       }
+
        if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0)
                goto out;
 
index fd939da090c451f848102667eecfcb60995f8a7d..f829a4ad3ccca1657ca9e0308ecefd032160a598 100644 (file)
@@ -170,7 +170,7 @@ static int ip6_mc_leave_src(struct sock *sk, struct ipv6_mc_socklist *iml,
 #define MLDV2_QQIC(value) MLDV2_EXP(0x80, 4, 3, value)
 #define MLDV2_MRC(value) MLDV2_EXP(0x8000, 12, 3, value)
 
-#define IPV6_MLD_MAX_MSF       10
+#define IPV6_MLD_MAX_MSF       64
 
 int sysctl_mld_max_msf = IPV6_MLD_MAX_MSF;
 
@@ -224,6 +224,7 @@ int ipv6_sock_mc_join(struct sock *sk, int ifindex, struct in6_addr *addr)
 
        mc_lst->ifindex = dev->ifindex;
        mc_lst->sfmode = MCAST_EXCLUDE;
+       mc_lst->sflock = RW_LOCK_UNLOCKED;
        mc_lst->sflist = NULL;
 
        /*
@@ -360,6 +361,7 @@ int ip6_mc_source(int add, int omode, struct sock *sk,
        struct ip6_sf_socklist *psl;
        int i, j, rv;
        int leavegroup = 0;
+       int pmclocked = 0;
        int err;
 
        if (pgsr->gsr_group.ss_family != AF_INET6 ||
@@ -403,6 +405,9 @@ int ip6_mc_source(int add, int omode, struct sock *sk,
                pmc->sfmode = omode;
        }
 
+       write_lock_bh(&pmc->sflock);
+       pmclocked = 1;
+
        psl = pmc->sflist;
        if (!add) {
                if (!psl)
@@ -475,6 +480,8 @@ int ip6_mc_source(int add, int omode, struct sock *sk,
        /* update the interface list */
        ip6_mc_add_src(idev, group, omode, 1, source, 1);
 done:
+       if (pmclocked)
+               write_unlock_bh(&pmc->sflock);
        read_unlock_bh(&ipv6_sk_mc_lock);
        read_unlock_bh(&idev->lock);
        in6_dev_put(idev);
@@ -510,6 +517,8 @@ int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf)
        dev = idev->dev;
 
        err = 0;
+       read_lock_bh(&ipv6_sk_mc_lock);
+
        if (gsf->gf_fmode == MCAST_INCLUDE && gsf->gf_numsrc == 0) {
                leavegroup = 1;
                goto done;
@@ -549,6 +558,8 @@ int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf)
                newpsl = NULL;
                (void) ip6_mc_add_src(idev, group, gsf->gf_fmode, 0, NULL, 0);
        }
+
+       write_lock_bh(&pmc->sflock);
        psl = pmc->sflist;
        if (psl) {
                (void) ip6_mc_del_src(idev, group, pmc->sfmode,
@@ -558,8 +569,10 @@ int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf)
                (void) ip6_mc_del_src(idev, group, pmc->sfmode, 0, NULL, 0);
        pmc->sflist = newpsl;
        pmc->sfmode = gsf->gf_fmode;
+       write_unlock_bh(&pmc->sflock);
        err = 0;
 done:
+       read_unlock_bh(&ipv6_sk_mc_lock);
        read_unlock_bh(&idev->lock);
        in6_dev_put(idev);
        dev_put(dev);
@@ -592,6 +605,11 @@ int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf,
        dev = idev->dev;
 
        err = -EADDRNOTAVAIL;
+       /*
+        * changes to the ipv6_mc_list require the socket lock and
+        * a read lock on ip6_sk_mc_lock. We have the socket lock,
+        * so reading the list is safe.
+        */
 
        for (pmc=inet6->ipv6_mc_list; pmc; pmc=pmc->next) {
                if (pmc->ifindex != gsf->gf_interface)
@@ -614,6 +632,10 @@ int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf,
            copy_to_user(optval, gsf, GROUP_FILTER_SIZE(0))) {
                return -EFAULT;
        }
+       /* changes to psl require the socket lock, a read lock on
+        * on ipv6_sk_mc_lock and a write lock on pmc->sflock. We
+        * have the socket lock, so reading here is safe.
+        */
        for (i=0; i<copycount; i++) {
                struct sockaddr_in6 *psin6;
                struct sockaddr_storage ss;
@@ -650,6 +672,7 @@ int inet6_mc_check(struct sock *sk, struct in6_addr *mc_addr,
                read_unlock(&ipv6_sk_mc_lock);
                return 1;
        }
+       read_lock(&mc->sflock);
        psl = mc->sflist;
        if (!psl) {
                rv = mc->sfmode == MCAST_EXCLUDE;
@@ -665,6 +688,7 @@ int inet6_mc_check(struct sock *sk, struct in6_addr *mc_addr,
                if (mc->sfmode == MCAST_EXCLUDE && i < psl->sl_count)
                        rv = 0;
        }
+       read_unlock(&mc->sflock);
        read_unlock(&ipv6_sk_mc_lock);
 
        return rv;
@@ -1068,7 +1092,8 @@ static void igmp6_group_queried(struct ifmcaddr6 *ma, unsigned long resptime)
        ma->mca_flags |= MAF_TIMER_RUNNING;
 }
 
-static void mld_marksources(struct ifmcaddr6 *pmc, int nsrcs,
+/* mark EXCLUDE-mode sources */
+static int mld_xmarksources(struct ifmcaddr6 *pmc, int nsrcs,
        struct in6_addr *srcs)
 {
        struct ip6_sf_list *psf;
@@ -1078,13 +1103,53 @@ static void mld_marksources(struct ifmcaddr6 *pmc, int nsrcs,
        for (psf=pmc->mca_sources; psf; psf=psf->sf_next) {
                if (scount == nsrcs)
                        break;
-               for (i=0; i<nsrcs; i++)
+               for (i=0; i<nsrcs; i++) {
+                       /* skip inactive filters */
+                       if (pmc->mca_sfcount[MCAST_INCLUDE] ||
+                           pmc->mca_sfcount[MCAST_EXCLUDE] !=
+                           psf->sf_count[MCAST_EXCLUDE])
+                               continue;
+                       if (ipv6_addr_equal(&srcs[i], &psf->sf_addr)) {
+                               scount++;
+                               break;
+                       }
+               }
+       }
+       pmc->mca_flags &= ~MAF_GSQUERY;
+       if (scount == nsrcs)    /* all sources excluded */
+               return 0;
+       return 1;
+}
+
+static int mld_marksources(struct ifmcaddr6 *pmc, int nsrcs,
+       struct in6_addr *srcs)
+{
+       struct ip6_sf_list *psf;
+       int i, scount;
+
+       if (pmc->mca_sfmode == MCAST_EXCLUDE)
+               return mld_xmarksources(pmc, nsrcs, srcs);
+
+       /* mark INCLUDE-mode sources */
+
+       scount = 0;
+       for (psf=pmc->mca_sources; psf; psf=psf->sf_next) {
+               if (scount == nsrcs)
+                       break;
+               for (i=0; i<nsrcs; i++) {
                        if (ipv6_addr_equal(&srcs[i], &psf->sf_addr)) {
                                psf->sf_gsresp = 1;
                                scount++;
                                break;
                        }
+               }
+       }
+       if (!scount) {
+               pmc->mca_flags &= ~MAF_GSQUERY;
+               return 0;
        }
+       pmc->mca_flags |= MAF_GSQUERY;
+       return 1;
 }
 
 int igmp6_event_query(struct sk_buff *skb)
@@ -1167,7 +1232,7 @@ int igmp6_event_query(struct sk_buff *skb)
                /* mark sources to include, if group & source-specific */
                if (mlh2->nsrcs != 0) {
                        if (!pskb_may_pull(skb, srcs_offset + 
-                               mlh2->nsrcs * sizeof(struct in6_addr))) {
+                           ntohs(mlh2->nsrcs) * sizeof(struct in6_addr))) {
                                in6_dev_put(idev);
                                return -EINVAL;
                        }
@@ -1203,10 +1268,9 @@ int igmp6_event_query(struct sk_buff *skb)
                                else
                                        ma->mca_flags &= ~MAF_GSQUERY;
                        }
-                       if (ma->mca_flags & MAF_GSQUERY)
-                               mld_marksources(ma, ntohs(mlh2->nsrcs),
-                                       mlh2->srcs);
-                       igmp6_group_queried(ma, max_delay);
+                       if (!(ma->mca_flags & MAF_GSQUERY) ||
+                          mld_marksources(ma, ntohs(mlh2->nsrcs), mlh2->srcs))
+                               igmp6_group_queried(ma, max_delay);
                        spin_unlock_bh(&ma->mca_lock);
                        if (group_type != IPV6_ADDR_ANY)
                                break;
@@ -1281,7 +1345,18 @@ static int is_in(struct ifmcaddr6 *pmc, struct ip6_sf_list *psf, int type,
        case MLD2_MODE_IS_EXCLUDE:
                if (gdeleted || sdeleted)
                        return 0;
-               return !((pmc->mca_flags & MAF_GSQUERY) && !psf->sf_gsresp);
+               if (!((pmc->mca_flags & MAF_GSQUERY) && !psf->sf_gsresp)) {
+                       if (pmc->mca_sfmode == MCAST_INCLUDE)
+                               return 1;
+                       /* don't include if this source is excluded
+                        * in all filters
+                        */
+                       if (psf->sf_count[MCAST_INCLUDE])
+                               return 0;
+                       return pmc->mca_sfcount[MCAST_EXCLUDE] ==
+                               psf->sf_count[MCAST_EXCLUDE];
+               }
+               return 0;
        case MLD2_CHANGE_TO_INCLUDE:
                if (gdeleted || sdeleted)
                        return 0;
@@ -1450,7 +1525,7 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc,
        struct mld2_report *pmr;
        struct mld2_grec *pgr = NULL;
        struct ip6_sf_list *psf, *psf_next, *psf_prev, **psf_list;
-       int scount, first, isquery, truncate;
+       int scount, stotal, first, isquery, truncate;
 
        if (pmc->mca_flags & MAF_NOREPORT)
                return skb;
@@ -1460,25 +1535,13 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc,
        truncate = type == MLD2_MODE_IS_EXCLUDE ||
                    type == MLD2_CHANGE_TO_EXCLUDE;
 
+       stotal = scount = 0;
+
        psf_list = sdeleted ? &pmc->mca_tomb : &pmc->mca_sources;
 
-       if (!*psf_list) {
-               if (type == MLD2_ALLOW_NEW_SOURCES ||
-                   type == MLD2_BLOCK_OLD_SOURCES)
-                       return skb;
-               if (pmc->mca_crcount || isquery) {
-                       /* make sure we have room for group header and at
-                        * least one source.
-                        */
-                       if (skb && AVAILABLE(skb) < sizeof(struct mld2_grec)+
-                           sizeof(struct in6_addr)) {
-                               mld_sendpack(skb);
-                               skb = NULL; /* add_grhead will get a new one */
-                       }
-                       skb = add_grhead(skb, pmc, type, &pgr);
-               }
-               return skb;
-       }
+       if (!*psf_list)
+               goto empty_source;
+
        pmr = skb ? (struct mld2_report *)skb->h.raw : NULL;
 
        /* EX and TO_EX get a fresh packet, if needed */
@@ -1491,7 +1554,6 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc,
                }
        }
        first = 1;
-       scount = 0;
        psf_prev = NULL;
        for (psf=*psf_list; psf; psf=psf_next) {
                struct in6_addr *psrc;
@@ -1525,7 +1587,7 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc,
                }
                psrc = (struct in6_addr *)skb_put(skb, sizeof(*psrc));
                *psrc = psf->sf_addr;
-               scount++;
+               scount++; stotal++;
                if ((type == MLD2_ALLOW_NEW_SOURCES ||
                     type == MLD2_BLOCK_OLD_SOURCES) && psf->sf_crcount) {
                        psf->sf_crcount--;
@@ -1540,6 +1602,21 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc,
                }
                psf_prev = psf;
        }
+
+empty_source:
+       if (!stotal) {
+               if (type == MLD2_ALLOW_NEW_SOURCES ||
+                   type == MLD2_BLOCK_OLD_SOURCES)
+                       return skb;
+               if (pmc->mca_crcount || isquery) {
+                       /* make sure we have room for group header */
+                       if (skb && AVAILABLE(skb) < sizeof(struct mld2_grec)) {
+                               mld_sendpack(skb);
+                               skb = NULL; /* add_grhead will get a new one */
+                       }
+                       skb = add_grhead(skb, pmc, type, &pgr);
+               }
+       }
        if (pgr)
                pgr->grec_nsrcs = htons(scount);
 
@@ -1621,11 +1698,11 @@ static void mld_send_cr(struct inet6_dev *idev)
                        skb = add_grec(skb, pmc, dtype, 1, 1);
                }
                if (pmc->mca_crcount) {
-                       pmc->mca_crcount--;
                        if (pmc->mca_sfmode == MCAST_EXCLUDE) {
                                type = MLD2_CHANGE_TO_INCLUDE;
                                skb = add_grec(skb, pmc, type, 1, 0);
                        }
+                       pmc->mca_crcount--;
                        if (pmc->mca_crcount == 0) {
                                mld_clear_zeros(&pmc->mca_tomb);
                                mld_clear_zeros(&pmc->mca_sources);
@@ -1659,12 +1736,12 @@ static void mld_send_cr(struct inet6_dev *idev)
 
                /* filter mode changes */
                if (pmc->mca_crcount) {
-                       pmc->mca_crcount--;
                        if (pmc->mca_sfmode == MCAST_EXCLUDE)
                                type = MLD2_CHANGE_TO_EXCLUDE;
                        else
                                type = MLD2_CHANGE_TO_INCLUDE;
                        skb = add_grec(skb, pmc, type, 0, 0);
+                       pmc->mca_crcount--;
                }
                spin_unlock_bh(&pmc->mca_lock);
        }
@@ -2023,6 +2100,9 @@ static int ip6_mc_leave_src(struct sock *sk, struct ipv6_mc_socklist *iml,
 {
        int err;
 
+       /* callers have the socket lock and a write lock on ipv6_sk_mc_lock,
+        * so no other readers or writers of iml or its sflist
+        */
        if (iml->sflist == 0) {
                /* any-source empty exclude case */
                return ip6_mc_del_src(idev, &iml->addr, iml->sfmode, 0, NULL, 0);
index 7c68bfbee36193caca29325ad160d5be62c73265..66140f13d1197130c29f5d9fa90c4f10a3bf3819 100644 (file)
@@ -413,11 +413,14 @@ static struct rt6_info *rt6_cow(struct rt6_info *ort, struct in6_addr *daddr,
        rt = ip6_rt_copy(ort);
 
        if (rt) {
-               ipv6_addr_copy(&rt->rt6i_dst.addr, daddr);
-
-               if (!(rt->rt6i_flags&RTF_GATEWAY))
+               if (!(rt->rt6i_flags&RTF_GATEWAY)) {
+                       if (rt->rt6i_dst.plen != 128 &&
+                           ipv6_addr_equal(&rt->rt6i_dst.addr, daddr))
+                               rt->rt6i_flags |= RTF_ANYCAST;
                        ipv6_addr_copy(&rt->rt6i_gateway, daddr);
+               }
 
+               ipv6_addr_copy(&rt->rt6i_dst.addr, daddr);
                rt->rt6i_dst.plen = 128;
                rt->rt6i_flags |= RTF_CACHE;
                rt->u.dst.flags |= DST_HOST;
@@ -1413,7 +1416,9 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
        rt->u.dst.obsolete = -1;
 
        rt->rt6i_flags = RTF_UP | RTF_NONEXTHOP;
-       if (!anycast)
+       if (anycast)
+               rt->rt6i_flags |= RTF_ANYCAST;
+       else
                rt->rt6i_flags |= RTF_LOCAL;
        rt->rt6i_nexthop = ndisc_get_neigh(rt->rt6i_dev, &rt->rt6i_gateway);
        if (rt->rt6i_nexthop == NULL) {
index 004e8599b8fe595f5b72c92b0b51bb203b99a44d..a7d88b5ad756a85731d97feec43a58193129367c 100644 (file)
@@ -99,7 +99,7 @@ static int nr_state1_machine(struct sock *sk, struct sk_buff *skb,
                break;
 
        case NR_RESET:
-               if (sysctl_netrom_reset_circuit);
+               if (sysctl_netrom_reset_circuit)
                        nr_disconnect(sk, ECONNRESET);
                break;
 
@@ -130,7 +130,7 @@ static int nr_state2_machine(struct sock *sk, struct sk_buff *skb,
                break;
 
        case NR_RESET:
-               if (sysctl_netrom_reset_circuit);
+               if (sysctl_netrom_reset_circuit)
                        nr_disconnect(sk, ECONNRESET);
                break;
 
@@ -265,7 +265,7 @@ static int nr_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype
                break;
 
        case NR_RESET:
-               if (sysctl_netrom_reset_circuit);
+               if (sysctl_netrom_reset_circuit)
                        nr_disconnect(sk, ECONNRESET);
                break;
 
index 54a4be6a7d269de50d3db7683b6020785bf0a15f..d19e274b9c4a346b48bf32558ddec3db69fd5942 100644 (file)
@@ -346,6 +346,7 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
        struct xfrm_policy *pol, **p;
        struct xfrm_policy *delpol = NULL;
        struct xfrm_policy **newpos = NULL;
+       struct dst_entry *gc_list;
 
        write_lock_bh(&xfrm_policy_lock);
        for (p = &xfrm_policy_list[dir]; (pol=*p)!=NULL;) {
@@ -381,9 +382,36 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
                xfrm_pol_hold(policy);
        write_unlock_bh(&xfrm_policy_lock);
 
-       if (delpol) {
+       if (delpol)
                xfrm_policy_kill(delpol);
+
+       read_lock_bh(&xfrm_policy_lock);
+       gc_list = NULL;
+       for (policy = policy->next; policy; policy = policy->next) {
+               struct dst_entry *dst;
+
+               write_lock(&policy->lock);
+               dst = policy->bundles;
+               if (dst) {
+                       struct dst_entry *tail = dst;
+                       while (tail->next)
+                               tail = tail->next;
+                       tail->next = gc_list;
+                       gc_list = dst;
+
+                       policy->bundles = NULL;
+               }
+               write_unlock(&policy->lock);
        }
+       read_unlock_bh(&xfrm_policy_lock);
+
+       while (gc_list) {
+               struct dst_entry *dst = gc_list;
+
+               gc_list = dst->next;
+               dst_free(dst);
+       }
+
        return 0;
 }
 EXPORT_SYMBOL(xfrm_policy_insert);
index 09ab138646a641471321d1bd3ebff27877986f3a..ef022a846b06b602878b90a5f7758f30cdd727bb 100644 (file)
@@ -1,7 +1,7 @@
 # ALSA Sparc drivers
 
 menu "ALSA Sparc devices"
-       depends on SND!=n && (SPARC32 || SPARC64)
+       depends on SND!=n && SPARC
 
 config SND_SUN_AMD7930
        tristate "Sun AMD7930"