Andrew Morton [Wed, 29 Oct 2003 09:28:49 +0000 (04:28 -0500)]
[PATCH] initcall ordering fix for PNP NICs
From: "M.H.VanLeeuwen" <vanl@megsinet.net>
The level of isapnp_init was moved to after apci sometime ago. Since it is
now after net_dev_init, ISA PNP NICs fail to initialized at boot. This is
particularily problematic for NFS root filesystems like mine, or none
modular systems.
This fix allows ISA PNP NIC cards to work during net_dev_init, and still
leaves isapnp_init after apci_init.
Andrew Morton [Tue, 28 Oct 2003 23:13:31 +0000 (15:13 -0800)]
[PATCH] direct-io typo fix
From: Klaas de Waal <klaas.de.waal@hccnet.nl>
Bug in parameter of ZERO_PAGE macro in line 679 of fb/direct-io.c Parameter
dio->cur_user_address has to be dio->curr_user_address. This bug shows
when compling for MIPS little endian as target, not when compiling for X86.
Mike Phillips [Tue, 28 Oct 2003 23:09:57 +0000 (15:09 -0800)]
[PATCH] ibmtr_cs/ibmtr - get working again
Patch to get ibmtr_cs / ibmtr working again. A change went in a while back
I missed that killed it. Also fixed the timer to eliminate the
uninitialized timer error on close.
Stéphane Eranian [Mon, 27 Oct 2003 14:45:37 +0000 (06:45 -0800)]
[PATCH] ia64: fix 2 more perfmon2 bugs
Here is the minimal patch that fixes things that do not work and that
can be noticed fairly easily:
- remove a typo in pfm_check_task_state() which causes
PFM_READ_PMDS to fail when context is in PFM_MASKED state.
- fix a typo in perfmon_mcklinley.h when checking the value
combinations for when writing to PMC14. This could reject a
valid request to program PMC14.
Linus Torvalds [Mon, 27 Oct 2003 03:50:03 +0000 (19:50 -0800)]
Fix ZOMBIE race with self-reaping threads.
exit_notify() used to leave a window open when a thread
died that made the thread visible as a ZOMBIE even though
the thread reaped itself. This closes that window by marking
the thread DEAD within the tasklist_lock.
Kevin Corry [Mon, 27 Oct 2003 00:37:48 +0000 (16:37 -0800)]
[PATCH] Fix DM on top of raid
Force Device-Mapper to use PAGE_SIZE or smaller I/O when the underlying
device has a bvec_merge_fn routine registered. This will fix the
situation of Device-Mapper submitting I/Os to RAID-0 that span the
RAID-0 chunk boundaries.
Joe is working on a better solution that actually honors the MD
merge_bvec_fn routine. But this minimal change will fix the problem for
the time being.
Linus Torvalds [Mon, 27 Oct 2003 00:35:23 +0000 (16:35 -0800)]
Put the compiler barrier() on the right side of the preemption
enable on UP-PREEMPT.
Without this, the enable could "migrate" up into the critical
region (on SMP, the actual spinlock would act as an additional
barrier and PREEMPT was ok).
Rusty Russell [Sun, 26 Oct 2003 16:01:25 +0000 (08:01 -0800)]
[NETFILTER]: Fix ipchains oops in NAT
We updated ip_nat_setup_info to set the initialized flag and call
place_in_hashes, but *didn't* change the call in ip_fw_compat_masq.c
which also calls place_in_hashes() itself (again!). Result: corrupt
list, and next thing which lands in the same hash bucket goes boom.
Linus Torvalds [Sun, 26 Oct 2003 11:16:23 +0000 (03:16 -0800)]
Add a sticky "PF_DEAD" task flag to keep track of dead processes.
Use this to simplify 'finish_task_switch', but perhaps more
importantly we can use this to track down why some processes
seem to sometimes not die properly even after having been
marked as ZOMBIE. The "task->state" flags are too fluid to
allow that well.
Randolph Chung [Sun, 26 Oct 2003 06:27:04 +0000 (22:27 -0800)]
[PATCH] fix __div64_32 to do division properly
This fixes the generic __div64_32() to correctly handle divisions by
large 32-bit values (as used by nanosleep() and friends, for example).
It's a simple bit-at-a-time implementation with a reduction of the high
32-bits handled manually. Architectures that can do 64/32-bit divisions
in hardware should implement their own more efficient versions.
Andi Kleen [Sun, 26 Oct 2003 01:17:34 +0000 (17:17 -0800)]
[PATCH] Essential x86-64 updates
The most important part is that it makes x86-64 compile again.
Without that 2.6 users won't be very happy.
It also works around a bug that allowed every user program to reboot the
system on B stepping K8.
Also update to match some recent i386 fixes.
Full ChangeLog:
- Add acpi_pic_set_level_irq to make ACPI compile again
- Work around compat mode K8 bug in IRET exception handling
- Increase exception stack. The old 1k stack was too easy
to overflow (from Jim Paradis, changed by me)
- Replace safe_smp_processor_id with cpuid (needed for above)
- When there is only one node always enable fake_node mode
- Merge with i386 (NTP gettimeofday monoticity fix, irq nr_vectors change)
- Fix compile problem for UP kernels in time/cpufreq
- Set all nodes online at bootup
- Define node_to_cpumask correctly
The first FAT entry should have the media byte (0xf0,0xf8,...,0xff)
extended with all 1 bits in the first FAT entry.
Checking this is a good idea, it prevents us from mounting garbage
as FAT - there is no good magic for FAT.
Unfortunately, Windows does not enforce this, and 2.4 doesn't either.
It turns out that there are filesystems around (two reports so far) that
have a zero first FAT entry, and work under Windows and 2.4 but fail to
mount under 2.6.
The 0xfa code can be a key scancode or it can be a protocol scancode.
Only few keyboards use it as a key scancode, and if we always interpret
it as a protocol scancode then these rare keyboards will have a dead
key. If we interpret it as a key scancode then we have a dead keyboard
in case it was protocol.
Clearly it is safer to prefer to interpret it as a protocol scancode.
This moves the test for ACK and NAK up, so that they are always seen as
protocol.
This is just a minimal patch. What I did in 1.1.54 was to keep track of
commands sent with a flag reply_expected, so that 0xfa could be taken as
ACK when a reply is expected and as key scancode otherwise. That is the
better solution, but requires larger surgery.
Knut Petersen [Fri, 24 Oct 2003 01:30:34 +0000 (18:30 -0700)]
[PATCH] setkeycode ioctl fix
This is a bugfix for setkeycode() in /drivers/char/keyboard.c.
If we change a keycode the corresponding bit should be cleared if and
only if this keycode is not defined any longer. I believe that this
also was intended with the original code, but the implementation is
faulty.
First off all the first three changed lines are obviously erroneus:
oldkey == truekey is false or true, you do not need to inclose this in a
for(). I believe the author intended INPUT_KEYCODE(dev,i) == oldkey.
But fixing this alone is not enough.
If somebody wants to interchange the definition of two keys A and B, the
normal way is to use two setkeycode calls:
setkeycode (scancode A, keycode B);
setkeycode (scancode B, keycode A);
The old code does a clearbit(oldkey ..) call even in situations where
two keys have the same definition, and this situation arises commonly in
the situation mentioned above.
Knut Petersen [Fri, 24 Oct 2003 01:30:26 +0000 (18:30 -0700)]
[PATCH] input / keyboard / Scancode Set 3 support broken
If somebody uses keyboard scancode set 3 it is necessary to explicitly
program the keyboard to send make/break codes for all keys and to set
autorepeat for all keys.
This is critical for some people. One example is the LK461/46W series
of keyboards from Digital Equipment Corporations. These are VMS
keyboards that are also usable on a normal PC.
These keyboards support Scancode Set 2, but for some keys this support
is screwed up -- some function keys (e.g. F18/F20) report the same
scancode sequence combined with both alt and shift keys.
Scancode Set 3 works perfectly if all keys are programmed to give
make/break codes.
A lot of keyboards manufactured by Cherry only make/break for some (not all!)
modifyer keys in scancode set 3 without this fix.
Linus Torvalds [Fri, 24 Oct 2003 00:52:25 +0000 (17:52 -0700)]
Add a quirk for the Intel ICH-[45] to add special ACPI regions.
This fixes resource conflicts due to IO decode that doesn't show
up with a normal PCI probe (we do similar quirks for most other
chipsets). Without it, the kernel doesn't know about some magic
IO decodes for the chips.
David Brownell [Thu, 23 Oct 2003 15:07:41 +0000 (08:07 -0700)]
[PATCH] USB: usb enumeration clears full speed ep0 state
This resolves a bug that was recently reported to me by someone
enumerating a USB 1.1 modem through a high speed hub. I'm a bit
surprised we never saw it before; I think cache/dma timings must
usually be strongly in our favor.
The problem was that the HC was still using the old ep0 maxpacket
value, so when it received an 18 byte device descriptor it would
report a packet overrun and enumeration would fail. The fix is
straightforward: invalidate the HC's old endpoint state when we
change the full speed maxpacket size. (And eventually, we can
remove EHCI and OHCI code coping with usbcore not doing this.)
Stéphane Eranian [Thu, 23 Oct 2003 10:51:51 +0000 (03:51 -0700)]
[PATCH] ia64: fix critical perfmon2 bugs
This patch fixes the following issues:
- fix a nasty corner case by which a task could inherit psr.pp/psr.up
that could be stale by the time it runs. psr.pp/psr.up bits must be
cleared on fork and inherited on execve(). Test case provided by
John Levon.
- mask interrupts when locking the pfm stat structure. We don't want
to take PMU interrupts in the middle of this kind of critical
section.
- fix a bug in pfm_close() for context which use asynchronous
notifications. You cannot call fasync_helper() with interrupts
disabled because it reenables them. There was no real danger of
moving the call outside our critical section.
- fix a bug in in pfm_flush_pmds() where you can leave the freeze bit
set in the pmc saved state.
Arun Sharma [Thu, 23 Oct 2003 10:41:14 +0000 (03:41 -0700)]
[PATCH] ia64: fix broken __emul_prefix
his seems to be broken for ia32 on ia64 and possibly other emulation
architectures as well. The problem comes from
fs/namei.c:set_fs_altroot() using path_lookup() instead of a
path_walk() relative to "/" (which is the case for 2.4).
David Brownell [Thu, 23 Oct 2003 10:28:44 +0000 (03:28 -0700)]
[PATCH] USB: fix usb-storage self-deadlock
This fixes a problem that showed in usb-storage (osdl bugme 1310)
and could have shown in other drivers that used usb_reset_device()
when they already held dev->serialize: a self-deadlock with some
devices.
There are some drivers that should likely change so that they grab
this lock themselves, since they don't call this during probe()
when the lock is already held. The lock protects against config
changes by other tasks, which is currently quite rate.
Alan Stern [Thu, 23 Oct 2003 10:25:37 +0000 (03:25 -0700)]
[PATCH] USB: fix for earlier unusual_devs.h patch
An earlier patch caused trouble because it effectively removed the
US_FL_FIX_INQUIRY flag for devices with release number higher than
0x5009. This one might cause problems because it explicitly goes
against the immediately preceding comment in unusual_devs.h. That
comment says that these Casio digital cameras claim to use the CBI
transport when in fact they only use CB. However, there have been two
reports in the last few weeks from people getting the "unneeded SubClass
and Protocol" log messages. One of them was using a device with release
number 0x1000, right at the start of the range. The other had a device
with release number 0x5010, just beyond the end of the current range.
Maybe Casio is marketing two different devices with different behaviors
but having the same Vendor, Product, and Release values -- I don't know.
Ian Abbott [Thu, 23 Oct 2003 10:17:32 +0000 (03:17 -0700)]
[PATCH] USB: ftdi_sio - Perle UltraPort new ids - 2 of 2
Patch by me (Ian Abbott). Removed aliases of FTDI_VID define for
consistency. Renamed FTDI_PERLE_PID to FTDI_PERLE_ULTRAPORT_PID.
Removed Matrix Orbital and Perle Systems devices from the 8U232AM
device table (but left them in the FT232BM device table) as they
are known to be FT232BM devices.
Ian Abbott [Thu, 23 Oct 2003 10:16:34 +0000 (03:16 -0700)]
[PATCH] USB: ftdi_sio - Perle UltraPort new ids - 1 of 2
Scott Allen's patch to add vid/pid support for Perle Systems
UltraPort USB serial converter, merged up with minor whitespace
changes by myself (Ian Abbott).
David Brownell [Thu, 23 Oct 2003 10:12:01 +0000 (03:12 -0700)]
[PATCH] USB: ACM USB modem fixes
Please merge this patch. I've had two success reports from it.
Putback comment can be:
Fixes some long-standing cdc-acm bugs including:
- Oopsing
- Probe messages not so excessive
- Makes /proc/bus/usb/devices show both interface claims
- Now cdc_acm won't hotplug for Ethernet devices (or RNDIS)