## Automatically generated incremental diff ## From: linux-2.6.17-rc5 ## To: linux-2.6.17-rc6 ## Robot: $Id: make-incremental-diff,v 1.12 2004/01/06 07:19:36 hpa Exp $ diff -urN linux-2.6.17-rc5/Documentation/serial/driver linux-2.6.17-rc6/Documentation/serial/driver --- linux-2.6.17-rc5/Documentation/serial/driver 2006-06-06 01:27:30.047582194 +0000 +++ linux-2.6.17-rc6/Documentation/serial/driver 2006-06-06 01:27:34.732086224 +0000 @@ -214,12 +214,13 @@ The interaction of the iflag bits is as follows (parity error given as an example): Parity error INPCK IGNPAR - None n/a n/a character received - Yes n/a 0 character discarded - Yes 0 1 character received, marked as + n/a 0 n/a character received, marked as TTY_NORMAL - Yes 1 1 character received, marked as + None 1 n/a character received, marked as + TTY_NORMAL + Yes 1 0 character received, marked as TTY_PARITY + Yes 1 1 character discarded Other flags may be used (eg, xon/xoff characters) if your hardware supports hardware "soft" flow control. diff -urN linux-2.6.17-rc5/MAINTAINERS linux-2.6.17-rc6/MAINTAINERS --- linux-2.6.17-rc5/MAINTAINERS 2006-06-06 01:27:30.063583916 +0000 +++ linux-2.6.17-rc6/MAINTAINERS 2006-06-06 01:27:34.748087946 +0000 @@ -565,7 +565,19 @@ P: Arnd Bergmann M: arnd@arndb.de L: linuxppc-dev@ozlabs.org -W: http://linuxppc64.org +W: http://www.penguinppc.org/ppc64/ +S: Supported + +BROADCOM BNX2 GIGABIT ETHERNET DRIVER +P: Michael Chan +M: mchan@broadcom.com +L: netdev@vger.kernel.org +S: Supported + +BROADCOM TG3 GIGABIT ETHERNET DRIVER +P: Michael Chan +M: mchan@broadcom.com +L: netdev@vger.kernel.org S: Supported BTTV VIDEO4LINUX DRIVER @@ -1716,7 +1728,7 @@ P: Anton Blanchard M: anton@samba.org M: anton@au.ibm.com -W: http://linuxppc64.org +W: http://www.penguinppc.org/ppc64/ L: linuxppc-dev@ozlabs.org S: Supported @@ -1877,6 +1889,11 @@ W: http://www.atnf.csiro.au/~rgooch/linux/kernel-patches.html S: Maintained +MULTIMEDIA CARD SUBSYSTEM +P: Russell King +M: rmk+mmc@arm.linux.org.uk +S: Maintained + MULTISOUND SOUND DRIVER P: Andrew Veliath M: andrewtv@usa.net @@ -1899,6 +1916,12 @@ L: linux-scsi@vger.kernel.org S: Maintained +NETEM NETWORK EMULATOR +P: Stephen Hemminger +M: shemminger@osdl.org +L: netem@osdl.org +S: Maintained + NETFILTER/IPTABLES/IPCHAINS P: Rusty Russell P: Marc Boucher diff -urN linux-2.6.17-rc5/Makefile linux-2.6.17-rc6/Makefile --- linux-2.6.17-rc5/Makefile 2006-06-06 01:27:30.063583916 +0000 +++ linux-2.6.17-rc6/Makefile 2006-06-06 01:27:34.748087946 +0000 @@ -1,8 +1,8 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 17 -EXTRAVERSION =-rc5 -NAME=Lordi Rules +EXTRAVERSION =-rc6 +NAME=Crazed Snow-Weasel # *DOCUMENTATION* # To see a list of typical targets execute "make help" diff -urN linux-2.6.17-rc5/arch/alpha/kernel/alpha_ksyms.c linux-2.6.17-rc6/arch/alpha/kernel/alpha_ksyms.c --- linux-2.6.17-rc5/arch/alpha/kernel/alpha_ksyms.c 2006-06-06 01:27:30.063583916 +0000 +++ linux-2.6.17-rc6/arch/alpha/kernel/alpha_ksyms.c 2006-06-06 01:27:34.748087946 +0000 @@ -182,7 +182,6 @@ EXPORT_SYMBOL(smp_call_function); EXPORT_SYMBOL(smp_call_function_on_cpu); EXPORT_SYMBOL(_atomic_dec_and_lock); -EXPORT_SYMBOL(cpu_present_mask); #endif /* CONFIG_SMP */ /* diff -urN linux-2.6.17-rc5/arch/alpha/kernel/process.c linux-2.6.17-rc6/arch/alpha/kernel/process.c --- linux-2.6.17-rc5/arch/alpha/kernel/process.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/alpha/kernel/process.c 2006-06-06 01:27:34.748087946 +0000 @@ -94,7 +94,7 @@ if (cpuid != boot_cpuid) { flags |= 0x00040000UL; /* "remain halted" */ *pflags = flags; - clear_bit(cpuid, &cpu_present_mask); + cpu_clear(cpuid, cpu_present_map); halt(); } #endif @@ -120,8 +120,8 @@ #ifdef CONFIG_SMP /* Wait for the secondaries to halt. */ - cpu_clear(boot_cpuid, cpu_possible_map); - while (cpus_weight(cpu_possible_map)) + cpu_clear(boot_cpuid, cpu_present_map); + while (cpus_weight(cpu_present_map)) barrier(); #endif diff -urN linux-2.6.17-rc5/arch/alpha/kernel/smp.c linux-2.6.17-rc6/arch/alpha/kernel/smp.c --- linux-2.6.17-rc5/arch/alpha/kernel/smp.c 2006-06-06 01:27:30.063583916 +0000 +++ linux-2.6.17-rc6/arch/alpha/kernel/smp.c 2006-06-06 01:27:34.752088377 +0000 @@ -68,7 +68,6 @@ static int smp_secondary_alive __initdata = 0; /* Which cpus ids came online. */ -cpumask_t cpu_present_mask; cpumask_t cpu_online_map; EXPORT_SYMBOL(cpu_online_map); @@ -439,7 +438,7 @@ if ((cpu->flags & 0x1cc) == 0x1cc) { smp_num_probed++; /* Assume here that "whami" == index */ - cpu_set(i, cpu_present_mask); + cpu_set(i, cpu_present_map); cpu->pal_revision = boot_cpu_palrev; } @@ -450,11 +449,10 @@ } } else { smp_num_probed = 1; - cpu_set(boot_cpuid, cpu_present_mask); } - printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n", - smp_num_probed, cpu_possible_map.bits[0]); + printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_map = %lx\n", + smp_num_probed, cpu_present_map.bits[0]); } /* @@ -473,7 +471,7 @@ /* Nothing to do on a UP box, or when told not to. */ if (smp_num_probed == 1 || max_cpus == 0) { - cpu_present_mask = cpumask_of_cpu(boot_cpuid); + cpu_present_map = cpumask_of_cpu(boot_cpuid); printk(KERN_INFO "SMP mode deactivated.\n"); return; } @@ -486,10 +484,6 @@ void __devinit smp_prepare_boot_cpu(void) { - /* - * Mark the boot cpu (current cpu) as online - */ - cpu_set(smp_processor_id(), cpu_online_map); } int __devinit diff -urN linux-2.6.17-rc5/arch/alpha/kernel/sys_titan.c linux-2.6.17-rc6/arch/alpha/kernel/sys_titan.c --- linux-2.6.17-rc5/arch/alpha/kernel/sys_titan.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/alpha/kernel/sys_titan.c 2006-06-06 01:27:34.752088377 +0000 @@ -66,7 +66,7 @@ register int bcpu = boot_cpuid; #ifdef CONFIG_SMP - cpumask_t cpm = cpu_present_mask; + cpumask_t cpm = cpu_present_map; volatile unsigned long *dim0, *dim1, *dim2, *dim3; unsigned long mask0, mask1, mask2, mask3, dummy; diff -urN linux-2.6.17-rc5/arch/arm/Kconfig.debug linux-2.6.17-rc6/arch/arm/Kconfig.debug --- linux-2.6.17-rc5/arch/arm/Kconfig.debug 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/arm/Kconfig.debug 2006-06-06 01:27:34.752088377 +0000 @@ -101,7 +101,7 @@ help Choice for UART for kernel low-level using S3C2410 UARTS, should be between zero and two. The port must have been - initalised by the boot-loader before use. + initialised by the boot-loader before use. The uncompressor code port configuration is now handled by CONFIG_S3C2410_LOWLEVEL_UART_PORT. diff -urN linux-2.6.17-rc5/arch/arm/mach-ixp23xx/core.c linux-2.6.17-rc6/arch/arm/mach-ixp23xx/core.c --- linux-2.6.17-rc5/arch/arm/mach-ixp23xx/core.c 2006-06-06 01:27:30.099587789 +0000 +++ linux-2.6.17-rc6/arch/arm/mach-ixp23xx/core.c 2006-06-06 01:27:34.780091390 +0000 @@ -178,8 +178,12 @@ static void ixp23xx_irq_mask(unsigned int irq) { - volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32); + volatile unsigned long *intr_reg; + if (irq >= 56) + irq += 8; + + intr_reg = IXP23XX_INTR_EN1 + (irq / 32); *intr_reg &= ~(1 << (irq % 32)); } @@ -199,17 +203,25 @@ */ static void ixp23xx_irq_level_unmask(unsigned int irq) { - volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32); + volatile unsigned long *intr_reg; ixp23xx_irq_ack(irq); + if (irq >= 56) + irq += 8; + + intr_reg = IXP23XX_INTR_EN1 + (irq / 32); *intr_reg |= (1 << (irq % 32)); } static void ixp23xx_irq_edge_unmask(unsigned int irq) { - volatile unsigned long *intr_reg = IXP23XX_INTR_EN1 + (irq / 32); + volatile unsigned long *intr_reg; + + if (irq >= 56) + irq += 8; + intr_reg = IXP23XX_INTR_EN1 + (irq / 32); *intr_reg |= (1 << (irq % 32)); } diff -urN linux-2.6.17-rc5/arch/arm/mach-ixp4xx/Kconfig linux-2.6.17-rc6/arch/arm/mach-ixp4xx/Kconfig --- linux-2.6.17-rc5/arch/arm/mach-ixp4xx/Kconfig 2006-06-06 01:27:30.099587789 +0000 +++ linux-2.6.17-rc6/arch/arm/mach-ixp4xx/Kconfig 2006-06-06 01:27:34.780091390 +0000 @@ -141,7 +141,7 @@ 2) If > 64MB of memory space is required, the IXP4xx can be configured to use indirect registers to access PCI This allows for up to 128MB (0x48000000 to 0x4fffffff) of memory on the bus. - The disadvantadge of this is that every PCI access requires + The disadvantage of this is that every PCI access requires three local register accesses plus a spinlock, but in some cases the performance hit is acceptable. In addition, you cannot mmap() PCI devices in this case due to the indirect nature diff -urN linux-2.6.17-rc5/arch/arm/mach-pxa/mainstone.c linux-2.6.17-rc6/arch/arm/mach-pxa/mainstone.c --- linux-2.6.17-rc5/arch/arm/mach-pxa/mainstone.c 2006-06-06 01:27:30.115589511 +0000 +++ linux-2.6.17-rc6/arch/arm/mach-pxa/mainstone.c 2006-06-06 01:27:34.796093111 +0000 @@ -493,6 +493,7 @@ MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)") /* Maintainer: MontaVista Software Inc. */ .phys_io = 0x40000000, + .boot_params = 0xa0000100, /* BLOB boot parameter setting */ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, .map_io = mainstone_map_io, .init_irq = mainstone_init_irq, diff -urN linux-2.6.17-rc5/arch/arm/mach-s3c2410/Kconfig linux-2.6.17-rc6/arch/arm/mach-s3c2410/Kconfig --- linux-2.6.17-rc5/arch/arm/mach-s3c2410/Kconfig 2006-06-06 01:27:30.115589511 +0000 +++ linux-2.6.17-rc6/arch/arm/mach-s3c2410/Kconfig 2006-06-06 01:27:34.796093111 +0000 @@ -170,7 +170,7 @@ depends on ARCH_S3C2410 && PM help Say Y here if you want verbose debugging from the PM Suspend and - Resume code. See `Documentation/arm/Samsing-S3C24XX/Suspend.txt` + Resume code. See for more information. config S3C2410_PM_CHECK diff -urN linux-2.6.17-rc5/arch/arm/mm/mm-armv.c linux-2.6.17-rc6/arch/arm/mm/mm-armv.c --- linux-2.6.17-rc5/arch/arm/mm/mm-armv.c 2006-06-06 01:27:30.119589942 +0000 +++ linux-2.6.17-rc6/arch/arm/mm/mm-armv.c 2006-06-06 01:27:34.800093542 +0000 @@ -376,7 +376,7 @@ ecc_mask = 0; } - if (cpu_arch <= CPU_ARCH_ARMv5TEJ) { + if (cpu_arch <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) { for (i = 0; i < ARRAY_SIZE(mem_types); i++) { if (mem_types[i].prot_l1) mem_types[i].prot_l1 |= PMD_BIT4; @@ -631,7 +631,7 @@ pgd = init_mm.pgd; base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT; - if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ) + if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) base_pmdval |= PMD_BIT4; for (i = 0; i < FIRST_USER_PGD_NR + USER_PTRS_PER_PGD; i++, pgd++) { diff -urN linux-2.6.17-rc5/arch/arm/mm/proc-xsc3.S linux-2.6.17-rc6/arch/arm/mm/proc-xsc3.S --- linux-2.6.17-rc5/arch/arm/mm/proc-xsc3.S 2006-06-06 01:27:30.123590372 +0000 +++ linux-2.6.17-rc6/arch/arm/mm/proc-xsc3.S 2006-06-06 01:27:34.804093972 +0000 @@ -427,12 +427,13 @@ #endif mcr p15, 0, r0, c1, c0, 1 @ set auxiliary control reg mrc p15, 0, r0, c1, c0, 0 @ get control register - bic r0, r0, #0x0200 @ .... ..R. .... .... bic r0, r0, #0x0002 @ .... .... .... ..A. orr r0, r0, #0x0005 @ .... .... .... .C.M #if BTB_ENABLE + bic r0, r0, #0x0200 @ .... ..R. .... .... orr r0, r0, #0x3900 @ ..VI Z..S .... .... #else + bic r0, r0, #0x0a00 @ .... Z.R. .... .... orr r0, r0, #0x3100 @ ..VI ...S .... .... #endif #if L2_CACHE_ENABLE diff -urN linux-2.6.17-rc5/arch/i386/kernel/acpi/boot.c linux-2.6.17-rc6/arch/i386/kernel/acpi/boot.c --- linux-2.6.17-rc5/arch/i386/kernel/acpi/boot.c 2006-06-06 01:27:30.143592524 +0000 +++ linux-2.6.17-rc6/arch/i386/kernel/acpi/boot.c 2006-06-06 01:27:34.820095694 +0000 @@ -1066,14 +1066,6 @@ DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"), }, }, - { - .callback = disable_acpi_pci, - .ident = "HP xw9300", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), - DMI_MATCH(DMI_PRODUCT_NAME, "HP xw9300 Workstation"), - }, - }, {} }; diff -urN linux-2.6.17-rc5/arch/i386/kernel/syscall_table.S linux-2.6.17-rc6/arch/i386/kernel/syscall_table.S --- linux-2.6.17-rc5/arch/i386/kernel/syscall_table.S 2006-06-06 01:27:30.159594246 +0000 +++ linux-2.6.17-rc6/arch/i386/kernel/syscall_table.S 2006-06-06 01:27:34.836097416 +0000 @@ -315,3 +315,4 @@ .long sys_splice .long sys_sync_file_range .long sys_tee /* 315 */ + .long sys_vmsplice diff -urN linux-2.6.17-rc5/arch/i386/mach-generic/probe.c linux-2.6.17-rc6/arch/i386/mach-generic/probe.c --- linux-2.6.17-rc5/arch/i386/mach-generic/probe.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/i386/mach-generic/probe.c 2006-06-06 01:27:34.836097416 +0000 @@ -93,9 +93,11 @@ int i; for (i = 0; apic_probe[i]; ++i) { if (apic_probe[i]->mps_oem_check(mpc,oem,productid)) { - genapic = apic_probe[i]; - printk(KERN_INFO "Switched to APIC driver `%s'.\n", - genapic->name); + if (!cmdline_apic) { + genapic = apic_probe[i]; + printk(KERN_INFO "Switched to APIC driver `%s'.\n", + genapic->name); + } return 1; } } @@ -107,9 +109,11 @@ int i; for (i = 0; apic_probe[i]; ++i) { if (apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id)) { - genapic = apic_probe[i]; - printk(KERN_INFO "Switched to APIC driver `%s'.\n", - genapic->name); + if (!cmdline_apic) { + genapic = apic_probe[i]; + printk(KERN_INFO "Switched to APIC driver `%s'.\n", + genapic->name); + } return 1; } } diff -urN linux-2.6.17-rc5/arch/mips/Kconfig linux-2.6.17-rc6/arch/mips/Kconfig --- linux-2.6.17-rc5/arch/mips/Kconfig 2006-06-06 01:27:30.199598550 +0000 +++ linux-2.6.17-rc6/arch/mips/Kconfig 2006-06-06 01:27:34.872101289 +0000 @@ -13,7 +13,7 @@ default SGI_IP22 config MIPS_MTX1 - bool "Support for 4G Systems MTX-1 board" + bool "4G Systems MTX-1 board" select DMA_NONCOHERENT select HW_HAS_PCI select SOC_AU1500 @@ -120,7 +120,7 @@ select SYS_SUPPORTS_LITTLE_ENDIAN config MIPS_COBALT - bool "Support for Cobalt Server" + bool "Cobalt Server" select DMA_NONCOHERENT select HW_HAS_PCI select I8259 @@ -132,7 +132,7 @@ select SYS_SUPPORTS_LITTLE_ENDIAN config MACH_DECSTATION - bool "Support for DECstations" + bool "DECstations" select BOOT_ELF32 select DMA_NONCOHERENT select EARLY_PRINTK @@ -158,7 +158,7 @@ otherwise choose R3000. config MIPS_EV64120 - bool "Support for Galileo EV64120 Evaluation board (EXPERIMENTAL)" + bool "Galileo EV64120 Evaluation board (EXPERIMENTAL)" depends on EXPERIMENTAL select DMA_NONCOHERENT select HW_HAS_PCI @@ -175,7 +175,7 @@ kernel for this platform. config MIPS_EV96100 - bool "Support for Galileo EV96100 Evaluation board (EXPERIMENTAL)" + bool "Galileo EV96100 Evaluation board (EXPERIMENTAL)" depends on EXPERIMENTAL select DMA_NONCOHERENT select HW_HAS_PCI @@ -195,7 +195,7 @@ here if you wish to build a kernel for this platform. config MIPS_IVR - bool "Support for Globespan IVR board" + bool "Globespan IVR board" select DMA_NONCOHERENT select HW_HAS_PCI select ITE_BOARD_GEN @@ -211,7 +211,7 @@ build a kernel for this platform. config MIPS_ITE8172 - bool "Support for ITE 8172G board" + bool "ITE 8172G board" select DMA_NONCOHERENT select HW_HAS_PCI select ITE_BOARD_GEN @@ -228,7 +228,7 @@ a kernel for this platform. config MACH_JAZZ - bool "Support for the Jazz family of machines" + bool "Jazz family of machines" select ARC select ARC32 select ARCH_MAY_HAVE_PC_FDC @@ -246,7 +246,7 @@ Olivetti M700-10 workstations. config LASAT - bool "Support for LASAT Networks platforms" + bool "LASAT Networks platforms" select DMA_NONCOHERENT select HW_HAS_PCI select MIPS_GT64120 @@ -258,7 +258,7 @@ select SYS_SUPPORTS_LITTLE_ENDIAN config MIPS_ATLAS - bool "Support for MIPS Atlas board" + bool "MIPS Atlas board" select BOOT_ELF32 select DMA_NONCOHERENT select IRQ_CPU @@ -283,7 +283,7 @@ board. config MIPS_MALTA - bool "Support for MIPS Malta board" + bool "MIPS Malta board" select ARCH_MAY_HAVE_PC_FDC select BOOT_ELF32 select HAVE_STD_PC_SERIAL_PORT @@ -311,7 +311,7 @@ board. config MIPS_SEAD - bool "Support for MIPS SEAD board (EXPERIMENTAL)" + bool "MIPS SEAD board (EXPERIMENTAL)" depends on EXPERIMENTAL select IRQ_CPU select DMA_NONCOHERENT @@ -328,7 +328,7 @@ board. config MIPS_SIM - bool 'Support for MIPS simulator (MIPSsim)' + bool 'MIPS simulator (MIPSsim)' select DMA_NONCOHERENT select IRQ_CPU select SYS_HAS_CPU_MIPS32_R1 @@ -341,7 +341,7 @@ emulator. config MOMENCO_JAGUAR_ATX - bool "Support for Momentum Jaguar board" + bool "Momentum Jaguar board" select BOOT_ELF32 select DMA_NONCOHERENT select HW_HAS_PCI @@ -361,7 +361,7 @@ Momentum Computer . config MOMENCO_OCELOT - bool "Support for Momentum Ocelot board" + bool "Momentum Ocelot board" select DMA_NONCOHERENT select HW_HAS_PCI select IRQ_CPU @@ -378,7 +378,7 @@ Momentum Computer . config MOMENCO_OCELOT_3 - bool "Support for Momentum Ocelot-3 board" + bool "Momentum Ocelot-3 board" select BOOT_ELF32 select DMA_NONCOHERENT select HW_HAS_PCI @@ -397,7 +397,7 @@ PMC-Sierra Rm79000 core. config MOMENCO_OCELOT_C - bool "Support for Momentum Ocelot-C board" + bool "Momentum Ocelot-C board" select DMA_NONCOHERENT select HW_HAS_PCI select IRQ_CPU @@ -414,7 +414,7 @@ Momentum Computer . config MOMENCO_OCELOT_G - bool "Support for Momentum Ocelot-G board" + bool "Momentum Ocelot-G board" select DMA_NONCOHERENT select HW_HAS_PCI select IRQ_CPU @@ -431,23 +431,23 @@ Momentum Computer . config MIPS_XXS1500 - bool "Support for MyCable XXS1500 board" + bool "MyCable XXS1500 board" select DMA_NONCOHERENT select SOC_AU1500 select SYS_SUPPORTS_LITTLE_ENDIAN config PNX8550_V2PCI - bool "Support for Philips PNX8550 based Viper2-PCI board" + bool "Philips PNX8550 based Viper2-PCI board" select PNX8550 select SYS_SUPPORTS_LITTLE_ENDIAN config PNX8550_JBS - bool "Support for Philips PNX8550 based JBS board" + bool "Philips PNX8550 based JBS board" select PNX8550 select SYS_SUPPORTS_LITTLE_ENDIAN config DDB5074 - bool "Support for NEC DDB Vrc-5074 (EXPERIMENTAL)" + bool "NEC DDB Vrc-5074 (EXPERIMENTAL)" depends on EXPERIMENTAL select DDB5XXX_COMMON select DMA_NONCOHERENT @@ -465,7 +465,7 @@ evaluation board. config DDB5476 - bool "Support for NEC DDB Vrc-5476" + bool "NEC DDB Vrc-5476" select DDB5XXX_COMMON select DMA_NONCOHERENT select HAVE_STD_PC_SERIAL_PORT @@ -486,7 +486,7 @@ IDE controller, PS2 keyboard, PS2 mouse, etc. config DDB5477 - bool "Support for NEC DDB Vrc-5477" + bool "NEC DDB Vrc-5477" select DDB5XXX_COMMON select DMA_NONCOHERENT select HW_HAS_PCI @@ -504,13 +504,13 @@ ether port USB, AC97, PCI, etc. config MACH_VR41XX - bool "Support for NEC VR4100 series based machines" + bool "NEC VR41XX-based machines" select SYS_HAS_CPU_VR41XX select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL config PMC_YOSEMITE - bool "Support for PMC-Sierra Yosemite eval board" + bool "PMC-Sierra Yosemite eval board" select DMA_COHERENT select HW_HAS_PCI select IRQ_CPU @@ -527,7 +527,7 @@ manufactured by PMC-Sierra. config QEMU - bool "Support for Qemu" + bool "Qemu" select DMA_COHERENT select GENERIC_ISA_DMA select HAVE_STD_PC_SERIAL_PORT @@ -547,7 +547,7 @@ can be found at http://www.linux-mips.org/wiki/Qemu. config SGI_IP22 - bool "Support for SGI IP22 (Indy/Indigo2)" + bool "SGI IP22 (Indy/Indigo2)" select ARC select ARC32 select BOOT_ELF32 @@ -567,7 +567,7 @@ that runs on these, say Y here. config SGI_IP27 - bool "Support for SGI IP27 (Origin200/2000)" + bool "SGI IP27 (Origin200/2000)" select ARC select ARC64 select BOOT_ELF64 @@ -583,7 +583,7 @@ here. config SGI_IP32 - bool "Support for SGI IP32 (O2) (EXPERIMENTAL)" + bool "SGI IP32 (O2) (EXPERIMENTAL)" depends on EXPERIMENTAL select ARC select ARC32 @@ -604,7 +604,7 @@ If you want this kernel to run on SGI O2 workstation, say Y here. config SIBYTE_BIGSUR - bool "Support for Sibyte BCM91480B-BigSur" + bool "Sibyte BCM91480B-BigSur" select BOOT_ELF32 select DMA_COHERENT select PCI_DOMAINS @@ -615,7 +615,7 @@ select SYS_SUPPORTS_LITTLE_ENDIAN config SIBYTE_SWARM - bool "Support for Sibyte BCM91250A-SWARM" + bool "Sibyte BCM91250A-SWARM" select BOOT_ELF32 select DMA_COHERENT select SIBYTE_SB1250 @@ -626,7 +626,7 @@ select SYS_SUPPORTS_LITTLE_ENDIAN config SIBYTE_SENTOSA - bool "Support for Sibyte BCM91250E-Sentosa" + bool "Sibyte BCM91250E-Sentosa" depends on EXPERIMENTAL select BOOT_ELF32 select DMA_COHERENT @@ -637,7 +637,7 @@ select SYS_SUPPORTS_LITTLE_ENDIAN config SIBYTE_RHONE - bool "Support for Sibyte BCM91125E-Rhone" + bool "Sibyte BCM91125E-Rhone" depends on EXPERIMENTAL select BOOT_ELF32 select DMA_COHERENT @@ -648,7 +648,7 @@ select SYS_SUPPORTS_LITTLE_ENDIAN config SIBYTE_CARMEL - bool "Support for Sibyte BCM91120x-Carmel" + bool "Sibyte BCM91120x-Carmel" depends on EXPERIMENTAL select BOOT_ELF32 select DMA_COHERENT @@ -659,7 +659,7 @@ select SYS_SUPPORTS_LITTLE_ENDIAN config SIBYTE_PTSWARM - bool "Support for Sibyte BCM91250PT-PTSWARM" + bool "Sibyte BCM91250PT-PTSWARM" depends on EXPERIMENTAL select BOOT_ELF32 select DMA_COHERENT @@ -671,7 +671,7 @@ select SYS_SUPPORTS_LITTLE_ENDIAN config SIBYTE_LITTLESUR - bool "Support for Sibyte BCM91250C2-LittleSur" + bool "Sibyte BCM91250C2-LittleSur" depends on EXPERIMENTAL select BOOT_ELF32 select DMA_COHERENT @@ -683,7 +683,7 @@ select SYS_SUPPORTS_LITTLE_ENDIAN config SIBYTE_CRHINE - bool "Support for Sibyte BCM91120C-CRhine" + bool "Sibyte BCM91120C-CRhine" depends on EXPERIMENTAL select BOOT_ELF32 select DMA_COHERENT @@ -694,7 +694,7 @@ select SYS_SUPPORTS_LITTLE_ENDIAN config SIBYTE_CRHONE - bool "Support for Sibyte BCM91125C-CRhone" + bool "Sibyte BCM91125C-CRhone" depends on EXPERIMENTAL select BOOT_ELF32 select DMA_COHERENT @@ -706,7 +706,7 @@ select SYS_SUPPORTS_LITTLE_ENDIAN config SNI_RM200_PCI - bool "Support for SNI RM200 PCI" + bool "SNI RM200 PCI" select ARC select ARC32 select ARCH_MAY_HAVE_PC_FDC @@ -732,7 +732,7 @@ support this machine type. config TOSHIBA_JMR3927 - bool "Support for Toshiba JMR-TX3927 board" + bool "Toshiba JMR-TX3927 board" select DMA_NONCOHERENT select HW_HAS_PCI select MIPS_TX3927 @@ -743,7 +743,7 @@ select TOSHIBA_BOARDS config TOSHIBA_RBTX4927 - bool "Support for Toshiba TBTX49[23]7 board" + bool "Toshiba TBTX49[23]7 board" select DMA_NONCOHERENT select HAS_TXX9_SERIAL select HW_HAS_PCI @@ -760,7 +760,7 @@ support this machine type config TOSHIBA_RBTX4938 - bool "Support for Toshiba RBTX4938 board" + bool "Toshiba RBTX4938 board" select HAVE_STD_PC_SERIAL_PORT select DMA_NONCOHERENT select GENERIC_ISA_DMA @@ -1411,13 +1411,12 @@ config PAGE_SIZE_16KB bool "16kB" - depends on EXPERIMENTAL && !CPU_R3000 && !CPU_TX39XX + depends on !CPU_R3000 && !CPU_TX39XX help Using 16kB page size will result in higher performance kernel at the price of higher memory consumption. This option is available on - all non-R3000 family processor. Not that at the time of this - writing this option is still high experimental; there are also - issues with compatibility of user applications. + all non-R3000 family processors. Note that you will need a suitable + Linux distribution to support this. config PAGE_SIZE_64KB bool "64kB" @@ -1426,8 +1425,7 @@ Using 64kB page size will result in higher performance kernel at the price of higher memory consumption. This option is available on all non-R3000 family processor. Not that at the time of this - writing this option is still high experimental; there are also - issues with compatibility of user applications. + writing this option is still high experimental. endchoice diff -urN linux-2.6.17-rc5/arch/mips/au1000/common/irq.c linux-2.6.17-rc6/arch/mips/au1000/common/irq.c --- linux-2.6.17-rc5/arch/mips/au1000/common/irq.c 2006-06-06 01:27:30.199598550 +0000 +++ linux-2.6.17-rc6/arch/mips/au1000/common/irq.c 2006-06-06 01:27:34.872101289 +0000 @@ -68,6 +68,7 @@ extern void set_debug_traps(void); extern irq_cpustat_t irq_stat [NR_CPUS]; +extern void mips_timer_interrupt(struct pt_regs *regs); static void setup_local_irq(unsigned int irq, int type, int int_req); static unsigned int startup_irq(unsigned int irq); diff -urN linux-2.6.17-rc5/arch/mips/au1000/common/prom.c linux-2.6.17-rc6/arch/mips/au1000/common/prom.c --- linux-2.6.17-rc5/arch/mips/au1000/common/prom.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/mips/au1000/common/prom.c 2006-06-06 01:27:34.872101289 +0000 @@ -1,10 +1,9 @@ /* * * BRIEF MODULE DESCRIPTION - * PROM library initialisation code, assuming a version of - * pmon is the boot code. + * PROM library initialisation code, assuming YAMON is the boot loader. * - * Copyright 2000,2001 MontaVista Software Inc. + * Copyright 2000, 2001, 2006 MontaVista Software Inc. * Author: MontaVista Software, Inc. * ppopov@mvista.com or source@mvista.com * @@ -49,9 +48,9 @@ typedef struct { - char *name; -/* char *val; */ -}t_env_var; + char *name; + char *val; +} t_env_var; char * prom_getcmdline(void) @@ -85,21 +84,16 @@ { /* * Return a pointer to the given environment variable. - * Environment variables are stored in the form of "memsize=64". */ t_env_var *env = (t_env_var *)prom_envp; - int i; - - i = strlen(envname); - while(env->name) { - if(strncmp(envname, env->name, i) == 0) { - return(env->name + strlen(envname) + 1); - } + while (env->name) { + if (strcmp(envname, env->name) == 0) + return env->val; env++; } - return(NULL); + return NULL; } inline unsigned char str2hexnum(unsigned char c) diff -urN linux-2.6.17-rc5/arch/mips/au1000/common/sleeper.S linux-2.6.17-rc6/arch/mips/au1000/common/sleeper.S --- linux-2.6.17-rc5/arch/mips/au1000/common/sleeper.S 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/mips/au1000/common/sleeper.S 2006-06-06 01:27:34.876101720 +0000 @@ -112,6 +112,11 @@ mtc0 k0, CP0_PAGEMASK lw k0, 0x14(sp) mtc0 k0, CP0_CONFIG + + /* We need to catch the ealry Alchemy SOCs with + * the write-only Config[OD] bit and set it back to one... + */ + jal au1x00_fixup_config_od lw $1, PT_R1(sp) lw $2, PT_R2(sp) lw $3, PT_R3(sp) diff -urN linux-2.6.17-rc5/arch/mips/au1000/common/time.c linux-2.6.17-rc6/arch/mips/au1000/common/time.c --- linux-2.6.17-rc5/arch/mips/au1000/common/time.c 2006-06-06 01:27:30.199598550 +0000 +++ linux-2.6.17-rc6/arch/mips/au1000/common/time.c 2006-06-06 01:27:34.876101720 +0000 @@ -116,6 +116,7 @@ null: ack_r4ktimer(0); + irq_exit(); } #ifdef CONFIG_PM diff -urN linux-2.6.17-rc5/arch/mips/ddb5xxx/ddb5476/dbg_io.c linux-2.6.17-rc6/arch/mips/ddb5xxx/ddb5476/dbg_io.c --- linux-2.6.17-rc5/arch/mips/ddb5xxx/ddb5476/dbg_io.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/mips/ddb5xxx/ddb5476/dbg_io.c 2006-06-06 01:27:34.900104302 +0000 @@ -86,7 +86,7 @@ /* disable interrupts */ UART16550_WRITE(OFS_INTR_ENABLE, 0); - /* set up buad rate */ + /* set up baud rate */ { uint32 divisor; diff -urN linux-2.6.17-rc5/arch/mips/ddb5xxx/ddb5477/kgdb_io.c linux-2.6.17-rc6/arch/mips/ddb5xxx/ddb5477/kgdb_io.c --- linux-2.6.17-rc5/arch/mips/ddb5xxx/ddb5477/kgdb_io.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/mips/ddb5xxx/ddb5477/kgdb_io.c 2006-06-06 01:27:34.904104733 +0000 @@ -86,7 +86,7 @@ /* disable interrupts */ UART16550_WRITE(OFS_INTR_ENABLE, 0); - /* set up buad rate */ + /* set up baud rate */ { uint32 divisor; diff -urN linux-2.6.17-rc5/arch/mips/gt64120/ev64120/serialGT.c linux-2.6.17-rc6/arch/mips/gt64120/ev64120/serialGT.c --- linux-2.6.17-rc5/arch/mips/gt64120/ev64120/serialGT.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/mips/gt64120/ev64120/serialGT.c 2006-06-06 01:27:34.904104733 +0000 @@ -149,7 +149,7 @@ #else /* * Note: Set baud rate, hardcoded here for rate of 115200 - * since became unsure of above "buad rate" algorithm (??). + * since became unsure of above "baud rate" algorithm (??). */ outreg(channel, LCR, 0x83); outreg(channel, DLM, 0x00); // See note above diff -urN linux-2.6.17-rc5/arch/mips/gt64120/momenco_ocelot/dbg_io.c linux-2.6.17-rc6/arch/mips/gt64120/momenco_ocelot/dbg_io.c --- linux-2.6.17-rc5/arch/mips/gt64120/momenco_ocelot/dbg_io.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/mips/gt64120/momenco_ocelot/dbg_io.c 2006-06-06 01:27:34.904104733 +0000 @@ -73,7 +73,7 @@ /* disable interrupts */ UART16550_WRITE(OFS_INTR_ENABLE, 0); - /* set up buad rate */ + /* set up baud rate */ { uint32 divisor; diff -urN linux-2.6.17-rc5/arch/mips/ite-boards/generic/dbg_io.c linux-2.6.17-rc6/arch/mips/ite-boards/generic/dbg_io.c --- linux-2.6.17-rc5/arch/mips/ite-boards/generic/dbg_io.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/mips/ite-boards/generic/dbg_io.c 2006-06-06 01:27:34.908105163 +0000 @@ -72,7 +72,7 @@ /* disable interrupts */ UART16550_WRITE(OFS_INTR_ENABLE, 0); - /* set up buad rate */ + /* set up baud rate */ { uint32 divisor; diff -urN linux-2.6.17-rc5/arch/mips/kernel/asm-offsets.c linux-2.6.17-rc6/arch/mips/kernel/asm-offsets.c --- linux-2.6.17-rc5/arch/mips/kernel/asm-offsets.c 2006-06-06 01:27:30.239602854 +0000 +++ linux-2.6.17-rc6/arch/mips/kernel/asm-offsets.c 2006-06-06 01:27:34.912105594 +0000 @@ -272,8 +272,8 @@ text("/* Linux sigcontext offsets. */"); offset("#define SC_REGS ", struct sigcontext, sc_regs); offset("#define SC_FPREGS ", struct sigcontext, sc_fpregs); - offset("#define SC_MDHI ", struct sigcontext, sc_hi); - offset("#define SC_MDLO ", struct sigcontext, sc_lo); + offset("#define SC_MDHI ", struct sigcontext, sc_mdhi); + offset("#define SC_MDLO ", struct sigcontext, sc_mdlo); offset("#define SC_PC ", struct sigcontext, sc_pc); offset("#define SC_FPC_CSR ", struct sigcontext, sc_fpc_csr); linefeed; diff -urN linux-2.6.17-rc5/arch/mips/kernel/cpu-bugs64.c linux-2.6.17-rc6/arch/mips/kernel/cpu-bugs64.c --- linux-2.6.17-rc5/arch/mips/kernel/cpu-bugs64.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/mips/kernel/cpu-bugs64.c 2006-06-06 01:27:34.912105594 +0000 @@ -206,7 +206,7 @@ "daddi %0, %1, %3\n\t" ".set pop" : "=r" (v), "=&r" (tmp) - : "I" (0xffffffffffffdb9a), "I" (0x1234)); + : "I" (0xffffffffffffdb9aUL), "I" (0x1234)); set_except_vector(12, handler); local_irq_restore(flags); @@ -224,7 +224,7 @@ "dsrl %1, %1, 1\n\t" "daddi %0, %1, %3" : "=r" (v), "=&r" (tmp) - : "I" (0xffffffffffffdb9a), "I" (0x1234)); + : "I" (0xffffffffffffdb9aUL), "I" (0x1234)); set_except_vector(12, handler); local_irq_restore(flags); @@ -280,7 +280,7 @@ "daddu %1, %2\n\t" ".set pop" : "=&r" (v), "=&r" (w), "=&r" (tmp) - : "I" (0xffffffffffffdb9a), "I" (0x1234)); + : "I" (0xffffffffffffdb9aUL), "I" (0x1234)); if (v == w) { printk("no.\n"); @@ -296,7 +296,7 @@ "addiu %1, $0, %4\n\t" "daddu %1, %2" : "=&r" (v), "=&r" (w), "=&r" (tmp) - : "I" (0xffffffffffffdb9a), "I" (0x1234)); + : "I" (0xffffffffffffdb9aUL), "I" (0x1234)); if (v == w) { printk("yes.\n"); diff -urN linux-2.6.17-rc5/arch/mips/kernel/cpu-probe.c linux-2.6.17-rc6/arch/mips/kernel/cpu-probe.c --- linux-2.6.17-rc5/arch/mips/kernel/cpu-probe.c 2006-06-06 01:27:30.239602854 +0000 +++ linux-2.6.17-rc6/arch/mips/kernel/cpu-probe.c 2006-06-06 01:27:34.912105594 +0000 @@ -121,6 +121,7 @@ case CPU_24K: case CPU_25KF: case CPU_34K: + case CPU_74K: case CPU_PR4450: cpu_wait = r4k_wait; printk(" available.\n"); @@ -432,6 +433,15 @@ MIPS_CPU_LLSC; c->tlbsize = 64; break; + case PRID_IMP_R14000: + c->cputype = CPU_R14000; + c->isa_level = MIPS_CPU_ISA_IV; + c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX | + MIPS_CPU_FPU | MIPS_CPU_32FPR | + MIPS_CPU_COUNTER | MIPS_CPU_WATCH | + MIPS_CPU_LLSC; + c->tlbsize = 64; + break; } } @@ -593,6 +603,9 @@ case PRID_IMP_34K: c->cputype = CPU_34K; break; + case PRID_IMP_74K: + c->cputype = CPU_74K; + break; } } @@ -642,7 +655,7 @@ case PRID_IMP_SB1: c->cputype = CPU_SB1; /* FPU in pass1 is known to have issues. */ - if ((c->processor_id & 0xff) < 0x20) + if ((c->processor_id & 0xff) < 0x02) c->options &= ~(MIPS_CPU_FPU | MIPS_CPU_32FPR); break; case PRID_IMP_SB1A: diff -urN linux-2.6.17-rc5/arch/mips/kernel/entry.S linux-2.6.17-rc6/arch/mips/kernel/entry.S --- linux-2.6.17-rc5/arch/mips/kernel/entry.S 2006-06-06 01:27:30.239602854 +0000 +++ linux-2.6.17-rc6/arch/mips/kernel/entry.S 2006-06-06 01:27:34.912105594 +0000 @@ -101,7 +101,7 @@ EMT 1: mfc0 v1, CP0_TCSTATUS - /* We set IXMT above, XOR should cler it here */ + /* We set IXMT above, XOR should clear it here */ xori v1, v1, TCSTATUS_IXMT or v1, v0, v1 mtc0 v1, CP0_TCSTATUS diff -urN linux-2.6.17-rc5/arch/mips/kernel/gdb-low.S linux-2.6.17-rc6/arch/mips/kernel/gdb-low.S --- linux-2.6.17-rc5/arch/mips/kernel/gdb-low.S 2006-06-06 01:27:30.239602854 +0000 +++ linux-2.6.17-rc6/arch/mips/kernel/gdb-low.S 2006-06-06 01:27:34.912105594 +0000 @@ -54,9 +54,11 @@ */ mfc0 k0, CP0_CAUSE andi k0, k0, 0x7c - add k1, k1, k0 - PTR_L k0, saved_vectors(k1) - jr k0 +#ifdef CONFIG_64BIT + dsll k0, k0, 1 +#endif + PTR_L k1, saved_vectors(k0) + jr k1 nop 1: move k0, sp diff -urN linux-2.6.17-rc5/arch/mips/kernel/module.c linux-2.6.17-rc6/arch/mips/kernel/module.c --- linux-2.6.17-rc5/arch/mips/kernel/module.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/mips/kernel/module.c 2006-06-06 01:27:34.916106024 +0000 @@ -288,6 +288,9 @@ sym = (Elf_Sym *)sechdrs[symindex].sh_addr + ELF_MIPS_R_SYM(rel[i]); if (!sym->st_value) { + /* Ignore unresolved weak symbol */ + if (ELF_ST_BIND(sym->st_info) == STB_WEAK) + continue; printk(KERN_WARNING "%s: Unknown symbol %s\n", me->name, strtab + sym->st_name); return -ENOENT; @@ -325,6 +328,9 @@ sym = (Elf_Sym *)sechdrs[symindex].sh_addr + ELF_MIPS_R_SYM(rel[i]); if (!sym->st_value) { + /* Ignore unresolved weak symbol */ + if (ELF_ST_BIND(sym->st_info) == STB_WEAK) + continue; printk(KERN_WARNING "%s: Unknown symbol %s\n", me->name, strtab + sym->st_name); return -ENOENT; diff -urN linux-2.6.17-rc5/arch/mips/kernel/proc.c linux-2.6.17-rc6/arch/mips/kernel/proc.c --- linux-2.6.17-rc5/arch/mips/kernel/proc.c 2006-06-06 01:27:30.243603285 +0000 +++ linux-2.6.17-rc6/arch/mips/kernel/proc.c 2006-06-06 01:27:34.916106024 +0000 @@ -42,6 +42,7 @@ [CPU_R8000] = "R8000", [CPU_R10000] = "R10000", [CPU_R12000] = "R12000", + [CPU_R14000] = "R14000", [CPU_R4300] = "R4300", [CPU_R4650] = "R4650", [CPU_R4700] = "R4700", @@ -74,6 +75,7 @@ [CPU_24K] = "MIPS 24K", [CPU_25KF] = "MIPS 25Kf", [CPU_34K] = "MIPS 34K", + [CPU_74K] = "MIPS 74K", [CPU_VR4111] = "NEC VR4111", [CPU_VR4121] = "NEC VR4121", [CPU_VR4122] = "NEC VR4122", diff -urN linux-2.6.17-rc5/arch/mips/kernel/scall64-o32.S linux-2.6.17-rc6/arch/mips/kernel/scall64-o32.S --- linux-2.6.17-rc5/arch/mips/kernel/scall64-o32.S 2006-06-06 01:27:30.247603715 +0000 +++ linux-2.6.17-rc6/arch/mips/kernel/scall64-o32.S 2006-06-06 01:27:34.916106024 +0000 @@ -209,7 +209,7 @@ PTR sys_fork PTR sys_read PTR sys_write - PTR sys_open /* 4005 */ + PTR compat_sys_open /* 4005 */ PTR sys_close PTR sys_waitpid PTR sys_creat diff -urN linux-2.6.17-rc5/arch/mips/kernel/setup.c linux-2.6.17-rc6/arch/mips/kernel/setup.c --- linux-2.6.17-rc5/arch/mips/kernel/setup.c 2006-06-06 01:27:30.247603715 +0000 +++ linux-2.6.17-rc6/arch/mips/kernel/setup.c 2006-06-06 01:27:34.916106024 +0000 @@ -246,7 +246,7 @@ #ifdef CONFIG_64BIT /* HACK: Guess if the sign extension was forgotten */ if (start > 0x0000000080000000 && start < 0x00000000ffffffff) - start |= 0xffffffff00000000; + start |= 0xffffffff00000000UL; #endif end = start + size; @@ -355,8 +355,6 @@ } #endif - memory_present(0, first_usable_pfn, max_low_pfn); - /* Initialize the boot-time allocator with low memory only. */ bootmap_size = init_bootmem(first_usable_pfn, max_low_pfn); @@ -410,6 +408,7 @@ /* Register lowmem ranges */ free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(size)); + memory_present(0, curr_pfn, curr_pfn + size - 1); } /* Reserve the bootmap memory. */ @@ -419,17 +418,20 @@ #ifdef CONFIG_BLK_DEV_INITRD initrd_below_start_ok = 1; if (initrd_start) { - unsigned long initrd_size = ((unsigned char *)initrd_end) - ((unsigned char *)initrd_start); + unsigned long initrd_size = ((unsigned char *)initrd_end) - + ((unsigned char *)initrd_start); + const int width = sizeof(long) * 2; + printk("Initial ramdisk at: 0x%p (%lu bytes)\n", (void *)initrd_start, initrd_size); if (CPHYSADDR(initrd_end) > PFN_PHYS(max_low_pfn)) { printk("initrd extends beyond end of memory " "(0x%0*Lx > 0x%0*Lx)\ndisabling initrd\n", - sizeof(long) * 2, - (unsigned long long)CPHYSADDR(initrd_end), - sizeof(long) * 2, - (unsigned long long)PFN_PHYS(max_low_pfn)); + width, + (unsigned long long) CPHYSADDR(initrd_end), + width, + (unsigned long long) PFN_PHYS(max_low_pfn)); initrd_start = initrd_end = 0; initrd_reserve_bootmem = 0; } diff -urN linux-2.6.17-rc5/arch/mips/kernel/signal-common.h linux-2.6.17-rc6/arch/mips/kernel/signal-common.h --- linux-2.6.17-rc5/arch/mips/kernel/signal-common.h 2006-06-06 01:27:30.247603715 +0000 +++ linux-2.6.17-rc6/arch/mips/kernel/signal-common.h 2006-06-06 01:27:34.916106024 +0000 @@ -31,7 +31,6 @@ save_gp_reg(31); #undef save_gp_reg -#ifdef CONFIG_32BIT err |= __put_user(regs->hi, &sc->sc_mdhi); err |= __put_user(regs->lo, &sc->sc_mdlo); if (cpu_has_dsp) { @@ -43,20 +42,6 @@ err |= __put_user(mflo3(), &sc->sc_lo3); err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp); } -#endif -#ifdef CONFIG_64BIT - err |= __put_user(regs->hi, &sc->sc_hi[0]); - err |= __put_user(regs->lo, &sc->sc_lo[0]); - if (cpu_has_dsp) { - err |= __put_user(mfhi1(), &sc->sc_hi[1]); - err |= __put_user(mflo1(), &sc->sc_lo[1]); - err |= __put_user(mfhi2(), &sc->sc_hi[2]); - err |= __put_user(mflo2(), &sc->sc_lo[2]); - err |= __put_user(mfhi3(), &sc->sc_hi[3]); - err |= __put_user(mflo3(), &sc->sc_lo[3]); - err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp); - } -#endif err |= __put_user(!!used_math(), &sc->sc_used_math); @@ -92,7 +77,6 @@ current_thread_info()->restart_block.fn = do_no_restart_syscall; err |= __get_user(regs->cp0_epc, &sc->sc_pc); -#ifdef CONFIG_32BIT err |= __get_user(regs->hi, &sc->sc_mdhi); err |= __get_user(regs->lo, &sc->sc_mdlo); if (cpu_has_dsp) { @@ -104,20 +88,6 @@ err |= __get_user(treg, &sc->sc_lo3); mtlo3(treg); err |= __get_user(treg, &sc->sc_dsp); wrdsp(treg, DSP_MASK); } -#endif -#ifdef CONFIG_64BIT - err |= __get_user(regs->hi, &sc->sc_hi[0]); - err |= __get_user(regs->lo, &sc->sc_lo[0]); - if (cpu_has_dsp) { - err |= __get_user(treg, &sc->sc_hi[1]); mthi1(treg); - err |= __get_user(treg, &sc->sc_lo[1]); mthi1(treg); - err |= __get_user(treg, &sc->sc_hi[2]); mthi2(treg); - err |= __get_user(treg, &sc->sc_lo[2]); mthi2(treg); - err |= __get_user(treg, &sc->sc_hi[3]); mthi3(treg); - err |= __get_user(treg, &sc->sc_lo[3]); mthi3(treg); - err |= __get_user(treg, &sc->sc_dsp); wrdsp(treg, DSP_MASK); - } -#endif #define restore_gp_reg(i) do { \ err |= __get_user(regs->regs[i], &sc->sc_regs[i]); \ diff -urN linux-2.6.17-rc5/arch/mips/kernel/smp.c linux-2.6.17-rc6/arch/mips/kernel/smp.c --- linux-2.6.17-rc5/arch/mips/kernel/smp.c 2006-06-06 01:27:30.247603715 +0000 +++ linux-2.6.17-rc6/arch/mips/kernel/smp.c 2006-06-06 01:27:34.920106455 +0000 @@ -247,6 +247,9 @@ current_thread_info()->cpu = 0; smp_tune_scheduling(); plat_prepare_cpus(max_cpus); +#ifndef CONFIG_HOTPLUG_CPU + cpu_present_map = cpu_possible_map; +#endif } /* preload SMP state for boot cpu */ @@ -442,7 +445,7 @@ int cpu; int ret; - for_each_cpu(cpu) { + for_each_present_cpu(cpu) { ret = register_cpu(&per_cpu(cpu_devices, cpu), cpu, NULL); if (ret) printk(KERN_WARNING "topology_init: register_cpu %d " diff -urN linux-2.6.17-rc5/arch/mips/kernel/syscall.c linux-2.6.17-rc6/arch/mips/kernel/syscall.c --- linux-2.6.17-rc5/arch/mips/kernel/syscall.c 2006-06-06 01:27:30.251604146 +0000 +++ linux-2.6.17-rc6/arch/mips/kernel/syscall.c 2006-06-06 01:27:34.920106455 +0000 @@ -276,31 +276,9 @@ asmlinkage int _sys_sysmips(int cmd, long arg1, int arg2, int arg3) { - int tmp, len; - char __user *name; + int tmp; switch(cmd) { - case SETNAME: { - char nodename[__NEW_UTS_LEN + 1]; - - if (!capable(CAP_SYS_ADMIN)) - return -EPERM; - - name = (char __user *) arg1; - - len = strncpy_from_user(nodename, name, __NEW_UTS_LEN); - if (len < 0) - return -EFAULT; - - down_write(&uts_sem); - strncpy(system_utsname.nodename, nodename, len); - nodename[__NEW_UTS_LEN] = '\0'; - strlcpy(system_utsname.nodename, nodename, - sizeof(system_utsname.nodename)); - up_write(&uts_sem); - return 0; - } - case MIPS_ATOMIC_SET: printk(KERN_CRIT "How did I get here?\n"); return -EINVAL; @@ -313,9 +291,6 @@ case FLUSH_CACHE: __flush_cache_all(); return 0; - - case MIPS_RDNVRAM: - return -EIO; } return -EINVAL; diff -urN linux-2.6.17-rc5/arch/mips/kernel/traps.c linux-2.6.17-rc6/arch/mips/kernel/traps.c --- linux-2.6.17-rc5/arch/mips/kernel/traps.c 2006-06-06 01:27:30.255604576 +0000 +++ linux-2.6.17-rc6/arch/mips/kernel/traps.c 2006-06-06 01:27:34.924106885 +0000 @@ -819,15 +819,30 @@ asmlinkage void do_mcheck(struct pt_regs *regs) { + const int field = 2 * sizeof(unsigned long); + int multi_match = regs->cp0_status & ST0_TS; + show_regs(regs); - dump_tlb_all(); + + if (multi_match) { + printk("Index : %0x\n", read_c0_index()); + printk("Pagemask: %0x\n", read_c0_pagemask()); + printk("EntryHi : %0*lx\n", field, read_c0_entryhi()); + printk("EntryLo0: %0*lx\n", field, read_c0_entrylo0()); + printk("EntryLo1: %0*lx\n", field, read_c0_entrylo1()); + printk("\n"); + dump_tlb_all(); + } + + show_code((unsigned int *) regs->cp0_epc); + /* * Some chips may have other causes of machine check (e.g. SB1 * graduation timer) */ panic("Caught Machine Check exception - %scaused by multiple " "matching entries in the TLB.", - (regs->cp0_status & ST0_TS) ? "" : "not "); + (multi_match) ? "" : "not "); } asmlinkage void do_mt(struct pt_regs *regs) @@ -902,6 +917,7 @@ { switch (current_cpu_data.cputype) { case CPU_24K: + case CPU_34K: case CPU_5KC: write_c0_ecc(0x80000000); back_to_back_c0_hazard(); diff -urN linux-2.6.17-rc5/arch/mips/kernel/vmlinux.lds.S linux-2.6.17-rc6/arch/mips/kernel/vmlinux.lds.S --- linux-2.6.17-rc5/arch/mips/kernel/vmlinux.lds.S 2006-06-06 01:27:30.255604576 +0000 +++ linux-2.6.17-rc6/arch/mips/kernel/vmlinux.lds.S 2006-06-06 01:27:34.924106885 +0000 @@ -151,23 +151,13 @@ /* This is the MIPS specific mdebug section. */ .mdebug : { *(.mdebug) } - /* These are needed for ELF backends which have not yet been - converted to the new style linker. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - /* DWARF debug sections. - Symbols in the .debug DWARF section are relative to the beginning of the - section so we begin .debug at 0. It's not clear yet what needs to happen - for the others. */ - .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) } + + STABS_DEBUG + + DWARF_DEBUG + /* These must appear regardless of . */ .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } - .comment : { *(.comment) } .note : { *(.note) } } diff -urN linux-2.6.17-rc5/arch/mips/math-emu/dp_fint.c linux-2.6.17-rc6/arch/mips/math-emu/dp_fint.c --- linux-2.6.17-rc5/arch/mips/math-emu/dp_fint.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/mips/math-emu/dp_fint.c 2006-06-06 01:27:34.924106885 +0000 @@ -29,7 +29,9 @@ ieee754dp ieee754dp_fint(int x) { - COMPXDP; + u64 xm; + int xe; + int xs; CLEARCX; diff -urN linux-2.6.17-rc5/arch/mips/math-emu/dp_flong.c linux-2.6.17-rc6/arch/mips/math-emu/dp_flong.c --- linux-2.6.17-rc5/arch/mips/math-emu/dp_flong.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/mips/math-emu/dp_flong.c 2006-06-06 01:27:34.924106885 +0000 @@ -29,7 +29,9 @@ ieee754dp ieee754dp_flong(s64 x) { - COMPXDP; + u64 xm; + int xe; + int xs; CLEARCX; diff -urN linux-2.6.17-rc5/arch/mips/math-emu/sp_fint.c linux-2.6.17-rc6/arch/mips/math-emu/sp_fint.c --- linux-2.6.17-rc5/arch/mips/math-emu/sp_fint.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/mips/math-emu/sp_fint.c 2006-06-06 01:27:34.928107315 +0000 @@ -29,7 +29,9 @@ ieee754sp ieee754sp_fint(int x) { - COMPXSP; + unsigned xm; + int xe; + int xs; CLEARCX; diff -urN linux-2.6.17-rc5/arch/mips/math-emu/sp_flong.c linux-2.6.17-rc6/arch/mips/math-emu/sp_flong.c --- linux-2.6.17-rc5/arch/mips/math-emu/sp_flong.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/mips/math-emu/sp_flong.c 2006-06-06 01:27:34.928107315 +0000 @@ -29,7 +29,9 @@ ieee754sp ieee754sp_flong(s64 x) { - COMPXDP; /* <--- need 64-bit mantissa temp */ + u64 xm; /* <--- need 64-bit mantissa temp */ + int xe; + int xs; CLEARCX; diff -urN linux-2.6.17-rc5/arch/mips/mm/c-r4k.c linux-2.6.17-rc6/arch/mips/mm/c-r4k.c --- linux-2.6.17-rc5/arch/mips/mm/c-r4k.c 2006-06-06 01:27:30.263605437 +0000 +++ linux-2.6.17-rc6/arch/mips/mm/c-r4k.c 2006-06-06 01:27:34.932107746 +0000 @@ -29,6 +29,27 @@ #include #include /* for run_uncached() */ + +/* + * Special Variant of smp_call_function for use by cache functions: + * + * o No return value + * o collapses to normal function call on UP kernels + * o collapses to normal function call on systems with a single shared + * primary cache. + */ +static inline void r4k_on_each_cpu(void (*func) (void *info), void *info, + int retry, int wait) +{ + preempt_disable(); + +#if !defined(CONFIG_MIPS_MT_SMP) && !defined(CONFIG_MIPS_MT_SMTC) + smp_call_function(func, info, retry, wait); +#endif + func(info); + preempt_enable(); +} + /* * Must die. */ @@ -299,7 +320,7 @@ if (!cpu_has_dc_aliases) return; - on_each_cpu(local_r4k_flush_cache_all, NULL, 1, 1); + r4k_on_each_cpu(local_r4k_flush_cache_all, NULL, 1, 1); } static inline void local_r4k___flush_cache_all(void * args) @@ -314,13 +335,14 @@ case CPU_R4400MC: case CPU_R10000: case CPU_R12000: + case CPU_R14000: r4k_blast_scache(); } } static void r4k___flush_cache_all(void) { - on_each_cpu(local_r4k___flush_cache_all, NULL, 1, 1); + r4k_on_each_cpu(local_r4k___flush_cache_all, NULL, 1, 1); } static inline void local_r4k_flush_cache_range(void * args) @@ -341,7 +363,7 @@ static void r4k_flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) { - on_each_cpu(local_r4k_flush_cache_range, vma, 1, 1); + r4k_on_each_cpu(local_r4k_flush_cache_range, vma, 1, 1); } static inline void local_r4k_flush_cache_mm(void * args) @@ -370,7 +392,7 @@ if (!cpu_has_dc_aliases) return; - on_each_cpu(local_r4k_flush_cache_mm, mm, 1, 1); + r4k_on_each_cpu(local_r4k_flush_cache_mm, mm, 1, 1); } struct flush_cache_page_args { @@ -461,7 +483,7 @@ args.addr = addr; args.pfn = pfn; - on_each_cpu(local_r4k_flush_cache_page, &args, 1, 1); + r4k_on_each_cpu(local_r4k_flush_cache_page, &args, 1, 1); } static inline void local_r4k_flush_data_cache_page(void * addr) @@ -471,7 +493,7 @@ static void r4k_flush_data_cache_page(unsigned long addr) { - on_each_cpu(local_r4k_flush_data_cache_page, (void *) addr, 1, 1); + r4k_on_each_cpu(local_r4k_flush_data_cache_page, (void *) addr, 1, 1); } struct flush_icache_range_args { @@ -514,7 +536,7 @@ args.start = start; args.end = end; - on_each_cpu(local_r4k_flush_icache_range, &args, 1, 1); + r4k_on_each_cpu(local_r4k_flush_icache_range, &args, 1, 1); instruction_hazard(); } @@ -590,7 +612,7 @@ args.vma = vma; args.page = page; - on_each_cpu(local_r4k_flush_icache_page, &args, 1, 1); + r4k_on_each_cpu(local_r4k_flush_icache_page, &args, 1, 1); } @@ -689,7 +711,7 @@ static void r4k_flush_cache_sigtramp(unsigned long addr) { - on_each_cpu(local_r4k_flush_cache_sigtramp, (void *) addr, 1, 1); + r4k_on_each_cpu(local_r4k_flush_cache_sigtramp, (void *) addr, 1, 1); } static void r4k_flush_icache_all(void) @@ -812,6 +834,7 @@ case CPU_R10000: case CPU_R12000: + case CPU_R14000: icache_size = 1 << (12 + ((config & R10K_CONF_IC) >> 29)); c->icache.linesz = 64; c->icache.ways = 2; @@ -965,9 +988,11 @@ c->dcache.flags |= MIPS_CACHE_PINDEX; case CPU_R10000: case CPU_R12000: + case CPU_R14000: case CPU_SB1: break; case CPU_24K: + case CPU_34K: if (!(read_c0_config7() & (1 << 16))) default: if (c->dcache.waysize > PAGE_SIZE) @@ -1091,6 +1116,7 @@ case CPU_R10000: case CPU_R12000: + case CPU_R14000: scache_size = 0x80000 << ((config & R10K_CONF_SS) >> 16); c->scache.linesz = 64 << ((config >> 13) & 1); c->scache.ways = 2; @@ -1135,6 +1161,31 @@ c->options |= MIPS_CPU_SUBSET_CACHES; } +void au1x00_fixup_config_od(void) +{ + /* + * c0_config.od (bit 19) was write only (and read as 0) + * on the early revisions of Alchemy SOCs. It disables the bus + * transaction overlapping and needs to be set to fix various errata. + */ + switch (read_c0_prid()) { + case 0x00030100: /* Au1000 DA */ + case 0x00030201: /* Au1000 HA */ + case 0x00030202: /* Au1000 HB */ + case 0x01030200: /* Au1500 AB */ + /* + * Au1100 errata actually keeps silence about this bit, so we set it + * just in case for those revisions that require it to be set according + * to arch/mips/au1000/common/cputable.c + */ + case 0x02030200: /* Au1100 AB */ + case 0x02030201: /* Au1100 BA */ + case 0x02030202: /* Au1100 BC */ + set_c0_config(1 << 19); + break; + } +} + static inline void coherency_setup(void) { change_c0_config(CONF_CM_CMASK, CONF_CM_DEFAULT); @@ -1155,6 +1206,15 @@ case CPU_R4400MC: clear_c0_config(CONF_CU); break; + /* + * We need to catch the ealry Alchemy SOCs with + * the write-only co_config.od bit and set it back to one... + */ + case CPU_AU1000: /* rev. DA, HA, HB */ + case CPU_AU1100: /* rev. AB, BA, BC ?? */ + case CPU_AU1500: /* rev. AB */ + au1x00_fixup_config_od(); + break; } } diff -urN linux-2.6.17-rc5/arch/mips/mm/init.c linux-2.6.17-rc6/arch/mips/mm/init.c --- linux-2.6.17-rc5/arch/mips/mm/init.c 2006-06-06 01:27:30.263605437 +0000 +++ linux-2.6.17-rc6/arch/mips/mm/init.c 2006-06-06 01:27:34.932107746 +0000 @@ -227,7 +227,7 @@ for (tmp = 0; tmp < max_low_pfn; tmp++) if (page_is_ram(tmp)) { ram++; - if (PageReserved(mem_map+tmp)) + if (PageReserved(pfn_to_page(tmp))) reservedpages++; } diff -urN linux-2.6.17-rc5/arch/mips/mm/pg-r4k.c linux-2.6.17-rc6/arch/mips/mm/pg-r4k.c --- linux-2.6.17-rc5/arch/mips/mm/pg-r4k.c 2006-06-06 01:27:30.263605437 +0000 +++ linux-2.6.17-rc6/arch/mips/mm/pg-r4k.c 2006-06-06 01:27:34.932107746 +0000 @@ -357,6 +357,7 @@ case CPU_R10000: case CPU_R12000: + case CPU_R14000: pref_src_mode = Pref_LoadStreamed; pref_dst_mode = Pref_StoreStreamed; break; diff -urN linux-2.6.17-rc5/arch/mips/mm/tlbex.c linux-2.6.17-rc6/arch/mips/mm/tlbex.c --- linux-2.6.17-rc5/arch/mips/mm/tlbex.c 2006-06-06 01:27:30.267605867 +0000 +++ linux-2.6.17-rc6/arch/mips/mm/tlbex.c 2006-06-06 01:27:34.936108176 +0000 @@ -875,6 +875,7 @@ case CPU_R10000: case CPU_R12000: + case CPU_R14000: case CPU_4KC: case CPU_SB1: case CPU_SB1A: @@ -906,6 +907,7 @@ case CPU_4KEC: case CPU_24K: case CPU_34K: + case CPU_74K: i_ehb(p); tlbw(p); break; diff -urN linux-2.6.17-rc5/arch/mips/momentum/jaguar_atx/dbg_io.c linux-2.6.17-rc6/arch/mips/momentum/jaguar_atx/dbg_io.c --- linux-2.6.17-rc5/arch/mips/momentum/jaguar_atx/dbg_io.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/mips/momentum/jaguar_atx/dbg_io.c 2006-06-06 01:27:34.936108176 +0000 @@ -73,7 +73,7 @@ /* disable interrupts */ UART16550_WRITE(OFS_INTR_ENABLE, 0); - /* set up buad rate */ + /* set up baud rate */ { uint32 divisor; diff -urN linux-2.6.17-rc5/arch/mips/momentum/ocelot_c/dbg_io.c linux-2.6.17-rc6/arch/mips/momentum/ocelot_c/dbg_io.c --- linux-2.6.17-rc5/arch/mips/momentum/ocelot_c/dbg_io.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/mips/momentum/ocelot_c/dbg_io.c 2006-06-06 01:27:34.936108176 +0000 @@ -73,7 +73,7 @@ /* disable interrupts */ UART16550_WRITE(OFS_INTR_ENABLE, 0); - /* set up buad rate */ + /* set up baud rate */ { uint32 divisor; diff -urN linux-2.6.17-rc5/arch/mips/momentum/ocelot_g/dbg_io.c linux-2.6.17-rc6/arch/mips/momentum/ocelot_g/dbg_io.c --- linux-2.6.17-rc5/arch/mips/momentum/ocelot_g/dbg_io.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/mips/momentum/ocelot_g/dbg_io.c 2006-06-06 01:27:34.940108607 +0000 @@ -73,7 +73,7 @@ /* disable interrupts */ UART16550_WRITE(OFS_INTR_ENABLE, 0); - /* set up buad rate */ + /* set up baud rate */ { uint32 divisor; diff -urN linux-2.6.17-rc5/arch/mips/oprofile/common.c linux-2.6.17-rc6/arch/mips/oprofile/common.c --- linux-2.6.17-rc5/arch/mips/oprofile/common.c 2006-06-06 01:27:30.271606298 +0000 +++ linux-2.6.17-rc6/arch/mips/oprofile/common.c 2006-06-06 01:27:34.940108607 +0000 @@ -14,8 +14,8 @@ #include "op_impl.h" -extern struct op_mips_model op_model_mipsxx __attribute__((weak)); -extern struct op_mips_model op_model_rm9000 __attribute__((weak)); +extern struct op_mips_model op_model_mipsxx_ops __attribute__((weak)); +extern struct op_mips_model op_model_rm9000_ops __attribute__((weak)); static struct op_mips_model *model; @@ -80,13 +80,14 @@ case CPU_24K: case CPU_25KF: case CPU_34K: + case CPU_74K: case CPU_SB1: case CPU_SB1A: - lmodel = &op_model_mipsxx; + lmodel = &op_model_mipsxx_ops; break; case CPU_RM9000: - lmodel = &op_model_rm9000; + lmodel = &op_model_rm9000_ops; break; }; diff -urN linux-2.6.17-rc5/arch/mips/oprofile/op_model_mipsxx.c linux-2.6.17-rc6/arch/mips/oprofile/op_model_mipsxx.c --- linux-2.6.17-rc5/arch/mips/oprofile/op_model_mipsxx.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/mips/oprofile/op_model_mipsxx.c 2006-06-06 01:27:34.940108607 +0000 @@ -23,7 +23,7 @@ #define M_COUNTER_OVERFLOW (1UL << 31) -struct op_mips_model op_model_mipsxx; +struct op_mips_model op_model_mipsxx_ops; static struct mipsxx_register_config { unsigned int control[4]; @@ -34,7 +34,7 @@ static void mipsxx_reg_setup(struct op_counter_config *ctr) { - unsigned int counters = op_model_mipsxx.num_counters; + unsigned int counters = op_model_mipsxx_ops.num_counters; int i; /* Compute the performance counter control word. */ @@ -62,7 +62,7 @@ static void mipsxx_cpu_setup (void *args) { - unsigned int counters = op_model_mipsxx.num_counters; + unsigned int counters = op_model_mipsxx_ops.num_counters; switch (counters) { case 4: @@ -83,7 +83,7 @@ /* Start all counters on current CPU */ static void mipsxx_cpu_start(void *args) { - unsigned int counters = op_model_mipsxx.num_counters; + unsigned int counters = op_model_mipsxx_ops.num_counters; switch (counters) { case 4: @@ -100,7 +100,7 @@ /* Stop all counters on current CPU */ static void mipsxx_cpu_stop(void *args) { - unsigned int counters = op_model_mipsxx.num_counters; + unsigned int counters = op_model_mipsxx_ops.num_counters; switch (counters) { case 4: @@ -116,7 +116,7 @@ static int mipsxx_perfcount_handler(struct pt_regs *regs) { - unsigned int counters = op_model_mipsxx.num_counters; + unsigned int counters = op_model_mipsxx_ops.num_counters; unsigned int control; unsigned int counter; int handled = 0; @@ -187,33 +187,37 @@ reset_counters(counters); - op_model_mipsxx.num_counters = counters; + op_model_mipsxx_ops.num_counters = counters; switch (current_cpu_data.cputype) { case CPU_20KC: - op_model_mipsxx.cpu_type = "mips/20K"; + op_model_mipsxx_ops.cpu_type = "mips/20K"; break; case CPU_24K: - op_model_mipsxx.cpu_type = "mips/24K"; + op_model_mipsxx_ops.cpu_type = "mips/24K"; break; case CPU_25KF: - op_model_mipsxx.cpu_type = "mips/25K"; + op_model_mipsxx_ops.cpu_type = "mips/25K"; break; #ifndef CONFIG_SMP case CPU_34K: - op_model_mipsxx.cpu_type = "mips/34K"; + op_model_mipsxx_ops.cpu_type = "mips/34K"; + break; + + case CPU_74K: + op_model_mipsxx_ops.cpu_type = "mips/74K"; break; #endif case CPU_5KC: - op_model_mipsxx.cpu_type = "mips/5K"; + op_model_mipsxx_ops.cpu_type = "mips/5K"; break; case CPU_SB1: case CPU_SB1A: - op_model_mipsxx.cpu_type = "mips/sb1"; + op_model_mipsxx_ops.cpu_type = "mips/sb1"; break; default: @@ -229,12 +233,12 @@ static void mipsxx_exit(void) { - reset_counters(op_model_mipsxx.num_counters); + reset_counters(op_model_mipsxx_ops.num_counters); perf_irq = null_perf_irq; } -struct op_mips_model op_model_mipsxx = { +struct op_mips_model op_model_mipsxx_ops = { .reg_setup = mipsxx_reg_setup, .cpu_setup = mipsxx_cpu_setup, .init = mipsxx_init, diff -urN linux-2.6.17-rc5/arch/mips/oprofile/op_model_rm9000.c linux-2.6.17-rc6/arch/mips/oprofile/op_model_rm9000.c --- linux-2.6.17-rc5/arch/mips/oprofile/op_model_rm9000.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/mips/oprofile/op_model_rm9000.c 2006-06-06 01:27:34.940108607 +0000 @@ -126,7 +126,7 @@ free_irq(rm9000_perfcount_irq, NULL); } -struct op_mips_model op_model_rm9000 = { +struct op_mips_model op_model_rm9000_ops = { .reg_setup = rm9000_reg_setup, .cpu_setup = rm9000_cpu_setup, .init = rm9000_init, diff -urN linux-2.6.17-rc5/arch/mips/sgi-ip32/ip32-irq.c linux-2.6.17-rc6/arch/mips/sgi-ip32/ip32-irq.c --- linux-2.6.17-rc5/arch/mips/sgi-ip32/ip32-irq.c 2006-06-06 01:27:30.279607159 +0000 +++ linux-2.6.17-rc6/arch/mips/sgi-ip32/ip32-irq.c 2006-06-06 01:27:34.948109468 +0000 @@ -31,12 +31,12 @@ /* issue a PIO read to make sure no PIO writes are pending */ static void inline flush_crime_bus(void) { - volatile unsigned long junk = crime->control; + crime->control; } static void inline flush_mace_bus(void) { - volatile unsigned long junk = mace->perif.ctrl.misc; + mace->perif.ctrl.misc; } #undef DEBUG_IRQ diff -urN linux-2.6.17-rc5/arch/powerpc/kernel/prom_init.c linux-2.6.17-rc6/arch/powerpc/kernel/prom_init.c --- linux-2.6.17-rc5/arch/powerpc/kernel/prom_init.c 2006-06-06 01:27:30.311610602 +0000 +++ linux-2.6.17-rc6/arch/powerpc/kernel/prom_init.c 2006-06-06 01:27:34.976112481 +0000 @@ -2057,10 +2057,45 @@ } - -static void __init fixup_device_tree(void) +#ifdef CONFIG_PPC_MAPLE +/* PIBS Version 1.05.0000 04/26/2005 has an incorrect /ht/isa/ranges property. + * The values are bad, and it doesn't even have the right number of cells. */ +static void __init fixup_device_tree_maple(void) { + phandle isa; + u32 isa_ranges[6]; + + isa = call_prom("finddevice", 1, 1, ADDR("/ht@0/isa@4")); + if (!PHANDLE_VALID(isa)) + return; + + if (prom_getprop(isa, "ranges", isa_ranges, sizeof(isa_ranges)) + == PROM_ERROR) + return; + + if (isa_ranges[0] != 0x1 || + isa_ranges[1] != 0xf4000000 || + isa_ranges[2] != 0x00010000) + return; + + prom_printf("fixing up bogus ISA range on Maple...\n"); + + isa_ranges[0] = 0x1; + isa_ranges[1] = 0x0; + isa_ranges[2] = 0x01002000; /* IO space; PCI device = 4 */ + isa_ranges[3] = 0x0; + isa_ranges[4] = 0x0; + isa_ranges[5] = 0x00010000; + prom_setprop(isa, "/ht@0/isa@4", "ranges", + isa_ranges, sizeof(isa_ranges)); +} +#else +#define fixup_device_tree_maple() +#endif + #if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC) +static void __init fixup_device_tree_pmac(void) +{ phandle u3, i2c, mpic; u32 u3_rev; u32 interrupts[2]; @@ -2097,9 +2132,16 @@ parent = (u32)mpic; prom_setprop(i2c, "/u3@0,f8000000/i2c@f8001000", "interrupt-parent", &parent, sizeof(parent)); -#endif } +#else +#define fixup_device_tree_pmac() +#endif +static void __init fixup_device_tree(void) +{ + fixup_device_tree_maple(); + fixup_device_tree_pmac(); +} static void __init prom_find_boot_cpu(void) { diff -urN linux-2.6.17-rc5/arch/powerpc/platforms/powermac/low_i2c.c linux-2.6.17-rc6/arch/powerpc/platforms/powermac/low_i2c.c --- linux-2.6.17-rc5/arch/powerpc/platforms/powermac/low_i2c.c 2006-06-06 01:27:30.347614476 +0000 +++ linux-2.6.17-rc6/arch/powerpc/platforms/powermac/low_i2c.c 2006-06-06 01:27:35.008115924 +0000 @@ -1157,6 +1157,7 @@ /* some quirks for platform function decoding */ enum { pmac_i2c_quirk_invmask = 0x00000001u, + pmac_i2c_quirk_skip = 0x00000002u, }; static void pmac_i2c_devscan(void (*callback)(struct device_node *dev, @@ -1172,6 +1173,15 @@ /* XXX Study device-tree's & apple drivers are get the quirks * right ! */ + /* Workaround: It seems that running the clockspreading + * properties on the eMac will cause lockups during boot. + * The machine seems to work fine without that. So for now, + * let's make sure i2c-hwclock doesn't match about "imic" + * clocks and we'll figure out if we really need to do + * something special about those later. + */ + { "i2c-hwclock", "imic5002", pmac_i2c_quirk_skip }, + { "i2c-hwclock", "imic5003", pmac_i2c_quirk_skip }, { "i2c-hwclock", NULL, pmac_i2c_quirk_invmask }, { "i2c-cpu-voltage", NULL, 0}, { "temp-monitor", NULL, 0 }, @@ -1198,6 +1208,8 @@ if (p->compatible && !device_is_compatible(np, p->compatible)) continue; + if (p->quirks & pmac_i2c_quirk_skip) + break; callback(np, p->quirks); break; } diff -urN linux-2.6.17-rc5/arch/powerpc/platforms/powermac/pfunc_core.c linux-2.6.17-rc6/arch/powerpc/platforms/powermac/pfunc_core.c --- linux-2.6.17-rc5/arch/powerpc/platforms/powermac/pfunc_core.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/powerpc/platforms/powermac/pfunc_core.c 2006-06-06 01:27:35.008115924 +0000 @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -546,6 +547,7 @@ static LIST_HEAD(pmf_devices); static spinlock_t pmf_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_MUTEX(pmf_irq_mutex); static void pmf_release_device(struct kref *kref) { @@ -864,15 +866,17 @@ spin_lock_irqsave(&pmf_lock, flags); func = __pmf_find_function(target, name, PMF_FLAGS_INT_GEN); - if (func == NULL) { - spin_unlock_irqrestore(&pmf_lock, flags); + if (func) + func = pmf_get_function(func); + spin_unlock_irqrestore(&pmf_lock, flags); + if (func == NULL) return -ENODEV; - } + mutex_lock(&pmf_irq_mutex); if (list_empty(&func->irq_clients)) func->dev->handlers->irq_enable(func); list_add(&client->link, &func->irq_clients); client->func = func; - spin_unlock_irqrestore(&pmf_lock, flags); + mutex_unlock(&pmf_irq_mutex); return 0; } @@ -881,16 +885,16 @@ void pmf_unregister_irq_client(struct pmf_irq_client *client) { struct pmf_function *func = client->func; - unsigned long flags; BUG_ON(func == NULL); - spin_lock_irqsave(&pmf_lock, flags); + mutex_lock(&pmf_irq_mutex); client->func = NULL; list_del(&client->link); if (list_empty(&func->irq_clients)) func->dev->handlers->irq_disable(func); - spin_unlock_irqrestore(&pmf_lock, flags); + mutex_unlock(&pmf_irq_mutex); + pmf_put_function(func); } EXPORT_SYMBOL_GPL(pmf_unregister_irq_client); diff -urN linux-2.6.17-rc5/arch/powerpc/platforms/powermac/setup.c linux-2.6.17-rc6/arch/powerpc/platforms/powermac/setup.c --- linux-2.6.17-rc5/arch/powerpc/platforms/powermac/setup.c 2006-06-06 01:27:30.347614476 +0000 +++ linux-2.6.17-rc6/arch/powerpc/platforms/powermac/setup.c 2006-06-06 01:27:35.008115924 +0000 @@ -463,11 +463,23 @@ return 0; } +static int pmac_pm_valid(suspend_state_t state) +{ + switch (state) { + case PM_SUSPEND_DISK: + return 1; + /* can't do any other states via generic mechanism yet */ + default: + return 0; + } +} + static struct pm_ops pmac_pm_ops = { .pm_disk_mode = PM_DISK_SHUTDOWN, .prepare = pmac_pm_prepare, .enter = pmac_pm_enter, .finish = pmac_pm_finish, + .valid = pmac_pm_valid, }; #endif /* CONFIG_SOFTWARE_SUSPEND */ diff -urN linux-2.6.17-rc5/arch/ppc/kernel/asm-offsets.c linux-2.6.17-rc6/arch/ppc/kernel/asm-offsets.c --- linux-2.6.17-rc5/arch/ppc/kernel/asm-offsets.c 2006-06-06 01:27:30.375617489 +0000 +++ linux-2.6.17-rc6/arch/ppc/kernel/asm-offsets.c 2006-06-06 01:27:35.036118937 +0000 @@ -134,7 +134,7 @@ DEFINE(TI_TASK, offsetof(struct thread_info, task)); DEFINE(TI_EXECDOMAIN, offsetof(struct thread_info, exec_domain)); DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); - DEFINE(TI_LOCAL_FLAGS, offsetof(struct thread_info, flags)); + DEFINE(TI_LOCAL_FLAGS, offsetof(struct thread_info, local_flags)); DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count)); diff -urN linux-2.6.17-rc5/arch/ppc/platforms/mpc8272ads_setup.c linux-2.6.17-rc6/arch/ppc/platforms/mpc8272ads_setup.c --- linux-2.6.17-rc5/arch/ppc/platforms/mpc8272ads_setup.c 2006-06-06 01:27:30.439624376 +0000 +++ linux-2.6.17-rc6/arch/ppc/platforms/mpc8272ads_setup.c 2006-06-06 01:27:35.096125393 +0000 @@ -279,11 +279,11 @@ static const struct platform_notify_dev_map dev_map[] = { { .bus_id = "fsl-cpm-fcc", - .rtn = mpc8272ads_fixup_enet_pdata + .rtn = mpc8272ads_fixup_enet_pdata, }, { .bus_id = "fsl-cpm-scc:uart", - .rtn = mpc + .rtn = mpc8272ads_fixup_uart_pdata, }, { .bus_id = NULL @@ -335,15 +335,15 @@ struct platform_device* pdev = NULL; if(index) { /*assume SCC4 here*/ pdev = &ppc_sys_platform_devices[MPC82xx_CPM_SCC4]; - pinfo = &mpc8272_uart_pdata[1]; + pinfo = &mpc8272_uart_pdata[fsid_scc4_uart]; } else { /*over SCC1*/ pdev = &ppc_sys_platform_devices[MPC82xx_CPM_SCC1]; - pinfo = &mpc8272_uart_pdata[0]; + pinfo = &mpc8272_uart_pdata[fsid_scc1_uart]; } pinfo->uart_clk = bd->bi_intfreq; pdev->dev.platform_data = pinfo; - ppc_sys_fixup_mem_resource(pdev, IMAP_ADDR); + ppc_sys_fixup_mem_resource(pdev, CPM_MAP_ADDR); return NULL; } diff -urN linux-2.6.17-rc5/arch/ppc/syslib/pq2_devices.c linux-2.6.17-rc6/arch/ppc/syslib/pq2_devices.c --- linux-2.6.17-rc5/arch/ppc/syslib/pq2_devices.c 2006-06-06 01:27:30.455626097 +0000 +++ linux-2.6.17-rc6/arch/ppc/syslib/pq2_devices.c 2006-06-06 01:27:35.112127115 +0000 @@ -121,13 +121,13 @@ .num_resources = 3, .resource = (struct resource[]) { { - .name = "scc_mem", + .name = "regs", .start = 0x11A00, .end = 0x11A1F, .flags = IORESOURCE_MEM, }, { - .name = "scc_pram", + .name = "pram", .start = 0x8000, .end = 0x80ff, .flags = IORESOURCE_MEM, @@ -145,13 +145,13 @@ .num_resources = 3, .resource = (struct resource[]) { { - .name = "scc_mem", + .name = "regs", .start = 0x11A20, .end = 0x11A3F, .flags = IORESOURCE_MEM, }, { - .name = "scc_pram", + .name = "pram", .start = 0x8100, .end = 0x81ff, .flags = IORESOURCE_MEM, @@ -169,13 +169,13 @@ .num_resources = 3, .resource = (struct resource[]) { { - .name = "scc_mem", + .name = "regs", .start = 0x11A40, .end = 0x11A5F, .flags = IORESOURCE_MEM, }, { - .name = "scc_pram", + .name = "pram", .start = 0x8200, .end = 0x82ff, .flags = IORESOURCE_MEM, @@ -193,13 +193,13 @@ .num_resources = 3, .resource = (struct resource[]) { { - .name = "scc_mem", + .name = "regs", .start = 0x11A60, .end = 0x11A7F, .flags = IORESOURCE_MEM, }, { - .name = "scc_pram", + .name = "pram", .start = 0x8300, .end = 0x83ff, .flags = IORESOURCE_MEM, diff -urN linux-2.6.17-rc5/arch/ppc/syslib/pq2_sys.c linux-2.6.17-rc6/arch/ppc/syslib/pq2_sys.c --- linux-2.6.17-rc5/arch/ppc/syslib/pq2_sys.c 2006-06-06 01:27:30.455626097 +0000 +++ linux-2.6.17-rc6/arch/ppc/syslib/pq2_sys.c 2006-06-06 01:27:35.112127115 +0000 @@ -139,13 +139,13 @@ .ppc_sys_name = "8272", .mask = 0x0000ff00, .value = 0x00000c00, - .num_devices = 11, + .num_devices = 12, .device_list = (enum ppc_sys_devices[]) { MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_SCC1, - MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SMC1, - MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, MPC82xx_CPM_I2C, - MPC82xx_CPM_USB, MPC82xx_SEC1, + MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SCC4, + MPC82xx_CPM_SMC1, MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, + MPC82xx_CPM_I2C, MPC82xx_CPM_USB, MPC82xx_SEC1, }, }, /* below is a list of the 8280 family of processors */ diff -urN linux-2.6.17-rc5/arch/s390/kernel/time.c linux-2.6.17-rc6/arch/s390/kernel/time.c --- linux-2.6.17-rc5/arch/s390/kernel/time.c 2006-06-06 01:27:30.463626958 +0000 +++ linux-2.6.17-rc6/arch/s390/kernel/time.c 2006-06-06 01:27:35.120127976 +0000 @@ -272,7 +272,7 @@ next = next_timer_interrupt(); do { seq = read_seqbegin_irqsave(&xtime_lock, flags); - timer = (__u64 next) - (__u64 jiffies) + jiffies_64; + timer = ((__u64) next) - ((__u64) jiffies) + jiffies_64; } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); todval = -1ULL; /* Be careful about overflows. */ diff -urN linux-2.6.17-rc5/arch/sparc64/kernel/head.S linux-2.6.17-rc6/arch/sparc64/kernel/head.S --- linux-2.6.17-rc5/arch/sparc64/kernel/head.S 2006-06-06 01:27:30.475628250 +0000 +++ linux-2.6.17-rc6/arch/sparc64/kernel/head.S 2006-06-06 01:27:35.132129267 +0000 @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -493,6 +494,35 @@ call prom_init mov %l7, %o0 ! OpenPROM cif handler + /* Initialize current_thread_info()->cpu as early as possible. + * In order to do that accurately we have to patch up the get_cpuid() + * assembler sequences. And that, in turn, requires that we know + * if we are on a Starfire box or not. While we're here, patch up + * the sun4v sequences as well. + */ + call check_if_starfire + nop + call per_cpu_patch + nop + call sun4v_patch + nop + +#ifdef CONFIG_SMP + call hard_smp_processor_id + nop + cmp %o0, NR_CPUS + blu,pt %xcc, 1f + nop + call boot_cpu_id_too_large + nop + /* Not reached... */ + +1: +#else + mov 0, %o0 +#endif + stb %o0, [%g6 + TI_CPU] + /* Off we go.... */ call start_kernel nop diff -urN linux-2.6.17-rc5/arch/sparc64/kernel/setup.c linux-2.6.17-rc6/arch/sparc64/kernel/setup.c --- linux-2.6.17-rc5/arch/sparc64/kernel/setup.c 2006-06-06 01:27:30.487629541 +0000 +++ linux-2.6.17-rc6/arch/sparc64/kernel/setup.c 2006-06-06 01:27:35.140130128 +0000 @@ -220,7 +220,7 @@ static struct pt_regs fake_swapper_regs = { { 0, }, 0, 0, 0, 0 }; -static void __init per_cpu_patch(void) +void __init per_cpu_patch(void) { struct cpuid_patch_entry *p; unsigned long ver; @@ -280,7 +280,7 @@ } } -static void __init sun4v_patch(void) +void __init sun4v_patch(void) { struct sun4v_1insn_patch_entry *p1; struct sun4v_2insn_patch_entry *p2; @@ -315,6 +315,15 @@ } } +#ifdef CONFIG_SMP +void __init boot_cpu_id_too_large(int cpu) +{ + prom_printf("Serious problem, boot cpu id (%d) >= NR_CPUS (%d)\n", + cpu, NR_CPUS); + prom_halt(); +} +#endif + void __init setup_arch(char **cmdline_p) { /* Initialize PROM console and command line. */ @@ -332,16 +341,6 @@ conswitchp = &prom_con; #endif - /* Work out if we are starfire early on */ - check_if_starfire(); - - /* Now we know enough to patch the get_cpuid sequences - * used by trap code. - */ - per_cpu_patch(); - - sun4v_patch(); - boot_flags_init(*cmdline_p); idprom_init(); diff -urN linux-2.6.17-rc5/arch/sparc64/kernel/smp.c linux-2.6.17-rc6/arch/sparc64/kernel/smp.c --- linux-2.6.17-rc5/arch/sparc64/kernel/smp.c 2006-06-06 01:27:30.487629541 +0000 +++ linux-2.6.17-rc6/arch/sparc64/kernel/smp.c 2006-06-06 01:27:35.140130128 +0000 @@ -1264,7 +1264,6 @@ boot_cpu_id = hard_smp_processor_id(); current_tick_offset = timer_tick_offset; - cpu_set(boot_cpu_id, cpu_online_map); prof_counter(boot_cpu_id) = prof_multiplier(boot_cpu_id) = 1; } @@ -1345,18 +1344,6 @@ void __devinit smp_prepare_boot_cpu(void) { - int cpu = hard_smp_processor_id(); - - if (cpu >= NR_CPUS) { - prom_printf("Serious problem, boot cpu id >= NR_CPUS\n"); - prom_halt(); - } - - current_thread_info()->cpu = cpu; - __local_per_cpu_offset = __per_cpu_offset(cpu); - - cpu_set(smp_processor_id(), cpu_online_map); - cpu_set(smp_processor_id(), phys_cpu_present_map); } int __devinit __cpu_up(unsigned int cpu) @@ -1433,4 +1420,7 @@ for (i = 0; i < NR_CPUS; i++, ptr += size) memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start); + + /* Setup %g5 for the boot cpu. */ + __local_per_cpu_offset = __per_cpu_offset(smp_processor_id()); } diff -urN linux-2.6.17-rc5/arch/sparc64/lib/checksum.S linux-2.6.17-rc6/arch/sparc64/lib/checksum.S --- linux-2.6.17-rc5/arch/sparc64/lib/checksum.S 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/sparc64/lib/checksum.S 2006-06-06 01:27:35.152131419 +0000 @@ -165,8 +165,9 @@ sll %g1, 8, %g1 or %o5, %g1, %o4 -1: add %o2, %o4, %o2 +1: addcc %o2, %o4, %o2 + addc %g0, %o2, %o2 csum_partial_finish: retl - mov %o2, %o0 + srl %o2, 0, %o0 diff -urN linux-2.6.17-rc5/arch/sparc64/lib/csum_copy.S linux-2.6.17-rc6/arch/sparc64/lib/csum_copy.S --- linux-2.6.17-rc5/arch/sparc64/lib/csum_copy.S 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/sparc64/lib/csum_copy.S 2006-06-06 01:27:35.152131419 +0000 @@ -221,11 +221,12 @@ sll %g1, 8, %g1 or %o5, %g1, %o4 -1: add %o3, %o4, %o3 +1: addcc %o3, %o4, %o3 + addc %g0, %o3, %o3 70: retl - mov %o3, %o0 + srl %o3, 0, %o0 95: mov 0, GLOBAL_SPARE brlez,pn %o2, 4f diff -urN linux-2.6.17-rc5/arch/um/Makefile-i386 linux-2.6.17-rc6/arch/um/Makefile-i386 --- linux-2.6.17-rc5/arch/um/Makefile-i386 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/um/Makefile-i386 2006-06-06 01:27:35.156131850 +0000 @@ -33,5 +33,9 @@ # prevent gcc from keeping the stack 16 byte aligned. Taken from i386. cflags-y += $(call cc-option,-mpreferred-stack-boundary=2) +# Prevent sprintf in nfsd from being converted to strcpy and resulting in +# an unresolved reference. +cflags-y += -ffreestanding + CFLAGS += $(cflags-y) USER_CFLAGS += $(cflags-y) diff -urN linux-2.6.17-rc5/arch/um/include/kern_util.h linux-2.6.17-rc6/arch/um/include/kern_util.h --- linux-2.6.17-rc5/arch/um/include/kern_util.h 2006-06-06 01:27:30.507631693 +0000 +++ linux-2.6.17-rc6/arch/um/include/kern_util.h 2006-06-06 01:27:35.160132280 +0000 @@ -120,20 +120,11 @@ extern void free_irq(unsigned int, void *); extern int cpu(void); +extern void time_init_kern(void); + /* Are we disallowed to sleep? Used to choose between GFP_KERNEL and GFP_ATOMIC. */ extern int __cant_sleep(void); extern void segv_handler(int sig, union uml_pt_regs *regs); extern void sigio_handler(int sig, union uml_pt_regs *regs); #endif - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ diff -urN linux-2.6.17-rc5/arch/um/kernel/time_kern.c linux-2.6.17-rc6/arch/um/kernel/time_kern.c --- linux-2.6.17-rc5/arch/um/kernel/time_kern.c 2006-06-06 01:27:30.515632554 +0000 +++ linux-2.6.17-rc6/arch/um/kernel/time_kern.c 2006-06-06 01:27:35.168133141 +0000 @@ -84,6 +84,16 @@ } } + +void time_init_kern(void) +{ + unsigned long long nsecs; + + nsecs = os_nsecs(); + set_normalized_timespec(&wall_to_monotonic, -nsecs / BILLION, + -nsecs % BILLION); +} + void do_boot_timer_handler(struct sigcontext * sc) { struct pt_regs regs; diff -urN linux-2.6.17-rc5/arch/um/os-Linux/main.c linux-2.6.17-rc6/arch/um/os-Linux/main.c --- linux-2.6.17-rc5/arch/um/os-Linux/main.c 2006-06-06 01:27:30.519632984 +0000 +++ linux-2.6.17-rc6/arch/um/os-Linux/main.c 2006-06-06 01:27:35.168133141 +0000 @@ -59,7 +59,7 @@ initcall_t *call; call = &__uml_initcall_start; - while (call < &__uml_initcall_end){; + while (call < &__uml_initcall_end){ (*call)(); call++; } diff -urN linux-2.6.17-rc5/arch/um/os-Linux/time.c linux-2.6.17-rc6/arch/um/os-Linux/time.c --- linux-2.6.17-rc5/arch/um/os-Linux/time.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/um/os-Linux/time.c 2006-06-06 01:27:35.172133571 +0000 @@ -81,20 +81,12 @@ set_interval(ITIMER_REAL); } -extern void ktime_get_ts(struct timespec *ts); -#define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts) - void time_init(void) { - struct timespec now; - if(signal(SIGVTALRM, boot_timer_handler) == SIG_ERR) panic("Couldn't set SIGVTALRM handler"); set_interval(ITIMER_VIRTUAL); - - do_posix_clock_monotonic_gettime(&now); - wall_to_monotonic.tv_sec = -now.tv_sec; - wall_to_monotonic.tv_nsec = -now.tv_nsec; + time_init_kern(); } unsigned long long os_nsecs(void) diff -urN linux-2.6.17-rc5/arch/um/sys-i386/syscalls.c linux-2.6.17-rc6/arch/um/sys-i386/syscalls.c --- linux-2.6.17-rc5/arch/um/sys-i386/syscalls.c 2006-06-06 01:27:30.523633415 +0000 +++ linux-2.6.17-rc6/arch/um/sys-i386/syscalls.c 2006-06-06 01:27:35.176134002 +0000 @@ -99,11 +99,12 @@ switch (call) { case SEMOP: - return sys_semtimedop(first, (struct sembuf *) ptr, second, - NULL); + return sys_semtimedop(first, (struct sembuf __user *) ptr, + second, NULL); case SEMTIMEDOP: - return sys_semtimedop(first, (struct sembuf *) ptr, second, - (const struct timespec *) fifth); + return sys_semtimedop(first, (struct sembuf __user *) ptr, + second, + (const struct timespec __user *) fifth); case SEMGET: return sys_semget (first, second, third); case SEMCTL: { diff -urN linux-2.6.17-rc5/arch/um/sys-x86_64/signal.c linux-2.6.17-rc6/arch/um/sys-x86_64/signal.c --- linux-2.6.17-rc5/arch/um/sys-x86_64/signal.c 2006-06-06 01:27:30.523633415 +0000 +++ linux-2.6.17-rc6/arch/um/sys-x86_64/signal.c 2006-06-06 01:27:35.176134002 +0000 @@ -21,7 +21,7 @@ #include "skas.h" static int copy_sc_from_user_skas(struct pt_regs *regs, - struct sigcontext *from) + struct sigcontext __user *from) { int err = 0; @@ -54,7 +54,8 @@ return(err); } -int copy_sc_to_user_skas(struct sigcontext *to, struct _fpstate *to_fp, +int copy_sc_to_user_skas(struct sigcontext __user *to, + struct _fpstate __user *to_fp, struct pt_regs *regs, unsigned long mask, unsigned long sp) { @@ -106,10 +107,11 @@ #endif #ifdef CONFIG_MODE_TT -int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext *from, +int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext __user *from, int fpsize) { - struct _fpstate *to_fp, *from_fp; + struct _fpstate *to_fp; + struct _fpstate __user *from_fp; unsigned long sigs; int err; @@ -124,13 +126,14 @@ return(err); } -int copy_sc_to_user_tt(struct sigcontext *to, struct _fpstate *fp, +int copy_sc_to_user_tt(struct sigcontext __user *to, struct _fpstate __user *fp, struct sigcontext *from, int fpsize, unsigned long sp) { - struct _fpstate *to_fp, *from_fp; + struct _fpstate __user *to_fp; + struct _fpstate *from_fp; int err; - to_fp = (fp ? fp : (struct _fpstate *) (to + 1)); + to_fp = (fp ? fp : (struct _fpstate __user *) (to + 1)); from_fp = from->fpstate; err = copy_to_user(to, from, sizeof(*to)); /* The SP in the sigcontext is the updated one for the signal @@ -158,7 +161,8 @@ return(ret); } -static int copy_sc_to_user(struct sigcontext *to, struct _fpstate *fp, +static int copy_sc_to_user(struct sigcontext __user *to, + struct _fpstate __user *fp, struct pt_regs *from, unsigned long mask, unsigned long sp) { @@ -169,7 +173,7 @@ struct rt_sigframe { - char *pretcode; + char __user *pretcode; struct ucontext uc; struct siginfo info; }; @@ -188,7 +192,7 @@ frame = (struct rt_sigframe __user *) round_down(stack_top - sizeof(struct rt_sigframe), 16) - 8; - frame = (struct rt_sigframe *) ((unsigned long) frame - 128); + frame = (struct rt_sigframe __user *) ((unsigned long) frame - 128); if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate))) goto out; diff -urN linux-2.6.17-rc5/arch/um/sys-x86_64/syscalls.c linux-2.6.17-rc6/arch/um/sys-x86_64/syscalls.c --- linux-2.6.17-rc5/arch/um/sys-x86_64/syscalls.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/arch/um/sys-x86_64/syscalls.c 2006-06-06 01:27:35.176134002 +0000 @@ -45,7 +45,7 @@ case ARCH_GET_GS: ret = arch_prctl(code, (unsigned long) &tmp); if(!ret) - ret = put_user(tmp, &addr); + ret = put_user(tmp, (long __user *)addr); break; default: ret = -EINVAL; diff -urN linux-2.6.17-rc5/arch/x86_64/ia32/ia32_binfmt.c linux-2.6.17-rc6/arch/x86_64/ia32/ia32_binfmt.c --- linux-2.6.17-rc5/arch/x86_64/ia32/ia32_binfmt.c 2006-06-06 01:27:30.527633845 +0000 +++ linux-2.6.17-rc6/arch/x86_64/ia32/ia32_binfmt.c 2006-06-06 01:27:35.180134432 +0000 @@ -339,7 +339,7 @@ struct mm_struct *mm = current->mm; int i, ret; - stack_base = IA32_STACK_TOP - MAX_ARG_PAGES * PAGE_SIZE; + stack_base = stack_top - MAX_ARG_PAGES * PAGE_SIZE; mm->arg_start = bprm->p + stack_base; bprm->p += stack_base; @@ -357,7 +357,7 @@ { mpnt->vm_mm = mm; mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p; - mpnt->vm_end = IA32_STACK_TOP; + mpnt->vm_end = stack_top; if (executable_stack == EXSTACK_ENABLE_X) mpnt->vm_flags = VM_STACK_FLAGS | VM_EXEC; else if (executable_stack == EXSTACK_DISABLE_X) diff -urN linux-2.6.17-rc5/arch/x86_64/kernel/e820.c linux-2.6.17-rc6/arch/x86_64/kernel/e820.c --- linux-2.6.17-rc5/arch/x86_64/kernel/e820.c 2006-06-06 01:27:30.531634276 +0000 +++ linux-2.6.17-rc6/arch/x86_64/kernel/e820.c 2006-06-06 01:27:35.180134432 +0000 @@ -149,7 +149,7 @@ addr = start; if (addr > ei->addr + ei->size) continue; - while (bad_addr(&addr, size) && addr+size < ei->addr + ei->size) + while (bad_addr(&addr, size) && addr+size <= ei->addr+ei->size) ; last = addr + size; if (last > ei->addr + ei->size) diff -urN linux-2.6.17-rc5/arch/x86_64/kernel/entry.S linux-2.6.17-rc6/arch/x86_64/kernel/entry.S --- linux-2.6.17-rc5/arch/x86_64/kernel/entry.S 2006-06-06 01:27:30.531634276 +0000 +++ linux-2.6.17-rc6/arch/x86_64/kernel/entry.S 2006-06-06 01:27:35.180134432 +0000 @@ -281,12 +281,7 @@ ja 1f movq %r10,%rcx /* fixup for C */ call *sys_call_table(,%rax,8) - movq %rax,RAX-ARGOFFSET(%rsp) -1: SAVE_REST - movq %rsp,%rdi - call syscall_trace_leave - RESTORE_TOP_OF_STACK %rbx - RESTORE_REST +1: movq %rax,RAX-ARGOFFSET(%rsp) /* Use IRET because user could have changed frame */ jmp int_ret_from_sys_call CFI_ENDPROC diff -urN linux-2.6.17-rc5/arch/x86_64/kernel/pci-dma.c linux-2.6.17-rc6/arch/x86_64/kernel/pci-dma.c --- linux-2.6.17-rc5/arch/x86_64/kernel/pci-dma.c 2006-06-06 01:27:30.535634706 +0000 +++ linux-2.6.17-rc6/arch/x86_64/kernel/pci-dma.c 2006-06-06 01:27:35.184134863 +0000 @@ -54,6 +54,10 @@ else #endif node = numa_node_id(); + + if (node < first_node(node_online_map)) + node = first_node(node_online_map); + page = alloc_pages_node(node, gfp, order); return page ? page_address(page) : NULL; } diff -urN linux-2.6.17-rc5/arch/x86_64/kernel/pci-gart.c linux-2.6.17-rc6/arch/x86_64/kernel/pci-gart.c --- linux-2.6.17-rc5/arch/x86_64/kernel/pci-gart.c 2006-06-06 01:27:30.535634706 +0000 +++ linux-2.6.17-rc6/arch/x86_64/kernel/pci-gart.c 2006-06-06 01:27:35.184134863 +0000 @@ -631,10 +631,8 @@ printk(KERN_INFO "PCI-DMA: Disabling IOMMU.\n"); if (end_pfn > MAX_DMA32_PFN) { printk(KERN_ERR "WARNING more than 4GB of memory " - "but IOMMU not compiled in.\n" - KERN_ERR "WARNING 32bit PCI may malfunction.\n" - KERN_ERR "You might want to enable " - "CONFIG_GART_IOMMU\n"); + "but IOMMU not available.\n" + KERN_ERR "WARNING 32bit PCI may malfunction.\n"); } return -1; } diff -urN linux-2.6.17-rc5/arch/x86_64/kernel/pmtimer.c linux-2.6.17-rc6/arch/x86_64/kernel/pmtimer.c --- linux-2.6.17-rc5/arch/x86_64/kernel/pmtimer.c 2006-06-06 01:27:30.535634706 +0000 +++ linux-2.6.17-rc6/arch/x86_64/kernel/pmtimer.c 2006-06-06 01:27:35.184134863 +0000 @@ -68,7 +68,7 @@ offset_delay = delta % (USEC_PER_SEC / HZ); rdtscll(tsc); - vxtime.last_tsc = tsc - offset_delay * cpu_khz; + vxtime.last_tsc = tsc - offset_delay * (u64)cpu_khz / 1000; /* don't calculate delay for first run, or if we've got less then a tick */ diff -urN linux-2.6.17-rc5/arch/x86_64/kernel/setup.c linux-2.6.17-rc6/arch/x86_64/kernel/setup.c --- linux-2.6.17-rc5/arch/x86_64/kernel/setup.c 2006-06-06 01:27:30.535634706 +0000 +++ linux-2.6.17-rc6/arch/x86_64/kernel/setup.c 2006-06-06 01:27:35.188135293 +0000 @@ -1051,7 +1051,7 @@ for now. */ node = apicid_to_node[hard_smp_processor_id()]; if (node == NUMA_NO_NODE) - node = 0; + node = first_node(node_online_map); numa_set_node(cpu, node); if (acpi_numa > 0) diff -urN linux-2.6.17-rc5/arch/x86_64/mm/srat.c linux-2.6.17-rc6/arch/x86_64/mm/srat.c --- linux-2.6.17-rc5/arch/x86_64/mm/srat.c 2006-06-06 01:27:30.539635136 +0000 +++ linux-2.6.17-rc6/arch/x86_64/mm/srat.c 2006-06-06 01:27:35.192135724 +0000 @@ -399,8 +399,10 @@ /* First clean up the node list */ for (i = 0; i < MAX_NUMNODES; i++) { cutoff_node(i, start, end); - if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) + if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) { unparse_node(i); + node_set_offline(i); + } } if (acpi_numa <= 0) diff -urN linux-2.6.17-rc5/block/cfq-iosched.c linux-2.6.17-rc6/block/cfq-iosched.c --- linux-2.6.17-rc5/block/cfq-iosched.c 2006-06-06 01:27:30.547635997 +0000 +++ linux-2.6.17-rc6/block/cfq-iosched.c 2006-06-06 01:27:35.196136154 +0000 @@ -33,7 +33,7 @@ #define CFQ_KEY_ASYNC (0) -static DEFINE_RWLOCK(cfq_exit_lock); +static DEFINE_SPINLOCK(cfq_exit_lock); /* * for the hash of cfqq inside the cfqd @@ -133,6 +133,7 @@ mempool_t *crq_pool; int rq_in_driver; + int hw_tag; /* * schedule slice state info @@ -500,10 +501,13 @@ /* * if queue was preempted, just add to front to be fair. busy_rr - * isn't sorted. + * isn't sorted, but insert at the back for fairness. */ if (preempted || list == &cfqd->busy_rr) { - list_add(&cfqq->cfq_list, list); + if (preempted) + list = list->prev; + + list_add_tail(&cfqq->cfq_list, list); return; } @@ -664,6 +668,15 @@ struct cfq_data *cfqd = q->elevator->elevator_data; cfqd->rq_in_driver++; + + /* + * If the depth is larger 1, it really could be queueing. But lets + * make the mark a little higher - idling could still be good for + * low queueing, and a low queueing number could also just indicate + * a SCSI mid layer like behaviour where limit+1 is often seen. + */ + if (!cfqd->hw_tag && cfqd->rq_in_driver > 4) + cfqd->hw_tag = 1; } static void cfq_deactivate_request(request_queue_t *q, struct request *rq) @@ -879,6 +892,13 @@ cfqq = list_entry_cfqq(cfqd->cur_rr.next); /* + * If no new queues are available, check if the busy list has some + * before falling back to idle io. + */ + if (!cfqq && !list_empty(&cfqd->busy_rr)) + cfqq = list_entry_cfqq(cfqd->busy_rr.next); + + /* * if we have idle queues and no rt or be queues had pending * requests, either allow immediate service if the grace period * has passed or arm the idle grace timer @@ -1284,7 +1304,7 @@ /* * put the reference this task is holding to the various queues */ - read_lock_irqsave(&cfq_exit_lock, flags); + spin_lock_irqsave(&cfq_exit_lock, flags); n = rb_first(&ioc->cic_root); while (n != NULL) { @@ -1294,7 +1314,7 @@ n = rb_next(n); } - read_unlock_irqrestore(&cfq_exit_lock, flags); + spin_unlock_irqrestore(&cfq_exit_lock, flags); } static struct cfq_io_context * @@ -1400,17 +1420,17 @@ struct cfq_io_context *cic; struct rb_node *n; - write_lock(&cfq_exit_lock); + spin_lock(&cfq_exit_lock); n = rb_first(&ioc->cic_root); while (n != NULL) { cic = rb_entry(n, struct cfq_io_context, rb_node); - + changed_ioprio(cic); n = rb_next(n); } - write_unlock(&cfq_exit_lock); + spin_unlock(&cfq_exit_lock); return 0; } @@ -1458,7 +1478,8 @@ * set ->slice_left to allow preemption for a new process */ cfqq->slice_left = 2 * cfqd->cfq_slice_idle; - cfq_mark_cfqq_idle_window(cfqq); + if (!cfqd->hw_tag) + cfq_mark_cfqq_idle_window(cfqq); cfq_mark_cfqq_prio_changed(cfqq); cfq_init_prio_data(cfqq); } @@ -1475,9 +1496,10 @@ static void cfq_drop_dead_cic(struct io_context *ioc, struct cfq_io_context *cic) { - read_lock(&cfq_exit_lock); + spin_lock(&cfq_exit_lock); rb_erase(&cic->rb_node, &ioc->cic_root); - read_unlock(&cfq_exit_lock); + list_del_init(&cic->queue_list); + spin_unlock(&cfq_exit_lock); kmem_cache_free(cfq_ioc_pool, cic); atomic_dec(&ioc_count); } @@ -1545,11 +1567,11 @@ BUG(); } - read_lock(&cfq_exit_lock); + spin_lock(&cfq_exit_lock); rb_link_node(&cic->rb_node, parent, p); rb_insert_color(&cic->rb_node, &ioc->cic_root); list_add(&cic->queue_list, &cfqd->cic_list); - read_unlock(&cfq_exit_lock); + spin_unlock(&cfq_exit_lock); } /* @@ -1648,7 +1670,7 @@ { int enable_idle = cfq_cfqq_idle_window(cfqq); - if (!cic->ioc->task || !cfqd->cfq_slice_idle) + if (!cic->ioc->task || !cfqd->cfq_slice_idle || cfqd->hw_tag) enable_idle = 0; else if (sample_valid(cic->ttime_samples)) { if (cic->ttime_mean > cfqd->cfq_slice_idle) @@ -1739,14 +1761,24 @@ cfqq->next_crq = cfq_choose_req(cfqd, cfqq->next_crq, crq); + cic = crq->io_context; + /* * we never wait for an async request and we don't allow preemption * of an async request. so just return early */ - if (!cfq_crq_is_sync(crq)) + if (!cfq_crq_is_sync(crq)) { + /* + * sync process issued an async request, if it's waiting + * then expire it and kick rq handling. + */ + if (cic == cfqd->active_cic && + del_timer(&cfqd->idle_slice_timer)) { + cfq_slice_expired(cfqd, 0); + cfq_start_queueing(cfqd, cfqq); + } return; - - cic = crq->io_context; + } cfq_update_io_thinktime(cfqd, cic); cfq_update_io_seektime(cfqd, cic, crq); @@ -2164,10 +2196,9 @@ * race with a non-idle queue, reset timer */ end = cfqd->last_end_request + CFQ_IDLE_GRACE; - if (!time_after_eq(jiffies, end)) { - cfqd->idle_class_timer.expires = end; - add_timer(&cfqd->idle_class_timer); - } else + if (!time_after_eq(jiffies, end)) + mod_timer(&cfqd->idle_class_timer, end); + else cfq_schedule_dispatch(cfqd); spin_unlock_irqrestore(cfqd->queue->queue_lock, flags); @@ -2187,7 +2218,7 @@ cfq_shutdown_timer_wq(cfqd); - write_lock(&cfq_exit_lock); + spin_lock(&cfq_exit_lock); spin_lock_irq(q->queue_lock); if (cfqd->active_queue) @@ -2210,7 +2241,7 @@ } spin_unlock_irq(q->queue_lock); - write_unlock(&cfq_exit_lock); + spin_unlock(&cfq_exit_lock); cfq_shutdown_timer_wq(cfqd); diff -urN linux-2.6.17-rc5/drivers/base/power/suspend.c linux-2.6.17-rc6/drivers/base/power/suspend.c --- linux-2.6.17-rc5/drivers/base/power/suspend.c 2006-06-06 01:27:30.559637289 +0000 +++ linux-2.6.17-rc6/drivers/base/power/suspend.c 2006-06-06 01:27:35.208137445 +0000 @@ -8,7 +8,6 @@ * */ -#include #include #include #include @@ -66,6 +65,7 @@ return error; } + /** * device_suspend - Save state and stop all devices in system. * @state: Power state to put each device in. @@ -85,9 +85,6 @@ { int error = 0; - if (!is_console_suspend_safe()) - return -EINVAL; - down(&dpm_sem); down(&dpm_list_sem); while (!list_empty(&dpm_active) && error == 0) { diff -urN linux-2.6.17-rc5/drivers/char/agp/Kconfig linux-2.6.17-rc6/drivers/char/agp/Kconfig --- linux-2.6.17-rc5/drivers/char/agp/Kconfig 2006-06-06 01:27:30.583639871 +0000 +++ linux-2.6.17-rc6/drivers/char/agp/Kconfig 2006-06-06 01:27:35.232140028 +0000 @@ -86,7 +86,7 @@ config AGP_SIS tristate "SiS chipset support" - depends on AGP && X86_32 + depends on AGP help This option gives you AGP support for the GLX component of X on Silicon Integrated Systems [SiS] chipsets. diff -urN linux-2.6.17-rc5/drivers/char/agp/amd64-agp.c linux-2.6.17-rc6/drivers/char/agp/amd64-agp.c --- linux-2.6.17-rc5/drivers/char/agp/amd64-agp.c 2006-06-06 01:27:30.587640302 +0000 +++ linux-2.6.17-rc6/drivers/char/agp/amd64-agp.c 2006-06-06 01:27:35.232140028 +0000 @@ -617,6 +617,9 @@ pci_set_power_state(pdev, PCI_D0); pci_restore_state(pdev); + if (pdev->vendor == PCI_VENDOR_ID_NVIDIA) + nforce3_agp_init(pdev); + return amd_8151_configure(); } diff -urN linux-2.6.17-rc5/drivers/char/agp/via-agp.c linux-2.6.17-rc6/drivers/char/agp/via-agp.c --- linux-2.6.17-rc5/drivers/char/agp/via-agp.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/drivers/char/agp/via-agp.c 2006-06-06 01:27:35.236140458 +0000 @@ -345,6 +345,12 @@ .chipset_name = "PT880", }, + /* PT880 Ultra */ + { + .device_id = PCI_DEVICE_ID_VIA_PT880ULTRA, + .chipset_name = "PT880 Ultra", + }, + /* PT890 */ { .device_id = PCI_DEVICE_ID_VIA_8783_0, @@ -511,6 +517,7 @@ ID(PCI_DEVICE_ID_VIA_8763_0), ID(PCI_DEVICE_ID_VIA_8378_0), ID(PCI_DEVICE_ID_VIA_PT880), + ID(PCI_DEVICE_ID_VIA_PT880ULTRA), ID(PCI_DEVICE_ID_VIA_8783_0), ID(PCI_DEVICE_ID_VIA_PX8X0_0), ID(PCI_DEVICE_ID_VIA_3269_0), diff -urN linux-2.6.17-rc5/drivers/char/ipmi/ipmi_si_intf.c linux-2.6.17-rc6/drivers/char/ipmi/ipmi_si_intf.c --- linux-2.6.17-rc5/drivers/char/ipmi/ipmi_si_intf.c 2006-06-06 01:27:30.619643745 +0000 +++ linux-2.6.17-rc6/drivers/char/ipmi/ipmi_si_intf.c 2006-06-06 01:27:35.260143041 +0000 @@ -1184,20 +1184,20 @@ static void port_cleanup(struct smi_info *info) { unsigned int addr = info->io.addr_data; - int mapsize; + int idx; if (addr) { - mapsize = ((info->io_size * info->io.regspacing) - - (info->io.regspacing - info->io.regsize)); - - release_region (addr, mapsize); + for (idx = 0; idx < info->io_size; idx++) { + release_region(addr + idx * info->io.regspacing, + info->io.regsize); + } } } static int port_setup(struct smi_info *info) { unsigned int addr = info->io.addr_data; - int mapsize; + int idx; if (!addr) return -ENODEV; @@ -1225,16 +1225,22 @@ return -EINVAL; } - /* Calculate the total amount of memory to claim. This is an - * unusual looking calculation, but it avoids claiming any - * more memory than it has to. It will claim everything - * between the first address to the end of the last full - * register. */ - mapsize = ((info->io_size * info->io.regspacing) - - (info->io.regspacing - info->io.regsize)); - - if (request_region(addr, mapsize, DEVICE_NAME) == NULL) - return -EIO; + /* Some BIOSes reserve disjoint I/O regions in their ACPI + * tables. This causes problems when trying to register the + * entire I/O region. Therefore we must register each I/O + * port separately. + */ + for (idx = 0; idx < info->io_size; idx++) { + if (request_region(addr + idx * info->io.regspacing, + info->io.regsize, DEVICE_NAME) == NULL) { + /* Undo allocations */ + while (idx--) { + release_region(addr + idx * info->io.regspacing, + info->io.regsize); + } + return -EIO; + } + } return 0; } diff -urN linux-2.6.17-rc5/drivers/char/pcmcia/cm4000_cs.c linux-2.6.17-rc6/drivers/char/pcmcia/cm4000_cs.c --- linux-2.6.17-rc5/drivers/char/pcmcia/cm4000_cs.c 2006-06-06 01:27:30.623644175 +0000 +++ linux-2.6.17-rc6/drivers/char/pcmcia/cm4000_cs.c 2006-06-06 01:27:35.268143902 +0000 @@ -149,7 +149,7 @@ #define ZERO_DEV(dev) \ memset(&dev->atr_csum,0, \ sizeof(struct cm4000_dev) - \ - /*link*/ sizeof(struct pcmcia_device) - \ + /*link*/ sizeof(struct pcmcia_device *) - \ /*node*/ sizeof(dev_node_t) - \ /*atr*/ MAX_ATR*sizeof(char) - \ /*rbuf*/ 512*sizeof(char) - \ diff -urN linux-2.6.17-rc5/drivers/char/tpm/tpm_bios.c linux-2.6.17-rc6/drivers/char/tpm/tpm_bios.c --- linux-2.6.17-rc5/drivers/char/tpm/tpm_bios.c 2006-06-06 01:27:30.663648480 +0000 +++ linux-2.6.17-rc6/drivers/char/tpm/tpm_bios.c 2006-06-06 01:27:35.300147345 +0000 @@ -105,6 +105,12 @@ "Non-Host Info" }; +struct tcpa_pc_event { + u32 event_id; + u32 event_size; + u8 event_data[0]; +}; + enum tcpa_pc_event_ids { SMBIOS = 1, BIS_CERT, @@ -114,14 +120,15 @@ NVRAM, OPTION_ROM_EXEC, OPTION_ROM_CONFIG, - OPTION_ROM_MICROCODE, + OPTION_ROM_MICROCODE = 10, S_CRTM_VERSION, S_CRTM_CONTENTS, POST_CONTENTS, + HOST_TABLE_OF_DEVICES, }; static const char* tcpa_pc_event_id_strings[] = { - "" + "", "SMBIOS", "BIS Certificate", "POST BIOS ", @@ -130,11 +137,12 @@ "NVRAM", "Option ROM", "Option ROM config", - "Option ROM microcode", + "", + "Option ROM microcode ", "S-CRTM Version", - "S-CRTM Contents", - "S-CRTM POST Contents", - "POST Contents", + "S-CRTM Contents ", + "POST Contents ", + "Table of Devices", }; /* returns pointer to start of pos. entry of tcg log */ @@ -206,7 +214,7 @@ const char *name = ""; char data[40] = ""; int i, n_len = 0, d_len = 0; - u32 event_id; + struct tcpa_pc_event *pc_event; switch(event->event_type) { case PREBOOT: @@ -235,31 +243,32 @@ } break; case EVENT_TAG: - event_id = be32_to_cpu(*((u32 *)event_entry)); + pc_event = (struct tcpa_pc_event *)event_entry; /* ToDo Row data -> Base64 */ - switch (event_id) { + switch (pc_event->event_id) { case SMBIOS: case BIS_CERT: case CMOS: case NVRAM: case OPTION_ROM_EXEC: case OPTION_ROM_CONFIG: - case OPTION_ROM_MICROCODE: case S_CRTM_VERSION: - case S_CRTM_CONTENTS: - case POST_CONTENTS: - name = tcpa_pc_event_id_strings[event_id]; + name = tcpa_pc_event_id_strings[pc_event->event_id]; n_len = strlen(name); break; + /* hash data */ case POST_BIOS_ROM: case ESCD: - name = tcpa_pc_event_id_strings[event_id]; + case OPTION_ROM_MICROCODE: + case S_CRTM_CONTENTS: + case POST_CONTENTS: + name = tcpa_pc_event_id_strings[pc_event->event_id]; n_len = strlen(name); for (i = 0; i < 20; i++) - d_len += sprintf(data, "%02x", - event_entry[8 + i]); + d_len += sprintf(&data[2*i], "%02x", + pc_event->event_data[i]); break; default: break; @@ -275,53 +284,13 @@ static int tpm_binary_bios_measurements_show(struct seq_file *m, void *v) { + struct tcpa_event *event = v; + char *data = v; + int i; - char *eventname; - char data[4]; - u32 help; - int i, len; - struct tcpa_event *event = (struct tcpa_event *) v; - unsigned char *event_entry = - (unsigned char *) (v + sizeof(struct tcpa_event)); - - eventname = kmalloc(MAX_TEXT_EVENT, GFP_KERNEL); - if (!eventname) { - printk(KERN_ERR "%s: ERROR - No Memory for event name\n ", - __func__); - return -ENOMEM; - } - - /* 1st: PCR used is in little-endian format (4 bytes) */ - help = le32_to_cpu(event->pcr_index); - memcpy(data, &help, 4); - for (i = 0; i < 4; i++) - seq_putc(m, data[i]); - - /* 2nd: SHA1 (20 bytes) */ - for (i = 0; i < 20; i++) - seq_putc(m, event->pcr_value[i]); - - /* 3rd: event type identifier (4 bytes) */ - help = le32_to_cpu(event->event_type); - memcpy(data, &help, 4); - for (i = 0; i < 4; i++) + for (i = 0; i < sizeof(struct tcpa_event) + event->event_size; i++) seq_putc(m, data[i]); - len = 0; - - len += get_event_name(eventname, event, event_entry); - - /* 4th: filename <= 255 + \'0' delimiter */ - if (len > TCG_EVENT_NAME_LEN_MAX) - len = TCG_EVENT_NAME_LEN_MAX; - - for (i = 0; i < len; i++) - seq_putc(m, eventname[i]); - - /* 5th: delimiter */ - seq_putc(m, '\0'); - - kfree(eventname); return 0; } diff -urN linux-2.6.17-rc5/drivers/char/tpm/tpm_tis.c linux-2.6.17-rc6/drivers/char/tpm/tpm_tis.c --- linux-2.6.17-rc5/drivers/char/tpm/tpm_tis.c 2006-06-06 01:27:30.663648480 +0000 +++ linux-2.6.17-rc6/drivers/char/tpm/tpm_tis.c 2006-06-06 01:27:35.300147345 +0000 @@ -457,10 +457,6 @@ } vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0)); - if ((vendor & 0xFFFF) == 0xFFFF) { - rc = -ENODEV; - goto out_err; - } /* Default timeouts */ chip->vendor.timeout_a = msecs_to_jiffies(TIS_SHORT_TIMEOUT); diff -urN linux-2.6.17-rc5/drivers/char/vt.c linux-2.6.17-rc6/drivers/char/vt.c --- linux-2.6.17-rc5/drivers/char/vt.c 2006-06-06 01:27:30.667648910 +0000 +++ linux-2.6.17-rc6/drivers/char/vt.c 2006-06-06 01:27:35.304147776 +0000 @@ -3238,14 +3238,6 @@ } } -int is_console_suspend_safe(void) -{ - /* It is unsafe to suspend devices while X has control of the - * hardware. Make sure we are running on a kernel-controlled console. - */ - return vc_cons[fg_console].d->vc_mode == KD_TEXT; -} - /* * Visible symbols for modules */ diff -urN linux-2.6.17-rc5/drivers/i2c/busses/scx200_acb.c linux-2.6.17-rc6/drivers/i2c/busses/scx200_acb.c --- linux-2.6.17-rc5/drivers/i2c/busses/scx200_acb.c 2006-06-06 01:27:30.707653214 +0000 +++ linux-2.6.17-rc6/drivers/i2c/busses/scx200_acb.c 2006-06-06 01:27:35.340151649 +0000 @@ -491,7 +491,7 @@ #define MSR_LBAR_SMB 0x5140000B -static int scx200_add_cs553x(void) +static __init int scx200_add_cs553x(void) { u32 low, hi; u32 smb_base; diff -urN linux-2.6.17-rc5/drivers/ide/pci/sgiioc4.c linux-2.6.17-rc6/drivers/ide/pci/sgiioc4.c --- linux-2.6.17-rc5/drivers/ide/pci/sgiioc4.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/drivers/ide/pci/sgiioc4.c 2006-06-06 01:27:35.360153802 +0000 @@ -345,17 +345,17 @@ static u8 sgiioc4_INB(unsigned long port) { - u8 reg = (u8) inb(port); + u8 reg = (u8) readb((void __iomem *) port); if ((port & 0xFFF) == 0x11C) { /* Status register of IOC4 */ if (reg & 0x51) { /* Not busy...check for interrupt */ unsigned long other_ir = port - 0x110; - unsigned int intr_reg = (u32) inl(other_ir); + unsigned int intr_reg = (u32) readl((void __iomem *) other_ir); /* Clear the Interrupt, Error bits on the IOC4 */ if (intr_reg & 0x03) { - outl(0x03, other_ir); - intr_reg = (u32) inl(other_ir); + writel(0x03, (void __iomem *) other_ir); + intr_reg = (u32) readl((void __iomem *) other_ir); } } } @@ -606,6 +606,12 @@ hwif->ide_dma_host_off = &sgiioc4_ide_dma_host_off; hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq; hwif->ide_dma_timeout = &__ide_dma_timeout; + + /* + * The IOC4 uses MMIO rather than Port IO. + * It also needs special workarounds for INB. + */ + default_hwif_mmiops(hwif); hwif->INB = &sgiioc4_INB; } @@ -743,6 +749,6 @@ module_init(ioc4_ide_init); module_exit(ioc4_ide_exit); -MODULE_AUTHOR("Aniket Malatpure - Silicon Graphics Inc. (SGI)"); +MODULE_AUTHOR("Aniket Malatpure/Jeremy Higdon"); MODULE_DESCRIPTION("IDE PCI driver module for SGI IOC4 Base-IO Card"); MODULE_LICENSE("GPL"); diff -urN linux-2.6.17-rc5/drivers/ieee1394/sbp2.c linux-2.6.17-rc6/drivers/ieee1394/sbp2.c --- linux-2.6.17-rc5/drivers/ieee1394/sbp2.c 2006-06-06 01:27:30.727655367 +0000 +++ linux-2.6.17-rc6/drivers/ieee1394/sbp2.c 2006-06-06 01:27:35.368154662 +0000 @@ -845,7 +845,7 @@ &sbp2_highlevel, ud->ne->host, &sbp2_ops, sizeof(struct sbp2_status_block), sizeof(quadlet_t), 0x010000000000ULL, CSR1212_ALL_SPACE_END); - if (!scsi_id->status_fifo_addr) { + if (scsi_id->status_fifo_addr == ~0ULL) { SBP2_ERR("failed to allocate status FIFO address range"); goto failed_alloc; } diff -urN linux-2.6.17-rc5/drivers/infiniband/hw/mthca/mthca_srq.c linux-2.6.17-rc6/drivers/infiniband/hw/mthca/mthca_srq.c --- linux-2.6.17-rc5/drivers/infiniband/hw/mthca/mthca_srq.c 2006-06-06 01:27:30.767659671 +0000 +++ linux-2.6.17-rc6/drivers/infiniband/hw/mthca/mthca_srq.c 2006-06-06 01:27:35.408158967 +0000 @@ -490,26 +490,7 @@ first_ind = srq->first_free; - for (nreq = 0; wr; ++nreq, wr = wr->next) { - if (unlikely(nreq == MTHCA_TAVOR_MAX_WQES_PER_RECV_DB)) { - nreq = 0; - - doorbell[0] = cpu_to_be32(first_ind << srq->wqe_shift); - doorbell[1] = cpu_to_be32(srq->srqn << 8); - - /* - * Make sure that descriptors are written - * before doorbell is rung. - */ - wmb(); - - mthca_write64(doorbell, - dev->kar + MTHCA_RECEIVE_DOORBELL, - MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); - - first_ind = srq->first_free; - } - + for (nreq = 0; wr; wr = wr->next) { ind = srq->first_free; if (ind < 0) { @@ -569,6 +550,26 @@ srq->wrid[ind] = wr->wr_id; srq->first_free = next_ind; + + ++nreq; + if (unlikely(nreq == MTHCA_TAVOR_MAX_WQES_PER_RECV_DB)) { + nreq = 0; + + doorbell[0] = cpu_to_be32(first_ind << srq->wqe_shift); + doorbell[1] = cpu_to_be32(srq->srqn << 8); + + /* + * Make sure that descriptors are written + * before doorbell is rung. + */ + wmb(); + + mthca_write64(doorbell, + dev->kar + MTHCA_RECEIVE_DOORBELL, + MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); + + first_ind = srq->first_free; + } } if (likely(nreq)) { diff -urN linux-2.6.17-rc5/drivers/infiniband/ulp/ipoib/ipoib_ib.c linux-2.6.17-rc6/drivers/infiniband/ulp/ipoib/ipoib_ib.c --- linux-2.6.17-rc5/drivers/infiniband/ulp/ipoib/ipoib_ib.c 2006-06-06 01:27:30.767659671 +0000 +++ linux-2.6.17-rc6/drivers/infiniband/ulp/ipoib/ipoib_ib.c 2006-06-06 01:27:35.412159397 +0000 @@ -275,6 +275,7 @@ spin_lock_irqsave(&priv->tx_lock, flags); ++priv->tx_tail; if (netif_queue_stopped(dev) && + test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags) && priv->tx_head - priv->tx_tail <= ipoib_sendq_size >> 1) netif_wake_queue(dev); spin_unlock_irqrestore(&priv->tx_lock, flags); diff -urN linux-2.6.17-rc5/drivers/input/joystick/sidewinder.c linux-2.6.17-rc6/drivers/input/joystick/sidewinder.c --- linux-2.6.17-rc5/drivers/input/joystick/sidewinder.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/drivers/input/joystick/sidewinder.c 2006-06-06 01:27:35.416159828 +0000 @@ -589,7 +589,7 @@ struct sw *sw; struct input_dev *input_dev; int i, j, k, l; - int err; + int err = 0; unsigned char *buf = NULL; /* [SW_LENGTH] */ unsigned char *idbuf = NULL; /* [SW_LENGTH] */ unsigned char m = 1; @@ -776,7 +776,10 @@ goto fail4; } - return 0; + out: kfree(buf); + kfree(idbuf); + + return err; fail4: input_free_device(sw->dev[i]); fail3: while (--i >= 0) @@ -784,9 +787,7 @@ fail2: gameport_close(gameport); fail1: gameport_set_drvdata(gameport, NULL); kfree(sw); - kfree(buf); - kfree(idbuf); - return err; + goto out; } static void sw_disconnect(struct gameport *gameport) diff -urN linux-2.6.17-rc5/drivers/input/keyboard/corgikbd.c linux-2.6.17-rc6/drivers/input/keyboard/corgikbd.c --- linux-2.6.17-rc5/drivers/input/keyboard/corgikbd.c 2006-06-06 01:27:30.775660532 +0000 +++ linux-2.6.17-rc6/drivers/input/keyboard/corgikbd.c 2006-06-06 01:27:35.420160258 +0000 @@ -245,9 +245,9 @@ if (hinge_count >= HINGE_STABLE_COUNT) { spin_lock_irqsave(&corgikbd_data->lock, flags); - input_report_switch(corgikbd_data->input, SW_0, ((sharpsl_hinge_state & CORGI_SCP_SWA) != 0)); - input_report_switch(corgikbd_data->input, SW_1, ((sharpsl_hinge_state & CORGI_SCP_SWB) != 0)); - input_report_switch(corgikbd_data->input, SW_2, (READ_GPIO_BIT(CORGI_GPIO_AK_INT) != 0)); + input_report_switch(corgikbd_data->input, SW_LID, ((sharpsl_hinge_state & CORGI_SCP_SWA) != 0)); + input_report_switch(corgikbd_data->input, SW_TABLET_MODE, ((sharpsl_hinge_state & CORGI_SCP_SWB) != 0)); + input_report_switch(corgikbd_data->input, SW_HEADPHONE_INSERT, (READ_GPIO_BIT(CORGI_GPIO_AK_INT) != 0)); input_sync(corgikbd_data->input); spin_unlock_irqrestore(&corgikbd_data->lock, flags); @@ -340,9 +340,9 @@ for (i = 0; i < ARRAY_SIZE(corgikbd_keycode); i++) set_bit(corgikbd->keycode[i], input_dev->keybit); clear_bit(0, input_dev->keybit); - set_bit(SW_0, input_dev->swbit); - set_bit(SW_1, input_dev->swbit); - set_bit(SW_2, input_dev->swbit); + set_bit(SW_LID, input_dev->swbit); + set_bit(SW_TABLET_MODE, input_dev->swbit); + set_bit(SW_HEADPHONE_INSERT, input_dev->swbit); input_register_device(corgikbd->input); diff -urN linux-2.6.17-rc5/drivers/input/keyboard/spitzkbd.c linux-2.6.17-rc6/drivers/input/keyboard/spitzkbd.c --- linux-2.6.17-rc5/drivers/input/keyboard/spitzkbd.c 2006-06-06 01:27:30.779660962 +0000 +++ linux-2.6.17-rc6/drivers/input/keyboard/spitzkbd.c 2006-06-06 01:27:35.420160258 +0000 @@ -299,9 +299,9 @@ if (hinge_count >= HINGE_STABLE_COUNT) { spin_lock_irqsave(&spitzkbd_data->lock, flags); - input_report_switch(spitzkbd_data->input, SW_0, ((GPLR(SPITZ_GPIO_SWA) & GPIO_bit(SPITZ_GPIO_SWA)) != 0)); - input_report_switch(spitzkbd_data->input, SW_1, ((GPLR(SPITZ_GPIO_SWB) & GPIO_bit(SPITZ_GPIO_SWB)) != 0)); - input_report_switch(spitzkbd_data->input, SW_2, ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) != 0)); + input_report_switch(spitzkbd_data->input, SW_LID, ((GPLR(SPITZ_GPIO_SWA) & GPIO_bit(SPITZ_GPIO_SWA)) != 0)); + input_report_switch(spitzkbd_data->input, SW_TABLET_MODE, ((GPLR(SPITZ_GPIO_SWB) & GPIO_bit(SPITZ_GPIO_SWB)) != 0)); + input_report_switch(spitzkbd_data->input, SW_HEADPHONE_INSERT, ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) != 0)); input_sync(spitzkbd_data->input); spin_unlock_irqrestore(&spitzkbd_data->lock, flags); @@ -398,9 +398,9 @@ for (i = 0; i < ARRAY_SIZE(spitzkbd_keycode); i++) set_bit(spitzkbd->keycode[i], input_dev->keybit); clear_bit(0, input_dev->keybit); - set_bit(SW_0, input_dev->swbit); - set_bit(SW_1, input_dev->swbit); - set_bit(SW_2, input_dev->swbit); + set_bit(SW_LID, input_dev->swbit); + set_bit(SW_TABLET_MODE, input_dev->swbit); + set_bit(SW_HEADPHONE_INSERT, input_dev->swbit); input_register_device(input_dev); diff -urN linux-2.6.17-rc5/drivers/input/misc/wistron_btns.c linux-2.6.17-rc6/drivers/input/misc/wistron_btns.c --- linux-2.6.17-rc5/drivers/input/misc/wistron_btns.c 2006-06-06 01:27:30.779660962 +0000 +++ linux-2.6.17-rc6/drivers/input/misc/wistron_btns.c 2006-06-06 01:27:35.420160258 +0000 @@ -318,6 +318,16 @@ { KE_END, 0 } }; +static struct key_entry keymap_aopen_1559as[] = { + { KE_KEY, 0x01, KEY_HELP }, + { KE_KEY, 0x06, KEY_PROG3 }, + { KE_KEY, 0x11, KEY_PROG1 }, + { KE_KEY, 0x12, KEY_PROG2 }, + { KE_WIFI, 0x30, 0 }, + { KE_KEY, 0x31, KEY_MAIL }, + { KE_KEY, 0x36, KEY_WWW }, +}; + /* * If your machine is not here (which is currently rather likely), please send * a list of buttons and their key codes (reported when loading this module @@ -369,6 +379,15 @@ }, .driver_data = keymap_acer_travelmate_240 }, + { + .callback = dmi_matched, + .ident = "AOpen 1559AS", + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "E2U"), + DMI_MATCH(DMI_BOARD_NAME, "E2U"), + }, + .driver_data = keymap_aopen_1559as + }, { NULL, } }; diff -urN linux-2.6.17-rc5/drivers/input/mouse/alps.c linux-2.6.17-rc6/drivers/input/mouse/alps.c --- linux-2.6.17-rc5/drivers/input/mouse/alps.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/drivers/input/mouse/alps.c 2006-06-06 01:27:35.420160258 +0000 @@ -100,8 +100,8 @@ } if (priv->i->flags & ALPS_OLDPROTO) { - left = packet[2] & 0x08; - right = packet[2] & 0x10; + left = packet[2] & 0x10; + right = packet[2] & 0x08; middle = 0; x = packet[1] | ((packet[0] & 0x07) << 7); y = packet[4] | ((packet[3] & 0x07) << 7); diff -urN linux-2.6.17-rc5/drivers/input/mouse/lifebook.c linux-2.6.17-rc6/drivers/input/mouse/lifebook.c --- linux-2.6.17-rc5/drivers/input/mouse/lifebook.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/drivers/input/mouse/lifebook.c 2006-06-06 01:27:35.420160258 +0000 @@ -22,12 +22,36 @@ static struct dmi_system_id lifebook_dmi_table[] = { { + .ident = "LifeBook B", + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B Series"), + }, + }, + { .ident = "Lifebook B", .matches = { DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK B Series"), }, }, { + .ident = "Lifebook B213x/B2150", + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B2131/B2133/B2150"), + }, + }, + { + .ident = "Zephyr", + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "ZEPHYR"), + }, + }, + { + .ident = "CF-18", + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "CF-18"), + }, + }, + { .ident = "Lifebook B142", .matches = { DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B142"), diff -urN linux-2.6.17-rc5/drivers/input/mouse/logips2pp.c linux-2.6.17-rc6/drivers/input/mouse/logips2pp.c --- linux-2.6.17-rc5/drivers/input/mouse/logips2pp.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/drivers/input/mouse/logips2pp.c 2006-06-06 01:27:35.420160258 +0000 @@ -19,6 +19,7 @@ #define PS2PP_KIND_WHEEL 1 #define PS2PP_KIND_MX 2 #define PS2PP_KIND_TP3 3 +#define PS2PP_KIND_TRACKMAN 4 /* Logitech mouse features */ #define PS2PP_WHEEL 0x01 @@ -223,6 +224,7 @@ { 73, 0, PS2PP_SIDE_BTN }, { 75, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, { 76, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, + { 79, PS2PP_KIND_TRACKMAN, PS2PP_WHEEL }, /* TrackMan with wheel */ { 80, PS2PP_KIND_WHEEL, PS2PP_SIDE_BTN | PS2PP_WHEEL }, { 81, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, { 83, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, @@ -298,6 +300,10 @@ psmouse->name = "TouchPad 3"; break; + case PS2PP_KIND_TRACKMAN: + psmouse->name = "TrackMan"; + break; + default: /* * Set name to "Mouse" only when using PS2++, diff -urN linux-2.6.17-rc5/drivers/input/touchscreen/ads7846.c linux-2.6.17-rc6/drivers/input/touchscreen/ads7846.c --- linux-2.6.17-rc5/drivers/input/touchscreen/ads7846.c 2006-06-06 01:27:30.783661393 +0000 +++ linux-2.6.17-rc6/drivers/input/touchscreen/ads7846.c 2006-06-06 01:27:35.424160688 +0000 @@ -36,13 +36,10 @@ /* - * This code has been tested on an ads7846 / N770 device. + * This code has been heavily tested on a Nokia 770, and lightly + * tested on other ads7846 devices (OSK/Mistral, Lubbock). * Support for ads7843 and ads7845 has only been stubbed in. * - * Not yet done: How accurate are the temperature and voltage - * readings? (System-specific calibration should support - * accuracy of 0.3 degrees C; otherwise it's 2.0 degrees.) - * * IRQ handling needs a workaround because of a shortcoming in handling * edge triggered IRQs on some platforms like the OMAP1/2. These * platforms don't handle the ARM lazy IRQ disabling properly, thus we @@ -248,10 +245,13 @@ if (req->msg.status) status = req->msg.status; + + /* on-wire is a must-ignore bit, a BE12 value, then padding */ sample = be16_to_cpu(req->sample); - sample = sample >> 4; - kfree(req); + sample = sample >> 3; + sample &= 0x0fff; + kfree(req); return status ? status : sample; } @@ -336,13 +336,13 @@ u16 x, y, z1, z2; unsigned long flags; - /* adjust: 12 bit samples (left aligned), built from - * two 8 bit values writen msb-first. + /* adjust: on-wire is a must-ignore bit, a BE12 value, then padding; + * built from two 8 bit values written msb-first. */ - x = be16_to_cpu(ts->tc.x) >> 4; - y = be16_to_cpu(ts->tc.y) >> 4; - z1 = be16_to_cpu(ts->tc.z1) >> 4; - z2 = be16_to_cpu(ts->tc.z2) >> 4; + x = (be16_to_cpu(ts->tc.x) >> 3) & 0x0fff; + y = (be16_to_cpu(ts->tc.y) >> 3) & 0x0fff; + z1 = (be16_to_cpu(ts->tc.z1) >> 3) & 0x0fff; + z2 = (be16_to_cpu(ts->tc.z2) >> 3) & 0x0fff; /* range filtering */ if (x == MAX_12BIT) @@ -420,7 +420,7 @@ m = &ts->msg[ts->msg_idx]; t = list_entry(m->transfers.prev, struct spi_transfer, transfer_list); - val = (*(u16 *)t->rx_buf) >> 3; + val = (be16_to_cpu(*(__be16 *)t->rx_buf) >> 3) & 0x0fff; if (!ts->read_cnt || (abs(ts->last_read - val) > ts->debounce_tol)) { /* Repeat it, if this was the first read or the read * wasn't consistent enough. */ @@ -469,7 +469,7 @@ spin_lock_irq(&ts->lock); if (unlikely(ts->msg_idx && !ts->pendown)) { - /* measurment cycle ended */ + /* measurement cycle ended */ if (!device_suspended(&ts->spi->dev)) { ts->irq_disabled = 0; enable_irq(ts->spi->irq); @@ -495,11 +495,10 @@ spin_lock_irqsave(&ts->lock, flags); if (likely(ts->get_pendown_state())) { if (!ts->irq_disabled) { - /* REVISIT irq logic for many ARM chips has cloned a - * bug wherein disabling an irq in its handler won't - * work;(it's disabled lazily, and too late to work. - * until all their irq logic is fixed, we must shadow - * that state here. + /* The ARM do_simple_IRQ() dispatcher doesn't act + * like the other dispatchers: it will report IRQs + * even after they've been disabled. We work around + * that here. (The "generic irq" framework may help...) */ ts->irq_disabled = 1; disable_irq(ts->spi->irq); @@ -609,16 +608,20 @@ return -EINVAL; } + /* REVISIT when the irq can be triggered active-low, or if for some + * reason the touchscreen isn't hooked up, we don't need to access + * the pendown state. + */ if (pdata->get_pendown_state == NULL) { dev_dbg(&spi->dev, "no get_pendown_state function?\n"); return -EINVAL; } - /* We'd set the wordsize to 12 bits ... except that some controllers - * will then treat the 8 bit command words as 12 bits (and drop the - * four MSBs of the 12 bit result). Result: inputs must be shifted - * to discard the four garbage LSBs. + /* We'd set TX wordsize 8 bits and RX wordsize to 13 bits ... except + * that even if the hardware can do that, the SPI controller driver + * may not. So we stick to very-portable 8 bit words, both RX and TX. */ + spi->bits_per_word = 8; ts = kzalloc(sizeof(struct ads7846), GFP_KERNEL); input_dev = input_allocate_device(); @@ -772,7 +775,7 @@ if (request_irq(spi->irq, ads7846_irq, SA_SAMPLE_RANDOM | SA_TRIGGER_FALLING, - spi->dev.bus_id, ts)) { + spi->dev.driver->name, ts)) { dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq); err = -EBUSY; goto err_free_mem; diff -urN linux-2.6.17-rc5/drivers/md/md.c linux-2.6.17-rc6/drivers/md/md.c --- linux-2.6.17-rc5/drivers/md/md.c 2006-06-06 01:27:30.823665697 +0000 +++ linux-2.6.17-rc6/drivers/md/md.c 2006-06-06 01:27:35.464164993 +0000 @@ -167,6 +167,15 @@ } EXPORT_SYMBOL_GPL(md_new_event); +/* Alternate version that can be called from interrupts + * when calling sysfs_notify isn't needed. + */ +void md_new_event_inintr(mddev_t *mddev) +{ + atomic_inc(&md_event_count); + wake_up(&md_event_waiters); +} + /* * Enables to iterate over all existing md arrays * all_mddevs_lock protects this list. @@ -4149,7 +4158,7 @@ set_bit(MD_RECOVERY_INTR, &mddev->recovery); set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); md_wakeup_thread(mddev->thread); - md_new_event(mddev); + md_new_event_inintr(mddev); } /* seq_file implementation /proc/mdstat */ @@ -5028,8 +5037,10 @@ printk(KERN_INFO "md: stopping all md devices.\n"); ITERATE_MDDEV(mddev,tmp) - if (mddev_trylock(mddev)) + if (mddev_trylock(mddev)) { do_md_stop (mddev, 1); + mddev_unlock(mddev); + } /* * certain more exotic SCSI devices are known to be * volatile wrt too early system reboots. While the diff -urN linux-2.6.17-rc5/drivers/message/fusion/mptbase.c linux-2.6.17-rc6/drivers/message/fusion/mptbase.c --- linux-2.6.17-rc5/drivers/message/fusion/mptbase.c 2006-06-06 01:27:31.003685066 +0000 +++ linux-2.6.17-rc6/drivers/message/fusion/mptbase.c 2006-06-06 01:27:35.652185223 +0000 @@ -1605,6 +1605,21 @@ } #endif +static int +mpt_signal_reset(int index, MPT_ADAPTER *ioc, int reset_phase) +{ + if ((MptDriverClass[index] == MPTSPI_DRIVER && + ioc->bus_type != SPI) || + (MptDriverClass[index] == MPTFC_DRIVER && + ioc->bus_type != FC) || + (MptDriverClass[index] == MPTSAS_DRIVER && + ioc->bus_type != SAS)) + /* make sure we only call the relevant reset handler + * for the bus */ + return 0; + return (MptResetHandlers[index])(ioc, reset_phase); +} + /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /* * mpt_do_ioc_recovery - Initialize or recover MPT adapter. @@ -1885,14 +1900,14 @@ if ((ret == 0) && MptResetHandlers[ii]) { dprintk((MYIOC_s_INFO_FMT "Calling IOC post_reset handler #%d\n", ioc->name, ii)); - rc += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_POST_RESET); + rc += mpt_signal_reset(ii, ioc, MPT_IOC_POST_RESET); handlers++; } if (alt_ioc_ready && MptResetHandlers[ii]) { drsprintk((MYIOC_s_INFO_FMT "Calling alt-%s post_reset handler #%d\n", ioc->name, ioc->alt_ioc->name, ii)); - rc += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_POST_RESET); + rc += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_POST_RESET); handlers++; } } @@ -3267,11 +3282,11 @@ if (MptResetHandlers[ii]) { dprintk((MYIOC_s_INFO_FMT "Calling IOC pre_reset handler #%d\n", ioc->name, ii)); - r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_PRE_RESET); + r += mpt_signal_reset(ii, ioc, MPT_IOC_PRE_RESET); if (ioc->alt_ioc) { dprintk((MYIOC_s_INFO_FMT "Calling alt-%s pre_reset handler #%d\n", ioc->name, ioc->alt_ioc->name, ii)); - r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_PRE_RESET); + r += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_PRE_RESET); } } } @@ -5706,11 +5721,11 @@ if (MptResetHandlers[ii]) { dtmprintk((MYIOC_s_INFO_FMT "Calling IOC reset_setup handler #%d\n", ioc->name, ii)); - r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_SETUP_RESET); + r += mpt_signal_reset(ii, ioc, MPT_IOC_SETUP_RESET); if (ioc->alt_ioc) { dtmprintk((MYIOC_s_INFO_FMT "Calling alt-%s setup reset handler #%d\n", ioc->name, ioc->alt_ioc->name, ii)); - r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_SETUP_RESET); + r += mpt_signal_reset(ii, ioc->alt_ioc, MPT_IOC_SETUP_RESET); } } } diff -urN linux-2.6.17-rc5/drivers/mmc/Kconfig linux-2.6.17-rc6/drivers/mmc/Kconfig --- linux-2.6.17-rc5/drivers/mmc/Kconfig 2006-06-06 01:27:31.011685927 +0000 +++ linux-2.6.17-rc6/drivers/mmc/Kconfig 2006-06-06 01:27:35.664186514 +0000 @@ -84,7 +84,7 @@ config MMC_AU1X tristate "Alchemy AU1XX0 MMC Card Interface support" - depends on SOC_AU1X00 && MMC + depends on MMC && SOC_AU1200 help This selects the AMD Alchemy(R) Multimedia card interface. If you have a Alchemy platform with a MMC slot, say Y or M here. diff -urN linux-2.6.17-rc5/drivers/net/e1000/e1000_main.c linux-2.6.17-rc6/drivers/net/e1000/e1000_main.c --- linux-2.6.17-rc5/drivers/net/e1000/e1000_main.c 2006-06-06 01:27:31.079693244 +0000 +++ linux-2.6.17-rc6/drivers/net/e1000/e1000_main.c 2006-06-06 01:27:35.732193831 +0000 @@ -220,6 +220,7 @@ static int e1000_suspend(struct pci_dev *pdev, pm_message_t state); static int e1000_resume(struct pci_dev *pdev); #endif +static void e1000_shutdown(struct pci_dev *pdev); #ifdef CONFIG_NET_POLL_CONTROLLER /* for netdump / net console */ @@ -235,8 +236,9 @@ /* Power Managment Hooks */ #ifdef CONFIG_PM .suspend = e1000_suspend, - .resume = e1000_resume + .resume = e1000_resume, #endif + .shutdown = e1000_shutdown }; MODULE_AUTHOR("Intel Corporation, "); @@ -4611,6 +4613,12 @@ return 0; } #endif + +static void e1000_shutdown(struct pci_dev *pdev) +{ + e1000_suspend(pdev, PMSG_SUSPEND); +} + #ifdef CONFIG_NET_POLL_CONTROLLER /* * Polling 'interrupt' - used by things like netconsole to send skbs diff -urN linux-2.6.17-rc5/drivers/net/forcedeth.c linux-2.6.17-rc6/drivers/net/forcedeth.c --- linux-2.6.17-rc5/drivers/net/forcedeth.c 2006-06-06 01:27:31.087694105 +0000 +++ linux-2.6.17-rc6/drivers/net/forcedeth.c 2006-06-06 01:27:35.740194692 +0000 @@ -2615,6 +2615,18 @@ return ret; } +#ifdef NETIF_F_TSO +static int nv_set_tso(struct net_device *dev, u32 value) +{ + struct fe_priv *np = netdev_priv(dev); + + if ((np->driver_data & DEV_HAS_CHECKSUM)) + return ethtool_op_set_tso(dev, value); + else + return value ? -EOPNOTSUPP : 0; +} +#endif + static struct ethtool_ops ops = { .get_drvinfo = nv_get_drvinfo, .get_link = ethtool_op_get_link, @@ -2626,6 +2638,10 @@ .get_regs = nv_get_regs, .nway_reset = nv_nway_reset, .get_perm_addr = ethtool_op_get_perm_addr, +#ifdef NETIF_F_TSO + .get_tso = ethtool_op_get_tso, + .set_tso = nv_set_tso +#endif }; static void nv_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) diff -urN linux-2.6.17-rc5/drivers/net/irda/Kconfig linux-2.6.17-rc6/drivers/net/irda/Kconfig --- linux-2.6.17-rc5/drivers/net/irda/Kconfig 2006-06-06 01:27:31.099695396 +0000 +++ linux-2.6.17-rc6/drivers/net/irda/Kconfig 2006-06-06 01:27:35.752195983 +0000 @@ -33,7 +33,7 @@ config ESI_DONGLE tristate "ESI JetEye PC dongle" - depends on DONGLE && IRDA + depends on IRTTY_SIR && DONGLE && IRDA help Say Y here if you want to build support for the Extended Systems JetEye PC dongle. To compile it as a module, choose M here. The ESI @@ -44,7 +44,7 @@ config ACTISYS_DONGLE tristate "ACTiSYS IR-220L and IR220L+ dongle" - depends on DONGLE && IRDA + depends on IRTTY_SIR && DONGLE && IRDA help Say Y here if you want to build support for the ACTiSYS IR-220L and IR220L+ dongles. To compile it as a module, choose M here. The @@ -55,7 +55,7 @@ config TEKRAM_DONGLE tristate "Tekram IrMate 210B dongle" - depends on DONGLE && IRDA + depends on IRTTY_SIR && DONGLE && IRDA help Say Y here if you want to build support for the Tekram IrMate 210B dongle. To compile it as a module, choose M here. The Tekram dongle @@ -66,7 +66,7 @@ config TOIM3232_DONGLE tristate "TOIM3232 IrDa dongle" - depends on DONGLE && IRDA + depends on IRTTY_SIR && DONGLE && IRDA help Say Y here if you want to build support for the Vishay/Temic TOIM3232 and TOIM4232 based dongles. @@ -74,7 +74,7 @@ config LITELINK_DONGLE tristate "Parallax LiteLink dongle" - depends on DONGLE && IRDA + depends on IRTTY_SIR && DONGLE && IRDA help Say Y here if you want to build support for the Parallax Litelink dongle. To compile it as a module, choose M here. The Parallax @@ -85,7 +85,7 @@ config MA600_DONGLE tristate "Mobile Action MA600 dongle" - depends on DONGLE && IRDA && EXPERIMENTAL + depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL help Say Y here if you want to build support for the Mobile Action MA600 dongle. To compile it as a module, choose M here. The MA600 dongle @@ -98,7 +98,7 @@ config GIRBIL_DONGLE tristate "Greenwich GIrBIL dongle" - depends on DONGLE && IRDA && EXPERIMENTAL + depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL help Say Y here if you want to build support for the Greenwich GIrBIL dongle. If you want to compile it as a module, choose M here. @@ -109,7 +109,7 @@ config MCP2120_DONGLE tristate "Microchip MCP2120" - depends on DONGLE && IRDA && EXPERIMENTAL + depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL help Say Y here if you want to build support for the Microchip MCP2120 dongle. If you want to compile it as a module, choose M here. @@ -123,7 +123,7 @@ config OLD_BELKIN_DONGLE tristate "Old Belkin dongle" - depends on DONGLE && IRDA && EXPERIMENTAL + depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL help Say Y here if you want to build support for the Adaptec Airport 1000 and 2000 dongles. If you want to compile it as a module, choose @@ -132,7 +132,7 @@ config ACT200L_DONGLE tristate "ACTiSYS IR-200L dongle" - depends on DONGLE && IRDA && EXPERIMENTAL + depends on IRTTY_SIR && DONGLE && IRDA && EXPERIMENTAL help Say Y here if you want to build support for the ACTiSYS IR-200L dongle. If you want to compile it as a module, choose M here. diff -urN linux-2.6.17-rc5/drivers/net/netconsole.c linux-2.6.17-rc6/drivers/net/netconsole.c --- linux-2.6.17-rc5/drivers/net/netconsole.c 2006-06-06 01:27:31.115697118 +0000 +++ linux-2.6.17-rc6/drivers/net/netconsole.c 2006-06-06 01:27:35.768197705 +0000 @@ -107,7 +107,7 @@ if(!configured) { printk("netconsole: not configured, aborting\n"); - return -EINVAL; + return 0; } if(netpoll_setup(&np)) diff -urN linux-2.6.17-rc5/drivers/net/pcmcia/nmclan_cs.c linux-2.6.17-rc6/drivers/net/pcmcia/nmclan_cs.c --- linux-2.6.17-rc5/drivers/net/pcmcia/nmclan_cs.c 2006-06-06 01:27:31.123697979 +0000 +++ linux-2.6.17-rc6/drivers/net/pcmcia/nmclan_cs.c 2006-06-06 01:27:35.780198996 +0000 @@ -1204,7 +1204,7 @@ dev->last_rx = jiffies; lp->linux_stats.rx_packets++; - lp->linux_stats.rx_bytes += skb->len; + lp->linux_stats.rx_bytes += pkt_len; outb(0xFF, ioaddr + AM2150_RCV_NEXT); /* skip to next frame */ continue; } else { diff -urN linux-2.6.17-rc5/drivers/net/pcnet32.c linux-2.6.17-rc6/drivers/net/pcnet32.c --- linux-2.6.17-rc5/drivers/net/pcnet32.c 2006-06-06 01:27:31.131698840 +0000 +++ linux-2.6.17-rc6/drivers/net/pcnet32.c 2006-06-06 01:27:35.840205453 +0000 @@ -1774,8 +1774,6 @@ lp->rx_dma_addr[i] = 0; } - pcnet32_free_ring(dev); - /* * Switch back to 16bit mode to avoid problems with dumb * DOS packet driver after a warm reboot diff -urN linux-2.6.17-rc5/drivers/net/pppoe.c linux-2.6.17-rc6/drivers/net/pppoe.c --- linux-2.6.17-rc5/drivers/net/pppoe.c 2006-06-06 01:27:31.131698840 +0000 +++ linux-2.6.17-rc6/drivers/net/pppoe.c 2006-06-06 01:27:35.840205453 +0000 @@ -861,6 +861,9 @@ * give dev_queue_xmit something it can free. */ skb2 = skb_clone(skb, GFP_ATOMIC); + + if (skb2 == NULL) + goto abort; } ph = (struct pppoe_hdr *) skb_push(skb2, sizeof(struct pppoe_hdr)); diff -urN linux-2.6.17-rc5/drivers/net/wireless/arlan-main.c linux-2.6.17-rc6/drivers/net/wireless/arlan-main.c --- linux-2.6.17-rc5/drivers/net/wireless/arlan-main.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/drivers/net/wireless/arlan-main.c 2006-06-06 01:27:35.944216644 +0000 @@ -1838,7 +1838,7 @@ } #ifdef MODULE -int init_module(void) +int __init init_module(void) { int i = 0; @@ -1860,7 +1860,7 @@ } -void cleanup_module(void) +void __exit cleanup_module(void) { int i = 0; struct net_device *dev; diff -urN linux-2.6.17-rc5/drivers/net/wireless/wavelan.c linux-2.6.17-rc6/drivers/net/wireless/wavelan.c --- linux-2.6.17-rc5/drivers/net/wireless/wavelan.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/drivers/net/wireless/wavelan.c 2006-06-06 01:27:35.988221379 +0000 @@ -4306,7 +4306,7 @@ * Insertion of the module * I'm now quite proud of the multi-device support. */ -int init_module(void) +int __init init_module(void) { int ret = -EIO; /* Return error if no cards found */ int i; diff -urN linux-2.6.17-rc5/drivers/pcmcia/ds.c linux-2.6.17-rc6/drivers/pcmcia/ds.c --- linux-2.6.17-rc5/drivers/pcmcia/ds.c 2006-06-06 01:27:31.295716487 +0000 +++ linux-2.6.17-rc6/drivers/pcmcia/ds.c 2006-06-06 01:27:36.036226544 +0000 @@ -1143,6 +1143,12 @@ { struct pcmcia_socket *s = pcmcia_get_socket(skt); + if (!s) { + printk(KERN_ERR "PCMCIA obtaining reference to socket %p " \ + "failed, event 0x%x lost!\n", skt, event); + return -ENODEV; + } + ds_dbg(1, "ds_event(0x%06x, %d, 0x%p)\n", event, priority, skt); diff -urN linux-2.6.17-rc5/drivers/rtc/rtc-m48t86.c linux-2.6.17-rc6/drivers/rtc/rtc-m48t86.c --- linux-2.6.17-rc5/drivers/rtc/rtc-m48t86.c 2006-06-06 01:27:31.303717348 +0000 +++ linux-2.6.17-rc6/drivers/rtc/rtc-m48t86.c 2006-06-06 01:27:36.044227405 +0000 @@ -48,33 +48,33 @@ struct platform_device *pdev = to_platform_device(dev); struct m48t86_ops *ops = pdev->dev.platform_data; - reg = ops->readb(M48T86_REG_B); + reg = ops->readbyte(M48T86_REG_B); if (reg & M48T86_REG_B_DM) { /* data (binary) mode */ - tm->tm_sec = ops->readb(M48T86_REG_SEC); - tm->tm_min = ops->readb(M48T86_REG_MIN); - tm->tm_hour = ops->readb(M48T86_REG_HOUR) & 0x3F; - tm->tm_mday = ops->readb(M48T86_REG_DOM); + tm->tm_sec = ops->readbyte(M48T86_REG_SEC); + tm->tm_min = ops->readbyte(M48T86_REG_MIN); + tm->tm_hour = ops->readbyte(M48T86_REG_HOUR) & 0x3F; + tm->tm_mday = ops->readbyte(M48T86_REG_DOM); /* tm_mon is 0-11 */ - tm->tm_mon = ops->readb(M48T86_REG_MONTH) - 1; - tm->tm_year = ops->readb(M48T86_REG_YEAR) + 100; - tm->tm_wday = ops->readb(M48T86_REG_DOW); + tm->tm_mon = ops->readbyte(M48T86_REG_MONTH) - 1; + tm->tm_year = ops->readbyte(M48T86_REG_YEAR) + 100; + tm->tm_wday = ops->readbyte(M48T86_REG_DOW); } else { /* bcd mode */ - tm->tm_sec = BCD2BIN(ops->readb(M48T86_REG_SEC)); - tm->tm_min = BCD2BIN(ops->readb(M48T86_REG_MIN)); - tm->tm_hour = BCD2BIN(ops->readb(M48T86_REG_HOUR) & 0x3F); - tm->tm_mday = BCD2BIN(ops->readb(M48T86_REG_DOM)); + tm->tm_sec = BCD2BIN(ops->readbyte(M48T86_REG_SEC)); + tm->tm_min = BCD2BIN(ops->readbyte(M48T86_REG_MIN)); + tm->tm_hour = BCD2BIN(ops->readbyte(M48T86_REG_HOUR) & 0x3F); + tm->tm_mday = BCD2BIN(ops->readbyte(M48T86_REG_DOM)); /* tm_mon is 0-11 */ - tm->tm_mon = BCD2BIN(ops->readb(M48T86_REG_MONTH)) - 1; - tm->tm_year = BCD2BIN(ops->readb(M48T86_REG_YEAR)) + 100; - tm->tm_wday = BCD2BIN(ops->readb(M48T86_REG_DOW)); + tm->tm_mon = BCD2BIN(ops->readbyte(M48T86_REG_MONTH)) - 1; + tm->tm_year = BCD2BIN(ops->readbyte(M48T86_REG_YEAR)) + 100; + tm->tm_wday = BCD2BIN(ops->readbyte(M48T86_REG_DOW)); } /* correct the hour if the clock is in 12h mode */ if (!(reg & M48T86_REG_B_H24)) - if (ops->readb(M48T86_REG_HOUR) & 0x80) + if (ops->readbyte(M48T86_REG_HOUR) & 0x80) tm->tm_hour += 12; return 0; @@ -86,35 +86,35 @@ struct platform_device *pdev = to_platform_device(dev); struct m48t86_ops *ops = pdev->dev.platform_data; - reg = ops->readb(M48T86_REG_B); + reg = ops->readbyte(M48T86_REG_B); /* update flag and 24h mode */ reg |= M48T86_REG_B_SET | M48T86_REG_B_H24; - ops->writeb(reg, M48T86_REG_B); + ops->writebyte(reg, M48T86_REG_B); if (reg & M48T86_REG_B_DM) { /* data (binary) mode */ - ops->writeb(tm->tm_sec, M48T86_REG_SEC); - ops->writeb(tm->tm_min, M48T86_REG_MIN); - ops->writeb(tm->tm_hour, M48T86_REG_HOUR); - ops->writeb(tm->tm_mday, M48T86_REG_DOM); - ops->writeb(tm->tm_mon + 1, M48T86_REG_MONTH); - ops->writeb(tm->tm_year % 100, M48T86_REG_YEAR); - ops->writeb(tm->tm_wday, M48T86_REG_DOW); + ops->writebyte(tm->tm_sec, M48T86_REG_SEC); + ops->writebyte(tm->tm_min, M48T86_REG_MIN); + ops->writebyte(tm->tm_hour, M48T86_REG_HOUR); + ops->writebyte(tm->tm_mday, M48T86_REG_DOM); + ops->writebyte(tm->tm_mon + 1, M48T86_REG_MONTH); + ops->writebyte(tm->tm_year % 100, M48T86_REG_YEAR); + ops->writebyte(tm->tm_wday, M48T86_REG_DOW); } else { /* bcd mode */ - ops->writeb(BIN2BCD(tm->tm_sec), M48T86_REG_SEC); - ops->writeb(BIN2BCD(tm->tm_min), M48T86_REG_MIN); - ops->writeb(BIN2BCD(tm->tm_hour), M48T86_REG_HOUR); - ops->writeb(BIN2BCD(tm->tm_mday), M48T86_REG_DOM); - ops->writeb(BIN2BCD(tm->tm_mon + 1), M48T86_REG_MONTH); - ops->writeb(BIN2BCD(tm->tm_year % 100), M48T86_REG_YEAR); - ops->writeb(BIN2BCD(tm->tm_wday), M48T86_REG_DOW); + ops->writebyte(BIN2BCD(tm->tm_sec), M48T86_REG_SEC); + ops->writebyte(BIN2BCD(tm->tm_min), M48T86_REG_MIN); + ops->writebyte(BIN2BCD(tm->tm_hour), M48T86_REG_HOUR); + ops->writebyte(BIN2BCD(tm->tm_mday), M48T86_REG_DOM); + ops->writebyte(BIN2BCD(tm->tm_mon + 1), M48T86_REG_MONTH); + ops->writebyte(BIN2BCD(tm->tm_year % 100), M48T86_REG_YEAR); + ops->writebyte(BIN2BCD(tm->tm_wday), M48T86_REG_DOW); } /* update ended */ reg &= ~M48T86_REG_B_SET; - ops->writeb(reg, M48T86_REG_B); + ops->writebyte(reg, M48T86_REG_B); return 0; } @@ -125,12 +125,12 @@ struct platform_device *pdev = to_platform_device(dev); struct m48t86_ops *ops = pdev->dev.platform_data; - reg = ops->readb(M48T86_REG_B); + reg = ops->readbyte(M48T86_REG_B); seq_printf(seq, "mode\t\t: %s\n", (reg & M48T86_REG_B_DM) ? "binary" : "bcd"); - reg = ops->readb(M48T86_REG_D); + reg = ops->readbyte(M48T86_REG_D); seq_printf(seq, "battery\t\t: %s\n", (reg & M48T86_REG_D_VRT) ? "ok" : "exhausted"); @@ -157,7 +157,7 @@ platform_set_drvdata(dev, rtc); /* read battery status */ - reg = ops->readb(M48T86_REG_D); + reg = ops->readbyte(M48T86_REG_D); dev_info(&dev->dev, "battery %s\n", (reg & M48T86_REG_D_VRT) ? "ok" : "exhausted"); diff -urN linux-2.6.17-rc5/drivers/s390/cio/css.h linux-2.6.17-rc6/drivers/s390/cio/css.h --- linux-2.6.17-rc5/drivers/s390/cio/css.h 2006-06-06 01:27:31.323719500 +0000 +++ linux-2.6.17-rc6/drivers/s390/cio/css.h 2006-06-06 01:27:36.196243761 +0000 @@ -45,11 +45,11 @@ union { __u8 fc; /* SPID function code */ struct path_state ps; /* SNID path state */ - } inf; + } __attribute__ ((packed)) inf; union { __u32 cpu_addr : 16; /* CPU address */ struct extended_cssid ext_cssid; - } pgid_high; + } __attribute__ ((packed)) pgid_high; __u32 cpu_id : 24; /* CPU identification */ __u32 cpu_model : 16; /* CPU model */ __u32 tod_high; /* high word TOD clock */ diff -urN linux-2.6.17-rc5/drivers/s390/cio/device_fsm.c linux-2.6.17-rc6/drivers/s390/cio/device_fsm.c --- linux-2.6.17-rc5/drivers/s390/cio/device_fsm.c 2006-06-06 01:27:31.323719500 +0000 +++ linux-2.6.17-rc6/drivers/s390/cio/device_fsm.c 2006-06-06 01:27:36.196243761 +0000 @@ -749,7 +749,7 @@ /* Unit check but no sense data. Need basic sense. */ if (ccw_device_do_sense(cdev, irb) != 0) goto call_handler_unsol; - memcpy(irb, &cdev->private->irb, sizeof(struct irb)); + memcpy(&cdev->private->irb, irb, sizeof(struct irb)); cdev->private->state = DEV_STATE_W4SENSE; cdev->private->intparm = 0; return; diff -urN linux-2.6.17-rc5/drivers/s390/net/ctcmain.c linux-2.6.17-rc6/drivers/s390/net/ctcmain.c --- linux-2.6.17-rc5/drivers/s390/net/ctcmain.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/drivers/s390/net/ctcmain.c 2006-06-06 01:27:36.200244191 +0000 @@ -1486,13 +1486,13 @@ } } -static void +static void ch_action_reinit(fsm_instance *fi, int event, void *arg) { struct channel *ch = (struct channel *)arg; struct net_device *dev = ch->netdev; struct ctc_priv *privptr = dev->priv; - + DBF_TEXT(trace, 4, __FUNCTION__); ch_action_iofatal(fi, event, arg); fsm_addtimer(&privptr->restart_timer, 1000, DEV_EVENT_RESTART, dev); @@ -1624,7 +1624,7 @@ } dev1 = simple_strtoul(id1, &id1, 16); dev2 = simple_strtoul(id2, &id2, 16); - + return (dev1 < dev2); } @@ -1895,7 +1895,7 @@ irb->scsw.dstat); return; } - + priv = ((struct ccwgroup_device *)cdev->dev.driver_data) ->dev.driver_data; @@ -1909,7 +1909,7 @@ "device %s\n", cdev->dev.bus_id); return; } - + dev = (struct net_device *) (ch->netdev); if (dev == NULL) { ctc_pr_crit("ctc: ctc_irq_handler dev=NULL bus_id=%s, ch=0x%p\n", @@ -2008,12 +2008,12 @@ fsm_event(ch->fsm, CH_EVENT_STOP, ch); } } -static void +static void dev_action_restart(fsm_instance *fi, int event, void *arg) { struct net_device *dev = (struct net_device *)arg; struct ctc_priv *privptr = dev->priv; - + DBF_TEXT(trace, 3, __FUNCTION__); ctc_pr_debug("%s: Restarting\n", dev->name); dev_action_stop(fi, event, arg); @@ -2193,7 +2193,7 @@ DBF_TEXT(trace, 5, __FUNCTION__); /* we need to acquire the lock for testing the state - * otherwise we can have an IRQ changing the state to + * otherwise we can have an IRQ changing the state to * TXIDLE after the test but before acquiring the lock. */ spin_lock_irqsave(&ch->collect_lock, saveflags); @@ -2393,7 +2393,7 @@ /** * If channels are not running, try to restart them - * and throw away packet. + * and throw away packet. */ if (fsm_getstate(privptr->fsm) != DEV_STATE_RUNNING) { fsm_event(privptr->fsm, DEV_EVENT_START, dev); @@ -2738,7 +2738,7 @@ /** * Add ctc specific attributes. * Add ctc private data. - * + * * @param cgdev pointer to ccwgroup_device just added * * @returns 0 on success, !0 on failure. @@ -2869,7 +2869,7 @@ DBF_TEXT(setup, 3, buffer); type = get_channel_type(&cgdev->cdev[0]->id); - + snprintf(read_id, CTC_ID_SIZE, "ch-%s", cgdev->cdev[0]->dev.bus_id); snprintf(write_id, CTC_ID_SIZE, "ch-%s", cgdev->cdev[1]->dev.bus_id); @@ -2907,7 +2907,7 @@ channel_get(type, direction == READ ? read_id : write_id, direction); if (privptr->channel[direction] == NULL) { - if (direction == WRITE) + if (direction == WRITE) channel_free(privptr->channel[READ]); ctc_free_netdevice(dev, 1); @@ -2955,7 +2955,7 @@ { struct ctc_priv *priv; struct net_device *ndev; - + DBF_TEXT(setup, 3, __FUNCTION__); pr_debug("%s() called\n", __FUNCTION__); diff -urN linux-2.6.17-rc5/drivers/s390/net/ctctty.c linux-2.6.17-rc6/drivers/s390/net/ctctty.c --- linux-2.6.17-rc5/drivers/s390/net/ctctty.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/drivers/s390/net/ctctty.c 2006-06-06 01:27:36.200244191 +0000 @@ -130,7 +130,7 @@ if ((tty = info->tty)) { if (info->mcr & UART_MCR_RTS) { struct sk_buff *skb; - + if ((skb = skb_dequeue(&info->rx_queue))) { int len = skb->len; tty_insert_flip_string(tty, skb->data, len); @@ -328,7 +328,7 @@ { int skb_res; struct sk_buff *skb; - + DBF_TEXT(trace, 4, __FUNCTION__); if (ctc_tty_shuttingdown) return; @@ -497,7 +497,7 @@ c = (count < CTC_TTY_XMIT_SIZE) ? count : CTC_TTY_XMIT_SIZE; if (c <= 0) break; - + skb_res = info->netdev->hard_header_len + sizeof(info->mcr) + + sizeof(__u32); skb = dev_alloc_skb(skb_res + c); @@ -828,7 +828,7 @@ if (tty_hung_up_p(filp) || (info->flags & CTC_ASYNC_CLOSING)) { if (info->flags & CTC_ASYNC_CLOSING) - wait_event(info->close_wait, + wait_event(info->close_wait, !(info->flags & CTC_ASYNC_CLOSING)); #ifdef MODEM_DO_RESTART if (info->flags & CTC_ASYNC_HUP_NOTIFY) @@ -1247,7 +1247,7 @@ void ctc_tty_cleanup(void) { unsigned long saveflags; - + DBF_TEXT(trace, 2, __FUNCTION__); spin_lock_irqsave(&ctc_tty_lock, saveflags); ctc_tty_shuttingdown = 1; diff -urN linux-2.6.17-rc5/drivers/s390/net/cu3088.c linux-2.6.17-rc6/drivers/s390/net/cu3088.c --- linux-2.6.17-rc5/drivers/s390/net/cu3088.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/drivers/s390/net/cu3088.c 2006-06-06 01:27:36.204244622 +0000 @@ -20,7 +20,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ - + #include #include #include @@ -77,7 +77,7 @@ int len; if (!(end = strchr(start, delim[i]))) - return count; + return -EINVAL; len = min_t(ptrdiff_t, BUS_ID_SIZE, end - start + 1); strlcpy (bus_ids[i], start, len); argv[i] = bus_ids[i]; @@ -94,7 +94,7 @@ /* Register-unregister for ctc&lcs */ int -register_cu3088_discipline(struct ccwgroup_driver *dcp) +register_cu3088_discipline(struct ccwgroup_driver *dcp) { int rc; @@ -109,7 +109,7 @@ rc = driver_create_file(&dcp->driver, &driver_attr_group); if (rc) ccwgroup_driver_unregister(dcp); - + return rc; } @@ -137,7 +137,7 @@ cu3088_init (void) { int rc; - + cu3088_root_dev = s390_root_dev_register("cu3088"); if (IS_ERR(cu3088_root_dev)) return PTR_ERR(cu3088_root_dev); diff -urN linux-2.6.17-rc5/drivers/s390/net/iucv.c linux-2.6.17-rc6/drivers/s390/net/iucv.c --- linux-2.6.17-rc5/drivers/s390/net/iucv.c 2006-06-06 01:27:31.327719931 +0000 +++ linux-2.6.17-rc6/drivers/s390/net/iucv.c 2006-06-06 01:27:36.204244622 +0000 @@ -1,4 +1,4 @@ -/* +/* * IUCV network driver * * Copyright (C) 2001 IBM Deutschland Entwicklung GmbH, IBM Corporation @@ -28,7 +28,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ - + /* #define DEBUG */ #include @@ -81,7 +81,7 @@ struct bus_type iucv_bus = { .name = "iucv", .match = iucv_bus_match, -}; +}; struct device *iucv_root; @@ -297,7 +297,7 @@ /* * Debugging stuff *******************************************************************************/ - + #ifdef DEBUG static int debuglevel = 0; @@ -344,7 +344,7 @@ /* * Internal functions *******************************************************************************/ - + /** * print start banner */ @@ -810,7 +810,7 @@ sizeof (new_handler->id.userid)); EBC_TOUPPER (new_handler->id.userid, sizeof (new_handler->id.userid)); - + if (pgmmask) { memcpy (new_handler->id.mask, pgmmask, sizeof (new_handler->id.mask)); @@ -1229,7 +1229,7 @@ /* parm->ipaudit has only 3 bytes */ *audit >>= 8; } - + release_param(parm); iucv_debug(1, "b2f0_result = %ld", b2f0_result); @@ -2330,14 +2330,14 @@ temp_buff1[j] &= (h->id.mask)[j]; temp_buff2[j] &= (h->id.mask)[j]; } - + iucv_dumpit("temp_buff1:", temp_buff1, sizeof(temp_buff1)); iucv_dumpit("temp_buff2", temp_buff2, sizeof(temp_buff2)); - + if (!memcmp (temp_buff1, temp_buff2, 24)) { - + iucv_debug(2, "found a matching handler"); break; @@ -2368,7 +2368,7 @@ } else iucv_sever(int_buf->ippathid, no_listener); break; - + case 0x02: /*connection complete */ if (messagesDisabled) { iucv_setmask(~0); @@ -2387,7 +2387,7 @@ } else iucv_sever(int_buf->ippathid, no_listener); break; - + case 0x03: /* connection severed */ if (messagesDisabled) { iucv_setmask(~0); @@ -2398,13 +2398,13 @@ interrupt->ConnectionSevered( (iucv_ConnectionSevered *)int_buf, h->pgm_data); - + else iucv_sever (int_buf->ippathid, no_listener); } else iucv_sever(int_buf->ippathid, no_listener); break; - + case 0x04: /* connection quiesced */ if (messagesDisabled) { iucv_setmask(~0); @@ -2420,7 +2420,7 @@ "ConnectionQuiesced not called"); } break; - + case 0x05: /* connection resumed */ if (messagesDisabled) { iucv_setmask(~0); @@ -2436,7 +2436,7 @@ "ConnectionResumed not called"); } break; - + case 0x06: /* priority message complete */ case 0x07: /* nonpriority message complete */ if (h) { @@ -2449,7 +2449,7 @@ "MessageComplete not called"); } break; - + case 0x08: /* priority message pending */ case 0x09: /* nonpriority message pending */ if (h) { @@ -2467,7 +2467,7 @@ __FUNCTION__); break; } /* end switch */ - + iucv_debug(2, "exiting pathid %d, type %02X", int_buf->ippathid, int_buf->iptype); diff -urN linux-2.6.17-rc5/drivers/s390/net/iucv.h linux-2.6.17-rc6/drivers/s390/net/iucv.h --- linux-2.6.17-rc5/drivers/s390/net/iucv.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/drivers/s390/net/iucv.h 2006-06-06 01:27:36.204244622 +0000 @@ -4,7 +4,7 @@ * * S390 version * Copyright (C) 2000 IBM Corporation - * Author(s):Alan Altmark (Alan_Altmark@us.ibm.com) + * Author(s):Alan Altmark (Alan_Altmark@us.ibm.com) * Xenia Tkatschow (xenia@us.ibm.com) * * @@ -16,17 +16,17 @@ * CP Programming Services book, also available on the web * thru www.ibm.com/s390/vm/pubs, manual # SC24-5760 * - * Definition of Return Codes - * -All positive return codes including zero are reflected back - * from CP except for iucv_register_program. The definition of each - * return code can be found in CP Programming Services book. - * Also available on the web thru www.ibm.com/s390/vm/pubs, manual # SC24-5760 - * - Return Code of: - * (-EINVAL) Invalid value - * (-ENOMEM) storage allocation failed + * Definition of Return Codes + * -All positive return codes including zero are reflected back + * from CP except for iucv_register_program. The definition of each + * return code can be found in CP Programming Services book. + * Also available on the web thru www.ibm.com/s390/vm/pubs, manual # SC24-5760 + * - Return Code of: + * (-EINVAL) Invalid value + * (-ENOMEM) storage allocation failed * pgmask defined in iucv_register_program will be set depending on input - * paramters. - * + * paramters. + * */ #include @@ -124,13 +124,13 @@ #define iucv_handle_t void * /* flags1: - * All flags are defined in the field IPFLAGS1 of each function - * and can be found in CP Programming Services. - * IPLOCAL - Indicates the connect can only be satisfied on the - * local system - * IPPRTY - Indicates a priority message - * IPQUSCE - Indicates you do not want to receive messages on a - * path until an iucv_resume is issued + * All flags are defined in the field IPFLAGS1 of each function + * and can be found in CP Programming Services. + * IPLOCAL - Indicates the connect can only be satisfied on the + * local system + * IPPRTY - Indicates a priority message + * IPQUSCE - Indicates you do not want to receive messages on a + * path until an iucv_resume is issued * IPRMDATA - Indicates that the message is in the parameter list */ #define IPLOCAL 0x01 @@ -154,14 +154,14 @@ #define AllInterrupts 0xf8 /* * Mapping of external interrupt buffers should be used with the corresponding - * interrupt types. - * Names: iucv_ConnectionPending -> connection pending + * interrupt types. + * Names: iucv_ConnectionPending -> connection pending * iucv_ConnectionComplete -> connection complete - * iucv_ConnectionSevered -> connection severed - * iucv_ConnectionQuiesced -> connection quiesced - * iucv_ConnectionResumed -> connection resumed - * iucv_MessagePending -> message pending - * iucv_MessageComplete -> message complete + * iucv_ConnectionSevered -> connection severed + * iucv_ConnectionQuiesced -> connection quiesced + * iucv_ConnectionResumed -> connection resumed + * iucv_MessagePending -> message pending + * iucv_MessageComplete -> message complete */ typedef struct { u16 ippathid; @@ -260,16 +260,16 @@ uchar res2[3]; } iucv_MessageComplete; -/* - * iucv_interrupt_ops_t: Is a vector of functions that handle - * IUCV interrupts. - * Parameter list: - * eib - is a pointer to a 40-byte area described - * with one of the structures above. - * pgm_data - this data is strictly for the - * interrupt handler that is passed by - * the application. This may be an address - * or token. +/* + * iucv_interrupt_ops_t: Is a vector of functions that handle + * IUCV interrupts. + * Parameter list: + * eib - is a pointer to a 40-byte area described + * with one of the structures above. + * pgm_data - this data is strictly for the + * interrupt handler that is passed by + * the application. This may be an address + * or token. */ typedef struct { void (*ConnectionPending) (iucv_ConnectionPending * eib, @@ -287,8 +287,8 @@ } iucv_interrupt_ops_t; /* - *iucv_array_t : Defines buffer array. - * Inside the array may be 31- bit addresses and 31-bit lengths. + *iucv_array_t : Defines buffer array. + * Inside the array may be 31- bit addresses and 31-bit lengths. */ typedef struct { u32 address; @@ -299,19 +299,19 @@ extern struct device *iucv_root; /* -prototypes- */ -/* - * Name: iucv_register_program - * Purpose: Registers an application with IUCV - * Input: prmname - user identification +/* + * Name: iucv_register_program + * Purpose: Registers an application with IUCV + * Input: prmname - user identification * userid - machine identification * pgmmask - indicates which bits in the prmname and userid combined will be * used to determine who is given control - * ops - address of vector of interrupt handlers - * pgm_data- application data passed to interrupt handlers - * Output: NA - * Return: address of handler + * ops - address of vector of interrupt handlers + * pgm_data- application data passed to interrupt handlers + * Output: NA + * Return: address of handler * (0) - Error occurred, registration not completed. - * NOTE: Exact cause of failure will be recorded in syslog. + * NOTE: Exact cause of failure will be recorded in syslog. */ iucv_handle_t iucv_register_program (uchar pgmname[16], uchar userid[8], @@ -319,13 +319,13 @@ iucv_interrupt_ops_t * ops, void *pgm_data); -/* - * Name: iucv_unregister_program - * Purpose: Unregister application with IUCV - * Input: address of handler - * Output: NA - * Return: (0) - Normal return - * (-EINVAL) - Internal error, wild pointer +/* + * Name: iucv_unregister_program + * Purpose: Unregister application with IUCV + * Input: address of handler + * Output: NA + * Return: (0) - Normal return + * (-EINVAL) - Internal error, wild pointer */ int iucv_unregister_program (iucv_handle_t handle); @@ -333,7 +333,7 @@ * Name: iucv_accept * Purpose: This function is issued after the user receives a Connection Pending external * interrupt and now wishes to complete the IUCV communication path. - * Input: pathid - u16 , Path identification number + * Input: pathid - u16 , Path identification number * msglim_reqstd - u16, The number of outstanding messages requested. * user_data - uchar[16], Data specified by the iucv_connect function. * flags1 - int, Contains options for this path. @@ -358,34 +358,34 @@ void *pgm_data, int *flags1_out, u16 * msglim); /* - * Name: iucv_connect + * Name: iucv_connect * Purpose: This function establishes an IUCV path. Although the connect may complete - * successfully, you are not able to use the path until you receive an IUCV - * Connection Complete external interrupt. - * Input: pathid - u16 *, Path identification number - * msglim_reqstd - u16, Number of outstanding messages requested - * user_data - uchar[16], 16-byte user data + * successfully, you are not able to use the path until you receive an IUCV + * Connection Complete external interrupt. + * Input: pathid - u16 *, Path identification number + * msglim_reqstd - u16, Number of outstanding messages requested + * user_data - uchar[16], 16-byte user data * userid - uchar[8], User identification - * system_name - uchar[8], 8-byte identifying the system name + * system_name - uchar[8], 8-byte identifying the system name * flags1 - int, Contains options for this path. * -IPPRTY - 0x20, Specifies if you want to send priority message. * -IPRMDATA - 0x80, Specifies whether your program can handle a message * in the parameter list. - * -IPQUSCE - 0x40, Specifies whether you want to quiesce the path being + * -IPQUSCE - 0x40, Specifies whether you want to quiesce the path being * established. - * -IPLOCAL - 0X01, Allows an application to force the partner to be on + * -IPLOCAL - 0X01, Allows an application to force the partner to be on * the local system. If local is specified then target class cannot be - * specified. + * specified. * flags1_out - int * Contains information about the path * - IPPRTY - 0x20, Indicates you may send priority messages. * msglim - * u16, Number of outstanding messages - * handle - iucv_handle_t, Address of handler - * pgm_data - void *, Application data passed to interrupt handlers + * handle - iucv_handle_t, Address of handler + * pgm_data - void *, Application data passed to interrupt handlers * Output: return code from CP IUCV call * rc - return code from iucv_declare_buffer - * -EINVAL - Invalid handle passed by application - * -EINVAL - Pathid address is NULL - * add_pathid_result - Return code from internal function add_pathid + * -EINVAL - Invalid handle passed by application + * -EINVAL - Pathid address is NULL + * add_pathid_result - Return code from internal function add_pathid */ int iucv_connect (u16 * pathid, @@ -397,16 +397,16 @@ int *flags1_out, u16 * msglim, iucv_handle_t handle, void *pgm_data); -/* - * Name: iucv_purge - * Purpose: This function cancels a message that you have sent. - * Input: pathid - Path identification number. +/* + * Name: iucv_purge + * Purpose: This function cancels a message that you have sent. + * Input: pathid - Path identification number. * msgid - Specifies the message ID of the message to be purged. - * srccls - Specifies the source message class. - * Output: audit - Contains information about asynchronous error - * that may have affected the normal completion - * of this message. - * Return: Return code from CP IUCV call. + * srccls - Specifies the source message class. + * Output: audit - Contains information about asynchronous error + * that may have affected the normal completion + * of this message. + * Return: Return code from CP IUCV call. */ int iucv_purge (u16 pathid, u32 msgid, u32 srccls, __u32 *audit); /* @@ -426,38 +426,38 @@ */ ulong iucv_query_bufsize (void); -/* - * Name: iucv_quiesce - * Purpose: This function temporarily suspends incoming messages on an - * IUCV path. You can later reactivate the path by invoking - * the iucv_resume function. - * Input: pathid - Path identification number - * user_data - 16-bytes of user data - * Output: NA - * Return: Return code from CP IUCV call. +/* + * Name: iucv_quiesce + * Purpose: This function temporarily suspends incoming messages on an + * IUCV path. You can later reactivate the path by invoking + * the iucv_resume function. + * Input: pathid - Path identification number + * user_data - 16-bytes of user data + * Output: NA + * Return: Return code from CP IUCV call. */ int iucv_quiesce (u16 pathid, uchar user_data[16]); -/* - * Name: iucv_receive - * Purpose: This function receives messages that are being sent to you +/* + * Name: iucv_receive + * Purpose: This function receives messages that are being sent to you * over established paths. Data will be returned in buffer for length of * buflen. - * Input: - * pathid - Path identification number. - * buffer - Address of buffer to receive. - * buflen - Length of buffer to receive. - * msgid - Specifies the message ID. - * trgcls - Specifies target class. - * Output: + * Input: + * pathid - Path identification number. + * buffer - Address of buffer to receive. + * buflen - Length of buffer to receive. + * msgid - Specifies the message ID. + * trgcls - Specifies target class. + * Output: * flags1_out: int *, Contains information about this path. * IPNORPY - 0x10 Specifies this is a one-way message and no reply is - * expected. - * IPPRTY - 0x20 Specifies if you want to send priority message. + * expected. + * IPPRTY - 0x20 Specifies if you want to send priority message. * IPRMDATA - 0x80 specifies the data is contained in the parameter list * residual_buffer - address of buffer updated by the number * of bytes you have received. - * residual_length - + * residual_length - * Contains one of the following values, if the receive buffer is: * The same length as the message, this field is zero. * Longer than the message, this field contains the number of @@ -466,8 +466,8 @@ * count (that is, the number of bytes remaining in the * message that does not fit into the buffer. In this * case b2f0_result = 5. - * Return: Return code from CP IUCV call. - * (-EINVAL) - buffer address is pointing to NULL + * Return: Return code from CP IUCV call. + * (-EINVAL) - buffer address is pointing to NULL */ int iucv_receive (u16 pathid, u32 msgid, @@ -477,16 +477,16 @@ int *flags1_out, ulong * residual_buffer, ulong * residual_length); - /* - * Name: iucv_receive_array - * Purpose: This function receives messages that are being sent to you + /* + * Name: iucv_receive_array + * Purpose: This function receives messages that are being sent to you * over established paths. Data will be returned in first buffer for * length of first buffer. - * Input: pathid - Path identification number. + * Input: pathid - Path identification number. * msgid - specifies the message ID. * trgcls - Specifies target class. - * buffer - Address of array of buffers. - * buflen - Total length of buffers. + * buffer - Address of array of buffers. + * buflen - Total length of buffers. * Output: * flags1_out: int *, Contains information about this path. * IPNORPY - 0x10 Specifies this is a one-way message and no reply is @@ -504,8 +504,8 @@ * count (that is, the number of bytes remaining in the * message that does not fit into the buffer. In this * case b2f0_result = 5. - * Return: Return code from CP IUCV call. - * (-EINVAL) - Buffer address is NULL. + * Return: Return code from CP IUCV call. + * (-EINVAL) - Buffer address is NULL. */ int iucv_receive_array (u16 pathid, u32 msgid, @@ -515,44 +515,44 @@ int *flags1_out, ulong * residual_buffer, ulong * residual_length); -/* - * Name: iucv_reject - * Purpose: The reject function refuses a specified message. Between the - * time you are notified of a message and the time that you - * complete the message, the message may be rejected. - * Input: pathid - Path identification number. - * msgid - Specifies the message ID. - * trgcls - Specifies target class. - * Output: NA - * Return: Return code from CP IUCV call. +/* + * Name: iucv_reject + * Purpose: The reject function refuses a specified message. Between the + * time you are notified of a message and the time that you + * complete the message, the message may be rejected. + * Input: pathid - Path identification number. + * msgid - Specifies the message ID. + * trgcls - Specifies target class. + * Output: NA + * Return: Return code from CP IUCV call. */ int iucv_reject (u16 pathid, u32 msgid, u32 trgcls); -/* - * Name: iucv_reply - * Purpose: This function responds to the two-way messages that you - * receive. You must identify completely the message to - * which you wish to reply. ie, pathid, msgid, and trgcls. - * Input: pathid - Path identification number. - * msgid - Specifies the message ID. - * trgcls - Specifies target class. +/* + * Name: iucv_reply + * Purpose: This function responds to the two-way messages that you + * receive. You must identify completely the message to + * which you wish to reply. ie, pathid, msgid, and trgcls. + * Input: pathid - Path identification number. + * msgid - Specifies the message ID. + * trgcls - Specifies target class. * flags1 - Option for path. - * IPPRTY- 0x20, Specifies if you want to send priority message. - * buffer - Address of reply buffer. - * buflen - Length of reply buffer. - * Output: residual_buffer - Address of buffer updated by the number - * of bytes you have moved. + * IPPRTY- 0x20, Specifies if you want to send priority message. + * buffer - Address of reply buffer. + * buflen - Length of reply buffer. + * Output: residual_buffer - Address of buffer updated by the number + * of bytes you have moved. * residual_length - Contains one of the following values: * If the answer buffer is the same length as the reply, this field * contains zero. * If the answer buffer is longer than the reply, this field contains - * the number of bytes remaining in the buffer. + * the number of bytes remaining in the buffer. * If the answer buffer is shorter than the reply, this field contains * a residual count (that is, the number of bytes remianing in the * reply that does not fit into the buffer. In this * case b2f0_result = 5. - * Return: Return code from CP IUCV call. - * (-EINVAL) - Buffer address is NULL. + * Return: Return code from CP IUCV call. + * (-EINVAL) - Buffer address is NULL. */ int iucv_reply (u16 pathid, u32 msgid, @@ -561,20 +561,20 @@ void *buffer, ulong buflen, ulong * residual_buffer, ulong * residual_length); -/* - * Name: iucv_reply_array - * Purpose: This function responds to the two-way messages that you - * receive. You must identify completely the message to - * which you wish to reply. ie, pathid, msgid, and trgcls. - * The array identifies a list of addresses and lengths of - * discontiguous buffers that contains the reply data. - * Input: pathid - Path identification number - * msgid - Specifies the message ID. - * trgcls - Specifies target class. +/* + * Name: iucv_reply_array + * Purpose: This function responds to the two-way messages that you + * receive. You must identify completely the message to + * which you wish to reply. ie, pathid, msgid, and trgcls. + * The array identifies a list of addresses and lengths of + * discontiguous buffers that contains the reply data. + * Input: pathid - Path identification number + * msgid - Specifies the message ID. + * trgcls - Specifies target class. * flags1 - Option for path. * IPPRTY- 0x20, Specifies if you want to send priority message. - * buffer - Address of array of reply buffers. - * buflen - Total length of reply buffers. + * buffer - Address of array of reply buffers. + * buflen - Total length of reply buffers. * Output: residual_buffer - Address of buffer which IUCV is currently working on. * residual_length - Contains one of the following values: * If the answer buffer is the same length as the reply, this field @@ -585,8 +585,8 @@ * a residual count (that is, the number of bytes remianing in the * reply that does not fit into the buffer. In this * case b2f0_result = 5. - * Return: Return code from CP IUCV call. - * (-EINVAL) - Buffer address is NULL. + * Return: Return code from CP IUCV call. + * (-EINVAL) - Buffer address is NULL. */ int iucv_reply_array (u16 pathid, u32 msgid, @@ -596,77 +596,77 @@ ulong buflen, ulong * residual_address, ulong * residual_length); -/* - * Name: iucv_reply_prmmsg - * Purpose: This function responds to the two-way messages that you - * receive. You must identify completely the message to - * which you wish to reply. ie, pathid, msgid, and trgcls. - * Prmmsg signifies the data is moved into the - * parameter list. - * Input: pathid - Path identification number. - * msgid - Specifies the message ID. - * trgcls - Specifies target class. +/* + * Name: iucv_reply_prmmsg + * Purpose: This function responds to the two-way messages that you + * receive. You must identify completely the message to + * which you wish to reply. ie, pathid, msgid, and trgcls. + * Prmmsg signifies the data is moved into the + * parameter list. + * Input: pathid - Path identification number. + * msgid - Specifies the message ID. + * trgcls - Specifies target class. * flags1 - Option for path. * IPPRTY- 0x20 Specifies if you want to send priority message. - * prmmsg - 8-bytes of data to be placed into the parameter. - * list. - * Output: NA - * Return: Return code from CP IUCV call. + * prmmsg - 8-bytes of data to be placed into the parameter. + * list. + * Output: NA + * Return: Return code from CP IUCV call. */ int iucv_reply_prmmsg (u16 pathid, u32 msgid, u32 trgcls, int flags1, uchar prmmsg[8]); -/* - * Name: iucv_resume - * Purpose: This function restores communications over a quiesced path - * Input: pathid - Path identification number. - * user_data - 16-bytes of user data. - * Output: NA - * Return: Return code from CP IUCV call. +/* + * Name: iucv_resume + * Purpose: This function restores communications over a quiesced path + * Input: pathid - Path identification number. + * user_data - 16-bytes of user data. + * Output: NA + * Return: Return code from CP IUCV call. */ int iucv_resume (u16 pathid, uchar user_data[16]); -/* - * Name: iucv_send - * Purpose: This function transmits data to another application. - * Data to be transmitted is in a buffer and this is a - * one-way message and the receiver will not reply to the - * message. - * Input: pathid - Path identification number. - * trgcls - Specifies target class. - * srccls - Specifies the source message class. - * msgtag - Specifies a tag to be associated with the message. +/* + * Name: iucv_send + * Purpose: This function transmits data to another application. + * Data to be transmitted is in a buffer and this is a + * one-way message and the receiver will not reply to the + * message. + * Input: pathid - Path identification number. + * trgcls - Specifies target class. + * srccls - Specifies the source message class. + * msgtag - Specifies a tag to be associated with the message. * flags1 - Option for path. * IPPRTY- 0x20 Specifies if you want to send priority message. - * buffer - Address of send buffer. - * buflen - Length of send buffer. - * Output: msgid - Specifies the message ID. - * Return: Return code from CP IUCV call. - * (-EINVAL) - Buffer address is NULL. + * buffer - Address of send buffer. + * buflen - Length of send buffer. + * Output: msgid - Specifies the message ID. + * Return: Return code from CP IUCV call. + * (-EINVAL) - Buffer address is NULL. */ int iucv_send (u16 pathid, u32 * msgid, u32 trgcls, u32 srccls, u32 msgtag, int flags1, void *buffer, ulong buflen); -/* - * Name: iucv_send_array - * Purpose: This function transmits data to another application. - * The contents of buffer is the address of the array of - * addresses and lengths of discontiguous buffers that hold - * the message text. This is a one-way message and the - * receiver will not reply to the message. - * Input: pathid - Path identification number. - * trgcls - Specifies target class. - * srccls - Specifies the source message class. +/* + * Name: iucv_send_array + * Purpose: This function transmits data to another application. + * The contents of buffer is the address of the array of + * addresses and lengths of discontiguous buffers that hold + * the message text. This is a one-way message and the + * receiver will not reply to the message. + * Input: pathid - Path identification number. + * trgcls - Specifies target class. + * srccls - Specifies the source message class. * msgtag - Specifies a tag to be associated witht the message. * flags1 - Option for path. - * IPPRTY- specifies if you want to send priority message. - * buffer - Address of array of send buffers. - * buflen - Total length of send buffers. - * Output: msgid - Specifies the message ID. - * Return: Return code from CP IUCV call. - * (-EINVAL) - Buffer address is NULL. + * IPPRTY- specifies if you want to send priority message. + * buffer - Address of array of send buffers. + * buflen - Total length of send buffers. + * Output: msgid - Specifies the message ID. + * Return: Return code from CP IUCV call. + * (-EINVAL) - Buffer address is NULL. */ int iucv_send_array (u16 pathid, u32 * msgid, @@ -675,48 +675,48 @@ u32 msgtag, int flags1, iucv_array_t * buffer, ulong buflen); -/* - * Name: iucv_send_prmmsg - * Purpose: This function transmits data to another application. - * Prmmsg specifies that the 8-bytes of data are to be moved - * into the parameter list. This is a one-way message and the - * receiver will not reply to the message. - * Input: pathid - Path identification number. - * trgcls - Specifies target class. - * srccls - Specifies the source message class. - * msgtag - Specifies a tag to be associated with the message. +/* + * Name: iucv_send_prmmsg + * Purpose: This function transmits data to another application. + * Prmmsg specifies that the 8-bytes of data are to be moved + * into the parameter list. This is a one-way message and the + * receiver will not reply to the message. + * Input: pathid - Path identification number. + * trgcls - Specifies target class. + * srccls - Specifies the source message class. + * msgtag - Specifies a tag to be associated with the message. * flags1 - Option for path. * IPPRTY- 0x20 specifies if you want to send priority message. - * prmmsg - 8-bytes of data to be placed into parameter list. - * Output: msgid - Specifies the message ID. - * Return: Return code from CP IUCV call. + * prmmsg - 8-bytes of data to be placed into parameter list. + * Output: msgid - Specifies the message ID. + * Return: Return code from CP IUCV call. */ int iucv_send_prmmsg (u16 pathid, u32 * msgid, u32 trgcls, u32 srccls, u32 msgtag, int flags1, uchar prmmsg[8]); -/* - * Name: iucv_send2way - * Purpose: This function transmits data to another application. - * Data to be transmitted is in a buffer. The receiver - * of the send is expected to reply to the message and - * a buffer is provided into which IUCV moves the reply - * to this message. - * Input: pathid - Path identification number. - * trgcls - Specifies target class. - * srccls - Specifies the source message class. - * msgtag - Specifies a tag associated with the message. +/* + * Name: iucv_send2way + * Purpose: This function transmits data to another application. + * Data to be transmitted is in a buffer. The receiver + * of the send is expected to reply to the message and + * a buffer is provided into which IUCV moves the reply + * to this message. + * Input: pathid - Path identification number. + * trgcls - Specifies target class. + * srccls - Specifies the source message class. + * msgtag - Specifies a tag associated with the message. * flags1 - Option for path. * IPPRTY- 0x20 Specifies if you want to send priority message. - * buffer - Address of send buffer. - * buflen - Length of send buffer. - * ansbuf - Address of buffer into which IUCV moves the reply of - * this message. - * anslen - Address of length of buffer. - * Output: msgid - Specifies the message ID. - * Return: Return code from CP IUCV call. - * (-EINVAL) - Buffer or ansbuf address is NULL. + * buffer - Address of send buffer. + * buflen - Length of send buffer. + * ansbuf - Address of buffer into which IUCV moves the reply of + * this message. + * anslen - Address of length of buffer. + * Output: msgid - Specifies the message ID. + * Return: Return code from CP IUCV call. + * (-EINVAL) - Buffer or ansbuf address is NULL. */ int iucv_send2way (u16 pathid, u32 * msgid, @@ -726,28 +726,28 @@ int flags1, void *buffer, ulong buflen, void *ansbuf, ulong anslen); -/* - * Name: iucv_send2way_array - * Purpose: This function transmits data to another application. - * The contents of buffer is the address of the array of - * addresses and lengths of discontiguous buffers that hold - * the message text. The receiver of the send is expected to - * reply to the message and a buffer is provided into which - * IUCV moves the reply to this message. - * Input: pathid - Path identification number. - * trgcls - Specifies target class. - * srccls - Specifies the source message class. - * msgtag - Specifies a tag to be associated with the message. +/* + * Name: iucv_send2way_array + * Purpose: This function transmits data to another application. + * The contents of buffer is the address of the array of + * addresses and lengths of discontiguous buffers that hold + * the message text. The receiver of the send is expected to + * reply to the message and a buffer is provided into which + * IUCV moves the reply to this message. + * Input: pathid - Path identification number. + * trgcls - Specifies target class. + * srccls - Specifies the source message class. + * msgtag - Specifies a tag to be associated with the message. * flags1 - Option for path. * IPPRTY- 0x20 Specifies if you want to send priority message. - * buffer - Sddress of array of send buffers. - * buflen - Total length of send buffers. - * ansbuf - Address of array of buffer into which IUCV moves the reply - * of this message. - * anslen - Address of length reply buffers. - * Output: msgid - Specifies the message ID. - * Return: Return code from CP IUCV call. - * (-EINVAL) - Buffer address is NULL. + * buffer - Sddress of array of send buffers. + * buflen - Total length of send buffers. + * ansbuf - Address of array of buffer into which IUCV moves the reply + * of this message. + * anslen - Address of length reply buffers. + * Output: msgid - Specifies the message ID. + * Return: Return code from CP IUCV call. + * (-EINVAL) - Buffer address is NULL. */ int iucv_send2way_array (u16 pathid, u32 * msgid, @@ -758,27 +758,27 @@ iucv_array_t * buffer, ulong buflen, iucv_array_t * ansbuf, ulong anslen); -/* - * Name: iucv_send2way_prmmsg - * Purpose: This function transmits data to another application. - * Prmmsg specifies that the 8-bytes of data are to be moved - * into the parameter list. This is a two-way message and the - * receiver of the message is expected to reply. A buffer - * is provided into which IUCV moves the reply to this - * message. - * Input: pathid - Rath identification number. - * trgcls - Specifies target class. - * srccls - Specifies the source message class. - * msgtag - Specifies a tag to be associated with the message. +/* + * Name: iucv_send2way_prmmsg + * Purpose: This function transmits data to another application. + * Prmmsg specifies that the 8-bytes of data are to be moved + * into the parameter list. This is a two-way message and the + * receiver of the message is expected to reply. A buffer + * is provided into which IUCV moves the reply to this + * message. + * Input: pathid - Rath identification number. + * trgcls - Specifies target class. + * srccls - Specifies the source message class. + * msgtag - Specifies a tag to be associated with the message. * flags1 - Option for path. * IPPRTY- 0x20 Specifies if you want to send priority message. - * prmmsg - 8-bytes of data to be placed in parameter list. - * ansbuf - Address of buffer into which IUCV moves the reply of + * prmmsg - 8-bytes of data to be placed in parameter list. + * ansbuf - Address of buffer into which IUCV moves the reply of * this message. - * anslen - Address of length of buffer. - * Output: msgid - Specifies the message ID. - * Return: Return code from CP IUCV call. - * (-EINVAL) - Buffer address is NULL. + * anslen - Address of length of buffer. + * Output: msgid - Specifies the message ID. + * Return: Return code from CP IUCV call. + * (-EINVAL) - Buffer address is NULL. */ int iucv_send2way_prmmsg (u16 pathid, u32 * msgid, @@ -788,29 +788,29 @@ ulong flags1, uchar prmmsg[8], void *ansbuf, ulong anslen); -/* - * Name: iucv_send2way_prmmsg_array - * Purpose: This function transmits data to another application. - * Prmmsg specifies that the 8-bytes of data are to be moved - * into the parameter list. This is a two-way message and the - * receiver of the message is expected to reply. A buffer - * is provided into which IUCV moves the reply to this - * message. The contents of ansbuf is the address of the - * array of addresses and lengths of discontiguous buffers - * that contain the reply. - * Input: pathid - Path identification number. - * trgcls - Specifies target class. - * srccls - Specifies the source message class. - * msgtag - Specifies a tag to be associated with the message. +/* + * Name: iucv_send2way_prmmsg_array + * Purpose: This function transmits data to another application. + * Prmmsg specifies that the 8-bytes of data are to be moved + * into the parameter list. This is a two-way message and the + * receiver of the message is expected to reply. A buffer + * is provided into which IUCV moves the reply to this + * message. The contents of ansbuf is the address of the + * array of addresses and lengths of discontiguous buffers + * that contain the reply. + * Input: pathid - Path identification number. + * trgcls - Specifies target class. + * srccls - Specifies the source message class. + * msgtag - Specifies a tag to be associated with the message. * flags1 - Option for path. * IPPRTY- 0x20 specifies if you want to send priority message. - * prmmsg - 8-bytes of data to be placed into the parameter list. + * prmmsg - 8-bytes of data to be placed into the parameter list. * ansbuf - Address of array of buffer into which IUCV moves the reply - * of this message. - * anslen - Address of length of reply buffers. - * Output: msgid - Specifies the message ID. - * Return: Return code from CP IUCV call. - * (-EINVAL) - Ansbuf address is NULL. + * of this message. + * anslen - Address of length of reply buffers. + * Output: msgid - Specifies the message ID. + * Return: Return code from CP IUCV call. + * (-EINVAL) - Ansbuf address is NULL. */ int iucv_send2way_prmmsg_array (u16 pathid, u32 * msgid, @@ -821,29 +821,29 @@ uchar prmmsg[8], iucv_array_t * ansbuf, ulong anslen); -/* - * Name: iucv_setmask - * Purpose: This function enables or disables the following IUCV - * external interruptions: Nonpriority and priority message - * interrupts, nonpriority and priority reply interrupts. +/* + * Name: iucv_setmask + * Purpose: This function enables or disables the following IUCV + * external interruptions: Nonpriority and priority message + * interrupts, nonpriority and priority reply interrupts. * Input: SetMaskFlag - options for interrupts - * 0x80 - Nonpriority_MessagePendingInterruptsFlag - * 0x40 - Priority_MessagePendingInterruptsFlag - * 0x20 - Nonpriority_MessageCompletionInterruptsFlag - * 0x10 - Priority_MessageCompletionInterruptsFlag + * 0x80 - Nonpriority_MessagePendingInterruptsFlag + * 0x40 - Priority_MessagePendingInterruptsFlag + * 0x20 - Nonpriority_MessageCompletionInterruptsFlag + * 0x10 - Priority_MessageCompletionInterruptsFlag * 0x08 - IUCVControlInterruptsFlag - * Output: NA - * Return: Return code from CP IUCV call. + * Output: NA + * Return: Return code from CP IUCV call. */ int iucv_setmask (int SetMaskFlag); -/* - * Name: iucv_sever - * Purpose: This function terminates an IUCV path. - * Input: pathid - Path identification number. - * user_data - 16-bytes of user data. - * Output: NA - * Return: Return code from CP IUCV call. - * (-EINVAL) - Interal error, wild pointer. +/* + * Name: iucv_sever + * Purpose: This function terminates an IUCV path. + * Input: pathid - Path identification number. + * user_data - 16-bytes of user data. + * Output: NA + * Return: Return code from CP IUCV call. + * (-EINVAL) - Interal error, wild pointer. */ int iucv_sever (u16 pathid, uchar user_data[16]); diff -urN linux-2.6.17-rc5/drivers/s390/net/lcs.c linux-2.6.17-rc6/drivers/s390/net/lcs.c --- linux-2.6.17-rc5/drivers/s390/net/lcs.c 2006-06-06 01:27:31.327719931 +0000 +++ linux-2.6.17-rc6/drivers/s390/net/lcs.c 2006-06-06 01:27:36.204244622 +0000 @@ -68,6 +68,7 @@ static void lcs_start_kernel_thread(struct lcs_card *card); static void lcs_get_frames_cb(struct lcs_channel *, struct lcs_buffer *); static int lcs_send_delipm(struct lcs_card *, struct lcs_ipm_list *); +static int lcs_recovery(void *ptr); /** * Debug Facility Stuff @@ -429,12 +430,6 @@ card->tx_buffer = NULL; card->tx_emitted = 0; - /* Initialize kernel thread task used for LGW commands. */ - INIT_WORK(&card->kernel_thread_starter, - (void *)lcs_start_kernel_thread,card); - card->thread_start_mask = 0; - card->thread_allowed_mask = 0; - card->thread_running_mask = 0; init_waitqueue_head(&card->wait_q); spin_lock_init(&card->lock); spin_lock_init(&card->ipm_lock); @@ -675,8 +670,9 @@ int index, rc; LCS_DBF_TEXT(5, trace, "rdybuff"); - BUG_ON(buffer->state != BUF_STATE_LOCKED && - buffer->state != BUF_STATE_PROCESSED); + if (buffer->state != BUF_STATE_LOCKED && + buffer->state != BUF_STATE_PROCESSED) + BUG(); spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); buffer->state = BUF_STATE_READY; index = buffer - channel->iob; @@ -700,7 +696,8 @@ int index, prev, next; LCS_DBF_TEXT(5, trace, "prcsbuff"); - BUG_ON(buffer->state != BUF_STATE_READY); + if (buffer->state != BUF_STATE_READY) + BUG(); buffer->state = BUF_STATE_PROCESSED; index = buffer - channel->iob; prev = (index - 1) & (LCS_NUM_BUFFS - 1); @@ -732,8 +729,9 @@ unsigned long flags; LCS_DBF_TEXT(5, trace, "relbuff"); - BUG_ON(buffer->state != BUF_STATE_LOCKED && - buffer->state != BUF_STATE_PROCESSED); + if (buffer->state != BUF_STATE_LOCKED && + buffer->state != BUF_STATE_PROCESSED) + BUG(); spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); buffer->state = BUF_STATE_EMPTY; spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); @@ -1147,8 +1145,6 @@ list_add_tail(&ipm->list, &card->ipm_list); } spin_unlock_irqrestore(&card->ipm_lock, flags); - if (card->state == DEV_STATE_UP) - netif_wake_queue(card->dev); } /** @@ -1231,17 +1227,17 @@ if (ipm != NULL) continue; /* Address already in list. */ ipm = (struct lcs_ipm_list *) - kmalloc(sizeof(struct lcs_ipm_list), GFP_ATOMIC); + kzalloc(sizeof(struct lcs_ipm_list), GFP_ATOMIC); if (ipm == NULL) { PRINT_INFO("Not enough memory to add " "new multicast entry!\n"); break; } - memset(ipm, 0, sizeof(struct lcs_ipm_list)); memcpy(&ipm->ipm.mac_addr, buf, LCS_MAC_LENGTH); ipm->ipm.ip_addr = im4->multiaddr; ipm->ipm_state = LCS_IPM_STATE_SET_REQUIRED; spin_lock_irqsave(&card->ipm_lock, flags); + LCS_DBF_HEX(2,trace,&ipm->ipm.ip_addr,4); list_add(&ipm->list, &card->ipm_list); spin_unlock_irqrestore(&card->ipm_lock, flags); } @@ -1269,7 +1265,15 @@ read_unlock(&in4_dev->mc_list_lock); in_dev_put(in4_dev); + netif_carrier_off(card->dev); + netif_tx_disable(card->dev); + wait_event(card->write.wait_q, + (card->write.state != CH_STATE_RUNNING)); lcs_fix_multicast_list(card); + if (card->state == DEV_STATE_UP) { + netif_carrier_on(card->dev); + netif_wake_queue(card->dev); + } out: lcs_clear_thread_running_bit(card, LCS_SET_MC_THREAD); return 0; @@ -1286,7 +1290,7 @@ LCS_DBF_TEXT(4, trace, "setmulti"); card = (struct lcs_card *) dev->priv; - if (!lcs_set_thread_start_bit(card, LCS_SET_MC_THREAD)) + if (!lcs_set_thread_start_bit(card, LCS_SET_MC_THREAD)) schedule_work(&card->kernel_thread_starter); } @@ -1318,6 +1322,53 @@ return PTR_ERR(irb); } +static int +lcs_get_problem(struct ccw_device *cdev, struct irb *irb) +{ + int dstat, cstat; + char *sense; + + sense = (char *) irb->ecw; + cstat = irb->scsw.cstat; + dstat = irb->scsw.dstat; + + if (cstat & (SCHN_STAT_CHN_CTRL_CHK | SCHN_STAT_INTF_CTRL_CHK | + SCHN_STAT_CHN_DATA_CHK | SCHN_STAT_CHAIN_CHECK | + SCHN_STAT_PROT_CHECK | SCHN_STAT_PROG_CHECK)) { + LCS_DBF_TEXT(2, trace, "CGENCHK"); + return 1; + } + if (dstat & DEV_STAT_UNIT_CHECK) { + if (sense[LCS_SENSE_BYTE_1] & + LCS_SENSE_RESETTING_EVENT) { + LCS_DBF_TEXT(2, trace, "REVIND"); + return 1; + } + if (sense[LCS_SENSE_BYTE_0] & + LCS_SENSE_CMD_REJECT) { + LCS_DBF_TEXT(2, trace, "CMDREJ"); + return 0; + } + if ((!sense[LCS_SENSE_BYTE_0]) && + (!sense[LCS_SENSE_BYTE_1]) && + (!sense[LCS_SENSE_BYTE_2]) && + (!sense[LCS_SENSE_BYTE_3])) { + LCS_DBF_TEXT(2, trace, "ZEROSEN"); + return 0; + } + LCS_DBF_TEXT(2, trace, "DGENCHK"); + return 1; + } + return 0; +} + +void +lcs_schedule_recovery(struct lcs_card *card) +{ + LCS_DBF_TEXT(2, trace, "startrec"); + if (!lcs_set_thread_start_bit(card, LCS_RECOVERY_THREAD)) + schedule_work(&card->kernel_thread_starter); +} /** * IRQ Handler for LCS channels @@ -1327,7 +1378,8 @@ { struct lcs_card *card; struct lcs_channel *channel; - int index; + int rc, index; + int cstat, dstat; if (lcs_check_irb_error(cdev, irb)) return; @@ -1338,14 +1390,27 @@ else channel = &card->write; + cstat = irb->scsw.cstat; + dstat = irb->scsw.dstat; LCS_DBF_TEXT_(5, trace, "Rint%s",cdev->dev.bus_id); LCS_DBF_TEXT_(5, trace, "%4x%4x",irb->scsw.cstat, irb->scsw.dstat); LCS_DBF_TEXT_(5, trace, "%4x%4x",irb->scsw.fctl, irb->scsw.actl); + /* Check for channel and device errors presented */ + rc = lcs_get_problem(cdev, irb); + if (rc || (dstat & DEV_STAT_UNIT_EXCEP)) { + PRINT_WARN("check on device %s, dstat=0x%X, cstat=0x%X \n", + cdev->dev.bus_id, dstat, cstat); + if (rc) { + lcs_schedule_recovery(card); + wake_up(&card->wait_q); + return; + } + } /* How far in the ccw chain have we processed? */ if ((channel->state != CH_STATE_INIT) && (irb->scsw.fctl & SCSW_FCTL_START_FUNC)) { - index = (struct ccw1 *) __va((addr_t) irb->scsw.cpa) + index = (struct ccw1 *) __va((addr_t) irb->scsw.cpa) - channel->ccws; if ((irb->scsw.actl & SCSW_ACTL_SUSPENDED) || (irb->scsw.cstat & SCHN_STAT_PCI)) @@ -1367,7 +1432,6 @@ else if (irb->scsw.actl & SCSW_ACTL_SUSPENDED) /* CCW execution stopped on a suspend bit. */ channel->state = CH_STATE_SUSPENDED; - if (irb->scsw.fctl & SCSW_FCTL_HALT_FUNC) { if (irb->scsw.cc != 0) { ccw_device_halt(channel->ccwdev, (addr_t) channel); @@ -1376,7 +1440,6 @@ /* The channel has been stopped by halt_IO. */ channel->state = CH_STATE_HALTED; } - if (irb->scsw.fctl & SCSW_FCTL_CLEAR_FUNC) { channel->state = CH_STATE_CLEARED; } @@ -1452,7 +1515,7 @@ lcs_release_buffer(channel, buffer); card = (struct lcs_card *) ((char *) channel - offsetof(struct lcs_card, write)); - if (netif_queue_stopped(card->dev)) + if (netif_queue_stopped(card->dev) && netif_carrier_ok(card->dev)) netif_wake_queue(card->dev); spin_lock(&card->lock); card->tx_emitted--; @@ -1488,6 +1551,10 @@ card->stats.tx_carrier_errors++; return 0; } + if (skb->protocol == htons(ETH_P_IPV6)) { + dev_kfree_skb(skb); + return 0; + } netif_stop_queue(card->dev); spin_lock(&card->lock); if (card->tx_buffer != NULL && @@ -1633,30 +1700,6 @@ } /** - * reset card - */ -static int -lcs_resetcard(struct lcs_card *card) -{ - int retries; - - LCS_DBF_TEXT(2, trace, "rescard"); - for (retries = 0; retries < 10; retries++) { - if (lcs_detect(card) == 0) { - netif_wake_queue(card->dev); - card->state = DEV_STATE_UP; - PRINT_INFO("LCS device %s successfully restarted!\n", - card->dev->name); - return 0; - } - msleep(3000); - } - PRINT_ERR("Error in Reseting LCS card!\n"); - return -EIO; -} - - -/** * LCS Stop card */ static int @@ -1680,126 +1723,18 @@ } /** - * LGW initiated commands - */ -static int -lcs_lgw_startlan_thread(void *data) -{ - struct lcs_card *card; - - card = (struct lcs_card *) data; - daemonize("lgwstpln"); - - if (!lcs_do_run_thread(card, LCS_STARTLAN_THREAD)) - return 0; - LCS_DBF_TEXT(4, trace, "lgwstpln"); - if (card->dev) - netif_stop_queue(card->dev); - if (lcs_startlan(card) == 0) { - netif_wake_queue(card->dev); - card->state = DEV_STATE_UP; - PRINT_INFO("LCS Startlan for device %s succeeded!\n", - card->dev->name); - - } else - PRINT_ERR("LCS Startlan for device %s failed!\n", - card->dev->name); - lcs_clear_thread_running_bit(card, LCS_STARTLAN_THREAD); - return 0; -} - -/** - * Send startup command initiated by Lan Gateway - */ -static int -lcs_lgw_startup_thread(void *data) -{ - int rc; - - struct lcs_card *card; - - card = (struct lcs_card *) data; - daemonize("lgwstaln"); - - if (!lcs_do_run_thread(card, LCS_STARTUP_THREAD)) - return 0; - LCS_DBF_TEXT(4, trace, "lgwstaln"); - if (card->dev) - netif_stop_queue(card->dev); - rc = lcs_send_startup(card, LCS_INITIATOR_LGW); - if (rc != 0) { - PRINT_ERR("Startup for LCS device %s initiated " \ - "by LGW failed!\nReseting card ...\n", - card->dev->name); - /* do a card reset */ - rc = lcs_resetcard(card); - if (rc == 0) - goto Done; - } - rc = lcs_startlan(card); - if (rc == 0) { - netif_wake_queue(card->dev); - card->state = DEV_STATE_UP; - } -Done: - if (rc == 0) - PRINT_INFO("LCS Startup for device %s succeeded!\n", - card->dev->name); - else - PRINT_ERR("LCS Startup for device %s failed!\n", - card->dev->name); - lcs_clear_thread_running_bit(card, LCS_STARTUP_THREAD); - return 0; -} - - -/** - * send stoplan command initiated by Lan Gateway - */ -static int -lcs_lgw_stoplan_thread(void *data) -{ - struct lcs_card *card; - int rc; - - card = (struct lcs_card *) data; - daemonize("lgwstop"); - - if (!lcs_do_run_thread(card, LCS_STOPLAN_THREAD)) - return 0; - LCS_DBF_TEXT(4, trace, "lgwstop"); - if (card->dev) - netif_stop_queue(card->dev); - if (lcs_send_stoplan(card, LCS_INITIATOR_LGW) == 0) - PRINT_INFO("Stoplan for %s initiated by LGW succeeded!\n", - card->dev->name); - else - PRINT_ERR("Stoplan %s initiated by LGW failed!\n", - card->dev->name); - /*Try to reset the card, stop it on failure */ - rc = lcs_resetcard(card); - if (rc != 0) - rc = lcs_stopcard(card); - lcs_clear_thread_running_bit(card, LCS_STOPLAN_THREAD); - return rc; -} - -/** * Kernel Thread helper functions for LGW initiated commands */ static void lcs_start_kernel_thread(struct lcs_card *card) { LCS_DBF_TEXT(5, trace, "krnthrd"); - if (lcs_do_start_thread(card, LCS_STARTUP_THREAD)) - kernel_thread(lcs_lgw_startup_thread, (void *) card, SIGCHLD); - if (lcs_do_start_thread(card, LCS_STARTLAN_THREAD)) - kernel_thread(lcs_lgw_startlan_thread, (void *) card, SIGCHLD); - if (lcs_do_start_thread(card, LCS_STOPLAN_THREAD)) - kernel_thread(lcs_lgw_stoplan_thread, (void *) card, SIGCHLD); + if (lcs_do_start_thread(card, LCS_RECOVERY_THREAD)) + kernel_thread(lcs_recovery, (void *) card, SIGCHLD); #ifdef CONFIG_IP_MULTICAST if (lcs_do_start_thread(card, LCS_SET_MC_THREAD)) - kernel_thread(lcs_register_mc_addresses, (void *) card, SIGCHLD); + kernel_thread(lcs_register_mc_addresses, + (void *) card, SIGCHLD); #endif } @@ -1813,19 +1748,14 @@ if (cmd->initiator == LCS_INITIATOR_LGW) { switch(cmd->cmd_code) { case LCS_CMD_STARTUP: - if (!lcs_set_thread_start_bit(card, - LCS_STARTUP_THREAD)) - schedule_work(&card->kernel_thread_starter); - break; case LCS_CMD_STARTLAN: - if (!lcs_set_thread_start_bit(card, - LCS_STARTLAN_THREAD)) - schedule_work(&card->kernel_thread_starter); + lcs_schedule_recovery(card); break; case LCS_CMD_STOPLAN: - if (!lcs_set_thread_start_bit(card, - LCS_STOPLAN_THREAD)) - schedule_work(&card->kernel_thread_starter); + PRINT_WARN("Stoplan for %s initiated by LGW.\n", + card->dev->name); + if (card->dev) + netif_carrier_off(card->dev); break; default: PRINT_INFO("UNRECOGNIZED LGW COMMAND\n"); @@ -1941,8 +1871,11 @@ LCS_DBF_TEXT(2, trace, "stopdev"); card = (struct lcs_card *) dev->priv; - netif_stop_queue(dev); + netif_carrier_off(dev); + netif_tx_disable(dev); dev->flags &= ~IFF_UP; + wait_event(card->write.wait_q, + (card->write.state != CH_STATE_RUNNING)); rc = lcs_stopcard(card); if (rc) PRINT_ERR("Try it again!\n "); @@ -1968,6 +1901,7 @@ } else { dev->flags |= IFF_UP; + netif_carrier_on(dev); netif_wake_queue(dev); card->state = DEV_STATE_UP; } @@ -2059,10 +1993,31 @@ DEVICE_ATTR(lancmd_timeout, 0644, lcs_timeout_show, lcs_timeout_store); +static ssize_t +lcs_dev_recover_store(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) +{ + struct lcs_card *card = dev->driver_data; + char *tmp; + int i; + + if (!card) + return -EINVAL; + if (card->state != DEV_STATE_UP) + return -EPERM; + i = simple_strtoul(buf, &tmp, 16); + if (i == 1) + lcs_schedule_recovery(card); + return count; +} + +static DEVICE_ATTR(recover, 0200, NULL, lcs_dev_recover_store); + static struct attribute * lcs_attrs[] = { &dev_attr_portno.attr, &dev_attr_type.attr, &dev_attr_lancmd_timeout.attr, + &dev_attr_recover.attr, NULL, }; @@ -2099,6 +2054,12 @@ ccwgdev->dev.driver_data = card; ccwgdev->cdev[0]->handler = lcs_irq; ccwgdev->cdev[1]->handler = lcs_irq; + card->gdev = ccwgdev; + INIT_WORK(&card->kernel_thread_starter, + (void *) lcs_start_kernel_thread, card); + card->thread_start_mask = 0; + card->thread_allowed_mask = 0; + card->thread_running_mask = 0; return 0; } @@ -2200,6 +2161,7 @@ if (recover_state == DEV_STATE_RECOVER) { lcs_set_multicast_list(card->dev); card->dev->flags |= IFF_UP; + netif_carrier_on(card->dev); netif_wake_queue(card->dev); card->state = DEV_STATE_UP; } else { @@ -2229,7 +2191,7 @@ * lcs_shutdown_device, called when setting the group device offline. */ static int -lcs_shutdown_device(struct ccwgroup_device *ccwgdev) +__lcs_shutdown_device(struct ccwgroup_device *ccwgdev, int recovery_mode) { struct lcs_card *card; enum lcs_dev_states recover_state; @@ -2239,9 +2201,11 @@ card = (struct lcs_card *)ccwgdev->dev.driver_data; if (!card) return -ENODEV; - lcs_set_allowed_threads(card, 0); - if (lcs_wait_for_threads(card, LCS_SET_MC_THREAD)) - return -ERESTARTSYS; + if (recovery_mode == 0) { + lcs_set_allowed_threads(card, 0); + if (lcs_wait_for_threads(card, LCS_SET_MC_THREAD)) + return -ERESTARTSYS; + } LCS_DBF_HEX(3, setup, &card, sizeof(void*)); recover_state = card->state; @@ -2256,6 +2220,43 @@ return 0; } +static int +lcs_shutdown_device(struct ccwgroup_device *ccwgdev) +{ + return __lcs_shutdown_device(ccwgdev, 0); +} + +/** + * drive lcs recovery after startup and startlan initiated by Lan Gateway + */ +static int +lcs_recovery(void *ptr) +{ + struct lcs_card *card; + struct ccwgroup_device *gdev; + int rc; + + card = (struct lcs_card *) ptr; + daemonize("lcs_recover"); + + LCS_DBF_TEXT(4, trace, "recover1"); + if (!lcs_do_run_thread(card, LCS_RECOVERY_THREAD)) + return 0; + LCS_DBF_TEXT(4, trace, "recover2"); + gdev = card->gdev; + PRINT_WARN("Recovery of device %s started...\n", gdev->dev.bus_id); + rc = __lcs_shutdown_device(gdev, 1); + rc = lcs_new_device(gdev); + if (!rc) + PRINT_INFO("Device %s successfully recovered!\n", + card->dev->name); + else + PRINT_INFO("Device %s could not be recovered!\n", + card->dev->name); + lcs_clear_thread_running_bit(card, LCS_RECOVERY_THREAD); + return 0; +} + /** * lcs_remove_device, free buffers and card */ diff -urN linux-2.6.17-rc5/drivers/s390/net/lcs.h linux-2.6.17-rc6/drivers/s390/net/lcs.h --- linux-2.6.17-rc5/drivers/s390/net/lcs.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/drivers/s390/net/lcs.h 2006-06-06 01:27:36.208245052 +0000 @@ -73,13 +73,17 @@ /** * LCS sense byte definitions */ +#define LCS_SENSE_BYTE_0 0 +#define LCS_SENSE_BYTE_1 1 +#define LCS_SENSE_BYTE_2 2 +#define LCS_SENSE_BYTE_3 3 #define LCS_SENSE_INTERFACE_DISCONNECT 0x01 #define LCS_SENSE_EQUIPMENT_CHECK 0x10 #define LCS_SENSE_BUS_OUT_CHECK 0x20 #define LCS_SENSE_INTERVENTION_REQUIRED 0x40 #define LCS_SENSE_CMD_REJECT 0x80 -#define LCS_SENSE_RESETTING_EVENT 0x0080 -#define LCS_SENSE_DEVICE_ONLINE 0x0020 +#define LCS_SENSE_RESETTING_EVENT 0x80 +#define LCS_SENSE_DEVICE_ONLINE 0x20 /** * LCS packet type definitions @@ -152,10 +156,9 @@ enum lcs_threads { LCS_SET_MC_THREAD = 1, - LCS_STARTLAN_THREAD = 2, - LCS_STOPLAN_THREAD = 4, - LCS_STARTUP_THREAD = 8, + LCS_RECOVERY_THREAD = 2, }; + /** * LCS struct declarations */ @@ -286,6 +289,7 @@ struct net_device_stats stats; unsigned short (*lan_type_trans)(struct sk_buff *skb, struct net_device *dev); + struct ccwgroup_device *gdev; struct lcs_channel read; struct lcs_channel write; struct lcs_buffer *tx_buffer; diff -urN linux-2.6.17-rc5/drivers/s390/net/netiucv.c linux-2.6.17-rc6/drivers/s390/net/netiucv.c --- linux-2.6.17-rc5/drivers/s390/net/netiucv.c 2006-06-06 01:27:31.331720361 +0000 +++ linux-2.6.17-rc6/drivers/s390/net/netiucv.c 2006-06-06 01:27:36.208245052 +0000 @@ -30,7 +30,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ - + #undef DEBUG #include @@ -65,7 +65,7 @@ ("(C) 2001 IBM Corporation by Fritz Elfert (felfert@millenux.com)"); MODULE_DESCRIPTION ("Linux for S/390 IUCV network driver"); - + #define PRINTK_HEADER " iucv: " /* for debugging */ static struct device_driver netiucv_driver = { @@ -202,7 +202,7 @@ *p = '\0'; return tmp; } - + /** * States of the interface statemachine. */ @@ -244,7 +244,7 @@ "Connection up", "Connection down", }; - + /** * Events of the connection statemachine */ @@ -364,7 +364,7 @@ "Connect error", }; - + /** * Debug Facility Stuff */ @@ -516,7 +516,7 @@ fsm_action_nop(fsm_instance *fi, int event, void *arg) { } - + /** * Actions of the connection statemachine *****************************************************************************/ @@ -993,7 +993,7 @@ static const int CONN_FSM_LEN = sizeof(conn_fsm) / sizeof(fsm_node); - + /** * Actions for interface - statemachine. *****************************************************************************/ @@ -1182,7 +1182,7 @@ fsm_newstate(conn->fsm, CONN_STATE_TX); conn->prof.send_stamp = xtime; - + rc = iucv_send(conn->pathid, NULL, 0, 0, 1 /* single_flag */, 0, nskb->data, nskb->len); /* Shut up, gcc! nskb is always below 2G. */ @@ -1220,7 +1220,7 @@ return rc; } - + /** * Interface API for upper network layers *****************************************************************************/ @@ -1291,7 +1291,7 @@ /** * If connection is not running, try to restart it - * and throw away packet. + * and throw away packet. */ if (fsm_getstate(privptr->fsm) != DEV_STATE_RUNNING) { fsm_event(privptr->fsm, DEV_EVENT_START, dev); @@ -1538,7 +1538,7 @@ maxcq_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct netiucv_priv *priv = dev->driver_data; - + IUCV_DBF_TEXT(trace, 4, __FUNCTION__); priv->conn->prof.maxcqueue = 0; return count; @@ -1559,7 +1559,7 @@ sdoio_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct netiucv_priv *priv = dev->driver_data; - + IUCV_DBF_TEXT(trace, 4, __FUNCTION__); priv->conn->prof.doios_single = 0; return count; @@ -1580,7 +1580,7 @@ mdoio_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct netiucv_priv *priv = dev->driver_data; - + IUCV_DBF_TEXT(trace, 5, __FUNCTION__); priv->conn->prof.doios_multi = 0; return count; @@ -1601,7 +1601,7 @@ txlen_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct netiucv_priv *priv = dev->driver_data; - + IUCV_DBF_TEXT(trace, 4, __FUNCTION__); priv->conn->prof.txlen = 0; return count; @@ -1622,7 +1622,7 @@ txtime_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct netiucv_priv *priv = dev->driver_data; - + IUCV_DBF_TEXT(trace, 4, __FUNCTION__); priv->conn->prof.tx_time = 0; return count; @@ -2000,7 +2000,7 @@ } PRINT_INFO("%s: '%s'\n", dev->name, netiucv_printname(username)); - + return count; out_free_ndev: @@ -2099,7 +2099,7 @@ netiucv_init(void) { int ret; - + ret = iucv_register_dbf_views(); if (ret) { PRINT_WARN("netiucv_init failed, " @@ -2128,7 +2128,7 @@ } return ret; } - + module_init(netiucv_init); module_exit(netiucv_exit); MODULE_LICENSE("GPL"); diff -urN linux-2.6.17-rc5/drivers/s390/net/qeth.h linux-2.6.17-rc6/drivers/s390/net/qeth.h --- linux-2.6.17-rc5/drivers/s390/net/qeth.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/drivers/s390/net/qeth.h 2006-06-06 01:27:36.208245052 +0000 @@ -376,7 +376,7 @@ __u8 reserved3[18]; __u32 ccid; } __attribute__ ((packed)); - + struct qeth_hdr { union { struct qeth_hdr_layer2 l2; @@ -825,7 +825,7 @@ int use_hard_stop; int (*orig_hard_header)(struct sk_buff *,struct net_device *, unsigned short,void *,void *,unsigned); - struct qeth_osn_info osn_info; + struct qeth_osn_info osn_info; }; struct qeth_card_list_struct { @@ -944,7 +944,7 @@ return 0; switch (card->info.type) { case QETH_CARD_TYPE_IQD: - case QETH_CARD_TYPE_OSN: + case QETH_CARD_TYPE_OSN: return IFF_NOARP; #ifdef CONFIG_QETH_IPV6 default: @@ -981,7 +981,7 @@ qeth_get_max_mtu_for_card(int cardtype) { switch (cardtype) { - + case QETH_CARD_TYPE_UNKNOWN: case QETH_CARD_TYPE_OSAE: case QETH_CARD_TYPE_OSN: @@ -1097,9 +1097,9 @@ int count = 0, rc = 0; int in[4]; - rc = sscanf(buf, "%d.%d.%d.%d%n", + rc = sscanf(buf, "%d.%d.%d.%d%n", &in[0], &in[1], &in[2], &in[3], &count); - if (rc != 4 || count) + if (rc != 4 || count<=0) return -EINVAL; for (count = 0; count < 4; count++) { if (in[count] > 255) @@ -1131,7 +1131,7 @@ cnt = out = found = save_cnt = num2 = 0; end = start = (char *) buf; - in = (__u16 *) addr; + in = (__u16 *) addr; memset(in, 0, 16); while (end) { end = strchr(end,':'); @@ -1139,7 +1139,7 @@ end = (char *)buf + (strlen(buf)); out = 1; } - if ((end - start)) { + if ((end - start)) { memset(num, 0, 5); memcpy(num, start, end - start); if (!qeth_isxdigit(num)) @@ -1241,5 +1241,5 @@ extern void qeth_osn_deregister(struct net_device *); - + #endif /* __QETH_H__ */ diff -urN linux-2.6.17-rc5/drivers/s390/net/qeth_eddp.c linux-2.6.17-rc6/drivers/s390/net/qeth_eddp.c --- linux-2.6.17-rc5/drivers/s390/net/qeth_eddp.c 2006-06-06 01:27:31.331720361 +0000 +++ linux-2.6.17-rc6/drivers/s390/net/qeth_eddp.c 2006-06-06 01:27:36.208245052 +0000 @@ -81,7 +81,7 @@ qeth_eddp_buf_release_contexts(struct qeth_qdio_out_buffer *buf) { struct qeth_eddp_context_reference *ref; - + QETH_DBF_TEXT(trace, 6, "eddprctx"); while (!list_empty(&buf->ctx_list)){ ref = list_entry(buf->ctx_list.next, @@ -135,7 +135,7 @@ "buffer!\n"); goto out; } - } + } /* check if the whole next skb fits into current buffer */ if ((QETH_MAX_BUFFER_ELEMENTS(queue->card) - buf->next_element_to_fill) @@ -148,7 +148,7 @@ * and increment ctx's refcnt */ must_refcnt = 1; continue; - } + } if (must_refcnt){ must_refcnt = 0; if (qeth_eddp_buf_ref_context(buf, ctx)){ @@ -266,7 +266,7 @@ int left_in_frag; int copy_len; u8 *src; - + QETH_DBF_TEXT(trace, 5, "eddpcdtc"); if (skb_shinfo(eddp->skb)->nr_frags == 0) { memcpy(dst, eddp->skb->data + eddp->skb_offset, len); @@ -408,7 +408,7 @@ struct tcphdr *tcph; int data_len; u32 hcsum; - + QETH_DBF_TEXT(trace, 5, "eddpftcp"); eddp->skb_offset = sizeof(struct qeth_hdr) + eddp->nhl + eddp->thl; if (eddp->qh.hdr.l2.id == QETH_HEADER_TYPE_LAYER2) { @@ -465,13 +465,13 @@ eddp->th.tcp.h.seq += data_len; } } - + static inline int qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx, struct sk_buff *skb, struct qeth_hdr *qhdr) { struct qeth_eddp_data *eddp = NULL; - + QETH_DBF_TEXT(trace, 5, "eddpficx"); /* create our segmentation headers and copy original headers */ if (skb->protocol == ETH_P_IP) @@ -512,7 +512,7 @@ int hdr_len) { int skbs_per_page; - + QETH_DBF_TEXT(trace, 5, "eddpcanp"); /* can we put multiple skbs in one page? */ skbs_per_page = PAGE_SIZE / (skb_shinfo(skb)->tso_size + hdr_len); @@ -588,7 +588,7 @@ struct qeth_hdr *qhdr) { struct qeth_eddp_context *ctx = NULL; - + QETH_DBF_TEXT(trace, 5, "creddpct"); if (skb->protocol == ETH_P_IP) ctx = qeth_eddp_create_context_generic(card, skb, diff -urN linux-2.6.17-rc5/drivers/s390/net/qeth_fs.h linux-2.6.17-rc6/drivers/s390/net/qeth_fs.h --- linux-2.6.17-rc5/drivers/s390/net/qeth_fs.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/drivers/s390/net/qeth_fs.h 2006-06-06 01:27:36.208245052 +0000 @@ -42,7 +42,7 @@ extern void qeth_remove_device_attributes_osn(struct device *dev); - + extern int qeth_create_driver_attributes(void); diff -urN linux-2.6.17-rc5/drivers/s390/net/qeth_main.c linux-2.6.17-rc6/drivers/s390/net/qeth_main.c --- linux-2.6.17-rc5/drivers/s390/net/qeth_main.c 2006-06-06 01:27:31.331720361 +0000 +++ linux-2.6.17-rc6/drivers/s390/net/qeth_main.c 2006-06-06 01:27:36.212245483 +0000 @@ -513,7 +513,7 @@ QETH_DBF_TEXT(setup, 3, "setoffl"); QETH_DBF_HEX(setup, 3, &card, sizeof(void *)); - + if (card->dev && netif_carrier_ok(card->dev)) netif_carrier_off(card->dev); recover_flag = card->state; @@ -604,13 +604,13 @@ list_for_each_entry(addr, &card->ip_list, entry) { if (card->options.layer2) { if ((addr->type == todo->type) && - (memcmp(&addr->mac, &todo->mac, + (memcmp(&addr->mac, &todo->mac, OSA_ADDR_LEN) == 0)) { found = 1; break; } continue; - } + } if ((addr->proto == QETH_PROT_IPV4) && (todo->proto == QETH_PROT_IPV4) && (addr->type == todo->type) && @@ -694,13 +694,13 @@ if (card->options.layer2) { if ((tmp->type == addr->type) && (tmp->is_multicast == addr->is_multicast) && - (memcmp(&tmp->mac, &addr->mac, + (memcmp(&tmp->mac, &addr->mac, OSA_ADDR_LEN) == 0)) { found = 1; break; } continue; - } + } if ((tmp->proto == QETH_PROT_IPV4) && (addr->proto == QETH_PROT_IPV4) && (tmp->type == addr->type) && @@ -1173,7 +1173,7 @@ "due to hardware limitations!\n"); card->qdio.no_out_queues = 1; card->qdio.default_out_queue = 0; - } + } return 0; } i++; @@ -1198,7 +1198,7 @@ return -ENODEV; QETH_DBF_TEXT_(setup, 2, "%s", gdev->dev.bus_id); - + card = qeth_alloc_card(); if (!card) { put_device(dev); @@ -1220,7 +1220,7 @@ put_device(dev); qeth_free_card(card); return rc; - } + } if ((rc = qeth_setup_card(card))){ QETH_DBF_TEXT_(setup, 2, "2err%d", rc); put_device(dev); @@ -1843,7 +1843,7 @@ &card->seqno.pdu_hdr_ack, QETH_SEQ_NO_LENGTH); QETH_DBF_HEX(control, 2, iob->data, QETH_DBF_CONTROL_LEN); } - + static int qeth_send_control_data(struct qeth_card *card, int len, struct qeth_cmd_buffer *iob, @@ -1937,7 +1937,7 @@ wake_up(&card->wait_q); } return rc; -} +} static inline void qeth_prepare_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, @@ -1966,7 +1966,7 @@ memcpy(QETH_IPA_PDU_LEN_PDU3(iob->data), &s2, 2); return qeth_osn_send_control_data(card, s1, iob); } - + static int qeth_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, int (*reply_cb) @@ -2579,7 +2579,7 @@ skb->dev = card->dev; if (hdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) vlan_tag = qeth_layer2_rebuild_skb(card, skb, hdr); - else if (hdr->hdr.l3.id == QETH_HEADER_TYPE_LAYER3) + else if (hdr->hdr.l3.id == QETH_HEADER_TYPE_LAYER3) qeth_rebuild_skb(card, skb, hdr); else { /*in case of OSN*/ skb_push(skb, sizeof(struct qeth_hdr)); @@ -2763,7 +2763,7 @@ index = i % QDIO_MAX_BUFFERS_PER_Q; buffer = &card->qdio.in_q->bufs[index]; if (!((status & QDIO_STATUS_LOOK_FOR_ERROR) && - qeth_check_qdio_errors(buffer->buffer, + 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 */ @@ -3187,7 +3187,7 @@ if (card->qdio.state == QETH_QDIO_ALLOCATED) return 0; - card->qdio.in_q = kmalloc(sizeof(struct qeth_qdio_q), + card->qdio.in_q = kmalloc(sizeof(struct qeth_qdio_q), GFP_KERNEL|GFP_DMA); if (!card->qdio.in_q) return - ENOMEM; @@ -3476,7 +3476,7 @@ rc3 = qeth_halt_channel(&card->data); if (rc1) return rc1; - if (rc2) + if (rc2) return rc2; return rc3; } @@ -3491,7 +3491,7 @@ rc3 = qeth_clear_channel(&card->data); if (rc1) return rc1; - if (rc2) + if (rc2) return rc2; return rc3; } @@ -3798,10 +3798,10 @@ QETH_DBF_TEXT(trace,4,"nomacadr"); return -EPERM; } - card->dev->flags |= IFF_UP; - netif_start_queue(dev); card->data.state = CH_STATE_UP; card->state = CARD_STATE_UP; + card->dev->flags |= IFF_UP; + netif_start_queue(dev); if (!card->lan_online && netif_carrier_ok(dev)) netif_carrier_off(dev); @@ -3817,7 +3817,7 @@ card = (struct qeth_card *) dev->priv; - netif_stop_queue(dev); + netif_tx_disable(dev); card->dev->flags &= ~IFF_UP; if (card->state == CARD_STATE_UP) card->state = CARD_STATE_SOFTSETUP; @@ -3958,7 +3958,7 @@ #endif *hdr = (struct qeth_hdr *) qeth_push_skb(card, skb, sizeof(struct qeth_hdr)); - if (hdr == NULL) + if (*hdr == NULL) return -EINVAL; return 0; } @@ -4098,7 +4098,7 @@ } } else { /* passthrough */ if((skb->dev->type == ARPHRD_IEEE802_TR) && - !memcmp(skb->data + sizeof(struct qeth_hdr) + + !memcmp(skb->data + sizeof(struct qeth_hdr) + sizeof(__u16), skb->dev->broadcast, 6)) { hdr->hdr.l3.flags = QETH_CAST_BROADCAST | QETH_HDR_PASSTHRU; @@ -4385,7 +4385,7 @@ } static inline int -qeth_get_elements_no(struct qeth_card *card, void *hdr, +qeth_get_elements_no(struct qeth_card *card, void *hdr, struct sk_buff *skb, int elems) { int elements_needed = 0; @@ -4416,6 +4416,8 @@ enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO; struct qeth_eddp_context *ctx = NULL; int tx_bytes = skb->len; + unsigned short nr_frags = skb_shinfo(skb)->nr_frags; + unsigned short tso_size = skb_shinfo(skb)->tso_size; int rc; QETH_DBF_TEXT(trace, 6, "sendpkt"); @@ -4441,7 +4443,7 @@ return 0; } cast_type = qeth_get_cast_type(card, skb); - if ((cast_type == RTN_BROADCAST) && + if ((cast_type == RTN_BROADCAST) && (card->info.broadcast_capable == 0)){ card->stats.tx_dropped++; card->stats.tx_errors++; @@ -4463,7 +4465,7 @@ card->stats.tx_errors++; dev_kfree_skb_any(skb); return NETDEV_TX_OK; - } + } elements_needed++; } else { if ((rc = qeth_prepare_skb(card, &skb, &hdr, ipv))) { @@ -4498,16 +4500,16 @@ card->stats.tx_packets++; card->stats.tx_bytes += tx_bytes; #ifdef CONFIG_QETH_PERF_STATS - if (skb_shinfo(skb)->tso_size && + if (tso_size && !(large_send == QETH_LARGE_SEND_NO)) { - card->perf_stats.large_send_bytes += skb->len; + card->perf_stats.large_send_bytes += tx_bytes; card->perf_stats.large_send_cnt++; } - if (skb_shinfo(skb)->nr_frags > 0){ + if (nr_frags > 0){ card->perf_stats.sg_skbs_sent++; /* nr_frags + skb->data */ card->perf_stats.sg_frags_sent += - skb_shinfo(skb)->nr_frags + 1; + nr_frags + 1; } #endif /* CONFIG_QETH_PERF_STATS */ } @@ -5373,7 +5375,7 @@ cmd = (struct qeth_ipa_cmd *) data; if (cmd->hdr.return_code) { PRINT_ERR("Error in processing VLAN %i on %s: 0x%x. " - "Continuing\n",cmd->data.setdelvlan.vlan_id, + "Continuing\n",cmd->data.setdelvlan.vlan_id, QETH_CARD_IFNAME(card), cmd->hdr.return_code); QETH_DBF_TEXT_(trace, 2, "L2VL%4x", cmd->hdr.command); QETH_DBF_TEXT_(trace, 2, "L2%s", CARD_BUS_ID(card)); @@ -5393,7 +5395,7 @@ iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); cmd->data.setdelvlan.vlan_id = i; - return qeth_send_ipa_cmd(card, iob, + return qeth_send_ipa_cmd(card, iob, qeth_layer2_send_setdelvlan_cb, NULL); } @@ -5457,7 +5459,7 @@ * Examine hardware response to SET_PROMISC_MODE */ static int -qeth_setadp_promisc_mode_cb(struct qeth_card *card, +qeth_setadp_promisc_mode_cb(struct qeth_card *card, struct qeth_reply *reply, unsigned long data) { @@ -5468,10 +5470,10 @@ cmd = (struct qeth_ipa_cmd *) data; setparms = &(cmd->data.setadapterparms); - + qeth_default_setadapterparms_cb(card, reply, (unsigned long)cmd); - if (cmd->hdr.return_code) { - QETH_DBF_TEXT_(trace,4,"prmrc%2.2x",cmd->hdr.return_code); + if (cmd->hdr.return_code) { + QETH_DBF_TEXT_(trace,4,"prmrc%2.2x",cmd->hdr.return_code); setparms->data.mode = SET_PROMISC_MODE_OFF; } card->info.promisc_mode = setparms->data.mode; @@ -5517,7 +5519,7 @@ if (card->info.type == QETH_CARD_TYPE_OSN) return ; - + QETH_DBF_TEXT(trace, 3, "setmulti"); qeth_delete_mc_addresses(card); if (card->options.layer2) { @@ -5575,7 +5577,7 @@ struct qeth_cmd_buffer *iob; struct qeth_card *card; int rc; - + QETH_DBF_TEXT(trace, 2, "osnsdmc"); if (!dev) return -ENODEV; @@ -5654,7 +5656,7 @@ card->osn_info.data_cb = NULL; return; } - + static void qeth_delete_mc_addresses(struct qeth_card *card) { @@ -5818,7 +5820,7 @@ struct inet6_dev *in6_dev; QETH_DBF_TEXT(trace,4,"chkmcv6"); - if (!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) @@ -6359,12 +6361,9 @@ dev->vlan_rx_kill_vid = qeth_vlan_rx_kill_vid; dev->vlan_rx_add_vid = qeth_vlan_rx_add_vid; #endif - dev->hard_header = card->orig_hard_header; if (qeth_get_netdev_flags(card) & IFF_NOARP) { dev->rebuild_header = NULL; dev->hard_header = NULL; - if (card->options.fake_ll) - dev->hard_header = qeth_fake_header; dev->header_cache_update = NULL; dev->hard_header_cache = NULL; } @@ -6373,6 +6372,9 @@ if (!(card->info.unique_id & UNIQUE_ID_NOT_BY_CARD)) card->dev->dev_id = card->info.unique_id & 0xffff; #endif + if (card->options.fake_ll && + (qeth_get_netdev_flags(card) & IFF_NOARP)) + dev->hard_header = qeth_fake_header; dev->hard_header_parse = NULL; dev->set_mac_address = qeth_layer2_set_mac_address; dev->flags |= qeth_get_netdev_flags(card); @@ -6477,6 +6479,9 @@ /*network device will be recovered*/ if (card->dev) { card->dev->hard_header = card->orig_hard_header; + if (card->options.fake_ll && + (qeth_get_netdev_flags(card) & IFF_NOARP)) + card->dev->hard_header = qeth_fake_header; return 0; } /* at first set_online allocate netdev */ @@ -6584,7 +6589,7 @@ cmd = (struct qeth_ipa_cmd *) data; if (!card->options.layer2 || card->info.guestlan || - !(card->info.mac_bits & QETH_LAYER2_MAC_READ)) { + !(card->info.mac_bits & QETH_LAYER2_MAC_READ)) { memcpy(card->dev->dev_addr, &cmd->data.setadapterparms.data.change_addr.addr, OSA_ADDR_LEN); @@ -7031,14 +7036,12 @@ QETH_DBF_TEXT(trace,3,"softipv6"); - netif_stop_queue(card->dev); rc = qeth_send_startlan(card, QETH_PROT_IPV6); if (rc) { PRINT_ERR("IPv6 startlan failed on %s\n", QETH_CARD_IFNAME(card)); return rc; } - netif_wake_queue(card->dev); rc = qeth_query_ipassists(card,QETH_PROT_IPV6); if (rc) { PRINT_ERR("IPv6 query ipassist failed on %s\n", @@ -7352,7 +7355,8 @@ card->options.large_send = type; return 0; } - netif_stop_queue(card->dev); + if (card->state == CARD_STATE_UP) + netif_tx_disable(card->dev); card->options.large_send = type; switch (card->options.large_send) { case QETH_LARGE_SEND_EDDP: @@ -7374,7 +7378,8 @@ card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG); break; } - netif_wake_queue(card->dev); + if (card->state == CARD_STATE_UP) + netif_wake_queue(card->dev); return rc; } @@ -7427,7 +7432,7 @@ if ((rc = qeth_setrouting_v6(card))) QETH_DBF_TEXT_(setup, 2, "5err%d", rc); out: - netif_stop_queue(card->dev); + netif_tx_disable(card->dev); return 0; } @@ -7567,7 +7572,7 @@ if (card->read.state == CH_STATE_UP && card->write.state == CH_STATE_UP && (card->state == CARD_STATE_UP)) { - if (recovery_mode && + if (recovery_mode && card->info.type != QETH_CARD_TYPE_OSN) { qeth_stop(card->dev); } else { @@ -7736,10 +7741,8 @@ qeth_register_netdev(struct qeth_card *card) { QETH_DBF_TEXT(setup, 3, "regnetd"); - if (card->dev->reg_state != NETREG_UNINITIALIZED) { - qeth_netdev_init(card->dev); + if (card->dev->reg_state != NETREG_UNINITIALIZED) return 0; - } /* sysfs magic */ SET_NETDEV_DEV(card->dev, &card->gdev->dev); return register_netdev(card->dev); @@ -7750,7 +7753,7 @@ { QETH_DBF_TEXT(setup ,2, "startag"); - if (recovery_mode && + if (recovery_mode && card->info.type != QETH_CARD_TYPE_OSN) { qeth_open(card->dev); } else { diff -urN linux-2.6.17-rc5/drivers/s390/net/qeth_mpc.h linux-2.6.17-rc6/drivers/s390/net/qeth_mpc.h --- linux-2.6.17-rc5/drivers/s390/net/qeth_mpc.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/drivers/s390/net/qeth_mpc.h 2006-06-06 01:27:36.212245483 +0000 @@ -445,7 +445,7 @@ /* Helper functions */ #define IS_IPA_REPLY(cmd) ((cmd->hdr.initiator == IPA_CMD_INITIATOR_HOST) || \ (cmd->hdr.initiator == IPA_CMD_INITIATOR_OSA_REPLY)) - + /*****************************************************************************/ /* END OF IP Assist related definitions */ /*****************************************************************************/ @@ -490,7 +490,7 @@ /* Layer 2 defintions */ #define QETH_PROT_LAYER2 0x08 #define QETH_PROT_TCPIP 0x03 -#define QETH_PROT_OSN2 0x0a +#define QETH_PROT_OSN2 0x0a #define QETH_ULP_ENABLE_PROT_TYPE(buffer) (buffer+0x50) #define QETH_IPA_CMD_PROT_TYPE(buffer) (buffer+0x19) diff -urN linux-2.6.17-rc5/drivers/s390/net/qeth_proc.c linux-2.6.17-rc6/drivers/s390/net/qeth_proc.c --- linux-2.6.17-rc5/drivers/s390/net/qeth_proc.c 2006-06-06 01:27:31.335720791 +0000 +++ linux-2.6.17-rc6/drivers/s390/net/qeth_proc.c 2006-06-06 01:27:36.212245483 +0000 @@ -36,7 +36,7 @@ { struct device *dev = NULL; loff_t nr = 0; - + down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); if (*offset == 0) return SEQ_START_TOKEN; @@ -60,8 +60,8 @@ qeth_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) { struct device *prev, *next; - - if (it == SEQ_START_TOKEN) + + if (it == SEQ_START_TOKEN) prev = NULL; else prev = (struct device *) it; @@ -180,7 +180,7 @@ struct device *device; struct qeth_card *card; - + if (it == SEQ_START_TOKEN) return 0; diff -urN linux-2.6.17-rc5/drivers/s390/net/qeth_sys.c linux-2.6.17-rc6/drivers/s390/net/qeth_sys.c --- linux-2.6.17-rc5/drivers/s390/net/qeth_sys.c 2006-06-06 01:27:31.335720791 +0000 +++ linux-2.6.17-rc6/drivers/s390/net/qeth_sys.c 2006-06-06 01:27:36.212245483 +0000 @@ -785,7 +785,7 @@ } if (card->options.large_send == type) return count; - if ((rc = qeth_set_large_send(card, type))) + if ((rc = qeth_set_large_send(card, type))) return rc; return count; } @@ -1682,7 +1682,7 @@ if (card->info.type == QETH_CARD_TYPE_OSN) return sysfs_create_group(&dev->kobj, &qeth_osn_device_attr_group); - + if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_attr_group))) return ret; if ((ret = sysfs_create_group(&dev->kobj, &qeth_device_ipato_group))){ @@ -1713,7 +1713,7 @@ if (card->info.type == QETH_CARD_TYPE_OSN) return sysfs_remove_group(&dev->kobj, &qeth_osn_device_attr_group); - + sysfs_remove_group(&dev->kobj, &qeth_device_attr_group); sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group); sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group); diff -urN linux-2.6.17-rc5/drivers/s390/net/qeth_tso.h linux-2.6.17-rc6/drivers/s390/net/qeth_tso.h --- linux-2.6.17-rc5/drivers/s390/net/qeth_tso.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/drivers/s390/net/qeth_tso.h 2006-06-06 01:27:36.212245483 +0000 @@ -117,11 +117,11 @@ int fragno; unsigned long addr; int element, cnt, dlen; - + fragno = skb_shinfo(skb)->nr_frags; element = *next_element_to_fill; dlen = 0; - + if (is_tso) buffer->element[element].flags = SBAL_FLAGS_MIDDLE_FRAG; diff -urN linux-2.6.17-rc5/drivers/scsi/libata-core.c linux-2.6.17-rc6/drivers/scsi/libata-core.c --- linux-2.6.17-rc5/drivers/scsi/libata-core.c 2006-06-06 01:27:31.403728109 +0000 +++ linux-2.6.17-rc6/drivers/scsi/libata-core.c 2006-06-06 01:27:36.292254091 +0000 @@ -4297,6 +4297,7 @@ int ata_device_resume(struct ata_port *ap, struct ata_device *dev) { if (ap->flags & ATA_FLAG_SUSPENDED) { + ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 200000); ap->flags &= ~ATA_FLAG_SUSPENDED; ata_set_mode(ap); } diff -urN linux-2.6.17-rc5/drivers/scsi/ppa.c linux-2.6.17-rc6/drivers/scsi/ppa.c --- linux-2.6.17-rc5/drivers/scsi/ppa.c 2006-06-06 01:27:31.435731552 +0000 +++ linux-2.6.17-rc6/drivers/scsi/ppa.c 2006-06-06 01:27:36.324257535 +0000 @@ -982,6 +982,12 @@ return -ENODEV; } +static int ppa_adjust_queue(struct scsi_device *device) +{ + blk_queue_bounce_limit(device->request_queue, BLK_BOUNCE_HIGH); + return 0; +} + static struct scsi_host_template ppa_template = { .module = THIS_MODULE, .proc_name = "ppa", @@ -997,6 +1003,7 @@ .cmd_per_lun = 1, .use_clustering = ENABLE_CLUSTERING, .can_queue = 1, + .slave_alloc = ppa_adjust_queue, }; /*************************************************************************** diff -urN linux-2.6.17-rc5/drivers/scsi/sata_sil24.c linux-2.6.17-rc6/drivers/scsi/sata_sil24.c --- linux-2.6.17-rc5/drivers/scsi/sata_sil24.c 2006-06-06 01:27:31.567745756 +0000 +++ linux-2.6.17-rc6/drivers/scsi/sata_sil24.c 2006-06-06 01:27:36.456271739 +0000 @@ -454,7 +454,7 @@ */ msleep(10); - prb->ctrl = PRB_CTRL_SRST; + prb->ctrl = cpu_to_le16(PRB_CTRL_SRST); prb->fis[1] = 0; /* no PM yet */ writel((u32)paddr, port + PORT_CMD_ACTIVATE); @@ -551,9 +551,9 @@ if (qc->tf.protocol != ATA_PROT_ATAPI_NODATA) { if (qc->tf.flags & ATA_TFLAG_WRITE) - prb->ctrl = PRB_CTRL_PACKET_WRITE; + prb->ctrl = cpu_to_le16(PRB_CTRL_PACKET_WRITE); else - prb->ctrl = PRB_CTRL_PACKET_READ; + prb->ctrl = cpu_to_le16(PRB_CTRL_PACKET_READ); } else prb->ctrl = 0; diff -urN linux-2.6.17-rc5/drivers/scsi/scsi_devinfo.c linux-2.6.17-rc6/drivers/scsi/scsi_devinfo.c --- linux-2.6.17-rc5/drivers/scsi/scsi_devinfo.c 2006-06-06 01:27:31.571746187 +0000 +++ linux-2.6.17-rc6/drivers/scsi/scsi_devinfo.c 2006-06-06 01:27:36.460272169 +0000 @@ -165,6 +165,7 @@ {"HP", "HSV100", NULL, BLIST_REPORTLUN2 | BLIST_NOSTARTONADD}, {"HP", "C1557A", NULL, BLIST_FORCELUN}, {"HP", "C3323-300", "4269", BLIST_NOTQ}, + {"HP", "C5713A", NULL, BLIST_NOREPORTLUN}, {"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN}, {"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, {"IBM", "2105", NULL, BLIST_RETRY_HWERROR}, diff -urN linux-2.6.17-rc5/drivers/scsi/scsi_lib.c linux-2.6.17-rc6/drivers/scsi/scsi_lib.c --- linux-2.6.17-rc5/drivers/scsi/scsi_lib.c 2006-06-06 01:27:31.571746187 +0000 +++ linux-2.6.17-rc6/drivers/scsi/scsi_lib.c 2006-06-06 01:27:36.464272600 +0000 @@ -367,7 +367,7 @@ int nsegs, unsigned bufflen, gfp_t gfp) { struct request_queue *q = rq->q; - int nr_pages = (bufflen + PAGE_SIZE - 1) >> PAGE_SHIFT; + int nr_pages = (bufflen + sgl[0].offset + PAGE_SIZE - 1) >> PAGE_SHIFT; unsigned int data_len = 0, len, bytes, off; struct page *page; struct bio *bio = NULL; diff -urN linux-2.6.17-rc5/drivers/scsi/scsi_transport_sas.c linux-2.6.17-rc6/drivers/scsi/scsi_transport_sas.c --- linux-2.6.17-rc5/drivers/scsi/scsi_transport_sas.c 2006-06-06 01:27:31.575746617 +0000 +++ linux-2.6.17-rc6/drivers/scsi/scsi_transport_sas.c 2006-06-06 01:27:36.468273030 +0000 @@ -955,7 +955,8 @@ list_for_each_entry(rphy, &sas_host->rphy_list, list) { struct sas_phy *parent = dev_to_phy(rphy->dev.parent); - if (rphy->scsi_target_id == -1) + if (rphy->identify.device_type != SAS_END_DEVICE || + rphy->scsi_target_id == -1) continue; if ((channel == SCAN_WILD_CARD || channel == parent->port_identifier) && @@ -977,7 +978,6 @@ #define SETUP_TEMPLATE(attrb, field, perm, test) \ i->private_##attrb[count] = class_device_attr_##field; \ i->private_##attrb[count].attr.mode = perm; \ - i->private_##attrb[count].store = NULL; \ i->attrb[count] = &i->private_##attrb[count]; \ if (test) \ count++ diff -urN linux-2.6.17-rc5/drivers/serial/cpm_uart/cpm_uart_core.c linux-2.6.17-rc6/drivers/serial/cpm_uart/cpm_uart_core.c --- linux-2.6.17-rc5/drivers/serial/cpm_uart/cpm_uart_core.c 2006-06-06 01:27:31.595748769 +0000 +++ linux-2.6.17-rc6/drivers/serial/cpm_uart/cpm_uart_core.c 2006-06-06 01:27:36.484274752 +0000 @@ -1164,14 +1164,16 @@ struct fs_uart_platform_info *pdata; struct platform_device* pdev = early_uart_get_pdev(co->index); - port = - (struct uart_port *)&cpm_uart_ports[cpm_uart_port_map[co->index]]; - pinfo = (struct uart_cpm_port *)port; if (!pdev) { pr_info("cpm_uart: console: compat mode\n"); /* compatibility - will be cleaned up */ cpm_uart_init_portdesc(); + } + port = + (struct uart_port *)&cpm_uart_ports[cpm_uart_port_map[co->index]]; + pinfo = (struct uart_cpm_port *)port; + if (!pdev) { if (pinfo->set_lineif) pinfo->set_lineif(pinfo); } else { diff -urN linux-2.6.17-rc5/drivers/serial/cpm_uart/cpm_uart_cpm2.c linux-2.6.17-rc6/drivers/serial/cpm_uart/cpm_uart_cpm2.c --- linux-2.6.17-rc5/drivers/serial/cpm_uart/cpm_uart_cpm2.c 2006-06-06 01:27:31.595748769 +0000 +++ linux-2.6.17-rc6/drivers/serial/cpm_uart/cpm_uart_cpm2.c 2006-06-06 01:27:36.484274752 +0000 @@ -213,7 +213,7 @@ L1_CACHE_ALIGN(pinfo->tx_nrfifos * pinfo->tx_fifosize); if (is_con) { mem_addr = alloc_bootmem(memsz); - dma_addr = mem_addr; + dma_addr = virt_to_bus(mem_addr); } else mem_addr = dma_alloc_coherent(NULL, memsz, &dma_addr, diff -urN linux-2.6.17-rc5/drivers/spi/spi_s3c24xx.c linux-2.6.17-rc6/drivers/spi/spi_s3c24xx.c --- linux-2.6.17-rc5/drivers/spi/spi_s3c24xx.c 2006-06-06 01:27:31.615750921 +0000 +++ linux-2.6.17-rc6/drivers/spi/spi_s3c24xx.c 2006-06-06 01:27:36.504276904 +0000 @@ -405,7 +405,7 @@ static int s3c24xx_spi_suspend(struct platform_device *pdev, pm_message_t msg) { - struct s3c24xx_spi *hw = platform_get_drvdata(dev); + struct s3c24xx_spi *hw = platform_get_drvdata(pdev); clk_disable(hw->clk); return 0; @@ -413,7 +413,7 @@ static int s3c24xx_spi_resume(struct platform_device *pdev) { - struct s3c24xx_spi *hw = platform_get_drvdata(dev); + struct s3c24xx_spi *hw = platform_get_drvdata(pdev); clk_enable(hw->clk); return 0; diff -urN linux-2.6.17-rc5/drivers/video/au1100fb.c linux-2.6.17-rc6/drivers/video/au1100fb.c --- linux-2.6.17-rc5/drivers/video/au1100fb.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/drivers/video/au1100fb.c 2006-06-06 01:27:36.652292830 +0000 @@ -214,10 +214,13 @@ */ int au1100fb_fb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *fbi) { - struct au1100fb_device *fbdev = to_au1100fb_device(fbi); - u32 *palette = fbdev->regs->lcd_pallettebase; + struct au1100fb_device *fbdev; + u32 *palette; u32 value; + fbdev = to_au1100fb_device(fbi); + palette = fbdev->regs->lcd_pallettebase; + if (regno > (AU1100_LCD_NBR_PALETTE_ENTRIES - 1)) return -EINVAL; @@ -316,9 +319,11 @@ */ int au1100fb_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *fbi) { - struct au1100fb_device *fbdev = to_au1100fb_device(fbi); + struct au1100fb_device *fbdev; int dy; + fbdev = to_au1100fb_device(fbi); + print_dbg("fb_pan_display %p %p", var, fbi); if (!var || !fbdev) { @@ -382,10 +387,12 @@ */ int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma) { - struct au1100fb_device *fbdev = to_au1100fb_device(fbi); + struct au1100fb_device *fbdev; unsigned int len; unsigned long start=0, off; + fbdev = to_au1100fb_device(fbi); + if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) { return -EINVAL; } @@ -467,7 +474,7 @@ if (!request_mem_region(au1100fb_fix.mmio_start, au1100fb_fix.mmio_len, DRIVER_NAME)) { - print_err("fail to lock memory region at 0x%08x", + print_err("fail to lock memory region at 0x%08lx", au1100fb_fix.mmio_start); return -EBUSY; } @@ -595,13 +602,13 @@ return 0; } -int au1100fb_drv_suspend(struct device *dev, u32 state, u32 level) +int au1100fb_drv_suspend(struct device *dev, pm_message_t state) { /* TODO */ return 0; } -int au1100fb_drv_resume(struct device *dev, u32 level) +int au1100fb_drv_resume(struct device *dev) { /* TODO */ return 0; diff -urN linux-2.6.17-rc5/drivers/video/console/fbcon.c linux-2.6.17-rc6/drivers/video/console/fbcon.c --- linux-2.6.17-rc5/drivers/video/console/fbcon.c 2006-06-06 01:27:31.759766417 +0000 +++ linux-2.6.17-rc6/drivers/video/console/fbcon.c 2006-06-06 01:27:36.656293260 +0000 @@ -2631,7 +2631,7 @@ scr_memcpyw((u16 *) q, (u16 *) p, vc->vc_size_row); } - softback_in = p; + softback_in = softback_curr = p; update_region(vc, vc->vc_origin, logo_lines * vc->vc_cols); } diff -urN linux-2.6.17-rc5/drivers/video/maxinefb.c linux-2.6.17-rc6/drivers/video/maxinefb.c --- linux-2.6.17-rc5/drivers/video/maxinefb.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/drivers/video/maxinefb.c 2006-06-06 01:27:36.668294551 +0000 @@ -55,7 +55,7 @@ }; static struct fb_fix_screeninfo maxinefb_fix = { - .id = "Maxine onboard graphics 1024x768x8", + .id = "Maxine", .smem_len = (1024*768), .type = FB_TYPE_PACKED_PIXELS, .visual = FB_VISUAL_PSEUDOCOLOR, @@ -107,8 +107,6 @@ static struct fb_ops maxinefb_ops = { .owner = THIS_MODULE, - .fb_get_fix = gen_get_fix, - .fb_get_var = gen_get_var, .fb_setcolreg = maxinefb_setcolreg, .fb_fillrect = cfb_fillrect, .fb_copyarea = cfb_copyarea, diff -urN linux-2.6.17-rc5/fs/affs/namei.c linux-2.6.17-rc6/fs/affs/namei.c --- linux-2.6.17-rc5/fs/affs/namei.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/fs/affs/namei.c 2006-06-06 01:27:36.704298425 +0000 @@ -416,10 +416,9 @@ return retval; } - retval = -EIO; bh = affs_bread(sb, old_dentry->d_inode->i_ino); if (!bh) - goto done; + return -EIO; /* Remove header from its parent directory. */ affs_lock_dir(old_dir); diff -urN linux-2.6.17-rc5/fs/cifs/CHANGES linux-2.6.17-rc6/fs/cifs/CHANGES --- linux-2.6.17-rc5/fs/cifs/CHANGES 2006-06-06 01:27:31.819772873 +0000 +++ linux-2.6.17-rc6/fs/cifs/CHANGES 2006-06-06 01:27:36.716299716 +0000 @@ -1,3 +1,10 @@ +Version 1.43 +------------ +POSIX locking to servers which support CIFS POSIX Extensions +(disabled by default controlled by proc/fs/cifs/Experimental). +Handle conversion of long share names (especially Asian languages) +to Unicode during mount. + Version 1.42 ------------ Fix slow oplock break when mounted to different servers at the same time and diff -urN linux-2.6.17-rc5/fs/cifs/cifsfs.h linux-2.6.17-rc6/fs/cifs/cifsfs.h --- linux-2.6.17-rc5/fs/cifs/cifsfs.h 2006-06-06 01:27:31.823773304 +0000 +++ linux-2.6.17-rc6/fs/cifs/cifsfs.h 2006-06-06 01:27:36.720300147 +0000 @@ -99,5 +99,5 @@ extern ssize_t cifs_listxattr(struct dentry *, char *, size_t); extern int cifs_ioctl (struct inode * inode, struct file * filep, unsigned int command, unsigned long arg); -#define CIFS_VERSION "1.42" +#define CIFS_VERSION "1.43" #endif /* _CIFSFS_H */ diff -urN linux-2.6.17-rc5/fs/cifs/cifsproto.h linux-2.6.17-rc6/fs/cifs/cifsproto.h --- linux-2.6.17-rc5/fs/cifs/cifsproto.h 2006-06-06 01:27:31.823773304 +0000 +++ linux-2.6.17-rc6/fs/cifs/cifsproto.h 2006-06-06 01:27:36.720300147 +0000 @@ -267,7 +267,7 @@ const int waitFlag); extern int CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, const __u16 smb_file_id, const int get_flag, - const __u64 len, const __u64 offset, + const __u64 len, struct file_lock *, const __u16 lock_type, const int waitFlag); extern int CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon); extern int CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses); diff -urN linux-2.6.17-rc5/fs/cifs/cifssmb.c linux-2.6.17-rc6/fs/cifs/cifssmb.c --- linux-2.6.17-rc5/fs/cifs/cifssmb.c 2006-06-06 01:27:31.827773734 +0000 +++ linux-2.6.17-rc6/fs/cifs/cifssmb.c 2006-06-06 01:27:36.720300147 +0000 @@ -1355,7 +1355,8 @@ int CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, const __u16 smb_file_id, const int get_flag, const __u64 len, - const __u64 lkoffset, const __u16 lock_type, const int waitFlag) + struct file_lock *pLockData, const __u16 lock_type, + const int waitFlag) { struct smb_com_transaction2_sfi_req *pSMB = NULL; struct smb_com_transaction2_sfi_rsp *pSMBr = NULL; @@ -1366,6 +1367,10 @@ __u16 params, param_offset, offset, byte_count, count; cFYI(1, ("Posix Lock")); + + if(pLockData == NULL) + return EINVAL; + rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); if (rc) @@ -1404,10 +1409,10 @@ parm_data->lock_type = cpu_to_le16(lock_type); if(waitFlag) - parm_data->lock_flags = 1; + parm_data->lock_flags = cpu_to_le16(1); parm_data->pid = cpu_to_le32(current->tgid); - parm_data->start = lkoffset; - parm_data->length = len; /* normalize negative numbers */ + parm_data->start = cpu_to_le64(pLockData->fl_start); + parm_data->length = cpu_to_le64(len); /* normalize negative numbers */ pSMB->DataOffset = cpu_to_le16(offset); pSMB->Fid = smb_file_id; @@ -1419,8 +1424,33 @@ (struct smb_hdr *) pSMBr, &bytes_returned, 0); if (rc) { cFYI(1, ("Send error in Posix Lock = %d", rc)); - } + } else if (get_flag) { + /* lock structure can be returned on get */ + __u16 data_offset; + __u16 data_count; + rc = validate_t2((struct smb_t2_rsp *)pSMBr); + if (rc || (pSMBr->ByteCount < sizeof(struct cifs_posix_lock))) { + rc = -EIO; /* bad smb */ + goto plk_err_exit; + } + if(pLockData == NULL) { + rc = -EINVAL; + goto plk_err_exit; + } + data_offset = le16_to_cpu(pSMBr->t2.DataOffset); + data_count = le16_to_cpu(pSMBr->t2.DataCount); + if(data_count < sizeof(struct cifs_posix_lock)) { + rc = -EIO; + goto plk_err_exit; + } + parm_data = (struct cifs_posix_lock *) + ((char *)&pSMBr->hdr.Protocol + data_offset); + if(parm_data->lock_type == cpu_to_le16(CIFS_UNLCK)) + pLockData->fl_type = F_UNLCK; + } + +plk_err_exit: if (pSMB) cifs_small_buf_release(pSMB); diff -urN linux-2.6.17-rc5/fs/cifs/connect.c linux-2.6.17-rc6/fs/cifs/connect.c --- linux-2.6.17-rc5/fs/cifs/connect.c 2006-06-06 01:27:31.827773734 +0000 +++ linux-2.6.17-rc6/fs/cifs/connect.c 2006-06-06 01:27:36.724300577 +0000 @@ -2148,6 +2148,8 @@ /* We look for obvious messed up bcc or strings in response so we do not go off the end since (at least) WIN2K and Windows XP have a major bug in not null terminating last Unicode string in response */ + if(ses->serverOS) + kfree(ses->serverOS); ses->serverOS = kzalloc(2 * (len + 1), GFP_KERNEL); if(ses->serverOS == NULL) goto sesssetup_nomem; @@ -2160,6 +2162,8 @@ if (remaining_words > 0) { len = UniStrnlen((wchar_t *)bcc_ptr, remaining_words-1); + if(ses->serverNOS) + kfree(ses->serverNOS); ses->serverNOS = kzalloc(2 * (len + 1),GFP_KERNEL); if(ses->serverNOS == NULL) goto sesssetup_nomem; @@ -2177,6 +2181,8 @@ if (remaining_words > 0) { len = UniStrnlen((wchar_t *) bcc_ptr, remaining_words); /* last string is not always null terminated (for e.g. for Windows XP & 2000) */ + if(ses->serverDomain) + kfree(ses->serverDomain); ses->serverDomain = kzalloc(2*(len+1),GFP_KERNEL); if(ses->serverDomain == NULL) @@ -2187,15 +2193,22 @@ ses->serverDomain[2*len] = 0; ses->serverDomain[1+(2*len)] = 0; } /* else no more room so create dummy domain string */ - else + else { + if(ses->serverDomain) + kfree(ses->serverDomain); ses->serverDomain = kzalloc(2, GFP_KERNEL); + } } else { /* no room so create dummy domain and NOS string */ /* if these kcallocs fail not much we can do, but better to not fail the sesssetup itself */ + if(ses->serverDomain) + kfree(ses->serverDomain); ses->serverDomain = kzalloc(2, GFP_KERNEL); + if(ses->serverNOS) + kfree(ses->serverNOS); ses->serverNOS = kzalloc(2, GFP_KERNEL); } @@ -2204,6 +2217,8 @@ if (((long) bcc_ptr + len) - (long) pByteArea(smb_buffer_response) <= BCC(smb_buffer_response)) { + if(ses->serverOS) + kfree(ses->serverOS); ses->serverOS = kzalloc(len + 1,GFP_KERNEL); if(ses->serverOS == NULL) goto sesssetup_nomem; @@ -2214,6 +2229,8 @@ bcc_ptr++; len = strnlen(bcc_ptr, 1024); + if(ses->serverNOS) + kfree(ses->serverNOS); ses->serverNOS = kzalloc(len + 1,GFP_KERNEL); if(ses->serverNOS == NULL) goto sesssetup_nomem; @@ -2223,6 +2240,8 @@ bcc_ptr++; len = strnlen(bcc_ptr, 1024); + if(ses->serverDomain) + kfree(ses->serverDomain); ses->serverDomain = kzalloc(len + 1,GFP_KERNEL); if(ses->serverDomain == NULL) goto sesssetup_nomem; @@ -2427,6 +2446,8 @@ /* We look for obvious messed up bcc or strings in response so we do not go off the end since (at least) WIN2K and Windows XP have a major bug in not null terminating last Unicode string in response */ + if(ses->serverOS) + kfree(ses->serverOS); ses->serverOS = kzalloc(2 * (len + 1), GFP_KERNEL); cifs_strfromUCS_le(ses->serverOS, @@ -2441,6 +2462,8 @@ len = UniStrnlen((wchar_t *)bcc_ptr, remaining_words - 1); + if(ses->serverNOS) + kfree(ses->serverNOS); ses->serverNOS = kzalloc(2 * (len + 1), GFP_KERNEL); @@ -2454,7 +2477,9 @@ remaining_words -= len + 1; if (remaining_words > 0) { len = UniStrnlen((wchar_t *) bcc_ptr, remaining_words); - /* last string is not always null terminated (for e.g. for Windows XP & 2000) */ + /* last string not null terminated (e.g.Windows XP/2000) */ + if(ses->serverDomain) + kfree(ses->serverDomain); ses->serverDomain = kzalloc(2*(len+1),GFP_KERNEL); cifs_strfromUCS_le(ses->serverDomain, (__le16 *)bcc_ptr, @@ -2463,11 +2488,18 @@ ses->serverDomain[2*len] = 0; ses->serverDomain[1+(2*len)] = 0; } /* else no more room so create dummy domain string */ - else + else { + if(ses->serverDomain) + kfree(ses->serverDomain); ses->serverDomain = kzalloc(2,GFP_KERNEL); - } else { /* no room so create dummy domain and NOS string */ + } + } else {/* no room use dummy domain&NOS */ + if(ses->serverDomain) + kfree(ses->serverDomain); ses->serverDomain = kzalloc(2, GFP_KERNEL); + if(ses->serverNOS) + kfree(ses->serverNOS); ses->serverNOS = kzalloc(2, GFP_KERNEL); } } else { /* ASCII */ @@ -2476,6 +2508,8 @@ if (((long) bcc_ptr + len) - (long) pByteArea(smb_buffer_response) <= BCC(smb_buffer_response)) { + if(ses->serverOS) + kfree(ses->serverOS); ses->serverOS = kzalloc(len + 1, GFP_KERNEL); strncpy(ses->serverOS, bcc_ptr, len); @@ -2484,6 +2518,8 @@ bcc_ptr++; len = strnlen(bcc_ptr, 1024); + if(ses->serverNOS) + kfree(ses->serverNOS); ses->serverNOS = kzalloc(len + 1,GFP_KERNEL); strncpy(ses->serverNOS, bcc_ptr, len); bcc_ptr += len; @@ -2491,6 +2527,8 @@ bcc_ptr++; len = strnlen(bcc_ptr, 1024); + if(ses->serverDomain) + kfree(ses->serverDomain); ses->serverDomain = kzalloc(len + 1, GFP_KERNEL); strncpy(ses->serverDomain, bcc_ptr, len); bcc_ptr += len; @@ -2728,6 +2766,8 @@ /* We look for obvious messed up bcc or strings in response so we do not go off the end since (at least) WIN2K and Windows XP have a major bug in not null terminating last Unicode string in response */ + if(ses->serverOS) + kfree(ses->serverOS); ses->serverOS = kzalloc(2 * (len + 1), GFP_KERNEL); cifs_strfromUCS_le(ses->serverOS, @@ -2743,6 +2783,8 @@ bcc_ptr, remaining_words - 1); + if(ses->serverNOS) + kfree(ses->serverNOS); ses->serverNOS = kzalloc(2 * (len + 1), GFP_KERNEL); @@ -2760,6 +2802,8 @@ if (remaining_words > 0) { len = UniStrnlen((wchar_t *) bcc_ptr, remaining_words); /* last string is not always null terminated (for e.g. for Windows XP & 2000) */ + if(ses->serverDomain) + kfree(ses->serverDomain); ses->serverDomain = kzalloc(2 * (len + @@ -2777,13 +2821,20 @@ [1 + (2 * len)] = 0; } /* else no more room so create dummy domain string */ - else + else { + if(ses->serverDomain) + kfree(ses->serverDomain); ses->serverDomain = kzalloc(2, GFP_KERNEL); + } } else { /* no room so create dummy domain and NOS string */ + if(ses->serverDomain); + kfree(ses->serverDomain); ses->serverDomain = kzalloc(2, GFP_KERNEL); + if(ses->serverNOS) + kfree(ses->serverNOS); ses->serverNOS = kzalloc(2, GFP_KERNEL); } @@ -2792,6 +2843,8 @@ if (((long) bcc_ptr + len) - (long) pByteArea(smb_buffer_response) <= BCC(smb_buffer_response)) { + if(ses->serverOS) + kfree(ses->serverOS); ses->serverOS = kzalloc(len + 1, GFP_KERNEL); @@ -2803,6 +2856,8 @@ bcc_ptr++; len = strnlen(bcc_ptr, 1024); + if(ses->serverNOS) + kfree(ses->serverNOS); ses->serverNOS = kzalloc(len + 1, GFP_KERNEL); @@ -2812,6 +2867,8 @@ bcc_ptr++; len = strnlen(bcc_ptr, 1024); + if(ses->serverDomain) + kfree(ses->serverDomain); ses->serverDomain = kzalloc(len + 1, GFP_KERNEL); @@ -3116,6 +3173,8 @@ /* We look for obvious messed up bcc or strings in response so we do not go off the end since (at least) WIN2K and Windows XP have a major bug in not null terminating last Unicode string in response */ + if(ses->serverOS) + kfree(ses->serverOS); ses->serverOS = kzalloc(2 * (len + 1), GFP_KERNEL); cifs_strfromUCS_le(ses->serverOS, @@ -3131,6 +3190,8 @@ bcc_ptr, remaining_words - 1); + if(ses->serverNOS) + kfree(ses->serverNOS); ses->serverNOS = kzalloc(2 * (len + 1), GFP_KERNEL); @@ -3147,6 +3208,8 @@ if (remaining_words > 0) { len = UniStrnlen((wchar_t *) bcc_ptr, remaining_words); /* last string not always null terminated (e.g. for Windows XP & 2000) */ + if(ses->serverDomain) + kfree(ses->serverDomain); ses->serverDomain = kzalloc(2 * (len + @@ -3172,10 +3235,17 @@ len)] = 0; } /* else no more room so create dummy domain string */ - else + else { + if(ses->serverDomain) + kfree(ses->serverDomain); ses->serverDomain = kzalloc(2,GFP_KERNEL); + } } else { /* no room so create dummy domain and NOS string */ + if(ses->serverDomain) + kfree(ses->serverDomain); ses->serverDomain = kzalloc(2, GFP_KERNEL); + if(ses->serverNOS) + kfree(ses->serverNOS); ses->serverNOS = kzalloc(2, GFP_KERNEL); } } else { /* ASCII */ @@ -3183,6 +3253,8 @@ if (((long) bcc_ptr + len) - (long) pByteArea(smb_buffer_response) <= BCC(smb_buffer_response)) { + if(ses->serverOS) + kfree(ses->serverOS); ses->serverOS = kzalloc(len + 1,GFP_KERNEL); strncpy(ses->serverOS,bcc_ptr, len); @@ -3191,6 +3263,8 @@ bcc_ptr++; len = strnlen(bcc_ptr, 1024); + if(ses->serverNOS) + kfree(ses->serverNOS); ses->serverNOS = kzalloc(len+1,GFP_KERNEL); strncpy(ses->serverNOS, bcc_ptr, len); bcc_ptr += len; @@ -3198,6 +3272,8 @@ bcc_ptr++; len = strnlen(bcc_ptr, 1024); + if(ses->serverDomain) + kfree(ses->serverDomain); ses->serverDomain = kzalloc(len+1,GFP_KERNEL); strncpy(ses->serverDomain, bcc_ptr, len); bcc_ptr += len; @@ -3282,7 +3358,8 @@ bcc_ptr++; /* align */ } - if(ses->server->secMode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) + if(ses->server->secMode & + (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE; if (ses->capabilities & CAP_STATUS32) { @@ -3294,8 +3371,10 @@ if (ses->capabilities & CAP_UNICODE) { smb_buffer->Flags2 |= SMBFLG2_UNICODE; length = - cifs_strtoUCS((__le16 *) bcc_ptr, tree, 100, nls_codepage); - bcc_ptr += 2 * length; /* convert num of 16 bit words to bytes */ + cifs_strtoUCS((__le16 *) bcc_ptr, tree, + 6 /* max utf8 char length in bytes */ * + (/* server len*/ + 256 /* share len */), nls_codepage); + bcc_ptr += 2 * length; /* convert num 16 bit words to bytes */ bcc_ptr += 2; /* skip trailing null */ } else { /* ASCII */ strcpy(bcc_ptr, tree); diff -urN linux-2.6.17-rc5/fs/cifs/file.c linux-2.6.17-rc6/fs/cifs/file.c --- linux-2.6.17-rc5/fs/cifs/file.c 2006-06-06 01:27:31.827773734 +0000 +++ linux-2.6.17-rc6/fs/cifs/file.c 2006-06-06 01:27:36.724300577 +0000 @@ -84,6 +84,8 @@ return FILE_OVERWRITE_IF; else if ((flags & O_CREAT) == O_CREAT) return FILE_OPEN_IF; + else if ((flags & O_TRUNC) == O_TRUNC) + return FILE_OVERWRITE; else return FILE_OPEN; } @@ -656,7 +658,7 @@ else posix_lock_type = CIFS_WRLCK; rc = CIFSSMBPosixLock(xid, pTcon, netfid, 1 /* get */, - length, pfLock->fl_start, + length, pfLock, posix_lock_type, wait_flag); FreeXid(xid); return rc; @@ -704,7 +706,7 @@ return -EOPNOTSUPP; } rc = CIFSSMBPosixLock(xid, pTcon, netfid, 0 /* set */, - length, pfLock->fl_start, + length, pfLock, posix_lock_type, wait_flag); } else rc = CIFSSMBLock(xid, pTcon, netfid, length, pfLock->fl_start, @@ -904,8 +906,10 @@ if (rc != 0) break; } - if(experimEnabled || (pTcon->ses->server->secMode & - (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) == 0) { + if(experimEnabled || (pTcon->ses->server && + ((pTcon->ses->server->secMode & + (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) + == 0))) { struct kvec iov[2]; unsigned int len; diff -urN linux-2.6.17-rc5/fs/ext3/resize.c linux-2.6.17-rc6/fs/ext3/resize.c --- linux-2.6.17-rc5/fs/ext3/resize.c 2006-06-06 01:27:31.847775886 +0000 +++ linux-2.6.17-rc6/fs/ext3/resize.c 2006-06-06 01:27:36.744302729 +0000 @@ -767,7 +767,6 @@ if (input->group != sbi->s_groups_count) { ext3_warning(sb, __FUNCTION__, "multiple resizers run on filesystem!"); - unlock_super(sb); err = -EBUSY; goto exit_journal; } diff -urN linux-2.6.17-rc5/fs/namei.c linux-2.6.17-rc6/fs/namei.c --- linux-2.6.17-rc5/fs/namei.c 2006-06-06 01:27:31.887780190 +0000 +++ linux-2.6.17-rc6/fs/namei.c 2006-06-06 01:27:36.784307034 +0000 @@ -1080,8 +1080,8 @@ nd->flags = flags; nd->depth = 0; - read_lock(¤t->fs->lock); if (*name=='/') { + read_lock(¤t->fs->lock); if (current->fs->altroot && !(nd->flags & LOOKUP_NOALT)) { nd->mnt = mntget(current->fs->altrootmnt); nd->dentry = dget(current->fs->altroot); @@ -1092,33 +1092,35 @@ } nd->mnt = mntget(current->fs->rootmnt); nd->dentry = dget(current->fs->root); + read_unlock(¤t->fs->lock); } else if (dfd == AT_FDCWD) { + read_lock(¤t->fs->lock); nd->mnt = mntget(current->fs->pwdmnt); nd->dentry = dget(current->fs->pwd); + read_unlock(¤t->fs->lock); } else { struct dentry *dentry; file = fget_light(dfd, &fput_needed); retval = -EBADF; if (!file) - goto unlock_fail; + goto out_fail; dentry = file->f_dentry; retval = -ENOTDIR; if (!S_ISDIR(dentry->d_inode->i_mode)) - goto fput_unlock_fail; + goto fput_fail; retval = file_permission(file, MAY_EXEC); if (retval) - goto fput_unlock_fail; + goto fput_fail; nd->mnt = mntget(file->f_vfsmnt); nd->dentry = dget(dentry); fput_light(file, fput_needed); } - read_unlock(¤t->fs->lock); current->total_link_count = 0; retval = link_path_walk(name, nd); out: @@ -1127,13 +1129,12 @@ nd->dentry->d_inode)) audit_inode(name, nd->dentry->d_inode, flags); } +out_fail: return retval; -fput_unlock_fail: +fput_fail: fput_light(file, fput_needed); -unlock_fail: - read_unlock(¤t->fs->lock); - return retval; + goto out_fail; } int fastcall path_lookup(const char *name, unsigned int flags, diff -urN linux-2.6.17-rc5/include/asm-alpha/smp.h linux-2.6.17-rc6/include/asm-alpha/smp.h --- linux-2.6.17-rc5/include/asm-alpha/smp.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/include/asm-alpha/smp.h 2006-06-06 01:27:36.940323820 +0000 @@ -45,10 +45,8 @@ #define hard_smp_processor_id() __hard_smp_processor_id() #define raw_smp_processor_id() (current_thread_info()->cpu) -extern cpumask_t cpu_present_mask; -extern cpumask_t cpu_online_map; extern int smp_num_cpus; -#define cpu_possible_map cpu_present_mask +#define cpu_possible_map cpu_present_map int smp_call_function_on_cpu(void (*func) (void *info), void *info,int retry, int wait, cpumask_t cpu); diff -urN linux-2.6.17-rc5/include/asm-alpha/termbits.h linux-2.6.17-rc6/include/asm-alpha/termbits.h --- linux-2.6.17-rc5/include/asm-alpha/termbits.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/include/asm-alpha/termbits.h 2006-06-06 01:27:36.940323820 +0000 @@ -148,6 +148,7 @@ #define HUPCL 00040000 #define CLOCAL 00100000 +#define CMSPAR 010000000000 /* mark or space (stick) parity */ #define CRTSCTS 020000000000 /* flow control */ /* c_lflag bits */ diff -urN linux-2.6.17-rc5/include/asm-arm/arch-ixp23xx/memory.h linux-2.6.17-rc6/include/asm-arm/arch-ixp23xx/memory.h --- linux-2.6.17-rc5/include/asm-arm/arch-ixp23xx/memory.h 2006-06-06 01:27:32.027795255 +0000 +++ linux-2.6.17-rc6/include/asm-arm/arch-ixp23xx/memory.h 2006-06-06 01:27:36.956325542 +0000 @@ -49,7 +49,7 @@ { extern unsigned int processor_id; - if (((processor_id & 15) >= 2) || machine_is_roadrunner()) + if (((processor_id & 15) >= 4) || machine_is_roadrunner()) return 1; return 0; diff -urN linux-2.6.17-rc5/include/asm-arm/arch-l7200/serial_l7200.h linux-2.6.17-rc6/include/asm-arm/arch-l7200/serial_l7200.h --- linux-2.6.17-rc5/include/asm-arm/arch-l7200/serial_l7200.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/include/asm-arm/arch-l7200/serial_l7200.h 2006-06-06 01:27:36.960325973 +0000 @@ -28,7 +28,7 @@ #define UARTDR 0x00 /* Tx/Rx data */ #define RXSTAT 0x04 /* Rx status */ #define H_UBRLCR 0x08 /* mode register high */ -#define M_UBRLCR 0x0C /* mode reg mid (MSB of buad)*/ +#define M_UBRLCR 0x0C /* mode reg mid (MSB of baud)*/ #define L_UBRLCR 0x10 /* mode reg low (LSB of baud)*/ #define UARTCON 0x14 /* control register */ #define UARTFLG 0x18 /* flag register */ diff -urN linux-2.6.17-rc5/include/asm-arm/arch-l7200/uncompress.h linux-2.6.17-rc6/include/asm-arm/arch-l7200/uncompress.h --- linux-2.6.17-rc5/include/asm-arm/arch-l7200/uncompress.h 2006-06-06 01:27:32.031795686 +0000 +++ linux-2.6.17-rc6/include/asm-arm/arch-l7200/uncompress.h 2006-06-06 01:27:36.960325973 +0000 @@ -6,7 +6,7 @@ * Changelog: * 05-01-2000 SJH Created * 05-13-2000 SJH Filled in function bodies - * 07-26-2000 SJH Removed hard coded buad rate + * 07-26-2000 SJH Removed hard coded baud rate */ #include diff -urN linux-2.6.17-rc5/include/asm-arm/system.h linux-2.6.17-rc6/include/asm-arm/system.h --- linux-2.6.17-rc5/include/asm-arm/system.h 2006-06-06 01:27:32.051797838 +0000 +++ linux-2.6.17-rc6/include/asm-arm/system.h 2006-06-06 01:27:36.984328555 +0000 @@ -127,6 +127,12 @@ } #endif +#if !defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_CPU_XSC3) +#define cpu_is_xscale() 0 +#else +#define cpu_is_xscale() 1 +#endif + #define set_cr(x) \ __asm__ __volatile__( \ "mcr p15, 0, %0, c1, c0, 0 @ set CR" \ diff -urN linux-2.6.17-rc5/include/asm-generic/pgtable.h linux-2.6.17-rc6/include/asm-generic/pgtable.h --- linux-2.6.17-rc5/include/asm-generic/pgtable.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/include/asm-generic/pgtable.h 2006-06-06 01:27:36.988328986 +0000 @@ -159,17 +159,8 @@ #define lazy_mmu_prot_update(pte) do { } while (0) #endif -#ifndef __HAVE_ARCH_MULTIPLE_ZERO_PAGE +#ifndef __HAVE_ARCH_MOVE_PTE #define move_pte(pte, prot, old_addr, new_addr) (pte) -#else -#define move_pte(pte, prot, old_addr, new_addr) \ -({ \ - pte_t newpte = (pte); \ - if (pte_present(pte) && pfn_valid(pte_pfn(pte)) && \ - pte_page(pte) == ZERO_PAGE(old_addr)) \ - newpte = mk_pte(ZERO_PAGE(new_addr), (prot)); \ - newpte; \ -}) #endif /* diff -urN linux-2.6.17-rc5/include/asm-mips/addrspace.h linux-2.6.17-rc6/include/asm-mips/addrspace.h --- linux-2.6.17-rc5/include/asm-mips/addrspace.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/include/asm-mips/addrspace.h 2006-06-06 01:27:37.012331568 +0000 @@ -129,6 +129,7 @@ #if defined (CONFIG_CPU_R4300) \ || defined (CONFIG_CPU_R4X00) \ || defined (CONFIG_CPU_R5000) \ + || defined (CONFIG_CPU_RM7000) \ || defined (CONFIG_CPU_NEVADA) \ || defined (CONFIG_CPU_TX49XX) \ || defined (CONFIG_CPU_MIPS64) diff -urN linux-2.6.17-rc5/include/asm-mips/cpu.h linux-2.6.17-rc6/include/asm-mips/cpu.h --- linux-2.6.17-rc5/include/asm-mips/cpu.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/include/asm-mips/cpu.h 2006-06-06 01:27:37.016331999 +0000 @@ -51,6 +51,7 @@ #define PRID_IMP_R4300 0x0b00 #define PRID_IMP_VR41XX 0x0c00 #define PRID_IMP_R12000 0x0e00 +#define PRID_IMP_R14000 0x0f00 #define PRID_IMP_R8000 0x1000 #define PRID_IMP_PR4450 0x1200 #define PRID_IMP_R4600 0x2000 @@ -87,6 +88,7 @@ #define PRID_IMP_24K 0x9300 #define PRID_IMP_34K 0x9500 #define PRID_IMP_24KE 0x9600 +#define PRID_IMP_74K 0x9700 /* * These are the PRID's for when 23:16 == PRID_COMP_SIBYTE @@ -196,7 +198,9 @@ #define CPU_34K 60 #define CPU_PR4450 61 #define CPU_SB1A 62 -#define CPU_LAST 62 +#define CPU_74K 63 +#define CPU_R14000 64 +#define CPU_LAST 64 /* * ISA Level encodings diff -urN linux-2.6.17-rc5/include/asm-mips/delay.h linux-2.6.17-rc6/include/asm-mips/delay.h --- linux-2.6.17-rc5/include/asm-mips/delay.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/include/asm-mips/delay.h 2006-06-06 01:27:37.016331999 +0000 @@ -19,20 +19,22 @@ { if (sizeof(long) == 4) __asm__ __volatile__ ( - ".set\tnoreorder\n" - "1:\tbnez\t%0,1b\n\t" - "subu\t%0,1\n\t" - ".set\treorder" + " .set noreorder \n" + " .align 3 \n" + "1: bnez %0, 1b \n" + " subu %0, 1 \n" + " .set reorder \n" : "=r" (loops) : "0" (loops)); else if (sizeof(long) == 8) __asm__ __volatile__ ( - ".set\tnoreorder\n" - "1:\tbnez\t%0,1b\n\t" - "dsubu\t%0,1\n\t" - ".set\treorder" - :"=r" (loops) - :"0" (loops)); + " .set noreorder \n" + " .align 3 \n" + "1: bnez %0, 1b \n" + " dsubu %0, 1 \n" + " .set reorder \n" + : "=r" (loops) + : "0" (loops)); } diff -urN linux-2.6.17-rc5/include/asm-mips/futex.h linux-2.6.17-rc6/include/asm-mips/futex.h --- linux-2.6.17-rc5/include/asm-mips/futex.h 2006-06-06 01:27:32.083801281 +0000 +++ linux-2.6.17-rc6/include/asm-mips/futex.h 2006-06-06 01:27:37.016331999 +0000 @@ -7,6 +7,7 @@ #include #include #include +#include #ifdef CONFIG_SMP #define __FUTEX_SMP_SYNC " sync \n" @@ -16,30 +17,58 @@ #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ { \ - __asm__ __volatile__( \ - " .set push \n" \ - " .set noat \n" \ - " .set mips3 \n" \ - "1: ll %1, (%3) # __futex_atomic_op1 \n" \ - " .set mips0 \n" \ - " " insn " \n" \ - " .set mips3 \n" \ - "2: sc $1, (%3) \n" \ - " beqzl $1, 1b \n" \ - __FUTEX_SMP_SYNC \ - "3: \n" \ - " .set pop \n" \ - " .set mips0 \n" \ - " .section .fixup,\"ax\" \n" \ - "4: li %0, %5 \n" \ - " j 2b \n" \ - " .previous \n" \ - " .section __ex_table,\"a\" \n" \ - " "__UA_ADDR "\t1b, 4b \n" \ - " "__UA_ADDR "\t2b, 4b \n" \ - " .previous \n" \ - : "=r" (ret), "=r" (oldval) \ - : "0" (0), "r" (uaddr), "Jr" (oparg), "i" (-EFAULT)); \ + if (cpu_has_llsc && R10000_LLSC_WAR) { \ + __asm__ __volatile__( \ + " .set push \n" \ + " .set noat \n" \ + " .set mips3 \n" \ + "1: ll %1, (%3) # __futex_atomic_op \n" \ + " .set mips0 \n" \ + " " insn " \n" \ + " .set mips3 \n" \ + "2: sc $1, (%3) \n" \ + " beqzl $1, 1b \n" \ + __FUTEX_SMP_SYNC \ + "3: \n" \ + " .set pop \n" \ + " .set mips0 \n" \ + " .section .fixup,\"ax\" \n" \ + "4: li %0, %5 \n" \ + " j 2b \n" \ + " .previous \n" \ + " .section __ex_table,\"a\" \n" \ + " "__UA_ADDR "\t1b, 4b \n" \ + " "__UA_ADDR "\t2b, 4b \n" \ + " .previous \n" \ + : "=r" (ret), "=r" (oldval) \ + : "0" (0), "r" (uaddr), "Jr" (oparg), "i" (-EFAULT)); \ + } else if (cpu_has_llsc) { \ + __asm__ __volatile__( \ + " .set push \n" \ + " .set noat \n" \ + " .set mips3 \n" \ + "1: ll %1, (%3) # __futex_atomic_op \n" \ + " .set mips0 \n" \ + " " insn " \n" \ + " .set mips3 \n" \ + "2: sc $1, (%3) \n" \ + " beqz $1, 1b \n" \ + __FUTEX_SMP_SYNC \ + "3: \n" \ + " .set pop \n" \ + " .set mips0 \n" \ + " .section .fixup,\"ax\" \n" \ + "4: li %0, %5 \n" \ + " j 2b \n" \ + " .previous \n" \ + " .section __ex_table,\"a\" \n" \ + " "__UA_ADDR "\t1b, 4b \n" \ + " "__UA_ADDR "\t2b, 4b \n" \ + " .previous \n" \ + : "=r" (ret), "=r" (oldval) \ + : "0" (0), "r" (uaddr), "Jr" (oparg), "i" (-EFAULT)); \ + } else \ + ret = -ENOSYS; \ } static inline int @@ -102,7 +131,69 @@ static inline int futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) { - return -ENOSYS; + int retval; + + if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) + return -EFAULT; + + if (cpu_has_llsc && R10000_LLSC_WAR) { + __asm__ __volatile__( + "# futex_atomic_cmpxchg_inatomic \n" + " .set push \n" + " .set noat \n" + " .set mips3 \n" + "1: ll %0, %2 \n" + " bne %0, %z3, 3f \n" + " .set mips0 \n" + " move $1, %z4 \n" + " .set mips3 \n" + "2: sc $1, %1 \n" + " beqzl $1, 1b \n" + __FUTEX_SMP_SYNC + "3: \n" + " .set pop \n" + " .section .fixup,\"ax\" \n" + "4: li %0, %5 \n" + " j 3b \n" + " .previous \n" + " .section __ex_table,\"a\" \n" + " "__UA_ADDR "\t1b, 4b \n" + " "__UA_ADDR "\t2b, 4b \n" + " .previous \n" + : "=&r" (retval), "=R" (*uaddr) + : "R" (*uaddr), "Jr" (oldval), "Jr" (newval), "i" (-EFAULT) + : "memory"); + } else if (cpu_has_llsc) { + __asm__ __volatile__( + "# futex_atomic_cmpxchg_inatomic \n" + " .set push \n" + " .set noat \n" + " .set mips3 \n" + "1: ll %0, %2 \n" + " bne %0, %z3, 3f \n" + " .set mips0 \n" + " move $1, %z4 \n" + " .set mips3 \n" + "2: sc $1, %1 \n" + " beqz $1, 1b \n" + __FUTEX_SMP_SYNC + "3: \n" + " .set pop \n" + " .section .fixup,\"ax\" \n" + "4: li %0, %5 \n" + " j 3b \n" + " .previous \n" + " .section __ex_table,\"a\" \n" + " "__UA_ADDR "\t1b, 4b \n" + " "__UA_ADDR "\t2b, 4b \n" + " .previous \n" + : "=&r" (retval), "=R" (*uaddr) + : "R" (*uaddr), "Jr" (oldval), "Jr" (newval), "i" (-EFAULT) + : "memory"); + } else + return -ENOSYS; + + return retval; } #endif diff -urN linux-2.6.17-rc5/include/asm-mips/inst.h linux-2.6.17-rc6/include/asm-mips/inst.h --- linux-2.6.17-rc5/include/asm-mips/inst.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/include/asm-mips/inst.h 2006-06-06 01:27:37.016331999 +0000 @@ -6,6 +6,7 @@ * for more details. * * Copyright (C) 1996, 2000 by Ralf Baechle + * Copyright (C) 2006 by Thiemo Seufer */ #ifndef _ASM_INST_H #define _ASM_INST_H @@ -21,14 +22,14 @@ cop0_op, cop1_op, cop2_op, cop1x_op, beql_op, bnel_op, blezl_op, bgtzl_op, daddi_op, daddiu_op, ldl_op, ldr_op, - major_1c_op, jalx_op, major_1e_op, major_1f_op, + spec2_op, jalx_op, mdmx_op, spec3_op, lb_op, lh_op, lwl_op, lw_op, lbu_op, lhu_op, lwr_op, lwu_op, sb_op, sh_op, swl_op, sw_op, sdl_op, sdr_op, swr_op, cache_op, ll_op, lwc1_op, lwc2_op, pref_op, lld_op, ldc1_op, ldc2_op, ld_op, - sc_op, swc1_op, swc2_op, rdhwr_op, + sc_op, swc1_op, swc2_op, major_3b_op, scd_op, sdc1_op, sdc2_op, sd_op }; @@ -37,7 +38,7 @@ */ enum spec_op { sll_op, movc_op, srl_op, sra_op, - sllv_op, srlv_op, srav_op, spec1_unused_op, /* Opcode 0x07 is unused */ + sllv_op, pmon_op, srlv_op, srav_op, jr_op, jalr_op, movz_op, movn_op, syscall_op, break_op, spim_op, sync_op, mfhi_op, mthi_op, mflo_op, mtlo_op, @@ -55,6 +56,28 @@ }; /* + * func field of spec2 opcode. + */ +enum spec2_op { + madd_op, maddu_op, mul_op, spec2_3_unused_op, + msub_op, msubu_op, /* more unused ops */ + clz_op = 0x20, clo_op, + dclz_op = 0x24, dclo_op, + sdbpp_op = 0x3f +}; + +/* + * func field of spec3 opcode. + */ +enum spec3_op { + ext_op, dextm_op, dextu_op, dext_op, + ins_op, dinsm_op, dinsu_op, dins_op, + bshfl_op = 0x20, + dbshfl_op = 0x24, + rdhwr_op = 0x3f +}; + +/* * rt field of bcond opcodes. */ enum rt_op { @@ -151,8 +174,8 @@ * func field for mad opcodes (MIPS IV). */ enum mad_func { - madd_op = 0x08, msub_op = 0x0a, - nmadd_op = 0x0c, nmsub_op = 0x0e + madd_fp_op = 0x08, msub_fp_op = 0x0a, + nmadd_fp_op = 0x0c, nmsub_fp_op = 0x0e }; /* diff -urN linux-2.6.17-rc5/include/asm-mips/mipsregs.h linux-2.6.17-rc6/include/asm-mips/mipsregs.h --- linux-2.6.17-rc5/include/asm-mips/mipsregs.h 2006-06-06 01:27:32.087801712 +0000 +++ linux-2.6.17-rc6/include/asm-mips/mipsregs.h 2006-06-06 01:27:37.020332429 +0000 @@ -291,7 +291,7 @@ #define ST0_DL (_ULCAST_(1) << 24) /* - * Enable the MIPS DSP ASE + * Enable the MIPS MDMX and DSP ASEs */ #define ST0_MX 0x01000000 diff -urN linux-2.6.17-rc5/include/asm-mips/page.h linux-2.6.17-rc6/include/asm-mips/page.h --- linux-2.6.17-rc5/include/asm-mips/page.h 2006-06-06 01:27:32.087801712 +0000 +++ linux-2.6.17-rc6/include/asm-mips/page.h 2006-06-06 01:27:37.020332429 +0000 @@ -139,9 +139,11 @@ #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) +#ifndef CONFIG_SPARSEMEM #ifndef CONFIG_NEED_MULTIPLE_NODES #define pfn_valid(pfn) ((pfn) < max_mapnr) #endif +#endif #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) diff -urN linux-2.6.17-rc5/include/asm-mips/pgtable-32.h linux-2.6.17-rc6/include/asm-mips/pgtable-32.h --- linux-2.6.17-rc5/include/asm-mips/pgtable-32.h 2006-06-06 01:27:32.087801712 +0000 +++ linux-2.6.17-rc6/include/asm-mips/pgtable-32.h 2006-06-06 01:27:37.020332429 +0000 @@ -177,48 +177,67 @@ ((swp_entry_t) { ((type) << 10) | ((offset) << 15) }) /* - * Bits 0, 1, 2, 9 and 10 are taken, split up the 27 bits of offset - * into this range: + * Bits 0, 4, 8, and 9 are taken, split up 28 bits of offset into this range: */ -#define PTE_FILE_MAX_BITS 27 +#define PTE_FILE_MAX_BITS 28 -#define pte_to_pgoff(_pte) \ - ((((_pte).pte >> 3) & 0x3f ) + (((_pte).pte >> 11) << 8 )) - -#define pgoff_to_pte(off) \ - ((pte_t) { (((off) & 0x3f) << 3) + (((off) >> 8) << 11) + _PAGE_FILE }) +#define pte_to_pgoff(_pte) ((((_pte).pte >> 1 ) & 0x07) | \ + (((_pte).pte >> 2 ) & 0x38) | \ + (((_pte).pte >> 10) << 6 )) + +#define pgoff_to_pte(off) ((pte_t) { (((off) & 0x07) << 1 ) | \ + (((off) & 0x38) << 2 ) | \ + (((off) >> 6 ) << 10) | \ + _PAGE_FILE }) #else /* Swap entries must have VALID and GLOBAL bits cleared. */ +#if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) +#define __swp_type(x) (((x).val >> 2) & 0x1f) +#define __swp_offset(x) ((x).val >> 7) +#define __swp_entry(type,offset) \ + ((swp_entry_t) { ((type) << 2) | ((offset) << 7) }) +#else #define __swp_type(x) (((x).val >> 8) & 0x1f) -#define __swp_offset(x) ((x).val >> 13) +#define __swp_offset(x) ((x).val >> 13) #define __swp_entry(type,offset) \ - ((swp_entry_t) { ((type) << 8) | ((offset) << 13) }) + ((swp_entry_t) { ((type) << 8) | ((offset) << 13) }) +#endif /* defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) */ +#if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) /* - * Bits 0, 1, 2, 7 and 8 are taken, split up the 27 bits of offset - * into this range: + * Bits 0 and 1 of pte_high are taken, use the rest for the page offset... */ -#define PTE_FILE_MAX_BITS 27 +#define PTE_FILE_MAX_BITS 30 -#if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) - /* fixme */ -#define pte_to_pgoff(_pte) (((_pte).pte_high >> 6) + ((_pte).pte_high & 0x3f)) -#define pgoff_to_pte(off) \ - ((pte_t){(((off) & 0x3f) + ((off) << 6) + _PAGE_FILE)}) +#define pte_to_pgoff(_pte) ((_pte).pte_high >> 2) +#define pgoff_to_pte(off) ((pte_t) { _PAGE_FILE, (off) << 2 }) #else -#define pte_to_pgoff(_pte) \ - ((((_pte).pte >> 3) & 0x1f ) + (((_pte).pte >> 9) << 6 )) +/* + * Bits 0, 4, 6, and 7 are taken, split up 28 bits of offset into this range: + */ +#define PTE_FILE_MAX_BITS 28 -#define pgoff_to_pte(off) \ - ((pte_t) { (((off) & 0x1f) << 3) + (((off) >> 6) << 9) + _PAGE_FILE }) +#define pte_to_pgoff(_pte) ((((_pte).pte >> 1) & 0x7) | \ + (((_pte).pte >> 2) & 0x8) | \ + (((_pte).pte >> 8) << 4)) + +#define pgoff_to_pte(off) ((pte_t) { (((off) & 0x7) << 1) | \ + (((off) & 0x8) << 2) | \ + (((off) >> 4) << 8) | \ + _PAGE_FILE }) #endif #endif +#if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32) +#define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_high }) +#define __swp_entry_to_pte(x) ((pte_t) { 0, (x).val }) +#else #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) +#endif #endif /* _ASM_PGTABLE_32_H */ diff -urN linux-2.6.17-rc5/include/asm-mips/pgtable-64.h linux-2.6.17-rc6/include/asm-mips/pgtable-64.h --- linux-2.6.17-rc5/include/asm-mips/pgtable-64.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/include/asm-mips/pgtable-64.h 2006-06-06 01:27:37.020332429 +0000 @@ -224,15 +224,12 @@ #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) /* - * Bits 0, 1, 2, 7 and 8 are taken, split up the 32 bits of offset - * into this range: + * Bits 0, 4, 6, and 7 are taken. Let's leave bits 1, 2, 3, and 5 alone to + * make things easier, and only use the upper 56 bits for the page offset... */ -#define PTE_FILE_MAX_BITS 32 +#define PTE_FILE_MAX_BITS 56 -#define pte_to_pgoff(_pte) \ - ((((_pte).pte >> 3) & 0x1f ) + (((_pte).pte >> 9) << 6 )) - -#define pgoff_to_pte(off) \ - ((pte_t) { (((off) & 0x1f) << 3) + (((off) >> 6) << 9) + _PAGE_FILE }) +#define pte_to_pgoff(_pte) ((_pte).pte >> 8) +#define pgoff_to_pte(off) ((pte_t) { ((off) << 8) | _PAGE_FILE }) #endif /* _ASM_PGTABLE_64_H */ diff -urN linux-2.6.17-rc5/include/asm-mips/pgtable.h linux-2.6.17-rc6/include/asm-mips/pgtable.h --- linux-2.6.17-rc5/include/asm-mips/pgtable.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/include/asm-mips/pgtable.h 2006-06-06 01:27:37.020332429 +0000 @@ -70,7 +70,15 @@ #define ZERO_PAGE(vaddr) \ (virt_to_page(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask))) -#define __HAVE_ARCH_MULTIPLE_ZERO_PAGE +#define __HAVE_ARCH_MOVE_PTE +#define move_pte(pte, prot, old_addr, new_addr) \ +({ \ + pte_t newpte = (pte); \ + if (pte_present(pte) && pfn_valid(pte_pfn(pte)) && \ + pte_page(pte) == ZERO_PAGE(old_addr)) \ + newpte = mk_pte(ZERO_PAGE(new_addr), (prot)); \ + newpte; \ +}) extern void paging_init(void); @@ -82,10 +90,11 @@ #define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT)) #define pmd_page_kernel(pmd) pmd_val(pmd) -#define pte_none(pte) (!(pte_val(pte) & ~_PAGE_GLOBAL)) -#define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT) - #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) + +#define pte_none(pte) (!(((pte).pte_low | (pte).pte_high) & ~_PAGE_GLOBAL)) +#define pte_present(pte) ((pte).pte_low & _PAGE_PRESENT) + static inline void set_pte(pte_t *ptep, pte_t pte) { ptep->pte_high = pte.pte_high; @@ -93,27 +102,35 @@ ptep->pte_low = pte.pte_low; //printk("pte_high %x pte_low %x\n", ptep->pte_high, ptep->pte_low); - if (pte_val(pte) & _PAGE_GLOBAL) { + if (pte.pte_low & _PAGE_GLOBAL) { pte_t *buddy = ptep_buddy(ptep); /* * Make sure the buddy is global too (if it's !none, * it better already be global) */ - if (pte_none(*buddy)) - buddy->pte_low |= _PAGE_GLOBAL; + if (pte_none(*buddy)) { + buddy->pte_low |= _PAGE_GLOBAL; + buddy->pte_high |= _PAGE_GLOBAL; + } } } #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { + pte_t null = __pte(0); + /* Preserve global status for the pair */ - if (pte_val(*ptep_buddy(ptep)) & _PAGE_GLOBAL) - set_pte_at(mm, addr, ptep, __pte(_PAGE_GLOBAL)); - else - set_pte_at(mm, addr, ptep, __pte(0)); + if (ptep_buddy(ptep)->pte_low & _PAGE_GLOBAL) + null.pte_low = null.pte_high = _PAGE_GLOBAL; + + set_pte_at(mm, addr, ptep, null); } #else + +#define pte_none(pte) (!(pte_val(pte) & ~_PAGE_GLOBAL)) +#define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT) + /* * Certain architectures need to do special things when pte's * within a page table are directly modified. Thus, the following @@ -174,75 +191,76 @@ */ static inline int pte_user(pte_t pte) { BUG(); return 0; } #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) -static inline int pte_read(pte_t pte) { return (pte).pte_low & _PAGE_READ; } -static inline int pte_write(pte_t pte) { return (pte).pte_low & _PAGE_WRITE; } -static inline int pte_dirty(pte_t pte) { return (pte).pte_low & _PAGE_MODIFIED; } -static inline int pte_young(pte_t pte) { return (pte).pte_low & _PAGE_ACCESSED; } -static inline int pte_file(pte_t pte) { return (pte).pte_low & _PAGE_FILE; } +static inline int pte_read(pte_t pte) { return pte.pte_low & _PAGE_READ; } +static inline int pte_write(pte_t pte) { return pte.pte_low & _PAGE_WRITE; } +static inline int pte_dirty(pte_t pte) { return pte.pte_low & _PAGE_MODIFIED; } +static inline int pte_young(pte_t pte) { return pte.pte_low & _PAGE_ACCESSED; } +static inline int pte_file(pte_t pte) { return pte.pte_low & _PAGE_FILE; } + static inline pte_t pte_wrprotect(pte_t pte) { - (pte).pte_low &= ~(_PAGE_WRITE | _PAGE_SILENT_WRITE); - (pte).pte_high &= ~_PAGE_SILENT_WRITE; + pte.pte_low &= ~(_PAGE_WRITE | _PAGE_SILENT_WRITE); + pte.pte_high &= ~_PAGE_SILENT_WRITE; return pte; } static inline pte_t pte_rdprotect(pte_t pte) { - (pte).pte_low &= ~(_PAGE_READ | _PAGE_SILENT_READ); - (pte).pte_high &= ~_PAGE_SILENT_READ; + pte.pte_low &= ~(_PAGE_READ | _PAGE_SILENT_READ); + pte.pte_high &= ~_PAGE_SILENT_READ; return pte; } static inline pte_t pte_mkclean(pte_t pte) { - (pte).pte_low &= ~(_PAGE_MODIFIED|_PAGE_SILENT_WRITE); - (pte).pte_high &= ~_PAGE_SILENT_WRITE; + pte.pte_low &= ~(_PAGE_MODIFIED | _PAGE_SILENT_WRITE); + pte.pte_high &= ~_PAGE_SILENT_WRITE; return pte; } static inline pte_t pte_mkold(pte_t pte) { - (pte).pte_low &= ~(_PAGE_ACCESSED|_PAGE_SILENT_READ); - (pte).pte_high &= ~_PAGE_SILENT_READ; + pte.pte_low &= ~(_PAGE_ACCESSED | _PAGE_SILENT_READ); + pte.pte_high &= ~_PAGE_SILENT_READ; return pte; } static inline pte_t pte_mkwrite(pte_t pte) { - (pte).pte_low |= _PAGE_WRITE; - if ((pte).pte_low & _PAGE_MODIFIED) { - (pte).pte_low |= _PAGE_SILENT_WRITE; - (pte).pte_high |= _PAGE_SILENT_WRITE; + pte.pte_low |= _PAGE_WRITE; + if (pte.pte_low & _PAGE_MODIFIED) { + pte.pte_low |= _PAGE_SILENT_WRITE; + pte.pte_high |= _PAGE_SILENT_WRITE; } return pte; } static inline pte_t pte_mkread(pte_t pte) { - (pte).pte_low |= _PAGE_READ; - if ((pte).pte_low & _PAGE_ACCESSED) { - (pte).pte_low |= _PAGE_SILENT_READ; - (pte).pte_high |= _PAGE_SILENT_READ; + pte.pte_low |= _PAGE_READ; + if (pte.pte_low & _PAGE_ACCESSED) { + pte.pte_low |= _PAGE_SILENT_READ; + pte.pte_high |= _PAGE_SILENT_READ; } return pte; } static inline pte_t pte_mkdirty(pte_t pte) { - (pte).pte_low |= _PAGE_MODIFIED; - if ((pte).pte_low & _PAGE_WRITE) { - (pte).pte_low |= _PAGE_SILENT_WRITE; - (pte).pte_high |= _PAGE_SILENT_WRITE; + pte.pte_low |= _PAGE_MODIFIED; + if (pte.pte_low & _PAGE_WRITE) { + pte.pte_low |= _PAGE_SILENT_WRITE; + pte.pte_high |= _PAGE_SILENT_WRITE; } return pte; } static inline pte_t pte_mkyoung(pte_t pte) { - (pte).pte_low |= _PAGE_ACCESSED; - if ((pte).pte_low & _PAGE_READ) - (pte).pte_low |= _PAGE_SILENT_READ; - (pte).pte_high |= _PAGE_SILENT_READ; + pte.pte_low |= _PAGE_ACCESSED; + if (pte.pte_low & _PAGE_READ) + pte.pte_low |= _PAGE_SILENT_READ; + pte.pte_high |= _PAGE_SILENT_READ; return pte; } #else @@ -335,8 +353,9 @@ #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1) static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) { - pte.pte_low &= _PAGE_CHG_MASK; - pte.pte_low |= pgprot_val(newprot); + pte.pte_low &= _PAGE_CHG_MASK; + pte.pte_high &= ~0x3f; + pte.pte_low |= pgprot_val(newprot); pte.pte_high |= pgprot_val(newprot) & 0x3f; return pte; } diff -urN linux-2.6.17-rc5/include/asm-mips/sigcontext.h linux-2.6.17-rc6/include/asm-mips/sigcontext.h --- linux-2.6.17-rc5/include/asm-mips/sigcontext.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/include/asm-mips/sigcontext.h 2006-06-06 01:27:37.024332859 +0000 @@ -55,8 +55,14 @@ struct sigcontext { unsigned long sc_regs[32]; unsigned long sc_fpregs[32]; - unsigned long sc_hi[4]; - unsigned long sc_lo[4]; + unsigned long sc_mdhi; + unsigned long sc_hi1; + unsigned long sc_hi2; + unsigned long sc_hi3; + unsigned long sc_mdlo; + unsigned long sc_lo1; + unsigned long sc_lo2; + unsigned long sc_lo3; unsigned long sc_pc; unsigned int sc_fpc_csr; unsigned int sc_used_math; diff -urN linux-2.6.17-rc5/include/asm-mips/smp.h linux-2.6.17-rc6/include/asm-mips/smp.h --- linux-2.6.17-rc5/include/asm-mips/smp.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/include/asm-mips/smp.h 2006-06-06 01:27:37.024332859 +0000 @@ -48,7 +48,6 @@ #define SMP_CALL_FUNCTION 0x2 extern cpumask_t phys_cpu_present_map; -extern cpumask_t cpu_online_map; #define cpu_possible_map phys_cpu_present_map extern cpumask_t cpu_callout_map; @@ -86,9 +85,9 @@ extern void plat_smp_setup(void); /* - * Called after init_IRQ but before __cpu_up. + * Called in smp_prepare_cpus. */ -extern void prom_prepare_cpus(unsigned int max_cpus); +extern void plat_prepare_cpus(unsigned int max_cpus); /* * Last chance for the board code to finish SMP initialization before diff -urN linux-2.6.17-rc5/include/asm-mips/sparsemem.h linux-2.6.17-rc6/include/asm-mips/sparsemem.h --- linux-2.6.17-rc5/include/asm-mips/sparsemem.h 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.6.17-rc6/include/asm-mips/sparsemem.h 2006-06-06 01:27:37.024332859 +0000 @@ -0,0 +1,14 @@ +#ifndef _MIPS_SPARSEMEM_H +#define _MIPS_SPARSEMEM_H +#ifdef CONFIG_SPARSEMEM + +/* + * SECTION_SIZE_BITS 2^N: how big each section will be + * MAX_PHYSMEM_BITS 2^N: how much memory we can have in that space + */ +#define SECTION_SIZE_BITS 28 +#define MAX_PHYSMEM_BITS 35 + +#endif /* CONFIG_SPARSEMEM */ +#endif /* _MIPS_SPARSEMEM_H */ + diff -urN linux-2.6.17-rc5/include/asm-powerpc/termbits.h linux-2.6.17-rc6/include/asm-powerpc/termbits.h --- linux-2.6.17-rc5/include/asm-powerpc/termbits.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/include/asm-powerpc/termbits.h 2006-06-06 01:27:37.040334581 +0000 @@ -153,6 +153,7 @@ #define HUPCL 00040000 #define CLOCAL 00100000 +#define CMSPAR 010000000000 /* mark or space (stick) parity */ #define CRTSCTS 020000000000 /* flow control */ /* c_lflag bits */ diff -urN linux-2.6.17-rc5/include/asm-s390/lowcore.h linux-2.6.17-rc6/include/asm-s390/lowcore.h --- linux-2.6.17-rc5/include/asm-s390/lowcore.h 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/include/asm-s390/lowcore.h 2006-06-06 01:27:37.048335442 +0000 @@ -98,8 +98,8 @@ #define __LC_KERNEL_ASCE 0xD58 #define __LC_USER_ASCE 0xD60 #define __LC_PANIC_STACK 0xD68 -#define __LC_CPUID 0xD90 -#define __LC_CPUADDR 0xD98 +#define __LC_CPUID 0xD80 +#define __LC_CPUADDR 0xD88 #define __LC_IPLDEV 0xDB8 #define __LC_JIFFY_TIMER 0xDC0 #define __LC_CURRENT 0xDD8 diff -urN linux-2.6.17-rc5/include/asm-sparc64/pgtable.h linux-2.6.17-rc6/include/asm-sparc64/pgtable.h --- linux-2.6.17-rc5/include/asm-sparc64/pgtable.h 2006-06-06 01:27:32.127806016 +0000 +++ linux-2.6.17-rc6/include/asm-sparc64/pgtable.h 2006-06-06 01:27:37.060336733 +0000 @@ -689,6 +689,23 @@ #define pte_clear(mm,addr,ptep) \ set_pte_at((mm), (addr), (ptep), __pte(0UL)) +#ifdef DCACHE_ALIASING_POSSIBLE +#define __HAVE_ARCH_MOVE_PTE +#define move_pte(pte, prot, old_addr, new_addr) \ +({ \ + pte_t newpte = (pte); \ + if (tlb_type != hypervisor && pte_present(pte)) { \ + unsigned long this_pfn = pte_pfn(pte); \ + \ + if (pfn_valid(this_pfn) && \ + (((old_addr) ^ (new_addr)) & (1 << 13))) \ + flush_dcache_page_all(current->mm, \ + pfn_to_page(this_pfn)); \ + } \ + newpte; \ +}) +#endif + extern pgd_t swapper_pg_dir[2048]; extern pmd_t swapper_low_pmd_dir[2048]; diff -urN linux-2.6.17-rc5/include/asm-um/irqflags.h linux-2.6.17-rc6/include/asm-um/irqflags.h --- linux-2.6.17-rc5/include/asm-um/irqflags.h 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.6.17-rc6/include/asm-um/irqflags.h 2006-06-06 01:27:37.064337164 +0000 @@ -0,0 +1,6 @@ +#ifndef __UM_IRQFLAGS_H +#define __UM_IRQFLAGS_H + +/* Empty for now */ + +#endif diff -urN linux-2.6.17-rc5/include/asm-um/uaccess.h linux-2.6.17-rc6/include/asm-um/uaccess.h --- linux-2.6.17-rc5/include/asm-um/uaccess.h 2006-06-06 01:27:32.131806447 +0000 +++ linux-2.6.17-rc6/include/asm-um/uaccess.h 2006-06-06 01:27:37.068337594 +0000 @@ -41,11 +41,11 @@ #define __get_user(x, ptr) \ ({ \ - const __typeof__(ptr) __private_ptr = ptr; \ + const __typeof__(*(ptr)) __user *__private_ptr = (ptr); \ __typeof__(x) __private_val; \ int __private_ret = -EFAULT; \ (x) = (__typeof__(*(__private_ptr)))0; \ - if (__copy_from_user((void *) &__private_val, (__private_ptr), \ + if (__copy_from_user((__force void *)&__private_val, (__private_ptr),\ sizeof(*(__private_ptr))) == 0) { \ (x) = (__typeof__(*(__private_ptr))) __private_val; \ __private_ret = 0; \ @@ -62,7 +62,7 @@ #define __put_user(x, ptr) \ ({ \ - __typeof__(ptr) __private_ptr = ptr; \ + __typeof__(*(ptr)) __user *__private_ptr = ptr; \ __typeof__(*(__private_ptr)) __private_val; \ int __private_ret = -EFAULT; \ __private_val = (__typeof__(*(__private_ptr))) (x); \ diff -urN linux-2.6.17-rc5/include/asm-x86_64/elf.h linux-2.6.17-rc6/include/asm-x86_64/elf.h --- linux-2.6.17-rc5/include/asm-x86_64/elf.h 2006-06-06 01:27:32.135806877 +0000 +++ linux-2.6.17-rc6/include/asm-x86_64/elf.h 2006-06-06 01:27:37.068337594 +0000 @@ -159,7 +159,7 @@ #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) /* 1GB for 64bit, 8MB for 32bit */ -#define STACK_RND_MASK (is_compat_task() ? 0x7ff : 0x3fffff) +#define STACK_RND_MASK (test_thread_flag(TIF_IA32) ? 0x7ff : 0x3fffff) #endif diff -urN linux-2.6.17-rc5/include/linux/input.h linux-2.6.17-rc6/include/linux/input.h --- linux-2.6.17-rc5/include/linux/input.h 2006-06-06 01:27:32.155809029 +0000 +++ linux-2.6.17-rc6/include/linux/input.h 2006-06-06 01:27:37.092340177 +0000 @@ -345,6 +345,8 @@ #define KEY_SAVE 234 #define KEY_DOCUMENTS 235 +#define KEY_BATTERY 236 + #define KEY_UNKNOWN 240 #define BTN_MISC 0x100 @@ -577,14 +579,9 @@ * Switch events */ -#define SW_0 0x00 -#define SW_1 0x01 -#define SW_2 0x02 -#define SW_3 0x03 -#define SW_4 0x04 -#define SW_5 0x05 -#define SW_6 0x06 -#define SW_7 0x07 +#define SW_LID 0x00 /* set = lid shut */ +#define SW_TABLET_MODE 0x01 /* set = tablet mode */ +#define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ #define SW_MAX 0x0f /* diff -urN linux-2.6.17-rc5/include/linux/m48t86.h linux-2.6.17-rc6/include/linux/m48t86.h --- linux-2.6.17-rc5/include/linux/m48t86.h 2006-06-06 01:27:32.163809890 +0000 +++ linux-2.6.17-rc6/include/linux/m48t86.h 2006-06-06 01:27:37.100341038 +0000 @@ -11,6 +11,6 @@ struct m48t86_ops { - void (*writeb)(unsigned char value, unsigned long addr); - unsigned char (*readb)(unsigned long addr); + void (*writebyte)(unsigned char value, unsigned long addr); + unsigned char (*readbyte)(unsigned long addr); }; diff -urN linux-2.6.17-rc5/include/linux/mmzone.h linux-2.6.17-rc6/include/linux/mmzone.h --- linux-2.6.17-rc5/include/linux/mmzone.h 2006-06-06 01:27:32.163809890 +0000 +++ linux-2.6.17-rc6/include/linux/mmzone.h 2006-06-06 01:27:37.100341038 +0000 @@ -15,6 +15,7 @@ #include #include #include +#include /* Free memory management - zoned buddy allocator. */ #ifndef CONFIG_FORCE_MAX_ZONEORDER diff -urN linux-2.6.17-rc5/include/linux/pci_ids.h linux-2.6.17-rc6/include/linux/pci_ids.h --- linux-2.6.17-rc5/include/linux/pci_ids.h 2006-06-06 01:27:32.175811181 +0000 +++ linux-2.6.17-rc6/include/linux/pci_ids.h 2006-06-06 01:27:37.124343620 +0000 @@ -1231,6 +1231,7 @@ #define PCI_DEVICE_ID_VIA_8380_0 0x0204 #define PCI_DEVICE_ID_VIA_3238_0 0x0238 #define PCI_DEVICE_ID_VIA_PT880 0x0258 +#define PCI_DEVICE_ID_VIA_PT880ULTRA 0x0308 #define PCI_DEVICE_ID_VIA_PX8X0_0 0x0259 #define PCI_DEVICE_ID_VIA_3269_0 0x0269 #define PCI_DEVICE_ID_VIA_K8T800PRO_0 0x0282 diff -urN linux-2.6.17-rc5/include/linux/vt_kern.h linux-2.6.17-rc6/include/linux/vt_kern.h --- linux-2.6.17-rc5/include/linux/vt_kern.h 2006-06-06 01:27:32.203814194 +0000 +++ linux-2.6.17-rc6/include/linux/vt_kern.h 2006-03-20 05:53:29.000000000 +0000 @@ -73,11 +73,6 @@ int vt_waitactive(int vt); void change_console(struct vc_data *new_vc); void reset_vc(struct vc_data *vc); -#ifdef CONFIG_VT -int is_console_suspend_safe(void); -#else -static inline int is_console_suspend_safe(void) { return 1; } -#endif /* * vc_screen.c shares this temporary buffer with the console write code so that diff -urN linux-2.6.17-rc5/include/net/compat.h linux-2.6.17-rc6/include/net/compat.h --- linux-2.6.17-rc5/include/net/compat.h 2006-06-06 01:27:32.211815055 +0000 +++ linux-2.6.17-rc6/include/net/compat.h 2006-06-06 01:27:37.156347063 +0000 @@ -3,6 +3,8 @@ #include +struct sock; + #if defined(CONFIG_COMPAT) #include @@ -23,7 +25,6 @@ compat_int_t cmsg_type; }; -struct sock; extern int compat_sock_get_timestamp(struct sock *, struct timeval __user *); #else /* defined(CONFIG_COMPAT) */ diff -urN linux-2.6.17-rc5/kernel/hrtimer.c linux-2.6.17-rc6/kernel/hrtimer.c --- linux-2.6.17-rc5/kernel/hrtimer.c 2006-06-06 01:27:32.243818499 +0000 +++ linux-2.6.17-rc6/kernel/hrtimer.c 2006-06-06 01:27:37.192350937 +0000 @@ -456,6 +456,7 @@ return ret; } +EXPORT_SYMBOL_GPL(hrtimer_start); /** * hrtimer_try_to_cancel - try to deactivate a timer @@ -484,6 +485,7 @@ return ret; } +EXPORT_SYMBOL_GPL(hrtimer_try_to_cancel); /** * hrtimer_cancel - cancel a timer and wait for the handler to finish. @@ -504,6 +506,7 @@ cpu_relax(); } } +EXPORT_SYMBOL_GPL(hrtimer_cancel); /** * hrtimer_get_remaining - get remaining time for the timer @@ -522,6 +525,7 @@ return rem; } +EXPORT_SYMBOL_GPL(hrtimer_get_remaining); #ifdef CONFIG_NO_IDLE_HZ /** @@ -580,6 +584,7 @@ timer->base = &bases[clock_id]; timer->node.rb_parent = HRTIMER_INACTIVE; } +EXPORT_SYMBOL_GPL(hrtimer_init); /** * hrtimer_get_res - get the timer resolution for a clock @@ -599,6 +604,7 @@ return 0; } +EXPORT_SYMBOL_GPL(hrtimer_get_res); /* * Expire the per base hrtimer-queue: diff -urN linux-2.6.17-rc5/mm/memory_hotplug.c linux-2.6.17-rc6/mm/memory_hotplug.c --- linux-2.6.17-rc5/mm/memory_hotplug.c 2006-06-06 01:27:32.271821512 +0000 +++ linux-2.6.17-rc6/mm/memory_hotplug.c 2006-06-06 01:27:37.216353520 +0000 @@ -91,8 +91,8 @@ if (start_pfn < zone->zone_start_pfn) zone->zone_start_pfn = start_pfn; - if (end_pfn > old_zone_end_pfn) - zone->spanned_pages = end_pfn - zone->zone_start_pfn; + zone->spanned_pages = max(old_zone_end_pfn, end_pfn) - + zone->zone_start_pfn; zone_span_writeunlock(zone); } @@ -106,8 +106,8 @@ if (start_pfn < pgdat->node_start_pfn) pgdat->node_start_pfn = start_pfn; - if (end_pfn > old_pgdat_end_pfn) - pgdat->node_spanned_pages = end_pfn - pgdat->node_start_pfn; + pgdat->node_spanned_pages = max(old_pgdat_end_pfn, end_pfn) - + pgdat->node_start_pfn; } int online_pages(unsigned long pfn, unsigned long nr_pages) diff -urN linux-2.6.17-rc5/mm/slab.c linux-2.6.17-rc6/mm/slab.c --- linux-2.6.17-rc5/mm/slab.c 2006-06-06 01:27:32.279822372 +0000 +++ linux-2.6.17-rc6/mm/slab.c 2006-06-06 01:27:37.228354811 +0000 @@ -207,11 +207,6 @@ #define BUFCTL_ACTIVE (((kmem_bufctl_t)(~0U))-2) #define SLAB_LIMIT (((kmem_bufctl_t)(~0U))-3) -/* Max number of objs-per-slab for caches which use off-slab slabs. - * Needed to avoid a possible looping condition in cache_grow(). - */ -static unsigned long offslab_limit; - /* * struct slab * @@ -1356,12 +1351,6 @@ NULL, NULL); } - /* Inc off-slab bufctl limit until the ceiling is hit. */ - if (!(OFF_SLAB(sizes->cs_cachep))) { - offslab_limit = sizes->cs_size - sizeof(struct slab); - offslab_limit /= sizeof(kmem_bufctl_t); - } - sizes->cs_dmacachep = kmem_cache_create(names->name_dma, sizes->cs_size, ARCH_KMALLOC_MINALIGN, @@ -1780,6 +1769,7 @@ static size_t calculate_slab_order(struct kmem_cache *cachep, size_t size, size_t align, unsigned long flags) { + unsigned long offslab_limit; size_t left_over = 0; int gfporder; @@ -1791,9 +1781,18 @@ if (!num) continue; - /* More than offslab_limit objects will cause problems */ - if ((flags & CFLGS_OFF_SLAB) && num > offslab_limit) - break; + if (flags & CFLGS_OFF_SLAB) { + /* + * Max number of objs-per-slab for caches which + * use off-slab slabs. Needed to avoid a possible + * looping condition in cache_grow(). + */ + offslab_limit = size - sizeof(struct slab); + offslab_limit /= sizeof(kmem_bufctl_t); + + if (num > offslab_limit) + break; + } /* Found something acceptable - save it away */ cachep->num = num; diff -urN linux-2.6.17-rc5/net/bridge/br_if.c linux-2.6.17-rc6/net/bridge/br_if.c --- linux-2.6.17-rc5/net/bridge/br_if.c 2006-06-06 01:27:32.291823664 +0000 +++ linux-2.6.17-rc6/net/bridge/br_if.c 2006-06-06 01:27:37.240356102 +0000 @@ -300,25 +300,20 @@ rtnl_lock(); if (strchr(dev->name, '%')) { ret = dev_alloc_name(dev, dev->name); - if (ret < 0) - goto err1; + if (ret < 0) { + free_netdev(dev); + goto out; + } } ret = register_netdevice(dev); if (ret) - goto err2; + goto out; ret = br_sysfs_addbr(dev); if (ret) - goto err3; - rtnl_unlock(); - return 0; - - err3: - unregister_netdev(dev); - err2: - free_netdev(dev); - err1: + unregister_netdevice(dev); + out: rtnl_unlock(); return ret; } diff -urN linux-2.6.17-rc5/net/core/dev.c linux-2.6.17-rc6/net/core/dev.c --- linux-2.6.17-rc5/net/core/dev.c 2006-06-06 01:27:32.299824525 +0000 +++ linux-2.6.17-rc6/net/core/dev.c 2006-06-06 01:27:37.248356963 +0000 @@ -127,7 +127,7 @@ * sure which should go first, but I bet it won't make much * difference if we are running VLANs. The good news is that * this protocol won't be in the list unless compiled in, so - * the average user (w/out VLANs) will not be adversly affected. + * the average user (w/out VLANs) will not be adversely affected. * --BLG * * 0800 IP @@ -149,7 +149,7 @@ static struct list_head ptype_all; /* Taps */ /* - * The @dev_base list is protected by @dev_base_lock and the rtln + * The @dev_base list is protected by @dev_base_lock and the rtnl * semaphore. * * Pure readers hold dev_base_lock for reading. @@ -641,10 +641,12 @@ * @name: name format string * * Passed a format string - eg "lt%d" it will try and find a suitable - * id. Not efficient for many devices, not called a lot. The caller - * must hold the dev_base or rtnl lock while allocating the name and - * adding the device in order to avoid duplicates. Returns the number - * of the unit assigned or a negative errno code. + * id. It scans list of devices to build up a free map, then chooses + * the first empty slot. The caller must hold the dev_base or rtnl lock + * while allocating the name and adding the device in order to avoid + * duplicates. + * Limited to bits_per_byte * page size devices (ie 32K on most platforms). + * Returns the number of the unit assigned or a negative errno code. */ int dev_alloc_name(struct net_device *dev, const char *name) @@ -744,7 +746,7 @@ } /** - * netdev_features_change - device changes fatures + * netdev_features_change - device changes features * @dev: device to cause notification * * Called to indicate a device has changed features. @@ -2196,7 +2198,7 @@ * @dev: device * @inc: modifier * - * Add or remove promsicuity from a device. While the count in the device + * Add or remove promiscuity from a device. While the count in the device * remains above zero the interface remains promiscuous. Once it hits zero * the device reverts back to normal filtering operation. A negative inc * value is used to drop promiscuity on the device. @@ -3122,7 +3124,7 @@ void free_netdev(struct net_device *dev) { #ifdef CONFIG_SYSFS - /* Compatiablity with error handling in drivers */ + /* Compatibility with error handling in drivers */ if (dev->reg_state == NETREG_UNINITIALIZED) { kfree((char *)dev - dev->padded); return; diff -urN linux-2.6.17-rc5/net/ethernet/Makefile linux-2.6.17-rc6/net/ethernet/Makefile --- linux-2.6.17-rc5/net/ethernet/Makefile 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/net/ethernet/Makefile 2006-06-06 01:27:37.272359546 +0000 @@ -3,6 +3,5 @@ # obj-y += eth.o -obj-$(CONFIG_SYSCTL) += sysctl_net_ether.o obj-$(subst m,y,$(CONFIG_IPX)) += pe2.o obj-$(subst m,y,$(CONFIG_ATALK)) += pe2.o diff -urN linux-2.6.17-rc5/net/ethernet/sysctl_net_ether.c linux-2.6.17-rc6/net/ethernet/sysctl_net_ether.c --- linux-2.6.17-rc5/net/ethernet/sysctl_net_ether.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/net/ethernet/sysctl_net_ether.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -/* -*- linux-c -*- - * sysctl_net_ether.c: sysctl interface to net Ethernet subsystem. - * - * Begun April 1, 1996, Mike Shaver. - * Added /proc/sys/net/ether directory entry (empty =) ). [MS] - */ - -#include -#include -#include - -ctl_table ether_table[] = { - {0} -}; diff -urN linux-2.6.17-rc5/net/ipv4/netfilter/Kconfig linux-2.6.17-rc6/net/ipv4/netfilter/Kconfig --- linux-2.6.17-rc5/net/ipv4/netfilter/Kconfig 2006-06-06 01:27:32.343829259 +0000 +++ linux-2.6.17-rc6/net/ipv4/netfilter/Kconfig 2006-06-06 01:27:37.292361698 +0000 @@ -170,8 +170,8 @@ Documentation/modules.txt. If unsure, say `N'. config IP_NF_H323 - tristate 'H.323 protocol support' - depends on IP_NF_CONNTRACK + tristate 'H.323 protocol support (EXPERIMENTAL)' + depends on IP_NF_CONNTRACK && EXPERIMENTAL help H.323 is a VoIP signalling protocol from ITU-T. As one of the most important VoIP protocols, it is widely used by voice hardware and diff -urN linux-2.6.17-rc5/net/ipv4/netfilter/ip_conntrack_core.c linux-2.6.17-rc6/net/ipv4/netfilter/ip_conntrack_core.c --- linux-2.6.17-rc5/net/ipv4/netfilter/ip_conntrack_core.c 2006-06-06 01:27:32.343829259 +0000 +++ linux-2.6.17-rc6/net/ipv4/netfilter/ip_conntrack_core.c 2006-06-06 01:27:37.292361698 +0000 @@ -1318,6 +1318,7 @@ .tuple.dst.u.tcp.port; sin.sin_addr.s_addr = ct->tuplehash[IP_CT_DIR_ORIGINAL] .tuple.dst.ip; + memset(sin.sin_zero, 0, sizeof(sin.sin_zero)); DEBUGP("SO_ORIGINAL_DST: %u.%u.%u.%u %u\n", NIPQUAD(sin.sin_addr.s_addr), ntohs(sin.sin_port)); diff -urN linux-2.6.17-rc5/net/ipv4/netfilter/ip_conntrack_helper_pptp.c linux-2.6.17-rc6/net/ipv4/netfilter/ip_conntrack_helper_pptp.c --- linux-2.6.17-rc5/net/ipv4/netfilter/ip_conntrack_helper_pptp.c 2006-06-06 01:27:32.347829690 +0000 +++ linux-2.6.17-rc6/net/ipv4/netfilter/ip_conntrack_helper_pptp.c 2006-06-06 01:27:37.300362559 +0000 @@ -469,8 +469,8 @@ DEBUGP("%s but no session\n", pptp_msg_name[msg]); break; } - if (info->sstate != PPTP_CALL_IN_REP - && info->sstate != PPTP_CALL_IN_CONF) { + if (info->cstate != PPTP_CALL_IN_REP + && info->cstate != PPTP_CALL_IN_CONF) { DEBUGP("%s but never sent IN_CALL_REPLY\n", pptp_msg_name[msg]); break; diff -urN linux-2.6.17-rc5/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c linux-2.6.17-rc6/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c --- linux-2.6.17-rc5/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c 2006-06-06 01:27:32.363831411 +0000 +++ linux-2.6.17-rc6/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c 2006-06-06 01:27:37.312363850 +0000 @@ -348,6 +348,7 @@ .tuple.dst.u.tcp.port; sin.sin_addr.s_addr = ct->tuplehash[IP_CT_DIR_ORIGINAL] .tuple.dst.u3.ip; + memset(sin.sin_zero, 0, sizeof(sin.sin_zero)); DEBUGP("SO_ORIGINAL_DST: %u.%u.%u.%u %u\n", NIPQUAD(sin.sin_addr.s_addr), ntohs(sin.sin_port)); diff -urN linux-2.6.17-rc5/net/ipv4/tcp_highspeed.c linux-2.6.17-rc6/net/ipv4/tcp_highspeed.c --- linux-2.6.17-rc5/net/ipv4/tcp_highspeed.c 2006-06-06 01:27:32.367831842 +0000 +++ linux-2.6.17-rc6/net/ipv4/tcp_highspeed.c 2006-06-06 01:27:37.316364281 +0000 @@ -135,7 +135,8 @@ /* Do additive increase */ if (tp->snd_cwnd < tp->snd_cwnd_clamp) { - tp->snd_cwnd_cnt += ca->ai; + /* cwnd = cwnd + a(w) / cwnd */ + tp->snd_cwnd_cnt += ca->ai + 1; if (tp->snd_cwnd_cnt >= tp->snd_cwnd) { tp->snd_cwnd_cnt -= tp->snd_cwnd; tp->snd_cwnd++; diff -urN linux-2.6.17-rc5/net/ipv4/tcp_output.c linux-2.6.17-rc6/net/ipv4/tcp_output.c --- linux-2.6.17-rc5/net/ipv4/tcp_output.c 2006-06-06 01:27:32.371832272 +0000 +++ linux-2.6.17-rc6/net/ipv4/tcp_output.c 2006-06-06 01:27:37.320364711 +0000 @@ -642,7 +642,7 @@ * eventually). The difference is that pulled data not copied, but * immediately discarded. */ -static unsigned char *__pskb_trim_head(struct sk_buff *skb, int len) +static void __pskb_trim_head(struct sk_buff *skb, int len) { int i, k, eat; @@ -667,7 +667,6 @@ skb->tail = skb->data; skb->data_len -= len; skb->len = skb->data_len; - return skb->tail; } int tcp_trim_head(struct sock *sk, struct sk_buff *skb, u32 len) @@ -676,12 +675,11 @@ pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) return -ENOMEM; - if (len <= skb_headlen(skb)) { + /* If len == headlen, we avoid __skb_pull to preserve alignment. */ + if (unlikely(len < skb_headlen(skb))) __skb_pull(skb, len); - } else { - if (__pskb_trim_head(skb, len-skb_headlen(skb)) == NULL) - return -ENOMEM; - } + else + __pskb_trim_head(skb, len - skb_headlen(skb)); TCP_SKB_CB(skb)->seq += len; skb->ip_summed = CHECKSUM_HW; diff -urN linux-2.6.17-rc5/net/ipv6/route.c linux-2.6.17-rc6/net/ipv6/route.c --- linux-2.6.17-rc5/net/ipv6/route.c 2006-06-06 01:27:32.387833994 +0000 +++ linux-2.6.17-rc6/net/ipv6/route.c 2006-06-06 01:27:37.340366863 +0000 @@ -280,10 +280,13 @@ { struct neighbour *neigh = rt->rt6i_nexthop; int m = 0; - if (neigh) { + if (rt->rt6i_flags & RTF_NONEXTHOP || + !(rt->rt6i_flags & RTF_GATEWAY)) + m = 1; + else if (neigh) { read_lock_bh(&neigh->lock); if (neigh->nud_state & NUD_VALID) - m = 1; + m = 2; read_unlock_bh(&neigh->lock); } return m; @@ -292,15 +295,18 @@ static int rt6_score_route(struct rt6_info *rt, int oif, int strict) { - int m = rt6_check_dev(rt, oif); + int m, n; + + m = rt6_check_dev(rt, oif); if (!m && (strict & RT6_SELECT_F_IFACE)) return -1; #ifdef CONFIG_IPV6_ROUTER_PREF m |= IPV6_DECODE_PREF(IPV6_EXTRACT_PREF(rt->rt6i_flags)) << 2; #endif - if (rt6_check_neigh(rt)) + n = rt6_check_neigh(rt); + if (n > 1) m |= 16; - else if (strict & RT6_SELECT_F_REACHABLE) + else if (!n && strict & RT6_SELECT_F_REACHABLE) return -1; return m; } diff -urN linux-2.6.17-rc5/net/irda/irlap.c linux-2.6.17-rc6/net/irda/irlap.c --- linux-2.6.17-rc5/net/irda/irlap.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/net/irda/irlap.c 2006-06-06 01:27:37.344367294 +0000 @@ -884,7 +884,8 @@ if (now) { /* Send down empty frame to trigger speed change */ skb = dev_alloc_skb(0); - irlap_queue_xmit(self, skb); + if (skb) + irlap_queue_xmit(self, skb); } } diff -urN linux-2.6.17-rc5/net/sysctl_net.c linux-2.6.17-rc6/net/sysctl_net.c --- linux-2.6.17-rc5/net/sysctl_net.c 2006-03-20 05:53:29.000000000 +0000 +++ linux-2.6.17-rc6/net/sysctl_net.c 2006-06-06 01:27:37.384371598 +0000 @@ -37,14 +37,6 @@ .mode = 0555, .child = core_table, }, -#ifdef CONFIG_NET - { - .ctl_name = NET_ETHER, - .procname = "ethernet", - .mode = 0555, - .child = ether_table, - }, -#endif #ifdef CONFIG_INET { .ctl_name = NET_IPV4, diff -urN linux-2.6.17-rc5/security/selinux/hooks.c linux-2.6.17-rc6/security/selinux/hooks.c --- linux-2.6.17-rc5/security/selinux/hooks.c 2006-06-06 01:27:32.455841311 +0000 +++ linux-2.6.17-rc6/security/selinux/hooks.c 2006-06-06 01:27:37.412374611 +0000 @@ -4422,6 +4422,7 @@ /* Set up any superblocks initialized prior to the policy load. */ printk(KERN_INFO "SELinux: Setting up existing superblocks.\n"); + spin_lock(&sb_lock); spin_lock(&sb_security_lock); next_sb: if (!list_empty(&superblock_security_head)) { @@ -4430,19 +4431,20 @@ struct superblock_security_struct, list); struct super_block *sb = sbsec->sb; - spin_lock(&sb_lock); sb->s_count++; - spin_unlock(&sb_lock); spin_unlock(&sb_security_lock); + spin_unlock(&sb_lock); down_read(&sb->s_umount); if (sb->s_root) superblock_doinit(sb, NULL); drop_super(sb); + spin_lock(&sb_lock); spin_lock(&sb_security_lock); list_del_init(&sbsec->list); goto next_sb; } spin_unlock(&sb_security_lock); + spin_unlock(&sb_lock); } /* SELinux requires early initialization in order to label