Roland Dreier [Tue, 10 Oct 2006 19:50:38 +0000 (12:50 -0700)]
RDMA/amso1100: Fix build with debugging off
Since pr_debug() has changed from a macro to an inline function when
DEBUG is not defined, its arguments now need to be defined even when
debugging is off. Therefore to_event_str() and to_qp_state_str() need
to be moved out of #ifdef DEBUG. The compiler will throw the
definitions away if DEBUG is not defined, but it needs to be able to
see that the functions exist.
Sean Hefty [Wed, 4 Oct 2006 18:37:25 +0000 (11:37 -0700)]
IB/cm: Send DREP in response to unmatched DREQ
Currently a DREP is only sent in response to a DREQ if a connection
has been found matching the DREQ, and it is in the proper state. Once
a DREP is sent, the local connection moves into timewait. Duplicate
DREQs received while in this state result in re-sending the DREP.
However, it's likely that the local connection will enter and exit
timewait before the remote side times out a lost DREP and resends a DREQ.
To handle this, we send a DREP in response to a DREQ, even if a local
connection is not found. This avoids maintaining disconnected
id's in timewait states for excessively long times, just to handle a
lost DREP.
Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Sean Hefty [Wed, 4 Oct 2006 18:29:59 +0000 (11:29 -0700)]
IB/cm: Fix timewait crash after module unload
If the ib_cm module is unloaded while id's are still in timewait, the
CM will destroy the work queue used to process timewait. Once the
id's exit timewait, their timers will fire, leading to a crash trying
to access the destroyed work queue.
We need to track id's that are in timewait, and cancel their deferred
work on module unload.
Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
IB/srp: Enable multiple connections to the same target
Enable multiple concurrent connections to the same SRP target:
1) Use port GUID instead of node GUID in the initiator port
identifier. This allows connections to be made from multiple HCA
ports at the same time.
2) Let the user specify the identifier extention when adding the
device. This allows userspace to make multiple connections even
from the same port, if it wants too.
Without this, only one connection can be made from any given HCA, even
if it has multiple ports, because we don't use multi-channel mode, so
targets will only allow one connection from a given initiator port ID.
Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Ishai Rabinovitz [Tue, 10 Oct 2006 16:51:14 +0000 (09:51 -0700)]
IB/srp: Remove redundant memset()
scsi_host_alloc() already allocates with kzalloc(), so the struct Scsi_Host
is zeroed out, including the private data portion. Remove the redundant
memset that zeros this out again in the SRP initiator.
Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Tom Tucker [Tue, 3 Oct 2006 14:46:41 +0000 (09:46 -0500)]
RDMA/amso1100: Add spinlocks to serialize ib_post_send/ib_post_recv
The AMSO driver was not thread-safe in the post WR code and had
code that would sleep if the WR post FIFO was full. Since these
functions can be called on interrupt level I changed the sleep to a
udelay.
Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Martin Habets [Tue, 10 Oct 2006 01:10:16 +0000 (18:10 -0700)]
[SPARC32]: Fix prom.c build warning
Fix these 2.6.19-rc1 build warnings:
CC arch/sparc/kernel/prom.o
arch/sparc/kernel/prom.c: In function `of_set_property':
arch/sparc/kernel/prom.c:246: warning: passing arg 2 of `prom_setprop' discards qualifiers from pointer target type
arch/sparc/kernel/prom.c: In function `build_one_prop':
arch/sparc/kernel/prom.c:446: warning: unused variable `len'
arch/sparc/kernel/prom.c:480: warning: ignoring return value of `prom_getproperty', declared with attribute warn_unused_result
Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 5 Oct 2006 00:31:00 +0000 (17:31 -0700)]
[SPARC64]: Update MAINTAINERS entry.
ultralinux@vger is deprecated, folks should use
sparclinux@vger for both sparc ports.
Eddie, Anton, and Jakub haven't been active in
sparc64 maintainence for years, so best to remove
them as reports do nothing more than fill up their
mailboxes :)
Signed-off-by: David S. Miller <davem@davemloft.net>
[PATCH] x86_64 irq: Scream but don't die if we receive an unexpected irq
Due to code bugs or misbehaving hardware it is possible that we can
receive an interrupt that we have not mapped into a linux irq. Calling
BUG when that happens is very rude, and if the problem is mild enough
prevents anything else from getting done.
So instead of calling BUG just scream loudly about the problem and
continue running. We don't have enough knowledge to know which
interrupt triggered this behavior so we don't acknowledge it. This will
likely prevent a recurrence of the problem by jamming up the works with
an unacknowledged interrupt.
If the interrupt was something important it is quite possible that
nothing productive will happen past this point. But it is now at least
possible to keep working if the kernel can survive without the interrupt
we dropped on the floor.
Solutions like irqpoll should generally make dropped irqs non-fatal.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Bill Nottingham [Mon, 9 Oct 2006 20:10:48 +0000 (16:10 -0400)]
[PATCH] Introduce vfs_listxattr
This patch moves code out of fs/xattr.c:listxattr into a new function -
vfs_listxattr. The code for vfs_listxattr was originally submitted by Bill
Nottingham <notting@redhat.com> to Unionfs.
Sorry about that. The reason for this submission is to make the
listxattr code in fs/xattr.c a little cleaner (as well as to clean up
some code in Unionfs.)
Currently, Unionfs has vfs_listxattr defined in its code. I think
that's very ugly, and I'd like to see it (re)moved. The logical place
to put it, is along side of all the other vfs_*xattr functions.
Overall, I think this patch is benefitial for both kernel.org kernel and
Unionfs.
Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu> Acked-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
David Howells [Mon, 9 Oct 2006 11:19:47 +0000 (12:19 +0100)]
IRQ: Use the new typedef for interrupt handler function pointers
Use the new typedef for interrupt handler function pointers rather than
actually spelling out the full thing each time. This was scripted with the
following small shell script:
#!/bin/sh
egrep -nHrl -e 'irqreturn_t[ ]*[(][*]' $* |
while read i
do
echo $i
perl -pi -e 's/irqreturn_t\s*[(]\s*[*]\s*([_a-zA-Z0-9]*)\s*[)]\s*[(]\s*int\s*,\s*void\s*[*]\s*[)]/irq_handler_t \1/g' $i || exit $?
done
Signed-Off-By: David Howells <dhowells@redhat.com>
Linus Torvalds [Sun, 8 Oct 2006 23:42:11 +0000 (16:42 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] Cleanup unnecessary <asm/ptrace.h> inclusions.
[MIPS] DEC: pt_regs fixes for buserror handlers
[MIPS] Fix return type of gt64120_irq.
[MIPS] Ocelot C: Build fix - ll_mv64340_irq takes no more regs argument.
[MIPS] Jazz defconfig file.
[MIPS] Jazz: build fix - include <linux/screen_info.h>
[MIPS] Jazz: Remove warning. After 7 years probably somebody test this ;)
[MIPS] Jazz: Fix I/O port resources.
[MIPS] DEC: pt_regs fixes for dec_intr_halt.
handle_sysrq lost its pt_regs * argument
Manual conflict resolved in arch/um/drivers/mconsole_kern.c
Quoth Ben Herrenschmidt:
"Please revert this one for now. It seems to break G5s :( Looks like
PCI cells inside Apple IO ASICs don't have a PCI_INTERRUPT_LINE set.
I need to figure out a better fix."
Trond Myklebust [Sun, 8 Oct 2006 18:33:24 +0000 (14:33 -0400)]
[PATCH] NFS: Fix typo in nfs_get_client()
Commit ca4aa09635516258f158a7bc1594a794e4c34864 fixed waiting for the
structure to get initialised, but it is also possible to break out of
the loop while still in TASK_INTERRUPTIBLE.
Replace the whole thing by wait_event_interruptible, which is much more
readable, and doesn't suffer from these problems.
Al Viro [Sun, 8 Oct 2006 13:36:08 +0000 (14:36 +0100)]
[PATCH] alpha pt_regs cleanups: device_interrupt
callers of ->device_interrupt() do set_irq_regs() now; pt_regs argument
removed, remaining uses of regs in instances of ->device_interrupt()
are switched to get_irq_regs() and will be gone in the next patch.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Sun, 8 Oct 2006 13:32:15 +0000 (14:32 +0100)]
[PATCH] sparc32 rwlock fix
read_trylock() is broken on sparc32 (doesn't build and didn't work
right, actually). Proposed fix:
- make "writer holds lock" distinguishable from "reader tries to grab
lock"
- have __raw_read_trylock() try to acquire the mutex (in LSB of lock),
terminating spin if we see that there's writer holding it. Then do
the rest as we do in read_lock().
Thanks to Ingo for discussion...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Sun, 8 Oct 2006 19:26:00 +0000 (12:26 -0700)]
Merge branch 'irq-fixes' of git://git.parisc-linux.org/git/linux-2.6
* 'irq-fixes' of git://git.parisc-linux.org/git/linux-2.6:
[PARISC] More pt_regs removal
[PARISC] pdc_init no longer exists
[PARISC] Make firmware calls irqsafe-ish...
[PA-RISC] Fix boot breakage
[PARISC] Use set_irq_regs
[PATCH] x86_64 irq: Allocate a vector across all cpus for genapic_flat.
The problem we can't take advantage of lowest priority delivery mode if
the vectors are allocated for only one cpu at a time. Nor can we work
around hardware that assumes lowest priority delivery mode is always
used with several cpus.
So this patch introduces the concept of a vector_allocation_domain. A
set of cpus that will receive an irq on the same vector. Currently the
code for implementing this is placed in the genapic structure so we can
vary this depending on how we are using the io_apics.
This allows us to restore the previous behaviour of genapic_flat without
removing the benefits of having separate vector allocation for large
machines.
This should also fix the problem report where a hyperthreaded cpu was
receving the irq on the wrong hyperthread when in logical delivery mode
because the previous behaviour is restored.
This patch properly records our allocation of the first 16 irqs to the
first 16 available vectors on all cpus. This should be fine but it may
run into problems with multiple interrupts at the same interrupt level.
Except for some badly maintained comments in the code and the behaviour
of the interrupt allocator I have no real understanding of that problem.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: Muli Ben-Yehuda <muli@il.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Which vector an irq is assigned to now varies dynamically and is
not needed outside of io_apic.c. So remove the possibility
of accessing the information outside of io_apic.c and remove
the silly macro that makes looking for users of irq_vector
difficult.
The fact this compiles ensures there aren't any more pieces
of the old CONFIG_PCI_MSI weirdness that I failed to remove.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] i386/x86_64: FIX pci_enable_irq to set dev->irq to the irq number
In commit ace80ab796ae30d2c9ee8a84ab6f608a61f8b87b I removed the weird
logic that used the vector number as the irq number when MSI was
defined. However pci_enable_irq was using a different test in the
io_apic_assign_irqs path and I missed it :(
This patch removes the wrong code so no one hits this problem.
This code is only active when a specific set of boot command line
parameters is specified which likely explains why no one has notices
this earlier.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Trond Myklebust [Sun, 8 Oct 2006 18:33:24 +0000 (14:33 -0400)]
[PATCH] NFS: Fix typo in nfs_get_client()
NFS_CS_INITING > NFS_CS_READY, so instead of waiting for the structure to
get initialised, we currently immediately jump out of the loop without ever
sleeping.
Stefan Richter [Fri, 6 Oct 2006 17:49:52 +0000 (19:49 +0200)]
ieee1394: nodemgr: fix startup of knodemgrd
Revert a thinko in commit d2f119fe319528da8c76a1107459d6f478cbf28c:
When knodemgrd starts, it needs to sleep until host->generation was
incremented above its initial value of 0. My wrong logic caused it to
start sending requests when the bus wasn't completely ready. Seen as
"AT dma reset ctx=0, aborting transmission" messages in 2.6.19-rc1.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
[MIPS] Show actual CPU information in /proc/cpuinfo
Currently, /proc/cpuinfo contains several copies of the information for
whatever processor we happen to be scheduled on. This patch makes it contain
the proper information for each CPU, which is particularly useful on mixed
R12k/R10k IP27 machines.
Linus Torvalds [Sat, 7 Oct 2006 17:52:00 +0000 (10:52 -0700)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
[POWERPC] PReP fixup after irq changes
[POWERPC] SPU fixup after irq changes
[POWERPC] Fix up after irq changes
[POWERPC] Fix iseries/smp.c for irq breakage
[POWERPC] Fix viocons for irq breakage
[POWERPC] Update iseries_defconfig
[POWERPC] Fix fsl_soc build breaks
[POWERPC] Minor fix for bootargs property
[POWERPC] Update MTFSF_L() comment
[POWERPC] Update pSeries defconfig for SATA
[POWERPC] Don't get PCI IRQ from OF for devices with no IRQ
[POWERPC] Fix zImage decompress location
[POWERPC] linux,tce-size property is 32 bits
[POWERPC] Add DTS for MPC8349E-mITX board
[POWERPC] Fix harmless typo
[PPC] Fix some irq breakage with ARCH=ppc