# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/03/02 14:32:28-08:00 david-b@pacbell.net # [PATCH] OHCI urb unlink fixes # # Fix two OHCI unlink issues. # # * All EDs now get a 1 msec delay before re-linking, even those # which were seemingly "clean" unlink cases. This gets rid of # some list corruption issues ("bad entry") by getting rid of # a fast-path carried over from 2.4 usb-ohci. # # * In case of unlink-during-submit, we must giveback() right away. # This is a reasonably rare case. # # There have been recent reports of problems here. The "bad entry" # showed up with usbtest tests #11 and #12, or "stir4200", and maybe # in other cases. The unlink-during-submit shows up in usbtest. # # drivers/usb/host/ohci-q.c # 2004/03/02 05:52:46-08:00 david-b@pacbell.net +2 -14 # OHCI urb unlink fixes # # drivers/usb/host/ohci-hcd.c # 2004/03/02 05:52:40-08:00 david-b@pacbell.net +13 -1 # OHCI urb unlink fixes # # ChangeSet # 2004/03/02 13:52:51-08:00 benh@kernel.crashing.org # [PATCH] ppc32: Fix crash on load in DACA sound driver # # The DACA sound driver (early iBook models) doesn't clear the i2c_client # structure. That cause the embedded struct device (and thus kobject) to # contain garbage in the "k_name" field, which kobject_set_name will # later try to kfree... # # Also remove references to unused struct data_data. # # sound/oss/dmasound/dac3550a.c # 2004/03/02 13:32:04-08:00 benh@kernel.crashing.org +2 -10 # ppc32: Fix crash on load in DACA sound driver # # ChangeSet # 2004/03/02 11:45:33-08:00 kkeil@suse.de # [PATCH] ISDN strpbrk fix # # Here is a small ISDN fix for the current tree. # # There is a compiler inlining/optimation problem with strpbrk, if it has # only a one character search string. This results in a missing strchr # because the compiler internally replace strpbrk with strchr in this # case, but did so after inline handling stage. # # drivers/isdn/isdnloop/isdnloop.c # 2004/03/02 04:20:06-08:00 kkeil@suse.de +3 -3 # ISDN strpbrk fix # # drivers/isdn/icn/icn.c # 2004/03/02 04:18:59-08:00 kkeil@suse.de +3 -3 # ISDN strpbrk fix # # ChangeSet # 2004/03/02 08:19:23-08:00 mingo@redhat.com # [PATCH] Avoid writing the APIC ID register # # A small birdie tells us that in the long run it may not be a good idea # to write the APIC ID register. It might be read-only in some # hypothetical situation down the road. # # arch/i386/kernel/apic.c # 2004/03/01 16:00:00-08:00 mingo@redhat.com +0 -6 # Avoid writing the APIC ID register # # ChangeSet # 2004/03/01 23:47:02-08:00 torvalds@home.osdl.org # Update x86 defconfig # # arch/i386/defconfig # 2004/03/01 23:46:57-08:00 torvalds@home.osdl.org +28 -11 # Update x86 defconfig # # ChangeSet # 2004/03/01 23:07:26-08:00 akpm@osdl.org # [PATCH] oprofile: fix P4 HT msr sharing # # From: Philippe Elie # # When I debugged P4 ht oprofile a few month ago I noticed that but though it # wasn't a problem... The fix I propose is not completely clean. # # With P4 HT we split msr in two subset, one for each logical processor. The # msrs subset used in op_model_p4.c at save and setup point of view are # distinct (*), it means we must serialize setup and save operation else a # logical processor can save some msr value already setup by the other thread # then when oprofile shutdown we restore wrong msrs values. # # Nobody noticed the problem because after restoring the msrs we call # enable_lapic_nmi_watchdog() -> setup_p4_watchdog() wich clear all the msrs # but it's a bit fragile. If nmi watchdog is not enabled nothing bad occurs # because the LVTPC remains disabled. # # (*) this is done in this way because it allows a lot of simplification in # op_model_p4.c, yes it isn't clean but it's not fixable w/o rewriting 75% of # op_model_p4.c and I think the code will be bigger and more complex. # # arch/i386/oprofile/nmi_int.c # 2004/03/01 19:01:51-08:00 akpm@osdl.org +14 -3 # oprofile: fix P4 HT msr sharing # # ChangeSet # 2004/03/01 23:07:16-08:00 akpm@osdl.org # [PATCH] scripts/modpost warning # # From: Geert Uytterhoeven # # I need the following patch to kill a warning (__endian() may be unused) # when cross-compiling m68k kernels on an ia32 box. # # scripts/modpost.h # 2004/03/01 19:01:51-08:00 akpm@osdl.org +1 -1 # scripts/modpost warning # # ChangeSet # 2004/03/01 23:07:05-08:00 akpm@osdl.org # [PATCH] m68k interrupt handling fix # # From: Geert Uytterhoeven # # The syscalls.h change broke the m68k interrupt management code, since # sys_{request,free}_irq() are not syscalls, but routines to manage system # (CPU) interrupts. # # include/asm-m68k/unistd.h # 2004/03/01 19:01:50-08:00 akpm@osdl.org +0 -4 # m68k interrupt handling fix # # include/asm-m68k/irq.h # 2004/03/01 19:01:50-08:00 akpm@osdl.org +5 -0 # m68k interrupt handling fix # # arch/m68k/sun3/sun3ints.c # 2004/03/01 19:01:50-08:00 akpm@osdl.org +0 -1 # m68k interrupt handling fix # # arch/m68k/q40/q40ints.c # 2004/03/01 19:01:50-08:00 akpm@osdl.org +0 -1 # m68k interrupt handling fix # # arch/m68k/mac/via.c # 2004/03/01 19:01:50-08:00 akpm@osdl.org +0 -1 # m68k interrupt handling fix # # arch/m68k/mac/psc.c # 2004/03/01 19:01:50-08:00 akpm@osdl.org +0 -1 # m68k interrupt handling fix # # arch/m68k/mac/oss.c # 2004/03/01 19:01:50-08:00 akpm@osdl.org +0 -1 # m68k interrupt handling fix # # arch/m68k/mac/macints.c # 2004/03/01 19:01:50-08:00 akpm@osdl.org +0 -1 # m68k interrupt handling fix # # arch/m68k/mac/iop.c # 2004/03/01 19:01:50-08:00 akpm@osdl.org +0 -1 # m68k interrupt handling fix # # arch/m68k/hp300/time.c # 2004/03/01 19:01:50-08:00 akpm@osdl.org +0 -1 # m68k interrupt handling fix # # arch/m68k/bvme6000/bvmeints.c # 2004/03/01 19:01:50-08:00 akpm@osdl.org +0 -1 # m68k interrupt handling fix # # arch/m68k/amiga/amiints.c # 2004/03/01 19:01:50-08:00 akpm@osdl.org +0 -1 # m68k interrupt handling fix # # ChangeSet # 2004/03/01 23:06:54-08:00 akpm@osdl.org # [PATCH] swsusp: fix error handling in "not enough swap space" # # From: Pavel Machek # # Without this, if there's not enough swapspace, suspend fails, but leaves # devices suspended, leading to dead machine. # # kernel/power/swsusp.c # 2004/03/01 19:01:50-08:00 akpm@osdl.org +4 -0 # swsusp: fix error handling in "not enough swap space" # # ChangeSet # 2004/03/01 23:06:43-08:00 akpm@osdl.org # [PATCH] firmware loader: delay firmware hotplug event # # From: Dmitry Torokhov # # Do not call hotplug until firmware class device is completely instantiated. # # drivers/base/firmware_class.c # 2004/03/01 19:01:49-08:00 akpm@osdl.org +6 -0 # firmware loader: delay firmware hotplug event # # ChangeSet # 2004/03/01 23:06:33-08:00 akpm@osdl.org # [PATCH] firmware loader: pin firmware module # # From: Dmitry Torokhov # # We need to pin the firmware loader module until the last reference to the # firmware class device is dropped and the class device is destroyed. # # drivers/base/firmware_class.c # 2004/03/01 19:10:52-08:00 akpm@osdl.org +6 -0 # firmware loader: pin firmware module # # ChangeSet # 2004/03/01 23:06:22-08:00 akpm@osdl.org # [PATCH] convert pdflush to kthread # # From: Keith Owens # # New pdflush threads are launched on-demand by pdflush. # # It turns out that on some architectures (eg, ia64) a kernel thread inherits # its parent's stack utilisation. So after the thread-launches-a-thread # cycle has progressed sufficiently far we run out of stack space and crash. # # Simple fix: convert pdflush to use kthreads. All kthreads are parented by # keventd so there is no stack windup as a result of pdflush launching # pdflush. # # mm/pdflush.c # 2004/03/01 19:01:49-08:00 akpm@osdl.org +5 -3 # convert pdflush to kthread # # ChangeSet # 2004/03/01 23:06:12-08:00 akpm@osdl.org # [PATCH] watchdog updates # # From: Wim Van Sebroeck # # (04/02/29 1.1628) # [WATCHDOG] v2.6.3 pcwd_usb-watchdog # # Add the Berkshire Products USB-PC Watchdog driver # # (04/02/29 1.1629) # [WATCHDOG] v2.6.3 MODULE_*-patch # # Add MODULE_* info # # (04/02/29 1.1630) # [WATCHDOG/SPARC64] v2.6.3 Kconfig-WATCHDOG_CP1XXX/WATCHDOG_RIO-patch # # Move WATCHDOG_CP1XXX and WATCHDOG_RIO for SPARC64 architecture # from arch/sparc64/Kconfig to drivers/char/watchdog/Kconfig # and made them dependant of WATCHDOG also # # drivers/char/watchdog/wdt_pci.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +2 -0 # watchdog updates # # drivers/char/watchdog/wdt977.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +2 -0 # watchdog updates # # drivers/char/watchdog/wdt285.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +1 -0 # watchdog updates # # drivers/char/watchdog/w83877f_wdt.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +1 -0 # watchdog updates # # drivers/char/watchdog/w83627hf_wdt.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +1 -1 # watchdog updates # # drivers/char/watchdog/sc1200wdt.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +1 -0 # watchdog updates # # drivers/char/watchdog/sa1100_wdt.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +1 -0 # watchdog updates # # drivers/char/watchdog/pcwd_usb.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +810 -0 # watchdog updates # # drivers/char/watchdog/pcwd.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +4 -1 # watchdog updates # # drivers/char/watchdog/mixcomwd.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +3 -0 # watchdog updates # # drivers/char/watchdog/machzwd.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +1 -0 # watchdog updates # # drivers/char/watchdog/ib700wdt.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +1 -0 # watchdog updates # # drivers/char/watchdog/eurotechwdt.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +1 -0 # watchdog updates # # drivers/char/watchdog/cpu5wdt.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +1 -0 # watchdog updates # # drivers/char/watchdog/Makefile # 2004/03/01 19:01:48-08:00 akpm@osdl.org +2 -1 # watchdog updates # # drivers/char/watchdog/Kconfig # 2004/03/01 19:01:48-08:00 akpm@osdl.org +46 -0 # watchdog updates # # arch/sparc64/Kconfig # 2004/03/01 19:01:48-08:00 akpm@osdl.org +0 -22 # watchdog updates # # drivers/char/watchdog/pcwd_usb.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.5/linux/drivers/char/watchdog/pcwd_usb.c # # ChangeSet # 2004/03/01 23:06:00-08:00 akpm@osdl.org # [PATCH] x86-64 fixes for 2.6.4rc1 # # From: Andi Kleen # # Fix a few issues on x86-64 for 2.6.4rc1. # # The 32bit emulation used 4GB/3 for the mmap break. This actually gave # programs less sbrk space than with a standard 32bit kernel. Move the 32bit # mmap break to 0xc5000000. # # Uses the correct gcc option to optimize for Prescott now (requires a very # new mainline gcc) # # Also merge the i386 sched_clock(). I hope this will fix some interactivity # problems with the scheduler. # # - Change initializer to new style (Arnd Bergmann) # - Remove 2 sibling limit in HT support (from i386) # - Always log RIP in MCE records even when not exact # - Move 32bit program task break up to 0xc5000000 by default # - Use -march=prescott for Prescott optimized kernel if possible # - Don't divide by zero with report_lost_ticks on and HPET off # - Merge preempt/smp/debug_pagealloc oops printing from i386 # - Add pfn_to_nid() # - Merge more accurate sched_clock from i386 # - Remove traces of debugging code in mce.c # - Update defconfig # # include/asm-x86_64/processor.h # 2004/03/01 19:01:48-08:00 akpm@osdl.org +1 -1 # x86-64 fixes for 2.6.4rc1 # # include/asm-x86_64/mmzone.h # 2004/03/01 19:01:48-08:00 akpm@osdl.org +2 -0 # x86-64 fixes for 2.6.4rc1 # # arch/x86_64/kernel/traps.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +15 -0 # x86-64 fixes for 2.6.4rc1 # # arch/x86_64/kernel/time.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +23 -7 # x86-64 fixes for 2.6.4rc1 # # arch/x86_64/kernel/setup.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +1 -2 # x86-64 fixes for 2.6.4rc1 # # arch/x86_64/kernel/mce.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +4 -2 # x86-64 fixes for 2.6.4rc1 # # arch/x86_64/kernel/i8259.c # 2004/03/01 19:01:48-08:00 akpm@osdl.org +1 -1 # x86-64 fixes for 2.6.4rc1 # # arch/x86_64/defconfig # 2004/03/01 19:01:48-08:00 akpm@osdl.org +8 -6 # x86-64 fixes for 2.6.4rc1 # # arch/x86_64/Makefile # 2004/03/01 19:01:48-08:00 akpm@osdl.org +1 -1 # x86-64 fixes for 2.6.4rc1 # # ChangeSet # 2004/03/01 23:05:50-08:00 akpm@osdl.org # [PATCH] Make powernow-k8 cpufreq control work again # # From: Pavel Machek # # We curretly have an off-by-factor-of-1000: # # cat /proc/cpufreq # # minimum CPU frequency - maximum CPU frequency - policy # CPU 0 2000 kHz (100 %) - 2000 kHz (100 %) - powersave # # # I do not have explanation why it is 2MHz - 2MHz. On my system I removed # bug which prevented my system from being reported as 0.8MHz - 1.8MHz. (And # modulo cosmetic uglyness, it worked). # # This fixes cosmetic uglyness, adds proper copyrights, removes warning # "untested on PREEMPT" (someone tested it, and makes it easier to override # PST by user (eMachine users will need that one). # # arch/i386/kernel/cpu/cpufreq/powernow-k8.c # 2004/03/01 19:01:47-08:00 akpm@osdl.org +15 -8 # Make powernow-k8 cpufreq control work again # # ChangeSet # 2004/03/01 23:05:38-08:00 akpm@osdl.org # [PATCH] clarify CONFIG_SWAP Kconfig help # # From: Adrian Bunk # # "swap" is more known than "Support for paging of anonymous memory". The # patch below adds "(swap)" to the prompt of CONFIG_SWAP. # # init/Kconfig # 2004/03/01 19:01:47-08:00 akpm@osdl.org +1 -1 # clarify CONFIG_SWAP Kconfig help # # ChangeSet # 2004/03/01 23:05:28-08:00 akpm@osdl.org # [PATCH] remove a few remaining "make dep" references # # From: Adrian Bunk # # The patch below is an updated version of the patch that removes some # remaining mentions of "make dep". # # net/ipv4/ipvs/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -6 # remove a few remaining "make dep" references # # fs/befs/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -6 # remove a few remaining "make dep" references # # drivers/video/kyro/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -5 # remove a few remaining "make dep" references # # drivers/video/i810/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -6 # remove a few remaining "make dep" references # # arch/sh/cchips/hd6446x/hd64465/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/cchips/hd6446x/hd64461/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/unknown/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/systemh/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/snapgear/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/sh2000/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/se/7751/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/se/770x/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/saturn/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/overdrive/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/mpc1211/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/hp6xx/hp690/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/hp6xx/hp680/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/hp6xx/hp620/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/harp/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/ec3104/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/dreamcast/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/dmida/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/cqreek/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/cat68701/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/bigsur/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/sh/boards/adx/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/mips/tx4927/common/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/mips/momentum/jaguar_atx/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/mips/kernel/gdb-stub.c # 2004/03/01 19:01:46-08:00 akpm@osdl.org +1 -1 # remove a few remaining "make dep" references # # arch/mips/au1000/xxs1500/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/mips/au1000/pb1550/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/mips/au1000/mtx-1/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/mips/au1000/hydrogen3/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/mips/au1000/csb250/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/i386/mach-voyager/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -5 # remove a few remaining "make dep" references # # arch/h8300/platform/h8s/generic/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/h8300/platform/h8s/edosk2674/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/h8300/platform/h8s/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/h8300/platform/h8300h/h8max/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/h8300/platform/h8300h/generic/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/h8300/platform/h8300h/aki3068net/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/h8300/platform/h8300h/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -4 # remove a few remaining "make dep" references # # arch/h8300/mm/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -5 # remove a few remaining "make dep" references # # arch/arm26/mm/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -7 # remove a few remaining "make dep" references # # arch/arm/kernel/Makefile # 2004/03/01 19:01:46-08:00 akpm@osdl.org +1 -1 # remove a few remaining "make dep" references # # Documentation/networking/arcnet.txt # 2004/03/01 19:01:46-08:00 akpm@osdl.org +0 -1 # remove a few remaining "make dep" references # # ChangeSet # 2004/03/01 23:05:16-08:00 akpm@osdl.org # [PATCH] buslogic initsection fix # # From: Bob Doyle # # BusLogic_UnregisterHostAdapter() is referenced from __exit code, so it cannot # be __init. # # drivers/scsi/BusLogic.c # 2004/03/01 19:01:45-08:00 akpm@osdl.org +1 -1 # buslogic initsection fix # # ChangeSet # 2004/03/01 23:05:06-08:00 akpm@osdl.org # [PATCH] Fix network hashtable sizing # # The new networking hashtable sizing is all bollixed up. The logic is wrong # and tcp is setting it to the logarithm of what was intended. Heaven knows. # # Fix it up so that the sizing is the same as it used to be in 2.6, with a # boot-time override. Which was what was intended. # # net/ipv4/tcp.c # 2004/03/01 19:01:45-08:00 akpm@osdl.org +1 -3 # Fix network hashtable sizing # # net/ipv4/route.c # 2004/03/01 19:01:45-08:00 akpm@osdl.org +1 -3 # Fix network hashtable sizing # # ChangeSet # 2004/03/01 23:04:56-08:00 akpm@osdl.org # [PATCH] sys_alarm() return value fix # # From: Kurt Garloff # # when calling # # alarm(1); alarm(0); # # the second alarm can wrongly return 2. This makes an LSB test fail. # # It happens due to rounding errors in the timeval to jiffie conversion and # back. On i386 with HZ =3D=3D 1000, there would not need to be rounding # error IMVHO, but they even occur there. On HZ=3D1024 platforms, they may # even be unavoidable. # # Attached patch fixes the return value of alarm(). # # kernel/timer.c # 2004/03/01 19:01:45-08:00 akpm@osdl.org +1 -1 # sys_alarm() return value fix # # ChangeSet # 2004/03/01 23:04:41-08:00 akpm@osdl.org # [PATCH] Fix VT mode change vs. fbcon # # From: Benjamin Herrenschmidt # # This patch implements what we discussed earlier to fix the switch bewteen # KD_GRAPHICS and KD_TEXT. # # It has been tested for a few days now and appear to resolve the problem for # affected users. # # James: I know you have some objections, I don't fully agree with them, and # I want that in asap now, that bug has been plaguing fbdev since the very # beginning and it's time to get rid of that and my corresponding todolist # entry. You are welcome to propose a patch on top of this one if you feel # you can make things cleaner. The approach of adding a parameter to # con_blank() is Linus idea btw :) # # I didn't add a separate function as that would have made the butchering of # drivers/char/vt beyond what I want to deal with in 2.6. # # include/linux/vt_kern.h # 2004/03/01 19:01:44-08:00 akpm@osdl.org +2 -1 # Fix VT mode change vs. fbcon # # include/linux/fb.h # 2004/03/01 19:01:44-08:00 akpm@osdl.org +1 -0 # Fix VT mode change vs. fbcon # # include/linux/console.h # 2004/03/01 19:01:44-08:00 akpm@osdl.org +1 -1 # Fix VT mode change vs. fbcon # # drivers/video/fbmem.c # 2004/03/01 19:01:44-08:00 akpm@osdl.org +2 -1 # Fix VT mode change vs. fbcon # # drivers/video/console/vgacon.c # 2004/03/01 19:01:44-08:00 akpm@osdl.org +6 -8 # Fix VT mode change vs. fbcon # # drivers/video/console/sticon.c # 2004/03/01 19:01:44-08:00 akpm@osdl.org +9 -17 # Fix VT mode change vs. fbcon # # drivers/video/console/promcon.c # 2004/03/01 19:01:44-08:00 akpm@osdl.org +1 -1 # Fix VT mode change vs. fbcon # # drivers/video/console/fbcon.c # 2004/03/01 19:01:44-08:00 akpm@osdl.org +13 -4 # Fix VT mode change vs. fbcon # # drivers/char/vt_ioctl.c # 2004/03/01 19:01:44-08:00 akpm@osdl.org +3 -3 # Fix VT mode change vs. fbcon # # drivers/char/vt.c # 2004/03/01 19:01:44-08:00 akpm@osdl.org +21 -10 # Fix VT mode change vs. fbcon # # ChangeSet # 2004/03/01 23:04:28-08:00 akpm@osdl.org # [PATCH] Fix tty drivers which dont set tty_driver->devfs_name # # From: Marcelo Tosatti # # The following patches fixes tty drivers which dont set devfs_name. Not # doing so will cause the tty layer to create "/dev/x" entries when # devfs is being used. # # I used "drivername/" in isicom and pcxe because the letter used to # identify them are already used by other drivers. # # drivers/char/riscom8.c # 2004/03/01 19:01:44-08:00 akpm@osdl.org +1 -0 # Fix tty drivers which dont set tty_driver->devfs_name # # drivers/char/pcxx.c # 2004/03/01 19:01:44-08:00 akpm@osdl.org +1 -0 # Fix tty drivers which dont set tty_driver->devfs_name # # drivers/char/moxa.c # 2004/03/01 19:01:44-08:00 akpm@osdl.org +1 -0 # Fix tty drivers which dont set tty_driver->devfs_name # # drivers/char/isicom.c # 2004/03/01 19:01:44-08:00 akpm@osdl.org +1 -0 # Fix tty drivers which dont set tty_driver->devfs_name # # drivers/char/esp.c # 2004/03/01 19:01:44-08:00 akpm@osdl.org +1 -0 # Fix tty drivers which dont set tty_driver->devfs_name # # drivers/char/epca.c # 2004/03/01 19:01:44-08:00 akpm@osdl.org +1 -0 # Fix tty drivers which dont set tty_driver->devfs_name # # drivers/char/cyclades.c # 2004/03/01 19:01:44-08:00 akpm@osdl.org +1 -0 # Fix tty drivers which dont set tty_driver->devfs_name # # ChangeSet # 2004/03/01 23:04:18-08:00 akpm@osdl.org # [PATCH] NFS SUNRPC fix # # From: James Morris # # The patch below fixes a bug in the error handling code of # xprt_create_socket(). If sock_create() fails, we should not try and # release the non existent socket. # # This fix is by James Carter . # # net/sunrpc/xprt.c # 2004/03/01 19:01:43-08:00 akpm@osdl.org +1 -1 # NFS SUNRPC fix # # ChangeSet # 2004/03/01 23:04:07-08:00 akpm@osdl.org # [PATCH] DCSSBLK depends on CONFIG_S390 # # From: Dave Jones # # This is probably useless on x86 for eg.. (Everything else in this file is # dependant on some other s390 feature, so only this one shows up). Too bad # the drivers/s390/block stuff gets source'd at all on !s390. # # drivers/s390/block/Kconfig # 2004/03/01 19:01:29-08:00 akpm@osdl.org +4 -0 # DCSSBLK depends on CONFIG_S390 # # ChangeSet # 2004/03/01 23:03:56-08:00 akpm@osdl.org # [PATCH] linux/README update # # From: Zwane Mwaikambo # # Patch to resolve http://bugzilla.kernel.org/show_bug.cgi?id=1644 # # The bug reporter pointed out a bit of outdated information in the README # file. # # Test booted on a 32x NUMAQ with 10,000 disks # # README # 2004/03/01 19:01:28-08:00 akpm@osdl.org +10 -18 # linux/README update # # ChangeSet # 2004/03/01 23:03:45-08:00 akpm@osdl.org # [PATCH] raid1: fix oops in bio_put() # # From: Neil Brown # # Fix an off-by-one in the r1buf_pool_alloc() ENOMEM error recovery path. # # drivers/md/raid1.c # 2004/03/01 19:01:28-08:00 akpm@osdl.org +2 -2 # raid1: fix oops in bio_put() # # ChangeSet # 2004/03/01 23:03:35-08:00 akpm@osdl.org # [PATCH] C99 initiailzers for drivers/isdn/hisax/hisax_fcpcipnp.c # # From: "Art Haas" # # Here is a small patch changing the GNU-style initializers to C99 # initializers. # # drivers/isdn/hisax/hisax_fcpcipnp.c # 2004/03/01 19:01:28-08:00 akpm@osdl.org +8 -8 # C99 initiailzers for drivers/isdn/hisax/hisax_fcpcipnp.c # # ChangeSet # 2004/03/01 23:03:23-08:00 akpm@osdl.org # [PATCH] C99 initializers for drivers/usb/serial/keyspan.h # # From: "Art Haas" # # Here's a small patch changing the GNU-style initializers to C99 # initializers. # # drivers/usb/serial/keyspan.h # 2004/03/01 19:01:28-08:00 akpm@osdl.org +13 -13 # C99 initializers for drivers/usb/serial/keyspan.h # # ChangeSet # 2004/03/01 23:03:13-08:00 akpm@osdl.org # [PATCH] zr36067 driver update # # From: "Ronald S. Bultje" # # Fix the zoran driver (zr36067) for the fact that we did not handle # bitrate-conversion at all in the zr36050 MJPEG codec (on DC30 cards), with # the result being that at high-resolution, we'd overload the PCI bus and # drop half of our video capture data into /dev/null'ishness. # # Also update Ronald's email address in MAINTAINERS. # # drivers/media/video/zr36050.h # 2004/03/01 19:01:27-08:00 akpm@osdl.org +1 -0 # zr36067 driver update # # drivers/media/video/zr36050.c # 2004/03/01 19:01:27-08:00 akpm@osdl.org +29 -6 # zr36067 driver update # # MAINTAINERS # 2004/03/01 19:01:27-08:00 akpm@osdl.org +1 -1 # zr36067 driver update # # ChangeSet # 2004/03/01 23:03:02-08:00 akpm@osdl.org # [PATCH] revert the /proc thread visibility fix # # It appears that gdb, perfmon and perhaps other applications are already # opening /proc/ even though it does not appear in /proc readdir output # and is available under its group leader's directory anyway. # # Apparently ascertaining the group leader is hard for gdb and thsi trick # always worked for LinuxThreads apps. # # So revert this change. # # fs/proc/base.c # 2004/03/01 19:01:27-08:00 akpm@osdl.org +5 -6 # revert the /proc thread visibility fix # # ChangeSet # 2004/03/01 23:02:51-08:00 akpm@osdl.org # [PATCH] dm-crypt end_io bv_offset fix # # From: Christophe Saout # # We should copy the bvec array for read requests so that we still # have the unmodified bvec array to decrypt the data afterwards. # # (as discussed earlier this day for highmem bounces) # # drivers/md/dm-crypt.c # 2004/03/01 19:01:27-08:00 akpm@osdl.org +15 -2 # dm-crypt end_io bv_offset fix # # ChangeSet # 2004/03/01 23:02:40-08:00 akpm@osdl.org # [PATCH] dm-crypt cleanups # # From: Christophe Saout # # These are some dm-crypt cleanups. Use a #define PFX "crypt: " for all the # places where something gets logged as suggested by Jeff Garzik. It also # adds a small additional security check and fixed header includes. # # drivers/md/dm-crypt.c # 2004/03/01 19:11:01-08:00 akpm@osdl.org +27 -20 # dm-crypt cleanups # # ChangeSet # 2004/03/01 23:02:30-08:00 akpm@osdl.org # [PATCH] fix in-place de/encryption bug with highmem # # From: Christophe Saout # # This patch fixes the bug where in-place encryption was not detected when # the same highmem pages is mapped twice to different virtual addresses. # # This adds a parameter to xxx_process to indicate whether this is an # in-place encryption and moves the responsability to the caller using a # helper function scatterwalk.h. # # crypto/scatterwalk.h # 2004/03/01 19:01:26-08:00 akpm@osdl.org +8 -0 # fix in-place de/encryption bug with highmem # # crypto/cipher.c # 2004/03/01 19:01:26-08:00 akpm@osdl.org +9 -8 # fix in-place de/encryption bug with highmem # # ChangeSet # 2004/03/01 23:02:18-08:00 akpm@osdl.org # [PATCH] move scatterwalk functions to own file # # From: Christophe Saout # # I've cleaned up the latest patches and adjusted the header files. # # This patch moves the scatterwalk functions from cipher.c to # scatterwalk.c and adds a header file. # # crypto/scatterwalk.h # 2004/03/01 19:11:02-08:00 akpm@osdl.org +42 -0 # move scatterwalk functions to own file # # crypto/scatterwalk.c # 2004/03/01 19:01:26-08:00 akpm@osdl.org +124 -0 # move scatterwalk functions to own file # # crypto/scatterwalk.h # 2004/03/01 19:11:02-08:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.5/linux/crypto/scatterwalk.h # # crypto/scatterwalk.c # 2004/03/01 19:01:26-08:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.5/linux/crypto/scatterwalk.c # # crypto/internal.h # 2004/03/01 19:01:26-08:00 akpm@osdl.org +1 -0 # move scatterwalk functions to own file # # crypto/cipher.c # 2004/03/01 19:11:02-08:00 akpm@osdl.org +8 -128 # move scatterwalk functions to own file # # crypto/Makefile # 2004/03/01 19:01:26-08:00 akpm@osdl.org +1 -1 # move scatterwalk functions to own file # # ChangeSet # 2004/03/01 23:02:08-08:00 akpm@osdl.org # [PATCH] fix small highmem bio bounce bvec handling glitch # # From: Christophe Saout # # __end_that_request_first might modify the bv_offset and bv_len if the # segment was partially completed. The bio-read-bounce-back code should use # the unmodified bv_offset when copying the segment data: # # mm/highmem.c # 2004/03/01 19:01:25-08:00 akpm@osdl.org +6 -1 # fix small highmem bio bounce bvec handling glitch # # ChangeSet # 2004/03/01 23:01:57-08:00 akpm@osdl.org # [PATCH] sysrq-o atomicity fix # # sysrq-o is supposed to power off the machine. But if it calls into ACPI (at # least) it does lots of sleepy things, so we best not do this from interrupt # context. # # kernel/power/poweroff.c # 2004/03/01 19:01:25-08:00 akpm@osdl.org +11 -11 # sysrq-o atomicity fix # # ChangeSet # 2004/03/01 23:01:45-08:00 akpm@osdl.org # [PATCH] Doc/00-index additions # # From: "Randy.Dunlap" # # From: Alexey Dobriyan # # Mostly added descriptions of files in Documentation/ that were not listed # in Documentation/00-INDEX. # # Documentation/00-INDEX # 2004/03/01 19:01:25-08:00 akpm@osdl.org +57 -38 # Doc/00-index additions # # ChangeSet # 2004/03/01 23:01:37-08:00 akpm@osdl.org # [PATCH] s390: xpram driver # # From: Martin Schwidefsky # # xpram fix: Replace old style module parameter definition with new style. # # drivers/s390/block/xpram.c # 2004/03/01 19:01:24-08:00 akpm@osdl.org +2 -1 # s390: xpram driver # # ChangeSet # 2004/03/01 23:01:27-08:00 akpm@osdl.org # [PATCH] s390: tape class for s390 tapes # # From: Martin Schwidefsky # # s390 tape device driver changes: # # - Add private tape class to support udev configuration. # # drivers/s390/char/tape_class.h # 2004/03/01 19:01:24-08:00 akpm@osdl.org +54 -0 # s390: tape class for s390 tapes # # drivers/s390/char/tape_class.c # 2004/03/01 19:01:24-08:00 akpm@osdl.org +100 -0 # s390: tape class for s390 tapes # # drivers/s390/char/tape_core.c # 2004/03/01 19:01:24-08:00 akpm@osdl.org +3 -63 # s390: tape class for s390 tapes # # drivers/s390/char/tape_class.h # 2004/03/01 19:01:24-08:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.5/linux/drivers/s390/char/tape_class.h # # drivers/s390/char/tape_class.c # 2004/03/01 19:01:24-08:00 akpm@osdl.org +0 -0 # BitKeeper file /home/torvalds/v2.5/linux/drivers/s390/char/tape_class.c # # drivers/s390/char/tape_char.c # 2004/03/01 19:01:24-08:00 akpm@osdl.org +49 -16 # s390: tape class for s390 tapes # # drivers/s390/char/tape_block.c # 2004/03/01 19:01:24-08:00 akpm@osdl.org +0 -5 # s390: tape class for s390 tapes # # drivers/s390/char/tape.h # 2004/03/01 19:01:24-08:00 akpm@osdl.org +2 -6 # s390: tape class for s390 tapes # # drivers/s390/char/Makefile # 2004/03/01 19:01:24-08:00 akpm@osdl.org +1 -1 # s390: tape class for s390 tapes # # ChangeSet # 2004/03/01 23:01:16-08:00 akpm@osdl.org # [PATCH] s390: sclp console # # From: Martin Schwidefsky # # sclp console fixes: # # - Add signal-quiesce bug-fix from 2.4. # # - Add irq_enter/irq_exit to sclp_sync_wait to prevent the softirqs from # processing after the external interrupt. # # drivers/s390/char/sclp.c # 2004/03/01 19:01:24-08:00 akpm@osdl.org +32 -12 # s390: sclp console # # ChangeSet # 2004/03/01 23:01:06-08:00 akpm@osdl.org # [PATCH] s390: common i/o layer. # # From: Martin Schwidefsky # # Common i/o layer fixes: # # - Remove documentation entry for non-existent cio_notoper_msg parameter. # # - Add documentation for availability attritube. # # - Replace function of the steal_lock attribute by "echo force" to the # online attribute. # # - Trigger device sensing in the online function for unknown devices. # # - Always try to get devices online even if they are marked reserved. # Someone could have released the device while it was offline. # # - Add try_module_get/module_put pairs to the online function of ccw devices # and ccwgroup devices. # # - Add owner field to ccwgroup driver structure. Set owner field in ctc, # lcs and qeth. # # - Fix alignment problems in channel measurement block interface. # # include/asm-s390/ccwgroup.h # 2004/03/01 19:01:23-08:00 akpm@osdl.org +1 -0 # s390: common i/o layer. # # include/asm-s390/ccwdev.h # 2004/03/01 19:01:23-08:00 akpm@osdl.org +2 -0 # s390: common i/o layer. # # drivers/s390/net/qeth.c # 2004/03/01 19:01:23-08:00 akpm@osdl.org +1 -0 # s390: common i/o layer. # # drivers/s390/net/lcs.c # 2004/03/01 19:01:23-08:00 akpm@osdl.org +3 -2 # s390: common i/o layer. # # drivers/s390/net/ctcmain.c # 2004/03/01 19:01:23-08:00 akpm@osdl.org +4 -3 # s390: common i/o layer. # # drivers/s390/cio/device_ops.c # 2004/03/01 19:01:23-08:00 akpm@osdl.org +4 -0 # s390: common i/o layer. # # drivers/s390/cio/device_fsm.c # 2004/03/01 19:01:23-08:00 akpm@osdl.org +13 -23 # s390: common i/o layer. # # drivers/s390/cio/device.h # 2004/03/01 19:01:23-08:00 akpm@osdl.org +0 -1 # s390: common i/o layer. # # drivers/s390/cio/device.c # 2004/03/01 19:01:23-08:00 akpm@osdl.org +43 -81 # s390: common i/o layer. # # drivers/s390/cio/css.h # 2004/03/01 19:01:23-08:00 akpm@osdl.org +1 -0 # s390: common i/o layer. # # drivers/s390/cio/cmf.c # 2004/03/01 19:01:23-08:00 akpm@osdl.org +24 -10 # s390: common i/o layer. # # drivers/s390/cio/ccwgroup.c # 2004/03/01 19:01:23-08:00 akpm@osdl.org +11 -5 # s390: common i/o layer. # # drivers/s390/block/dasd_eckd.c # 2004/03/01 19:01:23-08:00 akpm@osdl.org +2 -2 # s390: common i/o layer. # # Documentation/s390/driver-model.txt # 2004/03/01 19:01:23-08:00 akpm@osdl.org +3 -0 # s390: common i/o layer. # # Documentation/s390/CommonIO # 2004/03/01 19:01:23-08:00 akpm@osdl.org +0 -9 # s390: common i/o layer. # # ChangeSet # 2004/03/01 23:00:55-08:00 akpm@osdl.org # [PATCH] s390: core s390 update # # From: Martin Schwidefsky # # s390 bug fixes: # # - Add missing i/o controls to compat ioctl translation table. # # - Fix some gcc 3.4 warnings. # # - Export _sb_findmap. # # - Export smp_call_function_on only if CONFIG_SMP=y. # # - Add safe-guard to diag10. # # - Add type definition for compat_timer_t. # # - Fix first argument of signal_processor_ps. # # include/asm-s390/sigp.h # 2004/03/01 19:01:23-08:00 akpm@osdl.org +1 -1 # s390: core s390 update # # include/asm-s390/compat.h # 2004/03/01 19:01:23-08:00 akpm@osdl.org +1 -0 # s390: core s390 update # # arch/s390/mm/init.c # 2004/03/01 19:01:23-08:00 akpm@osdl.org +2 -2 # s390: core s390 update # # arch/s390/mm/cmm.c # 2004/03/01 19:01:23-08:00 akpm@osdl.org +1 -2 # s390: core s390 update # # arch/s390/kernel/traps.c # 2004/03/01 19:01:23-08:00 akpm@osdl.org +0 -2 # s390: core s390 update # # arch/s390/kernel/smp.c # 2004/03/01 19:01:23-08:00 akpm@osdl.org +4 -3 # s390: core s390 update # # arch/s390/kernel/s390_ksyms.c # 2004/03/01 19:01:23-08:00 akpm@osdl.org +1 -1 # s390: core s390 update # # arch/s390/kernel/compat_ptrace.h # 2004/03/01 19:01:23-08:00 akpm@osdl.org +7 -10 # s390: core s390 update # # arch/s390/kernel/compat_linux.c # 2004/03/01 19:01:23-08:00 akpm@osdl.org +1 -2 # s390: core s390 update # # arch/s390/kernel/compat_ioctl.c # 2004/03/01 19:01:23-08:00 akpm@osdl.org +9 -0 # s390: core s390 update # # ChangeSet # 2004/03/01 23:00:44-08:00 akpm@osdl.org # [PATCH] ppc64: Update G5 defconfig, remove DISCONTIGMEM # # From: Benjamin Herrenschmidt # # This patch updates the g5_defconfig on ppc64, running it through oldconfig # and removing CONFIG_DISTCONTIGMEM. I don't use the discontigmem stuff at # all, even on machines with +2Gb of RAM, so it's just bloat. # # arch/ppc64/configs/g5_defconfig # 2004/03/01 19:01:22-08:00 akpm@osdl.org +17 -10 # ppc64: Update G5 defconfig, remove DISCONTIGMEM # # ChangeSet # 2004/03/01 23:00:34-08:00 akpm@osdl.org # [PATCH] Add missing numa EXPORT_SYMBOLs # # From: Anton Blanchard # # Add some missing EXPORT_SYMBOLs. # # arch/ppc64/mm/numa.c # 2004/03/01 19:01:22-08:00 akpm@osdl.org +3 -0 # Add missing numa EXPORT_SYMBOLs # # ChangeSet # 2004/03/01 23:00:24-08:00 akpm@osdl.org # [PATCH] ppc64: iSeries virtual disk update # # From: Stephen Rothwell # # This patch (hopefully) addresses concerns Christoph Hellwig had with the # virtual disk probing code. # # drivers/block/viodasd.c # 2004/03/01 19:01:22-08:00 akpm@osdl.org +12 -17 # ppc64: iSeries virtual disk update # # ChangeSet # 2004/03/01 23:00:12-08:00 akpm@osdl.org # [PATCH] ppc64: fix a bug in iSeries MMU hash management # # From: Benjamin Herrenschmidt # # iSeries HyperVisor is doing some evilery when inserting PTEs that I didn't # properly account for when rewriting that code, causing iSeries box to blow # up regulary. # # arch/ppc64/mm/hash_low.S # 2004/03/01 19:01:21-08:00 akpm@osdl.org +2 -3 # ppc64: fix a bug in iSeries MMU hash management # # arch/ppc64/kernel/pSeries_lpar.c # 2004/03/01 19:01:21-08:00 akpm@osdl.org +4 -1 # ppc64: fix a bug in iSeries MMU hash management # # arch/ppc64/kernel/pSeries_htab.c # 2004/03/01 19:01:21-08:00 akpm@osdl.org +1 -1 # ppc64: fix a bug in iSeries MMU hash management # # ChangeSet # 2004/03/01 23:00:02-08:00 akpm@osdl.org # [PATCH] fix umount dataloss problem # # address_spaces have a `dirtied_when' jiffies field which records the time at # which the mapping was first dirtied. This is used for the periodic writeback # (kupdate) function. It is also used to prevent livelocks in the writeback # code: don't try to write back objects which were dirtied after # sync_sb_inodes() was called. # # It used to be the case that dirtied_when == 0 had magical properties, so # there is code in there which avoids accidentally setting dirtied_when to zero # at jiffy wrap time. We just set it to jiffies|1. # # Unfortunately, jiffies|1 is in the future. So under some rare timing # circumstances (inode dirtied within one jiffy of umount) the livelock # avoidance code in sync_sb_inodes() can accidentally trigger and we fail to # write an inode out, resulting in filesytem corruption on ext2-style # filesystems. Normally, nobody dirties a file within a millisecond of umount, # so it was not noticed. # # It is no longer the case that (address_space.dirtied_when == 0) has special # meaning, so we can just remove all that code and fix the bug. # # fs/fs-writeback.c # 2004/03/01 19:01:21-08:00 akpm@osdl.org +4 -6 # fix umount dataloss problem # # ChangeSet # 2004/03/01 23:29:30-05:00 kberg@linux1394.org # IEEE1394(r1179): Fix nodemgr_get_max_rom() to work properly on little endian machines. # # drivers/ieee1394/nodemgr.c # 2004/03/01 23:27:36-05:00 kberg@linux1394.org +1 -1 # IEEE1394(r1179): Fix nodemgr_get_max_rom() to work properly on little endian machines. # # ChangeSet # 2004/03/01 23:26:01-05:00 bcollins@debian.org # IEEE1394(r1180): Fix pdrv update call to use ud class list. Fixes an oops. # # drivers/ieee1394/nodemgr.c # 2004/03/01 23:25:03-05:00 bcollins@debian.org +12 -13 # IEEE1394(r1180): Fix pdrv update call to use ud class list. Fixes an oops. # # ChangeSet # 2004/03/01 15:28:49-08:00 santil@us.ibm.com # [PATCH] broken PowerPC Virtual Ethernet # # This fixes the PowerPC Virtual Ethernet driver that got broken by the # recent ppc64 iommu patch... # # drivers/net/ibmveth.c # 2004/03/01 08:38:07-08:00 santil@us.ibm.com +2 -2 # broken PowerPC Virtual Ethernet # # ChangeSet # 2004/03/01 14:07:55-08:00 hollisb@us.ibm.com # [PATCH] ppc64: export vio_find_node() # # To hotplug-remove virtual devices, we need vio_find_node() so we have a # pointer to pass to vio_unregister_device(). # # arch/ppc64/kernel/vio.c # 2004/03/01 08:04:41-08:00 hollisb@us.ibm.com +38 -0 # ppc64: export vio_find_node() # # ChangeSet # 2004/03/01 14:07:43-08:00 hollisb@us.ibm.com # [PATCH] ppc64: make "viodev->unit_address" 32-bit # # vio_dev->unit_address only holds 32 bits of information anyways, so no # need for 64-bit field. # # include/asm-ppc64/vio.h # 2004/03/01 08:04:24-08:00 hollisb@us.ibm.com +1 -1 # ppc64: make "viodev->unit_address" 32-bit # # drivers/net/ibmveth.c # 2004/03/01 08:04:24-08:00 hollisb@us.ibm.com +5 -5 # ppc64: make "viodev->unit_address" 32-bit # # arch/ppc64/kernel/vio.c # 2004/03/01 08:04:24-08:00 hollisb@us.ibm.com +2 -3 # ppc64: make "viodev->unit_address" 32-bit # # ChangeSet # 2004/03/01 11:43:06-08:00 greg@kroah.com # [PATCH] Fix USB printer transfers # # From Barry K. Nathan # # This fixes the ulblp transfer length code, which would otherwise skip # the final iteration and lead to incomplete printer output (and us # waiting forever for the transfer to complete) # # drivers/usb/class/usblp.c # 2004/02/29 23:17:24-08:00 greg@kroah.com +11 -3 # Fix USB printer transfers # # ChangeSet # 2004/03/01 13:37:04-05:00 rmk@arm.linux.org.uk # [PATCH] Wireless pcmcia netdev patches # # On Mon, Nov 17, 2003 at 02:57:44PM -0800, Jean Tourrilhes wrote: # > On Sun, Nov 16, 2003 at 11:33:01PM +0000, Russell King wrote: # > > Jean, # > > # > > Could you please arrange for this patch to be tested? It covers all # > > the PCMCIA wireless drivers in 2.6.0-test9; I haven't been able to # > > test. # > # > Dual P500, kernel 2.6.0-test9 + your patch. # > ------------------------------------------------- # >... # > Few comments : # > o Yanked the cards out of the socket, cardmgr did ifconfig # > down and removal of module automatically. # > o I did not see any patch for the Orinoco driver, but I did # > not check if it needs one. Did not look at HostAP either... # > o wl3501_cs : ask Arnaldo. # > o With 2.6.0-test9, I had instances of "can't read CIS". I # > actually had to reboot to perform the test. # > o The kobject Oops is something I think I saw before. I never # > remove my Aironet card because I don't want to reboot :-( This time, # > it seems to have survived better, so I see that as progress ;-) # # This patch seems to have been forgotten about, so here it is again, # this time against 2.6.4-rc1. This really needs to be send upstream, # though I don't know where we got to with this one. Maybe we should # put it in akpm's tree for a while? # # It's essentially more of the "don't deadlock if you pull out a # PCMCIA network card and it's currently configured up" patch which # went in recently for PCMCIA NIC cards. # # drivers/net/wireless/wl3501_cs.c # 2004/02/28 05:12:49-05:00 rmk@arm.linux.org.uk +0 -18 # Wireless pcmcia netdev patches # # drivers/net/wireless/wavelan_cs.c # 2004/02/18 17:41:02-05:00 rmk@arm.linux.org.uk +0 -27 # Wireless pcmcia netdev patches # # drivers/net/wireless/ray_cs.c # 2004/02/18 17:40:58-05:00 rmk@arm.linux.org.uk +2 -18 # Wireless pcmcia netdev patches # # drivers/net/wireless/netwave_cs.c # 2004/02/05 11:09:30-05:00 rmk@arm.linux.org.uk +2 -23 # Wireless pcmcia netdev patches # # drivers/net/wireless/airo_cs.c # 2004/02/05 11:09:01-05:00 rmk@arm.linux.org.uk +1 -19 # Wireless pcmcia netdev patches # # ChangeSet # 2004/03/01 13:36:55-05:00 mzyngier@freesurf.fr # [PATCH] Re: 2.6.4-rc1 + hp100 EISA, not working # # >>>>> "Pawel" == Pawe writes: # # Pawel> On 2.6.3 it just Oopsed and didn't work. On 2.6.4-rc1 it does # Pawel> not oops but it doesn't work (neither as module nor as build in kernel). # # Note that hp100 in 2.6.4-rc1 is still broken wrt EISA probing, since # it lacks the terminating entry in the EISA ID list. This one-liner # should take care of random crashes that are often reported to LKML : # # ===== drivers/net/hp100.c 1.24 vs edited ===== # # drivers/net/hp100.c # 2004/03/01 06:18:00-05:00 mzyngier@freesurf.fr +1 -0 # Re: 2.6.4-rc1 + hp100 EISA, not working # # ChangeSet # 2004/03/01 07:44:38-08:00 axboe@suse.de # [PATCH] fix CDROM_SEND_PACKET 32 -> 64-bit translation # # Here's a much better version. The real bug was of course that the # get_user/put_user for data_direction were transposed. # # This patch also fixes the translation of "quiet" and "timeout" to be # safer and clearer (instead of memcpying them as two ints and knowing # that "quiet" is first and assuming that "compat_int_t" is always the # same as the native "int", the code now handles them explicitly). # # We should use "access_ok()" and __get_user/__put_user to generate better # code for this, but it's not performance-critical, so we don't care. # Some other day, perhaps. # # fs/compat_ioctl.c # 2004/03/01 06:18:41-08:00 axboe@suse.de +9 -4 # fix CDROM_SEND_PACKET 32 -> 64-bit translation # # ChangeSet # 2004/03/01 09:34:23-05:00 bcollins@debian.org # SPARC/m68k: Remove sun_setup_serial references, which is already gone. # # arch/m68k/kernel/setup.c # 2004/03/01 09:30:55-05:00 bcollins@debian.org +0 -1 # Remove sun_setup_serial references, which is already gone # # arch/sparc64/mm/init.c # 2004/03/01 09:30:54-05:00 bcollins@debian.org +0 -10 # Remove sun_setup_serial references, which is already gone # # arch/sparc/kernel/setup.c # 2004/03/01 09:30:54-05:00 bcollins@debian.org +0 -1 # Remove sun_setup_serial references, which is already gone # # ChangeSet # 2004/02/29 21:53:00-08:00 bdschuym@pandora.be # [BR_NETFILTER]: Fix vlan-encapsulated fragmented IP traffic. # # When vlan-tagged fragmented IP traffic passes the bridging firewall and # ip_conntrack is loaded and iptables sees this IP traffic, an oops can # occur when trying to fragment the defragmented packets. This only # happens in the slow_path of ip_fragment(). # The problem was reported, diagnosed and fixed by Adam Osuchowski and # Tomasz Dubinski. # When ip_fragment() is fragmenting an IP packet that's encapsulated, it has # to make sure there is enough head room for the encapsulating header. # # The patch below fixes it. I saw no other way than to add some code to # ip_fragment(), but this extra code is located in the slow_path so it's # hardly ever executed. # # net/ipv4/ip_output.c # 2004/02/29 21:52:42-08:00 bdschuym@pandora.be +12 -3 # [BR_NETFILTER]: Fix vlan-encapsulated fragmented IP traffic. # # When vlan-tagged fragmented IP traffic passes the bridging firewall and # ip_conntrack is loaded and iptables sees this IP traffic, an oops can # occur when trying to fragment the defragmented packets. This only # happens in the slow_path of ip_fragment(). # The problem was reported, diagnosed and fixed by Adam Osuchowski and # Tomasz Dubinski. # When ip_fragment() is fragmenting an IP packet that's encapsulated, it has # to make sure there is enough head room for the encapsulating header. # # The patch below fixes it. I saw no other way than to add some code to # ip_fragment(), but this extra code is located in the slow_path so it's # hardly ever executed. # # include/linux/netfilter_bridge.h # 2004/02/29 21:52:42-08:00 bdschuym@pandora.be +14 -0 # [BR_NETFILTER]: Fix vlan-encapsulated fragmented IP traffic. # # When vlan-tagged fragmented IP traffic passes the bridging firewall and # ip_conntrack is loaded and iptables sees this IP traffic, an oops can # occur when trying to fragment the defragmented packets. This only # happens in the slow_path of ip_fragment(). # The problem was reported, diagnosed and fixed by Adam Osuchowski and # Tomasz Dubinski. # When ip_fragment() is fragmenting an IP packet that's encapsulated, it has # to make sure there is enough head room for the encapsulating header. # # The patch below fixes it. I saw no other way than to add some code to # ip_fragment(), but this extra code is located in the slow_path so it's # hardly ever executed. # # ChangeSet # 2004/02/29 13:30:03-05:00 bcollins@debian.org # IEEE1394/ohci(r1179): Remove ohci->id. It was just the same as host->id anyway. # # drivers/ieee1394/video1394.c # 2004/02/29 13:29:18-05:00 bcollins@debian.org +49 -49 # IEEE1394/ohci(r1179): Remove ohci->id. It was just the same as host->id anyway. # # drivers/ieee1394/ohci1394.h # 2004/02/29 13:29:18-05:00 bcollins@debian.org +0 -2 # IEEE1394/ohci(r1179): Remove ohci->id. It was just the same as host->id anyway. # # drivers/ieee1394/ohci1394.c # 2004/02/29 13:29:18-05:00 bcollins@debian.org +128 -122 # IEEE1394/ohci(r1179): Remove ohci->id. It was just the same as host->id anyway. # # drivers/ieee1394/amdtp.c # 2004/02/29 13:29:18-05:00 bcollins@debian.org +4 -4 # IEEE1394/ohci(r1179): Remove ohci->id. It was just the same as host->id anyway. # # ChangeSet # 2004/02/29 13:23:48-05:00 rl@hellgate.ch # [PATCH] Update via-rhine Kconfig entry # # Previous Kconfig change was incorrect, this is a better one. # # drivers/net/Kconfig # 2004/02/27 17:23:58-05:00 rl@hellgate.ch +8 -10 # Re: Update via-rhine Kconfig entry # # ChangeSet # 2004/02/29 13:23:40-05:00 geert@linux-m68k.org # [PATCH] lost Amiga Hydra Ethernet patch # # On Fri, 27 Feb 2004, Linus Torvalds wrote: # > Ok, as usual, there was a lot of stuff for the -rc1, but as seems to be # > more and more true it is mainly in the "periphery". # > # > Andrew Morton: # > o m68k: Amiga Hydra Ethernet new driver model # # This part of the patch seems to have been lost (root_hydra_dev is no more): # # drivers/net/hydra.c # 2004/02/29 03:53:41-05:00 geert@linux-m68k.org +0 -4 # Re: Linux 2.6.4-rc1 # # ChangeSet # 2004/02/29 11:37:00-05:00 bcollins@debian.org # IEEE1394/dv(r1177): Fix dv1394 devfs cleanup. # # drivers/ieee1394/dv1394.c # 2004/02/29 11:36:03-05:00 bcollins@debian.org +31 -29 # IEEE1394/dv(r1177): Fix dv1394 devfs cleanup. # # ChangeSet # 2004/02/29 09:36:26-05:00 bcollins@debian.org # IEEE1394(r1176): Remove mempool and ctor stuff. # # drivers/ieee1394/ieee1394_core.c # 2004/02/29 09:30:15-05:00 bcollins@debian.org +25 -40 # IEEE1394(r1176): Remove mempool and ctor stuff. # # ChangeSet # 2004/02/29 08:46:48-05:00 bcollins@debian.org # IEEE1394: Revision sync. # # drivers/ieee1394/sbp2.c # 2004/02/29 08:40:56-05:00 bcollins@debian.org +1 -1 # IEEE1394: Revision sync. # # drivers/ieee1394/ohci1394.c # 2004/02/29 08:40:56-05:00 bcollins@debian.org +1 -1 # IEEE1394: Revision sync. # # drivers/ieee1394/eth1394.c # 2004/02/29 08:40:56-05:00 bcollins@debian.org +2 -2 # IEEE1394: Revision sync. # # ChangeSet # 2004/02/29 08:33:21-05:00 bcollins@debian.org # IEEE1394/eth1394(r1175): Added MODULE_DEVICE_TABLE(). # # drivers/ieee1394/eth1394.c # 2004/02/29 08:32:12-05:00 bcollins@debian.org +2 -0 # IEEE1394/eth1394(r1175): Added MODULE_DEVICE_TABLE(). # # ChangeSet # 2004/02/28 21:13:08-08:00 davem@nuts.davemloft.net # [SPARC64]: Add support for CONFIG_DEBUG_STACK_USAGE. # # include/asm-sparc64/thread_info.h # 2004/02/28 21:08:39-08:00 davem@nuts.davemloft.net +21 -4 # [SPARC64]: Add support for CONFIG_DEBUG_STACK_USAGE. # # arch/sparc64/defconfig # 2004/02/28 21:08:39-08:00 davem@nuts.davemloft.net +1 -1 # [SPARC64]: Add support for CONFIG_DEBUG_STACK_USAGE. # # arch/sparc64/Kconfig # 2004/02/28 21:08:39-08:00 davem@nuts.davemloft.net +9 -0 # [SPARC64]: Add support for CONFIG_DEBUG_STACK_USAGE. # # ChangeSet # 2004/02/28 22:25:59-05:00 kberg@linux1394.org # IEEE1394(r1174): Fixed a problem parsing directories with null entries. # # drivers/ieee1394/csr1212.c # 2004/02/28 22:24:39-05:00 kberg@linux1394.org +6 -0 # IEEE1394(r1174): Fixed a problem parsing directories with null entries. # # ChangeSet # 2004/02/28 16:21:03-08:00 davem@nuts.davemloft.net # [AF_UNIX]: Mark unix_*_ops as static. # # net/unix/af_unix.c # 2004/02/28 16:20:46-08:00 davem@nuts.davemloft.net +85 -68 # [AF_UNIX]: Mark unix_*_ops as static. # # ChangeSet # 2004/02/28 16:11:23-08:00 scd@broked.org # [AF_UNIX]: Add SOCK_SEQPACKET support. # # net/unix/af_unix.c # 2004/02/28 16:11:04-08:00 scd@broked.org +34 -7 # [AF_UNIX]: Add SOCK_SEQPACKET support. # # ChangeSet # 2004/02/28 16:06:18-08:00 davem@nuts.davemloft.net # [NET]: Propagate dev_mc_{add,delete}() error to SIOC{ADD,DEL}MULTI. # # Noticed by Randy Dunlap. # # net/core/dev.c # 2004/02/28 16:05:49-08:00 davem@nuts.davemloft.net +4 -6 # [NET]: Propagate dev_mc_{add,delete}() error to SIOC{ADD,DEL}MULTI. # # Noticed by Randy Dunlap. # # ChangeSet # 2004/02/29 00:56:45+01:00 marcel@holtmann.org # [Bluetooth] Use BT_ERR wherever possible # # This patch neatens the code by using BT_ERR and so using the function # name in the macro to save code and rom space. # # Patch from Joe Perches # # ChangeSet # 2004/02/28 15:54:29-08:00 akpm@osdl.org # [ATM]: Gcc-3.5 fix for net/atm/lec.c # # net/atm/lec.c # 2004/02/28 15:54:09-08:00 akpm@osdl.org +3 -3 # [ATM]: Gcc-3.5 fix for net/atm/lec.c # # drivers/bluetooth/btuart_cs.c # 2004/02/29 00:53:39+01:00 marcel@holtmann.org +13 -13 # Use BT_ERR wherever possible # # drivers/bluetooth/bt3c_cs.c # 2004/02/29 00:53:38+01:00 marcel@holtmann.org +15 -15 # Use BT_ERR wherever possible # # drivers/bluetooth/bluecard_cs.c # 2004/02/29 00:53:36+01:00 marcel@holtmann.org +10 -10 # Use BT_ERR wherever possible # # drivers/bluetooth/dtl1_cs.c # 2004/02/29 00:53:06+01:00 marcel@holtmann.org +13 -13 # Use BT_ERR wherever possible # # ChangeSet # 2004/02/28 17:14:55-05:00 kberg@linux1394.org # IEEE1394(r1173): Small change to csr1212 prevent possible kernel panics from improper directory parsing. # # drivers/ieee1394/csr1212.c # 2004/02/28 17:12:18-05:00 kberg@linux1394.org +4 -3 # IEEE1394(r1173): Small change to csr1212 prevent possible kernel panics from improper directory parsing. # # ChangeSet # 2004/02/28 17:03:13-05:00 jgarzik@redhat.com # [libata] Use scsi_finish_command as completion function, # in our error handling thread callback. # # This also exports scsi_finish_command in the SCSI layer. # # Thanks much to James Bottomley and his patience, as this solution # was figured out. # # include/scsi/scsi_cmnd.h # 2004/02/28 17:01:12-05:00 jgarzik@redhat.com +1 -0 # [libata] Use scsi_finish_command as completion function, # in our error handling thread callback. # # This also exports scsi_finish_command in the SCSI layer. # # drivers/scsi/scsi_priv.h # 2004/02/28 17:01:12-05:00 jgarzik@redhat.com +0 -1 # [libata] Use scsi_finish_command as completion function, # in our error handling thread callback. # # This also exports scsi_finish_command in the SCSI layer. # # drivers/scsi/scsi.c # 2004/02/28 17:01:12-05:00 jgarzik@redhat.com +1 -0 # [libata] Use scsi_finish_command as completion function, # in our error handling thread callback. # # This also exports scsi_finish_command in the SCSI layer. # # drivers/scsi/libata-core.c # 2004/02/28 17:01:12-05:00 jgarzik@redhat.com +8 -0 # [libata] Use scsi_finish_command as completion function, # in our error handling thread callback. # # This also exports scsi_finish_command in the SCSI layer. # # ChangeSet # 2004/02/28 14:17:30-05:00 bcollins@debian.org # IEEE1394(r1172): Generalize the default config rom entries for new hosts. # # drivers/ieee1394/pcilynx.c # 2004/02/28 14:16:26-05:00 bcollins@debian.org +3 -36 # IEEE1394(r1172): Generalize the default config rom entries for new hosts. # # drivers/ieee1394/ohci1394.c # 2004/02/28 14:16:25-05:00 bcollins@debian.org +3 -38 # IEEE1394(r1172): Generalize the default config rom entries for new hosts. # # drivers/ieee1394/ieee1394_core.c # 2004/02/28 14:16:23-05:00 bcollins@debian.org +8 -0 # IEEE1394(r1172): Generalize the default config rom entries for new hosts. # # drivers/ieee1394/hosts.h # 2004/02/28 14:16:23-05:00 bcollins@debian.org +3 -1 # IEEE1394(r1172): Generalize the default config rom entries for new hosts. # # drivers/ieee1394/hosts.c # 2004/02/28 14:16:22-05:00 bcollins@debian.org +12 -2 # IEEE1394(r1172): Generalize the default config rom entries for new hosts. # # drivers/ieee1394/eth1394.h # 2004/02/28 14:16:21-05:00 bcollins@debian.org +2 -0 # IEEE1394(r1172): Generalize the default config rom entries for new hosts. # # drivers/ieee1394/eth1394.c # 2004/02/28 14:16:20-05:00 bcollins@debian.org +5 -74 # IEEE1394(r1172): Generalize the default config rom entries for new hosts. # # drivers/ieee1394/Makefile # 2004/02/28 14:16:15-05:00 bcollins@debian.org +1 -1 # IEEE1394(r1172): Generalize the default config rom entries for new hosts. # # drivers/ieee1394/Kconfig # 2004/02/28 14:16:06-05:00 bcollins@debian.org +19 -0 # IEEE1394(r1172): Generalize the default config rom entries for new hosts. # # drivers/ieee1394/config_roms.h # 2004/02/28 14:15:48-05:00 bcollins@debian.org +27 -0 # # drivers/ieee1394/config_roms.h # 2004/02/28 14:15:48-05:00 bcollins@debian.org +0 -0 # BitKeeper file /usr/src/kernel/ieee1394-2.6/drivers/ieee1394/config_roms.h # # drivers/ieee1394/config_roms.c # 2004/02/28 14:15:44-05:00 bcollins@debian.org +236 -0 # # drivers/ieee1394/config_roms.c # 2004/02/28 14:15:44-05:00 bcollins@debian.org +0 -0 # BitKeeper file /usr/src/kernel/ieee1394-2.6/drivers/ieee1394/config_roms.c # # ChangeSet # 2004/02/28 10:39:58-08:00 davem@nuts.davemloft.net # [TCP]: Restart tw bucket scan when lock is dropped, noticed by Olof Johansson. # # net/ipv4/tcp_minisocks.c # 2004/02/28 10:35:15-08:00 davem@nuts.davemloft.net +12 -4 # [TCP]: Restart tw bucket scan when lock is dropped, noticed by Olof Johansson. # # include/net/tcp.h # 2004/02/28 10:35:15-08:00 davem@nuts.davemloft.net +4 -1 # [TCP]: Restart tw bucket scan when lock is dropped, noticed by Olof Johansson. # # ChangeSet # 2004/02/28 17:39:08+00:00 rmk@flint.arm.linux.org.uk # [ARM] Always return IRQ_HANDLED for USB interrupts # # The SA1111 appears to re-trigger an interrupt immediately following # a successful interrupt, despite no interrupt actually pending. # # drivers/usb/host/ohci-sa1111.c # 2004/02/28 17:37:22+00:00 rmk@flint.arm.linux.org.uk +7 -1 # Always return IRQ_HANDLED to prevent SA1111 reporting unhandled IRQs. # # ChangeSet # 2004/02/28 07:58:28-08:00 viro@parcelfarce.linux.theplanet.co.uk # [PATCH] oops on HPFS filesystem file rename # # Maurice van der Stee noted that he got an oops on a HPFS filesystem when # saving an edited file.. # # # # # # # # This fixes it. That, BTW, means that *nobody* had ever tried to use # hpfs r/w since 2.5.3-pre3. # # fs/hpfs/buffer.c # 2004/02/27 22:33:29-08:00 viro@parcelfarce.linux.theplanet.co.uk +14 -42 # oops on HPFS filesystem file rename # # ChangeSet # 2004/02/28 07:54:20-08:00 bunk@fs.tum.de # [PATCH] move rme96xx to Documentation/sound/oss/ # # From Hans Ulrich Niedermann # # All sound documentation with the exception of the OSS rme96xx # documentation is under Documentation/sound/{alsa,oss}. # # Move the rme966xx docs, and fix the Kconfig comments # # sound/oss/Kconfig # 2004/01/13 12:23:01-08:00 bunk@fs.tum.de +1 -1 # move rme96xx to Documentation/sound/oss/ # # Documentation/sound/oss/rme96xx # 2004/02/28 07:50:54-08:00 torvalds@ppc970.osdl.org +0 -0 # Rename: Documentation/sound/rme96xx -> Documentation/sound/oss/rme96xx # # ChangeSet # 2004/02/28 07:50:29-08:00 phil.el@wanadoo.fr # [PATCH] oprofile needs smp_num_siblings on x86-64 # # P4 oprofile needs cpu_sibling_map and smp_num_siblings, the later # was not exported # # arch/x86_64/kernel/x8664_ksyms.c # 2004/02/27 22:10:55-08:00 phil.el@wanadoo.fr +1 -0 # oprofile needs smp_num_siblings on x86-64 # # ChangeSet # 2004/02/28 07:48:48-08:00 olof@austin.ibm.com # [PATCH] ppc64: Use iommu=force instead of iommu=on for commonality with x86_64 # # arch/ppc64/kernel/prom.c # 2004/02/28 00:27:02-08:00 olof@austin.ibm.com +1 -1 # ppc64: Use iommu=force instead of iommu=on for commonality with x86_64 # # ChangeSet # 2004/02/28 10:01:20-05:00 bcollins@debian.org # IEEE1394/Video1394(r1171): Fix bug with cdev_add usage from a previous change. # # drivers/ieee1394/video1394.c # 2004/02/28 10:00:05-05:00 bcollins@debian.org +1 -1 # IEEE1394/Video1394(r1171): Fix bug with cdev_add usage from a previous change. # # ChangeSet # 2004/02/28 09:58:45-05:00 bcollins@debian.org # IEEE1394/SBP2(r1170): Unblock scsi requests specifically in the update callback. # # drivers/ieee1394/sbp2.c # 2004/02/28 09:57:47-05:00 bcollins@debian.org +4 -2 # IEEE1394/SBP2(r1170): Unblock scsi requests specifically in the update callback. # # ChangeSet # 2004/02/28 11:39:52+00:00 rmk@flint.arm.linux.org.uk # [ARM] Update ICS IDE driver. # # Update ICS IDE driver with ide-dma and bio changes. # # drivers/ide/arm/icside.c # 2004/02/28 11:38:08+00:00 rmk@flint.arm.linux.org.uk +15 -26 # Fix build warnings and update with ide-dma changes. # - drive->queue is now a pointer to the queue. # - move drive->waiting_for_dma into icside_dma_common # - use ide_execute_command # - no need to initialise 'cmd' # # ChangeSet # 2004/02/28 02:02:53-08:00 davidm@tiger.hpl.hp.com # ia64: Fix pdflush-triggered stack-overflow due to long thread-creation chains. # # The pdflush kernel threads can lead to an unbounded chain of thread-creations # which can overflow the kernel stacks because we didn't uses to reset # the stack on kernel thread-creation. We do now. # # Reported by Andreas Schwab, tracked down with help from Keith Owens. # # arch/ia64/kernel/process.c # 2004/02/28 02:02:47-08:00 davidm@tiger.hpl.hp.com +49 -37 # (copy_thread): Reset the stack to the beginning. This prevents stack- # overflows for poorly written kernel threads which cause an # (unbounded) chain of thread creations as is currentl the case # for the pdflush threads. # (kernel_thread): Directly setup a call to do_fork(), bypassing the system- # call and simultaneously resetting the stack to the beginning. # (kernel_thread_helper): New function. # # arch/ia64/kernel/head.S # 2004/02/28 02:02:47-08:00 davidm@tiger.hpl.hp.com +13 -0 # (ia64_invoke_kernel_thread_helper): New routine. # # ChangeSet # 2004/02/27 21:45:51-08:00 peterc@gelato.unsw.edu.au # [PATCH] ia64: greatly speed-up I/O-SAPIC irq_enable()/irq_disable() # # This patch changes the I/O SAPIC code to cache the low 32 bits of the mask # word in kernel memory. This greatly speeds up mask_irq() and unmask_irq(). # # Normally, these operations are not on the speed-critical path of the # kernel but with certain devices drivers (including users-level device- # drivers) they can become performance-critical. # # include/asm-ia64/iosapic.h # 2004/02/27 03:39:17-08:00 peterc@gelato.unsw.edu.au +2 -2 # ia64: greatly speed-up I/O-SAPIC irq_enable()/irq_disable() # # arch/ia64/kernel/iosapic.c # 2004/02/27 03:39:48-08:00 peterc@gelato.unsw.edu.au +8 -8 # ia64: greatly speed-up I/O-SAPIC irq_enable()/irq_disable() # # ChangeSet # 2004/02/27 21:39:54-08:00 eranian@hpl.hp.com # [PATCH] ia64: perfmon update # # - fix bug in pfm_unload(), not allowed when not on correct CPU for # system-wide # - some perf/cleanup in overflow handler # - fix reset_pmds to be on a per PMD basis on counter overflow rather # than global # - remove timing debug code on messages # - no kernel info leak on PFM_END_MSG # - remove double-store on reg_flags for pfm_write_pmcs, pfm_write_pmds # - on restart reset_pmds is 0 by default # - cleanup useless macros # - cleanup some debug prints # - added ability to remove debug code # - streamlined sys_perfmonctl(), pfm_read_pmds(), pfm_write_*() # - added current->tgid to default format sample header by using one # reserved field # # include/asm-ia64/perfmon_default_smpl.h # 2004/02/26 09:25:52-08:00 eranian@hpl.hp.com +2 -2 # ia64: perfmon update # # arch/ia64/kernel/perfmon_default_smpl.c # 2004/02/26 09:26:27-08:00 eranian@hpl.hp.com +1 -0 # ia64: perfmon update # # arch/ia64/kernel/perfmon.c # 2004/02/27 08:40:40-08:00 eranian@hpl.hp.com +180 -177 # ia64: perfmon update # # ChangeSet # 2004/02/27 21:17:14-08:00 davidm@tiger.hpl.hp.com # ia64: Fix IDE block-layer BUG_ON() reported by Darren Williams. # # The problem was that IDE-disks on machines with IDE harddisks, # memory above 4GB and no hardware I/O TLB would go BUG_ON() in # blk_queue_bounce_limit() because the IDE-controller could only # address 4GB of memory and that was much less than BLK_BOUNCE_ISA # (which is equal to ISA_DMA_THRESHOLD). Note that the problem does # NOT trigger with CD-ROMs, which always uses the software I/O TLB # (and hence bounce-buffers) on such machines. # # The best fix seems to be to simply lower ISA_DMA_THRESHOLD to 4GB-1 since # that will ensure that the IDE block layer allocates memory with GFP_DMA, # which will minimize bounce buffering. # # include/asm-ia64/scatterlist.h # 2004/02/27 21:17:07-08:00 davidm@tiger.hpl.hp.com +10 -2 # (ISA_DMA_THRESHOLD): Lower from 0xffffffffffffffff to 0xffffffff so it # matches the max. physical address returned for GFP_DMA allocations # on platforms which don't have a hardware I/O MMU. # # ChangeSet # 2004/02/27 21:39:55-05:00 bcollins@debian.org # IEEE1394: Revision sync # # drivers/ieee1394/sbp2.c # 2004/02/27 21:31:29-05:00 bcollins@debian.org +1 -1 # IEEE1394: Revision sync # # drivers/ieee1394/ohci1394.c # 2004/02/27 21:31:29-05:00 bcollins@debian.org +1 -1 # IEEE1394: Revision sync # # drivers/ieee1394/eth1394.c # 2004/02/27 21:31:29-05:00 bcollins@debian.org +2 -2 # IEEE1394: Revision sync # # ChangeSet # 2004/02/27 21:28:29-05:00 bcollins@debian.org # IEEE1394(r1169): Trivial cleanups. # # drivers/ieee1394/ieee1394_transactions.c # 2004/02/27 21:27:01-05:00 bcollins@debian.org +3 -3 # IEEE1394(r1169): Trivial cleanups. # # drivers/ieee1394/eth1394.c # 2004/02/27 21:26:46-05:00 bcollins@debian.org +1 -2 # IEEE1394(r1169): Trivial cleanups. # # ChangeSet # 2004/02/27 21:21:41-05:00 bcollins@debian.org # IEEE1394(r1168): Add on a mempool for packet allocation, in addition to the kmem_cache. # # drivers/ieee1394/ieee1394_core.c # 2004/02/27 21:17:15-05:00 bcollins@debian.org +16 -5 # IEEE1394(r1168): Add on a mempool for packet allocation, in addition to the kmem_cache. # # ChangeSet # 2004/02/27 17:23:31-08:00 olof@austin.ibm.com # [PATCH] ppc64: Add iommu=on for enabling DART on small-mem machines # # This makes it possible for people like me with a small-mem G5 to enable # the DART. I see two reasons for wanting to do so: # # 1. To debug/test DART/iommu code itself (small audience, including # myself). # 2. To debug drivers on small-mem machines, since bad pci_map*() usage will # be punished (possibly larger audience). # # arch/ppc64/kernel/prom.c # 2004/02/27 07:48:10-08:00 olof@austin.ibm.com +10 -3 # ppc64: Add iommu=on for enabling DART on small-mem machines # # ChangeSet # 2004/02/27 17:22:53-08:00 torvalds@ppc970.osdl.org # Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.6 # into ppc970.osdl.org:/home/torvalds/v2.5/linux # # drivers/pci/hotplug/rpaphp_core.c # 2004/02/27 17:22:51-08:00 torvalds@ppc970.osdl.org +0 -1 # Auto merged # # drivers/pci/hotplug/rpaphp.h # 2004/02/27 17:22:51-08:00 torvalds@ppc970.osdl.org +0 -1 # Auto merged # # drivers/pci/hotplug/Kconfig # 2004/02/27 17:22:51-08:00 torvalds@ppc970.osdl.org +0 -0 # Auto merged # # ChangeSet # 2004/02/27 17:22:02-08:00 chip@pobox.com # [PATCH] export locks_remove_posix # # kNFSd needs it. # # fs/locks.c # 2004/02/27 16:44:02-08:00 chip@pobox.com +2 -0 # export locks_remove_posix # # ChangeSet # 2004/02/27 17:13:54-08:00 davidm@tiger.hpl.hp.com # Merge tiger.hpl.hp.com:/data1/bk/vanilla/linux-2.5 # into tiger.hpl.hp.com:/data1/bk/lia64/to-linus-2.5 # # arch/ia64/kernel/irq.c # 2004/02/27 17:13:48-08:00 davidm@tiger.hpl.hp.com +0 -0 # Auto merged # # arch/ia64/Kconfig # 2004/02/27 17:13:47-08:00 davidm@tiger.hpl.hp.com +0 -0 # Auto merged # # ChangeSet # 2004/02/27 15:07:27-08:00 kenneth.w.chen@intel.com # [PATCH] ia64: move irq_entry()/irq_exit() to ia64_handle_irq() # # This patch fixes a bug which could cause do_softirq() to be called # at the wrong time (from do_IRQ()) or without pre-emption protection. # # arch/ia64/kernel/irq_ia64.c # 2004/02/26 14:13:14-08:00 kenneth.w.chen@intel.com +2 -2 # ia64: move irq_entry()/irq_exit() to ia64_handle_irq() # # arch/ia64/kernel/irq.c # 2004/02/26 14:13:11-08:00 kenneth.w.chen@intel.com +0 -2 # ia64: move irq_entry()/irq_exit() to ia64_handle_irq() # # ChangeSet # 2004/02/27 22:45:22+00:00 rmk@flint.arm.linux.org.uk # [MTD] Update integrator-flash.c with MTD CVS. # # Allow command line partitioning for use with Integrator flash. # # drivers/mtd/maps/integrator-flash.c # 2004/02/27 22:43:16+00:00 rmk@flint.arm.linux.org.uk +4 -3 # Allow command line partitioning for use with Integrator flash. # Sync with MTD CVS. # # ChangeSet # 2004/02/27 22:14:34+00:00 rmk@flint.arm.linux.org.uk # [MTD] Fix ARM Firmware Suite MTD partition detection. # # Tighten AFS partition checks: # - check footer checksum. # - check that the image name is NUL terminated. # - return error from mtd->read intact. # This prevents us finding bogus AFS partitions. # # drivers/mtd/afs.c # 2004/02/27 22:12:51+00:00 rmk@flint.arm.linux.org.uk +45 -5 # Tighten AFS partition checks: # - check footer checksum. # - check that the image name is NUL terminated. # - return error from mtd->read intact. # This prevents us finding bogus AFS partitions. # # ChangeSet # 2004/02/27 21:52:15+00:00 rmk@flint.arm.linux.org.uk # [ARM] Fix SA1111 OHCI IRQ handler return type. # # drivers/usb/host/ohci-sa1111.c # 2004/02/27 21:50:27+00:00 rmk@flint.arm.linux.org.uk +2 -2 # IRQ handlers return irqreturn_t. # # ChangeSet # 2004/02/27 21:18:15+00:00 rmk@flint.arm.linux.org.uk # [MTD] Fix build errors in Lubbock MTD map driver. # # drivers/mtd/maps/lubbock-flash.c # 2004/02/27 21:11:47+00:00 rmk@flint.arm.linux.org.uk +3 -3 # Fix build errors: # lubbock-flash.c: In function `init_lubbock': # lubbock-flash.c:77: error: too few arguments to function `__ioremap' # lubbock-flash.c:101: warning: ISO C90 forbids mixed declarations and code # # ChangeSet # 2004/02/27 15:14:25-05:00 shemminger@osdl.org # [PATCH] hp100 -- isa probe fix # # Jeff, here is a cleaned up version of the 2.6.3 hp100 isa (non-modular) probing. # It needs to check for the board being present before reading the signature. # # drivers/net/hp100.c # 2004/02/26 13:32:34-05:00 shemminger@osdl.org +10 -5 # hp100 -- isa probe fix # # ChangeSet # 2004/02/27 10:41:00-08:00 kenneth.w.chen@intel.com # [PATCH] ia64: make hugetlbfs page size a boot-time option # # This patch makes it possible to select the hugetlbfs page size at boot-time, # rather than at compile-time. We believe we have resolved all the remaining # issues. All critical speed path has been taken care of, i.e., vhpt handler # and context switch. There should be no performance penalty with this dynamic # hugetlb page size feature. # # We would like to thank Jack Steiner for his initiative on this feature # and his initial cool working patch. # # include/asm-ia64/page.h # 2004/02/26 12:18:51-08:00 kenneth.w.chen@intel.com +8 -24 # ia64: make hugetlbfs page size a boot-time option # # include/asm-ia64/mmu_context.h # 2004/02/26 12:18:51-08:00 kenneth.w.chen@intel.com +3 -2 # ia64: make hugetlbfs page size a boot-time option # # arch/ia64/mm/init.c # 2004/02/26 12:18:51-08:00 kenneth.w.chen@intel.com +4 -0 # ia64: make hugetlbfs page size a boot-time option # # arch/ia64/mm/hugetlbpage.c # 2004/02/26 12:18:51-08:00 kenneth.w.chen@intel.com +37 -5 # ia64: make hugetlbfs page size a boot-time option # # arch/ia64/kernel/ivt.S # 2004/02/26 12:18:51-08:00 kenneth.w.chen@intel.com +3 -2 # ia64: make hugetlbfs page size a boot-time option # # arch/ia64/Kconfig # 2004/02/26 12:18:51-08:00 kenneth.w.chen@intel.com +0 -33 # ia64: make hugetlbfs page size a boot-time option # # ChangeSet # 2004/02/27 08:22:07-05:00 weihs@linux1394.org # IEEE1394(1164): Added 1394 acknowledge codes. # # drivers/ieee1394/ieee1394_transactions.c # 2004/02/27 08:19:16-05:00 weihs@linux1394.org +5 -0 # IEEE1394(1164): Added 1394 acknowledge codes. # # drivers/ieee1394/ieee1394.h # 2004/02/27 08:18:57-05:00 weihs@linux1394.org +3 -0 # IEEE1394(1164): Added 1394 acknowledge codes. # # ChangeSet # 2004/02/27 08:15:45-05:00 bcollins@debian.org # IEEE1394(r1167): Cleanup hostnum allocation to prevent race of double allocation. # # drivers/ieee1394/hosts.c # 2004/02/27 08:14:25-05:00 bcollins@debian.org +7 -6 # IEEE1394(r1167): Cleanup hostnum allocation to prevent race of double allocation. # # ChangeSet # 2004/02/27 08:10:23-05:00 bcollins@debian.org # IEEE1394(r1166): Move generic packet initialization to kmem_cache ctor. # # drivers/ieee1394/ieee1394_core.c # 2004/02/27 08:09:18-05:00 bcollins@debian.org +17 -11 # IEEE1394(r1166): Move generic packet initialization to kmem_cache ctor. # # ChangeSet # 2004/02/26 15:52:27-05:00 bcollins@debian.org # IEEE1394(r1165): Better pending packet handling, patch from Steve. # # drivers/ieee1394/ohci1394.c # 2004/02/26 15:51:29-05:00 bcollins@debian.org +1 -5 # IEEE1394(r1165): Better pending packet handling, patch from Steve. # # drivers/ieee1394/ieee1394_core.h # 2004/02/26 15:51:29-05:00 bcollins@debian.org +3 -0 # IEEE1394(r1165): Better pending packet handling, patch from Steve. # # drivers/ieee1394/ieee1394_core.c # 2004/02/26 15:51:29-05:00 bcollins@debian.org +45 -30 # IEEE1394(r1165): Better pending packet handling, patch from Steve. # # ChangeSet # 2004/02/26 01:19:18-05:00 romieu@fr.zoreil.com # [netdrvr r8169] fix TX descriptor overflow # # Please apply attached patch. # # Without patch, bogus descriptors are parsed as soon as # tp->cur_tx%NUM_TX_DESC + (tp->cur_tx - tp->dirty_tx) > NUM_TX_DESC # (assume for instance tp->dirty_tx = NUM_TX_DESC/2, # tp->cur_tx = NUM_TX_DESC - 1 and watch entry go beyond NUM_TX_DESC). # # Missing stats update is fixed by the patch btw. # # drivers/net/r8169.c # 2004/02/26 01:19:13-05:00 romieu@fr.zoreil.com +8 -5 # [netdrvr r8169] fix TX descriptor overflow # # Please apply attached patch. # # Without patch, bogus descriptors are parsed as soon as # tp->cur_tx%NUM_TX_DESC + (tp->cur_tx - tp->dirty_tx) > NUM_TX_DESC # (assume for instance tp->dirty_tx = NUM_TX_DESC/2, # tp->cur_tx = NUM_TX_DESC - 1 and watch entry go beyond NUM_TX_DESC). # # Missing stats update is fixed by the patch btw. # # ChangeSet # 2004/02/24 14:04:40-08:00 greg@kroah.com # PCI Hotplug: clean up the Makefile a bit more. # # Still need to fix up the pcie and shpc options to be saner for distros to use. # # drivers/pci/hotplug/Makefile # 2004/02/24 06:04:19-08:00 greg@kroah.com +8 -10 # PCI Hotplug: clean up the Makefile a bit more. # # Still need to fix up the pcie and shpc options to be saner for distros to use. # # ChangeSet # 2004/02/24 14:02:08-08:00 greg@kroah.com # PCI Hotplug: remove unneeded ACPI Makefile rules. # # drivers/pci/hotplug/Makefile # 2004/02/24 06:01:25-08:00 greg@kroah.com +5 -14 # PCI Hotplug: remove unneeded ACPI Makefile rules. # # ChangeSet # 2004/02/24 11:08:29-08:00 dlsy@snoqualmie.dp.intel.com # [PATCH] PCI Hotplug: Patch to get polling mode in SHPC hot-plug driver properly working # # Here is the patch to get polling mode in SHPC hot-plug properly # working. # # drivers/pci/hotplug/shpchp_hpc.c # 2004/02/23 14:45:31-08:00 dlsy@snoqualmie.dp.intel.com +29 -20 # PCI Hotplug: Patch to get polling mode in SHPC hot-plug driver properly working # # drivers/pci/hotplug/shpchp_ctrl.c # 2004/02/23 14:45:31-08:00 dlsy@snoqualmie.dp.intel.com +2 -0 # PCI Hotplug: Patch to get polling mode in SHPC hot-plug driver properly working # # drivers/pci/hotplug/shpchp.h # 2004/02/23 14:53:13-08:00 dlsy@snoqualmie.dp.intel.com +2 -2 # PCI Hotplug: Patch to get polling mode in SHPC hot-plug driver properly working # # drivers/pci/hotplug/pciehp_ctrl.c # 2004/02/23 14:45:31-08:00 dlsy@snoqualmie.dp.intel.com +2 -0 # PCI Hotplug: Patch to get polling mode in SHPC hot-plug driver properly working # # ChangeSet # 2004/02/24 11:08:13-08:00 lxiep@ltcfwd.linux.ibm.com # [PATCH] PCI Hotplug: fix rpaphp bugs # # The attached patch has a fix for the conflict between fakephp and # rpaphp so that fakephp and rpaphp can't be built into the kernel at the # same time and a couple of problems I missed in my previous patch. # (Sorry about that). # # drivers/pci/hotplug/rpaphp_core.c # 2004/02/20 04:16:33-08:00 lxiep@ltcfwd.linux.ibm.com +1 -3 # PCI Hotplug: fix rpaphp bugs # # drivers/pci/hotplug/rpaphp.h # 2004/02/20 04:16:33-08:00 lxiep@ltcfwd.linux.ibm.com +1 -1 # PCI Hotplug: fix rpaphp bugs # # drivers/pci/hotplug/Kconfig # 2004/02/20 04:16:33-08:00 lxiep@ltcfwd.linux.ibm.com +1 -1 # PCI Hotplug: fix rpaphp bugs # # ChangeSet # 2004/02/24 11:07:59-08:00 rmk-pci@arm.linux.org.uk # [PATCH] PCI: Introduce bus->bridge_ctl member # # GregKH mentioned confirmed that people have been waiting for this patch. # Appologies, it had completely evaporated from my mind. # # This patch introduces the "bridge_ctl" member of pci_bus, which allows # architectures to tweak the bridge control register (eg, for setting # fast back to back modes etc) in pcibios_fixup_bus(). # # Please note, though, that the value is only written back if # pci_setup_bridge() is called. This will be called if an architecture # is using the generic PCI bus setup functionality in setup-bus.c. # If an architecture doesn't, then it is the responsibility of the # architecture to write this value to the bridge as appropriate. # # (That said, the bridge control register is only ever changed if an # architecture is using setup-bus.c anyway, so there should be no # overall functional change.) # # include/linux/pci.h # 2004/02/18 15:41:55-08:00 rmk-pci@arm.linux.org.uk +2 -0 # PCI: Introduce bus->bridge_ctl member # # drivers/pci/setup-bus.c # 2003/11/24 02:33:06-08:00 rmk-pci@arm.linux.org.uk +10 -12 # PCI: Introduce bus->bridge_ctl member # # drivers/pci/probe.c # 2004/02/18 14:41:09-08:00 rmk-pci@arm.linux.org.uk +4 -0 # PCI: Introduce bus->bridge_ctl member # # ChangeSet # 2004/02/24 11:07:43-08:00 rmk-pci@arm.linux.org.uk # [PATCH] PCI: Don't report pci_request_regions() failure twice # # pci_request_regions() reports an error when pci_request_region() fails. # However, since pci_request_region() already reports an error on failure, # pci_request_regions() has some unwanted duplication. # # drivers/pci/pci.c # 2004/02/20 12:00:29-08:00 rmk-pci@arm.linux.org.uk +0 -5 # PCI: Don't report pci_request_regions() failure twice # # ChangeSet # 2004/02/24 11:07:29-08:00 rmk-pci@arm.linux.org.uk # [PATCH] PCI: Report meaningful error for failed resource allocation # # pci_assign_resource reports odd messages when resource allocation fails. # This is because res->end and res->start are modified by allocate_resource. # For example: # # PCI: Failed to allocate resource 1(0-ffffffff) for 0000:00:01.0 # # The following patch reports whether it's an IO or memory resource, and # includes the correct size. For consistency, we report it in a similar # way to the failure message in pci_request_region(), even though # res->start is unlikely to be useful. # # drivers/pci/setup-res.c # 2004/02/20 11:58:19-08:00 rmk-pci@arm.linux.org.uk +3 -2 # PCI: Report meaningful error for failed resource allocation # diff -Nru a/Documentation/00-INDEX b/Documentation/00-INDEX --- a/Documentation/00-INDEX Tue Mar 2 17:37:08 2004 +++ b/Documentation/00-INDEX Tue Mar 2 17:37:08 2004 @@ -1,7 +1,7 @@ This is a brief list of all the files in ./linux/Documentation and what -they contain. If you add a documentation file, please list it here in -alphabetical order as well, or risk being hunted down like a rabid dog. +they contain. If you add a documentation file, please list it here in +alphabetical order as well, or risk being hunted down like a rabid dog. Please try and keep the descriptions small enough to fit on one line. Thanks -- Paul G. @@ -26,10 +26,14 @@ - directory with DocBook templates etc. for kernel documentation. IO-mapping.txt - how to access I/O mapped memory from within device drivers. +IPMI.txt + - info on Linux Intelligent Platform Management Interface (IPMI) Driver. IRQ-affinity.txt - how to select which CPU(s) handle which interrupt events on SMP. +MSI-HOWTO.txt + - the Message Signaled Interrupts (MSI) Driver Guide HOWTO and FAQ. README.DAC960 - - info on Mylex DAC960/DAC1100 PCI RAID Controller Driver for Linux + - info on Mylex DAC960/DAC1100 PCI RAID Controller Driver for Linux. README.moxa - release notes for Moxa mutiport serial card. SAK.txt @@ -42,6 +46,10 @@ - how to change your VGA cursor from a blinking underscore. arm/ - directory with info about Linux on the ARM architecture. +as-iosched.txt + - info on anticipatory IO scheduler. +basic_profiling.txt + - basic instructions for those who wants to profile Linux kernel. binfmt_misc.txt - info on the kernel support for extra binary formats. block/ @@ -53,25 +61,31 @@ cdrom/ - directory with information on the CD-ROM drivers that Linux has. computone.txt - - info on Computone Intelliport II/Plus Multiport Serial Driver + - info on Computone Intelliport II/Plus Multiport Serial Driver. cpqarray.txt - info on using Compaq's SMART2 Intelligent Disk Array Controllers. cpufreq/ - - info on CPU frequency and voltage scaling + - info on CPU frequency and voltage scaling. cris/ - directory with info about Linux on CRIS architecture. +debugging-modules.txt + - some notes on debugging modules after Linux 2.6.3. devices.txt - - plain ASCII listing of all the nodes in /dev/ with major minor #'s + - plain ASCII listing of all the nodes in /dev/ with major minor #'s. digiboard.txt - info on the Digiboard PC/X{i,e,eve} multiport boards. digiepca.txt - info on Digi Intl. {PC,PCI,EISA}Xx and Xem series cards. dnotify.txt - info about directory notification in Linux. -driver-model.txt - - info about Linux driver model. +driver-model/ + - directory with info about Linux driver model. +dvb/ + - info on Linux Digital Video Broadcast (DVB) subsystem. early-userspace/ - info about initramfs, klibc, and userspace early during boot. +eisa.txt + - info on EISA bus support. exception.txt - how Linux v2.2 handles exceptions without verify_area etc. fb/ @@ -81,47 +95,51 @@ floppy.txt - notes and driver options for the floppy disk driver. ftape.txt - - notes about the floppy tape device driver + - notes about the floppy tape device driver. hayes-esp.txt - info on using the Hayes ESP serial driver. highuid.txt - notes on the change from 16 bit to 32 bit user/group IDs. +hw_random.txt + - info on Linux support for random number generator in i8xx chipsets. i2c/ - - directory with info about the I2C bus/protocol (2 wire, kHz speed) + - directory with info about the I2C bus/protocol (2 wire, kHz speed). i386/ - - directory with info about Linux on intel 32 bit architecture. -i810_rng.txt - - info on Linux support for random number generator in i8xx chipsets. + - directory with info about Linux on Intel 32 bit architecture. ia64/ - - directory with info about Linux on intel 64 bit architecture. + - directory with info about Linux on Intel 64 bit architecture. ide.txt - - important info for users of ATA devices (IDE/EIDE disks and CD-ROMS) + - important info for users of ATA devices (IDE/EIDE disks and CD-ROMS). initrd.txt - how to use the RAM disk as an initial/temporary root filesystem. input/ - info on Linux input device support. ioctl-number.txt - how to implement and register device/driver ioctl calls. +iostats.txt + - info on I/O statistics Linux kernel provides. isapnp.txt - - info on Linux ISA Plug & Play support + - info on Linux ISA Plug & Play support. isdn/ - directory with info on the Linux ISDN support, and supported cards. java.txt - - info on the in-kernel binary support for Java(tm) + - info on the in-kernel binary support for Java(tm). kbuild/ - - directory with info about the kernel build process + - directory with info about the kernel build process. kernel-doc-nano-HOWTO.txt - mini HowTo on generation and location of kernel documentation files. kernel-docs.txt - listing of various WWW + books that document kernel internals. kernel-parameters.txt - summary listing of command line / boot prompt args for the kernel. +kobject.txt + - info of the kobject infrastructure of the Linux kernel. ldm.txt - a brief description of LDM (Windows Dynamic Disks). locks.txt - info on file locking implementations, flock() vs. fcntl(), etc. logo.gif - - Full colour GIF image of Linux logo (penguin) + - Full colour GIF image of Linux logo (penguin). logo.txt - Info on creator of above logo & site to get additional images from. m68k/ @@ -133,27 +151,27 @@ mca.txt - info on supporting Micro Channel Architecture (e.g. PS/2) systems. md.txt - - info on boot arguments for the multiple devices driver + - info on boot arguments for the multiple devices driver. memory.txt - info on typical Linux memory problems. mips/ - directory with info about Linux on MIPS architecture. mkdev.cciss - - script to make /dev entries for SMART controllers (see cciss.txt) + - script to make /dev entries for SMART controllers (see cciss.txt). mkdev.ida - script to make /dev entries for Intelligent Disk Array Controllers. moxa-smartio - info on installing/using Moxa multiport serial driver. mtrr.txt - - how to use PPro Memory Type Range Registers to increase performance + - how to use PPro Memory Type Range Registers to increase performance. nbd.txt - info on a TCP implementation of a network block device. networking/ - directory with info on various aspects of networking with Linux. nfsroot.txt - - short guide on setting up a diskless box with NFS root filesystem + - short guide on setting up a diskless box with NFS root filesystem. nmi_watchdog.txt - - info on NMI watchdog for SMP systems + - info on NMI watchdog for SMP systems. oops-tracing.txt - how to decode those nasty internal kernel error dump messages. paride.txt @@ -165,11 +183,11 @@ parport-lowlevel.txt - description and usage of the low level parallel port functions. pci.txt - - info on the PCI subsystem for device driver authors -pcwd-watchdog.txt - - info and sample code for using with the PC Watchdog reset card. + - info on the PCI subsystem for device driver authors. pm.txt - info on Linux power management support. +pnp.txt + - Linux Plug and Play documentation. power/ - directory with info on Linux PCI power management. powerpc/ @@ -181,29 +199,31 @@ riscom8.txt - notes on using the RISCom/8 multi-port serial driver. rocket.txt - - info on installing/using the Comtrol RocketPort multiport serial driver + - info on installing/using the Comtrol RocketPort multiport serial driver. +rpc-cache.txt + - introduction to the caching mechanisms in the sunrpc layer. rtc.txt - notes on how to use the Real Time Clock (aka CMOS clock) driver. s390/ - directory with info on using Linux on the IBM S390. -sh/ - - directory with info on porting Linux to a new architecture. +sched-design.txt + - goals, design and implementation of the Linux O(1) scheduler. scsi/ - directory with info on Linux scsi support. serial-console.txt - how to set up Linux with a serial line console as the default. sgi-visws.txt - short blurb on the SGI Visual Workstations. +sh/ + - directory with info on porting Linux to a new architecture. smart-config.txt - description of the Smart Config makefile feature. -smp.tex - - LaTeX document describing implementation of Multiprocessor Linux smp.txt - - a few more notes on symmetric multi-processing + - a few notes on symmetric multi-processing. sonypi.txt - info on Linux Sony Programmable I/O Device support. sound/ - - directory with info on sound card support + - directory with info on sound card support. sparc/ - directory with info on using Linux on Sparc architecture. specialix.txt @@ -217,9 +237,9 @@ sx.txt - info on the Specialix SX/SI multiport serial driver. sysctl/ - - directory with info on the /proc/sys/* files + - directory with info on the /proc/sys/* files. sysrq.txt - - info on the magic SysRq key + - info on the magic SysRq key. telephony/ - directory with info on telephony (e.g. voice over IP) support. unicode.txt @@ -230,7 +250,7 @@ - directory with info regarding video/TV/radio cards and linux. vm/ - directory with info on the Linux vm code. -watchdog.txt +watchdog/ - how to auto-reboot Linux if it has "fallen and can't get up". ;-) x86_64/ - directory with info on Linux support for AMD x86-64 (Hammer) machines. @@ -238,4 +258,3 @@ - XPM image of penguin logo (see logo.txt) sitting on an xterm. zorro.txt - info on writing drivers for Zorro bus devices found on Amigas. - diff -Nru a/Documentation/networking/arcnet.txt b/Documentation/networking/arcnet.txt --- a/Documentation/networking/arcnet.txt Tue Mar 2 17:37:07 2004 +++ b/Documentation/networking/arcnet.txt Tue Mar 2 17:37:07 2004 @@ -186,7 +186,6 @@ to the chipset support if you wish. make config - make dep make clean make zImage make modules diff -Nru a/Documentation/s390/CommonIO b/Documentation/s390/CommonIO --- a/Documentation/s390/CommonIO Tue Mar 2 17:37:09 2004 +++ b/Documentation/s390/CommonIO Tue Mar 2 17:37:09 2004 @@ -14,15 +14,6 @@ Default is off. -* cio_notoper_msg = yes | no - - Determines whether messages of the type "Device 0.0.4711 became 'not - operational'" should be shown during startup; after startup, they will always - be shown. - - Default is on. - - * cio_ignore = {all} | { | } | {! | !} diff -Nru a/Documentation/s390/driver-model.txt b/Documentation/s390/driver-model.txt --- a/Documentation/s390/driver-model.txt Tue Mar 2 17:37:07 2004 +++ b/Documentation/s390/driver-model.txt Tue Mar 2 17:37:07 2004 @@ -31,6 +31,9 @@ devtype: The device type / model, if applicable. +availability: Can be 'good' or 'boxed'; 'no path' or 'no device' for + disconnected devices. + online: An interface to set the device online and offline. In the special case of the device being disconnected (see the notify function under 1.2), piping 0 to online will focibly delete diff -Nru a/Documentation/sound/oss/rme96xx b/Documentation/sound/oss/rme96xx --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/Documentation/sound/oss/rme96xx Tue Mar 2 17:37:07 2004 @@ -0,0 +1,767 @@ +Beta release of the rme96xx (driver for RME 96XX cards like the +"Hammerfall" and the "Hammerfall light") + +Important: The driver module has to be installed on a freshly rebooted system, +otherwise the driver might not be able to acquire its buffers. + +features: + + - OSS programming interface (i.e. runs with standard OSS soundsoftware) + - OSS/Multichannel interface (OSS multichannel is done by just aquiring + more than 2 channels). The driver does not use more than one device + ( yet .. this feature may be implemented later ) + - more than one RME card supported + +The driver uses a specific multichannel interface, which I will document +when the driver gets stable. (take a look at the defines in rme96xx.h, +which adds blocked multichannel formats i.e instead of +lrlrlrlr --> llllrrrr etc. + +Use the "rmectrl" programm to look at the status of the card .. +or use xrmectrl, a GUI interface for the ctrl program. + +What you can do with the rmectrl program is to set the stereo device for +OSS emulation (e.g. if you use SPDIF out). + +You do: + +./ctrl offset 24 24 + +which makes the stereo device use channels 25 and 26. + +Guenter Geiger + +copy the first part of the attached source code into rmectrl.c +and the second part into xrmectrl (or get the program from +http://gige.xdv.org/pages/soft/pages/rme) + +to compile: gcc -o rmectrl rmectrl.c +------------------------------ snip ------------------------------------ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "rme96xx.h" + +/* + remctrl.c + (C) 2000 Guenter Geiger + HP20020201 - Heiko Purnhagen +*/ + +/* # define DEVICE_NAME "/dev/mixer" */ +# define DEVICE_NAME "/dev/mixer1" + + +void usage(void) +{ + fprintf(stderr,"usage: rmectrl [/dev/mixer] [command [options]]\n\n"); + fprintf(stderr,"where command is one of:\n"); + fprintf(stderr," help show this help\n"); + fprintf(stderr," status show status bits\n"); + fprintf(stderr," control show control bits\n"); + fprintf(stderr," mix show mixer/offset status\n"); + fprintf(stderr," master set sync master\n"); + fprintf(stderr," pro set spdif out pro\n"); + fprintf(stderr," emphasis set spdif out emphasis\n"); + fprintf(stderr," dolby set spdif out no audio\n"); + fprintf(stderr," optout set spdif out optical\n"); + fprintf(stderr," wordclock set sync wordclock\n"); + fprintf(stderr," spdifin set spdif in (0=optical,1=coax,2=intern)\n"); + fprintf(stderr," syncref set sync source (0=ADAT1,1=ADAT2,2=ADAT3,3=SPDIF)\n"); + fprintf(stderr," adat1cd set ADAT1 on internal CD\n"); + fprintf(stderr," offset set dev (0..3) offset (0..25)\n"); + exit(-1); +} + + +int main(int argc, char* argv[]) +{ + int cards; + int ret; + int i; + double ft; + int fd, fdwr; + int param,orig; + rme_status_t stat; + rme_ctrl_t ctrl; + char *device; + int argidx; + + if (argc < 2) + usage(); + + if (*argv[1]=='/') { + device = argv[1]; + argidx = 2; + } + else { + device = DEVICE_NAME; + argidx = 1; + } + + fprintf(stdout,"mixer device %s\n",device); + if ((fd = open(device,O_RDONLY)) < 0) { + fprintf(stdout,"opening device failed\n"); + exit(-1); + } + + if ((fdwr = open(device,O_WRONLY)) < 0) { + fprintf(stdout,"opening device failed\n"); + exit(-1); + } + + if (argc < argidx+1) + usage(); + + if (!strcmp(argv[argidx],"help")) + usage(); + if (!strcmp(argv[argidx],"-h")) + usage(); + if (!strcmp(argv[argidx],"--help")) + usage(); + + if (!strcmp(argv[argidx],"status")) { + ioctl(fd,SOUND_MIXER_PRIVATE2,&stat); + fprintf(stdout,"stat.irq %d\n",stat.irq); + fprintf(stdout,"stat.lockmask %d\n",stat.lockmask); + fprintf(stdout,"stat.sr48 %d\n",stat.sr48); + fprintf(stdout,"stat.wclock %d\n",stat.wclock); + fprintf(stdout,"stat.bufpoint %d\n",stat.bufpoint); + fprintf(stdout,"stat.syncmask %d\n",stat.syncmask); + fprintf(stdout,"stat.doublespeed %d\n",stat.doublespeed); + fprintf(stdout,"stat.tc_busy %d\n",stat.tc_busy); + fprintf(stdout,"stat.tc_out %d\n",stat.tc_out); + fprintf(stdout,"stat.crystalrate %d (0=64k 3=96k 4=88.2k 5=48k 6=44.1k 7=32k)\n",stat.crystalrate); + fprintf(stdout,"stat.spdif_error %d\n",stat.spdif_error); + fprintf(stdout,"stat.bufid %d\n",stat.bufid); + fprintf(stdout,"stat.tc_valid %d\n",stat.tc_valid); + exit (0); + } + + if (!strcmp(argv[argidx],"control")) { + ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); + fprintf(stdout,"ctrl.start %d\n",ctrl.start); + fprintf(stdout,"ctrl.latency %d (0=64 .. 7=8192)\n",ctrl.latency); + fprintf(stdout,"ctrl.master %d\n",ctrl.master); + fprintf(stdout,"ctrl.ie %d\n",ctrl.ie); + fprintf(stdout,"ctrl.sr48 %d\n",ctrl.sr48); + fprintf(stdout,"ctrl.spare %d\n",ctrl.spare); + fprintf(stdout,"ctrl.doublespeed %d\n",ctrl.doublespeed); + fprintf(stdout,"ctrl.pro %d\n",ctrl.pro); + fprintf(stdout,"ctrl.emphasis %d\n",ctrl.emphasis); + fprintf(stdout,"ctrl.dolby %d\n",ctrl.dolby); + fprintf(stdout,"ctrl.opt_out %d\n",ctrl.opt_out); + fprintf(stdout,"ctrl.wordclock %d\n",ctrl.wordclock); + fprintf(stdout,"ctrl.spdif_in %d (0=optical,1=coax,2=intern)\n",ctrl.spdif_in); + fprintf(stdout,"ctrl.sync_ref %d (0=ADAT1,1=ADAT2,2=ADAT3,3=SPDIF)\n",ctrl.sync_ref); + fprintf(stdout,"ctrl.spdif_reset %d\n",ctrl.spdif_reset); + fprintf(stdout,"ctrl.spdif_select %d\n",ctrl.spdif_select); + fprintf(stdout,"ctrl.spdif_clock %d\n",ctrl.spdif_clock); + fprintf(stdout,"ctrl.spdif_write %d\n",ctrl.spdif_write); + fprintf(stdout,"ctrl.adat1_cd %d\n",ctrl.adat1_cd); + exit (0); + } + + if (!strcmp(argv[argidx],"mix")) { + rme_mixer mix; + int i; + + for (i=0; i<4; i++) { + mix.devnr = i; + ioctl(fd,SOUND_MIXER_PRIVATE1,&mix); + if (mix.devnr == i) { + fprintf(stdout,"devnr %d\n",mix.devnr); + fprintf(stdout,"mix.i_offset %2d (0-25)\n",mix.i_offset); + fprintf(stdout,"mix.o_offset %2d (0-25)\n",mix.o_offset); + } + } + exit (0); + } + +/* the control flags */ + + if (argc < argidx+2) + usage(); + + if (!strcmp(argv[argidx],"master")) { + int val = atoi(argv[argidx+1]); + ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); + printf("master = %d\n",val); + ctrl.master = val; + ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl); + exit (0); + } + + if (!strcmp(argv[argidx],"pro")) { + int val = atoi(argv[argidx+1]); + ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); + printf("pro = %d\n",val); + ctrl.pro = val; + ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl); + exit (0); + } + + if (!strcmp(argv[argidx],"emphasis")) { + int val = atoi(argv[argidx+1]); + ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); + printf("emphasis = %d\n",val); + ctrl.emphasis = val; + ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl); + exit (0); + } + + if (!strcmp(argv[argidx],"dolby")) { + int val = atoi(argv[argidx+1]); + ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); + printf("dolby = %d\n",val); + ctrl.dolby = val; + ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl); + exit (0); + } + + if (!strcmp(argv[argidx],"optout")) { + int val = atoi(argv[argidx+1]); + ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); + printf("optout = %d\n",val); + ctrl.opt_out = val; + ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl); + exit (0); + } + + if (!strcmp(argv[argidx],"wordclock")) { + int val = atoi(argv[argidx+1]); + ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); + printf("wordclock = %d\n",val); + ctrl.wordclock = val; + ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl); + exit (0); + } + + if (!strcmp(argv[argidx],"spdifin")) { + int val = atoi(argv[argidx+1]); + ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); + printf("spdifin = %d\n",val); + ctrl.spdif_in = val; + ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl); + exit (0); + } + + if (!strcmp(argv[argidx],"syncref")) { + int val = atoi(argv[argidx+1]); + ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); + printf("syncref = %d\n",val); + ctrl.sync_ref = val; + ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl); + exit (0); + } + + if (!strcmp(argv[argidx],"adat1cd")) { + int val = atoi(argv[argidx+1]); + ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); + printf("adat1cd = %d\n",val); + ctrl.adat1_cd = val; + ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl); + exit (0); + } + +/* setting offset */ + + if (argc < argidx+4) + usage(); + + if (!strcmp(argv[argidx],"offset")) { + rme_mixer mix; + + mix.devnr = atoi(argv[argidx+1]); + + mix.i_offset = atoi(argv[argidx+2]); + mix.o_offset = atoi(argv[argidx+3]); + ioctl(fdwr,SOUND_MIXER_PRIVATE1,&mix); + fprintf(stdout,"devnr %d\n",mix.devnr); + fprintf(stdout,"mix.i_offset to %d\n",mix.i_offset); + fprintf(stdout,"mix.o_offset to %d\n",mix.o_offset); + exit (0); + } + + usage(); + exit (0); /* to avoid warning */ +} + + +---------------------------- -------------------------------- +#!/usr/bin/wish + +# xrmectrl +# (C) 2000 Guenter Geiger +# HP20020201 - Heiko Purnhagen + +#set defaults "-relief ridged" +set CTRLPROG "./rmectrl" +if {$argc} { + set CTRLPROG "$CTRLPROG $argv" +} +puts "CTRLPROG $CTRLPROG" + +frame .butts +button .butts.exit -text "Exit" -command "exit" -relief ridge +#button .butts.state -text "State" -command "get_all" + +pack .butts.exit -side left +pack .butts -side bottom + + +# +# STATUS +# + +frame .status + +# Sampling Rate + +frame .status.sr +label .status.sr.text -text "Sampling Rate" -justify left +radiobutton .status.sr.441 -selectcolor red -text "44.1 kHz" -width 10 -anchor nw -variable srate -value 44100 -font times +radiobutton .status.sr.480 -selectcolor red -text "48 kHz" -width 10 -anchor nw -variable srate -value 48000 -font times +radiobutton .status.sr.882 -selectcolor red -text "88.2 kHz" -width 10 -anchor nw -variable srate -value 88200 -font times +radiobutton .status.sr.960 -selectcolor red -text "96 kHz" -width 10 -anchor nw -variable srate -value 96000 -font times + +pack .status.sr.text .status.sr.441 .status.sr.480 .status.sr.882 .status.sr.960 -side top -padx 3 + +# Lock + +frame .status.lock +label .status.lock.text -text "Lock" -justify left +checkbutton .status.lock.adat1 -selectcolor red -text "ADAT1" -anchor nw -width 10 -variable adatlock1 -font times +checkbutton .status.lock.adat2 -selectcolor red -text "ADAT2" -anchor nw -width 10 -variable adatlock2 -font times +checkbutton .status.lock.adat3 -selectcolor red -text "ADAT3" -anchor nw -width 10 -variable adatlock3 -font times + +pack .status.lock.text .status.lock.adat1 .status.lock.adat2 .status.lock.adat3 -side top -padx 3 + +# Sync + +frame .status.sync +label .status.sync.text -text "Sync" -justify left +checkbutton .status.sync.adat1 -selectcolor red -text "ADAT1" -anchor nw -width 10 -variable adatsync1 -font times +checkbutton .status.sync.adat2 -selectcolor red -text "ADAT2" -anchor nw -width 10 -variable adatsync2 -font times +checkbutton .status.sync.adat3 -selectcolor red -text "ADAT3" -anchor nw -width 10 -variable adatsync3 -font times + +pack .status.sync.text .status.sync.adat1 .status.sync.adat2 .status.sync.adat3 -side top -padx 3 + +# Timecode + +frame .status.tc +label .status.tc.text -text "Timecode" -justify left +checkbutton .status.tc.busy -selectcolor red -text "busy" -anchor nw -width 10 -variable tcbusy -font times +checkbutton .status.tc.out -selectcolor red -text "out" -anchor nw -width 10 -variable tcout -font times +checkbutton .status.tc.valid -selectcolor red -text "valid" -anchor nw -width 10 -variable tcvalid -font times + +pack .status.tc.text .status.tc.busy .status.tc.out .status.tc.valid -side top -padx 3 + +# SPDIF In + +frame .status.spdif +label .status.spdif.text -text "SPDIF In" -justify left +label .status.spdif.sr -text "--.- kHz" -anchor n -width 10 -font times +checkbutton .status.spdif.error -selectcolor red -text "Input Lock" -anchor nw -width 10 -variable spdiferr -font times + +pack .status.spdif.text .status.spdif.sr .status.spdif.error -side top -padx 3 + +pack .status.sr .status.lock .status.sync .status.tc .status.spdif -side left -fill x -anchor n -expand 1 + + +# +# CONTROL +# + +proc setprof {} { + global CTRLPROG + global spprof + exec $CTRLPROG pro $spprof +} + +proc setemph {} { + global CTRLPROG + global spemph + exec $CTRLPROG emphasis $spemph +} + +proc setnoaud {} { + global CTRLPROG + global spnoaud + exec $CTRLPROG dolby $spnoaud +} + +proc setoptical {} { + global CTRLPROG + global spoptical + exec $CTRLPROG optout $spoptical +} + +proc setspdifin {} { + global CTRLPROG + global spdifin + exec $CTRLPROG spdifin [expr $spdifin - 1] +} + +proc setsyncsource {} { + global CTRLPROG + global syncsource + exec $CTRLPROG syncref [expr $syncsource -1] +} + + +proc setmaster {} { + global CTRLPROG + global master + exec $CTRLPROG master $master +} + +proc setwordclock {} { + global CTRLPROG + global wordclock + exec $CTRLPROG wordclock $wordclock +} + +proc setadat1cd {} { + global CTRLPROG + global adat1cd + exec $CTRLPROG adat1cd $adat1cd +} + + +frame .control + +# SPDIF In & SPDIF Out + + +frame .control.spdif + +frame .control.spdif.in +label .control.spdif.in.text -text "SPDIF In" -justify left +radiobutton .control.spdif.in.input1 -text "Optical" -anchor nw -width 13 -variable spdifin -value 1 -command setspdifin -selectcolor blue -font times +radiobutton .control.spdif.in.input2 -text "Coaxial" -anchor nw -width 13 -variable spdifin -value 2 -command setspdifin -selectcolor blue -font times +radiobutton .control.spdif.in.input3 -text "Intern " -anchor nw -width 13 -variable spdifin -command setspdifin -value 3 -selectcolor blue -font times + +checkbutton .control.spdif.in.adat1cd -text "ADAT1 Intern" -anchor nw -width 13 -variable adat1cd -command setadat1cd -selectcolor blue -font times + +pack .control.spdif.in.text .control.spdif.in.input1 .control.spdif.in.input2 .control.spdif.in.input3 .control.spdif.in.adat1cd + +label .control.spdif.space + +frame .control.spdif.out +label .control.spdif.out.text -text "SPDIF Out" -justify left +checkbutton .control.spdif.out.pro -text "Professional" -anchor nw -width 13 -variable spprof -command setprof -selectcolor blue -font times +checkbutton .control.spdif.out.emphasis -text "Emphasis" -anchor nw -width 13 -variable spemph -command setemph -selectcolor blue -font times +checkbutton .control.spdif.out.dolby -text "NoAudio" -anchor nw -width 13 -variable spnoaud -command setnoaud -selectcolor blue -font times +checkbutton .control.spdif.out.optout -text "Optical Out" -anchor nw -width 13 -variable spoptical -command setoptical -selectcolor blue -font times + +pack .control.spdif.out.optout .control.spdif.out.dolby .control.spdif.out.emphasis .control.spdif.out.pro .control.spdif.out.text -side bottom + +pack .control.spdif.in .control.spdif.space .control.spdif.out -side top -fill y -padx 3 -expand 1 + +# Sync Mode & Sync Source + +frame .control.sync +frame .control.sync.mode +label .control.sync.mode.text -text "Sync Mode" -justify left +checkbutton .control.sync.mode.master -text "Master" -anchor nw -width 13 -variable master -command setmaster -selectcolor blue -font times +checkbutton .control.sync.mode.wc -text "Wordclock" -anchor nw -width 13 -variable wordclock -command setwordclock -selectcolor blue -font times + +pack .control.sync.mode.text .control.sync.mode.master .control.sync.mode.wc + +label .control.sync.space + +frame .control.sync.src +label .control.sync.src.text -text "Sync Source" -justify left +radiobutton .control.sync.src.input1 -text "ADAT1" -anchor nw -width 13 -variable syncsource -value 1 -command setsyncsource -selectcolor blue -font times +radiobutton .control.sync.src.input2 -text "ADAT2" -anchor nw -width 13 -variable syncsource -value 2 -command setsyncsource -selectcolor blue -font times +radiobutton .control.sync.src.input3 -text "ADAT3" -anchor nw -width 13 -variable syncsource -command setsyncsource -value 3 -selectcolor blue -font times +radiobutton .control.sync.src.input4 -text "SPDIF" -anchor nw -width 13 -variable syncsource -command setsyncsource -value 4 -selectcolor blue -font times + +pack .control.sync.src.input4 .control.sync.src.input3 .control.sync.src.input2 .control.sync.src.input1 .control.sync.src.text -side bottom + +pack .control.sync.mode .control.sync.space .control.sync.src -side top -fill y -padx 3 -expand 1 + +label .control.space -text "" -width 10 + +# Buffer Size + +frame .control.buf +label .control.buf.text -text "Buffer Size (Latency)" -justify left +radiobutton .control.buf.b1 -selectcolor red -text "64 (1.5 ms)" -width 13 -anchor nw -variable ssrate -value 1 -font times +radiobutton .control.buf.b2 -selectcolor red -text "128 (3 ms)" -width 13 -anchor nw -variable ssrate -value 2 -font times +radiobutton .control.buf.b3 -selectcolor red -text "256 (6 ms)" -width 13 -anchor nw -variable ssrate -value 3 -font times +radiobutton .control.buf.b4 -selectcolor red -text "512 (12 ms)" -width 13 -anchor nw -variable ssrate -value 4 -font times +radiobutton .control.buf.b5 -selectcolor red -text "1024 (23 ms)" -width 13 -anchor nw -variable ssrate -value 5 -font times +radiobutton .control.buf.b6 -selectcolor red -text "2048 (46 ms)" -width 13 -anchor nw -variable ssrate -value 6 -font times +radiobutton .control.buf.b7 -selectcolor red -text "4096 (93 ms)" -width 13 -anchor nw -variable ssrate -value 7 -font times +radiobutton .control.buf.b8 -selectcolor red -text "8192 (186 ms)" -width 13 -anchor nw -variable ssrate -value 8 -font times + +pack .control.buf.text .control.buf.b1 .control.buf.b2 .control.buf.b3 .control.buf.b4 .control.buf.b5 .control.buf.b6 .control.buf.b7 .control.buf.b8 -side top -padx 3 + +# Offset + +frame .control.offset + +frame .control.offset.in +label .control.offset.in.text -text "Offset In" -justify left +label .control.offset.in.off0 -text "dev\#0: -" -anchor nw -width 10 -font times +label .control.offset.in.off1 -text "dev\#1: -" -anchor nw -width 10 -font times +label .control.offset.in.off2 -text "dev\#2: -" -anchor nw -width 10 -font times +label .control.offset.in.off3 -text "dev\#3: -" -anchor nw -width 10 -font times + +pack .control.offset.in.text .control.offset.in.off0 .control.offset.in.off1 .control.offset.in.off2 .control.offset.in.off3 + +label .control.offset.space + +frame .control.offset.out +label .control.offset.out.text -text "Offset Out" -justify left +label .control.offset.out.off0 -text "dev\#0: -" -anchor nw -width 10 -font times +label .control.offset.out.off1 -text "dev\#1: -" -anchor nw -width 10 -font times +label .control.offset.out.off2 -text "dev\#2: -" -anchor nw -width 10 -font times +label .control.offset.out.off3 -text "dev\#3: -" -anchor nw -width 10 -font times + +pack .control.offset.out.off3 .control.offset.out.off2 .control.offset.out.off1 .control.offset.out.off0 .control.offset.out.text -side bottom + +pack .control.offset.in .control.offset.space .control.offset.out -side top -fill y -padx 3 -expand 1 + + +pack .control.spdif .control.sync .control.space .control.buf .control.offset -side left -fill both -anchor n -expand 1 + + +label .statustext -text Status -justify center -relief ridge +label .controltext -text Control -justify center -relief ridge + +label .statusspace +label .controlspace + +pack .statustext .status .statusspace .controltext .control .controlspace -side top -anchor nw -fill both -expand 1 + + +proc get_bit {output sstr} { + set idx1 [string last [concat $sstr 1] $output] + set idx1 [expr $idx1 != -1] + return $idx1 +} + +proc get_val {output sstr} { + set val [string wordend $output [string last $sstr $output]] + set val [string range $output $val [expr $val+1]] + return $val +} + +proc get_val2 {output sstr} { + set val [string wordend $output [string first $sstr $output]] + set val [string range $output $val [expr $val+2]] + return $val +} + +proc get_control {} { + global spprof + global spemph + global spnoaud + global spoptical + global spdifin + global ssrate + global master + global wordclock + global syncsource + global CTRLPROG + + set f [open "| $CTRLPROG control" r+] + set ooo [read $f 1000] + close $f +# puts $ooo + + set spprof [ get_bit $ooo "pro"] + set spemph [ get_bit $ooo "emphasis"] + set spnoaud [ get_bit $ooo "dolby"] + set spoptical [ get_bit $ooo "opt_out"] + set spdifin [ expr [ get_val $ooo "spdif_in"] + 1] + set ssrate [ expr [ get_val $ooo "latency"] + 1] + set master [ expr [ get_val $ooo "master"]] + set wordclock [ expr [ get_val $ooo "wordclock"]] + set syncsource [ expr [ get_val $ooo "sync_ref"] + 1] +} + +proc get_status {} { + global srate + global ctrlcom + + global adatlock1 + global adatlock2 + global adatlock3 + + global adatsync1 + global adatsync2 + global adatsync3 + + global tcbusy + global tcout + global tcvalid + + global spdiferr + global crystal + global .status.spdif.text + global CTRLPROG + + + set f [open "| $CTRLPROG status" r+] + set ooo [read $f 1000] + close $f +# puts $ooo + +# samplerate + + set idx1 [string last "sr48 1" $ooo] + set idx2 [string last "doublespeed 1" $ooo] + if {$idx1 >= 0} { + set fact1 48000 + } else { + set fact1 44100 + } + + if {$idx2 >= 0} { + set fact2 2 + } else { + set fact2 1 + } + set srate [expr $fact1 * $fact2] +# ADAT lock + + set val [get_val $ooo lockmask] + set adatlock1 0 + set adatlock2 0 + set adatlock3 0 + if {[expr $val & 1]} { + set adatlock3 1 + } + if {[expr $val & 2]} { + set adatlock2 1 + } + if {[expr $val & 4]} { + set adatlock1 1 + } + +# ADAT sync + set val [get_val $ooo syncmask] + set adatsync1 0 + set adatsync2 0 + set adatsync3 0 + + if {[expr $val & 1]} { + set adatsync3 1 + } + if {[expr $val & 2]} { + set adatsync2 1 + } + if {[expr $val & 4]} { + set adatsync1 1 + } + +# TC busy + + set tcbusy [get_bit $ooo "busy"] + set tcout [get_bit $ooo "out"] + set tcvalid [get_bit $ooo "valid"] + set spdiferr [expr [get_bit $ooo "spdif_error"] == 0] + +# 000=64kHz, 100=88.2kHz, 011=96kHz +# 111=32kHz, 110=44.1kHz, 101=48kHz + + set val [get_val $ooo crystalrate] + + set crystal "--.- kHz" + if {$val == 0} { + set crystal "64 kHz" + } + if {$val == 4} { + set crystal "88.2 kHz" + } + if {$val == 3} { + set crystal "96 kHz" + } + if {$val == 7} { + set crystal "32 kHz" + } + if {$val == 6} { + set crystal "44.1 kHz" + } + if {$val == 5} { + set crystal "48 kHz" + } + .status.spdif.sr configure -text $crystal +} + +proc get_offset {} { + global inoffset + global outoffset + global CTRLPROG + + set f [open "| $CTRLPROG mix" r+] + set ooo [read $f 1000] + close $f +# puts $ooo + + if { [string match "*devnr*" $ooo] } { + set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end] + set val [get_val2 $ooo i_offset] + .control.offset.in.off0 configure -text "dev\#0: $val" + set val [get_val2 $ooo o_offset] + .control.offset.out.off0 configure -text "dev\#0: $val" + } else { + .control.offset.in.off0 configure -text "dev\#0: -" + .control.offset.out.off0 configure -text "dev\#0: -" + } + if { [string match "*devnr*" $ooo] } { + set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end] + set val [get_val2 $ooo i_offset] + .control.offset.in.off1 configure -text "dev\#1: $val" + set val [get_val2 $ooo o_offset] + .control.offset.out.off1 configure -text "dev\#1: $val" + } else { + .control.offset.in.off1 configure -text "dev\#1: -" + .control.offset.out.off1 configure -text "dev\#1: -" + } + if { [string match "*devnr*" $ooo] } { + set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end] + set val [get_val2 $ooo i_offset] + .control.offset.in.off2 configure -text "dev\#2: $val" + set val [get_val2 $ooo o_offset] + .control.offset.out.off2 configure -text "dev\#2: $val" + } else { + .control.offset.in.off2 configure -text "dev\#2: -" + .control.offset.out.off2 configure -text "dev\#2: -" + } + if { [string match "*devnr*" $ooo] } { + set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end] + set val [get_val2 $ooo i_offset] + .control.offset.in.off3 configure -text "dev\#3: $val" + set val [get_val2 $ooo o_offset] + .control.offset.out.off3 configure -text "dev\#3: $val" + } else { + .control.offset.in.off3 configure -text "dev\#3: -" + .control.offset.out.off3 configure -text "dev\#3: -" + } +} + + +proc get_all {} { +get_status +get_control +get_offset +} + +# main +while {1} { + after 200 + get_all + update +} diff -Nru a/Documentation/sound/rme96xx b/Documentation/sound/rme96xx --- a/Documentation/sound/rme96xx Tue Mar 2 17:37:07 2004 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,767 +0,0 @@ -Beta release of the rme96xx (driver for RME 96XX cards like the -"Hammerfall" and the "Hammerfall light") - -Important: The driver module has to be installed on a freshly rebooted system, -otherwise the driver might not be able to acquire its buffers. - -features: - - - OSS programming interface (i.e. runs with standard OSS soundsoftware) - - OSS/Multichannel interface (OSS multichannel is done by just aquiring - more than 2 channels). The driver does not use more than one device - ( yet .. this feature may be implemented later ) - - more than one RME card supported - -The driver uses a specific multichannel interface, which I will document -when the driver gets stable. (take a look at the defines in rme96xx.h, -which adds blocked multichannel formats i.e instead of -lrlrlrlr --> llllrrrr etc. - -Use the "rmectrl" programm to look at the status of the card .. -or use xrmectrl, a GUI interface for the ctrl program. - -What you can do with the rmectrl program is to set the stereo device for -OSS emulation (e.g. if you use SPDIF out). - -You do: - -./ctrl offset 24 24 - -which makes the stereo device use channels 25 and 26. - -Guenter Geiger - -copy the first part of the attached source code into rmectrl.c -and the second part into xrmectrl (or get the program from -http://gige.xdv.org/pages/soft/pages/rme) - -to compile: gcc -o rmectrl rmectrl.c ------------------------------- snip ------------------------------------ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "rme96xx.h" - -/* - remctrl.c - (C) 2000 Guenter Geiger - HP20020201 - Heiko Purnhagen -*/ - -/* # define DEVICE_NAME "/dev/mixer" */ -# define DEVICE_NAME "/dev/mixer1" - - -void usage(void) -{ - fprintf(stderr,"usage: rmectrl [/dev/mixer] [command [options]]\n\n"); - fprintf(stderr,"where command is one of:\n"); - fprintf(stderr," help show this help\n"); - fprintf(stderr," status show status bits\n"); - fprintf(stderr," control show control bits\n"); - fprintf(stderr," mix show mixer/offset status\n"); - fprintf(stderr," master set sync master\n"); - fprintf(stderr," pro set spdif out pro\n"); - fprintf(stderr," emphasis set spdif out emphasis\n"); - fprintf(stderr," dolby set spdif out no audio\n"); - fprintf(stderr," optout set spdif out optical\n"); - fprintf(stderr," wordclock set sync wordclock\n"); - fprintf(stderr," spdifin set spdif in (0=optical,1=coax,2=intern)\n"); - fprintf(stderr," syncref set sync source (0=ADAT1,1=ADAT2,2=ADAT3,3=SPDIF)\n"); - fprintf(stderr," adat1cd set ADAT1 on internal CD\n"); - fprintf(stderr," offset set dev (0..3) offset (0..25)\n"); - exit(-1); -} - - -int main(int argc, char* argv[]) -{ - int cards; - int ret; - int i; - double ft; - int fd, fdwr; - int param,orig; - rme_status_t stat; - rme_ctrl_t ctrl; - char *device; - int argidx; - - if (argc < 2) - usage(); - - if (*argv[1]=='/') { - device = argv[1]; - argidx = 2; - } - else { - device = DEVICE_NAME; - argidx = 1; - } - - fprintf(stdout,"mixer device %s\n",device); - if ((fd = open(device,O_RDONLY)) < 0) { - fprintf(stdout,"opening device failed\n"); - exit(-1); - } - - if ((fdwr = open(device,O_WRONLY)) < 0) { - fprintf(stdout,"opening device failed\n"); - exit(-1); - } - - if (argc < argidx+1) - usage(); - - if (!strcmp(argv[argidx],"help")) - usage(); - if (!strcmp(argv[argidx],"-h")) - usage(); - if (!strcmp(argv[argidx],"--help")) - usage(); - - if (!strcmp(argv[argidx],"status")) { - ioctl(fd,SOUND_MIXER_PRIVATE2,&stat); - fprintf(stdout,"stat.irq %d\n",stat.irq); - fprintf(stdout,"stat.lockmask %d\n",stat.lockmask); - fprintf(stdout,"stat.sr48 %d\n",stat.sr48); - fprintf(stdout,"stat.wclock %d\n",stat.wclock); - fprintf(stdout,"stat.bufpoint %d\n",stat.bufpoint); - fprintf(stdout,"stat.syncmask %d\n",stat.syncmask); - fprintf(stdout,"stat.doublespeed %d\n",stat.doublespeed); - fprintf(stdout,"stat.tc_busy %d\n",stat.tc_busy); - fprintf(stdout,"stat.tc_out %d\n",stat.tc_out); - fprintf(stdout,"stat.crystalrate %d (0=64k 3=96k 4=88.2k 5=48k 6=44.1k 7=32k)\n",stat.crystalrate); - fprintf(stdout,"stat.spdif_error %d\n",stat.spdif_error); - fprintf(stdout,"stat.bufid %d\n",stat.bufid); - fprintf(stdout,"stat.tc_valid %d\n",stat.tc_valid); - exit (0); - } - - if (!strcmp(argv[argidx],"control")) { - ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); - fprintf(stdout,"ctrl.start %d\n",ctrl.start); - fprintf(stdout,"ctrl.latency %d (0=64 .. 7=8192)\n",ctrl.latency); - fprintf(stdout,"ctrl.master %d\n",ctrl.master); - fprintf(stdout,"ctrl.ie %d\n",ctrl.ie); - fprintf(stdout,"ctrl.sr48 %d\n",ctrl.sr48); - fprintf(stdout,"ctrl.spare %d\n",ctrl.spare); - fprintf(stdout,"ctrl.doublespeed %d\n",ctrl.doublespeed); - fprintf(stdout,"ctrl.pro %d\n",ctrl.pro); - fprintf(stdout,"ctrl.emphasis %d\n",ctrl.emphasis); - fprintf(stdout,"ctrl.dolby %d\n",ctrl.dolby); - fprintf(stdout,"ctrl.opt_out %d\n",ctrl.opt_out); - fprintf(stdout,"ctrl.wordclock %d\n",ctrl.wordclock); - fprintf(stdout,"ctrl.spdif_in %d (0=optical,1=coax,2=intern)\n",ctrl.spdif_in); - fprintf(stdout,"ctrl.sync_ref %d (0=ADAT1,1=ADAT2,2=ADAT3,3=SPDIF)\n",ctrl.sync_ref); - fprintf(stdout,"ctrl.spdif_reset %d\n",ctrl.spdif_reset); - fprintf(stdout,"ctrl.spdif_select %d\n",ctrl.spdif_select); - fprintf(stdout,"ctrl.spdif_clock %d\n",ctrl.spdif_clock); - fprintf(stdout,"ctrl.spdif_write %d\n",ctrl.spdif_write); - fprintf(stdout,"ctrl.adat1_cd %d\n",ctrl.adat1_cd); - exit (0); - } - - if (!strcmp(argv[argidx],"mix")) { - rme_mixer mix; - int i; - - for (i=0; i<4; i++) { - mix.devnr = i; - ioctl(fd,SOUND_MIXER_PRIVATE1,&mix); - if (mix.devnr == i) { - fprintf(stdout,"devnr %d\n",mix.devnr); - fprintf(stdout,"mix.i_offset %2d (0-25)\n",mix.i_offset); - fprintf(stdout,"mix.o_offset %2d (0-25)\n",mix.o_offset); - } - } - exit (0); - } - -/* the control flags */ - - if (argc < argidx+2) - usage(); - - if (!strcmp(argv[argidx],"master")) { - int val = atoi(argv[argidx+1]); - ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); - printf("master = %d\n",val); - ctrl.master = val; - ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl); - exit (0); - } - - if (!strcmp(argv[argidx],"pro")) { - int val = atoi(argv[argidx+1]); - ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); - printf("pro = %d\n",val); - ctrl.pro = val; - ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl); - exit (0); - } - - if (!strcmp(argv[argidx],"emphasis")) { - int val = atoi(argv[argidx+1]); - ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); - printf("emphasis = %d\n",val); - ctrl.emphasis = val; - ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl); - exit (0); - } - - if (!strcmp(argv[argidx],"dolby")) { - int val = atoi(argv[argidx+1]); - ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); - printf("dolby = %d\n",val); - ctrl.dolby = val; - ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl); - exit (0); - } - - if (!strcmp(argv[argidx],"optout")) { - int val = atoi(argv[argidx+1]); - ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); - printf("optout = %d\n",val); - ctrl.opt_out = val; - ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl); - exit (0); - } - - if (!strcmp(argv[argidx],"wordclock")) { - int val = atoi(argv[argidx+1]); - ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); - printf("wordclock = %d\n",val); - ctrl.wordclock = val; - ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl); - exit (0); - } - - if (!strcmp(argv[argidx],"spdifin")) { - int val = atoi(argv[argidx+1]); - ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); - printf("spdifin = %d\n",val); - ctrl.spdif_in = val; - ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl); - exit (0); - } - - if (!strcmp(argv[argidx],"syncref")) { - int val = atoi(argv[argidx+1]); - ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); - printf("syncref = %d\n",val); - ctrl.sync_ref = val; - ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl); - exit (0); - } - - if (!strcmp(argv[argidx],"adat1cd")) { - int val = atoi(argv[argidx+1]); - ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl); - printf("adat1cd = %d\n",val); - ctrl.adat1_cd = val; - ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl); - exit (0); - } - -/* setting offset */ - - if (argc < argidx+4) - usage(); - - if (!strcmp(argv[argidx],"offset")) { - rme_mixer mix; - - mix.devnr = atoi(argv[argidx+1]); - - mix.i_offset = atoi(argv[argidx+2]); - mix.o_offset = atoi(argv[argidx+3]); - ioctl(fdwr,SOUND_MIXER_PRIVATE1,&mix); - fprintf(stdout,"devnr %d\n",mix.devnr); - fprintf(stdout,"mix.i_offset to %d\n",mix.i_offset); - fprintf(stdout,"mix.o_offset to %d\n",mix.o_offset); - exit (0); - } - - usage(); - exit (0); /* to avoid warning */ -} - - ----------------------------- -------------------------------- -#!/usr/bin/wish - -# xrmectrl -# (C) 2000 Guenter Geiger -# HP20020201 - Heiko Purnhagen - -#set defaults "-relief ridged" -set CTRLPROG "./rmectrl" -if {$argc} { - set CTRLPROG "$CTRLPROG $argv" -} -puts "CTRLPROG $CTRLPROG" - -frame .butts -button .butts.exit -text "Exit" -command "exit" -relief ridge -#button .butts.state -text "State" -command "get_all" - -pack .butts.exit -side left -pack .butts -side bottom - - -# -# STATUS -# - -frame .status - -# Sampling Rate - -frame .status.sr -label .status.sr.text -text "Sampling Rate" -justify left -radiobutton .status.sr.441 -selectcolor red -text "44.1 kHz" -width 10 -anchor nw -variable srate -value 44100 -font times -radiobutton .status.sr.480 -selectcolor red -text "48 kHz" -width 10 -anchor nw -variable srate -value 48000 -font times -radiobutton .status.sr.882 -selectcolor red -text "88.2 kHz" -width 10 -anchor nw -variable srate -value 88200 -font times -radiobutton .status.sr.960 -selectcolor red -text "96 kHz" -width 10 -anchor nw -variable srate -value 96000 -font times - -pack .status.sr.text .status.sr.441 .status.sr.480 .status.sr.882 .status.sr.960 -side top -padx 3 - -# Lock - -frame .status.lock -label .status.lock.text -text "Lock" -justify left -checkbutton .status.lock.adat1 -selectcolor red -text "ADAT1" -anchor nw -width 10 -variable adatlock1 -font times -checkbutton .status.lock.adat2 -selectcolor red -text "ADAT2" -anchor nw -width 10 -variable adatlock2 -font times -checkbutton .status.lock.adat3 -selectcolor red -text "ADAT3" -anchor nw -width 10 -variable adatlock3 -font times - -pack .status.lock.text .status.lock.adat1 .status.lock.adat2 .status.lock.adat3 -side top -padx 3 - -# Sync - -frame .status.sync -label .status.sync.text -text "Sync" -justify left -checkbutton .status.sync.adat1 -selectcolor red -text "ADAT1" -anchor nw -width 10 -variable adatsync1 -font times -checkbutton .status.sync.adat2 -selectcolor red -text "ADAT2" -anchor nw -width 10 -variable adatsync2 -font times -checkbutton .status.sync.adat3 -selectcolor red -text "ADAT3" -anchor nw -width 10 -variable adatsync3 -font times - -pack .status.sync.text .status.sync.adat1 .status.sync.adat2 .status.sync.adat3 -side top -padx 3 - -# Timecode - -frame .status.tc -label .status.tc.text -text "Timecode" -justify left -checkbutton .status.tc.busy -selectcolor red -text "busy" -anchor nw -width 10 -variable tcbusy -font times -checkbutton .status.tc.out -selectcolor red -text "out" -anchor nw -width 10 -variable tcout -font times -checkbutton .status.tc.valid -selectcolor red -text "valid" -anchor nw -width 10 -variable tcvalid -font times - -pack .status.tc.text .status.tc.busy .status.tc.out .status.tc.valid -side top -padx 3 - -# SPDIF In - -frame .status.spdif -label .status.spdif.text -text "SPDIF In" -justify left -label .status.spdif.sr -text "--.- kHz" -anchor n -width 10 -font times -checkbutton .status.spdif.error -selectcolor red -text "Input Lock" -anchor nw -width 10 -variable spdiferr -font times - -pack .status.spdif.text .status.spdif.sr .status.spdif.error -side top -padx 3 - -pack .status.sr .status.lock .status.sync .status.tc .status.spdif -side left -fill x -anchor n -expand 1 - - -# -# CONTROL -# - -proc setprof {} { - global CTRLPROG - global spprof - exec $CTRLPROG pro $spprof -} - -proc setemph {} { - global CTRLPROG - global spemph - exec $CTRLPROG emphasis $spemph -} - -proc setnoaud {} { - global CTRLPROG - global spnoaud - exec $CTRLPROG dolby $spnoaud -} - -proc setoptical {} { - global CTRLPROG - global spoptical - exec $CTRLPROG optout $spoptical -} - -proc setspdifin {} { - global CTRLPROG - global spdifin - exec $CTRLPROG spdifin [expr $spdifin - 1] -} - -proc setsyncsource {} { - global CTRLPROG - global syncsource - exec $CTRLPROG syncref [expr $syncsource -1] -} - - -proc setmaster {} { - global CTRLPROG - global master - exec $CTRLPROG master $master -} - -proc setwordclock {} { - global CTRLPROG - global wordclock - exec $CTRLPROG wordclock $wordclock -} - -proc setadat1cd {} { - global CTRLPROG - global adat1cd - exec $CTRLPROG adat1cd $adat1cd -} - - -frame .control - -# SPDIF In & SPDIF Out - - -frame .control.spdif - -frame .control.spdif.in -label .control.spdif.in.text -text "SPDIF In" -justify left -radiobutton .control.spdif.in.input1 -text "Optical" -anchor nw -width 13 -variable spdifin -value 1 -command setspdifin -selectcolor blue -font times -radiobutton .control.spdif.in.input2 -text "Coaxial" -anchor nw -width 13 -variable spdifin -value 2 -command setspdifin -selectcolor blue -font times -radiobutton .control.spdif.in.input3 -text "Intern " -anchor nw -width 13 -variable spdifin -command setspdifin -value 3 -selectcolor blue -font times - -checkbutton .control.spdif.in.adat1cd -text "ADAT1 Intern" -anchor nw -width 13 -variable adat1cd -command setadat1cd -selectcolor blue -font times - -pack .control.spdif.in.text .control.spdif.in.input1 .control.spdif.in.input2 .control.spdif.in.input3 .control.spdif.in.adat1cd - -label .control.spdif.space - -frame .control.spdif.out -label .control.spdif.out.text -text "SPDIF Out" -justify left -checkbutton .control.spdif.out.pro -text "Professional" -anchor nw -width 13 -variable spprof -command setprof -selectcolor blue -font times -checkbutton .control.spdif.out.emphasis -text "Emphasis" -anchor nw -width 13 -variable spemph -command setemph -selectcolor blue -font times -checkbutton .control.spdif.out.dolby -text "NoAudio" -anchor nw -width 13 -variable spnoaud -command setnoaud -selectcolor blue -font times -checkbutton .control.spdif.out.optout -text "Optical Out" -anchor nw -width 13 -variable spoptical -command setoptical -selectcolor blue -font times - -pack .control.spdif.out.optout .control.spdif.out.dolby .control.spdif.out.emphasis .control.spdif.out.pro .control.spdif.out.text -side bottom - -pack .control.spdif.in .control.spdif.space .control.spdif.out -side top -fill y -padx 3 -expand 1 - -# Sync Mode & Sync Source - -frame .control.sync -frame .control.sync.mode -label .control.sync.mode.text -text "Sync Mode" -justify left -checkbutton .control.sync.mode.master -text "Master" -anchor nw -width 13 -variable master -command setmaster -selectcolor blue -font times -checkbutton .control.sync.mode.wc -text "Wordclock" -anchor nw -width 13 -variable wordclock -command setwordclock -selectcolor blue -font times - -pack .control.sync.mode.text .control.sync.mode.master .control.sync.mode.wc - -label .control.sync.space - -frame .control.sync.src -label .control.sync.src.text -text "Sync Source" -justify left -radiobutton .control.sync.src.input1 -text "ADAT1" -anchor nw -width 13 -variable syncsource -value 1 -command setsyncsource -selectcolor blue -font times -radiobutton .control.sync.src.input2 -text "ADAT2" -anchor nw -width 13 -variable syncsource -value 2 -command setsyncsource -selectcolor blue -font times -radiobutton .control.sync.src.input3 -text "ADAT3" -anchor nw -width 13 -variable syncsource -command setsyncsource -value 3 -selectcolor blue -font times -radiobutton .control.sync.src.input4 -text "SPDIF" -anchor nw -width 13 -variable syncsource -command setsyncsource -value 4 -selectcolor blue -font times - -pack .control.sync.src.input4 .control.sync.src.input3 .control.sync.src.input2 .control.sync.src.input1 .control.sync.src.text -side bottom - -pack .control.sync.mode .control.sync.space .control.sync.src -side top -fill y -padx 3 -expand 1 - -label .control.space -text "" -width 10 - -# Buffer Size - -frame .control.buf -label .control.buf.text -text "Buffer Size (Latency)" -justify left -radiobutton .control.buf.b1 -selectcolor red -text "64 (1.5 ms)" -width 13 -anchor nw -variable ssrate -value 1 -font times -radiobutton .control.buf.b2 -selectcolor red -text "128 (3 ms)" -width 13 -anchor nw -variable ssrate -value 2 -font times -radiobutton .control.buf.b3 -selectcolor red -text "256 (6 ms)" -width 13 -anchor nw -variable ssrate -value 3 -font times -radiobutton .control.buf.b4 -selectcolor red -text "512 (12 ms)" -width 13 -anchor nw -variable ssrate -value 4 -font times -radiobutton .control.buf.b5 -selectcolor red -text "1024 (23 ms)" -width 13 -anchor nw -variable ssrate -value 5 -font times -radiobutton .control.buf.b6 -selectcolor red -text "2048 (46 ms)" -width 13 -anchor nw -variable ssrate -value 6 -font times -radiobutton .control.buf.b7 -selectcolor red -text "4096 (93 ms)" -width 13 -anchor nw -variable ssrate -value 7 -font times -radiobutton .control.buf.b8 -selectcolor red -text "8192 (186 ms)" -width 13 -anchor nw -variable ssrate -value 8 -font times - -pack .control.buf.text .control.buf.b1 .control.buf.b2 .control.buf.b3 .control.buf.b4 .control.buf.b5 .control.buf.b6 .control.buf.b7 .control.buf.b8 -side top -padx 3 - -# Offset - -frame .control.offset - -frame .control.offset.in -label .control.offset.in.text -text "Offset In" -justify left -label .control.offset.in.off0 -text "dev\#0: -" -anchor nw -width 10 -font times -label .control.offset.in.off1 -text "dev\#1: -" -anchor nw -width 10 -font times -label .control.offset.in.off2 -text "dev\#2: -" -anchor nw -width 10 -font times -label .control.offset.in.off3 -text "dev\#3: -" -anchor nw -width 10 -font times - -pack .control.offset.in.text .control.offset.in.off0 .control.offset.in.off1 .control.offset.in.off2 .control.offset.in.off3 - -label .control.offset.space - -frame .control.offset.out -label .control.offset.out.text -text "Offset Out" -justify left -label .control.offset.out.off0 -text "dev\#0: -" -anchor nw -width 10 -font times -label .control.offset.out.off1 -text "dev\#1: -" -anchor nw -width 10 -font times -label .control.offset.out.off2 -text "dev\#2: -" -anchor nw -width 10 -font times -label .control.offset.out.off3 -text "dev\#3: -" -anchor nw -width 10 -font times - -pack .control.offset.out.off3 .control.offset.out.off2 .control.offset.out.off1 .control.offset.out.off0 .control.offset.out.text -side bottom - -pack .control.offset.in .control.offset.space .control.offset.out -side top -fill y -padx 3 -expand 1 - - -pack .control.spdif .control.sync .control.space .control.buf .control.offset -side left -fill both -anchor n -expand 1 - - -label .statustext -text Status -justify center -relief ridge -label .controltext -text Control -justify center -relief ridge - -label .statusspace -label .controlspace - -pack .statustext .status .statusspace .controltext .control .controlspace -side top -anchor nw -fill both -expand 1 - - -proc get_bit {output sstr} { - set idx1 [string last [concat $sstr 1] $output] - set idx1 [expr $idx1 != -1] - return $idx1 -} - -proc get_val {output sstr} { - set val [string wordend $output [string last $sstr $output]] - set val [string range $output $val [expr $val+1]] - return $val -} - -proc get_val2 {output sstr} { - set val [string wordend $output [string first $sstr $output]] - set val [string range $output $val [expr $val+2]] - return $val -} - -proc get_control {} { - global spprof - global spemph - global spnoaud - global spoptical - global spdifin - global ssrate - global master - global wordclock - global syncsource - global CTRLPROG - - set f [open "| $CTRLPROG control" r+] - set ooo [read $f 1000] - close $f -# puts $ooo - - set spprof [ get_bit $ooo "pro"] - set spemph [ get_bit $ooo "emphasis"] - set spnoaud [ get_bit $ooo "dolby"] - set spoptical [ get_bit $ooo "opt_out"] - set spdifin [ expr [ get_val $ooo "spdif_in"] + 1] - set ssrate [ expr [ get_val $ooo "latency"] + 1] - set master [ expr [ get_val $ooo "master"]] - set wordclock [ expr [ get_val $ooo "wordclock"]] - set syncsource [ expr [ get_val $ooo "sync_ref"] + 1] -} - -proc get_status {} { - global srate - global ctrlcom - - global adatlock1 - global adatlock2 - global adatlock3 - - global adatsync1 - global adatsync2 - global adatsync3 - - global tcbusy - global tcout - global tcvalid - - global spdiferr - global crystal - global .status.spdif.text - global CTRLPROG - - - set f [open "| $CTRLPROG status" r+] - set ooo [read $f 1000] - close $f -# puts $ooo - -# samplerate - - set idx1 [string last "sr48 1" $ooo] - set idx2 [string last "doublespeed 1" $ooo] - if {$idx1 >= 0} { - set fact1 48000 - } else { - set fact1 44100 - } - - if {$idx2 >= 0} { - set fact2 2 - } else { - set fact2 1 - } - set srate [expr $fact1 * $fact2] -# ADAT lock - - set val [get_val $ooo lockmask] - set adatlock1 0 - set adatlock2 0 - set adatlock3 0 - if {[expr $val & 1]} { - set adatlock3 1 - } - if {[expr $val & 2]} { - set adatlock2 1 - } - if {[expr $val & 4]} { - set adatlock1 1 - } - -# ADAT sync - set val [get_val $ooo syncmask] - set adatsync1 0 - set adatsync2 0 - set adatsync3 0 - - if {[expr $val & 1]} { - set adatsync3 1 - } - if {[expr $val & 2]} { - set adatsync2 1 - } - if {[expr $val & 4]} { - set adatsync1 1 - } - -# TC busy - - set tcbusy [get_bit $ooo "busy"] - set tcout [get_bit $ooo "out"] - set tcvalid [get_bit $ooo "valid"] - set spdiferr [expr [get_bit $ooo "spdif_error"] == 0] - -# 000=64kHz, 100=88.2kHz, 011=96kHz -# 111=32kHz, 110=44.1kHz, 101=48kHz - - set val [get_val $ooo crystalrate] - - set crystal "--.- kHz" - if {$val == 0} { - set crystal "64 kHz" - } - if {$val == 4} { - set crystal "88.2 kHz" - } - if {$val == 3} { - set crystal "96 kHz" - } - if {$val == 7} { - set crystal "32 kHz" - } - if {$val == 6} { - set crystal "44.1 kHz" - } - if {$val == 5} { - set crystal "48 kHz" - } - .status.spdif.sr configure -text $crystal -} - -proc get_offset {} { - global inoffset - global outoffset - global CTRLPROG - - set f [open "| $CTRLPROG mix" r+] - set ooo [read $f 1000] - close $f -# puts $ooo - - if { [string match "*devnr*" $ooo] } { - set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end] - set val [get_val2 $ooo i_offset] - .control.offset.in.off0 configure -text "dev\#0: $val" - set val [get_val2 $ooo o_offset] - .control.offset.out.off0 configure -text "dev\#0: $val" - } else { - .control.offset.in.off0 configure -text "dev\#0: -" - .control.offset.out.off0 configure -text "dev\#0: -" - } - if { [string match "*devnr*" $ooo] } { - set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end] - set val [get_val2 $ooo i_offset] - .control.offset.in.off1 configure -text "dev\#1: $val" - set val [get_val2 $ooo o_offset] - .control.offset.out.off1 configure -text "dev\#1: $val" - } else { - .control.offset.in.off1 configure -text "dev\#1: -" - .control.offset.out.off1 configure -text "dev\#1: -" - } - if { [string match "*devnr*" $ooo] } { - set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end] - set val [get_val2 $ooo i_offset] - .control.offset.in.off2 configure -text "dev\#2: $val" - set val [get_val2 $ooo o_offset] - .control.offset.out.off2 configure -text "dev\#2: $val" - } else { - .control.offset.in.off2 configure -text "dev\#2: -" - .control.offset.out.off2 configure -text "dev\#2: -" - } - if { [string match "*devnr*" $ooo] } { - set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end] - set val [get_val2 $ooo i_offset] - .control.offset.in.off3 configure -text "dev\#3: $val" - set val [get_val2 $ooo o_offset] - .control.offset.out.off3 configure -text "dev\#3: $val" - } else { - .control.offset.in.off3 configure -text "dev\#3: -" - .control.offset.out.off3 configure -text "dev\#3: -" - } -} - - -proc get_all {} { -get_status -get_control -get_offset -} - -# main -while {1} { - after 200 - get_all - update -} diff -Nru a/MAINTAINERS b/MAINTAINERS --- a/MAINTAINERS Tue Mar 2 17:37:08 2004 +++ b/MAINTAINERS Tue Mar 2 17:37:08 2004 @@ -2395,7 +2395,7 @@ ZR36067 VIDEO FOR LINUX DRIVER P: Ronald Bultje -M: R.S.Bultje@pharm.uu.nl +M: rbultje@ronald.bitfreak.net L: mjpeg-users@lists.sourceforge.net W: http://mjpeg.sourceforge.net/driver-zoran/ S: Maintained diff -Nru a/README b/README --- a/README Tue Mar 2 17:37:09 2004 +++ b/README Tue Mar 2 17:37:09 2004 @@ -172,24 +172,15 @@ Please note that you can still run a.out user programs with this kernel. - - Do a "make bzImage" to create a compressed kernel image. If you want - to make a boot disk (without root filesystem or LILO), insert a floppy - in your A: drive, and do a "make bzdisk". It is also possible to do - "make install" if you have lilo installed to suit the kernel makefiles, - but you may want to check your particular lilo setup first. + - Do a "make" to create a compressed kernel image. It is also + possible to do "make install" if you have lilo installed to suit the + kernel makefiles, but you may want to check your particular lilo setup first. To do the actual install you have to be root, but none of the normal build should require that. Don't take the name of root in vain. - - In the unlikely event that your system cannot boot bzImage kernels you - can still compile your kernel as zImage. However, since zImage support - will be removed at some point in the future in favor of bzImage we - encourage people having problems with booting bzImage kernels to report - these, with detailed hardware configuration information, to the - linux-kernel mailing list and to H. Peter Anvin . - - If you configured any of the parts of the kernel as `modules', you - will have to do "make modules" followed by "make modules_install". + will also have to do "make modules_install". - Keep a backup kernel handy in case something goes wrong. This is especially true for the development releases, since each new release @@ -200,11 +191,11 @@ do a "make modules_install". - In order to boot your new kernel, you'll need to copy the kernel - image (found in .../linux/arch/i386/boot/bzImage after compilation) + image (e.g. .../linux/arch/i386/boot/bzImage after compilation) to the place where your regular bootable kernel is found. - For some, this is on a floppy disk, in which case you can copy the - kernel bzImage file to /dev/fd0 to make a bootable floppy. + - Booting a kernel directly from a floppy without the assistance of a + bootloader such as LILO, is no longer supported. If you boot Linux from the hard drive, chances are you use LILO which uses the kernel image as specified in the file /etc/lilo.conf. The @@ -262,8 +253,9 @@ the above example it's due to a bad kernel pointer). More information on making sense of the dump is in Documentation/oops-tracing.txt - - You can use the "ksymoops" program to make sense of the dump. This - utility can be downloaded from + - If you compiled the kernel with CONFIG_KALLSYMS you can send the dump + as is, otherwise you will have to use the "ksymoops" program to make + sense of the dump. This utility can be downloaded from ftp://ftp..kernel.org/pub/linux/utils/kernel/ksymoops. Alternately you can do the dump lookup by hand: diff -Nru a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile --- a/arch/arm/kernel/Makefile Tue Mar 2 17:37:09 2004 +++ b/arch/arm/kernel/Makefile Tue Mar 2 17:37:09 2004 @@ -29,7 +29,7 @@ extra-y := $(head-y) init_task.o vmlinux.lds.s -# Spell out some dependencies that `make dep' doesn't spot +# Spell out some dependencies that aren't automatically figured out $(obj)/entry-armv.o: $(obj)/entry-header.S include/asm-arm/constants.h $(obj)/entry-common.o: $(obj)/entry-header.S include/asm-arm/constants.h \ $(obj)/calls.S diff -Nru a/arch/arm26/mm/Makefile b/arch/arm26/mm/Makefile --- a/arch/arm26/mm/Makefile Tue Mar 2 17:37:07 2004 +++ b/arch/arm26/mm/Makefile Tue Mar 2 17:37:07 2004 @@ -1,12 +1,5 @@ # # Makefile for the linux arm26-specific parts of the memory manager. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# -# Note 2! The CFLAGS definition is now in the main makefile... - -# Object file lists. obj-y := init.o extable.o proc-funcs.o mm-memc.o fault.o diff -Nru a/arch/h8300/mm/Makefile b/arch/h8300/mm/Makefile --- a/arch/h8300/mm/Makefile Tue Mar 2 17:37:09 2004 +++ b/arch/h8300/mm/Makefile Tue Mar 2 17:37:09 2004 @@ -1,10 +1,5 @@ # # Makefile for the linux m68k-specific parts of the memory manager. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# -# Note 2! The CFLAGS definition is now in the main makefile... obj-y := init.o fault.o memory.o kmap.o diff -Nru a/arch/h8300/platform/h8300h/Makefile b/arch/h8300/platform/h8300h/Makefile --- a/arch/h8300/platform/h8300h/Makefile Tue Mar 2 17:37:09 2004 +++ b/arch/h8300/platform/h8300h/Makefile Tue Mar 2 17:37:09 2004 @@ -6,10 +6,6 @@ #VPATH := $(VPATH):$(BOARD) -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# .S.o: $(CC) -D__ASSEMBLY__ $(AFLAGS) -I. -c $< -o $*.o diff -Nru a/arch/h8300/platform/h8300h/aki3068net/Makefile b/arch/h8300/platform/h8300h/aki3068net/Makefile --- a/arch/h8300/platform/h8300h/aki3068net/Makefile Tue Mar 2 17:37:08 2004 +++ b/arch/h8300/platform/h8300h/aki3068net/Makefile Tue Mar 2 17:37:08 2004 @@ -1,10 +1,6 @@ # # Makefile for the linux kernel. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# extra-y := crt0_ram.o obj-y := timer.o diff -Nru a/arch/h8300/platform/h8300h/generic/Makefile b/arch/h8300/platform/h8300h/generic/Makefile --- a/arch/h8300/platform/h8300h/generic/Makefile Tue Mar 2 17:37:07 2004 +++ b/arch/h8300/platform/h8300h/generic/Makefile Tue Mar 2 17:37:07 2004 @@ -1,10 +1,6 @@ # # Makefile for the linux kernel. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := timer.o extra-y = crt0_$(MODEL).o diff -Nru a/arch/h8300/platform/h8300h/h8max/Makefile b/arch/h8300/platform/h8300h/h8max/Makefile --- a/arch/h8300/platform/h8300h/h8max/Makefile Tue Mar 2 17:37:07 2004 +++ b/arch/h8300/platform/h8300h/h8max/Makefile Tue Mar 2 17:37:07 2004 @@ -1,10 +1,6 @@ # # Makefile for the linux kernel. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# extra-y := crt0_ram.o obj-y := timer.o diff -Nru a/arch/h8300/platform/h8s/Makefile b/arch/h8300/platform/h8s/Makefile --- a/arch/h8300/platform/h8s/Makefile Tue Mar 2 17:37:09 2004 +++ b/arch/h8300/platform/h8s/Makefile Tue Mar 2 17:37:09 2004 @@ -6,10 +6,6 @@ #VPATH := $(VPATH):$(BOARD) -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# .S.o: $(CC) -D__ASSEMBLY__ $(AFLAGS) -I. -c $< -o $*.o diff -Nru a/arch/h8300/platform/h8s/edosk2674/Makefile b/arch/h8300/platform/h8s/edosk2674/Makefile --- a/arch/h8300/platform/h8s/edosk2674/Makefile Tue Mar 2 17:37:08 2004 +++ b/arch/h8300/platform/h8s/edosk2674/Makefile Tue Mar 2 17:37:08 2004 @@ -1,10 +1,6 @@ # # Makefile for the linux kernel. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# extra-y := crt0_ram.o obj-y := timer.o diff -Nru a/arch/h8300/platform/h8s/generic/Makefile b/arch/h8300/platform/h8s/generic/Makefile --- a/arch/h8300/platform/h8s/generic/Makefile Tue Mar 2 17:37:08 2004 +++ b/arch/h8300/platform/h8s/generic/Makefile Tue Mar 2 17:37:08 2004 @@ -1,10 +1,6 @@ # # Makefile for the linux kernel. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# extra-y = crt0_$(MODEL).o obj-y := timer.o diff -Nru a/arch/i386/defconfig b/arch/i386/defconfig --- a/arch/i386/defconfig Tue Mar 2 17:37:08 2004 +++ b/arch/i386/defconfig Tue Mar 2 17:37:08 2004 @@ -21,6 +21,7 @@ # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y CONFIG_LOG_BUF_SHIFT=15 +CONFIG_HOTPLUG=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y @@ -44,6 +45,7 @@ # Processor type and features # CONFIG_X86_PC=y +# CONFIG_X86_ELAN is not set # CONFIG_X86_VOYAGER is not set # CONFIG_X86_NUMAQ is not set # CONFIG_X86_SUMMIT is not set @@ -59,6 +61,7 @@ # CONFIG_M686 is not set # CONFIG_MPENTIUMII is not set # CONFIG_MPENTIUMIII is not set +# CONFIG_MPENTIUMM is not set CONFIG_MPENTIUM4=y # CONFIG_MK6 is not set # CONFIG_MK7 is not set @@ -105,7 +108,9 @@ # CONFIG_MATH_EMULATION is not set CONFIG_MTRR=y # CONFIG_EFI is not set +CONFIG_IRQBALANCE=y CONFIG_HAVE_DEC_LOCK=y +# CONFIG_REGPARM is not set # # Power management options (ACPI, APM) @@ -137,6 +142,7 @@ CONFIG_ACPI_PCI=y CONFIG_ACPI_SYSTEM=y # CONFIG_ACPI_RELAXED_AML is not set +# CONFIG_X86_PM_TIMER is not set # # APM (Advanced Power Management) BIOS Support @@ -164,7 +170,6 @@ # CONFIG_EISA is not set # CONFIG_MCA is not set # CONFIG_SCx200 is not set -CONFIG_HOTPLUG=y # # PCMCIA/CardBus support @@ -261,6 +266,7 @@ # # IDE chipset support/bugfixes # +CONFIG_IDE_GENERIC=y CONFIG_BLK_DEV_CMD640=y # CONFIG_BLK_DEV_CMD640_ENHANCED is not set # CONFIG_BLK_DEV_IDEPNP is not set @@ -368,10 +374,13 @@ # CONFIG_SCSI_QLOGIC_ISP is not set # CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set -CONFIG_SCSI_QLA2XXX_CONFIG=y +CONFIG_SCSI_QLA2XXX=y # CONFIG_SCSI_QLA21XX is not set # CONFIG_SCSI_QLA22XX is not set -# CONFIG_SCSI_QLA23XX is not set +# CONFIG_SCSI_QLA2300 is not set +# CONFIG_SCSI_QLA2322 is not set +# CONFIG_SCSI_QLA6312 is not set +# CONFIG_SCSI_QLA6322 is not set # CONFIG_SCSI_SYM53C416 is not set # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set @@ -397,7 +406,7 @@ # CONFIG_FUSION is not set # -# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# IEEE 1394 (FireWire) support # CONFIG_IEEE1394=y @@ -406,6 +415,7 @@ # # CONFIG_IEEE1394_VERBOSEDEBUG is not set # CONFIG_IEEE1394_OUI_DB is not set +# CONFIG_IEEE1394_EXTRA_CONFIG_ROMS is not set # # Device Drivers @@ -423,7 +433,7 @@ # CONFIG_IEEE1394_SBP2 is not set # CONFIG_IEEE1394_ETH1394 is not set # CONFIG_IEEE1394_DV1394 is not set -# CONFIG_IEEE1394_RAWIO is not set +CONFIG_IEEE1394_RAWIO=y # CONFIG_IEEE1394_CMP is not set # @@ -432,6 +442,10 @@ # CONFIG_I2O is not set # +# Macintosh device drivers +# + +# # Networking support # CONFIG_NET=y @@ -595,10 +609,11 @@ # CONFIG_NE2K_PCI is not set # CONFIG_8139CP is not set CONFIG_8139TOO=y -# CONFIG_8139TOO_PIO is not set +CONFIG_8139TOO_PIO=y # CONFIG_8139TOO_TUNE_TWISTER is not set # CONFIG_8139TOO_8129 is not set # CONFIG_8139_OLD_RX_RESET is not set +CONFIG_8139_RXBUF_IDX=2 # CONFIG_SIS900 is not set # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set @@ -666,7 +681,7 @@ # # ISDN subsystem # -# CONFIG_ISDN_BOOL is not set +# CONFIG_ISDN is not set # # Telephony Support @@ -742,7 +757,8 @@ # CONFIG_SERIAL_CORE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 CONFIG_PRINTER=y # CONFIG_LP_CONSOLE is not set # CONFIG_PPDEV is not set @@ -785,6 +801,7 @@ # CONFIG_AGP_SIS is not set # CONFIG_AGP_SWORKS is not set # CONFIG_AGP_VIA is not set +# CONFIG_AGP_EFFICEON is not set CONFIG_DRM=y # CONFIG_DRM_TDFX is not set # CONFIG_DRM_GAMMA is not set @@ -884,6 +901,7 @@ # # CONFIG_SND_ALI5451 is not set # CONFIG_SND_AZT3328 is not set +# CONFIG_SND_BT87X is not set # CONFIG_SND_CS46XX is not set # CONFIG_SND_CS4281 is not set # CONFIG_SND_EMU10K1 is not set @@ -976,7 +994,6 @@ # USB Imaging devices # # CONFIG_USB_MDC800 is not set -# CONFIG_USB_SCANNER is not set # CONFIG_USB_MICROTEK is not set # CONFIG_USB_HPUSBSCSI is not set @@ -1070,7 +1087,6 @@ CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y # CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y # CONFIG_HUGETLBFS is not set @@ -1083,6 +1099,7 @@ # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set @@ -1111,7 +1128,6 @@ # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # @@ -1173,6 +1189,7 @@ # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set +CONFIG_EARLY_PRINTK=y CONFIG_DEBUG_SPINLOCK_SLEEP=y # CONFIG_FRAME_POINTER is not set CONFIG_X86_FIND_SMP_CONFIG=y diff -Nru a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c --- a/arch/i386/kernel/apic.c Tue Mar 2 17:37:09 2004 +++ b/arch/i386/kernel/apic.c Tue Mar 2 17:37:09 2004 @@ -248,12 +248,6 @@ */ reg0 = apic_read(APIC_ID); Dprintk("Getting ID: %x\n", reg0); - apic_write(APIC_ID, reg0 ^ APIC_ID_MASK); - reg1 = apic_read(APIC_ID); - Dprintk("Getting ID: %x\n", reg1); - apic_write(APIC_ID, reg0); - if (reg1 != (reg0 ^ APIC_ID_MASK)) - return 0; /* * The next two are just to see if we have sane values. diff -Nru a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c Tue Mar 2 17:37:08 2004 +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c Tue Mar 2 17:37:08 2004 @@ -8,6 +8,8 @@ * * Based on the powernow-k7.c module written by Dave Jones. * (C) 2003 Dave Jones on behalf of SuSE Labs + * (C) 2004 Dominik Brodowski + * (C) 2004 Pavel Machek * Licensed under the terms of the GNU GPL License version 2. * Based upon datasheets & sample CPUs kindly provided by AMD. * @@ -34,10 +36,6 @@ #define VERSION "version 1.00.08a" #include "powernow-k8.h" -#ifdef CONFIG_PREEMPT -#warning this driver has not been tested on a preempt system -#endif - static u32 vstable; /* voltage stabalization time, from PSB, units 20 us */ static u32 plllock; /* pll lock time, from PSB, units 1 us */ static u32 numps; /* number of p-states, from PSB */ @@ -636,13 +634,22 @@ return -ENOMEM; } - for (j = 0; j < numps; j++) { - printk(KERN_INFO PFX " %d : fid 0x%x (%d MHz), vid 0x%x\n", j, - pst[j].fid, find_freq_from_fid(pst[j].fid), pst[j].vid); + for (j = 0; j < psb->numpstates; j++) { powernow_table[j].index = pst[j].fid; /* lower 8 bits */ powernow_table[j].index |= (pst[j].vid << 8); /* upper 8 bits */ - powernow_table[j].frequency = find_freq_from_fid(pst[j].fid); } + + /* If you want to override your frequency tables, this + is right place. */ + + for (j = 0; j < numps; j++) { + powernow_table[j].frequency = find_freq_from_fid(powernow_table[j].index & 0xff)*1000; + printk(KERN_INFO PFX " %d : fid 0x%x (%d MHz), vid 0x%x\n", j, + powernow_table[j].index & 0xff, + powernow_table[j].frequency/1000, + powernow_table[j].index >> 8); + } + powernow_table[numps].frequency = CPUFREQ_TABLE_END; powernow_table[numps].index = 0; diff -Nru a/arch/i386/mach-voyager/Makefile b/arch/i386/mach-voyager/Makefile --- a/arch/i386/mach-voyager/Makefile Tue Mar 2 17:37:07 2004 +++ b/arch/i386/mach-voyager/Makefile Tue Mar 2 17:37:07 2004 @@ -1,11 +1,6 @@ # # Makefile for the linux kernel. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# -# Note 2! The CFLAGS definitions are now in the main makefile... EXTRA_CFLAGS += -I../kernel obj-y := setup.o voyager_basic.o voyager_thread.o diff -Nru a/arch/i386/oprofile/nmi_int.c b/arch/i386/oprofile/nmi_int.c --- a/arch/i386/oprofile/nmi_int.c Tue Mar 2 17:37:09 2004 +++ b/arch/i386/oprofile/nmi_int.c Tue Mar 2 17:37:09 2004 @@ -88,7 +88,7 @@ } -static void nmi_save_registers(struct op_msrs * msrs) +static void nmi_cpu_save_registers(struct op_msrs * msrs) { unsigned int const nr_ctrs = model->num_counters; unsigned int const nr_ctrls = model->num_controls; @@ -110,6 +110,15 @@ } +static void nmi_save_registers(void * dummy) +{ + int cpu = smp_processor_id(); + struct op_msrs * msrs = &cpu_msrs[cpu]; + model->fill_in_addresses(msrs); + nmi_cpu_save_registers(msrs); +} + + static void free_msrs(void) { int i; @@ -156,8 +165,6 @@ { int cpu = smp_processor_id(); struct op_msrs * msrs = &cpu_msrs[cpu]; - model->fill_in_addresses(msrs); - nmi_save_registers(msrs); spin_lock(&oprofilefs_lock); model->setup_ctrs(msrs); spin_unlock(&oprofilefs_lock); @@ -177,6 +184,10 @@ * break the core code horrifically. */ disable_lapic_nmi_watchdog(); + /* We need to serialize save and setup for HT because the subset + * of msrs are distinct for save and setup operations + */ + on_each_cpu(nmi_save_registers, NULL, 0, 1); on_each_cpu(nmi_cpu_setup, NULL, 0, 1); set_nmi_callback(nmi_callback); nmi_enabled = 1; diff -Nru a/arch/ia64/Kconfig b/arch/ia64/Kconfig --- a/arch/ia64/Kconfig Tue Mar 2 17:37:09 2004 +++ b/arch/ia64/Kconfig Tue Mar 2 17:37:09 2004 @@ -288,39 +288,6 @@ int default "18" -choice - prompt "Huge TLB page size" - depends on HUGETLB_PAGE - default HUGETLB_PAGE_SIZE_16MB - -config HUGETLB_PAGE_SIZE_4GB - depends on MCKINLEY - bool "4GB" - -config HUGETLB_PAGE_SIZE_1GB - depends on MCKINLEY - bool "1GB" - -config HUGETLB_PAGE_SIZE_256MB - bool "256MB" - -config HUGETLB_PAGE_SIZE_64MB - bool "64MB" - -config HUGETLB_PAGE_SIZE_16MB - bool "16MB" - -config HUGETLB_PAGE_SIZE_4MB - bool "4MB" - -config HUGETLB_PAGE_SIZE_1MB - bool "1MB" - -config HUGETLB_PAGE_SIZE_256KB - bool "256KB" - -endchoice - config IA64_PAL_IDLE bool "Use PAL_HALT_LIGHT in idle loop" help diff -Nru a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S --- a/arch/ia64/kernel/head.S Tue Mar 2 17:37:08 2004 +++ b/arch/ia64/kernel/head.S Tue Mar 2 17:37:08 2004 @@ -816,6 +816,19 @@ br.ret.sptk.many rp END(ia64_delay_loop) +GLOBAL_ENTRY(ia64_invoke_kernel_thread_helper) + .prologue + .save rp, r0 // this is the end of the call-chain + .body + alloc r2 = ar.pfs, 0, 0, 2, 0 + mov out0 = r9 + mov out1 = r11;; + br.call.sptk.many rp = kernel_thread_helper;; + mov out0 = r8 + br.call.sptk.many rp = sys_exit;; +1: br.sptk.few 1b // not reached +END(ia64_invoke_kernel_thread_helper) + #ifdef CONFIG_IA64_BRL_EMU /* diff -Nru a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c --- a/arch/ia64/kernel/iosapic.c Tue Mar 2 17:37:08 2004 +++ b/arch/ia64/kernel/iosapic.c Tue Mar 2 17:37:08 2004 @@ -103,6 +103,7 @@ static struct iosapic_intr_info { char *addr; /* base address of IOSAPIC */ + u32 low32; /* current value of low word of Redirection table entry */ unsigned int gsi_base; /* first GSI assigned to this IOSAPIC */ char rte_index; /* IOSAPIC RTE index (-1 => not an IOSAPIC interrupt) */ unsigned char dmode : 3; /* delivery mode (see iosapic.h) */ @@ -213,6 +214,7 @@ writel(high32, addr + IOSAPIC_WINDOW); writel(IOSAPIC_RTE_LOW(rte_index), addr + IOSAPIC_REG_SELECT); writel(low32, addr + IOSAPIC_WINDOW); + iosapic_intr_info[vector].low32 = low32; } static void @@ -239,9 +241,10 @@ spin_lock_irqsave(&iosapic_lock, flags); { writel(IOSAPIC_RTE_LOW(rte_index), addr + IOSAPIC_REG_SELECT); - low32 = readl(addr + IOSAPIC_WINDOW); - low32 |= (1 << IOSAPIC_MASK_SHIFT); /* set only the mask bit */ + /* set only the mask bit */ + low32 = iosapic_intr_info[vec].low32 |= IOSAPIC_MASK; + writel(low32, addr + IOSAPIC_WINDOW); } spin_unlock_irqrestore(&iosapic_lock, flags); @@ -264,9 +267,7 @@ spin_lock_irqsave(&iosapic_lock, flags); { writel(IOSAPIC_RTE_LOW(rte_index), addr + IOSAPIC_REG_SELECT); - low32 = readl(addr + IOSAPIC_WINDOW); - - low32 &= ~(1 << IOSAPIC_MASK_SHIFT); /* clear only the mask bit */ + low32 = iosapic_intr_info[vec].low32 &= ~IOSAPIC_MASK; writel(low32, addr + IOSAPIC_WINDOW); } spin_unlock_irqrestore(&iosapic_lock, flags); @@ -307,9 +308,7 @@ { /* get current delivery mode by reading the low32 */ writel(IOSAPIC_RTE_LOW(rte_index), addr + IOSAPIC_REG_SELECT); - low32 = readl(addr + IOSAPIC_WINDOW); - - low32 &= ~(7 << IOSAPIC_DELIVERY_SHIFT); + low32 = iosapic_intr_info[vec].low32 & ~(7 << IOSAPIC_DELIVERY_SHIFT); if (redir) /* change delivery mode to lowest priority */ low32 |= (IOSAPIC_LOWEST_PRIORITY << IOSAPIC_DELIVERY_SHIFT); @@ -317,6 +316,7 @@ /* change delivery mode to fixed */ low32 |= (IOSAPIC_FIXED << IOSAPIC_DELIVERY_SHIFT); + iosapic_intr_info[vec].low32 = low32; writel(IOSAPIC_RTE_HIGH(rte_index), addr + IOSAPIC_REG_SELECT); writel(high32, addr + IOSAPIC_WINDOW); writel(IOSAPIC_RTE_LOW(rte_index), addr + IOSAPIC_REG_SELECT); diff -Nru a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c --- a/arch/ia64/kernel/irq.c Tue Mar 2 17:37:09 2004 +++ b/arch/ia64/kernel/irq.c Tue Mar 2 17:37:09 2004 @@ -455,7 +455,6 @@ unsigned int status; int cpu; - irq_enter(); cpu = smp_processor_id(); /* for CONFIG_PREEMPT, this must come after irq_enter()! */ kstat_cpu(cpu).irqs[irq]++; @@ -525,7 +524,6 @@ desc->handler->end(irq); spin_unlock(&desc->lock); } - irq_exit(); return 1; } diff -Nru a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c --- a/arch/ia64/kernel/irq_ia64.c Tue Mar 2 17:37:08 2004 +++ b/arch/ia64/kernel/irq_ia64.c Tue Mar 2 17:37:08 2004 @@ -120,6 +120,7 @@ * 16 (without this, it would be ~240, which could easily lead * to kernel stack overflows). */ + irq_enter(); saved_tpr = ia64_getreg(_IA64_REG_CR_TPR); ia64_srlz_d(); while (vector != IA64_SPURIOUS_INT_VECTOR) { @@ -143,8 +144,7 @@ * handler needs to be able to wait for further keyboard interrupts, which can't * come through until ia64_eoi() has been done. */ - if (local_softirq_pending()) - do_softirq(); + irq_exit(); } #ifdef CONFIG_SMP diff -Nru a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S --- a/arch/ia64/kernel/ivt.S Tue Mar 2 17:37:07 2004 +++ b/arch/ia64/kernel/ivt.S Tue Mar 2 17:37:07 2004 @@ -118,10 +118,11 @@ #ifdef CONFIG_HUGETLB_PAGE extr.u r26=r25,2,6 ;; - cmp.eq p8,p0=HPAGE_SHIFT,r26 + cmp.ne p8,p0=r18,r26 + sub r27=r26,r18 ;; (p8) dep r25=r18,r25,2,6 -(p8) shr r22=r22,HPAGE_SHIFT-PAGE_SHIFT +(p8) shr r22=r22,r27 #endif ;; cmp.eq p6,p7=5,r17 // is IFA pointing into to region 5? diff -Nru a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c --- a/arch/ia64/kernel/perfmon.c Tue Mar 2 17:37:09 2004 +++ b/arch/ia64/kernel/perfmon.c Tue Mar 2 17:37:09 2004 @@ -82,7 +82,7 @@ #define PFM_REG_IMPL 0x1 /* register implemented */ #define PFM_REG_END 0x2 /* end marker */ #define PFM_REG_MONITOR (0x1<<4|PFM_REG_IMPL) /* a PMC with a pmc.pm field only */ -#define PFM_REG_COUNTING (0x2<<4|PFM_REG_MONITOR|PFM_REG_IMPL) /* a monitor + pmc.oi+ PMD used as a counter */ +#define PFM_REG_COUNTING (0x2<<4|PFM_REG_MONITOR) /* a monitor + pmc.oi+ PMD used as a counter */ #define PFM_REG_CONTROL (0x4<<4|PFM_REG_IMPL) /* PMU control register */ #define PFM_REG_CONFIG (0x8<<4|PFM_REG_IMPL) /* configuration register */ #define PFM_REG_BUFFER (0xc<<4|PFM_REG_IMPL) /* PMD used as buffer */ @@ -109,14 +109,15 @@ #define PMD_PMD_DEP(i) pmu_conf.pmd_desc[i].dep_pmd[0] #define PMC_PMD_DEP(i) pmu_conf.pmc_desc[i].dep_pmd[0] -/* k assumed unsigned (up to 64 registers) */ -#define IBR_IS_IMPL(k) (k< IA64_NUM_DBG_REGS) -#define DBR_IS_IMPL(k) (k< IA64_NUM_DBG_REGS) +#define PFM_NUM_IBRS IA64_NUM_DBG_REGS +#define PFM_NUM_DBRS IA64_NUM_DBG_REGS #define CTX_OVFL_NOBLOCK(c) ((c)->ctx_fl_block == 0) #define CTX_HAS_SMPL(c) ((c)->ctx_fl_is_sampling) #define PFM_CTX_TASK(h) (h)->ctx_task +#define PMU_PMC_OI 5 /* position of pmc.oi bit */ + /* XXX: does not support more than 64 PMDs */ #define CTX_USED_PMD(ctx, mask) (ctx)->ctx_used_pmds[0] |= (mask) #define CTX_IS_USED_PMD(ctx, c) (((ctx)->ctx_used_pmds[0] & (1UL << (c))) != 0UL) @@ -218,6 +219,8 @@ /* * debugging */ +#define PFM_DEBUGGING 1 +#ifdef PFM_DEBUGGING #define DPRINT(a) \ do { \ if (unlikely(pfm_sysctl.debug >0)) { printk("%s.%d: CPU%d [%d] ", __FUNCTION__, __LINE__, smp_processor_id(), current->pid); printk a; } \ @@ -227,18 +230,7 @@ do { \ if (unlikely(pfm_sysctl.debug > 0 && pfm_sysctl.debug_ovfl >0)) { printk("%s.%d: CPU%d [%d] ", __FUNCTION__, __LINE__, smp_processor_id(), current->pid); printk a; } \ } while (0) -/* - * Architected PMC structure - */ -typedef struct { - unsigned long pmc_plm:4; /* privilege level mask */ - unsigned long pmc_ev:1; /* external visibility */ - unsigned long pmc_oi:1; /* overflow interrupt */ - unsigned long pmc_pm:1; /* privileged monitor */ - unsigned long pmc_ig1:1; /* reserved */ - unsigned long pmc_es:8; /* event select */ - unsigned long pmc_ig2:48; /* reserved */ -} pfm_monitor_t; +#endif /* * 64-bit software counter structure @@ -469,20 +461,13 @@ #define PFM_CMD_STOP 0x08 /* command does not work on zombie context */ -#define PFM_CMD_IDX(cmd) (cmd) -#define PFM_CMD_IS_VALID(cmd) ((PFM_CMD_IDX(cmd) >= 0) && (PFM_CMD_IDX(cmd) < PFM_CMD_COUNT) \ - && pfm_cmd_tab[PFM_CMD_IDX(cmd)].cmd_func != NULL) - -#define PFM_CMD_NAME(cmd) pfm_cmd_tab[PFM_CMD_IDX(cmd)].cmd_name -#define PFM_CMD_READ_ARG(cmd) (pfm_cmd_tab[PFM_CMD_IDX(cmd)].cmd_flags & PFM_CMD_ARG_READ) -#define PFM_CMD_RW_ARG(cmd) (pfm_cmd_tab[PFM_CMD_IDX(cmd)].cmd_flags & PFM_CMD_ARG_RW) -#define PFM_CMD_USE_FD(cmd) (pfm_cmd_tab[PFM_CMD_IDX(cmd)].cmd_flags & PFM_CMD_FD) -#define PFM_CMD_STOPPED(cmd) (pfm_cmd_tab[PFM_CMD_IDX(cmd)].cmd_flags & PFM_CMD_STOP) +#define PFM_CMD_NAME(cmd) pfm_cmd_tab[(cmd)].cmd_name +#define PFM_CMD_READ_ARG(cmd) (pfm_cmd_tab[(cmd)].cmd_flags & PFM_CMD_ARG_READ) +#define PFM_CMD_RW_ARG(cmd) (pfm_cmd_tab[(cmd)].cmd_flags & PFM_CMD_ARG_RW) +#define PFM_CMD_USE_FD(cmd) (pfm_cmd_tab[(cmd)].cmd_flags & PFM_CMD_FD) +#define PFM_CMD_STOPPED(cmd) (pfm_cmd_tab[(cmd)].cmd_flags & PFM_CMD_STOP) #define PFM_CMD_ARG_MANY -1 /* cannot be zero */ -#define PFM_CMD_NARG(cmd) (pfm_cmd_tab[PFM_CMD_IDX(cmd)].cmd_narg) -#define PFM_CMD_ARG_SIZE(cmd) (pfm_cmd_tab[PFM_CMD_IDX(cmd)].cmd_argsize) -#define PFM_CMD_GETSIZE(cmd) (pfm_cmd_tab[PFM_CMD_IDX(cmd)].cmd_getsize) typedef struct { int debug; /* turn on/off debugging via syslog */ @@ -2834,10 +2819,11 @@ pfm_write_pmcs(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) { struct thread_struct *thread = NULL; + struct task_struct *task; pfarg_reg_t *req = (pfarg_reg_t *)arg; - unsigned long value; - unsigned long smpl_pmds, reset_pmds; - unsigned int cnum, reg_flags, flags; + unsigned long value, pmc_pm; + unsigned long smpl_pmds, reset_pmds, impl_pmds; + unsigned int cnum, reg_flags, flags, pmc_type; int i, can_access_pmu = 0, is_loaded, is_system; int is_monitor, is_counting, state; int ret = -EINVAL; @@ -2846,12 +2832,13 @@ state = ctx->ctx_state; is_loaded = state == PFM_CTX_LOADED ? 1 : 0; is_system = ctx->ctx_fl_system; + task = ctx->ctx_task; + impl_pmds = pmu_conf.impl_pmds[0]; if (state == PFM_CTX_TERMINATED || state == PFM_CTX_ZOMBIE) return -EINVAL; - if (is_loaded) { - thread = &ctx->ctx_task->thread; + thread = &task->thread; /* * In system wide and when the context is loaded, access can only happen * when the caller is running on the CPU being monitored by the session. @@ -2861,7 +2848,7 @@ DPRINT(("[%d] should be running on CPU%d\n", current->pid, ctx->ctx_cpu)); return -EBUSY; } - can_access_pmu = GET_PMU_OWNER() == ctx->ctx_task || is_system ? 1 : 0; + can_access_pmu = GET_PMU_OWNER() == task || is_system ? 1 : 0; } for (i = 0; i < count; i++, req++) { @@ -2873,16 +2860,24 @@ reset_pmds = req->reg_reset_pmds[0]; flags = 0; - is_counting = PMC_IS_COUNTING(cnum); - is_monitor = PMC_IS_MONITOR(cnum); + + if (cnum >= PMU_MAX_PMCS) { + DPRINT(("pmc%u is invalid\n", cnum)); + goto error; + } + + pmc_type = pmu_conf.pmc_desc[cnum].type; + pmc_pm = (value >> pmu_conf.pmc_desc[cnum].pm_pos) & 0x1; + is_counting = (pmc_type & PFM_REG_COUNTING) == PFM_REG_COUNTING ? 1 : 0; + is_monitor = (pmc_type & PFM_REG_MONITOR) == PFM_REG_MONITOR ? 1 : 0; /* * we reject all non implemented PMC as well * as attempts to modify PMC[0-3] which are used * as status registers by the PMU */ - if (PMC_IS_IMPL(cnum) == 0 || PMC_IS_CONTROL(cnum)) { - DPRINT(("pmc%u is unimplemented or invalid\n", cnum)); + if ((pmc_type & PFM_REG_IMPL) == 0 || (pmc_type & PFM_REG_CONTROL) == PFM_REG_CONTROL) { + DPRINT(("pmc%u is unimplemented or no-access pmc_type=%x\n", cnum, pmc_type)); goto error; } /* @@ -2890,21 +2885,20 @@ * - system-wide session: PMCx.pm=1 (privileged monitor) * - per-task : PMCx.pm=0 (user monitor) */ - if ((is_monitor || is_counting) && value != PMC_DFL_VAL(cnum) && PFM_CHECK_PMC_PM(ctx, cnum, value)) { - DPRINT(("pmc%u pmc_pm=%ld fl_system=%d\n", + if (is_monitor && value != PMC_DFL_VAL(cnum) && is_system ^ pmc_pm) { + DPRINT(("pmc%u pmc_pm=%lu is_system=%d\n", cnum, - PMC_PM(cnum, value), - ctx->ctx_fl_system)); + pmc_pm, + is_system)); goto error; } if (is_counting) { - pfm_monitor_t *p = (pfm_monitor_t *)&value; /* * enforce generation of overflow interrupt. Necessary on all * CPUs. */ - p->pmc_oi = 1; + value |= 1 << PMU_PMC_OI; if (reg_flags & PFM_REGFL_OVFL_NOTIFY) { flags |= PFM_REGFL_OVFL_NOTIFY; @@ -2913,13 +2907,13 @@ if (reg_flags & PFM_REGFL_RANDOM) flags |= PFM_REGFL_RANDOM; /* verify validity of smpl_pmds */ - if ((smpl_pmds & pmu_conf.impl_pmds[0]) != smpl_pmds) { + if ((smpl_pmds & impl_pmds) != smpl_pmds) { DPRINT(("invalid smpl_pmds 0x%lx for pmc%u\n", smpl_pmds, cnum)); goto error; } /* verify validity of reset_pmds */ - if ((reset_pmds & pmu_conf.impl_pmds[0]) != reset_pmds) { + if ((reset_pmds & impl_pmds) != reset_pmds) { DPRINT(("invalid reset_pmds 0x%lx for pmc%u\n", reset_pmds, cnum)); goto error; } @@ -2935,7 +2929,7 @@ * execute write checker, if any */ if (PMC_WR_FUNC(cnum)) { - ret = PMC_WR_FUNC(cnum)(ctx->ctx_task, ctx, cnum, &value, regs); + ret = PMC_WR_FUNC(cnum)(task, ctx, cnum, &value, regs); if (ret) goto error; ret = -EINVAL; } @@ -2997,7 +2991,7 @@ * * The value in ctx_pmcs[] can only be changed in pfm_write_pmcs(). * - * The value in t->pmc[] may be modified on overflow, i.e., when + * The value in thread->pmcs[] may be modified on overflow, i.e., when * monitoring needs to be stopped. */ if (is_monitor) CTX_USED_MONITOR(ctx, 1UL << cnum); @@ -3056,11 +3050,6 @@ return 0; error: PFM_REG_RETFLAG_SET(req->reg_flags, PFM_REG_RETFL_EINVAL); - - req->reg_flags = PFM_REG_RETFL_EINVAL; - - DPRINT(("pmc[%u]=0x%lx error %d\n", cnum, value, ret)); - return ret; } @@ -3068,6 +3057,7 @@ pfm_write_pmds(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) { struct thread_struct *thread = NULL; + struct task_struct *task; pfarg_reg_t *req = (pfarg_reg_t *)arg; unsigned long value, hw_value, ovfl_mask; unsigned int cnum; @@ -3080,25 +3070,26 @@ is_loaded = state == PFM_CTX_LOADED ? 1 : 0; is_system = ctx->ctx_fl_system; ovfl_mask = pmu_conf.ovfl_val; + task = ctx->ctx_task; - if (state == PFM_CTX_TERMINATED || state == PFM_CTX_ZOMBIE) return -EINVAL; + if (unlikely(state == PFM_CTX_TERMINATED || state == PFM_CTX_ZOMBIE)) return -EINVAL; /* * on both UP and SMP, we can only write to the PMC when the task is * the owner of the local PMU. */ - if (is_loaded) { - thread = &ctx->ctx_task->thread; + if (likely(is_loaded)) { + thread = &task->thread; /* * In system wide and when the context is loaded, access can only happen * when the caller is running on the CPU being monitored by the session. * It does not have to be the owner (ctx_task) of the context per se. */ - if (is_system && ctx->ctx_cpu != smp_processor_id()) { + if (unlikely(is_system && ctx->ctx_cpu != smp_processor_id())) { DPRINT(("[%d] should be running on CPU%d\n", current->pid, ctx->ctx_cpu)); return -EBUSY; } - can_access_pmu = GET_PMU_OWNER() == ctx->ctx_task || is_system ? 1 : 0; + can_access_pmu = GET_PMU_OWNER() == task || is_system ? 1 : 0; } for (i = 0; i < count; i++, req++) { @@ -3118,7 +3109,7 @@ if (PMD_WR_FUNC(cnum)) { unsigned long v = value; - ret = PMD_WR_FUNC(cnum)(ctx->ctx_task, ctx, cnum, &v, regs); + ret = PMD_WR_FUNC(cnum)(task, ctx, cnum, &v, regs); if (ret) goto abort_mission; value = v; @@ -3243,16 +3234,6 @@ * for now, we have only one possibility for error */ PFM_REG_RETFLAG_SET(req->reg_flags, PFM_REG_RETFL_EINVAL); - - /* - * we change the return value to EFAULT in case we cannot write register return code. - * The caller first must correct this error, then a resubmission of the request will - * eventually yield the EINVAL. - */ - req->reg_flags = PFM_REG_RETFL_EINVAL; - - DPRINT(("pmd[%u]=0x%lx ret %d\n", cnum, value, ret)); - return ret; } @@ -3269,11 +3250,12 @@ pfm_read_pmds(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) { struct thread_struct *thread = NULL; - unsigned long val = 0UL, lval, ovfl_mask; + struct task_struct *task; + unsigned long val = 0UL, lval, ovfl_mask, sval; pfarg_reg_t *req = (pfarg_reg_t *)arg; unsigned int cnum, reg_flags = 0; int i, can_access_pmu = 0, state; - int is_loaded, is_system; + int is_loaded, is_system, is_counting; int ret = -EINVAL; /* @@ -3285,32 +3267,33 @@ is_loaded = state == PFM_CTX_LOADED ? 1 : 0; is_system = ctx->ctx_fl_system; ovfl_mask = pmu_conf.ovfl_val; + task = ctx->ctx_task; if (state == PFM_CTX_ZOMBIE) return -EINVAL; - if (is_loaded) { - thread = &ctx->ctx_task->thread; + if (likely(is_loaded)) { + thread = &task->thread; /* * In system wide and when the context is loaded, access can only happen * when the caller is running on the CPU being monitored by the session. * It does not have to be the owner (ctx_task) of the context per se. */ - if (is_system && ctx->ctx_cpu != smp_processor_id()) { + if (unlikely(is_system && ctx->ctx_cpu != smp_processor_id())) { DPRINT(("[%d] should be running on CPU%d\n", current->pid, ctx->ctx_cpu)); return -EBUSY; } /* * this can be true when not self-monitoring only in UP */ - can_access_pmu = GET_PMU_OWNER() == ctx->ctx_task || is_system ? 1 : 0; + can_access_pmu = GET_PMU_OWNER() == task || is_system ? 1 : 0; if (can_access_pmu) ia64_srlz_d(); } - DPRINT(("enter loaded=%d access_pmu=%d ctx_state=%d\n", + DPRINT(("loaded=%d access_pmu=%d ctx_state=%d\n", is_loaded, can_access_pmu, - ctx->ctx_state)); + state)); /* * on both UP and SMP, we can only read the PMD from the hardware register when @@ -3319,11 +3302,10 @@ for (i = 0; i < count; i++, req++) { - lval = 0UL; cnum = req->reg_num; reg_flags = req->reg_flags; - if (!PMD_IS_IMPL(cnum)) goto error; + if (unlikely(!PMD_IS_IMPL(cnum))) goto error; /* * we can only read the register that we use. That includes * the one we explicitely initialize AND the one we want included @@ -3332,7 +3314,11 @@ * Having this restriction allows optimization in the ctxsw routine * without compromising security (leaks) */ - if (!CTX_IS_USED_PMD(ctx, cnum)) goto error; + if (unlikely(!CTX_IS_USED_PMD(ctx, cnum))) goto error; + + sval = ctx->ctx_pmds[cnum].val; + lval = ctx->ctx_pmds[cnum].lval; + is_counting = PMD_IS_COUNTING(cnum); /* * If the task is not the current one, then we check if the @@ -3347,23 +3333,21 @@ * if context is zombie, then task does not exist anymore. * In this case, we use the full value saved in the context (pfm_flush_regs()). */ - val = state == PFM_CTX_LOADED ? thread->pmds[cnum] : 0UL; + val = is_loaded ? thread->pmds[cnum] : 0UL; } - if (PMD_IS_COUNTING(cnum)) { + if (is_counting) { /* * XXX: need to check for overflow when loaded */ val &= ovfl_mask; - val += ctx->ctx_pmds[cnum].val; - - lval = ctx->ctx_pmds[cnum].lval; + val += sval; } /* * execute read checker, if any */ - if (PMD_RD_FUNC(cnum)) { + if (unlikely(PMD_RD_FUNC(cnum))) { unsigned long v = val; ret = PMD_RD_FUNC(cnum)(ctx->ctx_task, ctx, cnum, &v, regs); if (ret) goto error; @@ -3373,12 +3357,7 @@ PFM_REG_RETFLAG_SET(reg_flags, 0); - DPRINT(("pmd[%u]=0x%lx loaded=%d access_pmu=%d ctx_state=%d\n", - cnum, - val, - is_loaded, - can_access_pmu, - ctx->ctx_state)); + DPRINT(("pmd[%u]=0x%lx\n", cnum, val)); /* * update register return value, abort all if problem during copy. @@ -3393,12 +3372,7 @@ return 0; error: - PFM_REG_RETFLAG_SET(reg_flags, PFM_REG_RETFL_EINVAL); - - req->reg_flags = PFM_REG_RETFL_EINVAL; - - DPRINT(("error pmd[%u]=0x%lx\n", cnum, val)); - + PFM_REG_RETFLAG_SET(req->reg_flags, PFM_REG_RETFL_EINVAL); return ret; } @@ -3628,7 +3602,7 @@ prefetch(ctx->ctx_smpl_hdr); rst_ctrl.bits.mask_monitoring = 0; - rst_ctrl.bits.reset_ovfl_pmds = 1; + rst_ctrl.bits.reset_ovfl_pmds = 0; if (state == PFM_CTX_LOADED) ret = pfm_buf_fmt_restart_active(fmt, task, &rst_ctrl, ctx->ctx_smpl_hdr, regs); @@ -3748,6 +3722,7 @@ pfm_write_ibr_dbr(int mode, pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) { struct thread_struct *thread = NULL; + struct task_struct *task; pfarg_dbreg_t *req = (pfarg_dbreg_t *)arg; unsigned long flags; dbreg_t dbreg; @@ -3762,6 +3737,7 @@ state = ctx->ctx_state; is_loaded = state == PFM_CTX_LOADED ? 1 : 0; is_system = ctx->ctx_fl_system; + task = ctx->ctx_task; if (state == PFM_CTX_TERMINATED || state == PFM_CTX_ZOMBIE) return -EINVAL; @@ -3770,17 +3746,17 @@ * the owner of the local PMU. */ if (is_loaded) { - thread = &ctx->ctx_task->thread; + thread = &task->thread; /* * In system wide and when the context is loaded, access can only happen * when the caller is running on the CPU being monitored by the session. * It does not have to be the owner (ctx_task) of the context per se. */ - if (is_system && ctx->ctx_cpu != smp_processor_id()) { + if (unlikely(is_system && ctx->ctx_cpu != smp_processor_id())) { DPRINT(("[%d] should be running on CPU%d\n", current->pid, ctx->ctx_cpu)); return -EBUSY; } - can_access_pmu = GET_PMU_OWNER() == ctx->ctx_task || is_system ? 1 : 0; + can_access_pmu = GET_PMU_OWNER() == task || is_system ? 1 : 0; } /* @@ -3796,7 +3772,7 @@ * don't bother if we are loaded and task is being debugged */ if (is_loaded && (thread->flags & IA64_THREAD_DBG_VALID) != 0) { - DPRINT(("debug registers already in use for [%d]\n", ctx->ctx_task->pid)); + DPRINT(("debug registers already in use for [%d]\n", task->pid)); return -EBUSY; } @@ -3837,7 +3813,7 @@ * is shared by all processes running on it */ if (first_time && can_access_pmu) { - DPRINT(("[%d] clearing ibrs, dbrs\n", ctx->ctx_task->pid)); + DPRINT(("[%d] clearing ibrs, dbrs\n", task->pid)); for (i=0; i < pmu_conf.num_ibrs; i++) { ia64_set_ibr(i, 0UL); ia64_srlz_i(); @@ -3860,7 +3836,7 @@ ret = -EINVAL; - if ((mode == PFM_CODE_RR && !IBR_IS_IMPL(rnum)) || ((mode == PFM_DATA_RR) && !DBR_IS_IMPL(rnum))) { + if ((mode == PFM_CODE_RR && rnum >= PFM_NUM_IBRS) || ((mode == PFM_DATA_RR) && rnum >= PFM_NUM_DBRS)) { DPRINT(("invalid register %u val=0x%lx mode=%d i=%d count=%d\n", rnum, dbreg.val, mode, i, count)); @@ -4434,6 +4410,7 @@ struct task_struct *task = PFM_CTX_TASK(ctx); struct pt_regs *tregs; int state, is_system; + int ret; DPRINT(("ctx_state=%d task [%d]\n", ctx->ctx_state, task ? task->pid : -1)); @@ -4451,7 +4428,8 @@ /* * clear psr and dcr bits */ - pfm_stop(ctx, NULL, 0, regs); + ret = pfm_stop(ctx, NULL, 0, regs); + if (ret) return ret; ctx->ctx_state = state = PFM_CTX_UNLOADED; @@ -4760,37 +4738,45 @@ void *args_k = NULL; long ret; /* will expand int return types */ size_t base_sz, sz, xtra_sz = 0; - int narg, completed_args = 0, call_made = 0; + int narg, completed_args = 0, call_made = 0, cmd_flags; + int (*func)(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs); + int (*getsize)(void *arg, size_t *sz); #define PFM_MAX_ARGSIZE 4096 /* - * reject any call if perfmon was disabled at initialization time - mask*/ - if (PFM_IS_DISABLED()) return -ENOSYS; + * reject any call if perfmon was disabled at initialization + */ + if (unlikely(PFM_IS_DISABLED())) return -ENOSYS; + + if (unlikely(cmd < 0 || cmd >= PFM_CMD_COUNT)) { + DPRINT(("[%d] invalid cmd=%d\n", current->pid, cmd)); + return -EINVAL; + } + + func = pfm_cmd_tab[cmd].cmd_func; + narg = pfm_cmd_tab[cmd].cmd_narg; + base_sz = pfm_cmd_tab[cmd].cmd_argsize; + getsize = pfm_cmd_tab[cmd].cmd_getsize; + cmd_flags = pfm_cmd_tab[cmd].cmd_flags; - if (unlikely(PFM_CMD_IS_VALID(cmd) == 0)) { + if (unlikely(func == NULL)) { DPRINT(("[%d] invalid cmd=%d\n", current->pid, cmd)); return -EINVAL; } - DPRINT(("cmd=%s idx=%d valid=%d narg=0x%x argsz=%lu count=%d\n", + DPRINT(("cmd=%s idx=%d narg=0x%x argsz=%lu count=%d\n", PFM_CMD_NAME(cmd), - PFM_CMD_IDX(cmd), - PFM_CMD_IS_VALID(cmd), - PFM_CMD_NARG(cmd), - PFM_CMD_ARG_SIZE(cmd), + cmd, + narg, + base_sz, count)); /* * check if number of arguments matches what the command expects */ - narg = PFM_CMD_NARG(cmd); - if ((narg == PFM_CMD_ARG_MANY && count <= 0) || (narg > 0 && narg != count)) + if (unlikely((narg == PFM_CMD_ARG_MANY && count <= 0) || (narg > 0 && narg != count))) return -EINVAL; - /* get single argument size */ - base_sz = PFM_CMD_ARG_SIZE(cmd); - restart_args: sz = xtra_sz + base_sz*count; /* @@ -4804,7 +4790,7 @@ /* * allocate default-sized argument buffer */ - if (count && args_k == NULL) { + if (likely(count && args_k == NULL)) { args_k = kmalloc(PFM_MAX_ARGSIZE, GFP_KERNEL); if (args_k == NULL) return -ENOMEM; } @@ -4824,11 +4810,11 @@ /* * check if command supports extra parameters */ - if (completed_args == 0 && PFM_CMD_GETSIZE(cmd)) { + if (completed_args == 0 && getsize) { /* * get extra parameters size (based on main argument) */ - ret = PFM_CMD_GETSIZE(cmd)(args_k, &xtra_sz); + ret = (*getsize)(args_k, &xtra_sz); if (ret) goto error_args; completed_args = 1; @@ -4836,45 +4822,45 @@ DPRINT(("[%d] restart_args sz=%lu xtra_sz=%lu\n", current->pid, sz, xtra_sz)); /* retry if necessary */ - if (xtra_sz) goto restart_args; + if (likely(xtra_sz)) goto restart_args; } - if (PFM_CMD_USE_FD(cmd)) { + if (unlikely((cmd_flags & PFM_CMD_FD) == 0)) goto skip_fd; - ret = -EBADF; - - file = fget(fd); - if (file == NULL) { - DPRINT(("[%d] invalid fd %d\n", current->pid, fd)); - goto error_args; - } - if (PFM_IS_FILE(file) == 0) { - DPRINT(("[%d] fd %d not related to perfmon\n", current->pid, fd)); - goto error_args; - } + ret = -EBADF; + file = fget(fd); + if (unlikely(file == NULL)) { + DPRINT(("[%d] invalid fd %d\n", current->pid, fd)); + goto error_args; + } + if (unlikely(PFM_IS_FILE(file) == 0)) { + DPRINT(("[%d] fd %d not related to perfmon\n", current->pid, fd)); + goto error_args; + } - ctx = (pfm_context_t *)file->private_data; - if (ctx == NULL) { - DPRINT(("[%d] no context for fd %d\n", current->pid, fd)); - goto error_args; - } + ctx = (pfm_context_t *)file->private_data; + if (unlikely(ctx == NULL)) { + DPRINT(("[%d] no context for fd %d\n", current->pid, fd)); + goto error_args; + } + prefetch(&ctx->ctx_state); - PROTECT_CTX(ctx, flags); + PROTECT_CTX(ctx, flags); - /* - * check task is stopped - */ - ret = pfm_check_task_state(ctx, cmd, flags); - if (ret) goto abort_locked; - } + /* + * check task is stopped + */ + ret = pfm_check_task_state(ctx, cmd, flags); + if (unlikely(ret)) goto abort_locked; - ret = (*pfm_cmd_tab[PFM_CMD_IDX(cmd)].cmd_func)(ctx, args_k, count, regs); +skip_fd: + ret = (*func)(ctx, args_k, count, regs); call_made = 1; abort_locked: - if (ctx) { + if (likely(ctx)) { DPRINT(("[%d] context unlocked\n", current->pid)); UNPROTECT_CTX(ctx, flags); fput(file); @@ -4907,7 +4893,7 @@ if (CTX_HAS_SMPL(ctx)) { rst_ctrl.bits.mask_monitoring = 0; - rst_ctrl.bits.reset_ovfl_pmds = 1; + rst_ctrl.bits.reset_ovfl_pmds = 0; if (state == PFM_CTX_LOADED) ret = pfm_buf_fmt_restart_active(fmt, current, &rst_ctrl, ctx->ctx_smpl_hdr, regs); @@ -5096,7 +5082,7 @@ msg->pfm_ovfl_msg.msg_ovfl_pmds[1] = 0UL; msg->pfm_ovfl_msg.msg_ovfl_pmds[2] = 0UL; msg->pfm_ovfl_msg.msg_ovfl_pmds[3] = 0UL; - msg->pfm_ovfl_msg.msg_tstamp = ia64_get_itc(); /* relevant on UP only */ + msg->pfm_ovfl_msg.msg_tstamp = 0UL; } DPRINT(("ovfl msg: msg=%p no_msg=%d fd=%d pid=%d ovfl_pmds=0x%lx\n", @@ -5119,10 +5105,12 @@ printk(KERN_ERR "perfmon: pfm_end_notify_user no more notification msgs\n"); return -1; } + /* no leak */ + memset(msg, 0, sizeof(*msg)); msg->pfm_end_msg.msg_type = PFM_MSG_END; msg->pfm_end_msg.msg_ctx_fd = ctx->ctx_fd; - msg->pfm_ovfl_msg.msg_tstamp = ia64_get_itc(); /* relevant on UP only */ + msg->pfm_ovfl_msg.msg_tstamp = 0UL; DPRINT(("end msg: msg=%p no_msg=%d ctx_fd=%d pid=%d\n", msg, @@ -5141,8 +5129,8 @@ { pfm_ovfl_arg_t ovfl_arg; unsigned long mask; - unsigned long old_val, ovfl_val; - unsigned long ovfl_notify = 0UL, ovfl_pmds = 0UL, smpl_pmds = 0UL; + unsigned long old_val, ovfl_val, new_val; + unsigned long ovfl_notify = 0UL, ovfl_pmds = 0UL, smpl_pmds = 0UL, reset_pmds; unsigned long tstamp; pfm_ovfl_ctrl_t ovfl_ctrl; unsigned int i, has_smpl; @@ -5155,21 +5143,19 @@ */ if (unlikely((pmc0 & 0x1) == 0)) goto sanity_check; - tstamp = ia64_get_itc(); - + tstamp = ia64_get_itc(); mask = pmc0 >> PMU_FIRST_COUNTER; ovfl_val = pmu_conf.ovfl_val; + has_smpl = CTX_HAS_SMPL(ctx); DPRINT_ovfl(("pmc0=0x%lx pid=%d iip=0x%lx, %s " - "used_pmds=0x%lx reload_pmcs=0x%lx\n", + "used_pmds=0x%lx\n", pmc0, task ? task->pid: -1, (regs ? regs->cr_iip : 0), CTX_OVFL_NOBLOCK(ctx) ? "nonblocking" : "blocking", - ctx->ctx_used_pmds[0], - ctx->ctx_reload_pmcs[0])); + ctx->ctx_used_pmds[0])); - has_smpl = CTX_HAS_SMPL(ctx); /* * first we update the virtual counters @@ -5180,29 +5166,31 @@ /* skip pmd which did not overflow */ if ((mask & 0x1) == 0) continue; - DPRINT_ovfl(("pmd[%d] overflowed hw_pmd=0x%lx ctx_pmd=0x%lx\n", - i, ia64_get_pmd(i), ctx->ctx_pmds[i].val)); - /* * Note that the pmd is not necessarily 0 at this point as qualified events * may have happened before the PMU was frozen. The residual count is not * taken into consideration here but will be with any read of the pmd via * pfm_read_pmds(). */ - old_val = ctx->ctx_pmds[i].val; - ctx->ctx_pmds[i].val += 1 + ovfl_val; + old_val = new_val = ctx->ctx_pmds[i].val; + new_val += 1 + ovfl_val; + ctx->ctx_pmds[i].val = new_val; /* * check for overflow condition */ - if (likely(old_val > ctx->ctx_pmds[i].val)) { + if (likely(old_val > new_val)) { ovfl_pmds |= 1UL << i; if (PMC_OVFL_NOTIFY(ctx, i)) ovfl_notify |= 1UL << i; } - DPRINT_ovfl(("ctx_pmd[%d].val=0x%lx old_val=0x%lx pmd=0x%lx ovfl_pmds=0x%lx ovfl_notify=0x%lx smpl_pmds=0x%lx\n", - i, ctx->ctx_pmds[i].val, old_val, - ia64_get_pmd(i) & ovfl_val, ovfl_pmds, ovfl_notify, smpl_pmds)); + DPRINT_ovfl(("ctx_pmd[%d].val=0x%lx old_val=0x%lx pmd=0x%lx ovfl_pmds=0x%lx ovfl_notify=0x%lx\n", + i, + new_val, + old_val, + ia64_get_pmd(i) & ovfl_val, + ovfl_pmds, + ovfl_notify)); } /* @@ -5214,6 +5202,7 @@ * reset all control bits */ ovfl_ctrl.val = 0; + reset_pmds = 0UL; /* * if a sampling format module exists, then we "cache" the overflow by @@ -5225,7 +5214,7 @@ int j, k, ret = 0; int this_cpu = smp_processor_id(); - pmd_mask = ovfl_pmds >> PMU_FIRST_COUNTER; + pmd_mask = ovfl_pmds >> PMU_FIRST_COUNTER; prefetch(ctx->ctx_smpl_hdr); @@ -5275,7 +5264,10 @@ ovfl_ctrl.bits.notify_user |= ovfl_arg.ovfl_ctrl.bits.notify_user; ovfl_ctrl.bits.block_task |= ovfl_arg.ovfl_ctrl.bits.block_task; ovfl_ctrl.bits.mask_monitoring |= ovfl_arg.ovfl_ctrl.bits.mask_monitoring; - ovfl_ctrl.bits.reset_ovfl_pmds |= ovfl_arg.ovfl_ctrl.bits.reset_ovfl_pmds; /* yes or no */ + /* + * build the bitmask of pmds to reset now + */ + if (ovfl_arg.ovfl_ctrl.bits.reset_ovfl_pmds) reset_pmds |= mask; pfm_stats[this_cpu].pfm_smpl_handler_cycles += end_cycles - start_cycles; } @@ -5287,6 +5279,10 @@ current->pid, pmd_mask<pid, + ovfl_pmds, + reset_pmds)); /* - * if we (still) have some overflowed PMD but no notification is requested - * then we use the short reset period. + * reset the requested PMD registers using the short reset values */ - if (ovfl_ctrl.bits.reset_ovfl_pmds) { - unsigned long bm = ovfl_pmds; + if (reset_pmds) { + unsigned long bm = reset_pmds; pfm_reset_regs(ctx, &bm, PFM_PMD_SHORT_RESET); } diff -Nru a/arch/ia64/kernel/perfmon_default_smpl.c b/arch/ia64/kernel/perfmon_default_smpl.c --- a/arch/ia64/kernel/perfmon_default_smpl.c Tue Mar 2 17:37:09 2004 +++ b/arch/ia64/kernel/perfmon_default_smpl.c Tue Mar 2 17:37:09 2004 @@ -178,6 +178,7 @@ ent->tstamp = stamp; ent->cpu = smp_processor_id(); ent->set = arg->active_set; + ent->tgid = current->tgid; /* * selectively store PMDs in increasing index number diff -Nru a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c --- a/arch/ia64/kernel/process.c Tue Mar 2 17:37:08 2004 +++ b/arch/ia64/kernel/process.c Tue Mar 2 17:37:08 2004 @@ -259,10 +259,12 @@ * * We get here through the following call chain: * - * - * sys_clone - * do_fork - * copy_thread + * from user-level: from kernel: + * + * + * sys_clone : + * do_fork do_fork + * copy_thread copy_thread * * This means that the stack layout is as follows: * @@ -276,9 +278,6 @@ * | | <-- sp (lowest addr) * +---------------------+ * - * Note: if we get called through kernel_thread() then the memory above "(highest addr)" - * is valid kernel stack memory that needs to be copied as well. - * * Observe that we copy the unat values that are in pt_regs and switch_stack. Spilling an * integer to address X causes bit N in ar.unat to be set to the NaT bit of the register, * with N=(X & 0x1ff)/8. Thus, copying the unat value preserves the NaT bits ONLY if the @@ -291,9 +290,9 @@ unsigned long user_stack_base, unsigned long user_stack_size, struct task_struct *p, struct pt_regs *regs) { - unsigned long rbs, child_rbs, rbs_size, stack_offset, stack_top, stack_used; - struct switch_stack *child_stack, *stack; extern char ia64_ret_from_clone, ia32_ret_from_clone; + struct switch_stack *child_stack, *stack; + unsigned long rbs, child_rbs, rbs_size; struct pt_regs *child_ptregs; int retval = 0; @@ -306,16 +305,13 @@ return 0; #endif - stack_top = (unsigned long) current + IA64_STK_OFFSET; stack = ((struct switch_stack *) regs) - 1; - stack_used = stack_top - (unsigned long) stack; - stack_offset = IA64_STK_OFFSET - stack_used; - child_stack = (struct switch_stack *) ((unsigned long) p + stack_offset); - child_ptregs = (struct pt_regs *) (child_stack + 1); + child_ptregs = (struct pt_regs *) ((unsigned long) p + IA64_STK_OFFSET) - 1; + child_stack = (struct switch_stack *) child_ptregs - 1; /* copy parent's switch_stack & pt_regs to child: */ - memcpy(child_stack, stack, stack_used); + memcpy(child_stack, stack, sizeof(*child_ptregs) + sizeof(*child_stack)); rbs = (unsigned long) current + IA64_RBS_OFFSET; child_rbs = (unsigned long) p + IA64_RBS_OFFSET; @@ -324,7 +320,7 @@ /* copy the parent's register backing store to the child: */ memcpy((void *) child_rbs, (void *) rbs, rbs_size); - if (user_mode(child_ptregs)) { + if (likely(user_mode(child_ptregs))) { if ((clone_flags & CLONE_SETTLS) && !IS_IA32_PROCESS(regs)) child_ptregs->r13 = regs->r16; /* see sys_clone2() in entry.S */ if (user_stack_base) { @@ -341,14 +337,14 @@ * been taken care of by the caller of sys_clone() * already. */ - child_ptregs->r12 = (unsigned long) (child_ptregs + 1); /* kernel sp */ + child_ptregs->r12 = (unsigned long) child_ptregs - 16; /* kernel sp */ child_ptregs->r13 = (unsigned long) p; /* set `current' pointer */ } + child_stack->ar_bspstore = child_rbs + rbs_size; if (IS_IA32_PROCESS(regs)) child_stack->b0 = (unsigned long) &ia32_ret_from_clone; else child_stack->b0 = (unsigned long) &ia64_ret_from_clone; - child_stack->ar_bspstore = child_rbs + rbs_size; /* copy parts of thread_struct: */ p->thread.ksp = (unsigned long) child_stack - 16; @@ -358,8 +354,8 @@ * therefore we must specify them explicitly here and not include them in * IA64_PSR_BITS_TO_CLEAR. */ - child_ptregs->cr_ipsr = ((child_ptregs->cr_ipsr | IA64_PSR_BITS_TO_SET) - & ~(IA64_PSR_BITS_TO_CLEAR | IA64_PSR_PP | IA64_PSR_UP)); + child_ptregs->cr_ipsr = ((child_ptregs->cr_ipsr | IA64_PSR_BITS_TO_SET) + & ~(IA64_PSR_BITS_TO_CLEAR | IA64_PSR_PP | IA64_PSR_UP)); /* * NOTE: The calling convention considers all floating point @@ -578,27 +574,43 @@ pid_t kernel_thread (int (*fn)(void *), void *arg, unsigned long flags) { - struct task_struct *parent = current; - int result; - pid_t tid; + extern void ia64_invoke_kernel_thread_helper (void); + unsigned long *helper_fptr = (unsigned long *) &ia64_invoke_kernel_thread_helper; + struct { + struct switch_stack sw; + struct pt_regs pt; + } regs; + + memset(®s, 0, sizeof(regs)); + regs.pt.cr_iip = helper_fptr[0]; /* set entry point (IP) */ + regs.pt.r1 = helper_fptr[1]; /* set GP */ + regs.pt.r9 = (unsigned long) fn; /* 1st argument */ + regs.pt.r11 = (unsigned long) arg; /* 2nd argument */ + /* Preserve PSR bits, except for bits 32-34 and 37-45, which we can't read. */ + regs.pt.cr_ipsr = ia64_getreg(_IA64_REG_PSR) | IA64_PSR_BN; + regs.pt.cr_ifs = 1UL << 63; /* mark as valid, empty frame */ + regs.sw.ar_fpsr = regs.pt.ar_fpsr = ia64_getreg(_IA64_REG_AR_FPSR); + regs.sw.ar_bspstore = (unsigned long) current + IA64_RBS_OFFSET; + + return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, ®s.pt, 0, NULL, NULL); +} +EXPORT_SYMBOL(kernel_thread); - tid = clone(flags | CLONE_VM | CLONE_UNTRACED, 0); - if (parent != current) { +/* This gets called from kernel_thread() via ia64_invoke_thread_helper(). */ +int +kernel_thread_helper (int (*fn)(void *), void *arg) +{ #ifdef CONFIG_IA32_SUPPORT - if (IS_IA32_PROCESS(ia64_task_regs(current))) { - /* A kernel thread is always a 64-bit process. */ - current->thread.map_base = DEFAULT_MAP_BASE; - current->thread.task_size = DEFAULT_TASK_SIZE; - ia64_set_kr(IA64_KR_IO_BASE, current->thread.old_iob); - ia64_set_kr(IA64_KR_TSSD, current->thread.old_k1); - } -#endif - result = (*fn)(arg); - _exit(result); + if (IS_IA32_PROCESS(ia64_task_regs(current))) { + /* A kernel thread is always a 64-bit process. */ + current->thread.map_base = DEFAULT_MAP_BASE; + current->thread.task_size = DEFAULT_TASK_SIZE; + ia64_set_kr(IA64_KR_IO_BASE, current->thread.old_iob); + ia64_set_kr(IA64_KR_TSSD, current->thread.old_k1); } - return tid; +#endif + return (*fn)(arg); } -EXPORT_SYMBOL(kernel_thread); /* * Flush thread state. This is called when a thread does an execve(). diff -Nru a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c --- a/arch/ia64/mm/hugetlbpage.c Tue Mar 2 17:37:08 2004 +++ b/arch/ia64/mm/hugetlbpage.c Tue Mar 2 17:37:08 2004 @@ -1,7 +1,11 @@ /* * IA-64 Huge TLB Page Support for Kernel. * - * Copyright (C) 2002, Rohit Seth + * Copyright (C) 2002-2004 Rohit Seth + * Copyright (C) 2003-2004 Ken Chen + * + * Sep, 2003: add numa support + * Feb, 2004: dynamic hugetlb page size via boot parameter */ #include @@ -18,11 +22,10 @@ #include #include -#define TASK_HPAGE_BASE (REGION_HPAGE << REGION_SHIFT) - static long htlbpagemem; int htlbpage_max; static long htlbzone_pages; +unsigned int hpage_shift=HPAGE_SHIFT_DEFAULT; static struct list_head hugepage_freelists[MAX_NUMNODES]; static spinlock_t htlbpage_lock = SPIN_LOCK_UNLOCKED; @@ -407,7 +410,7 @@ return -EINVAL; /* This code assumes that REGION_HPAGE != 0. */ if ((REGION_NUMBER(addr) != REGION_HPAGE) || (addr & (HPAGE_SIZE - 1))) - addr = TASK_HPAGE_BASE; + addr = HPAGE_REGION_BASE; else addr = ALIGN(addr, HPAGE_SIZE); for (vmm = find_vma(current->mm, addr); ; vmm = vmm->vm_next) { @@ -520,6 +523,35 @@ } __setup("hugepages=", hugetlb_setup); +static int __init hugetlb_setup_sz(char *str) +{ + u64 tr_pages; + unsigned long long size; + + if (ia64_pal_vm_page_size(&tr_pages, NULL) != 0) + /* + * shouldn't happen, but just in case. + */ + tr_pages = 0x15557000UL; + + size = memparse(str, &str); + if (*str || (size & (size-1)) || !(tr_pages & size) || + size <= PAGE_SIZE || + size >= (1UL << PAGE_SHIFT << MAX_ORDER)) { + printk(KERN_WARNING "Invalid huge page size specified\n"); + return 1; + } + + hpage_shift = __ffs(size); + /* + * boot cpu already executed ia64_mmu_init, and has HPAGE_SHIFT_DEFAULT + * override here with new page shift. + */ + ia64_set_rr(HPAGE_REGION_BASE, hpage_shift << 2); + return 1; +} +__setup("hugepagesz=", hugetlb_setup_sz); + static int __init hugetlb_init(void) { int i; @@ -540,7 +572,7 @@ printk("Total HugeTLB memory allocated, %ld\n", htlbpagemem); return 0; } -module_init(hugetlb_init); +__initcall(hugetlb_init); int hugetlb_report_meminfo(char *buf) { diff -Nru a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c --- a/arch/ia64/mm/init.c Tue Mar 2 17:37:08 2004 +++ b/arch/ia64/mm/init.c Tue Mar 2 17:37:08 2004 @@ -342,6 +342,10 @@ ia64_tlb_init(); +#ifdef CONFIG_HUGETLB_PAGE + ia64_set_rr(HPAGE_REGION_BASE, HPAGE_SHIFT << 2); +#endif + #ifdef CONFIG_IA64_MCA cpu = smp_processor_id(); diff -Nru a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c --- a/arch/m68k/amiga/amiints.c Tue Mar 2 17:37:09 2004 +++ b/arch/m68k/amiga/amiints.c Tue Mar 2 17:37:09 2004 @@ -49,7 +49,6 @@ #include #include #include -#include extern int cia_request_irq(struct ciabase *base,int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), diff -Nru a/arch/m68k/bvme6000/bvmeints.c b/arch/m68k/bvme6000/bvmeints.c --- a/arch/m68k/bvme6000/bvmeints.c Tue Mar 2 17:37:07 2004 +++ b/arch/m68k/bvme6000/bvmeints.c Tue Mar 2 17:37:07 2004 @@ -20,7 +20,6 @@ #include #include #include -#include static irqreturn_t bvme6000_defhand (int irq, void *dev_id, struct pt_regs *fp); diff -Nru a/arch/m68k/hp300/time.c b/arch/m68k/hp300/time.c --- a/arch/m68k/hp300/time.c Tue Mar 2 17:37:09 2004 +++ b/arch/m68k/hp300/time.c Tue Mar 2 17:37:09 2004 @@ -17,7 +17,6 @@ #include #include #include -#include #include "ints.h" /* Clock hardware definitions */ diff -Nru a/arch/m68k/kernel/setup.c b/arch/m68k/kernel/setup.c --- a/arch/m68k/kernel/setup.c Tue Mar 2 17:37:09 2004 +++ b/arch/m68k/kernel/setup.c Tue Mar 2 17:37:09 2004 @@ -39,7 +39,6 @@ #endif #ifdef CONFIG_SUN3X #include -extern void sun_serial_setup(void); #endif unsigned long m68k_machtype; diff -Nru a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c --- a/arch/m68k/mac/iop.c Tue Mar 2 17:37:09 2004 +++ b/arch/m68k/mac/iop.c Tue Mar 2 17:37:09 2004 @@ -118,7 +118,6 @@ #include #include #include -#include /*#define DEBUG_IOP*/ diff -Nru a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c --- a/arch/m68k/mac/macints.c Tue Mar 2 17:37:09 2004 +++ b/arch/m68k/mac/macints.c Tue Mar 2 17:37:09 2004 @@ -133,7 +133,6 @@ #include #include #include -#include #define DEBUG_SPURIOUS #define SHUTUP_SONIC diff -Nru a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c --- a/arch/m68k/mac/oss.c Tue Mar 2 17:37:08 2004 +++ b/arch/m68k/mac/oss.c Tue Mar 2 17:37:08 2004 @@ -26,7 +26,6 @@ #include #include #include -#include int oss_present; volatile struct mac_oss *oss; diff -Nru a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c --- a/arch/m68k/mac/psc.c Tue Mar 2 17:37:08 2004 +++ b/arch/m68k/mac/psc.c Tue Mar 2 17:37:08 2004 @@ -24,7 +24,6 @@ #include #include #include -#include #define DEBUG_PSC diff -Nru a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c --- a/arch/m68k/mac/via.c Tue Mar 2 17:37:08 2004 +++ b/arch/m68k/mac/via.c Tue Mar 2 17:37:08 2004 @@ -32,7 +32,6 @@ #include #include #include -#include volatile __u8 *via1, *via2; #if 0 diff -Nru a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c --- a/arch/m68k/q40/q40ints.c Tue Mar 2 17:37:09 2004 +++ b/arch/m68k/q40/q40ints.c Tue Mar 2 17:37:09 2004 @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff -Nru a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c --- a/arch/m68k/sun3/sun3ints.c Tue Mar 2 17:37:09 2004 +++ b/arch/m68k/sun3/sun3ints.c Tue Mar 2 17:37:09 2004 @@ -15,7 +15,6 @@ #include #include #include -#include #include extern void sun3_leds (unsigned char); diff -Nru a/arch/mips/au1000/csb250/Makefile b/arch/mips/au1000/csb250/Makefile --- a/arch/mips/au1000/csb250/Makefile Tue Mar 2 17:37:08 2004 +++ b/arch/mips/au1000/csb250/Makefile Tue Mar 2 17:37:08 2004 @@ -4,10 +4,6 @@ # # Makefile for the Cogent CSB250 Au1500 board. Copied from Pb1500. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# USE_STANDARD_AS_RULE := true diff -Nru a/arch/mips/au1000/hydrogen3/Makefile b/arch/mips/au1000/hydrogen3/Makefile --- a/arch/mips/au1000/hydrogen3/Makefile Tue Mar 2 17:37:09 2004 +++ b/arch/mips/au1000/hydrogen3/Makefile Tue Mar 2 17:37:09 2004 @@ -5,10 +5,6 @@ # # Makefile for the Alchemy Semiconductor PB1000 board. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# .S.s: $(CPP) $(CFLAGS) $< -o $*.s diff -Nru a/arch/mips/au1000/mtx-1/Makefile b/arch/mips/au1000/mtx-1/Makefile --- a/arch/mips/au1000/mtx-1/Makefile Tue Mar 2 17:37:08 2004 +++ b/arch/mips/au1000/mtx-1/Makefile Tue Mar 2 17:37:08 2004 @@ -6,9 +6,5 @@ # # Makefile for 4G Systems MTX-1 board. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# lib-y := init.o board_setup.o irqmap.o diff -Nru a/arch/mips/au1000/pb1550/Makefile b/arch/mips/au1000/pb1550/Makefile --- a/arch/mips/au1000/pb1550/Makefile Tue Mar 2 17:37:08 2004 +++ b/arch/mips/au1000/pb1550/Makefile Tue Mar 2 17:37:08 2004 @@ -5,10 +5,6 @@ # # Makefile for the Alchemy Semiconductor PB1000 board. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# .S.s: $(CPP) $(CFLAGS) $< -o $*.s diff -Nru a/arch/mips/au1000/xxs1500/Makefile b/arch/mips/au1000/xxs1500/Makefile --- a/arch/mips/au1000/xxs1500/Makefile Tue Mar 2 17:37:07 2004 +++ b/arch/mips/au1000/xxs1500/Makefile Tue Mar 2 17:37:07 2004 @@ -5,9 +5,5 @@ # # Makefile for MyCable XXS1500 board. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# lib-y := init.o board_setup.o irqmap.o diff -Nru a/arch/mips/kernel/gdb-stub.c b/arch/mips/kernel/gdb-stub.c --- a/arch/mips/kernel/gdb-stub.c Tue Mar 2 17:37:09 2004 +++ b/arch/mips/kernel/gdb-stub.c Tue Mar 2 17:37:09 2004 @@ -95,7 +95,7 @@ * Example: * $ cd ~/linux * $ make menuconfig - * $ make dep; make vmlinux + * $ make * * Step 3: * Download the kernel to the remote target and start diff -Nru a/arch/mips/momentum/jaguar_atx/Makefile b/arch/mips/momentum/jaguar_atx/Makefile --- a/arch/mips/momentum/jaguar_atx/Makefile Tue Mar 2 17:37:09 2004 +++ b/arch/mips/momentum/jaguar_atx/Makefile Tue Mar 2 17:37:09 2004 @@ -1,10 +1,6 @@ # # Makefile for Momentum Computer's Jaguar-ATX board. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y += mv-irq.o int-handler.o irq.o pci-irq.o prom.o reset.o setup.o obj-$(CONFIG_PCI) += pci.o diff -Nru a/arch/mips/tx4927/common/Makefile b/arch/mips/tx4927/common/Makefile --- a/arch/mips/tx4927/common/Makefile Tue Mar 2 17:37:07 2004 +++ b/arch/mips/tx4927/common/Makefile Tue Mar 2 17:37:07 2004 @@ -1,10 +1,6 @@ # # Makefile for common code for Toshiba TX4927 based systems # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := tx4927_prom.o obj-y += tx4927_setup.o diff -Nru a/arch/ppc64/configs/g5_defconfig b/arch/ppc64/configs/g5_defconfig --- a/arch/ppc64/configs/g5_defconfig Tue Mar 2 17:37:07 2004 +++ b/arch/ppc64/configs/g5_defconfig Tue Mar 2 17:37:07 2004 @@ -26,6 +26,7 @@ # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y CONFIG_LOG_BUF_SHIFT=17 +CONFIG_HOTPLUG=y # CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y @@ -56,15 +57,16 @@ CONFIG_PPC_OF=y CONFIG_ALTIVEC=y CONFIG_PPC_PMAC=y +# CONFIG_PMAC_DART is not set CONFIG_PPC_PMAC64=y CONFIG_BOOTX_TEXT=y CONFIG_POWER4_ONLY=y +# CONFIG_IOMMU_VMERGE is not set CONFIG_SMP=y CONFIG_IRQ_ALL_CPUS=y CONFIG_NR_CPUS=2 # CONFIG_HMT is not set -CONFIG_DISCONTIGMEM=y -# CONFIG_NUMA is not set +# CONFIG_DISCONTIGMEM is not set # CONFIG_PPC_RTAS is not set # CONFIG_LPARCFG is not set @@ -77,7 +79,6 @@ # CONFIG_BINFMT_MISC is not set CONFIG_PCI_LEGACY_PROC=y CONFIG_PCI_NAMES=y -CONFIG_HOTPLUG=y # # PCMCIA/CardBus support @@ -128,6 +129,7 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_BLK_DEV_INITRD=y +# CONFIG_DCSSBLK is not set # # ATA/ATAPI/MFM/RLL support @@ -277,6 +279,7 @@ # CONFIG_MD_MULTIPATH is not set CONFIG_BLK_DEV_DM=y CONFIG_DM_IOCTL_V4=y +# CONFIG_DM_CRYPT is not set # # Fusion MPT device support @@ -284,7 +287,7 @@ # CONFIG_FUSION is not set # -# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# IEEE 1394 (FireWire) support # CONFIG_IEEE1394=y @@ -318,11 +321,11 @@ # # Macintosh device drivers # +CONFIG_ADB=y CONFIG_ADB_PMU=y # CONFIG_PMAC_PBOOK is not set # CONFIG_PMAC_BACKLIGHT is not set # CONFIG_MAC_SERIAL is not set -CONFIG_ADB=y # CONFIG_INPUT_ADBHID is not set CONFIG_THERM_PM72=y @@ -439,6 +442,7 @@ # CONFIG_IXGB is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set +# CONFIG_IBMVETH is not set CONFIG_PPP=m # CONFIG_PPP_MULTILINK is not set # CONFIG_PPP_FILTER is not set @@ -488,7 +492,7 @@ # # ISDN subsystem # -# CONFIG_ISDN_BOOL is not set +# CONFIG_ISDN is not set # # Telephony Support @@ -556,7 +560,8 @@ # # CONFIG_SERIAL_PMACZILOG is not set CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 CONFIG_HVC_CONSOLE=y # @@ -676,6 +681,7 @@ # CONFIG_FB_RADEON_OLD is not set CONFIG_FB_RADEON=y CONFIG_FB_RADEON_I2C=y +# CONFIG_FB_RADEON_DEBUG is not set # CONFIG_FB_ATY128 is not set # CONFIG_FB_ATY is not set # CONFIG_FB_SIS is not set @@ -919,7 +925,6 @@ CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y # CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y CONFIG_DEVPTS_FS_XATTR=y # CONFIG_DEVPTS_FS_SECURITY is not set CONFIG_TMPFS=y @@ -933,6 +938,7 @@ # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set @@ -964,7 +970,6 @@ CONFIG_CIFS=m # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # @@ -1037,9 +1042,11 @@ # Kernel hacking # CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_STACKOVERFLOW is not set +# CONFIG_DEBUG_STACK_USAGE is not set # CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y -# CONFIG_XMON is not set +# CONFIG_DEBUGGER is not set # CONFIG_PPCDBG is not set # CONFIG_DEBUG_INFO is not set diff -Nru a/arch/ppc64/kernel/pSeries_htab.c b/arch/ppc64/kernel/pSeries_htab.c --- a/arch/ppc64/kernel/pSeries_htab.c Tue Mar 2 17:37:08 2004 +++ b/arch/ppc64/kernel/pSeries_htab.c Tue Mar 2 17:37:08 2004 @@ -103,7 +103,7 @@ __asm__ __volatile__ ("ptesync" : : : "memory"); - return i; + return i | (secondary << 3); } static long pSeries_hpte_remove(unsigned long hpte_group) diff -Nru a/arch/ppc64/kernel/pSeries_lpar.c b/arch/ppc64/kernel/pSeries_lpar.c --- a/arch/ppc64/kernel/pSeries_lpar.c Tue Mar 2 17:37:09 2004 +++ b/arch/ppc64/kernel/pSeries_lpar.c Tue Mar 2 17:37:09 2004 @@ -379,7 +379,10 @@ if (lpar_rc != H_Success) return -2; - return slot; + /* Because of iSeries, we have to pass down the secondary + * bucket bit here as well + */ + return (slot & 7) | (secondary << 3); } static spinlock_t pSeries_lpar_tlbie_lock = SPIN_LOCK_UNLOCKED; diff -Nru a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c --- a/arch/ppc64/kernel/prom.c Tue Mar 2 17:37:08 2004 +++ b/arch/ppc64/kernel/prom.c Tue Mar 2 17:37:08 2004 @@ -516,6 +516,9 @@ return mem; } +#ifdef CONFIG_PMAC_DART +static int dart_force_on; +#endif static unsigned long __init prom_initialize_lmb(unsigned long mem) @@ -539,10 +542,12 @@ prom_print(opt); prom_print(RELOC("\n")); opt += 6; - while(*opt && *opt == ' ') + while (*opt && *opt == ' ') opt++; if (!strncmp(opt, RELOC("off"), 3)) nodart = 1; + else if (!strncmp(opt, RELOC("force"), 5)) + RELOC(dart_force_on) = 1; } #else nodart = 1; @@ -763,8 +768,10 @@ extern unsigned long dart_tablebase; extern unsigned long dart_tablesize; - /* Only reserve DART space if machine has more than 2Gb of RAM */ - if (lmb_end_of_DRAM() <= 0x80000000ull) + /* Only reserve DART space if machine has more than 2GB of RAM + * or if requested with iommu=on on cmdline. + */ + if (lmb_end_of_DRAM() <= 0x80000000ull && !RELOC(dart_force_on)) return; /* 512 pages is max DART tablesize. */ diff -Nru a/arch/ppc64/kernel/vio.c b/arch/ppc64/kernel/vio.c --- a/arch/ppc64/kernel/vio.c Tue Mar 2 17:37:08 2004 +++ b/arch/ppc64/kernel/vio.c Tue Mar 2 17:37:08 2004 @@ -29,6 +29,8 @@ #define DBGENTER() pr_debug("%s entered\n", __FUNCTION__) +extern struct subsystem devices_subsys; /* needed for vio_find_name() */ + struct iommu_table *vio_build_iommu_table(struct vio_dev *dev); static int vio_num_address_cells; @@ -157,8 +159,7 @@ node_vroot = find_devices("vdevice"); if ((node_vroot == NULL) || (node_vroot->child == NULL)) { - printk(KERN_INFO "VIO: missing or empty /vdevice node; no virtual IO" - " devices present.\n"); + /* this machine doesn't do virtual IO, and that's ok */ return 0; } @@ -260,7 +261,7 @@ /* init generic 'struct device' fields: */ viodev->dev.parent = &vio_bus_device->dev; viodev->dev.bus = &vio_bus_type; - snprintf(viodev->dev.bus_id, BUS_ID_SIZE, "%lx", viodev->unit_address); + snprintf(viodev->dev.bus_id, BUS_ID_SIZE, "%x", viodev->unit_address); viodev->dev.release = vio_dev_release; /* register with generic device framework */ @@ -298,6 +299,42 @@ return get_property((struct device_node *)vdev->archdata, (char*)which, length); } EXPORT_SYMBOL(vio_get_attribute); + +/* vio_find_name() - internal because only vio.c knows how we formatted the + * kobject name + * XXX once vio_bus_type.devices is actually used as a kset in + * drivers/base/bus.c, this function should be removed in favor of + * "device_find(kobj_name, &vio_bus_type)" + */ +static struct vio_dev *vio_find_name(const char *kobj_name) +{ + struct kobject *found; + + found = kset_find_obj(&devices_subsys.kset, kobj_name); + if (!found) + return NULL; + + return to_vio_dev(container_of(found, struct device, kobj)); +} + +/** + * vio_find_node - find an already-registered vio_dev + * @vnode: device_node of the virtual device we're looking for + */ +struct vio_dev *vio_find_node(struct device_node *vnode) +{ + uint32_t *unit_address; + char kobj_name[BUS_ID_SIZE]; + + /* construct the kobject name from the device node */ + unit_address = (uint32_t *)get_property(vnode, "reg", NULL); + if (!unit_address) + return NULL; + snprintf(kobj_name, BUS_ID_SIZE, "%x", *unit_address); + + return vio_find_name(kobj_name); +} +EXPORT_SYMBOL(vio_find_node); /** * vio_build_iommu_table: - gets the dma information from OF and builds the TCE tree. diff -Nru a/arch/ppc64/mm/hash_low.S b/arch/ppc64/mm/hash_low.S --- a/arch/ppc64/mm/hash_low.S Tue Mar 2 17:37:09 2004 +++ b/arch/ppc64/mm/hash_low.S Tue Mar 2 17:37:09 2004 @@ -176,7 +176,6 @@ beq- htab_pte_insert_failure /* Now try secondary slot */ - ori r30,r30,_PAGE_SECONDARY /* page number in r5 */ rldicl r5,r31,64-PTE_SHIFT,PTE_SHIFT @@ -215,8 +214,8 @@ b htab_insert_pte htab_pte_insert_ok: - /* Insert slot number in PTE */ - rldimi r30,r3,12,63-14 + /* Insert slot number & secondary bit in PTE */ + rldimi r30,r3,12,63-15 /* Write out the PTE with a normal write * (maybe add eieio may be good still ?) diff -Nru a/arch/ppc64/mm/numa.c b/arch/ppc64/mm/numa.c --- a/arch/ppc64/mm/numa.c Tue Mar 2 17:37:08 2004 +++ b/arch/ppc64/mm/numa.c Tue Mar 2 17:37:08 2004 @@ -33,7 +33,10 @@ static unsigned long node0_io_hole_size; EXPORT_SYMBOL(node_data); +EXPORT_SYMBOL(numa_cpu_lookup_table); EXPORT_SYMBOL(numa_memory_lookup_table); +EXPORT_SYMBOL(numa_cpumask_lookup_table); +EXPORT_SYMBOL(nr_cpus_in_node); static inline void map_cpu_to_node(int cpu, int node) { diff -Nru a/arch/s390/kernel/compat_ioctl.c b/arch/s390/kernel/compat_ioctl.c --- a/arch/s390/kernel/compat_ioctl.c Tue Mar 2 17:37:08 2004 +++ b/arch/s390/kernel/compat_ioctl.c Tue Mar 2 17:37:08 2004 @@ -49,7 +49,16 @@ COMPATIBLE_IOCTL(BIODASDRLSE) COMPATIBLE_IOCTL(BIODASDSLCK) COMPATIBLE_IOCTL(BIODASDINFO) +COMPATIBLE_IOCTL(BIODASDINFO2) COMPATIBLE_IOCTL(BIODASDFMT) +COMPATIBLE_IOCTL(BIODASDPRRST) +COMPATIBLE_IOCTL(BIODASDQUIESCE) +COMPATIBLE_IOCTL(BIODASDRESUME) +COMPATIBLE_IOCTL(BIODASDPRRD) +COMPATIBLE_IOCTL(BIODASDPSRD) +COMPATIBLE_IOCTL(BIODASDGATTR) +COMPATIBLE_IOCTL(BIODASDSATTR) + #endif #if defined(CONFIG_S390_TAPE) || defined(CONFIG_S390_TAPE_MODULE) diff -Nru a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c --- a/arch/s390/kernel/compat_linux.c Tue Mar 2 17:37:09 2004 +++ b/arch/s390/kernel/compat_linux.c Tue Mar 2 17:37:09 2004 @@ -1161,8 +1161,7 @@ put_user(reclen, &dirent->d_reclen); copy_to_user(dirent->d_name, name, namlen); put_user(0, dirent->d_name + namlen); - ((char *) dirent) += reclen; - buf->current_dir = dirent; + buf->current_dir = ((void *)dirent) + reclen; buf->count -= reclen; return 0; } diff -Nru a/arch/s390/kernel/compat_ptrace.h b/arch/s390/kernel/compat_ptrace.h --- a/arch/s390/kernel/compat_ptrace.h Tue Mar 2 17:37:08 2004 +++ b/arch/s390/kernel/compat_ptrace.h Tue Mar 2 17:37:08 2004 @@ -3,23 +3,20 @@ #include "compat_linux.h" /* needed for _psw_t32 */ -typedef struct -{ +typedef struct { __u32 cr[3]; -} per_cr_words32 __attribute__((packed)); +} per_cr_words32; -typedef struct -{ +typedef struct { __u16 perc_atmid; /* 0x096 */ __u32 address; /* 0x098 */ __u8 access_id; /* 0x0a1 */ -} per_lowcore_words32 __attribute__((packed)); +} per_lowcore_words32; -typedef struct -{ +typedef struct { union { per_cr_words32 words; - } control_regs __attribute__((packed)); + } control_regs; /* * Use these flags instead of setting em_instruction_fetch * directly they are used so that single stepping can be @@ -37,7 +34,7 @@ union { per_lowcore_words32 words; } lowcore; -} per_struct32 __attribute__((packed)); +} per_struct32; struct user_regs_struct32 { diff -Nru a/arch/s390/kernel/s390_ksyms.c b/arch/s390/kernel/s390_ksyms.c --- a/arch/s390/kernel/s390_ksyms.c Tue Mar 2 17:37:08 2004 +++ b/arch/s390/kernel/s390_ksyms.c Tue Mar 2 17:37:08 2004 @@ -29,6 +29,7 @@ EXPORT_SYMBOL_NOVERS(_oi_bitmap); EXPORT_SYMBOL_NOVERS(_ni_bitmap); EXPORT_SYMBOL_NOVERS(_zb_findmap); +EXPORT_SYMBOL_NOVERS(_sb_findmap); EXPORT_SYMBOL_NOVERS(__copy_from_user_asm); EXPORT_SYMBOL_NOVERS(__copy_to_user_asm); EXPORT_SYMBOL_NOVERS(__clear_user_asm); @@ -92,5 +93,4 @@ EXPORT_SYMBOL_NOVERS(do_call_softirq); EXPORT_SYMBOL(sys_wait4); EXPORT_SYMBOL(cpcmd); -EXPORT_SYMBOL(smp_call_function_on); EXPORT_SYMBOL(sys_ioctl); diff -Nru a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c --- a/arch/s390/kernel/smp.c Tue Mar 2 17:37:07 2004 +++ b/arch/s390/kernel/smp.c Tue Mar 2 17:37:07 2004 @@ -203,10 +203,11 @@ put_cpu(); return 0; } +EXPORT_SYMBOL(smp_call_function_on); static inline void do_send_stop(void) { - u32 dummy; + unsigned long dummy; int i, rc; /* stop all processors */ @@ -222,7 +223,7 @@ static inline void do_store_status(void) { unsigned long low_core_addr; - u32 dummy; + unsigned long dummy; int i, rc; /* store status of all processors in their lowcores (real 0) */ @@ -619,7 +620,7 @@ if (lowcore_ptr[i] == NULL || async_stack == 0ULL) panic("smp_boot_cpus failed to allocate memory\n"); - memcpy(lowcore_ptr[i], &S390_lowcore, sizeof(struct _lowcore)); + *(lowcore_ptr[i]) = S390_lowcore; lowcore_ptr[i]->async_stack = async_stack + (ASYNC_SIZE); } set_prefix((u32)(unsigned long) lowcore_ptr[smp_processor_id()]); diff -Nru a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c --- a/arch/s390/kernel/traps.c Tue Mar 2 17:37:08 2004 +++ b/arch/s390/kernel/traps.c Tue Mar 2 17:37:08 2004 @@ -616,8 +616,6 @@ pgm_check_table[9] = ÷_exception; pgm_check_table[0x10] = &do_segment_exception; pgm_check_table[0x11] = &do_page_exception; - pgm_check_table[0x10] = &do_segment_exception; - pgm_check_table[0x11] = &do_page_exception; pgm_check_table[0x12] = &translation_exception; pgm_check_table[0x13] = &special_op_exception; #ifndef CONFIG_ARCH_S390X diff -Nru a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c --- a/arch/s390/mm/cmm.c Tue Mar 2 17:37:08 2004 +++ b/arch/s390/mm/cmm.c Tue Mar 2 17:37:08 2004 @@ -87,8 +87,7 @@ pa->index = 0; *list = pa; } - if (page < 0x80000000UL) - diag10(page); + diag10(page); pa->pages[pa->index++] = page; (*counter)++; pages--; diff -Nru a/arch/s390/mm/init.c b/arch/s390/mm/init.c --- a/arch/s390/mm/init.c Tue Mar 2 17:37:08 2004 +++ b/arch/s390/mm/init.c Tue Mar 2 17:37:08 2004 @@ -42,9 +42,9 @@ void diag10(unsigned long addr) { -#ifdef __s390x__ - if (addr >= 0x80000000) + if (addr >= 0x7ff00000) return; +#ifdef __s390x__ asm volatile ("sam31\n\t" "diag %0,%0,0x10\n\t" "sam64" : : "a" (addr) ); diff -Nru a/arch/sh/boards/adx/Makefile b/arch/sh/boards/adx/Makefile --- a/arch/sh/boards/adx/Makefile Tue Mar 2 17:37:09 2004 +++ b/arch/sh/boards/adx/Makefile Tue Mar 2 17:37:09 2004 @@ -1,10 +1,6 @@ # # Makefile for ADX boards # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := setup.o irq.o irq_maskreq.o diff -Nru a/arch/sh/boards/bigsur/Makefile b/arch/sh/boards/bigsur/Makefile --- a/arch/sh/boards/bigsur/Makefile Tue Mar 2 17:37:08 2004 +++ b/arch/sh/boards/bigsur/Makefile Tue Mar 2 17:37:08 2004 @@ -1,10 +1,6 @@ # # Makefile for the BigSur specific parts of the kernel # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := setup.o io.o irq.o led.o diff -Nru a/arch/sh/boards/cat68701/Makefile b/arch/sh/boards/cat68701/Makefile --- a/arch/sh/boards/cat68701/Makefile Tue Mar 2 17:37:07 2004 +++ b/arch/sh/boards/cat68701/Makefile Tue Mar 2 17:37:07 2004 @@ -1,10 +1,6 @@ # # Makefile for the CAT-68701 specific parts of the kernel # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := setup.o irq.o diff -Nru a/arch/sh/boards/cqreek/Makefile b/arch/sh/boards/cqreek/Makefile --- a/arch/sh/boards/cqreek/Makefile Tue Mar 2 17:37:07 2004 +++ b/arch/sh/boards/cqreek/Makefile Tue Mar 2 17:37:07 2004 @@ -1,10 +1,6 @@ # # Makefile for the CqREEK specific parts of the kernel # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := setup.o irq.o diff -Nru a/arch/sh/boards/dmida/Makefile b/arch/sh/boards/dmida/Makefile --- a/arch/sh/boards/dmida/Makefile Tue Mar 2 17:37:07 2004 +++ b/arch/sh/boards/dmida/Makefile Tue Mar 2 17:37:07 2004 @@ -2,10 +2,6 @@ # Makefile for the DataMyte Industrial Digital Assistant(tm) specific parts # of the kernel # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := mach.o diff -Nru a/arch/sh/boards/dreamcast/Makefile b/arch/sh/boards/dreamcast/Makefile --- a/arch/sh/boards/dreamcast/Makefile Tue Mar 2 17:37:08 2004 +++ b/arch/sh/boards/dreamcast/Makefile Tue Mar 2 17:37:08 2004 @@ -1,10 +1,6 @@ # # Makefile for the Sega Dreamcast specific parts of the kernel # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := setup.o irq.o rtc.o diff -Nru a/arch/sh/boards/ec3104/Makefile b/arch/sh/boards/ec3104/Makefile --- a/arch/sh/boards/ec3104/Makefile Tue Mar 2 17:37:08 2004 +++ b/arch/sh/boards/ec3104/Makefile Tue Mar 2 17:37:08 2004 @@ -1,10 +1,6 @@ # # Makefile for the EC3104 specific parts of the kernel # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := setup.o io.o irq.o diff -Nru a/arch/sh/boards/harp/Makefile b/arch/sh/boards/harp/Makefile --- a/arch/sh/boards/harp/Makefile Tue Mar 2 17:37:07 2004 +++ b/arch/sh/boards/harp/Makefile Tue Mar 2 17:37:07 2004 @@ -1,10 +1,6 @@ # # Makefile for STMicroelectronics board specific parts of the kernel # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := irq.o setup.o mach.o led.o diff -Nru a/arch/sh/boards/hp6xx/hp620/Makefile b/arch/sh/boards/hp6xx/hp620/Makefile --- a/arch/sh/boards/hp6xx/hp620/Makefile Tue Mar 2 17:37:09 2004 +++ b/arch/sh/boards/hp6xx/hp620/Makefile Tue Mar 2 17:37:09 2004 @@ -1,10 +1,6 @@ # # Makefile for the HP620 specific parts of the kernel # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := mach.o diff -Nru a/arch/sh/boards/hp6xx/hp680/Makefile b/arch/sh/boards/hp6xx/hp680/Makefile --- a/arch/sh/boards/hp6xx/hp680/Makefile Tue Mar 2 17:37:08 2004 +++ b/arch/sh/boards/hp6xx/hp680/Makefile Tue Mar 2 17:37:08 2004 @@ -1,10 +1,6 @@ # # Makefile for the HP680 specific parts of the kernel # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := mach.o setup.o diff -Nru a/arch/sh/boards/hp6xx/hp690/Makefile b/arch/sh/boards/hp6xx/hp690/Makefile --- a/arch/sh/boards/hp6xx/hp690/Makefile Tue Mar 2 17:37:07 2004 +++ b/arch/sh/boards/hp6xx/hp690/Makefile Tue Mar 2 17:37:07 2004 @@ -1,10 +1,6 @@ # # Makefile for the HP690 specific parts of the kernel # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := mach.o diff -Nru a/arch/sh/boards/mpc1211/Makefile b/arch/sh/boards/mpc1211/Makefile --- a/arch/sh/boards/mpc1211/Makefile Tue Mar 2 17:37:07 2004 +++ b/arch/sh/boards/mpc1211/Makefile Tue Mar 2 17:37:07 2004 @@ -1,10 +1,6 @@ # # Makefile for the Interface (CTP/PCI/MPC-SH02) specific parts of the kernel # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := setup.o rtc.o led.o diff -Nru a/arch/sh/boards/overdrive/Makefile b/arch/sh/boards/overdrive/Makefile --- a/arch/sh/boards/overdrive/Makefile Tue Mar 2 17:37:09 2004 +++ b/arch/sh/boards/overdrive/Makefile Tue Mar 2 17:37:09 2004 @@ -1,10 +1,6 @@ # # Makefile for the STMicroelectronics Overdrive specific parts of the kernel # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := mach.o setup.o io.o irq.o led.o time.o diff -Nru a/arch/sh/boards/saturn/Makefile b/arch/sh/boards/saturn/Makefile --- a/arch/sh/boards/saturn/Makefile Tue Mar 2 17:37:08 2004 +++ b/arch/sh/boards/saturn/Makefile Tue Mar 2 17:37:08 2004 @@ -1,10 +1,6 @@ # # Makefile for the Sega Saturn specific parts of the kernel # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := setup.o io.o irq.o diff -Nru a/arch/sh/boards/se/770x/Makefile b/arch/sh/boards/se/770x/Makefile --- a/arch/sh/boards/se/770x/Makefile Tue Mar 2 17:37:09 2004 +++ b/arch/sh/boards/se/770x/Makefile Tue Mar 2 17:37:09 2004 @@ -1,10 +1,6 @@ # # Makefile for the 770x SolutionEngine specific parts of the kernel # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := mach.o setup.o io.o irq.o led.o diff -Nru a/arch/sh/boards/se/7751/Makefile b/arch/sh/boards/se/7751/Makefile --- a/arch/sh/boards/se/7751/Makefile Tue Mar 2 17:37:09 2004 +++ b/arch/sh/boards/se/7751/Makefile Tue Mar 2 17:37:09 2004 @@ -1,10 +1,6 @@ # # Makefile for the 7751 SolutionEngine specific parts of the kernel # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := mach.o setup.o io.o irq.o led.o diff -Nru a/arch/sh/boards/sh2000/Makefile b/arch/sh/boards/sh2000/Makefile --- a/arch/sh/boards/sh2000/Makefile Tue Mar 2 17:37:09 2004 +++ b/arch/sh/boards/sh2000/Makefile Tue Mar 2 17:37:09 2004 @@ -1,10 +1,6 @@ # # Makefile for the SH2000 specific parts of the kernel # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := setup.o diff -Nru a/arch/sh/boards/snapgear/Makefile b/arch/sh/boards/snapgear/Makefile --- a/arch/sh/boards/snapgear/Makefile Tue Mar 2 17:37:09 2004 +++ b/arch/sh/boards/snapgear/Makefile Tue Mar 2 17:37:09 2004 @@ -1,10 +1,6 @@ # # Makefile for the SnapGear specific parts of the kernel # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := setup.o io.o rtc.o diff -Nru a/arch/sh/boards/systemh/Makefile b/arch/sh/boards/systemh/Makefile --- a/arch/sh/boards/systemh/Makefile Tue Mar 2 17:37:09 2004 +++ b/arch/sh/boards/systemh/Makefile Tue Mar 2 17:37:09 2004 @@ -1,10 +1,6 @@ # # Makefile for the SystemH specific parts of the kernel # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := setup.o irq.o io.o diff -Nru a/arch/sh/boards/unknown/Makefile b/arch/sh/boards/unknown/Makefile --- a/arch/sh/boards/unknown/Makefile Tue Mar 2 17:37:08 2004 +++ b/arch/sh/boards/unknown/Makefile Tue Mar 2 17:37:08 2004 @@ -1,10 +1,6 @@ # # Makefile for unknown SH boards # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := mach.o io.o setup.o diff -Nru a/arch/sh/cchips/hd6446x/hd64461/Makefile b/arch/sh/cchips/hd6446x/hd64461/Makefile --- a/arch/sh/cchips/hd6446x/hd64461/Makefile Tue Mar 2 17:37:08 2004 +++ b/arch/sh/cchips/hd6446x/hd64461/Makefile Tue Mar 2 17:37:08 2004 @@ -1,10 +1,6 @@ # # Makefile for the HD64461 # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := setup.o io.o diff -Nru a/arch/sh/cchips/hd6446x/hd64465/Makefile b/arch/sh/cchips/hd6446x/hd64465/Makefile --- a/arch/sh/cchips/hd6446x/hd64465/Makefile Tue Mar 2 17:37:09 2004 +++ b/arch/sh/cchips/hd6446x/hd64465/Makefile Tue Mar 2 17:37:09 2004 @@ -1,10 +1,6 @@ # # Makefile for the HD64465 # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# obj-y := setup.o io.o gpio.o diff -Nru a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c --- a/arch/sparc/kernel/setup.c Tue Mar 2 17:37:07 2004 +++ b/arch/sparc/kernel/setup.c Tue Mar 2 17:37:07 2004 @@ -233,7 +233,6 @@ extern unsigned long start, end; extern void panic_setup(char *, int *); extern void srmmu_end_memory(unsigned long, unsigned long *); -extern void sun_serial_setup(void); extern unsigned short root_flags; extern unsigned short root_dev; diff -Nru a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig --- a/arch/sparc64/Kconfig Tue Mar 2 17:37:09 2004 +++ b/arch/sparc64/Kconfig Tue Mar 2 17:37:09 2004 @@ -450,28 +450,6 @@ another UltraSPARC-IIi-cEngine boardset with a 7-segment display, you should say N to this option. -config WATCHDOG_CP1XXX - tristate "CP1XXX Hardware Watchdog support" - depends on PCI - ---help--- - This is the driver for the hardware watchdog timers present on - Sun Microsystems CompactPCI models CP1400 and CP1500. - - To compile this driver as a module, choose M here: the - module will be called cpwatchdog. - - If you do not have a CompactPCI model CP1400 or CP1500, or - another UltraSPARC-IIi-cEngine boardset with hardware watchdog, - you should say N to this option. - -config WATCHDOG_RIO - tristate "RIO Hardware Watchdog support" - depends on PCI - help - Say Y here to support the hardware watchdog capability on Sun RIO - machines. The watchdog timeout period is normally one minute but - can be changed with a boot-time parameter. - config CMDLINE_BOOL bool "Default bootloader kernel arguments" @@ -632,6 +610,15 @@ help Say Y here if you are developing drivers or trying to debug and identify kernel problems. + +config DEBUG_STACK_USAGE + bool "Enable stack utilization instrumentation" + depends on DEBUG_KERNEL + help + Enables the display of the minimum amount of free stack which each + task has ever had available in the sysrq-T and sysrq-P debug output. + + This option will slow down process creation somewhat. config DEBUG_SLAB bool "Debug memory allocations" diff -Nru a/arch/sparc64/defconfig b/arch/sparc64/defconfig --- a/arch/sparc64/defconfig Tue Mar 2 17:37:08 2004 +++ b/arch/sparc64/defconfig Tue Mar 2 17:37:08 2004 @@ -905,7 +905,6 @@ # # Old SIR device drivers # -# CONFIG_IRPORT_SIR is not set # # Old Serial dongle support @@ -1657,6 +1656,7 @@ # Kernel hacking # CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_STACK_USAGE is not set # CONFIG_DEBUG_SLAB is not set CONFIG_MAGIC_SYSRQ=y # CONFIG_DEBUG_SPINLOCK is not set diff -Nru a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c --- a/arch/sparc64/mm/init.c Tue Mar 2 17:37:08 2004 +++ b/arch/sparc64/mm/init.c Tue Mar 2 17:37:08 2004 @@ -1423,7 +1423,6 @@ /* paging_init() sets up the page tables */ -extern void sun_serial_setup(void); extern void cheetah_ecache_flush_init(void); static unsigned long last_valid_pfn; @@ -1547,15 +1546,6 @@ } inherit_locked_prom_mappings(1); - -#ifdef CONFIG_SUN_SERIAL - /* This does not logically belong here, but we need to call it at - * the moment we are able to use the bootmem allocator. This _has_ - * to be done after the prom_mappings above so since - * __alloc_bootmem() doesn't work correctly until then. - */ - sun_serial_setup(); -#endif /* We only created DTLB mapping of this stuff. */ spitfire_flush_dtlb_nucleus_page(alias_base); diff -Nru a/arch/x86_64/Makefile b/arch/x86_64/Makefile --- a/arch/x86_64/Makefile Tue Mar 2 17:37:09 2004 +++ b/arch/x86_64/Makefile Tue Mar 2 17:37:09 2004 @@ -38,7 +38,7 @@ LDFLAGS_vmlinux := -e stext cflags-$(CONFIG_MK8) += $(call check_gcc,-march=k8,) -cflags-$(CONFIG_MPSC) += $(call check_gcc,-march=pentium4,) +cflags-$(CONFIG_MPSC) += $(call check_gcc,-march=prescott,) CFLAGS += $(cflags-y) CFLAGS += -mno-red-zone diff -Nru a/arch/x86_64/defconfig b/arch/x86_64/defconfig --- a/arch/x86_64/defconfig Tue Mar 2 17:37:08 2004 +++ b/arch/x86_64/defconfig Tue Mar 2 17:37:08 2004 @@ -27,6 +27,7 @@ # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y CONFIG_LOG_BUF_SHIFT=18 +# CONFIG_HOTPLUG is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set @@ -106,6 +107,7 @@ CONFIG_ACPI_PCI=y CONFIG_ACPI_SYSTEM=y # CONFIG_ACPI_RELAXED_AML is not set +# CONFIG_X86_PM_TIMER is not set # # CPU Frequency scaling @@ -119,7 +121,6 @@ CONFIG_PCI_DIRECT=y # CONFIG_PCI_LEGACY_PROC is not set # CONFIG_PCI_NAMES is not set -# CONFIG_HOTPLUG is not set # # Executable file formats / Emulations @@ -168,6 +169,7 @@ CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y CONFIG_LBD=y +# CONFIG_DCSSBLK is not set # # ATA/ATAPI/MFM/RLL support @@ -306,7 +308,7 @@ # CONFIG_FUSION_CTL is not set # -# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# IEEE 1394 (FireWire) support # # CONFIG_IEEE1394 is not set @@ -489,7 +491,7 @@ # # ISDN subsystem # -# CONFIG_ISDN_BOOL is not set +# CONFIG_ISDN is not set # # Telephony Support @@ -562,7 +564,8 @@ CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y -CONFIG_UNIX98_PTY_COUNT=256 +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 # # Mice @@ -718,7 +721,6 @@ CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y # CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS=y # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y CONFIG_HUGETLBFS=y @@ -731,6 +733,7 @@ # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set @@ -761,7 +764,6 @@ # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # diff -Nru a/arch/x86_64/kernel/i8259.c b/arch/x86_64/kernel/i8259.c --- a/arch/x86_64/kernel/i8259.c Tue Mar 2 17:37:07 2004 +++ b/arch/x86_64/kernel/i8259.c Tue Mar 2 17:37:07 2004 @@ -423,7 +423,7 @@ static struct sys_device device_timer = { .id = 0, - .cls &timer_sysclass, + .cls = &timer_sysclass, }; static int __init init_timer_sysfs(void) diff -Nru a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c --- a/arch/x86_64/kernel/mce.c Tue Mar 2 17:37:08 2004 +++ b/arch/x86_64/kernel/mce.c Tue Mar 2 17:37:08 2004 @@ -73,7 +73,9 @@ printk("CPU %d: Machine Check Exception: %16Lx Bank %d: %016Lx\n", m->cpu, m->mcgstatus, m->bank, m->status); if (m->rip) { - printk("RIP %02x:<%016Lx> ", m->cs, m->rip); + printk("RIP%s %02x:<%016Lx> ", + !(m->mcgstatus & MCG_STATUS_EIPV) ? " !INEXACT!" : "", + m->cs, m->rip); if (m->cs == __KERNEL_CS) print_symbol("{%s}", m->rip); printk("\n"); @@ -133,7 +135,7 @@ return; if (!(m.mcgstatus & MCG_STATUS_RIPV)) kill_it = 1; - if (regs && (m.mcgstatus & MCG_STATUS_EIPV)) { + if (regs) { m.rip = regs->rip; m.cs = regs->cs; } diff -Nru a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c --- a/arch/x86_64/kernel/setup.c Tue Mar 2 17:37:07 2004 +++ b/arch/x86_64/kernel/setup.c Tue Mar 2 17:37:07 2004 @@ -610,8 +610,7 @@ * At this point we only support two siblings per * processor package. */ -#define NR_SIBLINGS 2 - if (smp_num_siblings != NR_SIBLINGS) { + if (smp_num_siblings > NR_CPUS) { printk(KERN_WARNING "CPU: Unsupported number of the siblings %d", smp_num_siblings); smp_num_siblings = 1; return; diff -Nru a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c --- a/arch/x86_64/kernel/time.c Tue Mar 2 17:37:08 2004 +++ b/arch/x86_64/kernel/time.c Tue Mar 2 17:37:08 2004 @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -353,11 +354,11 @@ } if (lost) { - if (report_lost_ticks) + if (report_lost_ticks) { printk(KERN_WARNING "time.c: Lost %ld timer " - "tick(s)! (rip %016lx)\n", - (offset - vxtime.last) / hpet_tick - 1, - regs->rip); + "tick(s)! ", lost); + print_symbol("rip %s)\n", regs->rip); + } jiffies += lost; } @@ -399,8 +400,19 @@ return IRQ_HANDLED; } -/* RED-PEN: calculation is done in 32bits with multiply for performance - and could overflow, it may be better (but slower)to use an 64bit division. */ +static unsigned int cyc2ns_scale; +#define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */ + +static inline void set_cyc2ns_scale(unsigned long cpu_mhz) +{ + cyc2ns_scale = (1000 << CYC2NS_SCALE_FACTOR)/cpu_mhz; +} + +static inline unsigned long long cycles_2_ns(unsigned long long cyc) +{ + return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR; +} + unsigned long long sched_clock(void) { unsigned long a = 0; @@ -420,7 +432,7 @@ purposes. */ rdtscll(a); - return (a * vxtime.tsc_quot) >> 32; + return cycles_2_ns(a); } unsigned long get_cmos_time(void) @@ -527,6 +539,8 @@ vxtime.tsc_quot = (1000L << 32) / cpu_khz; } + set_cyc2ns_scale(cpu_khz_ref / 1000); + return 0; } @@ -724,6 +738,8 @@ vxtime.hz = vxtime_hz; rdtscll_sync(&vxtime.last_tsc); setup_irq(0, &irq0); + + set_cyc2ns_scale(cpu_khz / 1000); #ifdef CONFIG_CPU_FREQ cpufreq_register_notifier(&time_cpufreq_notifier_block, diff -Nru a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c --- a/arch/x86_64/kernel/traps.c Tue Mar 2 17:37:07 2004 +++ b/arch/x86_64/kernel/traps.c Tue Mar 2 17:37:07 2004 @@ -351,9 +351,24 @@ void __die(const char * str, struct pt_regs * regs, long err) { + int nl = 0; static int die_counter; printk(KERN_EMERG "%s: %04lx [%u]\n", str, err & 0xffff,++die_counter); notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV); +#ifdef CONFIG_PREEMPT + printk("PREEMPT "); + nl = 1; +#endif +#ifdef CONFIG_SMP + printk("SMP "); + nl = 1; +#endif +#ifdef CONFIG_DEBUG_PAGEALLOC + printk("DEBUG_PAGEALLOC"); + nl = 1; +#endif + if (nl) + printk("\n"); show_registers(regs); /* Executive summary in case the oops scrolled away */ printk("RIP "); diff -Nru a/arch/x86_64/kernel/x8664_ksyms.c b/arch/x86_64/kernel/x8664_ksyms.c --- a/arch/x86_64/kernel/x8664_ksyms.c Tue Mar 2 17:37:07 2004 +++ b/arch/x86_64/kernel/x8664_ksyms.c Tue Mar 2 17:37:07 2004 @@ -196,6 +196,7 @@ #ifdef CONFIG_SMP EXPORT_SYMBOL(cpu_sibling_map); +EXPORT_SYMBOL(smp_num_siblings); #endif extern void do_softirq_thunk(void); diff -Nru a/crypto/Makefile b/crypto/Makefile --- a/crypto/Makefile Tue Mar 2 17:37:09 2004 +++ b/crypto/Makefile Tue Mar 2 17:37:09 2004 @@ -4,7 +4,7 @@ proc-crypto-$(CONFIG_PROC_FS) = proc.o -obj-$(CONFIG_CRYPTO) += api.o cipher.o digest.o compress.o \ +obj-$(CONFIG_CRYPTO) += api.o scatterwalk.o cipher.o digest.o compress.o \ $(proc-crypto-y) obj-$(CONFIG_CRYPTO_HMAC) += hmac.o diff -Nru a/crypto/cipher.c b/crypto/cipher.c --- a/crypto/cipher.c Tue Mar 2 17:37:08 2004 +++ b/crypto/cipher.c Tue Mar 2 17:37:08 2004 @@ -4,7 +4,6 @@ * Cipher operations. * * Copyright (c) 2002 James Morris - * Generic scatterwalk code by Adam J. Richter . * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free @@ -17,30 +16,13 @@ #include #include #include -#include -#include #include #include "internal.h" +#include "scatterwalk.h" typedef void (cryptfn_t)(void *, u8 *, const u8 *); typedef void (procfn_t)(struct crypto_tfm *, u8 *, - u8*, cryptfn_t, int enc, void *); - -struct scatter_walk { - struct scatterlist *sg; - struct page *page; - void *data; - unsigned int len_this_page; - unsigned int len_this_segment; - unsigned int offset; -}; - -enum km_type crypto_km_types[] = { - KM_USER0, - KM_USER1, - KM_SOFTIRQ0, - KM_SOFTIRQ1, -}; + u8*, cryptfn_t, int enc, void *, int); static inline void xor_64(u8 *a, const u8 *b) { @@ -57,108 +39,6 @@ } -/* Define sg_next is an inline routine now in case we want to change - scatterlist to a linked list later. */ -static inline struct scatterlist *sg_next(struct scatterlist *sg) -{ - return sg + 1; -} - -void *which_buf(struct scatter_walk *walk, unsigned int nbytes, void *scratch) -{ - if (nbytes <= walk->len_this_page && - (((unsigned long)walk->data) & (PAGE_CACHE_SIZE - 1)) + nbytes <= - PAGE_CACHE_SIZE) - return walk->data; - else - return scratch; -} - -static void memcpy_dir(void *buf, void *sgdata, size_t nbytes, int out) -{ - if (out) - memcpy(sgdata, buf, nbytes); - else - memcpy(buf, sgdata, nbytes); -} - -static void scatterwalk_start(struct scatter_walk *walk, struct scatterlist *sg) -{ - unsigned int rest_of_page; - - walk->sg = sg; - - walk->page = sg->page; - walk->len_this_segment = sg->length; - - rest_of_page = PAGE_CACHE_SIZE - (sg->offset & (PAGE_CACHE_SIZE - 1)); - walk->len_this_page = min(sg->length, rest_of_page); - walk->offset = sg->offset; -} - -static void scatterwalk_map(struct scatter_walk *walk, int out) -{ - walk->data = crypto_kmap(walk->page, out) + walk->offset; -} - -static void scatter_page_done(struct scatter_walk *walk, int out, - unsigned int more) -{ - /* walk->data may be pointing the first byte of the next page; - however, we know we transfered at least one byte. So, - walk->data - 1 will be a virutual address in the mapped page. */ - - if (out) - flush_dcache_page(walk->page); - - if (more) { - walk->len_this_segment -= walk->len_this_page; - - if (walk->len_this_segment) { - walk->page++; - walk->len_this_page = min(walk->len_this_segment, - (unsigned)PAGE_CACHE_SIZE); - walk->offset = 0; - } - else - scatterwalk_start(walk, sg_next(walk->sg)); - } -} - -static void scatter_done(struct scatter_walk *walk, int out, int more) -{ - crypto_kunmap(walk->data, out); - if (walk->len_this_page == 0 || !more) - scatter_page_done(walk, out, more); -} - -/* - * Do not call this unless the total length of all of the fragments - * has been verified as multiple of the block size. - */ -static int copy_chunks(void *buf, struct scatter_walk *walk, - size_t nbytes, int out) -{ - if (buf != walk->data) { - while (nbytes > walk->len_this_page) { - memcpy_dir(buf, walk->data, walk->len_this_page, out); - buf += walk->len_this_page; - nbytes -= walk->len_this_page; - - crypto_kunmap(walk->data, out); - scatter_page_done(walk, out, 1); - scatterwalk_map(walk, out); - } - - memcpy_dir(buf, walk->data, nbytes, out); - } - - walk->offset += nbytes; - walk->len_this_page -= nbytes; - walk->len_this_segment -= nbytes; - return 0; -} - /* * Generic encrypt/decrypt wrapper for ciphers, handles operations across * multiple page boundaries by using temporary blocks. In user context, @@ -191,19 +71,21 @@ scatterwalk_map(&walk_in, 0); scatterwalk_map(&walk_out, 1); - src_p = which_buf(&walk_in, bsize, tmp_src); - dst_p = which_buf(&walk_out, bsize, tmp_dst); + src_p = scatterwalk_whichbuf(&walk_in, bsize, tmp_src); + dst_p = scatterwalk_whichbuf(&walk_out, bsize, tmp_dst); nbytes -= bsize; - copy_chunks(src_p, &walk_in, bsize, 0); + scatterwalk_copychunks(src_p, &walk_in, bsize, 0); - prfn(tfm, dst_p, src_p, crfn, enc, info); + prfn(tfm, dst_p, src_p, crfn, enc, info, + scatterwalk_samebuf(&walk_in, &walk_out, + src_p, dst_p)); - scatter_done(&walk_in, 0, nbytes); + scatterwalk_done(&walk_in, 0, nbytes); - copy_chunks(dst_p, &walk_out, bsize, 1); - scatter_done(&walk_out, 1, nbytes); + scatterwalk_copychunks(dst_p, &walk_out, bsize, 1); + scatterwalk_done(&walk_out, 1, nbytes); if (!nbytes) return 0; @@ -212,8 +94,8 @@ } } -static void cbc_process(struct crypto_tfm *tfm, - u8 *dst, u8 *src, cryptfn_t fn, int enc, void *info) +static void cbc_process(struct crypto_tfm *tfm, u8 *dst, u8 *src, + cryptfn_t fn, int enc, void *info, int in_place) { u8 *iv = info; @@ -226,10 +108,9 @@ fn(crypto_tfm_ctx(tfm), dst, iv); memcpy(iv, dst, crypto_tfm_alg_blocksize(tfm)); } else { - const int need_stack = (src == dst); - u8 stack[need_stack ? crypto_tfm_alg_blocksize(tfm) : 0]; - u8 *buf = need_stack ? stack : dst; - + u8 stack[in_place ? crypto_tfm_alg_blocksize(tfm) : 0]; + u8 *buf = in_place ? stack : dst; + fn(crypto_tfm_ctx(tfm), buf, src); tfm->crt_u.cipher.cit_xor_block(buf, iv); memcpy(iv, src, crypto_tfm_alg_blocksize(tfm)); @@ -239,7 +120,7 @@ } static void ecb_process(struct crypto_tfm *tfm, u8 *dst, u8 *src, - cryptfn_t fn, int enc, void *info) + cryptfn_t fn, int enc, void *info, int in_place) { fn(crypto_tfm_ctx(tfm), dst, src); } diff -Nru a/crypto/internal.h b/crypto/internal.h --- a/crypto/internal.h Tue Mar 2 17:37:07 2004 +++ b/crypto/internal.h Tue Mar 2 17:37:07 2004 @@ -11,6 +11,7 @@ */ #ifndef _CRYPTO_INTERNAL_H #define _CRYPTO_INTERNAL_H +#include #include #include #include diff -Nru a/crypto/scatterwalk.c b/crypto/scatterwalk.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/crypto/scatterwalk.c Tue Mar 2 17:37:09 2004 @@ -0,0 +1,124 @@ +/* + * Cryptographic API. + * + * Cipher operations. + * + * Copyright (c) 2002 James Morris + * 2002 Adam J. Richter + * 2004 Jean-Luc Cooke + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + */ +#include +#include +#include +#include +#include +#include "internal.h" +#include "scatterwalk.h" + +enum km_type crypto_km_types[] = { + KM_USER0, + KM_USER1, + KM_SOFTIRQ0, + KM_SOFTIRQ1, +}; + +void *scatterwalk_whichbuf(struct scatter_walk *walk, unsigned int nbytes, void *scratch) +{ + if (nbytes <= walk->len_this_page && + (((unsigned long)walk->data) & (PAGE_CACHE_SIZE - 1)) + nbytes <= + PAGE_CACHE_SIZE) + return walk->data; + else + return scratch; +} + +static void memcpy_dir(void *buf, void *sgdata, size_t nbytes, int out) +{ + if (out) + memcpy(sgdata, buf, nbytes); + else + memcpy(buf, sgdata, nbytes); +} + +void scatterwalk_start(struct scatter_walk *walk, struct scatterlist *sg) +{ + unsigned int rest_of_page; + + walk->sg = sg; + + walk->page = sg->page; + walk->len_this_segment = sg->length; + + rest_of_page = PAGE_CACHE_SIZE - (sg->offset & (PAGE_CACHE_SIZE - 1)); + walk->len_this_page = min(sg->length, rest_of_page); + walk->offset = sg->offset; +} + +void scatterwalk_map(struct scatter_walk *walk, int out) +{ + walk->data = crypto_kmap(walk->page, out) + walk->offset; +} + +static void scatterwalk_pagedone(struct scatter_walk *walk, int out, + unsigned int more) +{ + /* walk->data may be pointing the first byte of the next page; + however, we know we transfered at least one byte. So, + walk->data - 1 will be a virutual address in the mapped page. */ + + if (out) + flush_dcache_page(walk->page); + + if (more) { + walk->len_this_segment -= walk->len_this_page; + + if (walk->len_this_segment) { + walk->page++; + walk->len_this_page = min(walk->len_this_segment, + (unsigned)PAGE_CACHE_SIZE); + walk->offset = 0; + } + else + scatterwalk_start(walk, sg_next(walk->sg)); + } +} + +void scatterwalk_done(struct scatter_walk *walk, int out, int more) +{ + crypto_kunmap(walk->data, out); + if (walk->len_this_page == 0 || !more) + scatterwalk_pagedone(walk, out, more); +} + +/* + * Do not call this unless the total length of all of the fragments + * has been verified as multiple of the block size. + */ +int scatterwalk_copychunks(void *buf, struct scatter_walk *walk, + size_t nbytes, int out) +{ + if (buf != walk->data) { + while (nbytes > walk->len_this_page) { + memcpy_dir(buf, walk->data, walk->len_this_page, out); + buf += walk->len_this_page; + nbytes -= walk->len_this_page; + + crypto_kunmap(walk->data, out); + scatterwalk_pagedone(walk, out, 1); + scatterwalk_map(walk, out); + } + + memcpy_dir(buf, walk->data, nbytes, out); + } + + walk->offset += nbytes; + walk->len_this_page -= nbytes; + walk->len_this_segment -= nbytes; + return 0; +} diff -Nru a/crypto/scatterwalk.h b/crypto/scatterwalk.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/crypto/scatterwalk.h Tue Mar 2 17:37:09 2004 @@ -0,0 +1,50 @@ +/* + * Cryptographic API. + * + * Copyright (c) 2002 James Morris + * Copyright (c) 2002 Adam J. Richter + * Copyright (c) 2004 Jean-Luc Cooke + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + */ + +#ifndef _CRYPTO_SCATTERWALK_H +#define _CRYPTO_SCATTERWALK_H +#include +#include + +struct scatter_walk { + struct scatterlist *sg; + struct page *page; + void *data; + unsigned int len_this_page; + unsigned int len_this_segment; + unsigned int offset; +}; + +/* Define sg_next is an inline routine now in case we want to change + scatterlist to a linked list later. */ +static inline struct scatterlist *sg_next(struct scatterlist *sg) +{ + return sg + 1; +} + +static inline int scatterwalk_samebuf(struct scatter_walk *walk_in, + struct scatter_walk *walk_out, + void *src_p, void *dst_p) +{ + return walk_in->page == walk_out->page && + walk_in->data == src_p && walk_out->data == dst_p; +} + +void *scatterwalk_whichbuf(struct scatter_walk *walk, unsigned int nbytes, void *scratch); +void scatterwalk_start(struct scatter_walk *walk, struct scatterlist *sg); +int scatterwalk_copychunks(void *buf, struct scatter_walk *walk, size_t nbytes, int out); +void scatterwalk_map(struct scatter_walk *walk, int out); +void scatterwalk_done(struct scatter_walk *walk, int out, int more); + +#endif /* _CRYPTO_SCATTERWALK_H */ diff -Nru a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c --- a/drivers/base/firmware_class.c Tue Mar 2 17:37:07 2004 +++ b/drivers/base/firmware_class.c Tue Mar 2 17:37:07 2004 @@ -27,6 +27,7 @@ FW_STATUS_LOADING, FW_STATUS_DONE, FW_STATUS_ABORT, + FW_STATUS_READY, }; static int loading_timeout = 10; /* In seconds */ @@ -96,6 +97,9 @@ int i = 0; char *scratch = buffer; + if (!test_bit(FW_STATUS_READY, &fw_priv->status)) + return -ENODEV; + if (buffer_size < (FIRMWARE_NAME_MAX + 10)) return -ENOMEM; if (num_envp < 1) @@ -263,6 +267,8 @@ kfree(fw_priv); kfree(class_dev); + + module_put(THIS_MODULE); } static void @@ -325,6 +331,7 @@ kfree(class_dev); return retval; } + static int fw_setup_class_device(struct firmware *fw, struct class_device **class_dev_p, const char *fw_name, struct device *device) @@ -338,6 +345,9 @@ if (retval) goto out; + /* Need to pin this module until class device is destroyed */ + __module_get(THIS_MODULE); + fw_priv = class_get_devdata(class_dev); fw_priv->fw = fw; @@ -356,6 +366,7 @@ goto error_unreg; } + set_bit(FW_STATUS_READY, &fw_priv->status); *class_dev_p = class_dev; goto out; @@ -409,6 +420,7 @@ add_timer(&fw_priv->timeout); } + kobject_hotplug("add", &class_dev->kobj); wait_for_completion(&fw_priv->completion); set_bit(FW_STATUS_DONE, &fw_priv->status); diff -Nru a/drivers/block/viodasd.c b/drivers/block/viodasd.c --- a/drivers/block/viodasd.c Tue Mar 2 17:37:07 2004 +++ b/drivers/block/viodasd.c Tue Mar 2 17:37:07 2004 @@ -70,7 +70,6 @@ MAX_DISK_NAME = sizeof(((struct gendisk *)0)->disk_name) }; -static int viodasd_max_disk; static spinlock_t viodasd_spinlock = SPIN_LOCK_UNLOCKED; #define VIOMAXREQ 16 @@ -209,7 +208,6 @@ (int)we.rc, we.sub_result, err->msg); return -EIO; } - viodasd_max_disk = we.max_disk; return 0; } @@ -483,7 +481,17 @@ if (we.rc != 0) return; - viodasd_max_disk = we.max_disk; + if (we.max_disk > (MAX_DISKNO - 1)) { + static int warned; + + if (warned == 0) { + warned++; + printk(VIOD_KERN_INFO + "Only examining the first %d " + "of %d disks connected\n", + MAX_DISKNO, we.max_disk + 1); + } + } /* Send the close event to OS/400. We DON'T expect a response */ hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp, @@ -744,21 +752,8 @@ /* Initialize our request handler */ vio_setHandler(viomajorsubtype_blockio, handle_block_event); - viodasd_max_disk = MAX_DISKNO - 1; - for (i = 0; (i <= viodasd_max_disk) && (i < MAX_DISKNO); i++) { - /* - * Note that probe_disk has side effects: - * a) it updates the size of the disk - * b) it updates viodasd_max_disk - * c) it registers the disk if it has not done so already - */ + for (i = 0; i < MAX_DISKNO; i++) probe_disk(&viodasd_devices[i]); - } - - if (viodasd_max_disk > (MAX_DISKNO - 1)) - printk(VIOD_KERN_INFO - "Only examining the first %d of %d disks connected\n", - MAX_DISKNO, viodasd_max_disk + 1); return 0; } diff -Nru a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c --- a/drivers/bluetooth/bluecard_cs.c Tue Mar 2 17:37:08 2004 +++ b/drivers/bluetooth/bluecard_cs.c Tue Mar 2 17:37:08 2004 @@ -226,7 +226,7 @@ static void bluecard_write_wakeup(bluecard_info_t *info) { if (!info) { - printk(KERN_WARNING "bluecard_cs: Call of write_wakeup for unknown device.\n"); + BT_ERR("Unknown device"); return; } @@ -379,7 +379,7 @@ int i, len; if (!info) { - printk(KERN_WARNING "bluecard_cs: Call of receive for unknown device.\n"); + BT_ERR("Unknown device"); return; } @@ -397,7 +397,7 @@ info->rx_state = RECV_WAIT_PACKET_TYPE; info->rx_count = 0; if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) { - printk(KERN_WARNING "bluecard_cs: Can't allocate mem for new packet.\n"); + BT_ERR("Can't allocate mem for new packet"); return; } } @@ -439,7 +439,7 @@ default: /* unknown packet */ - printk(KERN_WARNING "bluecard_cs: Unknown HCI packet with type 0x%02x received.\n", info->rx_skb->pkt_type); + BT_ERR("Unknown HCI packet with type 0x%02x received", info->rx_skb->pkt_type); info->hdev->stat.err_rx++; kfree_skb(info->rx_skb); @@ -506,7 +506,7 @@ unsigned char reg; if (!info) { - printk(KERN_WARNING "bluecard_cs: Call of irq %d for unknown device.\n", irq); + BT_ERR("Call of irq %d for unknown device", irq); return IRQ_NONE; } @@ -574,7 +574,7 @@ unsigned char cmd[] = { HCI_COMMAND_PKT, 0x09, 0xfc, 0x01, 0x03 }; if (!(skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) { - printk(KERN_WARNING "bluecard_cs: Can't allocate mem for new packet.\n"); + BT_ERR("Can't allocate mem for new packet"); return -1; } @@ -664,7 +664,7 @@ struct hci_dev *hdev = (struct hci_dev *)(skb->dev); if (!hdev) { - printk(KERN_WARNING "bluecard_cs: Frame for unknown HCI device (hdev=NULL)."); + BT_ERR("Frame for unknown HCI device (hdev=NULL)"); return -ENODEV; } @@ -780,7 +780,7 @@ /* Initialize and register HCI device */ hdev = hci_alloc_dev(); if (!hdev) { - printk(KERN_WARNING "bluecard_cs: Can't allocate HCI device.\n"); + BT_ERR("Can't allocate HCI device"); return -ENOMEM; } @@ -799,7 +799,7 @@ hdev->owner = THIS_MODULE; if (hci_register_dev(hdev) < 0) { - printk(KERN_WARNING "bluecard_cs: Can't register HCI device.\n"); + BT_ERR("Can't register HCI device"); hci_free_dev(hdev); return -ENODEV; } @@ -825,7 +825,7 @@ outb(0x80, iobase + 0x30); if (hci_unregister_dev(hdev) < 0) - printk(KERN_WARNING "bluecard_cs: Can't unregister HCI device %s.\n", hdev->name); + BT_ERR("Can't unregister HCI device %s", hdev->name); hci_free_dev(hdev); diff -Nru a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c --- a/drivers/bluetooth/bt3c_cs.c Tue Mar 2 17:37:09 2004 +++ b/drivers/bluetooth/bt3c_cs.c Tue Mar 2 17:37:09 2004 @@ -195,7 +195,7 @@ unsigned long flags; if (!info) { - printk(KERN_WARNING "bt3c_cs: Call of write_wakeup for unknown device.\n"); + BT_ERR("Unknown device"); return; } @@ -222,7 +222,7 @@ len = bt3c_write(iobase, 256, skb->data, skb->len); if (len != skb->len) { - printk(KERN_WARNING "bt3c_cs: very strange\n"); + BT_ERR("Very strange"); } kfree_skb(skb); @@ -241,7 +241,7 @@ int size = 0, avail; if (!info) { - printk(KERN_WARNING "bt3c_cs: Call of receive for unknown device.\n"); + BT_ERR("Unknown device"); return; } @@ -260,7 +260,7 @@ info->rx_state = RECV_WAIT_PACKET_TYPE; info->rx_count = 0; if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) { - printk(KERN_WARNING "bt3c_cs: Can't allocate mem for new packet.\n"); + BT_ERR("Can't allocate mem for new packet"); return; } } @@ -292,7 +292,7 @@ default: /* Unknown packet */ - printk(KERN_WARNING "bt3c_cs: Unknown HCI packet with type 0x%02x received.\n", info->rx_skb->pkt_type); + BT_ERR("Unknown HCI packet with type 0x%02x received", info->rx_skb->pkt_type); info->hdev->stat.err_rx++; clear_bit(HCI_RUNNING, &(info->hdev->flags)); @@ -362,7 +362,7 @@ int iir; if (!info) { - printk(KERN_WARNING "bt3c_cs: Call of irq %d for unknown device.\n", irq); + BT_ERR("Call of irq %d for unknown device", irq); return IRQ_NONE; } @@ -375,16 +375,16 @@ int stat = bt3c_read(iobase, 0x7001); if ((stat & 0xff) == 0x7f) { - printk(KERN_WARNING "bt3c_cs: STRANGE stat=%04x\n", stat); + BT_ERR("Very strange (stat=0x%04x)", stat); } else if ((stat & 0xff) != 0xff) { if (stat & 0x0020) { int stat = bt3c_read(iobase, 0x7002) & 0x10; - printk(KERN_WARNING "bt3c_cs: antena %s\n", stat ? "OUT" : "IN"); + BT_ERR("Antenna %s", stat ? "out" : "in"); } if (stat & 0x0001) bt3c_receive(info); if (stat & 0x0002) { - //printk("bt3c_cs: ACK %04x\n", stat); + //BT_ERR("Ack (stat=0x%04x)", stat); clear_bit(XMIT_SENDING, &(info->tx_state)); bt3c_write_wakeup(info, 1); } @@ -441,7 +441,7 @@ struct hci_dev *hdev = (struct hci_dev *)(skb->dev); if (!hdev) { - printk(KERN_WARNING "bt3c_cs: Frame for unknown HCI device (hdev=NULL)."); + BT_ERR("Frame for unknown HCI device (hdev=NULL)"); return -ENODEV; } @@ -499,7 +499,7 @@ err = call_usermodehelper(FW_LOADER, argv, envp, 1); if (err) - printk(KERN_WARNING "bt3c_cs: Failed to run \"%s pccard %s\" (errno=%d).\n", FW_LOADER, dev, err); + BT_ERR("Failed to run \"%s pccard %s\" (errno=%d)", FW_LOADER, dev, err); return err; } @@ -536,7 +536,7 @@ /* Initialize and register HCI device */ hdev = hci_alloc_dev(); if (!hdev) { - printk(KERN_WARNING "bt3c_cs: Can't allocate HCI device.\n"); + BT_ERR("Can't allocate HCI device"); return -ENOMEM; } @@ -555,7 +555,7 @@ hdev->owner = THIS_MODULE; if (hci_register_dev(hdev) < 0) { - printk(KERN_WARNING "bt3c_cs: Can't register HCI device.\n"); + BT_ERR("Can't register HCI device"); hci_free_dev(hdev); return -ENODEV; } @@ -571,7 +571,7 @@ bt3c_hci_close(hdev); if (hci_unregister_dev(hdev) < 0) - printk(KERN_WARNING "bt3c_cs: Can't unregister HCI device %s.\n", hdev->name); + BT_ERR("Can't unregister HCI device %s", hdev->name); hci_free_dev(hdev); @@ -769,7 +769,7 @@ found_port: if (i != CS_SUCCESS) { - printk(KERN_NOTICE "bt3c_cs: No usable port range found. Giving up.\n"); + BT_ERR("No usable port range found"); cs_error(link->handle, RequestIO, i); goto failed; } diff -Nru a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c --- a/drivers/bluetooth/btuart_cs.c Tue Mar 2 17:37:09 2004 +++ b/drivers/bluetooth/btuart_cs.c Tue Mar 2 17:37:09 2004 @@ -148,7 +148,7 @@ static void btuart_write_wakeup(btuart_info_t *info) { if (!info) { - printk(KERN_WARNING "btuart_cs: Call of write_wakeup for unknown device.\n"); + BT_ERR("Unknown device"); return; } @@ -195,7 +195,7 @@ int boguscount = 0; if (!info) { - printk(KERN_WARNING "btuart_cs: Call of receive for unknown device.\n"); + BT_ERR("Unknown device"); return; } @@ -209,7 +209,7 @@ info->rx_state = RECV_WAIT_PACKET_TYPE; info->rx_count = 0; if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) { - printk(KERN_WARNING "btuart_cs: Can't allocate mem for new packet.\n"); + BT_ERR("Can't allocate mem for new packet"); return; } } @@ -238,7 +238,7 @@ default: /* Unknown packet */ - printk(KERN_WARNING "btuart_cs: Unknown HCI packet with type 0x%02x received.\n", info->rx_skb->pkt_type); + BT_ERR("Unknown HCI packet with type 0x%02x received", info->rx_skb->pkt_type); info->hdev->stat.err_rx++; clear_bit(HCI_RUNNING, &(info->hdev->flags)); @@ -309,7 +309,7 @@ int iir, lsr; if (!info) { - printk(KERN_WARNING "btuart_cs: Call of irq %d for unknown device.\n", irq); + BT_ERR("Call of irq %d for unknown device", irq); return IRQ_NONE; } @@ -325,7 +325,7 @@ switch (iir) { case UART_IIR_RLSI: - printk(KERN_NOTICE "btuart_cs: RLSI\n"); + BT_ERR("RLSI"); break; case UART_IIR_RDI: /* Receive interrupt */ @@ -338,7 +338,7 @@ } break; default: - printk(KERN_NOTICE "btuart_cs: Unhandled IIR=%#x\n", iir); + BT_ERR("Unhandled IIR=%#x", iir); break; } @@ -365,7 +365,7 @@ int divisor; if (!info) { - printk(KERN_WARNING "btuart_cs: Call of change speed for unknown device.\n"); + BT_ERR("Unknown device"); return; } @@ -447,7 +447,7 @@ struct hci_dev *hdev = (struct hci_dev *)(skb->dev); if (!hdev) { - printk(KERN_WARNING "btuart_cs: Frame for unknown HCI device (hdev=NULL)."); + BT_ERR("Frame for unknown HCI device (hdev=NULL)"); return -ENODEV; } @@ -531,7 +531,7 @@ /* Initialize and register HCI device */ hdev = hci_alloc_dev(); if (!hdev) { - printk(KERN_WARNING "btuart_cs: Can't allocate HCI device.\n"); + BT_ERR("Can't allocate HCI device"); return -ENOMEM; } @@ -550,7 +550,7 @@ hdev->owner = THIS_MODULE; if (hci_register_dev(hdev) < 0) { - printk(KERN_WARNING "btuart_cs: Can't register HCI device.\n"); + BT_ERR("Can't register HCI device"); hci_free_dev(hdev); return -ENODEV; } @@ -578,7 +578,7 @@ spin_unlock_irqrestore(&(info->lock), flags); if (hci_unregister_dev(hdev) < 0) - printk(KERN_WARNING "btuart_cs: Can't unregister HCI device %s.\n", hdev->name); + BT_ERR("Can't unregister HCI device %s", hdev->name); hci_free_dev(hdev); @@ -777,7 +777,7 @@ found_port: if (i != CS_SUCCESS) { - printk(KERN_NOTICE "btuart_cs: No usable port range found. Giving up.\n"); + BT_ERR("No usable port range found"); cs_error(link->handle, RequestIO, i); goto failed; } diff -Nru a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c --- a/drivers/bluetooth/dtl1_cs.c Tue Mar 2 17:37:08 2004 +++ b/drivers/bluetooth/dtl1_cs.c Tue Mar 2 17:37:08 2004 @@ -150,7 +150,7 @@ static void dtl1_write_wakeup(dtl1_info_t *info) { if (!info) { - printk(KERN_WARNING "dtl1_cs: Call of write_wakeup for unknown device.\n"); + BT_ERR("Unknown device"); return; } @@ -201,9 +201,9 @@ u8 flowmask = *(u8 *)skb->data; int i; - printk(KERN_INFO "dtl1_cs: Nokia control data = "); + printk(KERN_INFO "Bluetooth: Nokia control data ="); for (i = 0; i < skb->len; i++) { - printk("%02x ", skb->data[i]); + printk(" %02x", skb->data[i]); } printk("\n"); @@ -226,7 +226,7 @@ int boguscount = 0; if (!info) { - printk(KERN_WARNING "dtl1_cs: Call of receive for unknown device.\n"); + BT_ERR("Unknown device"); return; } @@ -238,7 +238,7 @@ /* Allocate packet */ if (info->rx_skb == NULL) if (!(info->rx_skb = bt_skb_alloc(HCI_MAX_FRAME_SIZE, GFP_ATOMIC))) { - printk(KERN_WARNING "dtl1_cs: Can't allocate mem for new packet.\n"); + BT_ERR("Can't allocate mem for new packet"); info->rx_state = RECV_WAIT_NSH; info->rx_count = NSHL; return; @@ -283,7 +283,7 @@ break; default: /* unknown packet */ - printk(KERN_WARNING "dtl1_cs: Unknown HCI packet with type 0x%02x received.\n", info->rx_skb->pkt_type); + BT_ERR("Unknown HCI packet with type 0x%02x received", info->rx_skb->pkt_type); kfree_skb(info->rx_skb); break; } @@ -313,7 +313,7 @@ int iir, lsr; if (!info) { - printk(KERN_WARNING "dtl1_cs: Call of irq %d for unknown device.\n", irq); + BT_ERR("Call of irq %d for unknown device", irq); return IRQ_NONE; } @@ -329,7 +329,7 @@ switch (iir) { case UART_IIR_RLSI: - printk(KERN_NOTICE "dtl1_cs: RLSI\n"); + BT_ERR("RLSI"); break; case UART_IIR_RDI: /* Receive interrupt */ @@ -342,7 +342,7 @@ } break; default: - printk(KERN_NOTICE "dtl1_cs: Unhandled IIR=%#x\n", iir); + BT_ERR("Unhandled IIR=%#x", iir); break; } @@ -410,7 +410,7 @@ nsh_t nsh; if (!hdev) { - printk(KERN_WARNING "dtl1_cs: Frame for unknown HCI device (hdev=NULL)."); + BT_ERR("Frame for unknown HCI device (hdev=NULL)"); return -ENODEV; } @@ -510,7 +510,7 @@ /* Initialize and register HCI device */ hdev = hci_alloc_dev(); if (!hdev) { - printk(KERN_WARNING "dtl1_cs: Can't allocate HCI device.\n"); + BT_ERR("Can't allocate HCI device"); return -ENOMEM; } @@ -529,7 +529,7 @@ hdev->owner = THIS_MODULE; if (hci_register_dev(hdev) < 0) { - printk(KERN_WARNING "dtl1_cs: Can't register HCI device.\n"); + BT_ERR("Can't register HCI device"); hci_free_dev(hdev); return -ENODEV; } @@ -557,7 +557,7 @@ spin_unlock_irqrestore(&(info->lock), flags); if (hci_unregister_dev(hdev) < 0) - printk(KERN_WARNING "dtl1_cs: Can't unregister HCI device %s.\n", hdev->name); + BT_ERR("Can't unregister HCI device %s", hdev->name); hci_free_dev(hdev); diff -Nru a/drivers/char/cyclades.c b/drivers/char/cyclades.c --- a/drivers/char/cyclades.c Tue Mar 2 17:37:07 2004 +++ b/drivers/char/cyclades.c Tue Mar 2 17:37:07 2004 @@ -5411,6 +5411,7 @@ cy_serial_driver->owner = THIS_MODULE; cy_serial_driver->driver_name = "cyclades"; cy_serial_driver->name = "ttyC"; + cy_serial_driver->devfs_name = "tts/C"; cy_serial_driver->major = CYCLADES_MAJOR; cy_serial_driver->minor_start = 0; cy_serial_driver->type = TTY_DRIVER_TYPE_SERIAL; diff -Nru a/drivers/char/epca.c b/drivers/char/epca.c --- a/drivers/char/epca.c Tue Mar 2 17:37:08 2004 +++ b/drivers/char/epca.c Tue Mar 2 17:37:08 2004 @@ -1644,6 +1644,7 @@ pc_driver->owner = THIS_MODULE; pc_driver->name = "ttyD"; + pc_driver->devfs_name = "tts/D"; pc_driver->major = DIGI_MAJOR; pc_driver->minor_start = 0; pc_driver->type = TTY_DRIVER_TYPE_SERIAL; diff -Nru a/drivers/char/esp.c b/drivers/char/esp.c --- a/drivers/char/esp.c Tue Mar 2 17:37:07 2004 +++ b/drivers/char/esp.c Tue Mar 2 17:37:07 2004 @@ -2491,6 +2491,7 @@ esp_driver->owner = THIS_MODULE; esp_driver->name = "ttyP"; + esp_driver->devfs_name = "tts/P"; esp_driver->major = ESP_IN_MAJOR; esp_driver->minor_start = 0; esp_driver->type = TTY_DRIVER_TYPE_SERIAL; diff -Nru a/drivers/char/isicom.c b/drivers/char/isicom.c --- a/drivers/char/isicom.c Tue Mar 2 17:37:07 2004 +++ b/drivers/char/isicom.c Tue Mar 2 17:37:07 2004 @@ -1627,6 +1627,7 @@ isicom_normal->owner = THIS_MODULE; isicom_normal->name = "ttyM"; + isicom_normal->devfs_name = "isicom/"; isicom_normal->major = ISICOM_NMAJOR; isicom_normal->minor_start = 0; isicom_normal->type = TTY_DRIVER_TYPE_SERIAL; diff -Nru a/drivers/char/moxa.c b/drivers/char/moxa.c --- a/drivers/char/moxa.c Tue Mar 2 17:37:09 2004 +++ b/drivers/char/moxa.c Tue Mar 2 17:37:09 2004 @@ -309,6 +309,7 @@ init_MUTEX(&moxaBuffSem); moxaDriver->owner = THIS_MODULE; moxaDriver->name = "ttya"; + moxaDriver->devfs_name = "tts/a"; moxaDriver->major = ttymajor; moxaDriver->minor_start = 0; moxaDriver->type = TTY_DRIVER_TYPE_SERIAL; diff -Nru a/drivers/char/pcxx.c b/drivers/char/pcxx.c --- a/drivers/char/pcxx.c Tue Mar 2 17:37:08 2004 +++ b/drivers/char/pcxx.c Tue Mar 2 17:37:08 2004 @@ -1150,6 +1150,7 @@ pcxe_driver->owner = THIS_MODULE; pcxe_driver->name = "ttyD"; + pcxe_driver->devfs_name = "pcxe/"; pcxe_driver->major = DIGI_MAJOR; pcxe_driver->minor_start = 0; pcxe_driver->type = TTY_DRIVER_TYPE_SERIAL; diff -Nru a/drivers/char/riscom8.c b/drivers/char/riscom8.c --- a/drivers/char/riscom8.c Tue Mar 2 17:37:08 2004 +++ b/drivers/char/riscom8.c Tue Mar 2 17:37:08 2004 @@ -1687,6 +1687,7 @@ memset(IRQ_to_board, 0, sizeof(IRQ_to_board)); riscom_driver->owner = THIS_MODULE; riscom_driver->name = "ttyL"; + riscom_driver->devfs_name = "tts/L"; riscom_driver->major = RISCOM8_NORMAL_MAJOR; riscom_driver->type = TTY_DRIVER_TYPE_SERIAL; riscom_driver->subtype = SERIAL_TYPE_NORMAL; diff -Nru a/drivers/char/vt.c b/drivers/char/vt.c --- a/drivers/char/vt.c Tue Mar 2 17:37:09 2004 +++ b/drivers/char/vt.c Tue Mar 2 17:37:09 2004 @@ -2743,12 +2743,12 @@ * Called only if powerdown features are allowed. */ switch (vesa_blank_mode) { - case VESA_NO_BLANKING: - c->vc_sw->con_blank(c, VESA_VSYNC_SUSPEND+1); + case VESA_NO_BLANKING: + c->vc_sw->con_blank(c, VESA_VSYNC_SUSPEND+1, 0); break; - case VESA_VSYNC_SUSPEND: - case VESA_HSYNC_SUSPEND: - c->vc_sw->con_blank(c, VESA_POWERDOWN+1); + case VESA_VSYNC_SUSPEND: + case VESA_HSYNC_SUSPEND: + c->vc_sw->con_blank(c, VESA_POWERDOWN+1, 0); break; } } @@ -2776,7 +2776,7 @@ if (entering_gfx) { hide_cursor(currcons); save_screen(currcons); - sw->con_blank(vc_cons[currcons].d, -1); + sw->con_blank(vc_cons[currcons].d, -1, 1); console_blanked = fg_console + 1; set_origin(currcons); return; @@ -2794,7 +2794,7 @@ save_screen(currcons); /* In case we need to reset origin, blanking hook returns 1 */ - i = sw->con_blank(vc_cons[currcons].d, 1); + i = sw->con_blank(vc_cons[currcons].d, 1, 0); console_blanked = fg_console + 1; if (i) set_origin(currcons); @@ -2808,14 +2808,14 @@ } if (vesa_blank_mode) - sw->con_blank(vc_cons[currcons].d, vesa_blank_mode + 1); + sw->con_blank(vc_cons[currcons].d, vesa_blank_mode + 1, 0); } /* * Called by timer as well as from vt_console_driver */ -void unblank_screen(void) +void do_unblank_screen(int leaving_gfx) { int currcons; @@ -2839,13 +2839,24 @@ } console_blanked = 0; - if (sw->con_blank(vc_cons[currcons].d, 0)) + if (sw->con_blank(vc_cons[currcons].d, 0, leaving_gfx)) /* Low-level driver cannot restore -> do it ourselves */ update_screen(fg_console); if (console_blank_hook) console_blank_hook(0); set_palette(currcons); set_cursor(fg_console); +} + +/* + * This is called by the outside world to cause a forced unblank, mostly for + * oopses. Currently, I just call do_unblank_screen(0), but we could eventually + * call it with 1 as an argument and so force a mode restore... that may kill + * X or at least garbage the screen but would also make the Oops visible... + */ +void unblank_screen(void) +{ + do_unblank_screen(0); } /* diff -Nru a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c --- a/drivers/char/vt_ioctl.c Tue Mar 2 17:37:08 2004 +++ b/drivers/char/vt_ioctl.c Tue Mar 2 17:37:08 2004 @@ -497,7 +497,7 @@ */ acquire_console_sem(); if (arg == KD_TEXT) - unblank_screen(); + do_unblank_screen(1); else do_blank_screen(1); release_console_sem(); @@ -1103,7 +1103,7 @@ if (old_vc_mode != vt_cons[new_console]->vc_mode) { if (vt_cons[new_console]->vc_mode == KD_TEXT) - unblank_screen(); + do_unblank_screen(1); else do_blank_screen(1); } @@ -1138,7 +1138,7 @@ if (old_vc_mode != vt_cons[new_console]->vc_mode) { if (vt_cons[new_console]->vc_mode == KD_TEXT) - unblank_screen(); + do_unblank_screen(1); else do_blank_screen(1); } diff -Nru a/drivers/char/watchdog/Kconfig b/drivers/char/watchdog/Kconfig --- a/drivers/char/watchdog/Kconfig Tue Mar 2 17:37:08 2004 +++ b/drivers/char/watchdog/Kconfig Tue Mar 2 17:37:08 2004 @@ -339,6 +339,30 @@ To compile this driver as a module, choose M here: the module will be called shwdt. +# SPARC64 Architecture + +config WATCHDOG_CP1XXX + tristate "CP1XXX Hardware Watchdog support" + depends on WATCHDOG && SPARC64 && PCI + ---help--- + This is the driver for the hardware watchdog timers present on + Sun Microsystems CompactPCI models CP1400 and CP1500. + + To compile this driver as a module, choose M here: the + module will be called cpwatchdog. + + If you do not have a CompactPCI model CP1400 or CP1500, or + another UltraSPARC-IIi-cEngine boardset with hardware watchdog, + you should say N to this option. + +config WATCHDOG_RIO + tristate "RIO Hardware Watchdog support" + depends on WATCHDOG && SPARC64 && PCI + help + Say Y here to support the hardware watchdog capability on Sun RIO + machines. The watchdog timeout period is normally one minute but + can be changed with a boot-time parameter. + # # ISA-based Watchdog Cards # @@ -454,5 +478,27 @@ /dev/temperature yields one byte, the temperature in degrees Fahrenheit. This works only if you have a WDT501P watchdog board installed. + +# +# USB-based Watchdog Cards +# + +comment "USB-based Watchdog Cards" + depends on WATCHDOG && USB + +config USBPCWATCHDOG + tristate "Berkshire Products USB-PC Watchdog" + depends on WATCHDOG && USB + ---help--- + This is the driver for the Berkshire Products USB-PC Watchdog card. + This card simply watches your kernel to make sure it doesn't freeze, + and if it does, it reboots your computer after a certain amount of + time. The card can also monitor the internal temperature of the PC. + More info is available at . + + To compile this driver as a module, choose M here: the + module will be called pcwd_usb. + + Most people will say N. endmenu diff -Nru a/drivers/char/watchdog/Makefile b/drivers/char/watchdog/Makefile --- a/drivers/char/watchdog/Makefile Tue Mar 2 17:37:08 2004 +++ b/drivers/char/watchdog/Makefile Tue Mar 2 17:37:08 2004 @@ -1,5 +1,5 @@ # -# Makefile for the kernel character device drivers. +# Makefile for the WatchDog device drivers. # # Only one watchdog can succeed. We probe the hardware watchdog @@ -35,3 +35,4 @@ obj-$(CONFIG_AMD7XX_TCO) += amd7xx_tco.o obj-$(CONFIG_INDYDOG) += indydog.o obj-$(CONFIG_PCIPCWATCHDOG) += pcwd_pci.o +obj-$(CONFIG_USBPCWATCHDOG) += pcwd_usb.o diff -Nru a/drivers/char/watchdog/cpu5wdt.c b/drivers/char/watchdog/cpu5wdt.c --- a/drivers/char/watchdog/cpu5wdt.c Tue Mar 2 17:37:08 2004 +++ b/drivers/char/watchdog/cpu5wdt.c Tue Mar 2 17:37:08 2004 @@ -293,6 +293,7 @@ MODULE_DESCRIPTION("sma cpu5 watchdog driver"); MODULE_SUPPORTED_DEVICE("sma cpu5 watchdog"); MODULE_LICENSE("GPL"); +MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); MODULE_PARM(port, "i"); MODULE_PARM_DESC(port, "base address of watchdog card, default is 0x91"); diff -Nru a/drivers/char/watchdog/eurotechwdt.c b/drivers/char/watchdog/eurotechwdt.c --- a/drivers/char/watchdog/eurotechwdt.c Tue Mar 2 17:37:07 2004 +++ b/drivers/char/watchdog/eurotechwdt.c Tue Mar 2 17:37:07 2004 @@ -503,3 +503,4 @@ MODULE_AUTHOR("Rodolfo Giometti"); MODULE_DESCRIPTION("Driver for Eurotech CPU-1220/1410 on board watchdog"); MODULE_LICENSE("GPL"); +MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); diff -Nru a/drivers/char/watchdog/ib700wdt.c b/drivers/char/watchdog/ib700wdt.c --- a/drivers/char/watchdog/ib700wdt.c Tue Mar 2 17:37:09 2004 +++ b/drivers/char/watchdog/ib700wdt.c Tue Mar 2 17:37:09 2004 @@ -350,5 +350,6 @@ MODULE_AUTHOR("Charles Howes "); MODULE_DESCRIPTION("IB700 SBC watchdog driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); /* end of ib700wdt.c */ diff -Nru a/drivers/char/watchdog/machzwd.c b/drivers/char/watchdog/machzwd.c --- a/drivers/char/watchdog/machzwd.c Tue Mar 2 17:37:07 2004 +++ b/drivers/char/watchdog/machzwd.c Tue Mar 2 17:37:07 2004 @@ -98,6 +98,7 @@ MODULE_AUTHOR("Fernando Fuganti "); MODULE_DESCRIPTION("MachZ ZF-Logic Watchdog driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); #ifdef CONFIG_WATCHDOG_NOWAYOUT static int nowayout = 1; diff -Nru a/drivers/char/watchdog/mixcomwd.c b/drivers/char/watchdog/mixcomwd.c --- a/drivers/char/watchdog/mixcomwd.c Tue Mar 2 17:37:08 2004 +++ b/drivers/char/watchdog/mixcomwd.c Tue Mar 2 17:37:08 2004 @@ -302,4 +302,7 @@ module_init(mixcomwd_init); module_exit(mixcomwd_exit); +MODULE_AUTHOR("Gergely Madarasz "); +MODULE_DESCRIPTION("MixCom Watchdog driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); diff -Nru a/drivers/char/watchdog/pcwd.c b/drivers/char/watchdog/pcwd.c --- a/drivers/char/watchdog/pcwd.c Tue Mar 2 17:37:07 2004 +++ b/drivers/char/watchdog/pcwd.c Tue Mar 2 17:37:07 2004 @@ -705,5 +705,8 @@ module_init(pcwatchdog_init); module_exit(pcwatchdog_exit); +MODULE_AUTHOR("Ken Hollis "); +MODULE_DESCRIPTION("Berkshire ISA-PC Watchdog driver"); MODULE_LICENSE("GPL"); - +MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); +MODULE_ALIAS_MISCDEV(TEMP_MINOR); diff -Nru a/drivers/char/watchdog/pcwd_usb.c b/drivers/char/watchdog/pcwd_usb.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/drivers/char/watchdog/pcwd_usb.c Tue Mar 2 17:37:09 2004 @@ -0,0 +1,810 @@ +/* + * Berkshire USB-PC Watchdog Card Driver + * + * (c) Copyright 2004 Wim Van Sebroeck . + * + * Based on source code of the following authors: + * Ken Hollis , + * Alan Cox , + * Matt Domsch , + * Rob Radez , + * Greg Kroah-Hartman + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * Neither Wim Van Sebroeck nor Iguana vzw. admit liability nor + * provide warranty for any of this software. This material is + * provided "AS-IS" and at no charge. + * + * Thanks also to Simon Machell at Berkshire Products Inc. for + * providing the test hardware. More info is available at + * http://www.berkprod.com/ or http://www.pcwatchdog.com/ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#ifdef CONFIG_USB_DEBUG + static int debug = 1; +#else + static int debug; +#endif + +/* Use our own dbg macro */ +#undef dbg +#define dbg(format, arg...) do { if (debug) printk(KERN_DEBUG PFX format "\n" , ## arg); } while (0) + + +/* Module and Version Information */ +#define DRIVER_VERSION "v1.00 (28/02/2004)" +#define DRIVER_AUTHOR "Wim Van Sebroeck " +#define DRIVER_DESC "Berkshire USB-PC Watchdog driver" +#define DRIVER_LICENSE "GPL" +#define DRIVER_NAME "pcwd_usb" +#define PFX DRIVER_NAME ": " + +MODULE_AUTHOR(DRIVER_AUTHOR); +MODULE_DESCRIPTION(DRIVER_DESC); +MODULE_LICENSE(DRIVER_LICENSE); +MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); +MODULE_ALIAS_MISCDEV(TEMP_MINOR); + +/* Module Parameters */ +module_param(debug, int, 0); +MODULE_PARM_DESC(debug, "Debug enabled or not"); + +#define WATCHDOG_HEARTBEAT 2 /* 2 sec default heartbeat */ +static int heartbeat = WATCHDOG_HEARTBEAT; +module_param(heartbeat, int, 0); +MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0context; + unsigned char *data = usb_pcwd->intr_buffer; + int retval; + + switch (urb->status) { + case 0: /* success */ + break; + case -ECONNRESET: /* unlink */ + case -ENOENT: + case -ESHUTDOWN: + /* this urb is terminated, clean up */ + dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status); + return; + /* -EPIPE: should clear the halt */ + default: /* error */ + dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status); + goto resubmit; + } + + dbg("received following data cmd=0x%02x msb=0x%02x lsb=0x%02x", + data[0], data[1], data[2]); + + usb_pcwd->cmd_command = data[0]; + usb_pcwd->cmd_data_msb = data[1]; + usb_pcwd->cmd_data_lsb = data[2]; + + /* notify anyone waiting that the cmd has finished */ + atomic_set (&usb_pcwd->cmd_received, 1); + +resubmit: + retval = usb_submit_urb (urb, GFP_ATOMIC); + if (retval) + printk(KERN_ERR PFX "can't resubmit intr, usb_submit_urb failed with result %d\n", + retval); +} + +static int usb_pcwd_send_command(struct usb_pcwd_private *usb_pcwd, unsigned char cmd, + unsigned char *msb, unsigned char *lsb) +{ + int got_response, count; + unsigned char buf[6]; + + /* We will not send any commands if the USB PCWD device does not exist */ + if ((!usb_pcwd) || (!usb_pcwd->exists)) + return -1; + + /* The USB PC Watchdog uses a 6 byte report format. The board currently uses + * only 3 of the six bytes of the report. */ + buf[0] = cmd; /* Byte 0 = CMD */ + buf[1] = *msb; /* Byte 1 = Data MSB */ + buf[2] = *lsb; /* Byte 2 = Data LSB */ + buf[3] = buf[4] = buf[5] = 0; /* All other bytes not used */ + + dbg("sending following data cmd=0x%02x msb=0x%02x lsb=0x%02x", + buf[0], buf[1], buf[2]); + + atomic_set (&usb_pcwd->cmd_received, 0); + + if (usb_control_msg(usb_pcwd->udev, usb_sndctrlpipe(usb_pcwd->udev, 0), + HID_REQ_SET_REPORT, HID_DT_REPORT, + 0x0200, usb_pcwd->interface_number, buf, sizeof(buf), + HZ) != sizeof(buf)) { + dbg("usb_pcwd_send_command: error in usb_control_msg for cmd 0x%x 0x%x 0x%x\n", cmd, *msb, *lsb); + } + /* wait till the usb card processed the command, + * with a max. timeout of USB_COMMAND_TIMEOUT */ + got_response = 0; + for (count = 0; (count < USB_COMMAND_TIMEOUT) && (!got_response); count++) { + mdelay(1); + if (atomic_read (&usb_pcwd->cmd_received)) + got_response = 1; + } + + if ((got_response) && (cmd == usb_pcwd->cmd_command)) { + /* read back response */ + *msb = usb_pcwd->cmd_data_msb; + *lsb = usb_pcwd->cmd_data_lsb; + } + + return got_response; +} + +static int usb_pcwd_start(struct usb_pcwd_private *usb_pcwd) +{ + unsigned char msb = 0x00; + unsigned char lsb = 0x00; + int retval; + + /* Enable Watchdog */ + retval = usb_pcwd_send_command(usb_pcwd, CMD_ENABLE_WATCHDOG, &msb, &lsb); + + if ((retval == 0) || (lsb == 0)) { + printk(KERN_ERR PFX "Card did not acknowledge enable attempt\n"); + return -1; + } + + return 0; +} + +static int usb_pcwd_stop(struct usb_pcwd_private *usb_pcwd) +{ + unsigned char msb = 0xA5; + unsigned char lsb = 0xC3; + int retval; + + /* Disable Watchdog */ + retval = usb_pcwd_send_command(usb_pcwd, CMD_DISABLE_WATCHDOG, &msb, &lsb); + + if ((retval == 0) || (lsb != 0)) { + printk(KERN_ERR PFX "Card did not acknowledge disable attempt\n"); + return -1; + } + + return 0; +} + +static int usb_pcwd_keepalive(struct usb_pcwd_private *usb_pcwd) +{ + unsigned char dummy; + + /* Re-trigger Watchdog */ + usb_pcwd_send_command(usb_pcwd, CMD_TRIGGER, &dummy, &dummy); + + return 0; +} + +static int usb_pcwd_set_heartbeat(struct usb_pcwd_private *usb_pcwd, int t) +{ + unsigned char msb = t / 256; + unsigned char lsb = t % 256; + + if ((t < 0x0001) || (t > 0xFFFF)) + return -EINVAL; + + /* Write new heartbeat to watchdog */ + usb_pcwd_send_command(usb_pcwd, CMD_WRITE_WATCHDOG_TIMEOUT, &msb, &lsb); + + heartbeat = t; + return 0; +} + +static int usb_pcwd_get_temperature(struct usb_pcwd_private *usb_pcwd, int *temperature) +{ + unsigned char msb, lsb; + + usb_pcwd_send_command(usb_pcwd, CMD_READ_TEMP, &msb, &lsb); + + /* + * Convert celsius to fahrenheit, since this was + * the decided 'standard' for this return value. + */ + *temperature = (lsb * 9 / 5) + 32; + + return 0; +} + +/* + * /dev/watchdog handling + */ + +static ssize_t usb_pcwd_write(struct file *file, const char *data, + size_t len, loff_t *ppos) +{ + /* Can't seek (pwrite) on this device */ + if (ppos != &file->f_pos) + return -ESPIPE; + + /* See if we got the magic character 'V' and reload the timer */ + if (len) { + if (!nowayout) { + size_t i; + + /* note: just in case someone wrote the magic character + * five months ago... */ + expect_release = 0; + + /* scan to see whether or not we got the magic character */ + for (i = 0; i != len; i++) { + char c; + if(get_user(c, data+i)) + return -EFAULT; + if (c == 'V') + expect_release = 42; + } + } + + /* someone wrote to us, we should reload the timer */ + usb_pcwd_keepalive(usb_pcwd_device); + } + return len; +} + +static int usb_pcwd_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) +{ + static struct watchdog_info ident = { + .options = WDIOF_KEEPALIVEPING | + WDIOF_SETTIMEOUT | + WDIOF_MAGICCLOSE, + .firmware_version = 1, + .identity = DRIVER_NAME, + }; + + switch (cmd) { + case WDIOC_GETSUPPORT: + return copy_to_user((struct watchdog_info *) arg, &ident, + sizeof (ident)) ? -EFAULT : 0; + + case WDIOC_GETSTATUS: + case WDIOC_GETBOOTSTATUS: + return put_user(0, (int *) arg); + + case WDIOC_GETTEMP: + { + int temperature; + + if (usb_pcwd_get_temperature(usb_pcwd_device, &temperature)) + return -EFAULT; + + return put_user(temperature, (int *) arg); + } + + case WDIOC_KEEPALIVE: + usb_pcwd_keepalive(usb_pcwd_device); + return 0; + + case WDIOC_SETOPTIONS: + { + int new_options, retval = -EINVAL; + + if (get_user (new_options, (int *) arg)) + return -EFAULT; + + if (new_options & WDIOS_DISABLECARD) { + usb_pcwd_stop(usb_pcwd_device); + retval = 0; + } + + if (new_options & WDIOS_ENABLECARD) { + usb_pcwd_start(usb_pcwd_device); + retval = 0; + } + + return retval; + } + + case WDIOC_SETTIMEOUT: + { + int new_heartbeat; + + if (get_user(new_heartbeat, (int *) arg)) + return -EFAULT; + + if (usb_pcwd_set_heartbeat(usb_pcwd_device, new_heartbeat)) + return -EINVAL; + + usb_pcwd_keepalive(usb_pcwd_device); + /* Fall */ + } + + case WDIOC_GETTIMEOUT: + return put_user(heartbeat, (int *)arg); + + default: + return -ENOIOCTLCMD; + } +} + +static int usb_pcwd_open(struct inode *inode, struct file *file) +{ + /* /dev/watchdog can only be opened once */ + if (test_and_set_bit(0, &is_active)) + return -EBUSY; + + /* Activate */ + usb_pcwd_start(usb_pcwd_device); + usb_pcwd_keepalive(usb_pcwd_device); + return 0; +} + +static int usb_pcwd_release(struct inode *inode, struct file *file) +{ + /* + * Shut off the timer. + */ + if (expect_release == 42) { + usb_pcwd_stop(usb_pcwd_device); + } else { + printk(KERN_CRIT PFX "Unexpected close, not stopping watchdog!\n"); + usb_pcwd_keepalive(usb_pcwd_device); + } + clear_bit(0, &is_active); + expect_release = 0; + return 0; +} + +/* + * /dev/temperature handling + */ + +static ssize_t usb_pcwd_temperature_read(struct file *file, char *data, + size_t len, loff_t *ppos) +{ + int temperature; + + /* Can't seek (pwrite) on this device */ + if (ppos != &file->f_pos) + return -ESPIPE; + + if (usb_pcwd_get_temperature(usb_pcwd_device, &temperature)) + return -EFAULT; + + if (copy_to_user (data, &temperature, 1)) + return -EFAULT; + + return 1; +} + +static int usb_pcwd_temperature_open(struct inode *inode, struct file *file) +{ + return 0; +} + +static int usb_pcwd_temperature_release(struct inode *inode, struct file *file) +{ + return 0; +} + +/* + * Notify system + */ + +static int usb_pcwd_notify_sys(struct notifier_block *this, unsigned long code, void *unused) +{ + if (code==SYS_DOWN || code==SYS_HALT) { + /* Turn the WDT off */ + usb_pcwd_stop(usb_pcwd_device); + } + + return NOTIFY_DONE; +} + +/* + * Kernel Interfaces + */ + +static struct file_operations usb_pcwd_fops = { + .owner = THIS_MODULE, + .llseek = no_llseek, + .write = usb_pcwd_write, + .ioctl = usb_pcwd_ioctl, + .open = usb_pcwd_open, + .release = usb_pcwd_release, +}; + +static struct miscdevice usb_pcwd_miscdev = { + .minor = WATCHDOG_MINOR, + .name = "watchdog", + .fops = &usb_pcwd_fops, +}; + +static struct file_operations usb_pcwd_temperature_fops = { + .owner = THIS_MODULE, + .llseek = no_llseek, + .read = usb_pcwd_temperature_read, + .open = usb_pcwd_temperature_open, + .release = usb_pcwd_temperature_release, +}; + +static struct miscdevice usb_pcwd_temperature_miscdev = { + .minor = TEMP_MINOR, + .name = "temperature", + .fops = &usb_pcwd_temperature_fops, +}; + +static struct notifier_block usb_pcwd_notifier = { + .notifier_call = usb_pcwd_notify_sys, +}; + +/** + * usb_pcwd_delete + */ +static inline void usb_pcwd_delete (struct usb_pcwd_private *usb_pcwd) +{ + if (usb_pcwd->intr_urb != NULL) + usb_free_urb (usb_pcwd->intr_urb); + if (usb_pcwd->intr_buffer != NULL) + usb_buffer_free(usb_pcwd->udev, usb_pcwd->intr_size, + usb_pcwd->intr_buffer, usb_pcwd->intr_dma); + kfree (usb_pcwd); +} + +/** + * usb_pcwd_probe + * + * Called by the usb core when a new device is connected that it thinks + * this driver might be interested in. + */ +static int usb_pcwd_probe(struct usb_interface *interface, const struct usb_device_id *id) +{ + struct usb_device *udev = interface_to_usbdev(interface); + struct usb_host_interface *iface_desc; + struct usb_endpoint_descriptor *endpoint; + struct usb_pcwd_private *usb_pcwd = NULL; + int pipe, maxp; + int retval = -ENOMEM; + int got_fw_rev; + unsigned char fw_rev_major, fw_rev_minor; + char fw_ver_str[20]; + unsigned char option_switches, dummy; + + /* See if the device offered us matches what we can accept */ + if ((udev->descriptor.idVendor != USB_PCWD_VENDOR_ID) || + (udev->descriptor.idProduct != USB_PCWD_PRODUCT_ID)) { + return -ENODEV; + } + + cards_found++; + if (cards_found > 1) { + printk(KERN_ERR PFX "This driver only supports 1 device\n"); + return -ENODEV; + } + + /* get the active interface descriptor */ + iface_desc = &interface->altsetting[interface->act_altsetting]; + + /* check out that we have a HID device */ + if (!(iface_desc->desc.bInterfaceClass == USB_CLASS_HID)) { + printk(KERN_ERR PFX "The device isn't a Human Interface Device\n"); + return -ENODEV; + } + + /* check out the endpoint: it has to be Interrupt & IN */ + endpoint = &iface_desc->endpoint[0].desc; + + if (!((endpoint->bEndpointAddress & USB_DIR_IN) && + ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) + == USB_ENDPOINT_XFER_INT))) { + /* we didn't find a Interrupt endpoint with direction IN */ + printk(KERN_ERR PFX "Couldn't find an INTR & IN endpoint\n"); + return -ENODEV; + } + + /* get a handle to the interrupt data pipe */ + pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress); + maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe)); + + /* allocate memory for our device and initialize it */ + usb_pcwd = kmalloc (sizeof(struct usb_pcwd_private), GFP_KERNEL); + if (usb_pcwd == NULL) { + printk(KERN_ERR PFX "Out of memory\n"); + goto error; + } + memset (usb_pcwd, 0x00, sizeof (*usb_pcwd)); + + usb_pcwd_device = usb_pcwd; + + init_MUTEX (&usb_pcwd->sem); + usb_pcwd->udev = udev; + usb_pcwd->interface = interface; + usb_pcwd->interface_number = iface_desc->desc.bInterfaceNumber; + usb_pcwd->intr_size = (endpoint->wMaxPacketSize > 8 ? endpoint->wMaxPacketSize : 8); + + /* set up the memory buffer's */ + if (!(usb_pcwd->intr_buffer = usb_buffer_alloc(udev, usb_pcwd->intr_size, SLAB_ATOMIC, &usb_pcwd->intr_dma))) { + printk(KERN_ERR PFX "Out of memory\n"); + goto error; + } + + /* allocate the urb's */ + usb_pcwd->intr_urb = usb_alloc_urb(0, GFP_KERNEL); + if (!usb_pcwd->intr_urb) { + printk(KERN_ERR PFX "Out of memory\n"); + goto error; + } + + /* initialise the intr urb's */ + usb_fill_int_urb(usb_pcwd->intr_urb, udev, pipe, + usb_pcwd->intr_buffer, usb_pcwd->intr_size, + usb_pcwd_intr_done, usb_pcwd, endpoint->bInterval); + usb_pcwd->intr_urb->transfer_dma = usb_pcwd->intr_dma; + usb_pcwd->intr_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; + + /* register our interrupt URB with the USB system */ + if (usb_submit_urb(usb_pcwd->intr_urb, GFP_KERNEL)) { + printk(KERN_ERR PFX "Problem registering interrupt URB\n"); + retval = -EIO; /* failure */ + goto error; + } + + /* The device exists and can be communicated with */ + usb_pcwd->exists = 1; + + /* disable card */ + usb_pcwd_stop(usb_pcwd); + + /* Get the Firmware Version */ + got_fw_rev = usb_pcwd_send_command(usb_pcwd, CMD_GET_FIRMWARE_VERSION, &fw_rev_major, &fw_rev_minor); + if (got_fw_rev) { + sprintf(fw_ver_str, "%u.%02u", fw_rev_major, fw_rev_minor); + } else { + sprintf(fw_ver_str, ""); + } + + printk(KERN_INFO PFX "Found card (Firmware: %s) with temp option\n", + fw_ver_str); + + /* Get switch settings */ + usb_pcwd_send_command(usb_pcwd, CMD_GET_DIP_SWITCH_SETTINGS, &dummy, &option_switches); + + printk(KERN_INFO PFX "Option switches (0x%02x): Temperature Reset Enable=%s, Power On Delay=%s\n", + option_switches, + ((option_switches & 0x10) ? "ON" : "OFF"), + ((option_switches & 0x08) ? "ON" : "OFF")); + + /* Check that the heartbeat value is within it's range ; if not reset to the default */ + if (heartbeat < 1 || heartbeat > 0xFFFF) { + heartbeat = WATCHDOG_HEARTBEAT; + printk(KERN_INFO PFX "heartbeat value must be 0udev. + */ +static void usb_pcwd_disconnect(struct usb_interface *interface) +{ + struct usb_pcwd_private *usb_pcwd; + + /* prevent races with open() */ + down (&disconnect_sem); + + usb_pcwd = usb_get_intfdata (interface); + usb_set_intfdata (interface, NULL); + + down (&usb_pcwd->sem); + + /* Stop the timer before we leave */ + if (!nowayout) + usb_pcwd_stop(usb_pcwd); + + /* We should now stop communicating with the USB PCWD device */ + usb_pcwd->exists = 0; + + /* Deregister */ + misc_deregister(&usb_pcwd_temperature_miscdev); + misc_deregister(&usb_pcwd_miscdev); + unregister_reboot_notifier(&usb_pcwd_notifier); + + up (&usb_pcwd->sem); + + /* Delete the USB PCWD device */ + usb_pcwd_delete(usb_pcwd); + + cards_found--; + + up (&disconnect_sem); + + printk(KERN_INFO PFX "USB PC Watchdog disconnected\n"); +} + + + +/** + * usb_pcwd_init + */ +static int __init usb_pcwd_init(void) +{ + int result; + + /* register this driver with the USB subsystem */ + result = usb_register(&usb_pcwd_driver); + if (result) { + printk(KERN_ERR PFX "usb_register failed. Error number %d\n", + result); + return result; + } + + printk(KERN_INFO PFX DRIVER_DESC " " DRIVER_VERSION "\n"); + return 0; +} + + +/** + * usb_pcwd_exit + */ +static void __exit usb_pcwd_exit(void) +{ + /* deregister this driver with the USB subsystem */ + usb_deregister(&usb_pcwd_driver); +} + + +module_init (usb_pcwd_init); +module_exit (usb_pcwd_exit); diff -Nru a/drivers/char/watchdog/sa1100_wdt.c b/drivers/char/watchdog/sa1100_wdt.c --- a/drivers/char/watchdog/sa1100_wdt.c Tue Mar 2 17:37:08 2004 +++ b/drivers/char/watchdog/sa1100_wdt.c Tue Mar 2 17:37:08 2004 @@ -218,3 +218,4 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started"); MODULE_LICENSE("GPL"); +MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); diff -Nru a/drivers/char/watchdog/sc1200wdt.c b/drivers/char/watchdog/sc1200wdt.c --- a/drivers/char/watchdog/sc1200wdt.c Tue Mar 2 17:37:07 2004 +++ b/drivers/char/watchdog/sc1200wdt.c Tue Mar 2 17:37:07 2004 @@ -486,3 +486,4 @@ MODULE_AUTHOR("Zwane Mwaikambo "); MODULE_DESCRIPTION("Driver for National Semiconductor PC87307/PC97307 watchdog component"); MODULE_LICENSE("GPL"); +MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); diff -Nru a/drivers/char/watchdog/w83627hf_wdt.c b/drivers/char/watchdog/w83627hf_wdt.c --- a/drivers/char/watchdog/w83627hf_wdt.c Tue Mar 2 17:37:08 2004 +++ b/drivers/char/watchdog/w83627hf_wdt.c Tue Mar 2 17:37:08 2004 @@ -321,4 +321,4 @@ MODULE_LICENSE("GPL"); MODULE_AUTHOR("Pádraig Brady "); MODULE_DESCRIPTION("w38627hf WDT driver"); - +MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); diff -Nru a/drivers/char/watchdog/w83877f_wdt.c b/drivers/char/watchdog/w83877f_wdt.c --- a/drivers/char/watchdog/w83877f_wdt.c Tue Mar 2 17:37:08 2004 +++ b/drivers/char/watchdog/w83877f_wdt.c Tue Mar 2 17:37:08 2004 @@ -427,3 +427,4 @@ MODULE_AUTHOR("Scott and Bill Jennings"); MODULE_DESCRIPTION("Driver for watchdog timer in w83877f chip"); MODULE_LICENSE("GPL"); +MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); diff -Nru a/drivers/char/watchdog/wdt285.c b/drivers/char/watchdog/wdt285.c --- a/drivers/char/watchdog/wdt285.c Tue Mar 2 17:37:07 2004 +++ b/drivers/char/watchdog/wdt285.c Tue Mar 2 17:37:07 2004 @@ -222,6 +222,7 @@ MODULE_AUTHOR("Phil Blundell "); MODULE_DESCRIPTION("Footbridge watchdog driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); module_param(soft_margin, int, 0); MODULE_PARM_DESC(soft_margin,"Watchdog timeout in seconds"); diff -Nru a/drivers/char/watchdog/wdt977.c b/drivers/char/watchdog/wdt977.c --- a/drivers/char/watchdog/wdt977.c Tue Mar 2 17:37:09 2004 +++ b/drivers/char/watchdog/wdt977.c Tue Mar 2 17:37:09 2004 @@ -365,5 +365,7 @@ module_init(nwwatchdog_init); module_exit(nwwatchdog_exit); +MODULE_AUTHOR("Woody Suwalski "); MODULE_DESCRIPTION("W83977AF Watchdog driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); diff -Nru a/drivers/char/watchdog/wdt_pci.c b/drivers/char/watchdog/wdt_pci.c --- a/drivers/char/watchdog/wdt_pci.c Tue Mar 2 17:37:08 2004 +++ b/drivers/char/watchdog/wdt_pci.c Tue Mar 2 17:37:08 2004 @@ -653,3 +653,5 @@ MODULE_AUTHOR("JP Nollmann, Alan Cox"); MODULE_DESCRIPTION("Driver for the ICS PCI watchdog cards"); MODULE_LICENSE("GPL"); +MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); +MODULE_ALIAS_MISCDEV(TEMP_MINOR); diff -Nru a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c --- a/drivers/ide/arm/icside.c Tue Mar 2 17:37:08 2004 +++ b/drivers/ide/arm/icside.c Tue Mar 2 17:37:08 2004 @@ -1,13 +1,7 @@ /* * linux/drivers/ide/arm/icside.c * - * Copyright (c) 1996-2002 Russell King. - * - * Changelog: - * 08-Jun-1996 RMK Created - * 12-Sep-1997 RMK Added interrupt enable/disable - * 17-Apr-1999 RMK Added support for V6 EASI - * 22-May-1999 RMK Added support for V6 DMA + * Copyright (c) 1996-2003 Russell King. */ #include @@ -237,7 +231,7 @@ sg->length = rq->nr_sectors * SECTOR_SIZE; nents = 1; } else { - nents = blk_rq_map_sg(&drive->queue, rq, sg); + nents = blk_rq_map_sg(drive->queue, rq, sg); if (rq_data_dir(rq) == READ) hwif->sg_dma_direction = DMA_FROM_DEVICE; @@ -487,33 +481,31 @@ set_dma_sg(hwif->hw.dma, hwif->sg_table, hwif->sg_nents); set_dma_mode(hwif->hw.dma, dma_mode); + drive->waiting_for_dma = 1; + return 0; } static int icside_dma_read(ide_drive_t *drive) { struct request *rq = HWGROUP(drive)->rq; - task_ioreg_t cmd = WIN_NOP; + task_ioreg_t cmd; if (icside_dma_common(drive, rq, DMA_MODE_READ)) return 1; - drive->waiting_for_dma = 1; - if (drive->media != ide_disk) return 0; BUG_ON(HWGROUP(drive)->handler != NULL); - ide_set_handler(drive, icside_dmaintr, 2*WAIT_CMD, NULL); - /* * FIX ME to use only ACB ide_task_t args Struct */ #if 0 { ide_task_t *args = rq->special; - command = args->tfRegister[IDE_COMMAND_OFFSET]; + cmd = args->tfRegister[IDE_COMMAND_OFFSET]; } #else if (rq->flags & REQ_DRIVE_TASKFILE) { @@ -526,35 +518,31 @@ } #endif /* issue cmd to drive */ - HWIF(drive)->OUTB(cmd, IDE_COMMAND_REG); + ide_execute_command(drive, cmd, icside_dmaintr, 2*WAIT_CMD, NULL); return icside_dma_begin(drive); } -int icside_dma_write(ide_drive_t *drive) +static int icside_dma_write(ide_drive_t *drive) { struct request *rq = HWGROUP(drive)->rq; - task_ioreg_t cmd = WIN_NOP; + task_ioreg_t cmd; if (icside_dma_common(drive, rq, DMA_MODE_WRITE)) return 1; - drive->waiting_for_dma = 1; - if (drive->media != ide_disk) return 0; BUG_ON(HWGROUP(drive)->handler != NULL); - ide_set_handler(drive, icside_dmaintr, 2*WAIT_CMD, NULL); - /* * FIX ME to use only ACB ide_task_t args Struct */ #if 0 { ide_task_t *args = rq->special; - command = args->tfRegister[IDE_COMMAND_OFFSET]; + cmd = args->tfRegister[IDE_COMMAND_OFFSET]; } #else if (rq->flags & REQ_DRIVE_TASKFILE) { @@ -566,8 +554,9 @@ cmd = WIN_WRITEDMA; } #endif + /* issue cmd to drive */ - HWIF(drive)->OUTB(cmd, IDE_COMMAND_REG); + ide_execute_command(drive, cmd, icside_dmaintr, 2*WAIT_CMD, NULL); return icside_dma_begin(drive); } @@ -787,7 +776,7 @@ state->hwif[0] = hwif; state->hwif[1] = mate; - ec->irq_data = state; + ec->irq_data = state; ec->ops = &icside_ops_arcin_v6; hwif->maskproc = icside_maskproc; @@ -797,7 +786,7 @@ hwif->serialized = 1; hwif->config_data = slot_port; hwif->select_data = sel; - hwif->hw.dma = ec->dma; + hwif->hw.dma = ec->dma; mate->maskproc = icside_maskproc; mate->channel = 1; @@ -806,7 +795,7 @@ mate->serialized = 1; mate->config_data = slot_port; mate->select_data = sel | 1; - mate->hw.dma = ec->dma; + mate->hw.dma = ec->dma; if (ec->dma != NO_DMA && !request_dma(ec->dma, hwif->name)) { icside_dma_init(hwif); diff -Nru a/drivers/ieee1394/Kconfig b/drivers/ieee1394/Kconfig --- a/drivers/ieee1394/Kconfig Tue Mar 2 17:37:07 2004 +++ b/drivers/ieee1394/Kconfig Tue Mar 2 17:37:07 2004 @@ -47,6 +47,23 @@ This option is not needed for userspace programs like gscanbus to show this information. +config IEEE1394_EXTRA_CONFIG_ROMS + bool "Build in extra config rom entries for certain functionality" + depends on IEEE1394 + help + Some IEEE1394 functionality depends on extra config rom entries + being available in the host adapters CSR. These options will + allow you to choose which ones. + +config IEEE1394_CONFIG_ROM_IP1394 + bool "IP-1394 Entry" + depends on IEEE1394_EXTRA_CONFIG_ROMS && IEEE1394 + help + Adds an entry for using IP-over-1394. If you want to use your + IEEE1394 bus as a network for IP systems (including interacting + with MacOSX and WinXP IP-over-1394), enable this option and the + eth1394 option below. + comment "Device Drivers" depends on IEEE1394 @@ -108,6 +125,8 @@ config IEEE1394_ETH1394 tristate "Ethernet over 1394" depends on IEEE1394 && EXPERIMENTAL + select IEEE1394_CONFIG_ROM_IP1394 + select IEEE1394_EXTRA_CONFIG_ROMS help This driver implements a functional majority of RFC 2734: IPv4 over 1394. It will provide IP connectivity with implementations of RFC diff -Nru a/drivers/ieee1394/Makefile b/drivers/ieee1394/Makefile --- a/drivers/ieee1394/Makefile Tue Mar 2 17:37:09 2004 +++ b/drivers/ieee1394/Makefile Tue Mar 2 17:37:09 2004 @@ -4,7 +4,7 @@ ieee1394-objs := ieee1394_core.o ieee1394_transactions.o hosts.o \ highlevel.o csr.o nodemgr.o oui.o dma.o iso.o \ - csr1212.o + csr1212.o config_roms.o obj-$(CONFIG_IEEE1394) += ieee1394.o obj-$(CONFIG_IEEE1394_PCILYNX) += pcilynx.o diff -Nru a/drivers/ieee1394/amdtp.c b/drivers/ieee1394/amdtp.c --- a/drivers/ieee1394/amdtp.c Tue Mar 2 17:37:08 2004 +++ b/drivers/ieee1394/amdtp.c Tue Mar 2 17:37:08 2004 @@ -1227,15 +1227,15 @@ ah->host = host; ah->ohci = host->hostdata; - hpsb_set_hostinfo_key(&amdtp_highlevel, host, ah->ohci->id); + hpsb_set_hostinfo_key(&amdtp_highlevel, host, ah->host->id); - minor = IEEE1394_MINOR_BLOCK_AMDTP * 16 + ah->ohci->id; + minor = IEEE1394_MINOR_BLOCK_AMDTP * 16 + ah->host->id; INIT_LIST_HEAD(&ah->stream_list); spin_lock_init(&ah->stream_list_lock); devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, minor), - S_IFCHR|S_IRUSR|S_IWUSR, "amdtp/%d", ah->ohci->id); + S_IFCHR|S_IRUSR|S_IWUSR, "amdtp/%d", ah->host->id); } static void amdtp_remove_host(struct hpsb_host *host) @@ -1243,7 +1243,7 @@ struct amdtp_host *ah = hpsb_get_hostinfo(&amdtp_highlevel, host); if (ah) - devfs_remove("amdtp/%d", ah->ohci->id); + devfs_remove("amdtp/%d", ah->host->id); return; } diff -Nru a/drivers/ieee1394/config_roms.c b/drivers/ieee1394/config_roms.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/drivers/ieee1394/config_roms.c Tue Mar 2 17:37:09 2004 @@ -0,0 +1,236 @@ +/* + * IEEE 1394 for Linux + * + * ConfigROM entries + * + * Copyright (C) 2004 Ben Collins + * + * This code is licensed under the GPL. See the file COPYING in the root + * directory of the kernel sources for details. + */ + +#include +#include + +#include "csr1212.h" +#include "ieee1394.h" +#include "ieee1394_types.h" +#include "hosts.h" +#include "ieee1394_core.h" +#include "highlevel.h" +#include "csr.h" +#include "config_roms.h" + +struct hpsb_config_rom_entry { + const char *name; + + /* Base initialization, called at module load */ + int (*init)(void); + + /* Add entry to specified host */ + int (*add)(struct hpsb_host *host); + + /* Remove entry from specified host */ + void (*remove)(struct hpsb_host *host); + + /* Cleanup called at module exit */ + void (*cleanup)(void); + + /* The flag added to host->config_roms */ + unsigned int flag; +}; + + +int hpsb_default_host_entry(struct hpsb_host *host) +{ + struct csr1212_keyval *root; + struct csr1212_keyval *vend_id = NULL; + struct csr1212_keyval *text = NULL; + char csr_name[128]; + int ret; + + sprintf(csr_name, "Linux - %s", host->driver->name); + root = host->csr.rom->root_kv; + + vend_id = csr1212_new_immediate(CSR1212_KV_ID_VENDOR, host->csr.guid_hi >> 8); + text = csr1212_new_string_descriptor_leaf(csr_name); + + if (!vend_id || !text) { + if (vend_id) + csr1212_release_keyval(vend_id); + if (text) + csr1212_release_keyval(text); + csr1212_destroy_csr(host->csr.rom); + return -ENOMEM; + } + + ret = csr1212_associate_keyval(vend_id, text); + csr1212_release_keyval(text); + ret |= csr1212_attach_keyval_to_directory(root, vend_id); + if (ret != CSR1212_SUCCESS) { + csr1212_release_keyval(vend_id); + csr1212_destroy_csr(host->csr.rom); + return -ENOMEM; + } + + host->update_config_rom = 1; + + return 0; +} + + +#ifdef CONFIG_IEEE1394_CONFIG_ROM_IP1394 +#include "eth1394.h" + +static struct csr1212_keyval *ip1394_ud; + +static int config_rom_ip1394_init(void) +{ + struct csr1212_keyval *spec_id = NULL; + struct csr1212_keyval *spec_desc = NULL; + struct csr1212_keyval *ver = NULL; + struct csr1212_keyval *ver_desc = NULL; + int ret = -ENOMEM; + + ip1394_ud = csr1212_new_directory(CSR1212_KV_ID_UNIT); + + spec_id = csr1212_new_immediate(CSR1212_KV_ID_SPECIFIER_ID, + ETHER1394_GASP_SPECIFIER_ID); + spec_desc = csr1212_new_string_descriptor_leaf("IANA"); + ver = csr1212_new_immediate(CSR1212_KV_ID_VERSION, + ETHER1394_GASP_VERSION); + ver_desc = csr1212_new_string_descriptor_leaf("IPv4"); + + if (!ip1394_ud || !spec_id || !spec_desc || !ver || !ver_desc) + goto ip1394_fail; + + if (csr1212_associate_keyval(spec_id, spec_desc) == CSR1212_SUCCESS && + csr1212_associate_keyval(ver, ver_desc) == CSR1212_SUCCESS && + csr1212_attach_keyval_to_directory(ip1394_ud, spec_id) == CSR1212_SUCCESS && + csr1212_attach_keyval_to_directory(ip1394_ud, ver) == CSR1212_SUCCESS) + ret = 0; + +ip1394_fail: + if (ret && ip1394_ud) { + csr1212_release_keyval(ip1394_ud); + ip1394_ud = NULL; + } + + if (spec_id) + csr1212_release_keyval(spec_id); + if (spec_desc) + csr1212_release_keyval(spec_desc); + if (ver) + csr1212_release_keyval(ver); + if (ver_desc) + csr1212_release_keyval(ver_desc); + + return ret; +} + +static void config_rom_ip1394_cleanup(void) +{ + if (ip1394_ud) { + csr1212_release_keyval(ip1394_ud); + ip1394_ud = NULL; + } +} + +static int config_rom_ip1394_add(struct hpsb_host *host) +{ + if (!ip1394_ud) + return -ENODEV; + + if (csr1212_attach_keyval_to_directory(host->csr.rom->root_kv, + ip1394_ud) != CSR1212_SUCCESS) + return -ENOMEM; + + return 0; +} + +static void config_rom_ip1394_remove(struct hpsb_host *host) +{ + csr1212_detach_keyval_from_directory(host->csr.rom->root_kv, ip1394_ud); +} + +static struct hpsb_config_rom_entry ip1394_entry = { + .name = "ip1394", + .init = config_rom_ip1394_init, + .add = config_rom_ip1394_add, + .remove = config_rom_ip1394_remove, + .cleanup = config_rom_ip1394_cleanup, + .flag = HPSB_CONFIG_ROM_ENTRY_IP1394, +}; +#endif /* CONFIG_IEEE1394_CONFIG_ROM_IP1394 */ + + +static struct hpsb_config_rom_entry *const config_rom_entries[] = { +#ifdef CONFIG_IEEE1394_CONFIG_ROM_IP1394 + &ip1394_entry, +#endif + NULL, +}; + + +int hpsb_init_config_roms(void) +{ + int i, error = 0; + + for (i = 0; config_rom_entries[i]; i++) { + if (!config_rom_entries[i]->init) + continue; + + if (config_rom_entries[i]->init()) { + HPSB_ERR("Failed to initialize config rom entry `%s'", + config_rom_entries[i]->name); + error = -1; + } else + HPSB_DEBUG("Initialized config rom entry `%s'", + config_rom_entries[i]->name); + } + + return error; +} + +void hpsb_cleanup_config_roms(void) +{ + int i; + + for (i = 0; config_rom_entries[i]; i++) { + if (config_rom_entries[i]->cleanup) + config_rom_entries[i]->cleanup(); + } +} + +int hpsb_add_extra_config_roms(struct hpsb_host *host) +{ + int i, error = 0; + + for (i = 0; config_rom_entries[i]; i++) { + if (config_rom_entries[i]->add(host)) { + HPSB_ERR("fw-host%d: Failed to attach config rom entry `%s'", + host->id, config_rom_entries[i]->name); + error = -1; + } else { + host->config_roms |= config_rom_entries[i]->flag; + host->update_config_rom = 1; + } + } + + return error; +} + +void hpsb_remove_extra_config_roms(struct hpsb_host *host) +{ + int i; + + for (i = 0; config_rom_entries[i]; i++) { + if (!(host->config_roms & config_rom_entries[i]->flag)) + continue; + + config_rom_entries[i]->remove(host); + + host->config_roms &= ~config_rom_entries[i]->flag; + host->update_config_rom = 1; + } +} diff -Nru a/drivers/ieee1394/config_roms.h b/drivers/ieee1394/config_roms.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/drivers/ieee1394/config_roms.h Tue Mar 2 17:37:09 2004 @@ -0,0 +1,27 @@ +#ifndef _IEEE1394_CONFIG_ROMS_H +#define _IEEE1394_CONFIG_ROMS_H + +#include "ieee1394_types.h" +#include "hosts.h" + +/* The default host entry. This must succeed. */ +int hpsb_default_host_entry(struct hpsb_host *host); + +/* Initialize all config roms */ +int hpsb_init_config_roms(void); + +/* Cleanup all config roms */ +void hpsb_cleanup_config_roms(void); + +/* Add extra config roms to specified host */ +int hpsb_add_extra_config_roms(struct hpsb_host *host); + +/* Remove extra config roms from specified host */ +void hpsb_remove_extra_config_roms(struct hpsb_host *host); + + +/* List of flags to check if a host contains a certain extra config rom + * entry. Available in the host->config_roms member. */ +#define HPSB_CONFIG_ROM_ENTRY_IP1394 0x00000001 + +#endif /* _IEEE1394_CONFIG_ROMS_H */ diff -Nru a/drivers/ieee1394/csr1212.c b/drivers/ieee1394/csr1212.c --- a/drivers/ieee1394/csr1212.c Tue Mar 2 17:37:08 2004 +++ b/drivers/ieee1394/csr1212.c Tue Mar 2 17:37:08 2004 @@ -704,10 +704,11 @@ if (k->key.type == CSR1212_KV_TYPE_DIRECTORY) { /* If the current entry is a directory, then move all * the entries to the destruction list. */ - tail->next = k->value.directory.dentries_head; - if (k->value.directory.dentries_head) + if (k->value.directory.dentries_head) { + tail->next = k->value.directory.dentries_head; k->value.directory.dentries_head->prev = tail; - tail = k->value.directory.dentries_tail; + tail = k->value.directory.dentries_tail; + } } free_keyval(k); k = a; @@ -1347,6 +1348,12 @@ case CSR1212_KV_TYPE_DIRECTORY: for (i = 0; i < kvi_len; i++) { csr1212_quad_t ki = kvi->data[i]; + + /* Some devices put null entries in their unit + * directories. If we come across such and entry, + * then skip it. */ + if (ki == 0x0) + continue; ret = csr1212_parse_dir_entry(kv, ki, (kv->offset + quads_to_bytes(i + 1)), diff -Nru a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c --- a/drivers/ieee1394/dv1394.c Tue Mar 2 17:37:08 2004 +++ b/drivers/ieee1394/dv1394.c Tue Mar 2 17:37:08 2004 @@ -2222,7 +2222,7 @@ video->ohci = ohci; /* lower 2 bits of id indicate which of four "plugs" per host */ - video->id = ohci->id << 2; + video->id = ohci->host->id << 2; if (format == DV1394_NTSC) video->id |= mode; else @@ -2302,47 +2302,49 @@ ); devfs_remove("ieee1394/%s", buf); - list_del(&video->list); kfree(video); } static void dv1394_remove_host (struct hpsb_host *host) { - struct ti_ohci *ohci; - struct video_card *video = NULL; + struct video_card *video; unsigned long flags; - struct list_head *lh, *templh; - int n; + int id = host->id; /* We only work with the OHCI-1394 driver */ if (strcmp(host->driver->name, OHCI1394_DRIVER_NAME)) return; - ohci = (struct ti_ohci *)host->hostdata; + /* find the corresponding video_cards */ + do { + struct video_card *tmp_vid; + video = NULL; - /* find the corresponding video_cards */ - spin_lock_irqsave(&dv1394_cards_lock, flags); - if (!list_empty(&dv1394_cards)) { - list_for_each_safe(lh, templh, &dv1394_cards) { - video = list_entry(lh, struct video_card, list); - if ((video->id >> 2) == ohci->id) - dv1394_un_init(video); + spin_lock_irqsave(&dv1394_cards_lock, flags); + list_for_each_entry(tmp_vid, &dv1394_cards, list) { + if ((tmp_vid->id >> 2) == id) { + list_del(&tmp_vid->list); + video = tmp_vid; + break; + } } - } - spin_unlock_irqrestore(&dv1394_cards_lock, flags); + spin_unlock_irqrestore(&dv1394_cards_lock, flags); - n = (video->id >> 2); - - devfs_remove("ieee1394/dv/host%d/NTSC", n); - devfs_remove("ieee1394/dv/host%d/PAL", n); - devfs_remove("ieee1394/dv/host%d", n); + if (video) + dv1394_un_init(video); + } while (video != NULL); + + devfs_remove("ieee1394/dv/host%d/NTSC", id); + devfs_remove("ieee1394/dv/host%d/PAL", id); + devfs_remove("ieee1394/dv/host%d", id); } static void dv1394_add_host (struct hpsb_host *host) { struct ti_ohci *ohci; + int id = host->id; /* We only work with the OHCI-1394 driver */ if (strcmp(host->driver->name, OHCI1394_DRIVER_NAME)) @@ -2350,9 +2352,9 @@ ohci = (struct ti_ohci *)host->hostdata; - devfs_mk_dir("ieee1394/dv/host%d", ohci->id); - devfs_mk_dir("ieee1394/dv/host%d/NTSC", ohci->id); - devfs_mk_dir("ieee1394/dv/host%d/PAL", ohci->id); + devfs_mk_dir("ieee1394/dv/host%d", id); + devfs_mk_dir("ieee1394/dv/host%d/NTSC", id); + devfs_mk_dir("ieee1394/dv/host%d/PAL", id); dv1394_init(ohci, DV1394_NTSC, MODE_RECEIVE); dv1394_init(ohci, DV1394_NTSC, MODE_TRANSMIT); @@ -2369,7 +2371,7 @@ static void dv1394_host_reset(struct hpsb_host *host) { struct ti_ohci *ohci; - struct video_card *video = NULL; + struct video_card *video = NULL, *tmp_vid; unsigned long flags; /* We only work with the OHCI-1394 driver */ @@ -2381,10 +2383,10 @@ /* find the corresponding video_cards */ spin_lock_irqsave(&dv1394_cards_lock, flags); - if (!list_empty(&dv1394_cards)) { - list_for_each_entry(video, &dv1394_cards, list) { - if ((video->id >> 2) == ohci->id) - break; + list_for_each_entry(tmp_vid, &dv1394_cards, list) { + if ((tmp_vid->id >> 2) == host->id) { + video = tmp_vid; + break; } } spin_unlock_irqrestore(&dv1394_cards_lock, flags); diff -Nru a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c --- a/drivers/ieee1394/eth1394.c Tue Mar 2 17:37:08 2004 +++ b/drivers/ieee1394/eth1394.c Tue Mar 2 17:37:08 2004 @@ -76,6 +76,7 @@ #include "iso.h" #include "nodemgr.h" #include "eth1394.h" +#include "config_roms.h" #define ETH1394_PRINT_G(level, fmt, args...) \ printk(level "%s: " fmt, driver_name, ## args) @@ -88,7 +89,7 @@ #define TRACE() printk(KERN_ERR "%s:%s[%d] ---- TRACE\n", driver_name, __FUNCTION__, __LINE__) static char version[] __devinitdata = - "$Rev: 1133 $ Ben Collins "; + "$Rev: 1175 $ Ben Collins "; struct fragment_info { struct list_head list; @@ -106,8 +107,6 @@ struct list_head frag_info; }; -static struct csr1212_keyval *eth1394_ud = NULL; - struct pdg_list { struct list_head list; /* partial datagram list per node */ unsigned int sz; /* partial datagram list size per node */ @@ -461,6 +460,8 @@ {} }; +MODULE_DEVICE_TABLE(ieee1394, eth1394_id_table); + static struct hpsb_protocol_driver eth1394_proto_driver = { .name = "IPv4 over 1394 Driver", .id_table = eth1394_id_table, @@ -553,9 +554,11 @@ struct net_device *dev = NULL; struct eth1394_priv *priv; static int version_printed = 0; - u64 fifo_addr; + if (!(host->config_roms & HPSB_CONFIG_ROM_ENTRY_IP1394)) + return; + fifo_addr = hpsb_allocate_and_register_addrspace(ð1394_highlevel, host, &addr_ops, @@ -634,14 +637,6 @@ priv->bc_state = ETHER1394_BC_RUNNING; } - if (csr1212_attach_keyval_to_directory(host->csr.rom->root_kv, - eth1394_ud) != CSR1212_SUCCESS) { - ETH1394_PRINT (KERN_ERR, dev->name, - "Cannot attach IP 1394 Unit Directory to " - "Config ROM\n"); - goto out; - } - hi->host->update_config_rom = 1; return; out: @@ -668,10 +663,6 @@ if (priv->iso != NULL) hpsb_iso_shutdown(priv->iso); - csr1212_detach_keyval_from_directory(hi->host->csr.rom->root_kv, - eth1394_ud); - hi->host->update_config_rom = 1; - if (hi->dev) { unregister_netdev (hi->dev); free_netdev(hi->dev); @@ -1483,7 +1474,6 @@ p = hpsb_alloc_packet(0); if (p) { p->host = host; - p->data = NULL; p->generation = get_hpsb_generation(host); p->type = hpsb_async; } @@ -1514,7 +1504,7 @@ | (1 << 8) | (TCODE_WRITEB << 4); p->header[3] = tx_len << 16; - p->data_size = tx_len + (tx_len % 4 ? 4 - (tx_len % 4) : 0); + p->data_size = (tx_len + 3) & ~3; p->data = (quadlet_t*)data; return 0; @@ -1807,7 +1797,7 @@ case ETHTOOL_GDRVINFO: { struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO }; strcpy (info.driver, driver_name); - strcpy (info.version, "$Rev: 1133 $"); + strcpy (info.version, "$Rev: 1175 $"); /* FIXME XXX provide sane businfo */ strcpy (info.bus_info, "ieee1394"); if (copy_to_user (useraddr, &info, sizeof (info))) @@ -1830,67 +1820,13 @@ static int __init ether1394_init_module (void) { - int ret; - struct csr1212_keyval *spec_id = NULL; - struct csr1212_keyval *spec_desc = NULL; - struct csr1212_keyval *ver = NULL; - struct csr1212_keyval *ver_desc = NULL; - packet_task_cache = kmem_cache_create("packet_task", sizeof(struct packet_task), 0, 0, NULL, NULL); - eth1394_ud = csr1212_new_directory(CSR1212_KV_ID_UNIT); - spec_id = csr1212_new_immediate(CSR1212_KV_ID_SPECIFIER_ID, - ETHER1394_GASP_SPECIFIER_ID); - spec_desc = csr1212_new_string_descriptor_leaf("IANA"); - ver = csr1212_new_immediate(CSR1212_KV_ID_VERSION, - ETHER1394_GASP_VERSION); - ver_desc = csr1212_new_string_descriptor_leaf("IPv4"); - - if ((!eth1394_ud) || - (!spec_id) || - (!spec_desc) || - (!ver) || - (!ver_desc)) { - ret = -ENOMEM; - goto out; - } - - ret = csr1212_associate_keyval(spec_id, spec_desc); - if (ret != CSR1212_SUCCESS) - goto out; - - ret = csr1212_associate_keyval(ver, ver_desc); - if (ret != CSR1212_SUCCESS) - goto out; - - ret = csr1212_attach_keyval_to_directory(eth1394_ud, spec_id); - if (ret != CSR1212_SUCCESS) - goto out; - - ret = csr1212_attach_keyval_to_directory(eth1394_ud, ver); - if (ret != CSR1212_SUCCESS) - goto out; - /* Register ourselves as a highlevel driver */ hpsb_register_highlevel(ð1394_highlevel); - ret = hpsb_register_protocol(ð1394_proto_driver); - -out: - if ((ret != 0) && eth1394_ud) { - csr1212_release_keyval(eth1394_ud); - } - if (spec_id) - csr1212_release_keyval(spec_id); - if (spec_desc) - csr1212_release_keyval(spec_desc); - if (ver) - csr1212_release_keyval(ver); - if (ver_desc) - csr1212_release_keyval(ver_desc); - - return ret; + return hpsb_register_protocol(ð1394_proto_driver); } static void __exit ether1394_exit_module (void) @@ -1898,10 +1834,6 @@ hpsb_unregister_protocol(ð1394_proto_driver); hpsb_unregister_highlevel(ð1394_highlevel); kmem_cache_destroy(packet_task_cache); - - if (eth1394_ud) { - csr1212_release_keyval(eth1394_ud); - } } module_init(ether1394_init_module); diff -Nru a/drivers/ieee1394/eth1394.h b/drivers/ieee1394/eth1394.h --- a/drivers/ieee1394/eth1394.h Tue Mar 2 17:37:09 2004 +++ b/drivers/ieee1394/eth1394.h Tue Mar 2 17:37:09 2004 @@ -24,6 +24,8 @@ #ifndef __ETH1394_H #define __ETH1394_H +#include + #include "ieee1394.h" /* Register for incoming packets. This is 4096 bytes, which supports up to diff -Nru a/drivers/ieee1394/hosts.c b/drivers/ieee1394/hosts.c --- a/drivers/ieee1394/hosts.c Tue Mar 2 17:37:08 2004 +++ b/drivers/ieee1394/hosts.c Tue Mar 2 17:37:08 2004 @@ -27,6 +27,7 @@ #include "highlevel.h" #include "nodemgr.h" #include "csr.h" +#include "config_roms.h" static void delayed_reset_bus(unsigned long __reset_info) @@ -103,6 +104,7 @@ * Return Value: a pointer to the &hpsb_host if succesful, %NULL if * no memory was available. */ +static DECLARE_MUTEX(host_num_alloc); struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra, struct device *dev) @@ -148,14 +150,12 @@ h->topology_map = h->csr.topology_map + 3; h->speed_map = (u8 *)(h->csr.speed_map + 2); - while (1) { - if (!nodemgr_for_each_host(&hostnum, alloc_hostnum_cb)) { - h->id = hostnum; - break; - } + down(&host_num_alloc); + while (nodemgr_for_each_host(&hostnum, alloc_hostnum_cb)) hostnum++; - } + + h->id = hostnum; memcpy(&h->device, &nodemgr_dev_template_host, sizeof(h->device)); h->device.parent = dev; @@ -169,12 +169,21 @@ class_device_register(&h->class_dev); get_device(&h->device); + up(&host_num_alloc); + return h; } -void hpsb_add_host(struct hpsb_host *host) +int hpsb_add_host(struct hpsb_host *host) { - highlevel_add_host(host); + if (hpsb_default_host_entry(host)) + return -ENOMEM; + + hpsb_add_extra_config_roms(host); + + highlevel_add_host(host); + + return 0; } void hpsb_remove_host(struct hpsb_host *host) @@ -183,6 +192,8 @@ host->driver = &dummy_driver; highlevel_remove_host(host); + + hpsb_remove_extra_config_roms(host); class_device_unregister(&host->class_dev); device_unregister(&host->device); diff -Nru a/drivers/ieee1394/hosts.h b/drivers/ieee1394/hosts.h --- a/drivers/ieee1394/hosts.h Tue Mar 2 17:37:07 2004 +++ b/drivers/ieee1394/hosts.h Tue Mar 2 17:37:07 2004 @@ -66,6 +66,8 @@ int update_config_rom; struct timer_list delayed_reset; + unsigned int config_roms; + struct list_head addr_space; }; @@ -191,7 +193,7 @@ struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra, struct device *dev); -void hpsb_add_host(struct hpsb_host *host); +int hpsb_add_host(struct hpsb_host *host); void hpsb_remove_host(struct hpsb_host *h); /* The following 2 functions are deprecated and will be removed when the diff -Nru a/drivers/ieee1394/ieee1394.h b/drivers/ieee1394/ieee1394.h --- a/drivers/ieee1394/ieee1394.h Tue Mar 2 17:37:08 2004 +++ b/drivers/ieee1394/ieee1394.h Tue Mar 2 17:37:08 2004 @@ -36,8 +36,11 @@ #define ACK_BUSY_X 0x4 #define ACK_BUSY_A 0x5 #define ACK_BUSY_B 0x6 +#define ACK_TARDY 0xb +#define ACK_CONFLICT_ERROR 0xc #define ACK_DATA_ERROR 0xd #define ACK_TYPE_ERROR 0xe +#define ACK_ADDRESS_ERROR 0xf /* Non-standard "ACK codes" for internal use */ #define ACKX_NONE (-1) diff -Nru a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c --- a/drivers/ieee1394/ieee1394_core.c Tue Mar 2 17:37:08 2004 +++ b/drivers/ieee1394/ieee1394_core.c Tue Mar 2 17:37:08 2004 @@ -44,6 +44,7 @@ #include "nodemgr.h" #include "dma.h" #include "iso.h" +#include "config_roms.h" /* * Disable the nodemgr detection and config rom reading functionality. @@ -92,7 +93,7 @@ void hpsb_set_packet_complete_task(struct hpsb_packet *packet, void (*routine)(void *), void *data) { - BUG_ON(packet->complete_routine != NULL); + WARN_ON(packet->complete_routine != NULL); packet->complete_routine = routine; packet->complete_data = data; return; @@ -120,34 +121,35 @@ */ struct hpsb_packet *hpsb_alloc_packet(size_t data_size) { - struct hpsb_packet *packet = NULL; - void *data = NULL; - - packet = kmem_cache_alloc(hpsb_packet_cache, GFP_ATOMIC); - if (packet == NULL) - return NULL; - - memset(packet, 0, sizeof(struct hpsb_packet)); - packet->header = packet->embedded_header; - - if (data_size) { - data = kmalloc(data_size + 8, GFP_ATOMIC); - if (data == NULL) { + struct hpsb_packet *packet = NULL; + void *data = NULL; + int gfp_flags = (in_atomic() || irqs_disabled()) ? GFP_ATOMIC : GFP_KERNEL; + + packet = kmem_cache_alloc(hpsb_packet_cache, gfp_flags); + if (packet == NULL) + return NULL; + + memset(packet, 0, sizeof(*packet)); + + packet->header = packet->embedded_header; + INIT_LIST_HEAD(&packet->list); + packet->state = hpsb_unused; + packet->generation = -1; + atomic_set(&packet->refcnt, 1); + + if (data_size) { + data_size = (data_size + 3) & ~3; + data = kmalloc(data_size + 8, gfp_flags); + if (data == NULL) { kmem_cache_free(hpsb_packet_cache, packet); - return NULL; - } - - packet->data = data; - packet->data_size = data_size; - } + return NULL; + } - INIT_LIST_HEAD(&packet->list); - packet->complete_routine = NULL; - packet->complete_data = NULL; - packet->state = hpsb_unused; - packet->generation = -1; + packet->data = data; + packet->data_size = data_size; + } - return packet; + return packet; } @@ -155,15 +157,14 @@ * hpsb_free_packet - free packet and data associated with it * @packet: packet to free (is NULL safe) * - * This function will free packet->data, packet->header and finally the packet - * itself. + * This function will free packet->data and finally the packet itself. */ void hpsb_free_packet(struct hpsb_packet *packet) { - if (!packet) return; - - kfree(packet->data); - kmem_cache_free(hpsb_packet_cache, packet); + if (packet && atomic_dec_and_test(&packet->refcnt)) { + kfree(packet->data); + kmem_cache_free(hpsb_packet_cache, packet); + } } @@ -402,28 +403,30 @@ void hpsb_packet_sent(struct hpsb_host *host, struct hpsb_packet *packet, int ackcode) { - unsigned long flags; - - packet->ack_code = ackcode; + packet->ack_code = ackcode; - if (packet->no_waiter) { - /* must not have a tlabel allocated */ - hpsb_free_packet(packet); - return; - } + if (packet->no_waiter) { + /* must not have a tlabel allocated */ + hpsb_free_packet(packet); + return; + } - if (ackcode != ACK_PENDING || !packet->expect_response) { - packet->state = hpsb_complete; - queue_packet_complete(packet); - return; - } + if (ackcode != ACK_PENDING || !packet->expect_response) { + atomic_dec(&packet->refcnt); + list_del(&packet->list); + packet->state = hpsb_complete; + queue_packet_complete(packet); + return; + } - packet->state = hpsb_pending; - packet->sendtime = jiffies; + if (packet->state == hpsb_complete) { + hpsb_free_packet(packet); + return; + } - spin_lock_irqsave(&host->pending_pkt_lock, flags); - list_add_tail(&packet->list, &host->pending_packets); - spin_unlock_irqrestore(&host->pending_pkt_lock, flags); + atomic_dec(&packet->refcnt); + packet->state = hpsb_pending; + packet->sendtime = jiffies; mod_timer(&host->timeout, jiffies + host->timeout_interval); } @@ -492,7 +495,7 @@ */ int hpsb_send_packet(struct hpsb_packet *packet) { - struct hpsb_host *host = packet->host; + struct hpsb_host *host = packet->host; if (host->is_shutdown) return -EINVAL; @@ -502,6 +505,15 @@ packet->state = hpsb_queued; + if (!packet->no_waiter || packet->expect_response) { + unsigned long flags; + + atomic_inc(&packet->refcnt); + spin_lock_irqsave(&host->pending_pkt_lock, flags); + list_add_tail(&packet->list, &host->pending_packets); + spin_unlock_irqrestore(&host->pending_pkt_lock, flags); + } + if (packet->node_id == host->node_id) { /* it is a local request, so handle it locally */ quadlet_t *data; @@ -658,7 +670,12 @@ break; } - packet->state = hpsb_complete; + if (packet->state == hpsb_queued) { + packet->sendtime = jiffies; + packet->ack_code = ACK_PENDING; + } + + packet->state = hpsb_complete; queue_packet_complete(packet); } @@ -1024,10 +1041,16 @@ complete_and_exit(&khpsbpkt_complete, 0); } + static int __init ieee1394_init(void) { int i; + if (hpsb_init_config_roms()) { + HPSB_ERR("Failed to initialize some config rom entries.\n"); + HPSB_ERR("Some features may not be available\n"); + } + khpsbpkt_pid = kernel_thread(hpsbpkt_thread, NULL, CLONE_KERNEL); if (khpsbpkt_pid < 0) { HPSB_ERR("Failed to start hpsbpkt thread!\n"); @@ -1044,7 +1067,7 @@ devfs_mk_dir("ieee1394"); hpsb_packet_cache = kmem_cache_create("hpsb_packet", sizeof(struct hpsb_packet), - 0, 0, NULL, NULL); + 0, SLAB_HWCACHE_ALIGN, NULL, NULL); bus_register(&ieee1394_bus_type); for (i = 0; fw_bus_attrs[i]; i++) @@ -1082,6 +1105,8 @@ } kmem_cache_destroy(hpsb_packet_cache); + + hpsb_cleanup_config_roms(); unregister_chrdev_region(IEEE1394_CORE_DEV, 256); devfs_remove("ieee1394"); diff -Nru a/drivers/ieee1394/ieee1394_core.h b/drivers/ieee1394/ieee1394_core.h --- a/drivers/ieee1394/ieee1394_core.h Tue Mar 2 17:37:07 2004 +++ b/drivers/ieee1394/ieee1394_core.h Tue Mar 2 17:37:07 2004 @@ -4,6 +4,7 @@ #include #include +#include #include #include "hosts.h" @@ -58,6 +59,8 @@ struct hpsb_host *host; unsigned int generation; + + atomic_t refcnt; /* Function (and possible data to pass to it) to call when this * packet is completed. */ diff -Nru a/drivers/ieee1394/ieee1394_transactions.c b/drivers/ieee1394/ieee1394_transactions.c --- a/drivers/ieee1394/ieee1394_transactions.c Tue Mar 2 17:37:08 2004 +++ b/drivers/ieee1394/ieee1394_transactions.c Tue Mar 2 17:37:08 2004 @@ -239,6 +239,11 @@ return -EAGAIN; } + case ACK_ADDRESS_ERROR: + return -EINVAL; + + case ACK_TARDY: + case ACK_CONFLICT_ERROR: case ACKX_NONE: case ACKX_SEND_ERROR: case ACKX_ABORTED: @@ -263,7 +268,7 @@ if (length == 0) return NULL; - packet = hpsb_alloc_packet(length + (length % 4 ? 4 - (length % 4) : 0)); + packet = hpsb_alloc_packet((length + 3) & ~3); if (!packet) return NULL; @@ -291,7 +296,7 @@ if (length == 0) return NULL; - packet = hpsb_alloc_packet(length + (length % 4 ? 4 - (length % 4) : 0)); + packet = hpsb_alloc_packet((length + 3) & ~3); if (!packet) return NULL; @@ -325,7 +330,7 @@ if (length == 0) return NULL; - packet = hpsb_alloc_packet(length + (length % 4 ? 4 - (length % 4) : 0)); + packet = hpsb_alloc_packet((length + 3) & ~3); if (!packet) return NULL; diff -Nru a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c --- a/drivers/ieee1394/nodemgr.c Tue Mar 2 17:37:08 2004 +++ b/drivers/ieee1394/nodemgr.c Tue Mar 2 17:37:08 2004 @@ -79,7 +79,7 @@ static int nodemgr_get_max_rom(quadlet_t *bus_info_data, void *__ci) { - return (bus_info_data[2] >> 8) & 0x3; + return (CSR1212_BE32_TO_CPU(bus_info_data[2]) >> 8) & 0x3; } static struct csr1212_bus_ops nodemgr_csr_ops = { @@ -1286,18 +1286,19 @@ } -static void nodemgr_ud_update_pdrv(struct unit_directory *ud) +static void nodemgr_update_pdrv(struct node_entry *ne) { - struct device *dev; + struct unit_directory *ud; struct hpsb_protocol_driver *pdrv; + struct class *class = &nodemgr_ud_class; + struct class_device *cdev; - if (!get_device(&ud->device)) - return; - - list_for_each_entry(dev, &ud->device.children, node) - nodemgr_ud_update_pdrv(container_of(dev, struct unit_directory, device)); + down_read(&class->subsys.rwsem); + list_for_each_entry(cdev, &class->children, node) { + ud = container_of(cdev, struct unit_directory, class_dev); + if (ud->ne != ne || !ud->device.driver) + continue; - if (ud->device.driver) { pdrv = container_of(ud->device.driver, struct hpsb_protocol_driver, driver); if (pdrv->update && pdrv->update(ud)) { @@ -1306,14 +1307,13 @@ up_write(&ud->device.bus->subsys.rwsem); } } - - put_device(&ud->device); + up_read(&class->subsys.rwsem); } static void nodemgr_probe_ne(struct host_info *hi, struct node_entry *ne, int generation) { - struct device *dev, *udev; + struct device *dev; if (ne->host != hi->host || ne->in_limbo) return; @@ -1330,8 +1330,7 @@ if (ne->needs_probe) nodemgr_process_root_directory(hi, ne); else if (ne->generation == generation) - list_for_each_entry(udev, &dev->children, node) - nodemgr_ud_update_pdrv(container_of(udev, struct unit_directory, device)); + nodemgr_update_pdrv(ne); else nodemgr_suspend_ne(ne); diff -Nru a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c --- a/drivers/ieee1394/ohci1394.c Tue Mar 2 17:37:09 2004 +++ b/drivers/ieee1394/ohci1394.c Tue Mar 2 17:37:09 2004 @@ -134,10 +134,10 @@ #endif #ifdef OHCI1394_DEBUG -#define DBGMSG(card, fmt, args...) \ -printk(KERN_INFO "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, card , ## args) +#define DBGMSG(fmt, args...) \ +printk(KERN_INFO "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, ohci->host->id , ## args) #else -#define DBGMSG(card, fmt, args...) +#define DBGMSG(fmt, args...) #endif #ifdef CONFIG_IEEE1394_OHCI_DMA_DEBUG @@ -158,11 +158,11 @@ printk(level "%s: " fmt "\n" , OHCI1394_DRIVER_NAME , ## args) /* print card specific information */ -#define PRINT(level, card, fmt, args...) \ -printk(level "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, card , ## args) +#define PRINT(level, fmt, args...) \ +printk(level "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, ohci->host->id , ## args) static char version[] __devinitdata = - "$Rev: 1131 $ Ben Collins "; + "$Rev: 1172 $ Ben Collins "; /* Module Parameters */ static int phys_dma = 1; @@ -241,7 +241,7 @@ r = reg_read(ohci, OHCI1394_PhyControl); if (i >= OHCI_LOOP_COUNT) - PRINT (KERN_ERR, ohci->id, "Get PHY Reg timeout [0x%08x/0x%08x/%d]", + PRINT (KERN_ERR, "Get PHY Reg timeout [0x%08x/0x%08x/%d]", r, r & 0x80000000, i); spin_unlock_irqrestore (&ohci->phy_reg_lock, flags); @@ -268,7 +268,7 @@ } if (i == OHCI_LOOP_COUNT) - PRINT (KERN_ERR, ohci->id, "Set PHY Reg timeout [0x%08x/0x%08x/%d]", + PRINT (KERN_ERR, "Set PHY Reg timeout [0x%08x/0x%08x/%d]", r, r & 0x00004000, i); spin_unlock_irqrestore (&ohci->phy_reg_lock, flags); @@ -305,7 +305,7 @@ if ((self_id_count & 0x80000000) || ((self_id_count & 0x00FF0000) != (q0 & 0x00FF0000))) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, "Error in reception of SelfID packets [0x%08x/0x%08x] (count: %d)", self_id_count, q0, ohci->self_id_errors); @@ -315,7 +315,7 @@ set_phy_reg_mask (ohci, 1, 0x40); ohci->self_id_errors++; } else { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, "Too many errors on SelfID error reception, giving up!"); } return; @@ -337,19 +337,19 @@ } if (q0 == ~q1) { - DBGMSG (ohci->id, "SelfID packet 0x%x received", q0); + DBGMSG ("SelfID packet 0x%x received", q0); hpsb_selfid_received(host, cpu_to_be32(q0)); if (((q0 & 0x3f000000) >> 24) == phyid) - DBGMSG (ohci->id, "SelfID for this node is 0x%08x", q0); + DBGMSG ("SelfID for this node is 0x%08x", q0); } else { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, "SelfID is inconsistent [0x%08x/0x%08x]", q0, q1); } q += 2; size -= 2; } - DBGMSG(ohci->id, "SelfID complete"); + DBGMSG("SelfID complete"); return; } @@ -364,7 +364,7 @@ break; mdelay(1); } - DBGMSG (ohci->id, "Soft reset finished"); + DBGMSG ("Soft reset finished"); } static int run_context(struct ti_ohci *ohci, int reg, char *msg) @@ -374,14 +374,14 @@ /* check that the node id is valid */ nodeId = reg_read(ohci, OHCI1394_NodeID); if (!(nodeId&0x80000000)) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, "Running dma failed because Node ID is not valid"); return -1; } /* check that the node number != 63 */ if ((nodeId&0x3f)==63) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, "Running dma failed because Node ID == 63"); return -1; } @@ -389,7 +389,7 @@ /* Run the dma context */ reg_write(ohci, reg, 0x8000); - if (msg) PRINT(KERN_DEBUG, ohci->id, "%s", msg); + if (msg) PRINT(KERN_DEBUG, "%s", msg); return 0; } @@ -451,7 +451,7 @@ /* Run context */ reg_write(ohci, d->ctrlSet, 0x00008000); - DBGMSG(ohci->id, "Receive DMA ctx=%d initialized", d->ctx); + DBGMSG("Receive DMA ctx=%d initialized", d->ctx); } /* Initialize the dma transmit context */ @@ -474,7 +474,7 @@ reg_write(ohci, OHCI1394_IsoXmitIntMaskSet, 1 << d->ctx); } - DBGMSG(ohci->id, "Transmit DMA ctx=%d initialized", d->ctx); + DBGMSG("Transmit DMA ctx=%d initialized", d->ctx); } /* Count the number of available iso contexts */ @@ -486,7 +486,7 @@ reg_write(ohci, reg, 0xffffffff); tmp = reg_read(ohci, reg); - DBGMSG(ohci->id,"Iso contexts reg: %08x implemented: %08x", reg, tmp); + DBGMSG("Iso contexts reg: %08x implemented: %08x", reg, tmp); /* Count the number of contexts */ for (i=0; i<32; i++) { @@ -600,7 +600,7 @@ #else sprintf (irq_buf, "%s", __irq_itoa(ohci->dev->irq)); #endif - PRINT(KERN_INFO, ohci->id, "OHCI-1394 %d.%d (PCI): IRQ=[%s] " + PRINT(KERN_INFO, "OHCI-1394 %d.%d (PCI): IRQ=[%s] " "MMIO=[%lx-%lx] Max Packet=[%d]", ((((buf) >> 16) & 0xf) + (((buf) >> 20) & 0xf) * 10), ((((buf) >> 4) & 0xf) + ((buf) & 0xf) * 10), irq_buf, @@ -635,7 +635,7 @@ u32 cycleTimer; int idx = d->prg_ind; - DBGMSG(ohci->id, "Inserting packet for node " NODE_BUS_FMT + DBGMSG("Inserting packet for node " NODE_BUS_FMT ", tlabel=%d, tcode=0x%x, speed=%d", NODE_BUS_ARGS(ohci->host, packet->node_id), packet->tlabel, packet->tcode, packet->speed_code); @@ -653,7 +653,7 @@ (((((cycleTimer>>25)&0x7)+1)&0x7)<<13) | ((cycleTimer&0x01fff000)>>12)); - DBGMSG(ohci->id, "cycleTimer: %08x timeStamp: %08x", + DBGMSG("cycleTimer: %08x timeStamp: %08x", cycleTimer, d->prg_cpu[idx]->begin.status); } else d->prg_cpu[idx]->begin.status = 0; @@ -709,7 +709,7 @@ if (cross_bound((unsigned long)packet->data, packet->data_size)>0) { /* FIXME: do something about it */ - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, "%s: packet data addr: %p size %Zd bytes " "cross page boundary", __FUNCTION__, packet->data, packet->data_size); @@ -773,7 +773,7 @@ d->prg_cpu[idx]->end.branchAddress = 0; d->prg_cpu[idx]->end.status = 0; - DBGMSG(ohci->id, "Iso xmit context info: header[%08x %08x]\n" + DBGMSG("Iso xmit context info: header[%08x %08x]\n" " begin=%08x %08x %08x %08x\n" " %08x %08x %08x %08x\n" " end =%08x %08x %08x %08x", @@ -827,19 +827,19 @@ } if (d->free_prgs == 0) - DBGMSG(ohci->id, "Transmit DMA FIFO ctx=%d is full... waiting", d->ctx); + DBGMSG("Transmit DMA FIFO ctx=%d is full... waiting", d->ctx); /* Is the context running ? (should be unless it is the first packet to be sent in this context) */ if (!(reg_read(ohci, d->ctrlSet) & 0x8000)) { - DBGMSG(ohci->id,"Starting transmit DMA ctx=%d",d->ctx); + DBGMSG("Starting transmit DMA ctx=%d",d->ctx); reg_write(ohci, d->cmdPtr, d->prg_bus[idx]|z); run_context(ohci, d->ctrlSet, NULL); } else { /* Wake up the dma context if necessary */ if (!(reg_read(ohci, d->ctrlSet) & 0x400)) { - DBGMSG(ohci->id,"Waking transmit DMA ctx=%d",d->ctx); + DBGMSG("Waking transmit DMA ctx=%d",d->ctx); } /* do this always, to avoid race condition */ @@ -856,7 +856,7 @@ unsigned long flags; if (packet->data_size > ohci->max_packet_size) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, "Transmit packet size %Zd is too big", packet->data_size); return -EOVERFLOW; @@ -874,7 +874,7 @@ if (ohci->it_legacy_context.ohci == NULL) { if (in_interrupt()) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, "legacy IT context cannot be initialized during interrupt"); return -EINVAL; } @@ -882,7 +882,7 @@ if (alloc_dma_trm_ctx(ohci, &ohci->it_legacy_context, DMA_CTX_ISO, 0, IT_NUM_DESC, OHCI1394_IsoXmitContextBase) < 0) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, "error initializing legacy IT context"); return -ENOMEM; } @@ -974,7 +974,7 @@ break; case SET_BUS_ID: - PRINT(KERN_ERR, ohci->id, "devctl command SET_BUS_ID err"); + PRINT(KERN_ERR, "devctl command SET_BUS_ID err"); break; case ACT_CYCLE_MASTER: @@ -985,7 +985,7 @@ /* * enable cycleTimer, cycleMaster */ - DBGMSG(ohci->id, "Cycle master enabled"); + DBGMSG("Cycle master enabled"); reg_write(ohci, OHCI1394_LinkControlSet, OHCI1394_LinkControl_CycleTimerEnable | OHCI1394_LinkControl_CycleMaster); @@ -1000,7 +1000,7 @@ break; case CANCEL_REQUESTS: - DBGMSG(ohci->id, "Cancel request received"); + DBGMSG("Cancel request received"); dma_trm_reset(&ohci->at_req_context); dma_trm_reset(&ohci->at_resp_context); break; @@ -1010,7 +1010,7 @@ u64 mask; if (arg<0 || arg>63) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, "%s: IS0 listen channel %d is out of range", __FUNCTION__, arg); return -EFAULT; @@ -1022,14 +1022,14 @@ DMA_CTX_ISO, 0, IR_NUM_DESC, IR_BUF_SIZE, IR_SPLIT_BUF_SIZE, OHCI1394_IsoRcvContextBase) < 0) { - PRINT(KERN_ERR, ohci->id, "%s: failed to allocate an IR context", + PRINT(KERN_ERR, "%s: failed to allocate an IR context", __FUNCTION__); return -ENOMEM; } ohci->ir_legacy_channels = 0; initialize_dma_rcv_ctx(&ohci->ir_legacy_context, 1); - DBGMSG(ohci->id, "ISO receive legacy context activated"); + DBGMSG("ISO receive legacy context activated"); } mask = (u64)0x1<IR_channel_lock, flags); if (ohci->ISO_channel_usage & mask) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, "%s: IS0 listen channel %d is already used", __FUNCTION__, arg); spin_unlock_irqrestore(&ohci->IR_channel_lock, flags); @@ -1055,7 +1055,7 @@ 1<IR_channel_lock, flags); - DBGMSG(ohci->id, "Listening enabled on channel %d", arg); + DBGMSG("Listening enabled on channel %d", arg); break; } case ISO_UNLISTEN_CHANNEL: @@ -1063,7 +1063,7 @@ u64 mask; if (arg<0 || arg>63) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, "%s: IS0 unlisten channel %d is out of range", __FUNCTION__, arg); return -EFAULT; @@ -1074,7 +1074,7 @@ spin_lock_irqsave(&ohci->IR_channel_lock, flags); if (!(ohci->ISO_channel_usage & mask)) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, "%s: IS0 unlisten channel %d is not used", __FUNCTION__, arg); spin_unlock_irqrestore(&ohci->IR_channel_lock, flags); @@ -1092,12 +1092,12 @@ 1<IR_channel_lock, flags); - DBGMSG(ohci->id, "Listening disabled on channel %d", arg); + DBGMSG("Listening disabled on channel %d", arg); if (ohci->ir_legacy_channels == 0) { stop_dma_rcv_ctx(&ohci->ir_legacy_context); free_dma_rcv_ctx(&ohci->ir_legacy_context); - DBGMSG(ohci->id, "ISO receive legacy context deactivated"); + DBGMSG("ISO receive legacy context deactivated"); } break; } @@ -1209,7 +1209,7 @@ /* one block per page of data in the DMA buffer, minus the final guard page */ recv->nblocks = iso->buf_size/PAGE_SIZE - 1; if (recv->nblocks < 3) { - DBGMSG(ohci->id, "ohci_iso_recv_init: DMA buffer too small"); + DBGMSG("ohci_iso_recv_init: DMA buffer too small"); goto err; } @@ -1245,7 +1245,7 @@ if (recv->buf_stride*iso->buf_packets > iso->buf_size || recv->buf_stride > PAGE_SIZE) { /* this shouldn't happen, but anyway... */ - DBGMSG(ohci->id, "ohci_iso_recv_init: problem choosing a buffer stride"); + DBGMSG("ohci_iso_recv_init: problem choosing a buffer stride"); goto err; } } @@ -1289,7 +1289,7 @@ /* write the DMA program */ ohci_iso_recv_program(iso); - DBGMSG(ohci->id, "ohci_iso_recv_init: %s mode, DMA buffer is %lu pages" + DBGMSG("ohci_iso_recv_init: %s mode, DMA buffer is %lu pages" " (%u bytes), using %u blocks, buf_stride %u, block_irq_interval %d", recv->dma_mode == BUFFER_FILL_MODE ? "buffer-fill" : "packet-per-buffer", @@ -1430,6 +1430,7 @@ static int ohci_iso_recv_start(struct hpsb_iso *iso, int cycle, int tag_mask, int sync) { struct ohci_iso_recv *recv = iso->hostdata; + struct ti_ohci *ohci = recv->ohci; u32 command, contextMatch; reg_write(recv->ohci, recv->ContextControlClear, 0xFFFFFFFF); @@ -1508,7 +1509,7 @@ /* check RUN */ if (!(reg_read(recv->ohci, recv->ContextControlSet) & 0x8000)) { - PRINT(KERN_ERR, recv->ohci->id, + PRINT(KERN_ERR, "Error starting IR DMA (ContextControl 0x%08x)\n", reg_read(recv->ohci, recv->ContextControlSet)); return -1; @@ -1591,6 +1592,7 @@ { int wake = 0; int runaway = 0; + struct ti_ohci *ohci = recv->ohci; while (1) { /* we expect the next parsable packet to begin at recv->dma_offset */ @@ -1607,7 +1609,7 @@ /* don't loop indefinitely */ if (runaway++ > 100000) { atomic_inc(&iso->overflows); - PRINT(KERN_ERR, recv->ohci->id, + PRINT(KERN_ERR, "IR DMA error - Runaway during buffer parsing!\n"); break; } @@ -1626,7 +1628,7 @@ len = p[recv->dma_offset+2] | (p[recv->dma_offset+3] << 8); if (len > 4096) { - PRINT(KERN_ERR, recv->ohci->id, + PRINT(KERN_ERR, "IR DMA error - bogus 'len' value %u\n", len); } @@ -1694,6 +1696,7 @@ static void ohci_iso_recv_bufferfill_task(struct hpsb_iso *iso, struct ohci_iso_recv *recv) { int loop; + struct ti_ohci *ohci = recv->ohci; /* loop over all blocks */ for (loop = 0; loop < recv->nblocks; loop++) { @@ -1716,7 +1719,7 @@ if (event != 0x11) { atomic_inc(&iso->overflows); - PRINT(KERN_ERR, recv->ohci->id, + PRINT(KERN_ERR, "IR DMA error - OHCI error code 0x%02x\n", event); } @@ -1739,7 +1742,7 @@ if ((recv->block_dma+1) % recv->nblocks == recv->block_reader) { atomic_inc(&iso->overflows); - DBGMSG(recv->ohci->id, "ISO reception overflow - " + DBGMSG("ISO reception overflow - " "ran out of DMA blocks"); } } @@ -1752,6 +1755,7 @@ { int count; int wake = 0; + struct ti_ohci *ohci = recv->ohci; /* loop over the entire buffer */ for (count = 0; count < recv->nblocks; count++) { @@ -1779,9 +1783,9 @@ packet_len = recv->buf_stride - rescount; } else if (event == 0x02) { - PRINT(KERN_ERR, recv->ohci->id, "IR DMA error - packet too long for buffer\n"); + PRINT(KERN_ERR, "IR DMA error - packet too long for buffer\n"); } else if (event) { - PRINT(KERN_ERR, recv->ohci->id, "IR DMA error - OHCI error code 0x%02x\n", event); + PRINT(KERN_ERR, "IR DMA error - OHCI error code 0x%02x\n", event); } /* sync our view of the buffer */ @@ -1911,6 +1915,7 @@ static void ohci_iso_xmit_stop(struct hpsb_iso *iso) { struct ohci_iso_xmit *xmit = iso->hostdata; + struct ti_ohci *ohci = xmit->ohci; /* disable interrupts */ reg_write(xmit->ohci, OHCI1394_IsoXmitIntMaskClear, 1 << xmit->task.context); @@ -1918,7 +1923,7 @@ /* halt DMA */ if (ohci1394_stop_context(xmit->ohci, xmit->ContextControlClear, NULL)) { /* XXX the DMA context will lock up if you try to send too much data! */ - PRINT(KERN_ERR, xmit->ohci->id, + PRINT(KERN_ERR, "you probably exceeded the OHCI card's bandwidth limit - " "reload the module and reduce xmit bandwidth"); } @@ -1943,6 +1948,7 @@ { struct hpsb_iso *iso = (struct hpsb_iso*) data; struct ohci_iso_xmit *xmit = iso->hostdata; + struct ti_ohci *ohci = xmit->ohci; int wake = 0; int count; @@ -1963,7 +1969,7 @@ } if (event != 0x11) - PRINT(KERN_ERR, xmit->ohci->id, + PRINT(KERN_ERR, "IT DMA error - OHCI error code 0x%02x\n", event); /* at least one packet went out, so wake up the writer */ @@ -1986,6 +1992,7 @@ static int ohci_iso_xmit_queue(struct hpsb_iso *iso, struct hpsb_iso_packet_info *info) { struct ohci_iso_xmit *xmit = iso->hostdata; + struct ti_ohci *ohci = xmit->ohci; int next_i, prev_i; struct iso_xmit_cmd *next, *prev; @@ -1997,7 +2004,7 @@ /* check that the packet doesn't cross a page boundary (we could allow this if we added OUTPUT_MORE descriptor support) */ if (cross_bound(info->offset, info->len)) { - PRINT(KERN_ERR, xmit->ohci->id, + PRINT(KERN_ERR, "rawiso xmit: packet %u crosses a page boundary", iso->first_packet); return -EINVAL; @@ -2081,6 +2088,7 @@ static int ohci_iso_xmit_start(struct hpsb_iso *iso, int cycle) { struct ohci_iso_xmit *xmit = iso->hostdata; + struct ti_ohci *ohci = xmit->ohci; /* clear out the control register */ reg_write(xmit->ohci, xmit->ContextControlClear, 0xFFFFFFFF); @@ -2118,7 +2126,7 @@ /* check the RUN bit */ if (!(reg_read(xmit->ohci, xmit->ContextControlSet) & 0x8000)) { - PRINT(KERN_ERR, xmit->ohci->id, "Error starting IT DMA (ContextControl 0x%08x)\n", + PRINT(KERN_ERR, "Error starting IT DMA (ContextControl 0x%08x)\n", reg_read(xmit->ohci, xmit->ContextControlSet)); return -1; } @@ -2192,8 +2200,9 @@ { unsigned long flags; LIST_HEAD(packet_list); + struct ti_ohci *ohci = d->ohci; - ohci1394_stop_context(d->ohci, d->ctrlClear, NULL); + ohci1394_stop_context(ohci, d->ctrlClear, NULL); /* Lock the context, reset it and release it. Move the packets * that were pending in the context to packet_list and free @@ -2217,10 +2226,10 @@ while (!list_empty(&packet_list)) { struct hpsb_packet *p = driver_packet(packet_list.next); - PRINT(KERN_INFO, d->ohci->id, + PRINT(KERN_INFO, "AT dma reset ctx=%d, aborting transmission", d->ctx); list_del(&p->driver_list); - hpsb_packet_sent(d->ohci->host, p, ACKX_ABORTED); + hpsb_packet_sent(ohci->host, p, ACKX_ABORTED); } } @@ -2270,43 +2279,43 @@ * we just return, and clean up in the ohci1394_pci_remove * function. */ if (event == ~(u32) 0) { - DBGMSG(ohci->id, "Device removed."); + DBGMSG("Device removed."); return IRQ_NONE; } - DBGMSG(ohci->id, "IntEvent: %08x", event); + DBGMSG("IntEvent: %08x", event); if (event & OHCI1394_unrecoverableError) { int ctx; - PRINT(KERN_ERR, ohci->id, "Unrecoverable error!"); + PRINT(KERN_ERR, "Unrecoverable error!"); if (reg_read(ohci, OHCI1394_AsReqTrContextControlSet) & 0x800) - PRINT(KERN_ERR, ohci->id, "Async Req Tx Context died: " + PRINT(KERN_ERR, "Async Req Tx Context died: " "ctrl[%08x] cmdptr[%08x]", reg_read(ohci, OHCI1394_AsReqTrContextControlSet), reg_read(ohci, OHCI1394_AsReqTrCommandPtr)); if (reg_read(ohci, OHCI1394_AsRspTrContextControlSet) & 0x800) - PRINT(KERN_ERR, ohci->id, "Async Rsp Tx Context died: " + PRINT(KERN_ERR, "Async Rsp Tx Context died: " "ctrl[%08x] cmdptr[%08x]", reg_read(ohci, OHCI1394_AsRspTrContextControlSet), reg_read(ohci, OHCI1394_AsRspTrCommandPtr)); if (reg_read(ohci, OHCI1394_AsReqRcvContextControlSet) & 0x800) - PRINT(KERN_ERR, ohci->id, "Async Req Rcv Context died: " + PRINT(KERN_ERR, "Async Req Rcv Context died: " "ctrl[%08x] cmdptr[%08x]", reg_read(ohci, OHCI1394_AsReqRcvContextControlSet), reg_read(ohci, OHCI1394_AsReqRcvCommandPtr)); if (reg_read(ohci, OHCI1394_AsRspRcvContextControlSet) & 0x800) - PRINT(KERN_ERR, ohci->id, "Async Rsp Rcv Context died: " + PRINT(KERN_ERR, "Async Rsp Rcv Context died: " "ctrl[%08x] cmdptr[%08x]", reg_read(ohci, OHCI1394_AsRspRcvContextControlSet), reg_read(ohci, OHCI1394_AsRspRcvCommandPtr)); for (ctx = 0; ctx < ohci->nb_iso_xmit_ctx; ctx++) { if (reg_read(ohci, OHCI1394_IsoXmitContextControlSet + (16 * ctx)) & 0x800) - PRINT(KERN_ERR, ohci->id, "Iso Xmit %d Context died: " + PRINT(KERN_ERR, "Iso Xmit %d Context died: " "ctrl[%08x] cmdptr[%08x]", ctx, reg_read(ohci, OHCI1394_IsoXmitContextControlSet + (16 * ctx)), reg_read(ohci, OHCI1394_IsoXmitCommandPtr + (16 * ctx))); @@ -2314,7 +2323,7 @@ for (ctx = 0; ctx < ohci->nb_iso_rcv_ctx; ctx++) { if (reg_read(ohci, OHCI1394_IsoRcvContextControlSet + (32 * ctx)) & 0x800) - PRINT(KERN_ERR, ohci->id, "Iso Recv %d Context died: " + PRINT(KERN_ERR, "Iso Recv %d Context died: " "ctrl[%08x] cmdptr[%08x] match[%08x]", ctx, reg_read(ohci, OHCI1394_IsoRcvContextControlSet + (32 * ctx)), reg_read(ohci, OHCI1394_IsoRcvCommandPtr + (32 * ctx)), @@ -2328,7 +2337,7 @@ /* We subscribe to the cycleInconsistent event only to * clear the corresponding event bit... otherwise, * isochronous cycleMatch DMA won't work. */ - DBGMSG(ohci->id, "OHCI1394_cycleInconsistent"); + DBGMSG("OHCI1394_cycleInconsistent"); event &= ~OHCI1394_cycleInconsistent; } @@ -2359,7 +2368,7 @@ * to solve this problem. This mainly effects nForce2. */ if (loop_count > 10000) { ohci_devctl(host, RESET_BUS, LONG_RESET); - DBGMSG(ohci->id, "Detected bus-reset loop. Forced a bus reset!"); + DBGMSG("Detected bus-reset loop. Forced a bus reset!"); loop_count = 0; } @@ -2368,7 +2377,7 @@ } spin_unlock_irqrestore(&ohci->event_lock, flags); if (!host->in_bus_reset) { - DBGMSG(ohci->id, "irq_handler: Bus reset requested"); + DBGMSG("irq_handler: Bus reset requested"); /* Subsystem call */ hpsb_bus_reset(ohci->host); @@ -2376,24 +2385,20 @@ event &= ~OHCI1394_busReset; } - /* XXX: We need a way to also queue the OHCI1394_reqTxComplete, - * but for right now we simply run it upon reception, to make sure - * we get sent acks before response packets. This sucks mainly - * because it halts the interrupt handler. */ if (event & OHCI1394_reqTxComplete) { struct dma_trm_ctx *d = &ohci->at_req_context; - DBGMSG(ohci->id, "Got reqTxComplete interrupt " + DBGMSG("Got reqTxComplete interrupt " "status=0x%08X", reg_read(ohci, d->ctrlSet)); if (reg_read(ohci, d->ctrlSet) & 0x800) ohci1394_stop_context(ohci, d->ctrlClear, "reqTxComplete"); else - dma_trm_tasklet ((unsigned long)d); + tasklet_schedule(&d->task); event &= ~OHCI1394_reqTxComplete; } if (event & OHCI1394_respTxComplete) { struct dma_trm_ctx *d = &ohci->at_resp_context; - DBGMSG(ohci->id, "Got respTxComplete interrupt " + DBGMSG("Got respTxComplete interrupt " "status=0x%08X", reg_read(ohci, d->ctrlSet)); if (reg_read(ohci, d->ctrlSet) & 0x800) ohci1394_stop_context(ohci, d->ctrlClear, @@ -2404,7 +2409,7 @@ } if (event & OHCI1394_RQPkt) { struct dma_rcv_ctx *d = &ohci->ar_req_context; - DBGMSG(ohci->id, "Got RQPkt interrupt status=0x%08X", + DBGMSG("Got RQPkt interrupt status=0x%08X", reg_read(ohci, d->ctrlSet)); if (reg_read(ohci, d->ctrlSet) & 0x800) ohci1394_stop_context(ohci, d->ctrlClear, "RQPkt"); @@ -2414,7 +2419,7 @@ } if (event & OHCI1394_RSPkt) { struct dma_rcv_ctx *d = &ohci->ar_resp_context; - DBGMSG(ohci->id, "Got RSPkt interrupt status=0x%08X", + DBGMSG("Got RSPkt interrupt status=0x%08X", reg_read(ohci, d->ctrlSet)); if (reg_read(ohci, d->ctrlSet) & 0x800) ohci1394_stop_context(ohci, d->ctrlClear, "RSPkt"); @@ -2443,7 +2448,7 @@ node_id = reg_read(ohci, OHCI1394_NodeID); if (!(node_id & 0x80000000)) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, "SelfID received, but NodeID invalid " "(probably new bus reset occurred): %08X", node_id); @@ -2453,8 +2458,7 @@ phyid = node_id & 0x0000003f; isroot = (node_id & 0x40000000) != 0; - DBGMSG(ohci->id, - "SelfID interrupt received " + DBGMSG("SelfID interrupt received " "(phyid %d, %s)", phyid, (isroot ? "root" : "not root")); @@ -2484,13 +2488,13 @@ reg_write(ohci,OHCI1394_PhyReqFilterLoSet, 0x00000000); } - DBGMSG(ohci->id, "PhyReqFilter=%08x%08x", + DBGMSG("PhyReqFilter=%08x%08x", reg_read(ohci,OHCI1394_PhyReqFilterHiSet), reg_read(ohci,OHCI1394_PhyReqFilterLoSet)); hpsb_selfid_complete(host, phyid, isroot); } else - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, "SelfID received outside of bus reset sequence"); selfid_not_valid: @@ -2500,7 +2504,7 @@ /* Make sure we handle everything, just in case we accidentally * enabled an interrupt that we didn't write a handler for. */ if (event) - PRINT(KERN_ERR, ohci->id, "Unhandled interrupt(s) 0x%08x", + PRINT(KERN_ERR, "Unhandled interrupt(s) 0x%08x", event); return IRQ_HANDLED; @@ -2510,7 +2514,7 @@ static void insert_dma_buffer(struct dma_rcv_ctx *d, int idx) { struct ti_ohci *ohci = (struct ti_ohci*)(d->ohci); - DBGMSG(ohci->id, "Inserting dma buf ctx=%d idx=%d", d->ctx, idx); + DBGMSG("Inserting dma buf ctx=%d idx=%d", d->ctx, idx); d->prg_cpu[idx]->status = cpu_to_le32(d->buf_size); d->prg_cpu[idx]->branchAddress &= le32_to_cpu(0xfffffff0); @@ -2519,7 +2523,7 @@ /* wake up the dma context if necessary */ if (!(reg_read(ohci, d->ctrlSet) & 0x400)) { - PRINT(KERN_INFO, ohci->id, + PRINT(KERN_INFO, "Waking dma ctx=%d ... processing is probably too slow", d->ctx); } @@ -2606,7 +2610,7 @@ * over more than one descriptor. The next case is where * it's all in the first descriptor. */ if ((offset + length) > d->buf_size) { - DBGMSG(ohci->id,"Split packet rcv'd"); + DBGMSG("Split packet rcv'd"); if (length > d->split_buf_size) { ohci1394_stop_context(ohci, d->ctrlClear, "Split packet size exceeded"); @@ -2621,7 +2625,7 @@ /* Other part of packet not written yet. * this should never happen I think * anyway we'll get it on the next call. */ - PRINT(KERN_INFO, ohci->id, + PRINT(KERN_INFO, "Got only half a packet!"); d->buf_ind = idx; d->buf_offset = offset; @@ -2654,7 +2658,7 @@ buf_ptr += offset/4; } } else { - DBGMSG(ohci->id,"Single packet rcv'd"); + DBGMSG("Single packet rcv'd"); memcpy(d->spb, buf_ptr, length); offset += length; buf_ptr += length/4; @@ -2671,7 +2675,7 @@ if (tcode != OHCI1394_TCODE_PHY) { if (!ohci->no_swap_incoming) packet_swab(d->spb, tcode); - DBGMSG(ohci->id, "Packet received from node" + DBGMSG("Packet received from node" " %d ack=0x%02X spd=%d tcode=0x%X" " length=%d ctx=%d tlabel=%d", (d->spb[1]>>16)&0x3f, @@ -2688,7 +2692,7 @@ } #ifdef OHCI1394_DEBUG else - PRINT (KERN_DEBUG, ohci->id, "Got phy packet ctx=%d ... discarded", + PRINT (KERN_DEBUG, "Got phy packet ctx=%d ... discarded", d->ctx); #endif @@ -2733,8 +2737,7 @@ #ifdef OHCI1394_DEBUG if (datasize) if (((le32_to_cpu(d->prg_cpu[d->sent_ind]->data[0])>>4)&0xf) == 0xa) - DBGMSG(ohci->id, - "Stream packet sent to channel %d tcode=0x%X " + DBGMSG("Stream packet sent to channel %d tcode=0x%X " "ack=0x%X spd=%d dataLength=%d ctx=%d", (le32_to_cpu(d->prg_cpu[d->sent_ind]->data[0])>>8)&0x3f, (le32_to_cpu(d->prg_cpu[d->sent_ind]->data[0])>>4)&0xf, @@ -2742,8 +2745,7 @@ le32_to_cpu(d->prg_cpu[d->sent_ind]->data[1])>>16, d->ctx); else - DBGMSG(ohci->id, - "Packet sent to node %d tcode=0x%X tLabel=" + DBGMSG("Packet sent to node %d tcode=0x%X tLabel=" "0x%02X ack=0x%X spd=%d dataLength=%d ctx=%d", (le32_to_cpu(d->prg_cpu[d->sent_ind]->data[1])>>16)&0x3f, (le32_to_cpu(d->prg_cpu[d->sent_ind]->data[0])>>4)&0xf, @@ -2752,8 +2754,7 @@ le32_to_cpu(d->prg_cpu[d->sent_ind]->data[3])>>16, d->ctx); else - DBGMSG(ohci->id, - "Packet sent to node %d tcode=0x%X tLabel=" + DBGMSG("Packet sent to node %d tcode=0x%X tLabel=" "0x%02X ack=0x%X spd=%d data=0x%08X ctx=%d", (le32_to_cpu(d->prg_cpu[d->sent_ind]->data[1]) >>16)&0x3f, @@ -2773,7 +2774,7 @@ case EVT_NO_STATUS: /* that should never happen */ case EVT_RESERVED_A: /* that should never happen */ case EVT_LONG_PACKET: /* that should never happen */ - PRINT(KERN_WARNING, ohci->id, "Received OHCI evt_* error 0x%x", status & 0x1f); + PRINT(KERN_WARNING, "Received OHCI evt_* error 0x%x", status & 0x1f); ack = ACKX_SEND_ERROR; break; case EVT_MISSING_ACK: @@ -2783,7 +2784,7 @@ ack = ACKX_SEND_ERROR; break; case EVT_OVERRUN: /* that should never happen */ - PRINT(KERN_WARNING, ohci->id, "Received OHCI evt_* error 0x%x", status & 0x1f); + PRINT(KERN_WARNING, "Received OHCI evt_* error 0x%x", status & 0x1f); ack = ACKX_SEND_ERROR; break; case EVT_DESCRIPTOR_READ: @@ -2792,7 +2793,7 @@ ack = ACKX_SEND_ERROR; break; case EVT_BUS_RESET: /* that should never happen */ - PRINT(KERN_WARNING, ohci->id, "Received OHCI evt_* error 0x%x", status & 0x1f); + PRINT(KERN_WARNING, "Received OHCI evt_* error 0x%x", status & 0x1f); ack = ACKX_SEND_ERROR; break; case EVT_TIMEOUT: @@ -2803,7 +2804,7 @@ break; case EVT_RESERVED_B: /* that should never happen */ case EVT_RESERVED_C: /* that should never happen */ - PRINT(KERN_WARNING, ohci->id, "Received OHCI evt_* error 0x%x", status & 0x1f); + PRINT(KERN_WARNING, "Received OHCI evt_* error 0x%x", status & 0x1f); ack = ACKX_SEND_ERROR; break; case EVT_UNKNOWN: @@ -2811,7 +2812,7 @@ ack = ACKX_SEND_ERROR; break; default: - PRINT(KERN_ERR, ohci->id, "Unhandled OHCI evt_* error 0x%x", status & 0x1f); + PRINT(KERN_ERR, "Unhandled OHCI evt_* error 0x%x", status & 0x1f); ack = ACKX_SEND_ERROR; BUG(); } @@ -2855,17 +2856,18 @@ static void free_dma_rcv_ctx(struct dma_rcv_ctx *d) { int i; + struct ti_ohci *ohci = d->ohci; - if (d->ohci == NULL) + if (ohci == NULL) return; - DBGMSG(d->ohci->id, "Freeing dma_rcv_ctx %d", d->ctx); + DBGMSG("Freeing dma_rcv_ctx %d", d->ctx); if (d->buf_cpu) { for (i=0; inum_desc; i++) if (d->buf_cpu[i] && d->buf_bus[i]) { pci_free_consistent( - d->ohci->dev, d->buf_size, + ohci->dev, d->buf_size, d->buf_cpu[i], d->buf_bus[i]); OHCI_DMA_FREE("consistent dma_rcv buf[%d]", i); } @@ -2912,7 +2914,7 @@ d->buf_bus = kmalloc(d->num_desc * sizeof(dma_addr_t), GFP_KERNEL); if (d->buf_cpu == NULL || d->buf_bus == NULL) { - PRINT(KERN_ERR, ohci->id, "Failed to allocate dma buffer"); + PRINT(KERN_ERR, "Failed to allocate dma buffer"); free_dma_rcv_ctx(d); return -ENOMEM; } @@ -2924,7 +2926,7 @@ d->prg_bus = kmalloc(d->num_desc * sizeof(dma_addr_t), GFP_KERNEL); if (d->prg_cpu == NULL || d->prg_bus == NULL) { - PRINT(KERN_ERR, ohci->id, "Failed to allocate dma prg"); + PRINT(KERN_ERR, "Failed to allocate dma prg"); free_dma_rcv_ctx(d); return -ENOMEM; } @@ -2934,7 +2936,7 @@ d->spb = kmalloc(d->split_buf_size, GFP_KERNEL); if (d->spb == NULL) { - PRINT(KERN_ERR, ohci->id, "Failed to allocate split buffer"); + PRINT(KERN_ERR, "Failed to allocate split buffer"); free_dma_rcv_ctx(d); return -ENOMEM; } @@ -2952,7 +2954,7 @@ if (d->buf_cpu[i] != NULL) { memset(d->buf_cpu[i], 0, d->buf_size); } else { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, "Failed to allocate dma buffer"); free_dma_rcv_ctx(d); return -ENOMEM; @@ -2964,7 +2966,7 @@ if (d->prg_cpu[i] != NULL) { memset(d->prg_cpu[i], 0, sizeof(struct dma_cmd)); } else { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, "Failed to allocate dma prg"); free_dma_rcv_ctx(d); return -ENOMEM; @@ -2979,7 +2981,7 @@ dma_rcv_tasklet, (unsigned long) d); if (ohci1394_register_iso_tasklet(ohci, &ohci->ir_legacy_tasklet) < 0) { - PRINT(KERN_ERR, ohci->id, "No IR DMA context available"); + PRINT(KERN_ERR, "No IR DMA context available"); free_dma_rcv_ctx(d); return -EBUSY; } @@ -3005,11 +3007,12 @@ static void free_dma_trm_ctx(struct dma_trm_ctx *d) { int i; + struct ti_ohci *ohci = d->ohci; - if (d->ohci == NULL) + if (ohci == NULL) return; - DBGMSG(d->ohci->id, "Freeing dma_trm_ctx %d", d->ctx); + DBGMSG("Freeing dma_trm_ctx %d", d->ctx); if (d->prg_cpu) { for (i=0; inum_desc; i++) @@ -3047,7 +3050,7 @@ d->prg_bus = kmalloc(d->num_desc * sizeof(dma_addr_t), GFP_KERNEL); if (d->prg_cpu == NULL || d->prg_bus == NULL) { - PRINT(KERN_ERR, ohci->id, "Failed to allocate at dma prg"); + PRINT(KERN_ERR, "Failed to allocate at dma prg"); free_dma_trm_ctx(d); return -ENOMEM; } @@ -3065,7 +3068,7 @@ if (d->prg_cpu[i] != NULL) { memset(d->prg_cpu[i], 0, sizeof(struct at_dma_prg)); } else { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, "Failed to allocate at dma prg"); free_dma_trm_ctx(d); return -ENOMEM; @@ -3080,7 +3083,7 @@ dma_trm_tasklet, (unsigned long) d); if (ohci1394_register_iso_tasklet(ohci, &ohci->it_legacy_tasklet) < 0) { - PRINT(KERN_ERR, ohci->id, "No IT DMA context available"); + PRINT(KERN_ERR, "No IT DMA context available"); free_dma_trm_ctx(d); return -EBUSY; } @@ -3157,11 +3160,6 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) { - struct csr1212_keyval *root; - struct csr1212_keyval *vend_id = NULL; - struct csr1212_keyval *text = NULL; - int ret; - static int version_printed = 0; struct hpsb_host *host; @@ -3179,7 +3177,6 @@ if (!host) FAIL(-ENOMEM, "Failed to allocate host structure"); ohci = host->hostdata; - ohci->id = host->id; ohci->dev = dev; ohci->host = host; ohci->init_state = OHCI_INIT_ALLOC_HOST; @@ -3223,7 +3220,7 @@ * clearly says it's 2kb, so this shouldn't be a problem. */ ohci_base = pci_resource_start(dev, 0); if (pci_resource_len(dev, 0) != OHCI1394_REGISTER_SIZE) - PRINT(KERN_WARNING, ohci->id, "Unexpected PCI resource length of %lx!", + PRINT(KERN_WARNING, "Unexpected PCI resource length of %lx!", pci_resource_len(dev, 0)); /* Seems PCMCIA handles this internally. Not sure why. Seems @@ -3239,7 +3236,7 @@ if (ohci->registers == NULL) FAIL(-ENXIO, "Failed to remap registers - card not accessible"); ohci->init_state = OHCI_INIT_HAVE_IOMAPPING; - DBGMSG(ohci->id, "Remapped memory spaces reg 0x%p", ohci->registers); + DBGMSG("Remapped memory spaces reg 0x%p", ohci->registers); /* csr_config rom allocation */ ohci->csr_config_rom_cpu = @@ -3261,7 +3258,7 @@ ohci->init_state = OHCI_INIT_HAVE_SELFID_BUFFER; if ((unsigned long)ohci->selfid_buf_cpu & 0x1fff) - PRINT(KERN_INFO, ohci->id, "SelfID buffer %p is not aligned on " + PRINT(KERN_INFO, "SelfID buffer %p is not aligned on " "8Kb boundary... may cause problems on some CXD3222 chip", ohci->selfid_buf_cpu); @@ -3315,12 +3312,12 @@ /* Determine the number of available IR and IT contexts. */ ohci->nb_iso_rcv_ctx = get_nb_iso_ctx(ohci, OHCI1394_IsoRecvIntMaskSet); - DBGMSG(ohci->id, "%d iso receive contexts available", + DBGMSG("%d iso receive contexts available", ohci->nb_iso_rcv_ctx); ohci->nb_iso_xmit_ctx = get_nb_iso_ctx(ohci, OHCI1394_IsoXmitIntMaskSet); - DBGMSG(ohci->id, "%d iso transmit contexts available", + DBGMSG("%d iso transmit contexts available", ohci->nb_iso_xmit_ctx); /* Set the usage bits for non-existent contexts so they can't @@ -3346,38 +3343,6 @@ ohci->init_state = OHCI_INIT_HAVE_IRQ; ohci_initialize(ohci); - /* Setup initial root directory entries */ - root = host->csr.rom->root_kv; - - vend_id = csr1212_new_immediate(CSR1212_KV_ID_VENDOR, - reg_read(ohci, OHCI1394_GUIDHi) >> 8); - text = csr1212_new_string_descriptor_leaf("Linux 1394 - OHCI"); - - if (!vend_id || !text) { - if (vend_id) { - csr1212_release_keyval(vend_id); - } - if (text) { - csr1212_release_keyval(text); - } - FAIL(-ENOMEM, "Failed to allocate memory for mandatory ConfigROM entries!"); - } - - ret = csr1212_associate_keyval(vend_id, text); - csr1212_release_keyval(text); - if(ret != CSR1212_SUCCESS) { - csr1212_release_keyval(vend_id); - FAIL(ret, "Failed to associate text descriptor to vendor id"); - } - - ret = csr1212_attach_keyval_to_directory(root, vend_id); - if(ret != CSR1212_SUCCESS) { - csr1212_release_keyval(vend_id); - FAIL(ret, "Failed to attach vendor id to root directory"); - } - - host->update_config_rom = 1; - /* Set certain csr values */ host->csr.guid_hi = reg_read(ohci, OHCI1394_GUIDHi); host->csr.guid_lo = reg_read(ohci, OHCI1394_GUIDLo); @@ -3386,7 +3351,9 @@ host->csr.lnk_spd = reg_read(ohci, OHCI1394_BusOptions) & 0x7; /* Tell the highlevel this host is ready */ - hpsb_add_host(host); + if (hpsb_add_host(host)) + FAIL(-ENOMEM, "Failed to register host with highlevel"); + ohci->init_state = OHCI_INIT_DONE; return 0; @@ -3582,7 +3549,7 @@ while (reg_read(ohci, reg) & 0x400) { i++; if (i>5000) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, "Runaway loop while stopping context: %s...", msg ? msg : ""); return 1; } @@ -3590,7 +3557,7 @@ mb(); udelay(10); } - if (msg) PRINT(KERN_ERR, ohci->id, "%s: dma prg stopped", msg); + if (msg) PRINT(KERN_ERR, "%s: dma prg stopped", msg); return 0; } diff -Nru a/drivers/ieee1394/ohci1394.h b/drivers/ieee1394/ohci1394.h --- a/drivers/ieee1394/ohci1394.h Tue Mar 2 17:37:07 2004 +++ b/drivers/ieee1394/ohci1394.h Tue Mar 2 17:37:07 2004 @@ -149,8 +149,6 @@ }; struct ti_ohci { - int id; /* sequential card number */ - struct pci_dev *dev; enum { diff -Nru a/drivers/ieee1394/pcilynx.c b/drivers/ieee1394/pcilynx.c --- a/drivers/ieee1394/pcilynx.c Tue Mar 2 17:37:08 2004 +++ b/drivers/ieee1394/pcilynx.c Tue Mar 2 17:37:08 2004 @@ -1516,11 +1516,6 @@ return error; \ } while (0) - struct csr1212_keyval *root; - struct csr1212_keyval *vend_id = NULL; - struct csr1212_keyval *text = NULL; - int ret; - char irq_buf[16]; struct hpsb_host *host; struct ti_lynx *lynx; /* shortcut to currently handled device */ @@ -1890,42 +1885,14 @@ else host->csr.lnk_spd = be32_to_cpu(lynx->bus_info_block[2]) & 0x7; - /* Setup initial root directory entries */ - root = host->csr.rom->root_kv; - - vend_id = csr1212_new_immediate(CSR1212_KV_ID_VENDOR, - be32_to_cpu(lynx->bus_info_block[3]) >> 8); - text = csr1212_new_string_descriptor_leaf("Linux 1394 - PCI-Lynx"); - - if (!vend_id || !text) { - if (vend_id) - csr1212_release_keyval(vend_id); - if (text) - csr1212_release_keyval(text); + if (hpsb_add_host(host)) { error = -ENOMEM; - FAIL("Failed to allocate memory for mandatory ConfigROM entries!"); - } - - ret = csr1212_associate_keyval(vend_id, text); - csr1212_release_keyval(text); /* no longer needed locally. */ - if(ret != CSR1212_SUCCESS) { - csr1212_release_keyval(vend_id); - error = ret; - FAIL("Failed to associate text descriptor to vendor id"); - } - - ret = csr1212_attach_keyval_to_directory(root, vend_id); - csr1212_release_keyval(vend_id); /* no longer needed locally. */ - if(ret != CSR1212_SUCCESS) { - error = ret; - FAIL("Failed to attach vendor id to root directory"); + FAIL("Failed to register host with highlevel"); } - host->update_config_rom = 1; - hpsb_add_host(host); lynx->state = is_host; - return ret; + return 0; #undef FAIL } diff -Nru a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c --- a/drivers/ieee1394/sbp2.c Tue Mar 2 17:37:07 2004 +++ b/drivers/ieee1394/sbp2.c Tue Mar 2 17:37:07 2004 @@ -78,7 +78,7 @@ #include "sbp2.h" static char version[] __devinitdata = - "$Rev: 1144 $ Ben Collins "; + "$Rev: 1170 $ Ben Collins "; /* * Module load parameter definitions @@ -677,6 +677,10 @@ */ sbp2scsi_complete_all_commands(scsi_id, DID_BUS_BUSY); + /* Make sure we unblock requests (since this is likely after a bus + * reset). */ + scsi_unblock_requests(scsi_id->scsi_host); + return 0; } @@ -2543,8 +2547,6 @@ done (command->Current_SCpnt); } } - - scsi_unblock_requests(scsi_id->scsi_host); return; } diff -Nru a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c --- a/drivers/ieee1394/video1394.c Tue Mar 2 17:37:07 2004 +++ b/drivers/ieee1394/video1394.c Tue Mar 2 17:37:07 2004 @@ -155,7 +155,7 @@ { int i; - DBGMSG(d->ohci->id, "Freeing dma_iso_ctx %d", d->ctx); + DBGMSG(d->ohci->host->id, "Freeing dma_iso_ctx %d", d->ctx); ohci1394_stop_context(d->ohci, d->ctrlClear, NULL); if (d->iso_tasklet.link.next != NULL) @@ -200,7 +200,7 @@ d = kmalloc(sizeof(struct dma_iso_ctx), GFP_KERNEL); if (d == NULL) { - PRINT(KERN_ERR, ohci->id, "Failed to allocate dma_iso_ctx"); + PRINT(KERN_ERR, ohci->host->id, "Failed to allocate dma_iso_ctx"); return NULL; } @@ -221,7 +221,7 @@ if (dma_region_alloc(&d->dma, d->num_desc * d->buf_size, ohci->dev, PCI_DMA_BIDIRECTIONAL)) { - PRINT(KERN_ERR, ohci->id, "Failed to allocate dma buffer"); + PRINT(KERN_ERR, ohci->host->id, "Failed to allocate dma buffer"); free_dma_iso_ctx(d); return NULL; } @@ -236,7 +236,7 @@ (unsigned long) d); if (ohci1394_register_iso_tasklet(ohci, &d->iso_tasklet) < 0) { - PRINT(KERN_ERR, ohci->id, "no free iso %s contexts", + PRINT(KERN_ERR, ohci->host->id, "no free iso %s contexts", type == OHCI_ISO_RECEIVE ? "receive" : "transmit"); free_dma_iso_ctx(d); return NULL; @@ -246,7 +246,7 @@ d->prg_reg = kmalloc(d->num_desc * sizeof(struct dma_prog_region), GFP_KERNEL); if (d->prg_reg == NULL) { - PRINT(KERN_ERR, ohci->id, "Failed to allocate ir prg regs"); + PRINT(KERN_ERR, ohci->host->id, "Failed to allocate ir prg regs"); free_dma_iso_ctx(d); return NULL; } @@ -264,7 +264,7 @@ GFP_KERNEL); if (d->ir_prg == NULL) { - PRINT(KERN_ERR, ohci->id, "Failed to allocate dma ir prg"); + PRINT(KERN_ERR, ohci->host->id, "Failed to allocate dma ir prg"); free_dma_iso_ctx(d); return NULL; } @@ -277,7 +277,7 @@ for (i = 0;i < d->num_desc; i++) { if (dma_prog_region_alloc(&d->prg_reg[i], d->nb_cmd * sizeof(struct dma_cmd), ohci->dev)) { - PRINT(KERN_ERR, ohci->id, "Failed to allocate dma ir prg"); + PRINT(KERN_ERR, ohci->host->id, "Failed to allocate dma ir prg"); free_dma_iso_ctx(d); return NULL; } @@ -293,7 +293,7 @@ GFP_KERNEL); if (d->it_prg == NULL) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, ohci->host->id, "Failed to allocate dma it prg"); free_dma_iso_ctx(d); return NULL; @@ -303,7 +303,7 @@ d->packet_size = packet_size; if (PAGE_SIZE % packet_size || packet_size>4096) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, ohci->host->id, "Packet size %d (page_size: %ld) " "not yet supported\n", packet_size, PAGE_SIZE); @@ -321,7 +321,7 @@ for (i = 0; i < d->num_desc; i++) { if (dma_prog_region_alloc(&d->prg_reg[i], d->nb_cmd * sizeof(struct it_dma_prg), ohci->dev)) { - PRINT(KERN_ERR, ohci->id, "Failed to allocate dma it prg"); + PRINT(KERN_ERR, ohci->host->id, "Failed to allocate dma it prg"); free_dma_iso_ctx(d); return NULL; } @@ -339,22 +339,22 @@ GFP_KERNEL); if (d->buffer_status == NULL) { - PRINT(KERN_ERR, ohci->id, "Failed to allocate buffer_status"); + PRINT(KERN_ERR, ohci->host->id, "Failed to allocate buffer_status"); free_dma_iso_ctx(d); return NULL; } if (d->buffer_time == NULL) { - PRINT(KERN_ERR, ohci->id, "Failed to allocate buffer_time"); + PRINT(KERN_ERR, ohci->host->id, "Failed to allocate buffer_time"); free_dma_iso_ctx(d); return NULL; } if (d->last_used_cmd == NULL) { - PRINT(KERN_ERR, ohci->id, "Failed to allocate last_used_cmd"); + PRINT(KERN_ERR, ohci->host->id, "Failed to allocate last_used_cmd"); free_dma_iso_ctx(d); return NULL; } if (d->next_buffer == NULL) { - PRINT(KERN_ERR, ohci->id, "Failed to allocate next_buffer"); + PRINT(KERN_ERR, ohci->host->id, "Failed to allocate next_buffer"); free_dma_iso_ctx(d); return NULL; } @@ -365,7 +365,7 @@ spin_lock_init(&d->lock); - PRINT(KERN_INFO, ohci->id, "Iso %s DMA: %d buffers " + PRINT(KERN_INFO, ohci->host->id, "Iso %s DMA: %d buffers " "of size %d allocated for a frame size %d, each with %d prgs", (type == OHCI_ISO_RECEIVE) ? "receive" : "transmit", d->num_desc, d->buf_size, d->frame_size, d->nb_cmd); @@ -725,7 +725,7 @@ for (i=0; iISO_channel_usage & mask)) { v.channel = i; - PRINT(KERN_INFO, ohci->id, "Found free channel %d", i); + PRINT(KERN_INFO, ohci->host->id, "Found free channel %d", i); break; } mask = mask << 1; @@ -733,7 +733,7 @@ } if (v.channel<0 || v.channel>(ISO_CHANNELS-1)) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, ohci->host->id, "Iso channel %d out of bounds", v.channel); return -EFAULT; } @@ -743,26 +743,26 @@ (u32)(ohci->ISO_channel_usage>>32), (u32)(ohci->ISO_channel_usage&0xffffffff)); if (ohci->ISO_channel_usage & mask) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, ohci->host->id, "Channel %d is already taken", v.channel); return -EFAULT; } ohci->ISO_channel_usage |= mask; if (v.buf_size == 0 || v.buf_size > VIDEO1394_MAX_SIZE) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, ohci->host->id, "Invalid %d length buffer requested",v.buf_size); return -EFAULT; } if (v.nb_buffers == 0 || v.nb_buffers > VIDEO1394_MAX_SIZE) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, ohci->host->id, "Invalid %d buffers requested",v.nb_buffers); return -EFAULT; } if (v.nb_buffers * v.buf_size > VIDEO1394_MAX_SIZE) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, ohci->host->id, "%d buffers of size %d bytes is too big", v.nb_buffers, v.buf_size); return -EFAULT; @@ -774,7 +774,7 @@ v.channel, 0); if (d == NULL) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, ohci->host->id, "Couldn't allocate ir context"); return -EFAULT; } @@ -785,7 +785,7 @@ v.buf_size = d->buf_size; list_add_tail(&d->link, &ctx->context_list); - PRINT(KERN_INFO, ohci->id, + PRINT(KERN_INFO, ohci->host->id, "iso context %d listen on channel %d", d->ctx, v.channel); } @@ -795,7 +795,7 @@ v.channel, v.packet_size); if (d == NULL) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, ohci->host->id, "Couldn't allocate it context"); return -EFAULT; } @@ -808,7 +808,7 @@ list_add_tail(&d->link, &ctx->context_list); - PRINT(KERN_INFO, ohci->id, + PRINT(KERN_INFO, ohci->host->id, "Iso context %d talk on channel %d", d->ctx, v.channel); } @@ -829,13 +829,13 @@ return -EFAULT; if (channel<0 || channel>(ISO_CHANNELS-1)) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, ohci->host->id, "Iso channel %d out of bound", channel); return -EFAULT; } mask = (u64)0x1<ISO_channel_usage & mask)) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, ohci->host->id, "Channel %d is not being used", channel); return -EFAULT; } @@ -849,7 +849,7 @@ d = find_ctx(&ctx->context_list, OHCI_ISO_TRANSMIT, channel); if (d == NULL) return -EFAULT; - PRINT(KERN_INFO, ohci->id, "Iso context %d " + PRINT(KERN_INFO, ohci->host->id, "Iso context %d " "stop talking on channel %d", d->ctx, channel); free_dma_iso_ctx(d); @@ -866,7 +866,7 @@ d = find_ctx(&ctx->context_list, OHCI_ISO_RECEIVE, v.channel); if ((v.buffer<0) || (v.buffer>d->num_desc)) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, ohci->host->id, "Buffer %d out of range",v.buffer); return -EFAULT; } @@ -874,7 +874,7 @@ spin_lock_irqsave(&d->lock,flags); if (d->buffer_status[v.buffer]==VIDEO1394_BUFFER_QUEUED) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, ohci->host->id, "Buffer %d is already used",v.buffer); spin_unlock_irqrestore(&d->lock,flags); return -EFAULT; @@ -895,7 +895,7 @@ if (!(reg_read(ohci, d->ctrlSet) & 0x8000)) { - DBGMSG(ohci->id, "Starting iso DMA ctx=%d",d->ctx); + DBGMSG(ohci->host->id, "Starting iso DMA ctx=%d",d->ctx); /* Tell the controller where the first program is */ reg_write(ohci, d->cmdPtr, @@ -907,7 +907,7 @@ else { /* Wake up dma context if necessary */ if (!(reg_read(ohci, d->ctrlSet) & 0x400)) { - PRINT(KERN_INFO, ohci->id, + PRINT(KERN_INFO, ohci->host->id, "Waking up iso dma ctx=%d", d->ctx); reg_write(ohci, d->ctrlSet, 0x1000); } @@ -928,7 +928,7 @@ d = find_ctx(&ctx->context_list, OHCI_ISO_RECEIVE, v.channel); if ((v.buffer<0) || (v.buffer>d->num_desc)) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, ohci->host->id, "Buffer %d out of range",v.buffer); return -EFAULT; } @@ -970,7 +970,7 @@ d->buffer_status[v.buffer]=VIDEO1394_BUFFER_FREE; break; default: - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, ohci->host->id, "Buffer %d is not queued",v.buffer); spin_unlock_irqrestore(&d->lock, flags); return -EFAULT; @@ -1011,7 +1011,7 @@ d = find_ctx(&ctx->context_list, OHCI_ISO_TRANSMIT, v.channel); if ((v.buffer<0) || (v.buffer>d->num_desc)) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, ohci->host->id, "Buffer %d out of range",v.buffer); return -EFAULT; } @@ -1038,7 +1038,7 @@ spin_lock_irqsave(&d->lock,flags); if (d->buffer_status[v.buffer]!=VIDEO1394_BUFFER_FREE) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, ohci->host->id, "Buffer %d is already used",v.buffer); spin_unlock_irqrestore(&d->lock,flags); if (qv.packet_sizes) @@ -1075,7 +1075,7 @@ if (!(reg_read(ohci, d->ctrlSet) & 0x8000)) { - DBGMSG(ohci->id, "Starting iso transmit DMA ctx=%d", + DBGMSG(ohci->host->id, "Starting iso transmit DMA ctx=%d", d->ctx); put_timestamp(ohci, d, d->last_buffer); @@ -1089,7 +1089,7 @@ else { /* Wake up dma context if necessary */ if (!(reg_read(ohci, d->ctrlSet) & 0x400)) { - PRINT(KERN_INFO, ohci->id, + PRINT(KERN_INFO, ohci->host->id, "Waking up iso transmit dma ctx=%d", d->ctx); put_timestamp(ohci, d, d->last_buffer); @@ -1114,7 +1114,7 @@ d = find_ctx(&ctx->context_list, OHCI_ISO_TRANSMIT, v.channel); if ((v.buffer<0) || (v.buffer>d->num_desc)) { - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, ohci->host->id, "Buffer %d out of range",v.buffer); return -EFAULT; } @@ -1140,7 +1140,7 @@ d->buffer_status[v.buffer]=VIDEO1394_BUFFER_FREE; return 0; default: - PRINT(KERN_ERR, ohci->id, + PRINT(KERN_ERR, ohci->host->id, "Buffer %d is not queued",v.buffer); return -EFAULT; } @@ -1166,7 +1166,7 @@ lock_kernel(); if (ctx->current_ctx == NULL) { - PRINT(KERN_ERR, ctx->ohci->id, "Current iso context not set"); + PRINT(KERN_ERR, ctx->ohci->host->id, "Current iso context not set"); } else res = dma_region_mmap(&ctx->current_ctx->dma, file, vma); unlock_kernel(); @@ -1186,7 +1186,7 @@ ctx = kmalloc(sizeof(struct file_ctx), GFP_KERNEL); if (ctx == NULL) { - PRINT(KERN_ERR, ohci->id, "Cannot malloc file_ctx"); + PRINT(KERN_ERR, ohci->host->id, "Cannot malloc file_ctx"); return -ENOMEM; } @@ -1213,11 +1213,11 @@ mask = (u64) 1 << d->channel; if (!(ohci->ISO_channel_usage & mask)) - PRINT(KERN_ERR, ohci->id, "On release: Channel %d " + PRINT(KERN_ERR, ohci->host->id, "On release: Channel %d " "is not being used", d->channel); else ohci->ISO_channel_usage &= ~mask; - PRINT(KERN_INFO, ohci->id, "On release: Iso %s context " + PRINT(KERN_INFO, ohci->host->id, "On release: Iso %s context " "%d stop listening on channel %d", d->type == OHCI_ISO_RECEIVE ? "receive" : "transmit", d->ctx, d->channel); @@ -1278,17 +1278,17 @@ ohci = (struct ti_ohci *)host->hostdata; if (!hpsb_create_hostinfo(&video1394_highlevel, host, 0)) { - PRINT(KERN_ERR, ohci->id, "Cannot allocate hostinfo"); + PRINT(KERN_ERR, ohci->host->id, "Cannot allocate hostinfo"); return; } hpsb_set_hostinfo(&video1394_highlevel, host, ohci); - hpsb_set_hostinfo_key(&video1394_highlevel, host, ohci->id); + hpsb_set_hostinfo_key(&video1394_highlevel, host, ohci->host->id); - minor = IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->id; + minor = IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id; devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, minor), S_IFCHR | S_IRUSR | S_IWUSR, - "%s/%d", VIDEO1394_DRIVER_NAME, ohci->id); + "%s/%d", VIDEO1394_DRIVER_NAME, ohci->host->id); } @@ -1297,7 +1297,7 @@ struct ti_ohci *ohci = hpsb_get_hostinfo(&video1394_highlevel, host); if (ohci) - devfs_remove("%s/%d", VIDEO1394_DRIVER_NAME, ohci->id); + devfs_remove("%s/%d", VIDEO1394_DRIVER_NAME, ohci->host->id); return; } @@ -1459,7 +1459,7 @@ video1394_cdev.owner = THIS_MODULE; kobject_set_name(&video1394_cdev.kobj, VIDEO1394_DRIVER_NAME); ret = cdev_add(&video1394_cdev, IEEE1394_VIDEO1394_DEV, 16); - if (cdev_add(&video1394_cdev, IEEE1394_VIDEO1394_DEV, 16)) { + if (ret) { PRINT_G(KERN_ERR, "video1394: unable to get minor device block"); return ret; } diff -Nru a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c --- a/drivers/isdn/hisax/hisax_fcpcipnp.c Tue Mar 2 17:37:08 2004 +++ b/drivers/isdn/hisax/hisax_fcpcipnp.c Tue Mar 2 17:37:08 2004 @@ -971,10 +971,10 @@ } static struct pnp_driver fcpnp_driver = { - name: "fcpnp", - probe: fcpnp_probe, - remove: __devexit_p(fcpnp_remove), - id_table: fcpnp_ids, + .name = "fcpnp", + .probe = fcpnp_probe, + .remove = __devexit_p(fcpnp_remove), + .id_table = fcpnp_ids, }; #endif @@ -988,10 +988,10 @@ } static struct pci_driver fcpci_driver = { - name: "fcpci", - probe: fcpci_probe, - remove: __devexit_p(fcpci_remove), - id_table: fcpci_ids, + .name = "fcpci", + .probe = fcpci_probe, + .remove = __devexit_p(fcpci_remove), + .id_table = fcpci_ids, }; static int __init hisax_fcpcipnp_init(void) diff -Nru a/drivers/isdn/icn/icn.c b/drivers/isdn/icn/icn.c --- a/drivers/isdn/icn/icn.c Tue Mar 2 17:37:09 2004 +++ b/drivers/isdn/icn/icn.c Tue Mar 2 17:37:09 2004 @@ -504,19 +504,19 @@ case 3: { char *t = status + 6; - char *s = strpbrk(t, ","); + char *s = strchr(t, ','); *s++ = '\0'; strlcpy(cmd.parm.setup.phone, t, sizeof(cmd.parm.setup.phone)); - s = strpbrk(t = s, ","); + s = strchr(t = s, ','); *s++ = '\0'; if (!strlen(t)) cmd.parm.setup.si1 = 0; else cmd.parm.setup.si1 = simple_strtoul(t, NULL, 10); - s = strpbrk(t = s, ","); + s = strchr(t = s, ','); *s++ = '\0'; if (!strlen(t)) cmd.parm.setup.si2 = 0; diff -Nru a/drivers/isdn/isdnloop/isdnloop.c b/drivers/isdn/isdnloop/isdnloop.c --- a/drivers/isdn/isdnloop/isdnloop.c Tue Mar 2 17:37:07 2004 +++ b/drivers/isdn/isdnloop/isdnloop.c Tue Mar 2 17:37:07 2004 @@ -122,17 +122,17 @@ isdnloop_parse_setup(char *setup, isdn_ctrl * cmd) { char *t = setup; - char *s = strpbrk(t, ","); + char *s = strchr(t, ','); *s++ = '\0'; strlcpy(cmd->parm.setup.phone, t, sizeof(cmd->parm.setup.phone)); - s = strpbrk(t = s, ","); + s = strchr(t = s, ','); *s++ = '\0'; if (!strlen(t)) cmd->parm.setup.si1 = 0; else cmd->parm.setup.si1 = simple_strtoul(t, NULL, 10); - s = strpbrk(t = s, ","); + s = strchr(t = s, ','); *s++ = '\0'; if (!strlen(t)) cmd->parm.setup.si2 = 0; diff -Nru a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c --- a/drivers/md/dm-crypt.c Tue Mar 2 17:37:07 2004 +++ b/drivers/md/dm-crypt.c Tue Mar 2 17:37:07 2004 @@ -8,15 +8,18 @@ #include #include #include +#include #include #include #include -#include #include +#include #include #include "dm.h" +#define PFX "crypt: " + /* * per bio private data */ @@ -416,7 +419,7 @@ int key_size; if (argc != 5) { - ti->error = "dm-crypt: Not enough arguments"; + ti->error = PFX "Not enough arguments"; return -EINVAL; } @@ -425,14 +428,14 @@ mode = strsep(&tmp, "-"); if (tmp) - DMWARN("dm-crypt: Unexpected additional cipher options"); + DMWARN(PFX "Unexpected additional cipher options"); key_size = strlen(argv[1]) >> 1; cc = kmalloc(sizeof(*cc) + key_size * sizeof(u8), GFP_KERNEL); if (cc == NULL) { ti->error = - "dm-crypt: Cannot allocate transparent encryption context"; + PFX "Cannot allocate transparent encryption context"; return -ENOMEM; } @@ -441,7 +444,7 @@ else if (strcmp(mode, "ecb") == 0) cc->iv_generator = NULL; else { - ti->error = "dm-crypt: Invalid chaining mode"; + ti->error = PFX "Invalid chaining mode"; goto bad1; } @@ -452,18 +455,22 @@ tfm = crypto_alloc_tfm(cipher, crypto_flags); if (!tfm) { - ti->error = "dm-crypt: Error allocating crypto tfm"; + ti->error = PFX "Error allocating crypto tfm"; goto bad1; } + if (crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER) { + ti->error = PFX "Expected cipher algorithm"; + goto bad2; + } - if (tfm->crt_u.cipher.cit_decrypt_iv && tfm->crt_u.cipher.cit_encrypt_iv) + if (tfm->crt_cipher.cit_decrypt_iv && tfm->crt_cipher.cit_encrypt_iv) /* at least a 32 bit sector number should fit in our buffer */ cc->iv_size = max(crypto_tfm_alg_ivsize(tfm), (unsigned int)(sizeof(u32) / sizeof(u8))); else { cc->iv_size = 0; if (cc->iv_generator) { - DMWARN("dm-crypt: Selected cipher does not support IVs"); + DMWARN(PFX "Selected cipher does not support IVs"); cc->iv_generator = NULL; } } @@ -471,14 +478,14 @@ cc->io_pool = mempool_create(MIN_IOS, mempool_alloc_slab, mempool_free_slab, _crypt_io_pool); if (!cc->io_pool) { - ti->error = "dm-crypt: Cannot allocate crypt io mempool"; + ti->error = PFX "Cannot allocate crypt io mempool"; goto bad2; } cc->page_pool = mempool_create(MIN_POOL_PAGES, mempool_alloc_page, mempool_free_page, NULL); if (!cc->page_pool) { - ti->error = "dm-crypt: Cannot allocate page mempool"; + ti->error = PFX "Cannot allocate page mempool"; goto bad3; } @@ -486,28 +493,28 @@ cc->key_size = key_size; if ((key_size == 0 && strcmp(argv[1], "-") != 0) || crypt_decode_key(cc->key, argv[1], key_size) < 0) { - ti->error = "dm-crypt: Error decoding key"; + ti->error = PFX "Error decoding key"; goto bad4; } - if (tfm->crt_u.cipher.cit_setkey(tfm, cc->key, key_size) < 0) { - ti->error = "dm-crypt: Error setting key"; + if (tfm->crt_cipher.cit_setkey(tfm, cc->key, key_size) < 0) { + ti->error = PFX "Error setting key"; goto bad4; } if (sscanf(argv[2], SECTOR_FORMAT, &cc->iv_offset) != 1) { - ti->error = "dm-crypt: Invalid iv_offset sector"; + ti->error = PFX "Invalid iv_offset sector"; goto bad4; } if (sscanf(argv[4], SECTOR_FORMAT, &cc->start) != 1) { - ti->error = "dm-crypt: Invalid device sector"; + ti->error = PFX "Invalid device sector"; goto bad4; } if (dm_get_device(ti, argv[3], cc->start, ti->len, dm_table_get_mode(ti->table), &cc->dev)) { - ti->error = "dm-crypt: Device lookup failed"; + ti->error = PFX "Device lookup failed"; goto bad4; } @@ -586,8 +593,21 @@ return NULL; } } - } else - clone = bio_clone(bio, GFP_NOIO); + } else { + /* + * The block layer might modify the bvec array, so always + * copy the required bvecs because we need the original + * one in order to decrypt the whole bio data *afterwards*. + */ + clone = bio_alloc(GFP_NOIO, bio_segments(bio)); + if (clone) { + clone->bi_idx = 0; + clone->bi_vcnt = bio_segments(bio); + clone->bi_size = bio->bi_size; + memcpy(clone->bi_io_vec, bio_iovec(bio), + sizeof(struct bio_vec) * clone->bi_vcnt); + } + } if (!clone) return NULL; @@ -682,7 +702,7 @@ case STATUSTYPE_TABLE: cipher = crypto_tfm_alg_name(cc->tfm); - switch(cc->tfm->crt_u.cipher.cit_mode) { + switch(cc->tfm->crt_cipher.cit_mode) { case CRYPTO_TFM_MODE_CBC: mode = "plain"; break; @@ -739,13 +759,13 @@ _kcryptd_workqueue = create_workqueue("kcryptd"); if (!_kcryptd_workqueue) { r = -ENOMEM; - DMERR("couldn't create kcryptd"); + DMERR(PFX "couldn't create kcryptd"); goto bad1; } r = dm_register_target(&crypt_target); if (r < 0) { - DMERR("crypt: register failed %d", r); + DMERR(PFX "register failed %d", r); goto bad2; } @@ -763,7 +783,7 @@ int r = dm_unregister_target(&crypt_target); if (r < 0) - DMERR("crypt: unregister failed %d", r); + DMERR(PFX "unregister failed %d", r); destroy_workqueue(_kcryptd_workqueue); kmem_cache_destroy(_crypt_io_pool); diff -Nru a/drivers/md/raid1.c b/drivers/md/raid1.c --- a/drivers/md/raid1.c Tue Mar 2 17:37:08 2004 +++ b/drivers/md/raid1.c Tue Mar 2 17:37:08 2004 @@ -104,8 +104,8 @@ for ( ; i > 0 ; i--) __free_page(bio->bi_io_vec[i-1].bv_page); out_free_bio: - while ( j < conf->raid_disks ) - bio_put(r1_bio->bios[++j]); + while ( ++j < conf->raid_disks ) + bio_put(r1_bio->bios[j]); r1bio_pool_free(r1_bio, conf->mddev); return NULL; } diff -Nru a/drivers/media/video/zr36050.c b/drivers/media/video/zr36050.c --- a/drivers/media/video/zr36050.c Tue Mar 2 17:37:08 2004 +++ b/drivers/media/video/zr36050.c Tue Mar 2 17:37:08 2004 @@ -24,7 +24,7 @@ * ------------------------------------------------------------------------ */ -#define ZR050_VERSION "v0.7" +#define ZR050_VERSION "v0.7.1" #include #include @@ -479,7 +479,7 @@ zr36050_write(ptr, ZR050_INT_REQ_1, 3); // low 2 bits always 1 /* volume control settings */ - zr36050_write(ptr, ZR050_MBCV, ptr->max_block_vol >> 1); + /*zr36050_write(ptr, ZR050_MBCV, ptr->max_block_vol);*/ zr36050_write(ptr, ZR050_SF_HI, ptr->scalefact >> 8); zr36050_write(ptr, ZR050_SF_LO, ptr->scalefact & 0xff); @@ -521,13 +521,13 @@ /* setup misc. data for compression (target code sizes) */ /* size of compressed code to reach without header data */ - sum = ptr->total_code_vol - sum; + sum = ptr->real_code_vol - sum; bitcnt = sum << 3; /* need the size in bits */ tmp = bitcnt >> 16; dprintk(3, "%s: code: csize=%d, tot=%d, bit=%ld, highbits=%ld\n", - ptr->name, sum, ptr->total_code_vol, bitcnt, tmp); + ptr->name, sum, ptr->real_code_vol, bitcnt, tmp); zr36050_write(ptr, ZR050_TCV_NET_HI, tmp >> 8); zr36050_write(ptr, ZR050_TCV_NET_MH, tmp & 0xff); tmp = bitcnt & 0xffff; @@ -629,17 +629,37 @@ struct vfe_polarity *pol) { struct zr36050 *ptr = (struct zr36050 *) codec->data; + int size; - dprintk(2, "%s: set_video %d.%d, %d/%d-%dx%d (0x%x) call\n", + dprintk(2, "%s: set_video %d.%d, %d/%d-%dx%d (0x%x) q%d call\n", ptr->name, norm->HStart, norm->VStart, cap->x, cap->y, cap->width, cap->height, - cap->decimation); + cap->decimation, cap->quality); /* if () return -EINVAL; * trust the master driver that it knows what it does - so * we allow invalid startx/y and norm for now ... */ ptr->width = cap->width / (cap->decimation & 0xff); ptr->height = cap->height / ((cap->decimation >> 8) & 0xff); + /* (KM) JPEG quality */ + size = ptr->width * ptr->height; + size *= 16; /* size in bits */ + /* apply quality setting */ + size = size * cap->quality / 200; + + /* Minimum: 1kb */ + if (size < 8192) + size = 8192; + /* Maximum: 7/8 of code buffer */ + if (size > ptr->total_code_vol * 7) + size = ptr->total_code_vol * 7; + + ptr->real_code_vol = size >> 3; /* in bytes */ + + /* Set max_block_vol here (previously in zr36050_init, moved + * here for consistency with zr36060 code */ + zr36050_write(ptr, ZR050_MBCV, ptr->max_block_vol); + return 0; } @@ -697,6 +717,9 @@ if (size != sizeof(int)) return -EFAULT; ptr->total_code_vol = *ival; + /* (Kieran Morrissey) + * code copied from zr36060.c to ensure proper bitrate */ + ptr->real_code_vol = (ptr->total_code_vol * 6) >> 3; break; case CODEC_G_JPEG_SCALE: /* get scaling factor */ diff -Nru a/drivers/media/video/zr36050.h b/drivers/media/video/zr36050.h --- a/drivers/media/video/zr36050.h Tue Mar 2 17:37:07 2004 +++ b/drivers/media/video/zr36050.h Tue Mar 2 17:37:07 2004 @@ -44,6 +44,7 @@ __u16 bitrate_ctrl; __u32 total_code_vol; + __u32 real_code_vol; __u16 max_block_vol; __u8 h_samp_ratio[8]; diff -Nru a/drivers/mtd/afs.c b/drivers/mtd/afs.c --- a/drivers/mtd/afs.c Tue Mar 2 17:37:09 2004 +++ b/drivers/mtd/afs.c Tue Mar 2 17:37:09 2004 @@ -57,6 +57,17 @@ u32 checksum; /* Image checksum (inc. this struct) */ }; +static u32 word_sum(void *words, int num) +{ + u32 *p = words; + u32 sum = 0; + + while (num--) + sum += *p++; + + return sum; +} + static int afs_read_footer(struct mtd_info *mtd, u_int *img_start, u_int *iis_start, u_int off, u_int mask) @@ -85,6 +96,12 @@ ret = 0; /* + * Check the checksum. + */ + if (word_sum(&fs, sizeof(fs) / sizeof(u32)) != 0xffffffff) + ret = 0; + + /* * Don't touch the SIB. */ if (fs.type == 2) @@ -114,16 +131,35 @@ afs_read_iis(struct mtd_info *mtd, struct image_info_struct *iis, u_int ptr) { size_t sz; - int ret; + int ret, i; memset(iis, 0, sizeof(*iis)); ret = mtd->read(mtd, ptr, sizeof(*iis), &sz, (u_char *) iis); - if (ret >= 0 && sz != sizeof(*iis)) - ret = -EINVAL; if (ret < 0) - printk(KERN_ERR "AFS: mtd read failed at 0x%x: %d\n", - ptr, ret); + goto failed; + + if (sz != sizeof(*iis)) { + ret = -EINVAL; + goto failed; + } + + ret = 0; + + /* + * Validate the name - it must be NUL terminated. + */ + for (i = 0; i < sizeof(iis->name); i++) + if (iis->name[i] == '\0') + break; + if (i < sizeof(iis->name)) + ret = 1; + + return ret; + + failed: + printk(KERN_ERR "AFS: mtd read failed at 0x%x: %d\n", + ptr, ret); return ret; } @@ -160,6 +196,8 @@ ret = afs_read_iis(mtd, &iis, iis_ptr); if (ret < 0) break; + if (ret == 0) + continue; sz += sizeof(struct mtd_partition); sz += strlen(iis.name) + 1; @@ -194,6 +232,8 @@ ret = afs_read_iis(mtd, &iis, iis_ptr); if (ret < 0) break; + if (ret == 0) + continue; strcpy(str, iis.name); size = mtd->erasesize + off - img_ptr; diff -Nru a/drivers/mtd/maps/integrator-flash.c b/drivers/mtd/maps/integrator-flash.c --- a/drivers/mtd/maps/integrator-flash.c Tue Mar 2 17:37:09 2004 +++ b/drivers/mtd/maps/integrator-flash.c Tue Mar 2 17:37:09 2004 @@ -1,8 +1,9 @@ /*====================================================================== - drivers/mtd/maps/armflash.c: ARM Flash Layout/Partitioning + drivers/mtd/maps/integrator-flash.c: ARM Integrator flash map driver Copyright (C) 2000 ARM Limited + Copyright (C) 2003 Deep Blue Solutions Ltd. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,7 +22,7 @@ This is access code for flashes using ARM's flash partitioning standards. - $Id: integrator-flash.c,v 1.12 2003/05/20 20:59:30 dwmw2 Exp $ + $Id: integrator-flash.c,v 1.15 2004/02/27 22:37:39 rmk Exp $ ======================================================================*/ @@ -64,7 +65,7 @@ info->plat->set_vpp(on); } -static const char *probes[] = { "RedBoot", "afs", NULL }; +static const char *probes[] = { "cmdlinepart", "RedBoot", "afs", NULL }; static int armflash_probe(struct device *_dev) { diff -Nru a/drivers/mtd/maps/lubbock-flash.c b/drivers/mtd/maps/lubbock-flash.c --- a/drivers/mtd/maps/lubbock-flash.c Tue Mar 2 17:37:08 2004 +++ b/drivers/mtd/maps/lubbock-flash.c Tue Mar 2 17:37:08 2004 @@ -74,7 +74,7 @@ lubbock_maps[flashboot].name = "Lubbock Boot ROM"; for (i = 0; i < 2; i++) { - lubbock_maps[i].virt = (unsigned long)__ioremap(lubbock_maps[i].phys, WINDOW_SIZE, 0); + lubbock_maps[i].virt = (unsigned long)ioremap(lubbock_maps[i].phys, WINDOW_SIZE); if (!lubbock_maps[i].virt) { printk(KERN_WARNING "Failed to ioremap %s\n", lubbock_maps[i].name); if (!ret) @@ -97,8 +97,8 @@ } mymtds[i]->owner = THIS_MODULE; - int ret = parse_mtd_partitions(mymtds[i], probes, - &parsed_parts[i], 0); + ret = parse_mtd_partitions(mymtds[i], probes, + &parsed_parts[i], 0); if (ret > 0) nr_parsed_parts[i] = ret; diff -Nru a/drivers/net/Kconfig b/drivers/net/Kconfig --- a/drivers/net/Kconfig Tue Mar 2 17:37:09 2004 +++ b/drivers/net/Kconfig Tue Mar 2 17:37:09 2004 @@ -1676,25 +1676,23 @@ select CRC32 select MII help - If you have a VIA "rhine" based network card (Rhine-I (3043), - Rhine-2 (VT86c100A) or Rhine-III (VT6105)), say Y here. + If you have a VIA "Rhine" based network card (Rhine-I (VT86C100A), + Rhine-II (VT6102), or Rhine-III (VT6105)), say Y here. Rhine-type + Ethernet functions can also be found integrated on South Bridges + (e.g. VT8235). - To compile this driver as a module, choose M here and read - . The module + To compile this driver as a module, choose M here. The module will be called via-rhine. config VIA_RHINE_MMIO - bool "Use MMIO instead of PIO (EXPERIMENTAL)" - depends on VIA_RHINE && EXPERIMENTAL + bool "Use MMIO instead of PIO" + depends on VIA_RHINE help This instructs the driver to use PCI shared memory (MMIO) instead of programmed I/O ports (PIO). Enabling this gives an improvement in processing time in parts of the driver. - It is not known if this works reliably on all "rhine" based cards, - but it has been tested successfully on some DFE-530TX adapters. - - If unsure, say N. + If unsure, say Y. config LAN_SAA9730 bool "Philips SAA9730 Ethernet support (EXPERIMENTAL)" diff -Nru a/drivers/net/hp100.c b/drivers/net/hp100.c --- a/drivers/net/hp100.c Tue Mar 2 17:37:08 2004 +++ b/drivers/net/hp100.c Tue Mar 2 17:37:08 2004 @@ -201,6 +201,7 @@ { "HWP1990" }, /* HP J2577 */ { "CPX0301" }, /* ReadyLink ENET100-VG4 */ { "CPX0401" }, /* FreedomLine 100/VG */ + { "" } /* Mandatory final entry ! */ }; MODULE_DEVICE_TABLE(eisa, hp100_eisa_tbl); #endif @@ -326,16 +327,21 @@ return str; } -static __init int hp100_isa_probe1(struct net_device *dev, int addr) +static __init int hp100_isa_probe1(struct net_device *dev, int ioaddr) { const char *sig; int i; - if (!request_region(addr, HP100_REGION_SIZE, "hp100")) + if (!request_region(ioaddr, HP100_REGION_SIZE, "hp100")) goto err; - sig = hp100_read_id(addr); - release_region(addr, HP100_REGION_SIZE); + if (hp100_inw(HW_ID) != HP100_HW_ID_CASCADE) { + release_region(ioaddr, HP100_REGION_SIZE); + goto err; + } + + sig = hp100_read_id(ioaddr); + release_region(ioaddr, HP100_REGION_SIZE); if (sig == NULL) goto err; @@ -347,7 +353,7 @@ } if (i < ARRAY_SIZE(hp100_isa_tbl)) - return hp100_probe1(dev, addr, HP100_BUS_ISA, NULL); + return hp100_probe1(dev, ioaddr, HP100_BUS_ISA, NULL); err: return -ENODEV; diff -Nru a/drivers/net/hydra.c b/drivers/net/hydra.c --- a/drivers/net/hydra.c Tue Mar 2 17:37:08 2004 +++ b/drivers/net/hydra.c Tue Mar 2 17:37:08 2004 @@ -142,10 +142,6 @@ ei_status.reg_offset = hydra_offsets; dev->open = &hydra_open; dev->stop = &hydra_close; -#ifdef MODULE - ei_status.priv = (unsigned long)root_hydra_dev; - root_hydra_dev = dev; -#endif NS8390_init(dev, 0); err = register_netdev(dev); diff -Nru a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c --- a/drivers/net/ibmveth.c Tue Mar 2 17:37:07 2004 +++ b/drivers/net/ibmveth.c Tue Mar 2 17:37:07 2004 @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include #include @@ -66,16 +66,16 @@ printk(KERN_INFO "%s: " fmt, __FILE__, ## args) #define ibmveth_error_printk(fmt, args...) \ - printk(KERN_ERR "(%s:%3.3d ua:%lx) ERROR: " fmt, __FILE__, __LINE__ , adapter->vdev->unit_address, ## args) + printk(KERN_ERR "(%s:%3.3d ua:%x) ERROR: " fmt, __FILE__, __LINE__ , adapter->vdev->unit_address, ## args) #ifdef DEBUG #define ibmveth_debug_printk_no_adapter(fmt, args...) \ printk(KERN_DEBUG "(%s:%3.3d): " fmt, __FILE__, __LINE__ , ## args) #define ibmveth_debug_printk(fmt, args...) \ - printk(KERN_DEBUG "(%s:%3.3d ua:%lx): " fmt, __FILE__, __LINE__ , adapter->vdev->unit_address, ## args) + printk(KERN_DEBUG "(%s:%3.3d ua:%x): " fmt, __FILE__, __LINE__ , adapter->vdev->unit_address, ## args) #define ibmveth_assert(expr) \ if(!(expr)) { \ - printk(KERN_DEBUG "assertion failed (%s:%3.3d ua:%lx): %s\n", __FILE__, __LINE__, adapter->vdev->unit_address, #expr); \ + printk(KERN_DEBUG "assertion failed (%s:%3.3d ua:%x): %s\n", __FILE__, __LINE__, adapter->vdev->unit_address, #expr); \ BUG(); \ } #else @@ -869,7 +869,7 @@ unsigned int *mcastFilterSize_p; - ibmveth_debug_printk_no_adapter("entering ibmveth_probe for UA 0x%lx\n", + ibmveth_debug_printk_no_adapter("entering ibmveth_probe for UA 0x%x\n", dev->unit_address); mac_addr_p = (unsigned int *) vio_get_attribute(dev, VETH_MAC_ADDR, 0); @@ -913,7 +913,7 @@ adapter->mac_addr = 0; memcpy(&adapter->mac_addr, mac_addr_p, 6); - adapter->liobn = dev->tce_table->index; + adapter->liobn = dev->iommu_table->it_index; netdev->irq = dev->irq; netdev->open = ibmveth_open; @@ -1014,7 +1014,7 @@ seq_printf(seq, "%s %s\n\n", ibmveth_driver_string, ibmveth_driver_version); - seq_printf(seq, "Unit Address: 0x%lx\n", adapter->vdev->unit_address); + seq_printf(seq, "Unit Address: 0x%x\n", adapter->vdev->unit_address); seq_printf(seq, "LIOBN: 0x%lx\n", adapter->liobn); seq_printf(seq, "Current MAC: %02X:%02X:%02X:%02X:%02X:%02X\n", current_mac[0], current_mac[1], current_mac[2], diff -Nru a/drivers/net/r8169.c b/drivers/net/r8169.c --- a/drivers/net/r8169.c Tue Mar 2 17:37:08 2004 +++ b/drivers/net/r8169.c Tue Mar 2 17:37:08 2004 @@ -871,7 +871,6 @@ void *ioaddr) { unsigned long dirty_tx, tx_left = 0; - int entry = tp->cur_tx % NUM_TX_DESC; assert(dev != NULL); assert(tp != NULL); @@ -881,14 +880,18 @@ tx_left = tp->cur_tx - dirty_tx; while (tx_left > 0) { + int entry = dirty_tx % NUM_TX_DESC; + if ((tp->TxDescArray[entry].status & OWNbit) == 0) { - dev_kfree_skb_irq(tp-> - Tx_skbuff[dirty_tx % NUM_TX_DESC]); - tp->Tx_skbuff[dirty_tx % NUM_TX_DESC] = NULL; + struct sk_buff *skb = tp->Tx_skbuff[entry]; + + tp->stats.tx_bytes += skb->len >= ETH_ZLEN ? + skb->len : ETH_ZLEN; tp->stats.tx_packets++; + dev_kfree_skb_irq(skb); + tp->Tx_skbuff[entry] = NULL; dirty_tx++; tx_left--; - entry++; } } diff -Nru a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c --- a/drivers/net/wireless/airo_cs.c Tue Mar 2 17:37:09 2004 +++ b/drivers/net/wireless/airo_cs.c Tue Mar 2 17:37:09 2004 @@ -264,11 +264,8 @@ if (*linkp == NULL) return; - if (link->state & DEV_CONFIG) { + if (link->state & DEV_CONFIG) airo_release(link); - if (link->state & DEV_STALE_CONFIG) - return; - } if ( ((local_info_t*)link->priv)->eth_dev ) { stop_airo_card( ((local_info_t*)link->priv)->eth_dev, 0 ); @@ -504,18 +501,6 @@ { DEBUG(0, "airo_release(0x%p)\n", link); - /* - If the device is currently in use, we won't release until it - is actually closed, because until then, we can't be sure that - no one will try to access the device or its data structures. - */ - if (link->open) { - DEBUG(1, "airo_cs: release postponed, '%s' still open\n", - link->dev->dev_name); - link->state |= DEV_STALE_CONFIG; - return; - } - /* Unlink the device chain */ link->dev = NULL; @@ -533,9 +518,6 @@ if (link->irq.AssignedIRQ) pcmcia_release_irq(link->handle, &link->irq); link->state &= ~DEV_CONFIG; - - if (link->state & DEV_STALE_CONFIG) - airo_detach(link); } /*====================================================================== diff -Nru a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c --- a/drivers/net/wireless/netwave_cs.c Tue Mar 2 17:37:09 2004 +++ b/drivers/net/wireless/netwave_cs.c Tue Mar 2 17:37:09 2004 @@ -544,14 +544,8 @@ the release() function is called, that will trigger a proper detach(). */ - if (link->state & DEV_CONFIG) { + if (link->state & DEV_CONFIG) netwave_release(link); - if (link->state & DEV_STALE_CONFIG) { - DEBUG(1, "netwave_cs: detach postponed, '%s' still " - "locked\n", link->dev->dev_name); - return; - } - } /* Break the link with Card Services */ if (link->handle) @@ -1130,17 +1124,6 @@ DEBUG(0, "netwave_release(0x%p)\n", link); - /* - If the device is currently in use, we won't release until it - is actually closed. - */ - if (link->open) { - printk(KERN_DEBUG "netwave_cs: release postponed, '%s' still open\n", - link->dev->dev_name); - link->state |= DEV_STALE_CONFIG; - return; - } - /* Don't bother checking to see if these succeed or not */ if (link->win) { iounmap(priv->ramBase); @@ -1151,9 +1134,6 @@ pcmcia_release_irq(link->handle, &link->irq); link->state &= ~DEV_CONFIG; - - if (link->state & DEV_STALE_CONFIG) - netwave_detach(link); } /* @@ -1703,8 +1683,7 @@ link->open--; netif_stop_queue(dev); - if (link->state & DEV_STALE_CONFIG) - netwave_release(link); + return 0; } diff -Nru a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c --- a/drivers/net/wireless/ray_cs.c Tue Mar 2 17:37:08 2004 +++ b/drivers/net/wireless/ray_cs.c Tue Mar 2 17:37:08 2004 @@ -454,11 +454,8 @@ the release() function is called, that will trigger a proper detach(). */ - if (link->state & DEV_CONFIG) { + if (link->state & DEV_CONFIG) ray_release(link); - if(link->state & DEV_STALE_CONFIG) - return; - } /* Break the link with Card Services */ if (link->handle) @@ -872,15 +869,7 @@ int i; DEBUG(1, "ray_release(0x%p)\n", link); - /* If the device is currently in use, we won't release until it - is actually closed. - */ - if (link->open) { - DEBUG(1, "ray_cs: release postponed, '%s' still open\n", - link->dev->dev_name); - link->state |= DEV_STALE_CONFIG; - return; - } + del_timer(&local->timer); link->state &= ~DEV_CONFIG; @@ -900,9 +889,6 @@ if ( i != CS_SUCCESS ) DEBUG(0,"ReleaseIRQ ret = %x\n",i); DEBUG(2,"ray_release ending\n"); - - if (link->state & DEV_STALE_CONFIG) - ray_detach(link); } /*============================================================================= @@ -1724,8 +1710,6 @@ link->open--; netif_stop_queue(dev); - if (link->state & DEV_STALE_CONFIG) - ray_release(link); /* In here, we should stop the hardware (stop card from beeing active) * and set local->card_status to CARD_AWAITING_PARAM, so that while the diff -Nru a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c --- a/drivers/net/wireless/wavelan_cs.c Tue Mar 2 17:37:08 2004 +++ b/drivers/net/wireless/wavelan_cs.c Tue Mar 2 17:37:08 2004 @@ -4155,18 +4155,6 @@ printk(KERN_DEBUG "%s: -> wv_pcmcia_release(0x%p)\n", dev->name, link); #endif - /* If the device is currently in use, we won't release until it is - * actually closed. */ - if(link->open) - { -#ifdef DEBUG_CONFIG_INFO - printk(KERN_DEBUG "%s: wv_pcmcia_release: release postponed, device still open\n", - dev->name); -#endif - link->state |= DEV_STALE_CONFIG; - return; - } - /* Don't bother checking to see if these succeed or not */ iounmap((u_char *)dev->mem_start); pcmcia_release_window(link->win); @@ -4179,9 +4167,6 @@ #ifdef DEBUG_CONFIG_TRACE printk(KERN_DEBUG "%s: <- wv_pcmcia_release()\n", dev->name); #endif - - if (link->state & DEV_STALE_CONFIG) - wavelan_detach(link); } /************************ INTERRUPT HANDLING ************************/ @@ -4634,10 +4619,6 @@ /* Power down the module */ hacr_write(base, HACR_DEFAULT & (~HACR_PWR_STAT)); } - else - /* The card is no more there (flag is activated in wv_pcmcia_release) */ - if(link->state & DEV_STALE_CONFIG) - wv_pcmcia_release(link); #ifdef DEBUG_CALLBACK_TRACE printk(KERN_DEBUG "%s: <-wavelan_close()\n", dev->name); @@ -4802,14 +4783,6 @@ { /* Some others haven't done their job : give them another chance */ wv_pcmcia_release(link); - if(link->state & DEV_STALE_CONFIG) - { -#ifdef DEBUG_CONFIG_INFO - printk(KERN_DEBUG "wavelan_detach: detach postponed," - " '%s' still locked\n", link->dev->dev_name); -#endif - return; - } } /* Break the link with Card Services */ diff -Nru a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c --- a/drivers/net/wireless/wl3501_cs.c Tue Mar 2 17:37:07 2004 +++ b/drivers/net/wireless/wl3501_cs.c Tue Mar 2 17:37:07 2004 @@ -1306,10 +1306,6 @@ /* Mask interrupts from the SUTRO */ wl3501_block_interrupt(this); - if (link->state & DEV_STALE_CONFIG) { - link->state |= DEV_RELEASE_PENDING; - wl3501_release(link); - } rc = 0; printk(KERN_INFO "%s: WL3501 closed\n", dev->name); out: @@ -2220,15 +2216,6 @@ { struct net_device *dev = link->priv; - /* If the device is currently in use, we won't release until it is - * actually closed. */ - if (link->open) { - dprintk(1, "release postponed, '%s' still open", - link->dev->dev_name); - link->state |= DEV_STALE_CONFIG; - goto out; - } - /* Unlink the device chain */ if (link->dev) { unregister_netdev(dev); @@ -2240,11 +2227,6 @@ pcmcia_release_io(link->handle, &link->io); pcmcia_release_irq(link->handle, &link->irq); link->state &= ~DEV_CONFIG; - - if (link->state & DEV_STALE_CONFIG) - wl3501_detach(link); -out: - return; } /** diff -Nru a/drivers/pci/hotplug/Kconfig b/drivers/pci/hotplug/Kconfig --- a/drivers/pci/hotplug/Kconfig Tue Mar 2 17:37:08 2004 +++ b/drivers/pci/hotplug/Kconfig Tue Mar 2 17:37:08 2004 @@ -191,7 +191,7 @@ config HOTPLUG_PCI_RPA tristate "RPA PCI Hotplug driver" - depends on HOTPLUG_PCI && PPC_PSERIES && PPC64 + depends on HOTPLUG_PCI && PPC_PSERIES && PPC64 && !HOTPLUG_PCI_FAKE help Say Y here if you have a a RPA system that supports PCI Hotplug. diff -Nru a/drivers/pci/hotplug/Makefile b/drivers/pci/hotplug/Makefile --- a/drivers/pci/hotplug/Makefile Tue Mar 2 17:37:08 2004 +++ b/drivers/pci/hotplug/Makefile Tue Mar 2 17:37:08 2004 @@ -25,6 +25,8 @@ cpqphp_ctrl.o \ cpqphp_sysfs.o \ cpqphp_pci.o +cpqphp-$(CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM) += cpqphp_nvram.o +cpqphp-objs += $(cpqphp-y) ibmphp-objs := ibmphp_core.o \ ibmphp_ebda.o \ @@ -49,37 +51,24 @@ pciehp_sysfs.o \ pciehp_hpc.o -shpchp-objs := shpchp_core.o \ - shpchp_ctrl.o \ - shpchp_pci.o \ - shpchp_sysfs.o \ - shpchp_hpc.o - -ifdef CONFIG_HOTPLUG_PCI_ACPI - EXTRA_CFLAGS += -D_LINUX -I$(TOPDIR)/drivers/acpi - ifdef CONFIG_ACPI_DEBUG - EXTRA_CFLAGS += -DACPI_DEBUG_OUTPUT - endif -endif - -ifeq ($(CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM),y) - cpqphp-objs += cpqphp_nvram.o -endif - ifeq ($(CONFIG_HOTPLUG_PCI_PCIE_PHPRM_NONACPI),y) pciehp-objs += pciehprm_nonacpi.o else pciehp-objs += pciehprm_acpi.o - EXTRA_CFLAGS += -D_LINUX -I$(TOPDIR)/drivers/acpi -I$(TOPDIR)/drivers/acpi/include endif +shpchp-objs := shpchp_core.o \ + shpchp_ctrl.o \ + shpchp_pci.o \ + shpchp_sysfs.o \ + shpchp_hpc.o + ifeq ($(CONFIG_HOTPLUG_PCI_SHPC_PHPRM_LEGACY),y) shpchp-objs += shpchprm_legacy.o else - ifeq ($(CONFIG_HOTPLUG_PCI_SHPC_PHPRM_NONACPI),y) - shpchp-objs += shpchprm_nonacpi.o - else - shpchp-objs += shpchprm_acpi.o - EXTRA_CFLAGS += -D_LINUX -I$(TOPDIR)/drivers/acpi - endif + ifeq ($(CONFIG_HOTPLUG_PCI_SHPC_PHPRM_NONACPI),y) + shpchp-objs += shpchprm_nonacpi.o + else + shpchp-objs += shpchprm_acpi.o + endif endif diff -Nru a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c --- a/drivers/pci/hotplug/pciehp_ctrl.c Tue Mar 2 17:37:07 2004 +++ b/drivers/pci/hotplug/pciehp_ctrl.c Tue Mar 2 17:37:07 2004 @@ -188,11 +188,13 @@ /* * Card Present */ + info("Card present on Slot(%d)\n", ctrl->first_slot + hp_slot); taskInfo->event_type = INT_PRESENCE_ON; } else { /* * Not Present */ + info("Card not present on Slot(%d)\n", ctrl->first_slot + hp_slot); taskInfo->event_type = INT_PRESENCE_OFF; } diff -Nru a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h --- a/drivers/pci/hotplug/shpchp.h Tue Mar 2 17:37:08 2004 +++ b/drivers/pci/hotplug/shpchp.h Tue Mar 2 17:37:08 2004 @@ -390,8 +390,8 @@ /* Sleep for up to 1 second */ schedule_timeout(1*HZ); } else { - /* Sleep for up to 1.5 second */ - schedule_timeout(1.5*HZ); + /* Sleep for up to 2 seconds */ + schedule_timeout(2*HZ); } set_current_state(TASK_RUNNING); remove_wait_queue(&ctrl->queue, &wait); diff -Nru a/drivers/pci/hotplug/shpchp_ctrl.c b/drivers/pci/hotplug/shpchp_ctrl.c --- a/drivers/pci/hotplug/shpchp_ctrl.c Tue Mar 2 17:37:09 2004 +++ b/drivers/pci/hotplug/shpchp_ctrl.c Tue Mar 2 17:37:09 2004 @@ -192,11 +192,13 @@ /* * Card Present */ + info("Card present on Slot(%d)\n", ctrl->first_slot + hp_slot); taskInfo->event_type = INT_PRESENCE_ON; } else { /* * Not Present */ + info("Card not present on Slot(%d)\n", ctrl->first_slot + hp_slot); taskInfo->event_type = INT_PRESENCE_OFF; } diff -Nru a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c --- a/drivers/pci/hotplug/shpchp_hpc.c Tue Mar 2 17:37:08 2004 +++ b/drivers/pci/hotplug/shpchp_hpc.c Tue Mar 2 17:37:08 2004 @@ -1071,9 +1071,14 @@ if (!shpchp_poll_mode) { ctrl = (struct controller *)dev_id; php_ctlr = ctrl->hpc_ctlr_handle; - } else + } else { php_ctlr = (struct php_ctlr_state_s *) dev_id; + ctrl = (struct controller *)php_ctlr->callback_instance_id; + } + if (!ctrl) + return IRQ_NONE; + if (!php_ctlr || !php_ctlr->creg) return IRQ_NONE; @@ -1085,18 +1090,20 @@ dbg("%s: shpc_isr proceeds\n", __FUNCTION__); dbg("%s: intr_loc = %x\n",__FUNCTION__, intr_loc); - /* Mask Global Interrupt Mask - see implementation note on p. 139 */ - /* of SHPC spec rev 1.0*/ - temp_dword = readl(php_ctlr->creg + SERR_INTR_ENABLE); - dbg("%s: Before masking global interrupt, temp_dword = %x\n", - __FUNCTION__, temp_dword); - temp_dword |= 0x00000001; - dbg("%s: After masking global interrupt, temp_dword = %x\n", - __FUNCTION__, temp_dword); - writel(temp_dword, php_ctlr->creg + SERR_INTR_ENABLE); + if(!shpchp_poll_mode) { + /* Mask Global Interrupt Mask - see implementation note on p. 139 */ + /* of SHPC spec rev 1.0*/ + temp_dword = readl(php_ctlr->creg + SERR_INTR_ENABLE); + dbg("%s: Before masking global interrupt, temp_dword = %x\n", + __FUNCTION__, temp_dword); + temp_dword |= 0x00000001; + dbg("%s: After masking global interrupt, temp_dword = %x\n", + __FUNCTION__, temp_dword); + writel(temp_dword, php_ctlr->creg + SERR_INTR_ENABLE); - intr_loc2 = readl(php_ctlr->creg + INTR_LOC); - dbg("%s: intr_loc2 = %x\n",__FUNCTION__, intr_loc2); + intr_loc2 = readl(php_ctlr->creg + INTR_LOC); + dbg("%s: intr_loc2 = %x\n",__FUNCTION__, intr_loc2); + } if (intr_loc & 0x0001) { /* @@ -1159,14 +1166,16 @@ dbg("%s: intr_loc2 = %x\n",__FUNCTION__, intr_loc2); } } - /* Unmask Global Interrupt Mask */ - temp_dword = readl(php_ctlr->creg + SERR_INTR_ENABLE); - dbg("%s: 2-Before unmasking global interrupt, temp_dword = %x\n", - __FUNCTION__, temp_dword); - temp_dword &= 0xfffffffe; - dbg("%s: 2-After unmasking global interrupt, temp_dword = %x\n", - __FUNCTION__, temp_dword); - writel(temp_dword, php_ctlr->creg + SERR_INTR_ENABLE); + if (!shpchp_poll_mode) { + /* Unmask Global Interrupt Mask */ + temp_dword = readl(php_ctlr->creg + SERR_INTR_ENABLE); + dbg("%s: 2-Before unmasking global interrupt, temp_dword = %x\n", + __FUNCTION__, temp_dword); + temp_dword &= 0xfffffffe; + dbg("%s: 2-After unmasking global interrupt, temp_dword = %x\n", + __FUNCTION__, temp_dword); + writel(temp_dword, php_ctlr->creg + SERR_INTR_ENABLE); + } return IRQ_HANDLED; } diff -Nru a/drivers/pci/pci.c b/drivers/pci/pci.c --- a/drivers/pci/pci.c Tue Mar 2 17:37:08 2004 +++ b/drivers/pci/pci.c Tue Mar 2 17:37:08 2004 @@ -535,11 +535,6 @@ return 0; err_out: - printk (KERN_WARNING "PCI: Unable to reserve %s region #%d:%lx@%lx for device %s\n", - pci_resource_flags(pdev, i) & IORESOURCE_IO ? "I/O" : "mem", - i + 1, /* PCI BAR # */ - pci_resource_len(pdev, i), pci_resource_start(pdev, i), - pci_name(pdev)); while(--i >= 0) pci_release_region(pdev, i); diff -Nru a/drivers/pci/probe.c b/drivers/pci/probe.c --- a/drivers/pci/probe.c Tue Mar 2 17:37:08 2004 +++ b/drivers/pci/probe.c Tue Mar 2 17:37:08 2004 @@ -366,6 +366,8 @@ child = pci_alloc_child_bus(bus, dev, busnr); child->primary = buses & 0xFF; child->subordinate = (buses >> 16) & 0xFF; + child->bridge_ctl = bctl; + cmax = pci_scan_child_bus(child); if (cmax > max) max = cmax; } else { @@ -400,6 +402,8 @@ pci_write_config_dword(dev, PCI_PRIMARY_BUS, buses); if (!is_cardbus) { + child->bridge_ctl = PCI_BRIDGE_CTL_NO_ISA; + /* Now we can scan all subordinate buses... */ max = pci_scan_child_bus(child); } else { diff -Nru a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c --- a/drivers/pci/setup-bus.c Tue Mar 2 17:37:09 2004 +++ b/drivers/pci/setup-bus.c Tue Mar 2 17:37:09 2004 @@ -43,13 +43,15 @@ #define CARDBUS_IO_SIZE (4096) #define CARDBUS_MEM_SIZE (32*1024*1024) -static int __devinit +static void __devinit pbus_assign_resources_sorted(struct pci_bus *bus) { struct pci_dev *dev; struct resource *res; struct resource_list head, *list, *tmp; - int idx, found_vga = 0; + int idx; + + bus->bridge_ctl &= ~PCI_BRIDGE_CTL_VGA; head.next = NULL; list_for_each_entry(dev, &bus->devices, bus_list) { @@ -57,7 +59,7 @@ if (class == PCI_CLASS_DISPLAY_VGA || class == PCI_CLASS_NOT_DEFINED_VGA) - found_vga = 1; + bus->bridge_ctl |= PCI_BRIDGE_CTL_VGA; pdev_sort_resources(dev, &head); } @@ -70,8 +72,6 @@ list = list->next; kfree(tmp); } - - return found_vga; } static void __devinit @@ -211,10 +211,7 @@ /* Clear out the upper 32 bits of PREF base. */ pci_write_config_dword(bridge, PCI_PREF_BASE_UPPER32, 0); - /* Check if we have VGA behind the bridge. - Enable ISA in either case (FIXME!). */ - l = (bus->resource[0]->flags & IORESOURCE_BUS_HAS_VGA) ? 0x0c : 0x04; - pci_write_config_word(bridge, PCI_BRIDGE_CONTROL, l); + pci_write_config_word(bridge, PCI_BRIDGE_CONTROL, bus->bridge_ctl); } /* Check whether the bridge supports optional I/O and @@ -498,13 +495,14 @@ pci_bus_assign_resources(struct pci_bus *bus) { struct pci_bus *b; - int found_vga = pbus_assign_resources_sorted(bus); struct pci_dev *dev; - if (found_vga) { + pbus_assign_resources_sorted(bus); + + if (bus->bridge_ctl & PCI_BRIDGE_CTL_VGA) { /* Propagate presence of the VGA to upstream bridges */ for (b = bus; b->parent; b = b->parent) { - b->resource[0]->flags |= IORESOURCE_BUS_HAS_VGA; + b->bridge_ctl |= PCI_BRIDGE_CTL_VGA; } } list_for_each_entry(dev, &bus->devices, bus_list) { diff -Nru a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c --- a/drivers/pci/setup-res.c Tue Mar 2 17:37:09 2004 +++ b/drivers/pci/setup-res.c Tue Mar 2 17:37:09 2004 @@ -143,8 +143,9 @@ } if (ret) { - printk(KERN_ERR "PCI: Failed to allocate resource %d(%lx-%lx) for %s\n", - resno, res->start, res->end, pci_name(dev)); + printk(KERN_ERR "PCI: Failed to allocate %s resource #%d:%lx@%lx for %s\n", + res->flags & IORESOURCE_IO ? "I/O" : "mem", + resno, size, res->start, pci_name(dev)); } else if (resno < PCI_BRIDGE_RESOURCES) { pci_update_resource(dev, res, resno); } diff -Nru a/drivers/s390/block/Kconfig b/drivers/s390/block/Kconfig --- a/drivers/s390/block/Kconfig Tue Mar 2 17:37:07 2004 +++ b/drivers/s390/block/Kconfig Tue Mar 2 17:37:07 2004 @@ -1,3 +1,5 @@ +if ARCH_S390 + comment "S/390 block device drivers" depends on ARCH_S390 @@ -62,3 +64,5 @@ ioctl functions specific to the dasd driver. This is only needed if you want to use applications written for linux-2.4 dasd channel measurement facility interface. + +endif diff -Nru a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c --- a/drivers/s390/block/dasd_eckd.c Tue Mar 2 17:37:07 2004 +++ b/drivers/s390/block/dasd_eckd.c Tue Mar 2 17:37:07 2004 @@ -7,7 +7,7 @@ * Bugreports.to..: * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 * - * $Revision: 1.50 $ + * $Revision: 1.51 $ */ #include @@ -85,7 +85,7 @@ ret = dasd_generic_probe (cdev, &dasd_eckd_discipline); if (ret) return ret; - ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP); + ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP | CCWDEV_ALLOW_FORCE); return 0; } diff -Nru a/drivers/s390/block/xpram.c b/drivers/s390/block/xpram.c --- a/drivers/s390/block/xpram.c Tue Mar 2 17:37:08 2004 +++ b/drivers/s390/block/xpram.c Tue Mar 2 17:37:08 2004 @@ -74,9 +74,10 @@ */ static int devs = XPRAM_DEVS; static unsigned int sizes[XPRAM_MAX_DEVS]; +static unsigned int sizes_count; module_param(devs, int, 0); -MODULE_PARM(sizes,"1-" __MODULE_STRING(XPRAM_MAX_DEVS) "i"); +module_param_array(sizes, int, sizes_count, 0); MODULE_PARM_DESC(devs, "number of devices (\"partitions\"), " \ "the default is " __MODULE_STRING(XPRAM_DEVS) "\n"); diff -Nru a/drivers/s390/char/Makefile b/drivers/s390/char/Makefile --- a/drivers/s390/char/Makefile Tue Mar 2 17:37:08 2004 +++ b/drivers/s390/char/Makefile Tue Mar 2 17:37:08 2004 @@ -18,6 +18,6 @@ tape-$(CONFIG_S390_TAPE_BLOCK) += tape_block.o tape-$(CONFIG_PROC_FS) += tape_proc.o -tape-objs := tape_core.o tape_std.o tape_char.o $(tape-y) +tape-objs := tape_core.o tape_std.o tape_char.o tape_class.o $(tape-y) obj-$(CONFIG_S390_TAPE) += tape.o obj-$(CONFIG_S390_TAPE_34XX) += tape_34xx.o diff -Nru a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c --- a/drivers/s390/char/sclp.c Tue Mar 2 17:37:08 2004 +++ b/drivers/s390/char/sclp.c Tue Mar 2 17:37:08 2004 @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -334,6 +335,8 @@ unsigned long psw_mask; unsigned long cr0, cr0_sync; + /* Need to irq_enter() to prevent BH from executing. */ + irq_enter(); /* * save cr0 * enable service signal external interruption (cr0.22) @@ -362,6 +365,7 @@ /* restore cr0 */ __ctl_load(cr0, 0, 0); + irq_exit(); } /* @@ -467,29 +471,45 @@ * SCLP quiesce event handler */ #ifdef CONFIG_SMP -static cpumask_t cpu_quiesce_map; - static void do_load_quiesce_psw(void * __unused) { psw_t quiesce_psw; + unsigned long status; + int i; - cpu_clear(smp_processor_id(), cpu_quiesce_map); - if (smp_processor_id() == 0) { - /* Wait for all other cpus to enter do_load_quiesce_psw */ - while (!cpus_empty(cpu_quiesce_map)); - /* Quiesce the last cpu with the special psw */ - quiesce_psw.mask = PSW_BASE_BITS | PSW_MASK_WAIT; - quiesce_psw.addr = 0xfff; - __load_psw(quiesce_psw); + if (smp_processor_id() != 0) + signal_processor(smp_processor_id(), sigp_stop); + /* Wait for all other cpus to enter stopped state */ + i = 1; + while (i < NR_CPUS) { + if (!cpu_online(i)) { + i++; + continue; + } + switch (signal_processor_ps(&status, 0, i, sigp_sense)) { + case sigp_order_code_accepted: + case sigp_status_stored: + /* Check for stopped and check stop state */ + if (test_bit(6, &status) || test_bit(4, &status)) + i++; + break; + case sigp_busy: + break; + case sigp_not_operational: + i++; + break; + } } - signal_processor(smp_processor_id(), sigp_stop); + /* Quiesce the last cpu with the special psw */ + quiesce_psw.mask = PSW_BASE_BITS | PSW_MASK_WAIT; + quiesce_psw.addr = 0xfff; + __load_psw(quiesce_psw); } static void do_machine_quiesce(void) { - cpu_quiesce_map = cpu_online_map; on_each_cpu(do_load_quiesce_psw, NULL, 0, 0); } #else diff -Nru a/drivers/s390/char/tape.h b/drivers/s390/char/tape.h --- a/drivers/s390/char/tape.h Tue Mar 2 17:37:08 2004 +++ b/drivers/s390/char/tape.h Tue Mar 2 17:37:08 2004 @@ -60,12 +60,6 @@ #define TAPEBLOCK_HSEC_S2B 2 #define TAPEBLOCK_RETRIES 5 -/* Event types for hotplug */ -#define TAPE_HOTPLUG_CHAR_ADD 1 -#define TAPE_HOTPLUG_BLOCK_ADD 2 -#define TAPE_HOTPLUG_CHAR_REMOVE 3 -#define TAPE_HOTPLUG_BLOCK_REMOVE 4 - enum tape_medium_state { MS_UNKNOWN, MS_LOADED, @@ -205,6 +199,8 @@ struct list_head node; struct ccw_device * cdev; + struct cdev * nt; + struct cdev * rt; /* Device discipline information. */ struct tape_discipline * discipline; diff -Nru a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c --- a/drivers/s390/char/tape_block.c Tue Mar 2 17:37:08 2004 +++ b/drivers/s390/char/tape_block.c Tue Mar 2 17:37:08 2004 @@ -259,9 +259,6 @@ INIT_WORK(&blkdat->requeue_task, tapeblock_requeue, tape_get_device_reference(device)); - /* Will vanish */ - tape_hotplug_event(device, tapeblock_major, TAPE_HOTPLUG_BLOCK_ADD); - return 0; cleanup_queue: @@ -274,8 +271,6 @@ void tapeblock_cleanup_device(struct tape_device *device) { - tape_hotplug_event(device, tapeblock_major, TAPE_HOTPLUG_BLOCK_REMOVE); - flush_scheduled_work(); device->blk_data.requeue_task.data = tape_put_device(device); diff -Nru a/drivers/s390/char/tape_char.c b/drivers/s390/char/tape_char.c --- a/drivers/s390/char/tape_char.c Tue Mar 2 17:37:09 2004 +++ b/drivers/s390/char/tape_char.c Tue Mar 2 17:37:09 2004 @@ -20,6 +20,7 @@ #include "tape.h" #include "tape_std.h" +#include "tape_class.h" #define PRINTK_HEADER "TAPE_CHAR: " @@ -47,20 +48,50 @@ static int tapechar_major = TAPECHAR_MAJOR; +struct cdev * +tapechar_register_tape_dev(struct tape_device *device, char *name, int i) +{ + struct cdev * cdev; + char devname[11]; + + sprintf(devname, "%s%i", name, i / 2); + cdev = register_tape_dev( + &device->cdev->dev, + MKDEV(tapechar_major, i), + &tape_fops, + devname + ); + + return ((IS_ERR(cdev)) ? NULL : cdev); +} + /* * This function is called for every new tapedevice */ int tapechar_setup_device(struct tape_device * device) { - tape_hotplug_event(device, tapechar_major, TAPE_HOTPLUG_CHAR_ADD); + device->nt = tapechar_register_tape_dev( + device, + "ntibm", + device->first_minor + ); + device->rt = tapechar_register_tape_dev( + device, + "rtibm", + device->first_minor + 1 + ); + return 0; } void tapechar_cleanup_device(struct tape_device *device) { - tape_hotplug_event(device, tapechar_major, TAPE_HOTPLUG_CHAR_REMOVE); + unregister_tape_dev(device->rt); + device->rt = NULL; + unregister_tape_dev(device->nt); + device->nt = NULL; } /* @@ -461,20 +492,17 @@ int tapechar_init (void) { - int rc; + dev_t dev; - /* Register the tape major number to the kernel */ - rc = register_chrdev(tapechar_major, "tape", &tape_fops); - if (rc < 0) { - PRINT_ERR("can't get major %d\n", tapechar_major); - DBF_EVENT(3, "TCHAR:initfail\n"); - return rc; - } - if (tapechar_major == 0) - tapechar_major = rc; /* accept dynamic major number */ - PRINT_ERR("Tape gets major %d for char device\n", tapechar_major); - DBF_EVENT(3, "Tape gets major %d for char device\n", rc); - DBF_EVENT(3, "TCHAR:init ok\n"); + if (alloc_chrdev_region(&dev, 0, 256, "tape") != 0) + return -1; + + tapechar_major = MAJOR(dev); + PRINT_INFO("tape gets major %d for character devices\n", MAJOR(dev)); + +#ifdef TAPE390_INTERNAL_CLASS + tape_setup_class(); +#endif return 0; } @@ -484,5 +512,10 @@ void tapechar_exit(void) { - unregister_chrdev (tapechar_major, "tape"); +#ifdef TAPE390_INTERNAL_CLASS + tape_cleanup_class(); +#endif + PRINT_INFO("tape releases major %d for character devices\n", + tapechar_major); + unregister_chrdev_region(MKDEV(tapechar_major, 0), 256); } diff -Nru a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/drivers/s390/char/tape_class.c Tue Mar 2 17:37:09 2004 @@ -0,0 +1,100 @@ +/* + * Tape class device support + * + * Author: Stefan Bader + * Based on simple class device code by Greg K-H + */ +#include "tape_class.h" + +#ifndef TAPE390_INTERNAL_CLASS +MODULE_AUTHOR("Stefan Bader "); +MODULE_DESCRIPTION("Tape class"); +MODULE_LICENSE("GPL"); +#endif + +struct class_simple *tape_class; + +/* + * Register a tape device and return a pointer to the cdev structure. + * + * device + * The pointer to the struct device of the physical (base) device. + * drivername + * The pointer to the drivers name for it's character devices. + * dev + * The intended major/minor number. The major number may be 0 to + * get a dynamic major number. + * fops + * The pointer to the drivers file operations for the tape device. + * devname + * The pointer to the name of the character device. + */ +struct cdev *register_tape_dev( + struct device * device, + dev_t dev, + struct file_operations *fops, + char * devname +) { + struct cdev * cdev; + int rc; + char * s; + + cdev = cdev_alloc(); + if (!cdev) + return ERR_PTR(-ENOMEM); + + cdev->owner = fops->owner; + cdev->ops = fops; + cdev->dev = dev; + strcpy(cdev->kobj.name, devname); + for (s = strchr(cdev->kobj.name, '/'); s; s = strchr(s, '/')) + *s = '!'; + + rc = cdev_add(cdev, cdev->dev, 1); + if (rc) { + kobject_put(&cdev->kobj); + return ERR_PTR(rc); + } + class_simple_device_add(tape_class, cdev->dev, device, "%s", devname); + + return cdev; +} +EXPORT_SYMBOL(register_tape_dev); + +void unregister_tape_dev(struct cdev *cdev) +{ + if (cdev != NULL) { + class_simple_device_remove(cdev->dev); + cdev_del(cdev); + } +} +EXPORT_SYMBOL(unregister_tape_dev); + + +#ifndef TAPE390_INTERNAL_CLASS +static int __init tape_init(void) +#else +int tape_setup_class(void) +#endif +{ + tape_class = class_simple_create(THIS_MODULE, "tape390"); + return 0; +} + +#ifndef TAPE390_INTERNAL_CLASS +static void __exit tape_exit(void) +#else +void tape_cleanup_class(void) +#endif +{ + class_simple_destroy(tape_class); + tape_class = NULL; +} + +#ifndef TAPE390_INTERNAL_CLASS +postcore_initcall(tape_init); +module_exit(tape_exit); +#else +EXPORT_SYMBOL(tape_setup_class); +EXPORT_SYMBOL(tape_cleanup_class); +#endif diff -Nru a/drivers/s390/char/tape_class.h b/drivers/s390/char/tape_class.h --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/drivers/s390/char/tape_class.h Tue Mar 2 17:37:09 2004 @@ -0,0 +1,54 @@ +/* + * Tape class device support + * + * Author: Stefan Bader + * Based on simple class device code by Greg K-H + */ +#ifndef __TAPE_CLASS_H__ +#define __TAPE_CLASS_H__ + +#if 0 +#include +#include +#endif + +#include +#include +#include +#include +#include + +#include +#include + +#define TAPE390_INTERNAL_CLASS + +/* + * Register a tape device and return a pointer to the cdev structure. + * + * device + * The pointer to the struct device of the physical (base) device. + * drivername + * The pointer to the drivers name for it's character devices. + * dev + * The intended major/minor number. The major number may be 0 to + * get a dynamic major number. + * fops + * The pointer to the drivers file operations for the tape device. + * devname + * The pointer to the name of the character device. + */ +struct cdev *register_tape_dev( + struct device * device, + dev_t dev, + struct file_operations *fops, + char * devname +); +void unregister_tape_dev(struct cdev *cdev); + +#ifdef TAPE390_INTERNAL_CLASS +int tape_setup_class(void); +void tape_cleanup_class(void); +#endif + +#endif /* __TAPE_CLASS_H__ */ diff -Nru a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c --- a/drivers/s390/char/tape_core.c Tue Mar 2 17:37:08 2004 +++ b/drivers/s390/char/tape_core.c Tue Mar 2 17:37:08 2004 @@ -237,10 +237,7 @@ rc = 0; for (retries = 0; retries < 5; retries++) { - if (retries < 2) - rc = ccw_device_halt(device->cdev, (long) request); - else - rc = ccw_device_clear(device->cdev, (long) request); + rc = ccw_device_clear(device->cdev, (long) request); if (rc == 0) { /* Termination successful */ request->rc = -EIO; @@ -1016,63 +1013,6 @@ } /* - * Hutplug event support. - */ -void -tape_hotplug_event(struct tape_device *device, int devmaj, int action) { -#ifdef CONFIG_HOTPLUG - char *argv[3]; - char *envp[8]; - char busid[20]; - char major[20]; - char minor[20]; - - /* Call the busid DEVNO to be compatible with old tape.agent. */ - sprintf(busid, "DEVNO=%s", device->cdev->dev.bus_id); - sprintf(major, "MAJOR=%d", devmaj); - sprintf(minor, "MINOR=%d", device->first_minor); - - argv[0] = hotplug_path; - argv[1] = "tape"; - argv[2] = NULL; - - envp[0] = "HOME=/"; - envp[1] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin"; - - switch (action) { - case TAPE_HOTPLUG_CHAR_ADD: - case TAPE_HOTPLUG_BLOCK_ADD: - envp[2] = "ACTION=add"; - break; - case TAPE_HOTPLUG_CHAR_REMOVE: - case TAPE_HOTPLUG_BLOCK_REMOVE: - envp[2] = "ACTION=remove"; - break; - default: - BUG(); - } - switch (action) { - case TAPE_HOTPLUG_CHAR_ADD: - case TAPE_HOTPLUG_CHAR_REMOVE: - envp[3] = "INTERFACE=char"; - break; - case TAPE_HOTPLUG_BLOCK_ADD: - case TAPE_HOTPLUG_BLOCK_REMOVE: - envp[3] = "INTERFACE=block"; - break; - default: - BUG(); - } - envp[4] = busid; - envp[5] = major; - envp[6] = minor; - envp[7] = NULL; - - call_usermodehelper(argv[0], argv, envp, 0); -#endif -} - -/* * Tape init function. */ static int @@ -1083,7 +1023,7 @@ #ifdef DBF_LIKE_HELL debug_set_level(tape_dbf_area, 6); #endif - DBF_EVENT(3, "tape init: ($Revision: 1.41 $)\n"); + DBF_EVENT(3, "tape init: ($Revision: 1.44 $)\n"); tape_proc_init(); tapechar_init (); tapeblock_init (); @@ -1108,7 +1048,7 @@ MODULE_AUTHOR("(C) 2001 IBM Deutschland Entwicklung GmbH by Carsten Otte and " "Michael Holzheu (cotte@de.ibm.com,holzheu@de.ibm.com)"); MODULE_DESCRIPTION("Linux on zSeries channel attached " - "tape device driver ($Revision: 1.41 $)"); + "tape device driver ($Revision: 1.44 $)"); MODULE_LICENSE("GPL"); module_init(tape_init); diff -Nru a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c --- a/drivers/s390/cio/ccwgroup.c Tue Mar 2 17:37:08 2004 +++ b/drivers/s390/cio/ccwgroup.c Tue Mar 2 17:37:08 2004 @@ -1,7 +1,7 @@ /* * drivers/s390/cio/ccwgroup.c * bus driver for ccwgroup - * $Revision: 1.23 $ + * $Revision: 1.24 $ * * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, * IBM Corporation @@ -293,22 +293,28 @@ ccwgroup_online_store (struct device *dev, const char *buf, size_t count) { struct ccwgroup_device *gdev; + struct ccwgroup_driver *gdrv; unsigned int value; + int ret; gdev = to_ccwgroupdev(dev); if (!dev->driver) return count; - value = simple_strtoul(buf, 0, 0); + gdrv = to_ccwgroupdrv (gdev->dev.driver); + if (!try_module_get(gdrv->owner)) + return -EINVAL; + value = simple_strtoul(buf, 0, 0); + ret = count; if (value == 1) ccwgroup_set_online(gdev); else if (value == 0) ccwgroup_set_offline(gdev); else - return -EINVAL; - - return count; + ret = -EINVAL; + module_put(gdrv->owner); + return ret; } static ssize_t diff -Nru a/drivers/s390/cio/cmf.c b/drivers/s390/cio/cmf.c --- a/drivers/s390/cio/cmf.c Tue Mar 2 17:37:07 2004 +++ b/drivers/s390/cio/cmf.c Tue Mar 2 17:37:07 2004 @@ -1,5 +1,5 @@ /* - * linux/drivers/s390/cio/cmf.c ($Revision: 1.11 $) + * linux/drivers/s390/cio/cmf.c ($Revision: 1.13 $) * * Linux on zSeries Channel Measurement Facility support * @@ -138,7 +138,7 @@ if (count == 0) return 0; - /* value comes in units of 128 5sec */ + /* value comes in units of 128 µsec */ ret = time_to_nsec(value); do_div(ret, count); @@ -390,12 +390,13 @@ WARN_ON(!list_empty(&cmb_area.list)); spin_unlock(&cmb_area.lock); - mem = kmalloc(size, GFP_KERNEL | GFP_DMA); + mem = (void*)__get_free_pages(GFP_KERNEL | GFP_DMA, + get_order(size)); spin_lock(&cmb_area.lock); if (cmb_area.mem) { /* ok, another thread was faster */ - kfree(mem); + free_pages((unsigned long)mem, get_order(size)); } else if (!mem) { /* no luck */ ret = -ENOMEM; @@ -435,8 +436,10 @@ list_del_init(&priv->cmb_list); if (list_empty(&cmb_area.list)) { + ssize_t size; + size = sizeof(struct cmb) * cmb_area.num_channels; cmf_activate(NULL, 0); - kfree(cmb_area.mem); + free_pages((unsigned long)cmb_area.mem, get_order(size)); cmb_area.mem = NULL; } out: @@ -595,11 +598,22 @@ u32 reserved[7]; }; +/* kmalloc only guarantees 8 byte alignment, but we need cmbe + * pointers to be naturally aligned. Make sure to allocate + * enough space for two cmbes */ +static inline struct cmbe* cmbe_align(struct cmbe *c) +{ + unsigned long addr; + addr = ((unsigned long)c + sizeof (struct cmbe) - sizeof(long)) & + ~(sizeof (struct cmbe) - sizeof(long)); + return (struct cmbe*)addr; +} + static int alloc_cmbe (struct ccw_device *cdev) { struct cmbe *cmbe; - cmbe = kmalloc (sizeof (*cmbe), GFP_KERNEL /* | GFP_DMA ? */); + cmbe = kmalloc (sizeof (*cmbe) * 2, GFP_KERNEL); if (!cmbe) return -ENOMEM; @@ -647,7 +661,7 @@ if (!cdev->private->cmb) return -EINVAL; - mba = mme ? (unsigned long)cdev->private->cmb : 0; + mba = mme ? (unsigned long) cmbe_align(cdev->private->cmb) : 0; return set_schib_wait(cdev, mme, 1, mba); } @@ -669,7 +683,7 @@ return 0; } - cmb = *(struct cmbe*)cdev->private->cmb; + cmb = *cmbe_align(cdev->private->cmb); spin_unlock_irqrestore(cdev->ccwlock, flags); switch (index) { @@ -720,7 +734,7 @@ return -ENODEV; } - cmb = *(struct cmbe*)cdev->private->cmb; + cmb = *cmbe_align(cdev->private->cmb); time = get_clock() - cdev->private->cmb_start_time; spin_unlock_irqrestore(cdev->ccwlock, flags); @@ -760,7 +774,7 @@ { struct cmbe *cmb; spin_lock_irq(cdev->ccwlock); - cmb = cdev->private->cmb; + cmb = cmbe_align(cdev->private->cmb); if (cmb) memset (cmb, 0, sizeof (*cmb)); cdev->private->cmb_start_time = get_clock(); diff -Nru a/drivers/s390/cio/css.h b/drivers/s390/cio/css.h --- a/drivers/s390/cio/css.h Tue Mar 2 17:37:09 2004 +++ b/drivers/s390/cio/css.h Tue Mar 2 17:37:09 2004 @@ -74,6 +74,7 @@ unsigned int fast:1; /* post with "channel end" */ unsigned int repall:1; /* report every interrupt status */ unsigned int pgroup:1; /* do path grouping */ + unsigned int force:1; /* allow forced online */ } __attribute__ ((packed)) options; struct { unsigned int pgid_single:1; /* use single path for Set PGID */ diff -Nru a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c --- a/drivers/s390/cio/device.c Tue Mar 2 17:37:08 2004 +++ b/drivers/s390/cio/device.c Tue Mar 2 17:37:08 2004 @@ -1,7 +1,7 @@ /* * drivers/s390/cio/device.c * bus driver for ccw devices - * $Revision: 1.103 $ + * $Revision: 1.107 $ * * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, * IBM Corporation @@ -263,10 +263,10 @@ if (!cdev) return -ENODEV; - if (!cdev->online || !cdev->drv) + if (!cdev->online) return -EINVAL; - if (cdev->drv->set_offline) { + if (cdev->drv && cdev->drv->set_offline) { ret = cdev->drv->set_offline(cdev); if (ret != 0) return ret; @@ -292,7 +292,7 @@ if (!cdev) return -ENODEV; - if (cdev->online || !cdev->drv) + if (cdev->online) return -EINVAL; spin_lock_irq(cdev->ccwlock); @@ -307,7 +307,8 @@ } if (cdev->private->state != DEV_STATE_ONLINE) return -ENODEV; - if (!cdev->drv->set_online || cdev->drv->set_online(cdev) == 0) { + if (!cdev->drv || !cdev->drv->set_online || + cdev->drv->set_online(cdev) == 0) { cdev->online = 1; return 0; } @@ -326,52 +327,54 @@ online_store (struct device *dev, const char *buf, size_t count) { struct ccw_device *cdev = to_ccwdev(dev); - int i; + int i, force; char *tmp; - if (!cdev->drv) - return count; if (atomic_compare_and_swap(0, 1, &cdev->private->onoff)) return -EAGAIN; - i = simple_strtoul(buf, &tmp, 16); - if (i == 1 && cdev->drv->set_online) + if (cdev->drv && !try_module_get(cdev->drv->owner)) { + atomic_set(&cdev->private->onoff, 0); + return -EINVAL; + } + if (!strncmp(buf, "force\n", count)) { + force = 1; + i = 1; + } else { + force = 0; + i = simple_strtoul(buf, &tmp, 16); + } + if (i == 1) { + /* Do device recognition, if needed. */ + if (cdev->id.cu_type == 0) { + ccw_device_recognition(cdev); + wait_event(cdev->private->wait_q, + dev_fsm_final_state(cdev)); + } ccw_device_set_online(cdev); - else if (i == 0 && cdev->drv->set_offline) { + } else if (i == 0) { if (cdev->private->state == DEV_STATE_DISCONNECTED) ccw_device_remove_disconnected(cdev); else ccw_device_set_offline(cdev); } - atomic_set(&cdev->private->onoff, 0); - return count; -} - -static void ccw_device_unbox_recog(void *data); - -static ssize_t -stlck_store(struct device *dev, const char *buf, size_t count) -{ - struct ccw_device *cdev = to_ccwdev(dev); - int ret; - - /* We don't care what was piped to the attribute 8) */ - ret = ccw_device_stlck(cdev); - if (ret != 0) { - printk(KERN_WARNING - "Unconditional reserve failed on device %s, rc=%d\n", - dev->bus_id, ret); - return ret; + if (force && cdev->private->state == DEV_STATE_BOXED) { + int ret; + ret = ccw_device_stlck(cdev); + if (ret) + goto out; + /* Do device recognition, if needed. */ + if (cdev->id.cu_type == 0) { + ccw_device_recognition(cdev); + wait_event(cdev->private->wait_q, + dev_fsm_final_state(cdev)); + } + ccw_device_set_online(cdev); } - - /* - * Device was successfully unboxed. - * Trigger removal of stlck attribute and device recognition. - */ - INIT_WORK(&cdev->private->kick_work, - ccw_device_unbox_recog, (void *) cdev); - queue_work(ccw_device_work, &cdev->private->kick_work); - + out: + if (cdev->drv) + module_put(cdev->drv->owner); + atomic_set(&cdev->private->onoff, 0); return count; } @@ -403,33 +406,9 @@ static DEVICE_ATTR(devtype, 0444, devtype_show, NULL); static DEVICE_ATTR(cutype, 0444, cutype_show, NULL); static DEVICE_ATTR(online, 0644, online_show, online_store); -static DEVICE_ATTR(steal_lock, 0200, NULL, stlck_store); extern struct device_attribute dev_attr_cmb_enable; static DEVICE_ATTR(availability, 0444, available_show, NULL); -/* A device has been unboxed. Start device recognition. */ -static void -ccw_device_unbox_recog(void *data) -{ - struct ccw_device *cdev; - - cdev = (struct ccw_device *)data; - if (!cdev) - return; - - /* Remove stlck attribute. */ - device_remove_file(&cdev->dev, &dev_attr_steal_lock); - - spin_lock_irq(cdev->ccwlock); - - /* Device is no longer boxed. */ - cdev->private->state = DEV_STATE_NOT_OPER; - - /* Finally start device recognition. */ - ccw_device_recognition(cdev); - spin_unlock_irq(cdev->ccwlock); -} - static struct attribute * subch_attrs[] = { &dev_attr_chpids.attr, &dev_attr_pimpampom.attr, @@ -471,22 +450,6 @@ sysfs_remove_group(&dev->kobj, &ccwdev_attr_group); } -/* - * Add a "steal lock" attribute to boxed devices. - * This allows to trigger an unconditional reserve ccw to eckd dasds - * (if the device is something else, there should be no problems more than - * a command reject; we don't have any means of finding out the device's - * type if it was boxed at ipl/attach for older devices and under VM). - */ -void -ccw_device_add_stlck(void *data) -{ - struct ccw_device *cdev; - - cdev = (struct ccw_device *)data; - device_create_file(&cdev->dev, &dev_attr_steal_lock); -} - /* this is a simple abstraction for device_register that sets the * correct bus type and adds the bus specific files */ int @@ -565,8 +528,6 @@ if (ret) printk(KERN_WARNING "%s: could not add attributes to %s\n", __func__, sch->dev.bus_id); - if (cdev->private->state == DEV_STATE_BOXED) - device_create_file(&cdev->dev, &dev_attr_steal_lock); put_device(&cdev->dev); out: put_device(&sch->dev); @@ -935,6 +896,7 @@ pr_debug("ccw_device_offline returned %d, device %s\n", ret, cdev->dev.bus_id); } + ccw_device_set_timeout(cdev, 0); cdev->drv = 0; return 0; } diff -Nru a/drivers/s390/cio/device.h b/drivers/s390/cio/device.h --- a/drivers/s390/cio/device.h Tue Mar 2 17:37:09 2004 +++ b/drivers/s390/cio/device.h Tue Mar 2 17:37:09 2004 @@ -102,7 +102,6 @@ int ccw_device_call_handler(struct ccw_device *); -void ccw_device_add_stlck(void *); int ccw_device_stlck(struct ccw_device *); /* qdio needs this. */ diff -Nru a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c --- a/drivers/s390/cio/device_fsm.c Tue Mar 2 17:37:08 2004 +++ b/drivers/s390/cio/device_fsm.c Tue Mar 2 17:37:08 2004 @@ -317,14 +317,10 @@ cdev->private->state = state; - if (state == DEV_STATE_BOXED) { + if (state == DEV_STATE_BOXED) CIO_DEBUG(KERN_WARNING, 2, "Boxed device %04x on subchannel %04x\n", cdev->private->devno, sch->irq); - INIT_WORK(&cdev->private->kick_work, - ccw_device_add_stlck, (void *) cdev); - queue_work(ccw_device_work, &cdev->private->kick_work); - } if (cdev->private->flags.donotify) { cdev->private->flags.donotify = 0; @@ -377,7 +373,8 @@ struct subchannel *sch; int ret; - if (cdev->private->state != DEV_STATE_NOT_OPER) + if ((cdev->private->state != DEV_STATE_NOT_OPER) && + (cdev->private->state != DEV_STATE_BOXED)) return -EINVAL; sch = to_subchannel(cdev->dev.parent); ret = cio_enable_subchannel(sch, sch->schib.pmcw.isc); @@ -492,7 +489,8 @@ struct subchannel *sch; int ret; - if (cdev->private->state != DEV_STATE_OFFLINE) + if ((cdev->private->state != DEV_STATE_OFFLINE) && + (cdev->private->state != DEV_STATE_BOXED)) return -EINVAL; sch = to_subchannel(cdev->dev.parent); if (css_init_done && !get_device(&cdev->dev)) @@ -615,6 +613,13 @@ struct subchannel *sch; sch = to_subchannel(cdev->dev.parent); + if (sch->driver->notify && + sch->driver->notify(&sch->dev, sch->lpm ? CIO_GONE : CIO_NO_PATH)) { + ccw_device_set_timeout(cdev, 0); + cdev->private->state = DEV_STATE_DISCONNECTED; + wake_up(&cdev->private->wait_q); + return; + } cdev->private->state = DEV_STATE_NOT_OPER; cio_disable_subchannel(sch); if (sch->schib.scsw.actl != 0) { @@ -627,21 +632,6 @@ wake_up(&cdev->private->wait_q); } -static void -ccw_device_disconnected_notoper(struct ccw_device *cdev, - enum dev_event dev_event) -{ - struct subchannel *sch; - - sch = to_subchannel(cdev->dev.parent); - cdev->private->state = DEV_STATE_NOT_OPER; - cio_disable_subchannel(sch); - device_unregister(&sch->dev); - sch->schib.pmcw.intparm = 0; - cio_modify(sch); - wake_up(&cdev->private->wait_q); -} - /* * Handle path verification event. */ @@ -1103,7 +1093,7 @@ }, /* special states for devices gone not operational */ [DEV_STATE_DISCONNECTED] { - [DEV_EVENT_NOTOPER] ccw_device_disconnected_notoper, + [DEV_EVENT_NOTOPER] ccw_device_nop, [DEV_EVENT_INTERRUPT] ccw_device_start_id, [DEV_EVENT_TIMEOUT] ccw_device_bug, [DEV_EVENT_VERIFY] ccw_device_nop, diff -Nru a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c --- a/drivers/s390/cio/device_ops.c Tue Mar 2 17:37:08 2004 +++ b/drivers/s390/cio/device_ops.c Tue Mar 2 17:37:08 2004 @@ -38,6 +38,7 @@ cdev->private->options.fast = (flags & CCWDEV_EARLY_NOTIFICATION) != 0; cdev->private->options.repall = (flags & CCWDEV_REPORT_ALL) != 0; cdev->private->options.pgroup = (flags & CCWDEV_DO_PATHGROUP) != 0; + cdev->private->options.force = (flags & CCWDEV_ALLOW_FORCE) != 0; return 0; } @@ -452,6 +453,9 @@ if (!cdev) return -ENODEV; + + if (cdev->drv && !cdev->private->options.force) + return -EINVAL; sch = to_subchannel(cdev->dev.parent); diff -Nru a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c --- a/drivers/s390/net/ctcmain.c Tue Mar 2 17:37:08 2004 +++ b/drivers/s390/net/ctcmain.c Tue Mar 2 17:37:08 2004 @@ -1,5 +1,5 @@ /* - * $Id: ctcmain.c,v 1.54 2004/02/18 12:35:59 ptiedem Exp $ + * $Id: ctcmain.c,v 1.56 2004/02/27 17:53:26 mschwide Exp $ * * CTC / ESCON network driver * @@ -36,7 +36,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.54 $ + * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.56 $ * */ @@ -319,7 +319,7 @@ print_banner(void) { static int printed = 0; - char vbuf[] = "$Revision: 1.54 $"; + char vbuf[] = "$Revision: 1.56 $"; char *version = vbuf; if (printed) @@ -3161,6 +3161,7 @@ } static struct ccwgroup_driver ctc_group_driver = { + .owner = THIS_MODULE, .name = "ctc", .max_slaves = 2, .driver_id = 0xC3E3C3, diff -Nru a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c --- a/drivers/s390/net/lcs.c Tue Mar 2 17:37:07 2004 +++ b/drivers/s390/net/lcs.c Tue Mar 2 17:37:07 2004 @@ -11,7 +11,7 @@ * Frank Pavlic (pavlic@de.ibm.com) and * Martin Schwidefsky * - * $Revision: 1.66 $ $Date: 2004/02/19 13:46:01 $ + * $Revision: 1.67 $ $Date: 2004/02/26 18:26:50 $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -58,7 +58,7 @@ /** * initialization string for output */ -#define VERSION_LCS_C "$Revision: 1.66 $" +#define VERSION_LCS_C "$Revision: 1.67 $" static char version[] __initdata = "LCS driver ("VERSION_LCS_C "/" VERSION_LCS_H ")"; @@ -1926,6 +1926,7 @@ * LCS ccwgroup driver registration */ static struct ccwgroup_driver lcs_group_driver = { + .owner = THIS_MODULE, .name = "lcs", .max_slaves = 2, .driver_id = 0xD3C3E2, diff -Nru a/drivers/s390/net/qeth.c b/drivers/s390/net/qeth.c --- a/drivers/s390/net/qeth.c Tue Mar 2 17:37:09 2004 +++ b/drivers/s390/net/qeth.c Tue Mar 2 17:37:09 2004 @@ -10773,6 +10773,7 @@ } static struct ccwgroup_driver qeth_ccwgroup_driver = { + .owner = THIS_MODULE, .name = "qeth", .driver_id = 0xD8C5E3C8, .probe = qeth_probe_device, diff -Nru a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c --- a/drivers/scsi/BusLogic.c Tue Mar 2 17:37:09 2004 +++ b/drivers/scsi/BusLogic.c Tue Mar 2 17:37:09 2004 @@ -189,7 +189,7 @@ registered BusLogic Host Adapters. */ -static void __init BusLogic_UnregisterHostAdapter(struct BusLogic_HostAdapter *HostAdapter) +static void BusLogic_UnregisterHostAdapter(struct BusLogic_HostAdapter *HostAdapter) { if (HostAdapter == BusLogic_FirstRegisteredHostAdapter) { diff -Nru a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c --- a/drivers/scsi/libata-core.c Tue Mar 2 17:37:07 2004 +++ b/drivers/scsi/libata-core.c Tue Mar 2 17:37:07 2004 @@ -2005,6 +2005,14 @@ goto out; } + /* hack alert! We cannot use the supplied completion + * function from inside the ->eh_strategy_handler() thread. + * libata is the only user of ->eh_strategy_handler() in + * any kernel, so the default scsi_done() assumes it is + * not being called from the SCSI EH. + */ + qc->scsidone = scsi_finish_command; + switch (qc->tf.protocol) { case ATA_PROT_DMA_READ: case ATA_PROT_DMA_WRITE: diff -Nru a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c --- a/drivers/scsi/scsi.c Tue Mar 2 17:37:08 2004 +++ b/drivers/scsi/scsi.c Tue Mar 2 17:37:08 2004 @@ -847,6 +847,7 @@ cmd->done(cmd); } +EXPORT_SYMBOL(scsi_finish_command); /* * Function: scsi_adjust_queue_depth() diff -Nru a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h --- a/drivers/scsi/scsi_priv.h Tue Mar 2 17:37:08 2004 +++ b/drivers/scsi/scsi_priv.h Tue Mar 2 17:37:08 2004 @@ -77,7 +77,6 @@ extern int scsi_setup_command_freelist(struct Scsi_Host *shost); extern void scsi_destroy_command_freelist(struct Scsi_Host *shost); extern void scsi_done(struct scsi_cmnd *cmd); -extern void scsi_finish_command(struct scsi_cmnd *cmd); extern int scsi_retry_command(struct scsi_cmnd *cmd); extern int scsi_insert_special_req(struct scsi_request *sreq, int); extern void scsi_init_cmd_from_req(struct scsi_cmnd *cmd, diff -Nru a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c --- a/drivers/usb/class/usblp.c Tue Mar 2 17:37:07 2004 +++ b/drivers/usb/class/usblp.c Tue Mar 2 17:37:07 2004 @@ -603,7 +603,7 @@ { DECLARE_WAITQUEUE(wait, current); struct usblp *usblp = file->private_data; - int timeout, err = 0, transfer_length; + int timeout, err = 0, transfer_length = 0; size_t writecount = 0; while (writecount < count) { @@ -654,6 +654,16 @@ continue; } + /* We must increment writecount here, and not at the + * end of the loop. Otherwise, the final loop iteration may + * be skipped, leading to incomplete printer output. + */ + writecount += transfer_length; + if (writecount == count) { + up(&usblp->sem); + break; + } + transfer_length=(count - writecount); if (transfer_length > USBLP_BUF_SIZE) transfer_length = USBLP_BUF_SIZE; @@ -677,8 +687,6 @@ break; } up (&usblp->sem); - - writecount += transfer_length; } return count; diff -Nru a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c --- a/drivers/usb/host/ohci-hcd.c Tue Mar 2 17:37:07 2004 +++ b/drivers/usb/host/ohci-hcd.c Tue Mar 2 17:37:07 2004 @@ -229,11 +229,21 @@ goto fail; } + /* in case of unlink-during-submit */ + spin_lock (&urb->lock); + if (urb->status != -EINPROGRESS) { + spin_unlock (&urb->lock); + + finish_urb (ohci, urb, 0); + retval = 0; + goto fail; + } + /* schedule the ed if needed */ if (ed->state == ED_IDLE) { retval = ed_schedule (ohci, ed); if (retval < 0) - goto fail; + goto fail0; if (ed->type == PIPE_ISOCHRONOUS) { u16 frame = OHCI_FRAME_NO(ohci->hcca); @@ -257,6 +267,8 @@ urb->hcpriv = urb_priv; td_submit_urb (ohci, urb); +fail0: + spin_unlock (&urb->lock); fail: if (retval) urb_free_priv (ohci, urb_priv); diff -Nru a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c --- a/drivers/usb/host/ohci-q.c Tue Mar 2 17:37:09 2004 +++ b/drivers/usb/host/ohci-q.c Tue Mar 2 17:37:09 2004 @@ -331,19 +331,6 @@ periodic_unlink (ohci, ed); break; } - - /* NOTE: Except for a couple of exceptionally clean unlink cases - * (like unlinking the only c/b ED, with no TDs) HCs may still be - * caching this operational ED (or its address). Safe unlinking - * involves not marking it ED_IDLE till INTR_SF; we always do that - * if td_list isn't empty. Otherwise the race is small; but ... - */ - if (ed->state == ED_OPER) { - ed->state = ED_IDLE; - ed->hwINFO &= ~(ED_SKIP | ED_DEQUEUE); - ed->hwHeadP &= ~ED_H; - wmb (); - } } @@ -665,6 +652,7 @@ /* start periodic dma if needed */ if (periodic) { + wmb (); ohci->hc_control |= OHCI_CTRL_PLE|OHCI_CTRL_IE; writel (ohci->hc_control, &ohci->regs->control); } @@ -1053,7 +1041,7 @@ /* clean schedule: unlink EDs that are no longer busy */ if (list_empty (&ed->td_list)) - ed_deschedule (ohci, ed); + start_ed_unlink (ohci, ed); /* ... reenabling halted EDs only after fault cleanup */ else if ((ed->hwINFO & (ED_SKIP | ED_DEQUEUE)) == ED_SKIP) { td = list_entry (ed->td_list.next, struct td, td_list); diff -Nru a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c --- a/drivers/usb/host/ohci-sa1111.c Tue Mar 2 17:37:08 2004 +++ b/drivers/usb/host/ohci-sa1111.c Tue Mar 2 17:37:08 2004 @@ -105,7 +105,7 @@ } #endif -static void usb_hcd_sa1111_hcim_irq (int irq, void *__hcd, struct pt_regs * r) +static irqreturn_t usb_hcd_sa1111_hcim_irq (int irq, void *__hcd, struct pt_regs * r) { struct usb_hcd *hcd = __hcd; // unsigned long status = sa1111_readl(hcd->regs + SA1111_USB_STATUS); @@ -121,6 +121,12 @@ #endif usb_hcd_irq(irq, hcd, r); + + /* + * SA1111 seems to re-assert its interrupt immediately + * after processing an interrupt. Always return IRQ_HANDLED. + */ + return IRQ_HANDLED; } /*-------------------------------------------------------------------------*/ diff -Nru a/drivers/usb/serial/keyspan.h b/drivers/usb/serial/keyspan.h --- a/drivers/usb/serial/keyspan.h Tue Mar 2 17:37:08 2004 +++ b/drivers/usb/serial/keyspan.h Tue Mar 2 17:37:08 2004 @@ -359,19 +359,19 @@ }; static const struct keyspan_device_details usa19hs_device_details = { - product_id: keyspan_usa19hs_product_id, - msg_format: msg_usa90, - num_ports: 1, - indat_endp_flip: 0, - outdat_endp_flip: 0, - indat_endpoints: {0x81}, - outdat_endpoints: {0x01}, - inack_endpoints: {-1}, - outcont_endpoints: {0x02}, - instat_endpoint: 0x82, - glocont_endpoint: -1, - calculate_baud_rate: keyspan_usa19hs_calc_baud, - baudclk: KEYSPAN_USA19HS_BAUDCLK, + .product_id = keyspan_usa19hs_product_id, + .msg_format = msg_usa90, + .num_ports = 1, + .indat_endp_flip = 0, + .outdat_endp_flip = 0, + .indat_endpoints = {0x81}, + .outdat_endpoints = {0x01}, + .inack_endpoints = {-1}, + .outcont_endpoints = {0x02}, + .instat_endpoint = 0x82, + .glocont_endpoint = -1, + .calculate_baud_rate = keyspan_usa19hs_calc_baud, + .baudclk = KEYSPAN_USA19HS_BAUDCLK, }; static const struct keyspan_device_details usa28_device_details = { diff -Nru a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c --- a/drivers/video/console/fbcon.c Tue Mar 2 17:37:08 2004 +++ b/drivers/video/console/fbcon.c Tue Mar 2 17:37:08 2004 @@ -159,7 +159,7 @@ static void fbcon_bmove(struct vc_data *vc, int sy, int sx, int dy, int dx, int height, int width); static int fbcon_switch(struct vc_data *vc); -static int fbcon_blank(struct vc_data *vc, int blank); +static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch); static int fbcon_font_op(struct vc_data *vc, struct console_font_op *op); static int fbcon_set_palette(struct vc_data *vc, unsigned char *table); static int fbcon_scrolldelta(struct vc_data *vc, int lines); @@ -1697,14 +1697,23 @@ return 1; } -static int fbcon_blank(struct vc_data *vc, int blank) +static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) { unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; struct display *p = &fb_display[vc->vc_num]; - if (blank < 0) /* Entering graphics mode */ - return 0; + if (mode_switch) { + struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_var_screeninfo var = info->var; + + if (blank) { + fbcon_cursor(vc, CM_ERASE); + return 0; + } + var.activate = FB_ACTIVATE_NOW | FB_ACTIVATE_FORCE; + fb_set_var(info, &var); + } fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW); diff -Nru a/drivers/video/console/promcon.c b/drivers/video/console/promcon.c --- a/drivers/video/console/promcon.c Tue Mar 2 17:37:08 2004 +++ b/drivers/video/console/promcon.c Tue Mar 2 17:37:08 2004 @@ -463,7 +463,7 @@ } static int -promcon_blank(struct vc_data *conp, int blank) +promcon_blank(struct vc_data *conp, int blank, int mode_switch) { if (blank) { promcon_puts("\033[H\033[J\033[7m \033[m\b", 15); diff -Nru a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c --- a/drivers/video/console/sticon.c Tue Mar 2 17:37:08 2004 +++ b/drivers/video/console/sticon.c Tue Mar 2 17:37:08 2004 @@ -250,26 +250,18 @@ return 0; } -static int sticon_blank(struct vc_data *c, int blank) +static int sticon_blank(struct vc_data *c, int blank, int mode_switch) { - switch (blank) { - case 0: /* unblank */ - vga_is_gfx = 0; - /* Tell console.c that it has to restore the screen itself */ - return 1; - case 1: /* normal blanking */ - default: /* VESA blanking */ - if (vga_is_gfx) - return 0; - sticon_set_origin(c); - sti_clear(sticon_sti, 0,0, c->vc_rows, c->vc_cols, BLANK); - return 1; - case -1: /* Entering graphic mode */ - sti_clear(sticon_sti, 0,0, c->vc_rows, c->vc_cols, BLANK); - vga_is_gfx = 1; + if (blank == 0) { + if (mode_switch) + vga_is_gfx = 0; return 1; } - return 1; /* console needs to restore screen itself */ + sticon_set_origin(c); + sti_clear(sticon_sti, 0,0, c->vc_rows, c->vc_cols, BLANK); + if (mode_switch) + vga_is_gfx = 1; + return 1; } static int sticon_scrolldelta(struct vc_data *conp, int lines) diff -Nru a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c --- a/drivers/video/console/vgacon.c Tue Mar 2 17:37:08 2004 +++ b/drivers/video/console/vgacon.c Tue Mar 2 17:37:08 2004 @@ -76,7 +76,7 @@ static void vgacon_deinit(struct vc_data *c); static void vgacon_cursor(struct vc_data *c, int mode); static int vgacon_switch(struct vc_data *c); -static int vgacon_blank(struct vc_data *c, int blank); +static int vgacon_blank(struct vc_data *c, int blank, int mode_switch); static int vgacon_font_op(struct vc_data *c, struct console_font_op *op); static int vgacon_set_palette(struct vc_data *vc, unsigned char *table); static int vgacon_scrolldelta(struct vc_data *c, int lines); @@ -661,7 +661,7 @@ } } -static int vgacon_blank(struct vc_data *c, int blank) +static int vgacon_blank(struct vc_data *c, int blank, int mode_switch) { switch (blank) { case 0: /* Unblank */ @@ -678,7 +678,8 @@ /* Tell console.c that it has to restore the screen itself */ return 1; case 1: /* Normal blanking */ - if (vga_video_type == VIDEO_TYPE_VGAC) { + case -1: /* Obsolete */ + if (!mode_switch && vga_video_type == VIDEO_TYPE_VGAC) { vga_pal_blank(&state); vga_palette_blanked = 1; return 0; @@ -686,11 +687,8 @@ vgacon_set_origin(c); scr_memsetw((void *) vga_vram_base, BLANK, c->vc_screenbuf_size); - return 1; - case -1: /* Entering graphic mode */ - scr_memsetw((void *) vga_vram_base, BLANK, - c->vc_screenbuf_size); - vga_is_gfx = 1; + if (mode_switch) + vga_is_gfx = 1; return 1; default: /* VESA blanking */ if (vga_video_type == VIDEO_TYPE_VGAC) { diff -Nru a/drivers/video/fbmem.c b/drivers/video/fbmem.c --- a/drivers/video/fbmem.c Tue Mar 2 17:37:07 2004 +++ b/drivers/video/fbmem.c Tue Mar 2 17:37:07 2004 @@ -955,7 +955,8 @@ { int err; - if (memcmp(&info->var, var, sizeof(struct fb_var_screeninfo))) { + if ((var->activate & FB_ACTIVATE_FORCE) || + memcmp(&info->var, var, sizeof(struct fb_var_screeninfo))) { if (!info->fbops->fb_check_var) { *var = info->var; return 0; diff -Nru a/drivers/video/i810/Makefile b/drivers/video/i810/Makefile --- a/drivers/video/i810/Makefile Tue Mar 2 17:37:08 2004 +++ b/drivers/video/i810/Makefile Tue Mar 2 17:37:08 2004 @@ -1,12 +1,6 @@ # # Makefile for the Intel 810/815 framebuffer driver # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# -# Note 2! The CFLAGS definitions are now in the main makefile... - obj-$(CONFIG_FB_I810) += i810fb.o diff -Nru a/drivers/video/kyro/Makefile b/drivers/video/kyro/Makefile --- a/drivers/video/kyro/Makefile Tue Mar 2 17:37:09 2004 +++ b/drivers/video/kyro/Makefile Tue Mar 2 17:37:09 2004 @@ -1,11 +1,6 @@ # # Makefile for the Kyro framebuffer driver # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# -# Note 2! The CFLAGS definitions are now in the main makefile... obj-$(CONFIG_FB_KYRO) += kyrofb.o diff -Nru a/fs/befs/Makefile b/fs/befs/Makefile --- a/fs/befs/Makefile Tue Mar 2 17:37:09 2004 +++ b/fs/befs/Makefile Tue Mar 2 17:37:09 2004 @@ -1,12 +1,6 @@ # # Makefile for the linux BeOS filesystem routines. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# -# Note 2! The CFLAGS definitions are now in the main makefile... - obj-$(CONFIG_BEFS_FS) += befs.o diff -Nru a/fs/compat_ioctl.c b/fs/compat_ioctl.c --- a/fs/compat_ioctl.c Tue Mar 2 17:37:09 2004 +++ b/fs/compat_ioctl.c Tue Mar 2 17:37:09 2004 @@ -1458,6 +1458,7 @@ struct cdrom_generic_command *cgc; struct cdrom_generic_command32 *cgc32; unsigned char dir; + int itmp; cgc = compat_alloc_user_space(sizeof(*cgc)); cgc32 = compat_ptr(arg); @@ -1469,12 +1470,16 @@ __cgc_do_ptr((void **) &cgc->sense, &cgc32->sense)) return -EFAULT; - if (get_user(dir, &cgc->data_direction) || - put_user(dir, &cgc32->data_direction)) + if (get_user(dir, &cgc32->data_direction) || + put_user(dir, &cgc->data_direction)) return -EFAULT; - if (copy_in_user(&cgc->quiet, &cgc32->quiet, - 2 * sizeof(int))) + if (get_user(itmp, &cgc32->quiet) || + put_user(itmp, &cgc->quiet)) + return -EFAULT; + + if (get_user(itmp, &cgc32->timeout) || + put_user(itmp, &cgc->timeout)) return -EFAULT; if (__cgc_do_ptr(&cgc->reserved[0], &cgc32->reserved[0])) diff -Nru a/fs/fs-writeback.c b/fs/fs-writeback.c --- a/fs/fs-writeback.c Tue Mar 2 17:37:09 2004 +++ b/fs/fs-writeback.c Tue Mar 2 17:37:09 2004 @@ -99,7 +99,7 @@ * reposition it (that would break s_dirty time-ordering). */ if (!was_dirty) { - mapping->dirtied_when = jiffies|1; /* 0 is special */ + mapping->dirtied_when = jiffies; list_move(&inode->i_list, &sb->s_dirty); } } @@ -176,17 +176,15 @@ } else if (!list_empty(&mapping->dirty_pages)) { /* Redirtied */ inode->i_state |= I_DIRTY_PAGES; - mapping->dirtied_when = jiffies|1; + mapping->dirtied_when = jiffies; list_move(&inode->i_list, &sb->s_dirty); } else if (inode->i_state & I_DIRTY) { /* Redirtied */ - mapping->dirtied_when = jiffies|1; + mapping->dirtied_when = jiffies; list_move(&inode->i_list, &sb->s_dirty); } else if (atomic_read(&inode->i_count)) { - mapping->dirtied_when = 0; list_move(&inode->i_list, &inode_in_use); } else { - mapping->dirtied_when = 0; list_move(&inode->i_list, &inode_unused); } } @@ -310,7 +308,7 @@ __iget(inode); __writeback_single_inode(inode, wbc); if (wbc->sync_mode == WB_SYNC_HOLD) { - mapping->dirtied_when = jiffies|1; + mapping->dirtied_when = jiffies; list_move(&inode->i_list, &sb->s_dirty); } if (current_is_pdflush()) diff -Nru a/fs/hpfs/buffer.c b/fs/hpfs/buffer.c --- a/fs/hpfs/buffer.c Tue Mar 2 17:37:08 2004 +++ b/fs/hpfs/buffer.c Tue Mar 2 17:37:08 2004 @@ -62,56 +62,28 @@ void hpfs_lock_2inodes(struct inode *i1, struct inode *i2) { - struct hpfs_inode_info *hpfs_i1 = NULL, *hpfs_i2 = NULL; - - if (!i1) { - if (i2) { - hpfs_i2 = hpfs_i(i2); + if (!i2 || i1 == i2) { + hpfs_lock_inode(i1); + } else if (!i1) { + hpfs_lock_inode(i2); + } else { + struct hpfs_inode_info *hpfs_i1 = hpfs_i(i1); + struct hpfs_inode_info *hpfs_i2 = hpfs_i(i2); + if (i1->i_ino < i2->i_ino) { + down(&hpfs_i1->i_sem); + down(&hpfs_i2->i_sem); + } else { down(&hpfs_i2->i_sem); - } - return; - } - if (!i2) { - if (i1) { - hpfs_i1 = hpfs_i(i1); down(&hpfs_i1->i_sem); } - return; } - if (i1->i_ino < i2->i_ino) { - down(&hpfs_i1->i_sem); - down(&hpfs_i2->i_sem); - } else if (i1->i_ino > i2->i_ino) { - down(&hpfs_i2->i_sem); - down(&hpfs_i1->i_sem); - } else down(&hpfs_i1->i_sem); } void hpfs_unlock_2inodes(struct inode *i1, struct inode *i2) { - struct hpfs_inode_info *hpfs_i1 = NULL, *hpfs_i2 = NULL; - - if (!i1) { - if (i2) { - hpfs_i2 = hpfs_i(i2); - up(&hpfs_i2->i_sem); - } - return; - } - if (!i2) { - if (i1) { - hpfs_i1 = hpfs_i(i1); - up(&hpfs_i1->i_sem); - } - return; - } - if (i1->i_ino < i2->i_ino) { - up(&hpfs_i2->i_sem); - up(&hpfs_i1->i_sem); - } else if (i1->i_ino > i2->i_ino) { - up(&hpfs_i1->i_sem); - up(&hpfs_i2->i_sem); - } else up(&hpfs_i1->i_sem); + /* order of up() doesn't matter here */ + hpfs_unlock_inode(i1); + hpfs_unlock_inode(i2); } void hpfs_lock_3inodes(struct inode *i1, struct inode *i2, struct inode *i3) diff -Nru a/fs/locks.c b/fs/locks.c --- a/fs/locks.c Tue Mar 2 17:37:09 2004 +++ b/fs/locks.c Tue Mar 2 17:37:09 2004 @@ -1699,6 +1699,8 @@ unlock_kernel(); } +EXPORT_SYMBOL(locks_remove_posix); + /* * This function is called on the last close of an open file. */ diff -Nru a/fs/proc/base.c b/fs/proc/base.c --- a/fs/proc/base.c Tue Mar 2 17:37:08 2004 +++ b/fs/proc/base.c Tue Mar 2 17:37:08 2004 @@ -1582,13 +1582,14 @@ read_unlock(&tasklist_lock); if (!task) goto out; - if (!thread_group_leader(task)) - goto out_drop_task; inode = proc_pid_make_inode(dir->i_sb, task, PROC_TGID_INO); - if (!inode) - goto out_drop_task; + + if (!inode) { + put_task_struct(task); + goto out; + } inode->i_mode = S_IFDIR|S_IRUGO|S_IXUGO; inode->i_op = &proc_tgid_base_inode_operations; inode->i_fop = &proc_tgid_base_operations; @@ -1613,8 +1614,6 @@ goto out; } return NULL; -out_drop_task: - put_task_struct(task); out: return ERR_PTR(-ENOENT); } diff -Nru a/include/asm-ia64/iosapic.h b/include/asm-ia64/iosapic.h --- a/include/asm-ia64/iosapic.h Tue Mar 2 17:37:08 2004 +++ b/include/asm-ia64/iosapic.h Tue Mar 2 17:37:08 2004 @@ -45,9 +45,9 @@ /* * Mask bit */ + #define IOSAPIC_MASK_SHIFT 16 -#define IOSAPIC_UNMASK 0 -#define IOSAPIC_MSAK 1 +#define IOSAPIC_MASK (1<, Hewlett-Packard Co */ @@ -15,6 +15,14 @@ unsigned int dma_length; }; -#define ISA_DMA_THRESHOLD (~0UL) +/* + * It used to be that ISA_DMA_THRESHOLD had something to do with the + * DMA-limits of ISA-devices. Nowadays, its only remaining use (apart + * from the aha1542.c driver, which isn't 64-bit clean anyhow) is to + * tell the block-layer (via BLK_BOUNCE_ISA) what the max. physical + * address of a page is that is allocated with GFP_DMA. On IA-64, + * that's 4GB - 1. + */ +#define ISA_DMA_THRESHOLD 0xffffffff #endif /* _ASM_IA64_SCATTERLIST_H */ diff -Nru a/include/asm-m68k/irq.h b/include/asm-m68k/irq.h --- a/include/asm-m68k/irq.h Tue Mar 2 17:37:08 2004 +++ b/include/asm-m68k/irq.h Tue Mar 2 17:37:08 2004 @@ -76,6 +76,11 @@ struct pt_regs; +extern int sys_request_irq(unsigned int, + irqreturn_t (*)(int, void *, struct pt_regs *), + unsigned long, const char *, void *); +extern void sys_free_irq(unsigned int, void *); + /* * various flags for request_irq() - the Amiga now uses the standard * mechanism like all other architectures - SA_INTERRUPT and SA_SHIRQ diff -Nru a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h --- a/include/asm-m68k/unistd.h Tue Mar 2 17:37:08 2004 +++ b/include/asm-m68k/unistd.h Tue Mar 2 17:37:08 2004 @@ -376,10 +376,6 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data); asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on); struct pt_regs; -int sys_request_irq(unsigned int, - irqreturn_t (*)(int, void *, struct pt_regs *), - unsigned long, const char *, void *); -void sys_free_irq(unsigned int, void *); struct sigaction; asmlinkage long sys_rt_sigaction(int sig, const struct sigaction __user *act, diff -Nru a/include/asm-ppc64/vio.h b/include/asm-ppc64/vio.h --- a/include/asm-ppc64/vio.h Tue Mar 2 17:37:08 2004 +++ b/include/asm-ppc64/vio.h Tue Mar 2 17:37:08 2004 @@ -94,8 +94,8 @@ struct vio_dev { struct device_node *archdata; /* Open Firmware node */ void *driver_data; /* data private to the driver */ - unsigned long unit_address; struct iommu_table *iommu_table; /* vio_map_* uses this */ + uint32_t unit_address; unsigned int irq; struct device dev; diff -Nru a/include/asm-s390/ccwdev.h b/include/asm-s390/ccwdev.h --- a/include/asm-s390/ccwdev.h Tue Mar 2 17:37:09 2004 +++ b/include/asm-s390/ccwdev.h Tue Mar 2 17:37:09 2004 @@ -118,6 +118,8 @@ #define CCWDEV_REPORT_ALL 0x0002 /* Try to perform path grouping. */ #define CCWDEV_DO_PATHGROUP 0x0004 +/* Allow forced onlining of boxed devices. */ +#define CCWDEV_ALLOW_FORCE 0x0008 /* * ccw_device_start() diff -Nru a/include/asm-s390/ccwgroup.h b/include/asm-s390/ccwgroup.h --- a/include/asm-s390/ccwgroup.h Tue Mar 2 17:37:08 2004 +++ b/include/asm-s390/ccwgroup.h Tue Mar 2 17:37:08 2004 @@ -17,6 +17,7 @@ }; struct ccwgroup_driver { + struct module *owner; char *name; int max_slaves; unsigned long driver_id; diff -Nru a/include/asm-s390/compat.h b/include/asm-s390/compat.h --- a/include/asm-s390/compat.h Tue Mar 2 17:37:07 2004 +++ b/include/asm-s390/compat.h Tue Mar 2 17:37:07 2004 @@ -25,6 +25,7 @@ typedef s32 compat_daddr_t; typedef u32 compat_caddr_t; typedef __kernel_fsid_t compat_fsid_t; +typedef s32 compat_timer_t; typedef s32 compat_int_t; typedef s32 compat_long_t; diff -Nru a/include/asm-s390/sigp.h b/include/asm-s390/sigp.h --- a/include/asm-s390/sigp.h Tue Mar 2 17:37:08 2004 +++ b/include/asm-s390/sigp.h Tue Mar 2 17:37:08 2004 @@ -121,7 +121,7 @@ * Signal processor with parameter and return status */ extern __inline__ sigp_ccode -signal_processor_ps(__u32 *statusptr, unsigned long parameter, +signal_processor_ps(unsigned long *statusptr, unsigned long parameter, __u16 cpu_addr, sigp_order_code order_code) { sigp_ccode ccode; diff -Nru a/include/asm-sparc64/thread_info.h b/include/asm-sparc64/thread_info.h --- a/include/asm-sparc64/thread_info.h Tue Mar 2 17:37:08 2004 +++ b/include/asm-sparc64/thread_info.h Tue Mar 2 17:37:08 2004 @@ -142,12 +142,29 @@ /* thread information allocation */ #if PAGE_SHIFT == 13 -#define alloc_thread_info(tsk)((struct thread_info *)__get_free_pages(GFP_KERNEL, 1)) -#define free_thread_info(ti) free_pages((unsigned long)(ti),1) +#define __THREAD_INFO_ORDER 1 #else /* PAGE_SHIFT == 13 */ -#define alloc_thread_info(tsk)((struct thread_info *)__get_free_pages(GFP_KERNEL, 0)) -#define free_thread_info(ti) free_pages((unsigned long)(ti),0) +#define __THREAD_INFO_ORDER 0 #endif /* PAGE_SHIFT == 13 */ + +#ifdef CONFIG_DEBUG_STACK_USAGE +#define alloc_thread_info(tsk) \ +({ \ + struct thread_info *ret; \ + \ + ret = (struct thread_info *) \ + __get_free_pages(GFP_KERNEL, __THREAD_INFO_ORDER); \ + if (ret) \ + memset(ret, 0, PAGE_SIZE<<__THREAD_INFO_ORDER); \ + ret; \ +}) +#else +#define alloc_thread_info(tsk) \ + ((struct thread_info *)__get_free_pages(GFP_KERNEL, __THREAD_INFO_ORDER)) +#endif + +#define free_thread_info(ti) \ + free_pages((unsigned long)(ti),__THREAD_INFO_ORDER) #define __thread_flag_byte_ptr(ti) \ ((unsigned char *)(&((ti)->flags))) diff -Nru a/include/asm-x86_64/mmzone.h b/include/asm-x86_64/mmzone.h --- a/include/asm-x86_64/mmzone.h Tue Mar 2 17:37:09 2004 +++ b/include/asm-x86_64/mmzone.h Tue Mar 2 17:37:09 2004 @@ -31,6 +31,8 @@ return nid; } +#define pfn_to_nid(pfn) phys_to_nid((unsigned long)(pfn) << PAGE_SHIFT) + #define kvaddr_to_nid(kaddr) phys_to_nid(__pa(kaddr)) #define NODE_DATA(nid) (node_data[nid]) diff -Nru a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h --- a/include/asm-x86_64/processor.h Tue Mar 2 17:37:09 2004 +++ b/include/asm-x86_64/processor.h Tue Mar 2 17:37:09 2004 @@ -173,7 +173,7 @@ * space during mmap's. */ #define IA32_PAGE_OFFSET ((current->personality & ADDR_LIMIT_3GB) ? 0xc0000000 : 0xFFFFe000) -#define TASK_UNMAPPED_32 (PAGE_ALIGN(IA32_PAGE_OFFSET / 3)) +#define TASK_UNMAPPED_32 (PAGE_ALIGN(0xc5000000)) #define TASK_UNMAPPED_64 PAGE_ALIGN(TASK_SIZE/3) #define TASK_UNMAPPED_BASE \ (test_thread_flag(TIF_IA32) ? TASK_UNMAPPED_32 : TASK_UNMAPPED_64) diff -Nru a/include/linux/console.h b/include/linux/console.h --- a/include/linux/console.h Tue Mar 2 17:37:08 2004 +++ b/include/linux/console.h Tue Mar 2 17:37:08 2004 @@ -37,7 +37,7 @@ int (*con_scroll)(struct vc_data *, int, int, int, int); void (*con_bmove)(struct vc_data *, int, int, int, int, int, int); int (*con_switch)(struct vc_data *); - int (*con_blank)(struct vc_data *, int); + int (*con_blank)(struct vc_data *, int, int); int (*con_font_op)(struct vc_data *, struct console_font_op *); int (*con_resize)(struct vc_data *, unsigned int, unsigned int); int (*con_set_palette)(struct vc_data *, unsigned char *); diff -Nru a/include/linux/fb.h b/include/linux/fb.h --- a/include/linux/fb.h Tue Mar 2 17:37:08 2004 +++ b/include/linux/fb.h Tue Mar 2 17:37:08 2004 @@ -152,6 +152,7 @@ #define FB_ACTIVATE_VBL 16 /* activate values on next vbl */ #define FB_CHANGE_CMAP_VBL 32 /* change colormap on vbl */ #define FB_ACTIVATE_ALL 64 /* change all VCs on this fb */ +#define FB_ACTIVATE_FORCE 128 /* force apply even when no change*/ #define FB_ACCELF_TEXT 1 /* text mode acceleration */ diff -Nru a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h --- a/include/linux/netfilter_bridge.h Tue Mar 2 17:37:08 2004 +++ b/include/linux/netfilter_bridge.h Tue Mar 2 17:37:08 2004 @@ -88,6 +88,20 @@ memcpy(skb->nf_bridge->data, skb->data - header_size, header_size); } +/* This is called by the IP fragmenting code and it ensures there is + * enough room for the encapsulating header (if there is one). */ +static inline +int nf_bridge_pad(struct sk_buff *skb) +{ + if (skb->protocol == __constant_htons(ETH_P_IP)) + return 0; + if (skb->nf_bridge) { + if (skb->protocol == __constant_htons(ETH_P_8021Q)) + return 4; + } + return 0; +} + struct bridge_skb_cb { union { __u32 ipv4; diff -Nru a/include/linux/pci.h b/include/linux/pci.h --- a/include/linux/pci.h Tue Mar 2 17:37:08 2004 +++ b/include/linux/pci.h Tue Mar 2 17:37:08 2004 @@ -468,6 +468,8 @@ char name[48]; + unsigned short bridge_ctl; /* manage NO_ISA/FBB/et al behaviors */ + unsigned short pad2; struct device *bridge; struct class_device class_dev; }; diff -Nru a/include/linux/vt_kern.h b/include/linux/vt_kern.h --- a/include/linux/vt_kern.h Tue Mar 2 17:37:09 2004 +++ b/include/linux/vt_kern.h Tue Mar 2 17:37:09 2004 @@ -44,7 +44,8 @@ void vc_disallocate(unsigned int console); void reset_palette(int currcons); void set_palette(int currcons); -void do_blank_screen(int gfx_mode); +void do_blank_screen(int entering_gfx); +void do_unblank_screen(int leaving_gfx); void unblank_screen(void); void poke_blanked_console(void); int con_font_op(int currcons, struct console_font_op *op); diff -Nru a/include/net/tcp.h b/include/net/tcp.h --- a/include/net/tcp.h Tue Mar 2 17:37:07 2004 +++ b/include/net/tcp.h Tue Mar 2 17:37:07 2004 @@ -263,7 +263,10 @@ #define tw_for_each(tw, node, head) \ hlist_for_each_entry(tw, node, head, tw_node) -#define tw_for_each_inmate(tw, node, safe, jail) \ +#define tw_for_each_inmate(tw, node, jail) \ + hlist_for_each_entry(tw, node, jail, tw_death_node) + +#define tw_for_each_inmate_safe(tw, node, safe, jail) \ hlist_for_each_entry_safe(tw, node, safe, jail, tw_death_node) #define tcptw_sk(__sk) ((struct tcp_tw_bucket *)(__sk)) diff -Nru a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h --- a/include/scsi/scsi_cmnd.h Tue Mar 2 17:37:08 2004 +++ b/include/scsi/scsi_cmnd.h Tue Mar 2 17:37:08 2004 @@ -159,5 +159,6 @@ extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, int); extern void scsi_put_command(struct scsi_cmnd *); extern void scsi_io_completion(struct scsi_cmnd *, unsigned int, unsigned int); +extern void scsi_finish_command(struct scsi_cmnd *cmd); #endif /* _SCSI_SCSI_CMND_H */ diff -Nru a/init/Kconfig b/init/Kconfig --- a/init/Kconfig Tue Mar 2 17:37:09 2004 +++ b/init/Kconfig Tue Mar 2 17:37:09 2004 @@ -66,7 +66,7 @@ menu "General setup" config SWAP - bool "Support for paging of anonymous memory" + bool "Support for paging of anonymous memory (swap)" depends on MMU default y help diff -Nru a/kernel/power/poweroff.c b/kernel/power/poweroff.c --- a/kernel/power/poweroff.c Tue Mar 2 17:37:08 2004 +++ b/kernel/power/poweroff.c Tue Mar 2 17:37:08 2004 @@ -8,32 +8,32 @@ #include #include #include +#include - -/** - * handle_poweroff - sysrq callback for power down - * @key: key pressed (unused) - * @pt_regs: register state (unused) - * @kbd: keyboard state (unused) - * @tty: tty involved (unused) - * +/* * When the user hits Sys-Rq o to power down the machine this is the * callback we use. */ -static void handle_poweroff (int key, struct pt_regs *pt_regs, - struct tty_struct *tty) +static void do_poweroff(void *dummy) { if (pm_power_off) pm_power_off(); } +static DECLARE_WORK(poweroff_work, do_poweroff, 0); + +static void handle_poweroff(int key, struct pt_regs *pt_regs, + struct tty_struct *tty) +{ + schedule_work(&poweroff_work); +} + static struct sysrq_key_op sysrq_poweroff_op = { .handler = handle_poweroff, .help_msg = "powerOff", .action_msg = "Power Off\n" }; - static int pm_sysrq_init(void) { diff -Nru a/kernel/power/swsusp.c b/kernel/power/swsusp.c --- a/kernel/power/swsusp.c Tue Mar 2 17:37:08 2004 +++ b/kernel/power/swsusp.c Tue Mar 2 17:37:08 2004 @@ -673,7 +673,11 @@ free_pages((unsigned long) pagedir_nosave, pagedir_order); spin_unlock_irq(&suspend_pagedir_lock); + + device_resume(); + PRINTK( "Fixing swap signatures... " ); mark_swapfiles(((swp_entry_t) {0}), MARK_SWAP_RESUME); + PRINTK( "ok\n" ); } /* diff -Nru a/kernel/timer.c b/kernel/timer.c --- a/kernel/timer.c Tue Mar 2 17:37:09 2004 +++ b/kernel/timer.c Tue Mar 2 17:37:09 2004 @@ -868,7 +868,7 @@ oldalarm = it_old.it_value.tv_sec; /* ehhh.. We can't return 0 if we have an alarm pending.. */ /* And we'd better return too much than too little anyway */ - if (it_old.it_value.tv_usec) + if ((!oldalarm && it_old.it_value.tv_usec) || it_old.it_value.tv_usec >= 500000) oldalarm++; return oldalarm; } diff -Nru a/mm/highmem.c b/mm/highmem.c --- a/mm/highmem.c Tue Mar 2 17:37:08 2004 +++ b/mm/highmem.c Tue Mar 2 17:37:08 2004 @@ -294,7 +294,12 @@ if (tovec->bv_page == fromvec->bv_page) continue; - vfrom = page_address(fromvec->bv_page) + fromvec->bv_offset; + /* + * fromvec->bv_offset and fromvec->bv_len might have been + * modified by the block layer, so use the original copy, + * bounce_copy_vec already uses tovec->bv_len + */ + vfrom = page_address(fromvec->bv_page) + tovec->bv_offset; bounce_copy_vec(tovec, vfrom); } diff -Nru a/mm/pdflush.c b/mm/pdflush.c --- a/mm/pdflush.c Tue Mar 2 17:37:09 2004 +++ b/mm/pdflush.c Tue Mar 2 17:37:09 2004 @@ -5,6 +5,9 @@ * * 09Apr2002 akpm@zip.com.au * Initial version + * 29Feb2004 kaos@sgi.com + * Move worker thread creation to kthread to avoid chewing + * up stack space with nested calls to kernel_thread. */ #include @@ -17,6 +20,7 @@ #include #include // Needed by writeback.h #include // Prototypes pdflush_operation() +#include /* @@ -86,8 +90,6 @@ static int __pdflush(struct pdflush_work *my_work) { - daemonize("pdflush"); - current->flags |= PF_FLUSHER; my_work->fn = NULL; my_work->who = current; @@ -207,7 +209,7 @@ static void start_one_pdflush_thread(void) { - kernel_thread(pdflush, NULL, CLONE_KERNEL); + kthread_run(pdflush, NULL, "pdflush"); } static int __init pdflush_init(void) diff -Nru a/net/atm/lec.c b/net/atm/lec.c --- a/net/atm/lec.c Tue Mar 2 17:37:08 2004 +++ b/net/atm/lec.c Tue Mar 2 17:37:08 2004 @@ -793,7 +793,7 @@ return -ENOMEM; vpriv->xoff = 0; vpriv->old_pop = vcc->pop; - LEC_VCC_PRIV(vcc) = vpriv; + vcc->user_back = vpriv; vcc->pop = lec_pop; lec_vcc_added(dev_lec[ioc_data.dev_num]->priv, &ioc_data, vcc, vcc->push); @@ -1420,7 +1420,7 @@ if (vpriv->xoff) netif_wake_queue(dev); kfree(vpriv); - LEC_VCC_PRIV(vcc) = NULL; + vcc->user_back = NULL; vcc->push = entry->old_push; vcc_release_async(vcc, -EPIPE); vcc = NULL; @@ -2374,7 +2374,7 @@ return -ENOMEM; vpriv->xoff = 0; vpriv->old_pop = vcc->pop; - LEC_VCC_PRIV(vcc) = vpriv; + vcc->user_back = vpriv; vcc->pop = lec_pop; lec_arp_get(priv); to_add = make_entry(priv, mac_addr); diff -Nru a/net/core/dev.c b/net/core/dev.c --- a/net/core/dev.c Tue Mar 2 17:37:08 2004 +++ b/net/core/dev.c Tue Mar 2 17:37:08 2004 @@ -2447,9 +2447,8 @@ return -EINVAL; if (!netif_device_present(dev)) return -ENODEV; - dev_mc_add(dev, ifr->ifr_hwaddr.sa_data, - dev->addr_len, 1); - return 0; + return dev_mc_add(dev, ifr->ifr_hwaddr.sa_data, + dev->addr_len, 1); case SIOCDELMULTI: if (!dev->set_multicast_list || @@ -2457,9 +2456,8 @@ return -EINVAL; if (!netif_device_present(dev)) return -ENODEV; - dev_mc_delete(dev, ifr->ifr_hwaddr.sa_data, - dev->addr_len, 1); - return 0; + return dev_mc_delete(dev, ifr->ifr_hwaddr.sa_data, + dev->addr_len, 1); case SIOCGIFINDEX: ifr->ifr_ifindex = dev->ifindex; diff -Nru a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c --- a/net/ipv4/ip_output.c Tue Mar 2 17:37:09 2004 +++ b/net/ipv4/ip_output.c Tue Mar 2 17:37:09 2004 @@ -80,6 +80,7 @@ #include #include #include +#include #include #include @@ -442,7 +443,7 @@ int ptr; struct net_device *dev; struct sk_buff *skb2; - unsigned int mtu, hlen, left, len; + unsigned int mtu, hlen, left, len, ll_rs; int offset; int not_last_frag; struct rtable *rt = (struct rtable*)skb->dst; @@ -563,6 +564,14 @@ left = skb->len - hlen; /* Space per frame */ ptr = raw + hlen; /* Where to start from */ +#ifdef CONFIG_BRIDGE_NETFILTER + /* for bridged IP traffic encapsulated inside f.e. a vlan header, + * we need to make room for the encapsulating header */ + ll_rs = LL_RESERVED_SPACE(rt->u.dst.dev + nf_bridge_pad(skb)); + mtu -= nf_bridge_pad(skb); +#else + ll_rs = LL_RESERVED_SPACE(rt->u.dst.dev); +#endif /* * Fragment the datagram. */ @@ -588,7 +597,7 @@ * Allocate buffer. */ - if ((skb2 = alloc_skb(len+hlen+LL_RESERVED_SPACE(rt->u.dst.dev), GFP_ATOMIC)) == NULL) { + if ((skb2 = alloc_skb(len+hlen+ll_rs, GFP_ATOMIC)) == NULL) { NETDEBUG(printk(KERN_INFO "IP: frag: no memory for new fragment!\n")); err = -ENOMEM; goto fail; @@ -599,7 +608,7 @@ */ ip_copy_metadata(skb2, skb); - skb_reserve(skb2, LL_RESERVED_SPACE(rt->u.dst.dev)); + skb_reserve(skb2, ll_rs); skb_put(skb2, len + hlen); skb2->nh.raw = skb2->data; skb2->h.raw = skb2->data + hlen; diff -Nru a/net/ipv4/ipvs/Makefile b/net/ipv4/ipvs/Makefile --- a/net/ipv4/ipvs/Makefile Tue Mar 2 17:37:09 2004 +++ b/net/ipv4/ipvs/Makefile Tue Mar 2 17:37:09 2004 @@ -1,12 +1,6 @@ # # Makefile for the IPVS modules on top of IPv4. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# -# Note 2! The CFLAGS definition is now in the main makefile... - # IPVS transport protocol load balancing support ip_vs_proto-objs-y := diff -Nru a/net/ipv4/route.c b/net/ipv4/route.c --- a/net/ipv4/route.c Tue Mar 2 17:37:09 2004 +++ b/net/ipv4/route.c Tue Mar 2 17:37:09 2004 @@ -2753,9 +2753,7 @@ panic("IP: failed to allocate ip_dst_cache\n"); goal = num_physpages >> (26 - PAGE_SHIFT); - if (!rhash_entries) - goal = min(10, goal); - else + if (rhash_entries) goal = (rhash_entries * sizeof(struct rt_hash_bucket)) >> PAGE_SHIFT; for (order = 0; (1UL << order) < goal; order++) /* NOTHING */; diff -Nru a/net/ipv4/tcp.c b/net/ipv4/tcp.c --- a/net/ipv4/tcp.c Tue Mar 2 17:37:08 2004 +++ b/net/ipv4/tcp.c Tue Mar 2 17:37:08 2004 @@ -2621,9 +2621,7 @@ else goal = num_physpages >> (23 - PAGE_SHIFT); - if (!thash_entries) - goal = min(10UL, goal); - else + if (thash_entries) goal = (thash_entries * sizeof(struct tcp_ehash_bucket)) >> PAGE_SHIFT; for (order = 0; (1UL << order) < goal; order++) ; diff -Nru a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c --- a/net/ipv4/tcp_minisocks.c Tue Mar 2 17:37:09 2004 +++ b/net/ipv4/tcp_minisocks.c Tue Mar 2 17:37:09 2004 @@ -427,7 +427,7 @@ static int tcp_do_twkill_work(int slot, unsigned int quota) { struct tcp_tw_bucket *tw; - struct hlist_node *node, *safe; + struct hlist_node *node; unsigned int killed; int ret; @@ -439,8 +439,8 @@ */ killed = 0; ret = 0; - tw_for_each_inmate(tw, node, safe, - &tcp_tw_death_row[slot]) { +rescan: + tw_for_each_inmate(tw, node, &tcp_tw_death_row[slot]) { __tw_del_dead_node(tw); spin_unlock(&tw_death_lock); tcp_timewait_kill(tw); @@ -451,6 +451,14 @@ ret = 1; break; } + + /* While we dropped tw_death_lock, another cpu may have + * killed off the next TW bucket in the list, therefore + * do a fresh re-read of the hlist head node with the + * lock reacquired. We still use the hlist traversal + * macro in order to get the prefetches. + */ + goto rescan; } tcp_tw_count -= killed; @@ -637,7 +645,7 @@ struct hlist_node *node, *safe; struct tcp_tw_bucket *tw; - tw_for_each_inmate(tw, node, safe, + tw_for_each_inmate_safe(tw, node, safe, &tcp_twcal_row[slot]) { __tw_del_dead_node(tw); tcp_timewait_kill(tw); diff -Nru a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c --- a/net/sunrpc/xprt.c Tue Mar 2 17:37:08 2004 +++ b/net/sunrpc/xprt.c Tue Mar 2 17:37:08 2004 @@ -1589,7 +1589,7 @@ if ((err = sock_create(PF_INET, type, proto, &sock)) < 0) { printk("RPC: can't create socket (%d).\n", -err); - goto failed; + return NULL; } /* If the caller has the capability, bind to a reserved port */ diff -Nru a/net/unix/af_unix.c b/net/unix/af_unix.c --- a/net/unix/af_unix.c Tue Mar 2 17:37:08 2004 +++ b/net/unix/af_unix.c Tue Mar 2 17:37:08 2004 @@ -377,7 +377,7 @@ skpair=unix_peer(sk); if (skpair!=NULL) { - if (sk->sk_type == SOCK_STREAM) { + if (sk->sk_type == SOCK_STREAM || sk->sk_type == SOCK_SEQPACKET) { unix_state_wlock(skpair); /* No more writes */ skpair->sk_shutdown = SHUTDOWN_MASK; @@ -435,8 +435,8 @@ struct unix_sock *u = unix_sk(sk); err = -EOPNOTSUPP; - if (sock->type!=SOCK_STREAM) - goto out; /* Only stream sockets accept */ + if (sock->type!=SOCK_STREAM && sock->type!=SOCK_SEQPACKET) + goto out; /* Only stream/seqpacket sockets accept */ err = -EINVAL; if (!u->addr) goto out; /* No listens on an unbound socket */ @@ -459,8 +459,89 @@ return err; } -extern struct proto_ops unix_stream_ops; -extern struct proto_ops unix_dgram_ops; +static int unix_release(struct socket *); +static int unix_bind(struct socket *, struct sockaddr *, int); +static int unix_stream_connect(struct socket *, struct sockaddr *, + int addr_len, int flags); +static int unix_socketpair(struct socket *, struct socket *); +static int unix_accept(struct socket *, struct socket *, int); +static int unix_getname(struct socket *, struct sockaddr *, int *, int); +static unsigned int unix_poll(struct file *, struct socket *, poll_table *); +static int unix_ioctl(struct socket *, unsigned int, unsigned long); +static int unix_shutdown(struct socket *, int); +static int unix_stream_sendmsg(struct kiocb *, struct socket *, + struct msghdr *, size_t); +static int unix_stream_recvmsg(struct kiocb *, struct socket *, + struct msghdr *, size_t, int); +static int unix_dgram_sendmsg(struct kiocb *, struct socket *, + struct msghdr *, size_t); +static int unix_dgram_recvmsg(struct kiocb *, struct socket *, + struct msghdr *, size_t, int); +static int unix_dgram_connect(struct socket *, struct sockaddr *, + int, int); + +static struct proto_ops unix_stream_ops = { + .family = PF_UNIX, + .owner = THIS_MODULE, + .release = unix_release, + .bind = unix_bind, + .connect = unix_stream_connect, + .socketpair = unix_socketpair, + .accept = unix_accept, + .getname = unix_getname, + .poll = unix_poll, + .ioctl = unix_ioctl, + .listen = unix_listen, + .shutdown = unix_shutdown, + .setsockopt = sock_no_setsockopt, + .getsockopt = sock_no_getsockopt, + .sendmsg = unix_stream_sendmsg, + .recvmsg = unix_stream_recvmsg, + .mmap = sock_no_mmap, + .sendpage = sock_no_sendpage, +}; + +static struct proto_ops unix_dgram_ops = { + .family = PF_UNIX, + .owner = THIS_MODULE, + .release = unix_release, + .bind = unix_bind, + .connect = unix_dgram_connect, + .socketpair = unix_socketpair, + .accept = sock_no_accept, + .getname = unix_getname, + .poll = datagram_poll, + .ioctl = unix_ioctl, + .listen = sock_no_listen, + .shutdown = unix_shutdown, + .setsockopt = sock_no_setsockopt, + .getsockopt = sock_no_getsockopt, + .sendmsg = unix_dgram_sendmsg, + .recvmsg = unix_dgram_recvmsg, + .mmap = sock_no_mmap, + .sendpage = sock_no_sendpage, +}; + +static struct proto_ops unix_seqpacket_ops = { + .family = PF_UNIX, + .owner = THIS_MODULE, + .release = unix_release, + .bind = unix_bind, + .connect = unix_stream_connect, + .socketpair = unix_socketpair, + .accept = unix_accept, + .getname = unix_getname, + .poll = datagram_poll, + .ioctl = unix_ioctl, + .listen = unix_listen, + .shutdown = unix_shutdown, + .setsockopt = sock_no_setsockopt, + .getsockopt = sock_no_getsockopt, + .sendmsg = unix_dgram_sendmsg, + .recvmsg = unix_dgram_recvmsg, + .mmap = sock_no_mmap, + .sendpage = sock_no_sendpage, +}; static struct sock * unix_create1(struct socket *sock) { @@ -515,6 +596,9 @@ case SOCK_DGRAM: sock->ops = &unix_dgram_ops; break; + case SOCK_SEQPACKET: + sock->ops = &unix_seqpacket_ops; + break; default: return -ESOCKTNOSUPPORT; } @@ -982,7 +1066,7 @@ sock_hold(sk); unix_peer(newsk) = sk; newsk->sk_state = TCP_ESTABLISHED; - newsk->sk_type = SOCK_STREAM; + newsk->sk_type = sk->sk_type; newsk->sk_peercred.pid = current->tgid; newsk->sk_peercred.uid = current->euid; newsk->sk_peercred.gid = current->egid; @@ -1066,7 +1150,7 @@ int err; err = -EOPNOTSUPP; - if (sock->type!=SOCK_STREAM) + if (sock->type!=SOCK_STREAM && sock->type!=SOCK_SEQPACKET) goto out; err = -EINVAL; @@ -1711,7 +1795,9 @@ unix_state_wunlock(sk); sk->sk_state_change(sk); - if (other && sk->sk_type == SOCK_STREAM) { + if (other && + (sk->sk_type == SOCK_STREAM || sk->sk_type == SOCK_SEQPACKET)) { + int peer_mode = 0; if (mode&RCV_SHUTDOWN) @@ -1791,7 +1877,7 @@ mask |= POLLIN | POLLRDNORM; /* Connection-based need to check for termination and startup */ - if (sk->sk_type == SOCK_STREAM && sk->sk_state == TCP_CLOSE) + if ((sk->sk_type == SOCK_STREAM || sk->sk_type == SOCK_SEQPACKET) && sk->sk_state == TCP_CLOSE) mask |= POLLHUP; /* @@ -1884,7 +1970,7 @@ return 0; } -struct seq_operations unix_seq_ops = { +static struct seq_operations unix_seq_ops = { .start = unix_seq_start, .next = unix_seq_next, .stop = unix_seq_stop, @@ -1925,49 +2011,7 @@ #endif -struct proto_ops unix_stream_ops = { - .family = PF_UNIX, - .owner = THIS_MODULE, - .release = unix_release, - .bind = unix_bind, - .connect = unix_stream_connect, - .socketpair = unix_socketpair, - .accept = unix_accept, - .getname = unix_getname, - .poll = unix_poll, - .ioctl = unix_ioctl, - .listen = unix_listen, - .shutdown = unix_shutdown, - .setsockopt = sock_no_setsockopt, - .getsockopt = sock_no_getsockopt, - .sendmsg = unix_stream_sendmsg, - .recvmsg = unix_stream_recvmsg, - .mmap = sock_no_mmap, - .sendpage = sock_no_sendpage, -}; - -struct proto_ops unix_dgram_ops = { - .family = PF_UNIX, - .owner = THIS_MODULE, - .release = unix_release, - .bind = unix_bind, - .connect = unix_dgram_connect, - .socketpair = unix_socketpair, - .accept = sock_no_accept, - .getname = unix_getname, - .poll = datagram_poll, - .ioctl = unix_ioctl, - .listen = sock_no_listen, - .shutdown = unix_shutdown, - .setsockopt = sock_no_setsockopt, - .getsockopt = sock_no_getsockopt, - .sendmsg = unix_dgram_sendmsg, - .recvmsg = unix_dgram_recvmsg, - .mmap = sock_no_mmap, - .sendpage = sock_no_sendpage, -}; - -struct net_proto_family unix_family_ops = { +static struct net_proto_family unix_family_ops = { .family = PF_UNIX, .create = unix_create, .owner = THIS_MODULE, diff -Nru a/scripts/modpost.h b/scripts/modpost.h --- a/scripts/modpost.h Tue Mar 2 17:37:07 2004 +++ b/scripts/modpost.h Tue Mar 2 17:37:07 2004 @@ -31,7 +31,7 @@ #if KERNEL_ELFDATA != HOST_ELFDATA -static void __endian(const void *src, void *dest, unsigned int size) +static inline void __endian(const void *src, void *dest, unsigned int size) { unsigned int i; for (i = 0; i < size; i++) diff -Nru a/sound/oss/Kconfig b/sound/oss/Kconfig --- a/sound/oss/Kconfig Tue Mar 2 17:37:09 2004 +++ b/sound/oss/Kconfig Tue Mar 2 17:37:09 2004 @@ -1147,7 +1147,7 @@ help Say Y or M if you have a Hammerfall or Hammerfall light multichannel card from RME. If you want to acess advanced - features of the card, read Documentation/sound/rme96xx. + features of the card, read Documentation/sound/oss/rme96xx. config SOUND_AD1980 tristate "AD1980 front/back switch plugin" diff -Nru a/sound/oss/dmasound/dac3550a.c b/sound/oss/dmasound/dac3550a.c --- a/sound/oss/dmasound/dac3550a.c Tue Mar 2 17:37:08 2004 +++ b/sound/oss/dmasound/dac3550a.c Tue Mar 2 17:37:08 2004 @@ -42,11 +42,6 @@ /* Unique ID allocation */ static int daca_id; -struct daca_data -{ - int arf; /* place holder for furture use */ -}; - struct i2c_driver daca_driver = { .owner = THIS_MODULE, .name = "DAC3550A driver V " DACA_VERSION, @@ -168,12 +163,12 @@ { const char *client_name = "DAC 3550A Digital Equalizer"; struct i2c_client *new_client; - struct daca_data *data; int rc = -ENODEV; - new_client = kmalloc(sizeof(*new_client) + sizeof(*data), GFP_KERNEL); + new_client = kmalloc(sizeof(*new_client), GFP_KERNEL); if (!new_client) return -ENOMEM; + memset(new_client, 0, sizeof(*new_client)); new_client->addr = address; new_client->adapter = adapter; @@ -181,9 +176,6 @@ new_client->flags = 0; strcpy(new_client->name, client_name); new_client->id = daca_id++; /* racy... */ - - data = (struct daca_data *)(new_client+1); - dev_set_drvdata(&new_client->dev, data); if (daca_init_client(new_client)) goto bail;