Dely Sy [Tue, 2 Mar 2004 11:10:44 +0000 (03:10 -0800)]
[PATCH] PCI Hotplug: fixes for shpc and pcie hot-plug drivers
This patch contains the following:
1. Fix up the pcie and shpc options to make it easier for distros
to use as what we have discussed;
2. Fix bug encountered when installing the drivers on non-hotplug
systems;
3. Put PCI_CAP_ID_SHPC in include/linux/pci.h
David Brownell [Tue, 2 Mar 2004 06:32:28 +0000 (22:32 -0800)]
[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.
[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.
Karsten Keil [Tue, 2 Mar 2004 03:45:33 +0000 (19:45 -0800)]
[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.
Ingo Molnar [Tue, 2 Mar 2004 00:19:23 +0000 (16:19 -0800)]
[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.
Andrew Morton [Mon, 1 Mar 2004 15:07:26 +0000 (07:07 -0800)]
[PATCH] oprofile: fix P4 HT msr sharing
From: Philippe Elie <phil.el@wanadoo.fr>
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.
Andrew Morton [Mon, 1 Mar 2004 15:07:05 +0000 (07:07 -0800)]
[PATCH] m68k interrupt handling fix
From: Geert Uytterhoeven <geert@linux-m68k.org>
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.
Andrew Morton [Mon, 1 Mar 2004 15:06:22 +0000 (07:06 -0800)]
[PATCH] convert pdflush to kthread
From: Keith Owens <kaos@sgi.com>
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.
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
Andrew Morton [Mon, 1 Mar 2004 15:06:00 +0000 (07:06 -0800)]
[PATCH] x86-64 fixes for 2.6.4rc1
From: Andi Kleen <ak@suse.de>
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
Andrew Morton [Mon, 1 Mar 2004 15:05:50 +0000 (07:05 -0800)]
[PATCH] Make powernow-k8 cpufreq control work again
From: Pavel Machek <pavel@suse.cz>
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).
Andrew Morton [Mon, 1 Mar 2004 15:04:56 +0000 (07:04 -0800)]
[PATCH] sys_alarm() return value fix
From: Kurt Garloff <garloff@suse.de>
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.
Andrew Morton [Mon, 1 Mar 2004 15:04:41 +0000 (07:04 -0800)]
[PATCH] Fix VT mode change vs. fbcon
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
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.
The following patches fixes tty drivers which dont set devfs_name. Not
doing so will cause the tty layer to create "/dev/<NULL>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.
Andrew Morton [Mon, 1 Mar 2004 15:04:18 +0000 (07:04 -0800)]
[PATCH] NFS SUNRPC fix
From: James Morris <jmorris@redhat.com>
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 <jwcart2@epoch.ncsc.mil>.
Andrew Morton [Mon, 1 Mar 2004 15:04:07 +0000 (07:04 -0800)]
[PATCH] DCSSBLK depends on CONFIG_S390
From: Dave Jones <davej@redhat.com>
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.
Andrew Morton [Mon, 1 Mar 2004 15:03:13 +0000 (07:03 -0800)]
[PATCH] zr36067 driver update
From: "Ronald S. Bultje" <rbultje@ronald.bitfreak.net>
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.
Andrew Morton [Mon, 1 Mar 2004 15:03:02 +0000 (07:03 -0800)]
[PATCH] revert the /proc thread visibility fix
It appears that gdb, perfmon and perhaps other applications are already
opening /proc/<tid> 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.
Andrew Morton [Mon, 1 Mar 2004 15:02:40 +0000 (07:02 -0800)]
[PATCH] dm-crypt cleanups
From: Christophe Saout <christophe@saout.de>
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.
Andrew Morton [Mon, 1 Mar 2004 15:02:30 +0000 (07:02 -0800)]
[PATCH] fix in-place de/encryption bug with highmem
From: Christophe Saout <christophe@saout.de>
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.
Andrew Morton [Mon, 1 Mar 2004 15:02:08 +0000 (07:02 -0800)]
[PATCH] fix small highmem bio bounce bvec handling glitch
From: Christophe Saout <christophe@saout.de>
__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:
Andrew Morton [Mon, 1 Mar 2004 15:01:57 +0000 (07:01 -0800)]
[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.
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
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.
Andrew Morton [Mon, 1 Mar 2004 15:00:12 +0000 (07:00 -0800)]
[PATCH] ppc64: fix a bug in iSeries MMU hash management
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
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.
Andrew Morton [Mon, 1 Mar 2004 15:00:02 +0000 (07:00 -0800)]
[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.
Russell King [Mon, 1 Mar 2004 08:37:04 +0000 (03:37 -0500)]
[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.
Marc Zyngier [Mon, 1 Mar 2004 08:36:55 +0000 (03:36 -0500)]
[PATCH] Re: 2.6.4-rc1 + hp100 EISA, not working
>>>>> "Pawel" == Pawe <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 :
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)
[PATCH] PCI Hotplug: Patch to get cpqphp working with IOAPIC
On Fri, Feb 13 2004, Sy, Dely L wrote:
> Since filling out the INTERRUPT_LINE is needed for systems running
> with legacy irqs and not needed for systems running with IO-APIC. The
> possible
> solutions:
> 1) Best is there is a run-time check (a flag or an API call) that tells
> whether the system is running on legacy mode or IO-APIC mode. Is there
> such check that you know of?
Dan suggested that we look at what IRQ the hotplug controller has been
assigned in the MPS table. If its < 0x10 we're in legacy/mapped mode.
That would probaly work
> > >
> > > Do those servers work on 2.6.2 without my patch?
> > >
>
> > Yes
>
> They work but they get dev->irq = 9 or 11 in the APIC enabled mode.
> Correct?
>
Yes. All hot-added adapters get legacy IRQs like IRQ5 in the example
below where eth2 was added after bootup:
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.
Bart De Schuymer [Sun, 29 Feb 2004 13:53:00 +0000 (05:53 -0800)]
[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.