[PATCH] pcmcia: fix multiple insertion of multifunction cards
The ordering of setting and clearing device_add_pending went wrong on some
occasions, causing multifunction cards only to be handled correctly on the
first insertion, not on subsequent ones.
[PATCH] pcmcia: defer ide-cs initialization after other IDE drivers started up
Avoid registering PCMCIA CF cards before other IDE stuff. This means the risk
of /dev/hd* being re-ordered is lessened. The _sane_ thing to assert any
ordering is to use udev, nameif and so on, of course.
John McCutchan [Mon, 1 Aug 2005 15:00:45 +0000 (11:00 -0400)]
[PATCH] inotify: fix race between the kernel and user space
When you rm a watch, an IN_IGNORED event is sent down the event queue
with the watch descriptor that you just rm'd.
If you then add a watch you could get the ignored watch's wd and if you
haven't read the entire event queue, user space will think that it's
newly created watch was just ignored.
To avoid this problem we just use idr_get_new_above instead of
idr_get_new.
Signed-off-by: John McCutchan <ttb@tentacle.dhs.org> Signed-off-by: Robert Love <rml@novell.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
John McCutchan [Mon, 1 Aug 2005 15:00:45 +0000 (11:00 -0400)]
[PATCH] inotify: fix file deletion by rename detection
When a file is moved over an existing file that you are watching,
inotify won't send you a DELETE_SELF event and it won't unref the inode
until the inotify instance is closed by the application.
Signed-off-by: John McCutchan <ttb@tentacle.dhs.org> Signed-off-by: Robert Love <rml@novell.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Drivers really only work well in SMP if they actually can be selected.
This is a leftover from the time when the 6pack drive only used to be
a bitrotten variant of the slip driver.
[PATCH] sk98lin: fix workaround for yukon-lite chipset (> rev 7)
Yukon-Lite chipset needs workaround for revision 7 (or later).
Without this patch, chip gets stuck in low power mode and never
boots. Newer SysKonnect vendor code already had same patch.
Related bug in skge is http://bugs.gentoo.org/87822
Chris, please add for 2.6.12.2
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Jay Vosburgh [Thu, 21 Jul 2005 19:18:02 +0000 (12:18 -0700)]
[PATCH] bonding: documentation update
Contains general updates (additional configuration info, hopefully
better examples, updated some out of date info, and a bonus pass
through ispell to banish the "paramters.") and info specific to
gratuitous ARP and xmit policy functionality already in 2.6.13-rc2.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Adrian Bunk [Wed, 27 Jul 2005 08:06:35 +0000 (01:06 -0700)]
[PATCH] SCSI_SATA has to be a tristate
SCSI=m must disallow static drivers.
The problem is that all the SATA drivers depend on SCSI_SATA.
With SCSI=m and SCSI_SATA=y this allows the static enabling of the SATA
drivers with unwanted effects, e.g.:
- SCSI=m, SCSI_SATA=y, SCSI_ATA_ADMA=y
-> SCSI_ATA_ADMA is built statically but scsi/built-in.o is not linked
into the kernel
- SCSI=m, SCSI_SATA=y, SCSI_ATA_ADMA=y, SCSI_SATA_AHCI=m
-> SCSI_ATA_ADMA and libata are built statically but
scsi/built-in.o is not linked into the kernel,
SCSI_SATA_AHCI is built modular (unresolved symbols due to missing
libata)
Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
[NET] Fix too aggressive backoff in dst garbage collection
The bug is evident when it is seen once. dst gc timer was backed off,
when gc queue is not empty. But this means that timer quickly backs off,
if at least one destination remains in use. Normally, the bug is invisible,
because adding new dst entry to queue cancels the backoff. But it shots
deadly with destination cache overflow when new destinations are not released
for long time f.e. after an interface goes down.
The fix is to cancel backoff when something was released.
Signed-off-by: Denis Lunev <den@sw.ru> Signed-off-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
Tunnel modules used to obtain module refcount each time when
some tunnel was created, which meaned that tunnel could be unloaded
only after all the tunnels are deleted.
Since killing old MOD_*_USE_COUNT macros this protection has gone.
It is possible to return it back as module_get/put, but it looks
more natural and practically useful to force destruction of all
the child tunnels on module unload.
Signed-off-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
Harald Welte [Sun, 31 Jul 2005 00:44:07 +0000 (17:44 -0700)]
[NETFILTER] Inherit masq_index to slave connections
masq_index is used for cleanup in case the interface address changes
(such as a dialup ppp link with dynamic addreses). Without this patch,
slave connections are not evicted in such a case, since they don't inherit
masq_index.
Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
ACPI is wrong. Devices should not release their IRQ's on suspend and
re-aquire them on resume. ACPI should just re-init the IRQ controller
instead of breaking most drivers very subtly.
Breakage reported by Hugh Dickins <hugh@veritas.com>
[PATCH] sk98lin: basic suspend/resume support fixes
An early version of the sk98lin patch was merged via Len's tree. But there
were subsequent updates as a result of review from Jeff. THis fixes things
up.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: "Brown, Len" <len.brown@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The patch adds boundary check for the MAX_GSI_NUM. Same as the update for
i386, the patch addresses a problem with ACPI SCI IRQ. The patch corrects
the code such that SCI IRQ is skipped and duplicate entry is avoided. The
VIA chipset uses 4-bit IRQ register for internal interrupt routing, and
therefore cannot handle IRQ numbers assigned to its devices. The patch
corrects this problem by allowing PCI IRQs below 16.
Dave Peterson [Sat, 30 Jul 2005 05:59:20 +0000 (22:59 -0700)]
[PATCH] x86_64: fix bug in csum_partial_copy_generic()
I was observing reproducible crashes on the "movw %bx,(%rsi)" instruction
below while a process in a recvfrom() system call was copying packet data
to user space. The patch below fixes the exception table and causes the
crash to no longer reproduce. Please apply.
[PATCH] ppc32: fix 44x early serial debug for configurations with more than 512M of RAM
Fix 44x early serial debugging for big RAM configurations (more than 512M).
We cannot use default OpenBIOS virtual mapping, because it interferes with
pinned TLB entry.
While we are at it, move early UART mapping to TLB slot 0, so it can
survive longer during boot process (slot 1 is used by the first ioremap
call, effectively killing UART mapping if it occupies this slot). Also,
change UART TLB entry size to 4K (256M is too much for a bunch of registers
:). Squash some warnings on the way.
Tested on Ebony and Ocotea with 1G of RAM.
Thanks to Scott Coulter <scott.coulter@cyclone.com> for diagnosing this
problem.
Martin J. Bligh [Sat, 30 Jul 2005 05:59:18 +0000 (22:59 -0700)]
[PATCH] Fix NUMA node sizing in nr_free_zone_pages
We are iterating over all nodes in nr_free_zone_pages(). Because the
fallback zonelists contain all nodes in the system, and we walk all the
zonelists, we're counting memory multiple times (once for each node). This
caused us to make a size estimate of 32GB for an 8GB AMD64 box, which makes
all the dirty ratio calculations, etc incorrect.
There's still a further bug to fix from e820 holes causing overestimation
as well, but this fix is separate, and good as is, and fixes one class of
problems. Problem found by Badari, and tested by Ram Pai - thanks!
Signed-off-by: Martin J. Bligh <mbligh@mbligh.org> Signed-off-by: Matt Dobson <colpatch@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Robert Love [Sat, 30 Jul 2005 05:59:17 +0000 (22:59 -0700)]
[PATCH] ppc64: inotify syscalls
inotify system call support for PPC64
[ I don't think we need sys32 compatibility versions--and if we do, I
failed in life. ]
Signed-off-by: Robert Love <rml@novell.com> Acked-by: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Robert Love [Sat, 30 Jul 2005 05:59:16 +0000 (22:59 -0700)]
[PATCH] ppc32: inotify syscalls
Add inotify system call stubs to PPC32.
Signed-off-by: Robert Love <rml@novell.com> Acked-by: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Otherwise a platform that supports ACPI based cpufreq
and boots up at lowest possible speed could stay there
forever. This because the governor may request max speed,
but the code doesn't update if there is no change in
speed, and it assumed the initial state of max speed.
http://bugzilla.kernel.org/show_bug.cgi?id=4634
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
EC burst mode benefits many machines, some of
them significantly. However, our current
implementation fails on some machines such
as Rafael's Asus L5D.
This patch restores the alternative EC polling code,
which can be enabled at boot time via "ec_polling"
http://bugzilla.kernel.org/show_bug.cgi?id=4665
Signed-off-by: Luming Yu <luming.yu@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Matthew Garrett [Fri, 29 Jul 2005 21:03:39 +0000 (14:03 -0700)]
[PATCH] agp: restore APBASE after setting APSIZE
When leaving S3 state, the AGP bridge may not have all PCI configuration
registers set in the same way as they were at boot. This should be fixed
by pci_restore_state - however, the APBASE register cannot be set to
conflict with the APSIZE register. If APSIZE is larger than it was before
suspend, pci_restore_state will not restore APBASE correctly. The attached
patch adds an extra item to the agp_bridge_data structure and uses it to
store the value of APBASE. On resume, this is then written after APSIZE
has been set. This patch only touches the path used for Intel chipsets
without integrated graphics, and may need to be extended to work with the
others.
Without this patch, I get the symptoms described in bug 4921 - APBASE ends
up overlapping various PCI devices, and as a result they fail to work after
resume.
Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org> Acked-by: Dave Jones <davej@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Close a small window where a device may be not operational again after senseid
finished and the "same device" check fails due to dev=0000 by checking for dnv
after stsch() by then setting the device to not operational. (No need to
check for dnv in ccw_device_handle_oper() again since we don't do stsch() into
the subchannel's schib in the meantime and will get a crw anyway if the device
becomes not oper again).
Signed-off-by: Cornelia Huck <cohuck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The patch that introduced waiting for interrupts after resetting the reader
can cause the boot to fail because the system is waiting for an interrupt that
will never arrive. Add code to check if an interrupt is supposed to arrive
before waiting endlessly.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Fri, 29 Jul 2005 21:03:33 +0000 (14:03 -0700)]
[PATCH] uml: fix vsyscall brokenness
The #if/#ifdef cleanup exposed a bug in UML's ELF header processing. With
this bug fixed, UML recognizes the vsyscall info coming from the host. On
FC4, there is a vsyscall page low in the address space, which UML doesn't
provide. This causes an infinite page fault loop and a hang on boot.
This patch works around that by making this look like a no-vsyscall system.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The patch addresses a problem with ACPI SCI interrupt entry, which gets
re-used, and the IRQ is assigned to another unrelated device. The patch
corrects the code such that SCI IRQ is skipped and duplicate entry is
avoided. Second issue came up with VIA chipset, the problem was caused by
original patch assigning IRQs starting 16 and up. The VIA chipset uses
4-bit IRQ register for internal interrupt routing, and therefore cannot
handle IRQ numbers assigned to its devices. The patch corrects this
problem by allowing PCI IRQs below 16.
sync_tsc was using smp_call_function to ask the boot processor to report
it's tsc value. smp_call_function performs an IPI_send_allbutself which is
a broadcast ipi. There is a window during processor startup during which
the target cpu has started and before it has initialized it's interrupt
vectors so it can properly process an interrupt. Receveing an interrupt
during that window will triple fault the cpu and do other nasty things.
Why cli does not protect us from that is beyond me.
The simple fix is to match ia64 and provide a smp_call_function_single.
Which avoids the broadcast and is more efficient.
This certainly fixes the problem of getting stuck on boot which was
very easy to trigger on my SMP Hyperthreaded Xeon, and I think
it fixes it for the right reasons.
Minor changes by AK
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] mm: Ensure proper alignment for node_remap_start_pfn
While reserving KVA for lmem_maps of node, we have to make sure that
node_remap_start_pfn[] is aligned to a proper pmd boundary.
(node_remap_start_pfn[] gets its value from node_end_pfn[])
Dan Streetman [Fri, 29 Jul 2005 19:18:28 +0000 (12:18 -0700)]
[PATCH] USB: fix in usb_calc_bus_time
This patch does the same swap, i.e. use the ISO macro if (isoc).
Additionally, it fixes the return value - the usb_calc_bus_time function
returns the time in nanoseconds (I didn't notice that before) while the
HS_USECS and HS_USECS_ISO are microseconds. This fixes the function to
return nanoseconds always, and adjusts ehci-q.c (the only high-speed
caller of the function) to wrap the call in NS_TO_US().
Gigabyte GN-WLBZ201 wifi usb dongle works very well, using the zd1201
driver. the only missing part is that the corresponding usbid is not
declared. The following patch should fix this.
This patch enables a support of KYOCERA AH-K3001V, one of the most
popular cell phone in Japan. This device has vendor specific ID but works
with acm driver by adding USB ID. This device already works on
FreeBSD and OS X by native USB ACM driver with USB ID added.
This device is probed as NO_UNION_NORMAL not to hang up when probing.
Alan Stern [Fri, 29 Jul 2005 19:17:16 +0000 (12:17 -0700)]
[PATCH] USB: Usbcore: Don't try to delete unregistered interfaces
This patch handles a rarely-encountered failure mode in usbcore. It's
legal for device_add to fail (although now it happens even more rarely
than before since failure to bind a driver is no longer fatal). So when
we destroy the interfaces in a configuration, we shouldn't try to delete
ones which weren't successfully registered. Also, failure to register an
interface shouldn't be fatal either -- I think; you may disagree about
this part of the patch.
Alan Stern [Fri, 29 Jul 2005 19:16:58 +0000 (12:16 -0700)]
[PATCH] USB: usbfs: Don't leak uninitialized data
This patch fixes an information leak in the usbfs snoop facility:
uninitialized data from __get_free_page can be returned to userspace and
written to the system log. It also improves the snoop output by printing
the wLength value.
Ian Abbott [Fri, 29 Jul 2005 19:16:41 +0000 (12:16 -0700)]
[PATCH] USB: ftdi_sio: Update RTS and DTR simultaneously
ftdi_sio: Update RTS and DTR simultaneously, using a single control URB
instead of separate control URBs for RTS and DTR. Reinhard Bergmann
observed time differences of up to 680 ms with his application on a
2.4.22 kernel when RTS and DTR were updated using separate control
URBs, which is unacceptable.
Ivan Kokshaysky [Fri, 29 Jul 2005 19:16:22 +0000 (12:16 -0700)]
[PATCH] PCI: remove PCI_BRIDGE_CTL_VGA handling from setup-bus.c
The setup-bus code doesn't work correctly for configurations
with more than one display adapter in the same PCI domain.
This stuff actually is a leftover of an early 2.4 PCI setup code
and apparently it stopped working after some "bridge_ctl" changes.
So the best thing we can do is just to remove it and rely on the fact
that any firmware *has* to configure VGA port forwarding for the boot
display device properly.
But then we need to ensure that the bus->bridge_ctl will always
contain valid information collected at the probe time, therefore
the following change in pci_scan_bridge() is needed.
Jon Smirl [Fri, 29 Jul 2005 19:16:17 +0000 (12:16 -0700)]
[PATCH] PCI: Adjust PCI rom code to handle more broken ROMs
There are ROMs reporting that their size exceeds their PCI ROM
resource window. This patch returns the minimum of the resource window
size or the size in the ROM. An example of this breakage is the XGI
Volari Z7.
This patch was sent first time very long time ago,
but magically was disapeared, it probably exists
in your queue, but to be sure, I resend it.
If can not be applied cleanly after your w1 queue is flushed
into upstrem tree, just drop it.
Thanks.
Patch from Michael Farmbauer <michl@baldrian.franken.de>.
Jean Delvare [Fri, 29 Jul 2005 19:15:33 +0000 (12:15 -0700)]
[PATCH] I2C: 24RF08 corruption prevention (again)
The 24RF08 corruption prevention in the eeprom and max6875 drivers wasn't
complete. For one thing, the additional quick write should happen as soon
as possible and unconditionally, while both drivers had error paths before.
For another, when a given chip is forced, the core does not emit a quick
write, so a second quick write would cause the corruption rather than
prevent it.
I plan to move the corruption prevention in the core in the long run, so
that individual drivers don't have to care anymore. But I need to merge
i2c_probe and i2c_detect before I do (work in progress).
Jean Delvare [Fri, 29 Jul 2005 19:15:07 +0000 (12:15 -0700)]
[PATCH] I2C: Missing space in split strings
A few split string in i2c (and now hwmon) drivers lack a joining space,
causing them to display incorrectly. This trivial patch fixes that up.
Please apply, thanks.
Ladislav Michl [Fri, 29 Jul 2005 19:15:00 +0000 (12:15 -0700)]
[PATCH] I2C: ds1337 - fix 12/24 hour mode bug
DS1339 manual, page 6, chapter Date and time operation:
The DS1339 can be run in either 12-hour or 24-hour mode. Bit 6 of the
hours register is defined as the 12-hour or 24-hour mode-select bit.
When high, the 12-hour mode is selected.
Patch below makes ds1337 driver work as documented in manual.
Maneesh Soni [Fri, 29 Jul 2005 19:14:19 +0000 (12:14 -0700)]
[PATCH] sysfs: fix sysfs_setattr
o sysfs_dirent's s_mode field should also be updated in sysfs_setattr(), else
there could be inconsistency in the two fields. s_mode is used while
->readdir so as not to bring in the inode to cache.
Maneesh Soni [Fri, 29 Jul 2005 19:13:35 +0000 (12:13 -0700)]
[PATCH] sysfs: fix sysfs_chmod_file
o sysfs_chmod_file() must update the new iattr field in sysfs_dirent else
the mode change will not be persistent in case of inode evacuation from
cache.
Dave Jones [Fri, 29 Jul 2005 19:55:40 +0000 (12:55 -0700)]
arch/i386/kernel/cpu/cpufreq/powernow-k8.c: In function `powernow_k8_cpu_init_acpi':
arch/i386/kernel/cpu/cpufreq/powernow-k8.c:740: warning: unused variable `vid'
arch/i386/kernel/cpu/cpufreq/powernow-k8.c:739: warning: unused variable `fid'
arch/i386/kernel/cpu/cpufreq/powernow-k8.c:743: warning: unused variable `vid'
arch/i386/kernel/cpu/cpufreq/powernow-k8.c:742: warning: unused variable `fid'
arch/i386/kernel/cpu/cpufreq/powernow-k8.c:746: `fid' undeclared (first use in this function)
arch/i386/kernel/cpu/cpufreq/powernow-k8.c:746: `vid' undeclared (first use in this function)
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Jones <davej@redhat.com>
In an uncensored copy of code from i386 to x86_64 I wound up
with inline assembly with the wrong constraints. Use input
constraints instead of output constraints.
So I know the assembler will do the right thing specify the size
of the operand lidtq and lgdtq instead of just lidt and lgdt.
Make load_segments use an input constraint, and delete the macro fun.
Without having to reload %cs like I do on i386 this code is noticeably
simpler.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
For some reason I was telling my inline assembly that the
input argument was an output argument.
Playing in the trampoline code I have seen a couple of
instances where lgdt get the wrong size (because the
trampolines run in 16bit mode) so use lgdtl and lidtl to
be explicit.
Additionally gcc-3.3 and gcc-3.4 want's an lvalue for a
memory argument and it doesn't think an array of characters
is an lvalue so use a packed structure instead.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] reboot: remove device_suspend(PMSG_FREEZE) from kernel_kexec
If device_suspend(PMSG_FREEZE) is not ready to be called in
kernel_restart it is definitely not ready to be called in the even more
fickle kernel_kexec.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>