This fixes possible lockups in pmac_zilog when beeing flooded with
incoming data (not that other serial drivers share the same race, I told
Russel about it already). It also fixes some SCC initialization
problems, add some PM callback, and fix the irda setup code.
[PATCH] pmac_zillog 1/2 : Cosmetic only, change "up" to "uap" to avoid collision
This does cosmetic changes the pmac_zilog, changing the use of "up" as
an identifier in favor "uap" to avoid collision with semaphores, use
proper debug macros, and a few other cosmetic bits.
Rusty Russell [Mon, 8 Mar 2004 14:06:12 +0000 (06:06 -0800)]
[PATCH] remove sparc64's num_possible_cpus()
Levent Serinol <levent.serinol@mynet.com> found that the hotplug cpu
patch broke Sparc64. I introduced a num_possible_cpus(), which
Sparc64 already has. Remove the Sparc64 one.
I also removed Sparc64's cpu_online() macro: it's in linux/cpumask.h
already.
Rusty Russell [Mon, 8 Mar 2004 14:05:53 +0000 (06:05 -0800)]
[PATCH] introduce __drain_pages() to take a CPU number
Extracts core of drain_pages() for hotcpu use. Trivial.
Hotplug CPU needs to drain pages on a downed CPU (usually it's the
current cpu). Introduce "__drain_pages", make the CPU an argument,
and expose it if CONFIG_HOTPLUG_CPU as well as CONFIG_PM.
Jeff Garzik [Mon, 8 Mar 2004 17:33:25 +0000 (12:33 -0500)]
[libata sata_promise] provide proper SCSI completion function
Promise driver uses a custom error handling function, so we need
the fix that was applied to the libata core: the SCSI error
handling thread requires that we complete commands using a special
completion function, since the normal one doesn't work inside
the error handling thread.
The following patch is a very crude one to at least not make sata block
suspend-to-ram entirely. Probably you want more powermanagement handling as
well... but it's a start
Don Fry [Mon, 8 Mar 2004 16:23:53 +0000 (11:23 -0500)]
[PATCH] pcnet32 transmit hang fix
The pcnet32 driver will hang after a few frames (<30) with the 79C971
(and probably the 79C972 though I don't have the hardware to prove it).
By interrupting slightly more frequently the hang will not occur.
Pawel> This machine has RAM BIOS booted from floppy. I ran it and EISA
Pawel> configure utility to check this once more. Card is enabled and not
Pawel> locked. I added eisa_bus.enable_dev=2 parameter but it didn't help much.
Pawel> I'm getting:
Pawel> I added this final entry you mailed but nothing changed. Still - module
Pawel> loads and unloads cleanly and without any warnings on 2.6.4-rc1. But
Pawel> does nothing - not a single line in logs/dmesg after it's loaded. Card
Pawel> does not work after modprobe, I can't get interface up.
Ok, found it.
It really looks like the new EISA probing code in hp100 never got
tested, since a precious offset has disappeared during the rewriting
process.
Please note that you still need to enable the device by hand, since
your BIOS (or maybe the EISA CFG file, since I'm seeing the exact same
problem on a Compaq machine here) doesn't properly enable the card.
Rusty Russell [Mon, 8 Mar 2004 09:12:45 +0000 (01:12 -0800)]
[PATCH] stop_machine_run: Move Bogolock Code Out of module.c
The "bogolock" code was introduced in module.c, as a way of freezing
the machine when we wanted to remove a module. This patch moves it
out to stop_machine.c and stop_machine.h.
Since the code changes affinity and proirity, it's impolite to hijack
the current context, so we use a kthread. This means we have to pass
the function rather than implement "stop_machine()" and
"restart_machine()".
Dave Kleikamp [Mon, 8 Mar 2004 08:40:34 +0000 (02:40 -0600)]
JFS: Avoid incrementing i_count on file create
Committing a transaction creating a file required insuring that the
inode stayed in cache until the journal was written to. i_count was
being incremented until the transaction was complete.
However, incrementing i_count caused fcntl(S_SETLEASE) to fail. I
reworked the transaction code so that the inode does not have to
stay in-memory while the transaction is being committed.
Thanks to Steve French for figuring out why setlease was failing.
Dave Kleikamp [Mon, 8 Mar 2004 07:24:03 +0000 (01:24 -0600)]
JFS: warn users of inaccessible file names
When no iocharset is specified, the default action is to trivially
map each byte into the low order of the 16-bit unicode character.
If an existing name exists that has a non-zero high order byte, the
file will be inaccessible without remounting with iocharset set to
a charset that supports the character.
This patch will cause a warning to be issued to the syslog (no more
than five times) suggesting that the volume be mounted with
iocharset=utf8 in order to access the file.
Andrew Morton [Mon, 8 Mar 2004 06:42:37 +0000 (22:42 -0800)]
[PATCH] vma corruption fix
From: Hugh Dickins <hugh@veritas.com>
Fixes bugzilla #2219
fork's dup_mmap leaves child mm_rb as copied from parent mm while doing all
the copy_page_ranges, and then calls build_mmap_rb without holding
page_table_lock.
try_to_unmap_one's find_vma (holding page_table_lock not mmap_sem) coming
on another cpu may cause mm mayhem. It may leave the child's mmap_cache
pointing to a vma of the parent mm.
When the parent exits and the child faults, quite what happens rather
depends on what junk then inhabits vm_page_prot, which gets set in the page
table, with page_add_rmap adding the ptep, but junk pte likely to fail the
tests for page_remove_rmap.
Eventually the child exits, the page table is freed and try_to_unmap_one
oopses on null ptep_to_mm (but in a kernel with rss limiting, usually
page_referenced hits the null ptep_to_mm first).
This took me days and days to unravel! Big thanks to Matthieu for
reporting it with a good test case.
Jens Axboe [Mon, 8 Mar 2004 04:29:23 +0000 (20:29 -0800)]
[PATCH] fix blk_start_queue()
Here's the second attempt at fixing blk_start_queue(). The only change
since last version is using proper atomic bitops. If we moved the
read/write full to a different variable, we could rely on the queue lock
for plugging and stop/start of queue (by far the most used bit
operations there) and skip the atomic bitops.
Jens Axboe [Mon, 8 Mar 2004 00:03:34 +0000 (16:03 -0800)]
[PATCH] blk_insert_request() buglet
blk_insert_request() unconditionally calls q->request_fn(q) regardless
of the plug state of the queue. This means that we could invoke
request_fn with a plugged queue, which is an invalid state.
The attached patch updates wanXL card driver. Please apply to Linux 2.6.
Thanks.
Changes:
* fixed initialization kernel panic, introduced with recent alloc_netdev()
wan patch,
* wanxl_rx_intr() port# now checked before accessing port structure,
* cleanups etc.
--
Krzysztof Halasa, B*FH
Andrew Morton [Sat, 6 Mar 2004 16:51:43 +0000 (08:51 -0800)]
[PATCH] fix i2c compile warnings
drivers/i2c/busses/i2c-elv.c: In function `i2c_bitelv_init':
drivers/i2c/busses/i2c-elv.c:155: warning: unsigned int format, long int arg (arg 2)
drivers/i2c/busses/i2c-elv.c:155: warning: unsigned int format, long int arg (arg 2)
drivers/i2c/busses/i2c-velleman.c: In function `i2c_bitvelle_init':
drivers/i2c/busses/i2c-velleman.c:141: warning: unsigned int format, long int arg (arg 2)
drivers/i2c/busses/i2c-velleman.c:141: warning: unsigned int format, long int arg (arg 2)
Andrew Morton [Sat, 6 Mar 2004 16:51:13 +0000 (08:51 -0800)]
[PATCH] Fix nobh_prepare_write() race
Dave Kleikamp <shaggy@austin.ibm.com> points out a race between
nobh_prepare_write() and end_buffer_read_sync(). end_buffer_read_sync()
calls unlock_buffer(), waking the nobh_prepare_write() thread, which
immediately frees the buffer_head. end_buffer_read_sync() then calls
put_bh() which decrements b_count for the already freed structure. The
SLAB_DEBUG code detects the slab corruption.
We fix this by giving nobh_prepare_write() a private buffer_head end_o
handler which doesn't touch the buffer's contents after unlocking it.
Andrew Morton [Sat, 6 Mar 2004 16:51:03 +0000 (08:51 -0800)]
[PATCH] CONFIG_LBD fixes
From: Eric Sandeen <sandeen@sgi.com>
Several functions in buffer.c are using unsigned long where they should be
using sector_t.
Also, use pgoff_t in several places so it is easier to tell what is beingused
as a pagecache index, what is being used as a disk index and what is being
used as an offset-into-page.
Andrew Morton [Sat, 6 Mar 2004 16:50:53 +0000 (08:50 -0800)]
[PATCH] fix oops in emu10k1_wavein_open() error recovery
If a large pci_alloc_consistent() GFP_ATOMIC allocation fails this driver's
recovery code will call emu10k1_wavein_close() far earlier than it should: it
goes splat in emu10k1_timer_uninstall().
Fix it by simply removing that call: we haven't allocated any resources yet
anyway.
Note that one of the callers of emu10k1_wavein_open(), emu10k1_audio_read()
will sit there stupidly retrying the open. But it has a sleep in there so
something might eventually give way.
Andrew Morton [Sat, 6 Mar 2004 16:50:43 +0000 (08:50 -0800)]
[PATCH] i2o subsystem minor bugfixes
From: Markus Lidel <Markus.Lidel@shadowconnect.com>
drivers/message/i2o/i2o_block.c:
- corrected the initialization sequence of the request queues.
- added initialization to queue spinlocks.
- release device in i2o_scan because else the device could not be queried.
- i2o_block event threads wait on signal KILL but signal TERM was sent.
drivers/message/i2o/i2o_core.c:
- set the HRT length to 0 at initialization, to avoid calling free on
unallocated memory.
- i2o_core event threads wait on signal KILL but signal TERM was sent.
- added a limit of 3 tries to get the HRT from the controller.
- removed the dpt parameter, which was used to force DPT controllers get
handled by the i2o driver. Now all available i2o controllers will be
handled by this driver.
drivers/message/i2o/i2o_scsi.c:
- beautifying of printk calls.
- added scsi_unregister to properly clean up on module unload.
drivers/message/i2o/Kconfig:
- added help for i2o_block and i2o_scsi to describe the differences between
the two drivers.
include/linux/i2o-dev.h:
- cleaned typo "tate" into "state".
include/linux/i2o.h:
- removed defines from i2o_block and insert it here.
Andrew Morton [Sat, 6 Mar 2004 16:49:52 +0000 (08:49 -0800)]
[PATCH] serial_core.h needs sched.h
In file included from drivers/misc/ibmasm/uart.c:27:
include/linux/serial_core.h: In function `uart_handle_dcd_change':
include/linux/serial_core.h:407: `TASK_INTERRUPTIBLE' undeclared (first use in this function)
Andrew Morton [Sat, 6 Mar 2004 16:49:11 +0000 (08:49 -0800)]
[PATCH] char/rio/rioctrl: fix ioctl return values
From: "Randy.Dunlap" <rddunlap@osdl.org>
From: Tony Breeds <tony@bakeyournoodle.com>
It fixes 3 places where the ioctl returns positives instead of negatives.
I've gotten feedback from the maintainer (Rogier Wolff (sp?) and he has no
objections.
Andrew Morton [Sat, 6 Mar 2004 16:48:52 +0000 (08:48 -0800)]
[PATCH] ppc64: Convert mm_context_t to a struct
From: David Gibson <david@gibson.dropbear.id.au>
Converts the mm_context_t on ppc64 to be a struct. This lets us separate
the low_hpages flag into a separate field rather than folding it into the
actual context id. That makes things neater, since the flag is
conceptually separate and has, for example, should be propogate across a
fork whereas the context ID obviously isn't. The mm_context_id is the only
place to put arch-specific information in the mm_struct.
This patch will also make some interesting extensions to the hugepage
support much easier, such as allowing dynamic resizing of the hugepage
address space, or using special pagetables for hugepages.
Andrew Morton [Sat, 6 Mar 2004 16:48:32 +0000 (08:48 -0800)]
[PATCH] ppc64: iSeries_vio_dev cleanup
From: Stephen Rothwell <sfr@canb.auug.org.au>
This patch declares iSeries_vio_dev in an include file and includes it where
necessary. It also fixes arch/ppc64/kernel/mf.c to use the generic dma API
with iSeries_vio_dev.
Andrew Morton [Sat, 6 Mar 2004 16:48:11 +0000 (08:48 -0800)]
[PATCH] fastcall / regparm fixes
From: Gerd Knorr <kraxel@suse.de>
Current gcc's error out if a function's declaration and definition disagree
about the register passing convention.
The patch adds a new `fastcall' declatation primitive, and uses that in all
the FASTCALL functions which we could find. A number of inconsistencies were
fixed up along the way.
Andrew Morton [Sat, 6 Mar 2004 16:47:39 +0000 (08:47 -0800)]
[PATCH] svcauth_gss oops fix
From: "J. Bruce Fields" <bfields@fieldses.org>
I've done some testing with 2.6.4-rc1. It looks fine, except that one
critical patch got dropped somewhere along the way, without which
rpcsec_gss will oops.
We've changed gss_get_mic to write mic in place instead of kmalloc'ing new
memory for it; change must also be reflected in server side code.
Trond Myklebust [Sat, 6 Mar 2004 08:11:47 +0000 (00:11 -0800)]
[PATCH] Fix knfsd filehandles...
Here's a fix for an obvious typo in changeset
neilb@cse.unsw.edu.au|ChangeSet|20040305155724|31191
that was causing ESTALE errors galore on my NFS testrig.